View source: R/prefix_to_record.R
prefix_to_record | R Documentation |
For record columns, codes between 800-999 can be either nature of injury (N) or external cause of innjury (E) codes. To determine the correct code, there is a corresponding nature of injury flag column where 0 indicates an E code and 1 indicates an N code. This takes the record/flag pair of columns and prefixes the record column as appropriate.
prefix_to_record(record_col, rnifla_col)
record_col |
The record column from an ICD-9 dataframe |
rnifla_col |
The corresponding nature of injury flag column |
vector
record_col <- c(7500, 8000, 8001, 9999, 10000)
rnifla_col <- c(0, 1, 0, 1, 0)
prefix_to_record(record_col, rnifla_col)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.