Added erdiag input, which needs to be explicitly set to NULL if users want to exclude ER diagnoses (same as in disability and frailty_score functions)
Updated documentation accordingly and clarified scenario when users may want to exclude ER diagnoses (e.g., different rates of ER entry in different cohorts)
Cleaned up documentation a bit more in general
Added check_input function to check cohort and diagnosis inputs
Added unit tests: Note that the dummy_diag function does not simulate COVID diagnoses (dummy_diag(nid = 5, nrow = 10, pattern = "^U07") returns no output), and therefore, the test cases have been hard-coded to include codes "U071" and "U072".
Closes #44
erdiag
input, which needs to be explicitly set toNULL
if users want to exclude ER diagnoses (same as indisability
andfrailty_score
functions)check_input
function to check cohort and diagnosis inputsdummy_diag
function does not simulate COVID diagnoses (dummy_diag(nid = 5, nrow = 10, pattern = "^U07")
returns no output), and therefore, the test cases have been hard-coded to include codes "U071" and "U072".