Identify unique external causes of injury cases based on FMDS dataset. Three possible methods are used:
Keep only those that are found in FMDS, and those found in both FMDS and Somatic when the date and health institution are matched
If multiple registries in FMDS with similar dates and health institution identified, then keep the earlier based on time
If multiple registries in FMDS with same date BUT different health institutions identified, then check health institution in Somatic data. Matching health institution will be kept.
Usage
find_cause(
d1,
d2,
id = "lopenr",
skade = "skadeDato",
rhf = "helseforetak_nr",
filter = NULL,
days = 3,
verbose = FALSE,
clean = FALSE
)
Arguments
- d1
Dataset for FMDS ie. external explanation for injury
- d2
Dataset for NPR ie. entry registration for injury
- id
Unique patient identity
- skade
Coloumn name for date of injury
- rhf
Coloumn name for health institutions
- filter
Column name for filtering inclusion and exclusion ie.
is.na(filter)
- days
A selected time period to consider as similar injury. Default is 3 days
- verbose
Keep variables for making the selection ie. xx.VariableName to produce DELXX
- clean
Delete all the possible duplicated cases