Trim ICD-9 record columns that include the nature of injury flag
Source:R/trim_5char_record.R
trim_5char_record.RdFor some years, the ICD-9 record columns are 5 character codes with the last character representing the nature of injury (N) flag. Just trim off these columns and use the appropriate rnifla_ column for the N flag.
Examples
trim_5char_record(c("400 1", "40000", "400", "400 "))
#> [1] "400 " "4000" "400" "400 "