This function uses the hospital contacts from LPR2 and LPR3 to include all dates of diabetes diagnoses to use for inclusion, as well as additional information needed to classify diabetes type. Diabetes diagnoses from both ICD-8 and ICD-10 are included.
Arguments
- lpr2
The output from
prepare_lpr2()
.- lpr3
The output from
prepare_lpr3()
.
Value
The same type as the input data, default as a tibble::tibble()
,
with less rows after filtering.
See also
See the vignette("algorithm")
for the logic used to filter these
patients.
Examples
if (FALSE) { # \dontrun{
register_data <- simulate_registers(c("lpr_diag", "lpr_adm", "diagnoser", "kontakter"))
keep_diabetes_diagnoses(
lpr2 = prepare_lpr2(register_data$lpr_adm, register_data$lpr_diag),
lpr3 = prepare_lpr3(register_data$kontakter, register_data$diagnoser)
)
} # }