-
Notifications
You must be signed in to change notification settings - Fork 3
Description
godataR version / branch:
Reported by:
@sarahollis cc @jamesfuller-cdc
Problem statement:
If a user runs the lab2godata shiny app and selects e.g. First name, last name and date of birth to match on but there are no dates of birth entered in their active outbreak in Go.Data, the shiny app exits with an error after pressing the submit parameters button.
Proposed solution:
- Check what is returned by
get_cases_epiwindow()when, as in this example, one of the core match columns is empty; - Edit
match_cases()to return 'no match' for that column ifis.null(dob)oris.na(dob).
This should allow the generation of the match report and return 'no match' for that column. The main match columns that could be empty in a given Go.Data instance (and therefore affected by this error) are date of birth or document number. First name and surname will always be present (mandatory) as will age if date of birth is missing.
It might also be useful to return an informative stop error to the user if one of their selected match columns is completely empty. Something like:
stop("One of the match columns you selected has no data in Go.Data. All match columns must be complete in both Go.Data case records and the laboratory records you are trying to match. Please select a different combination of columns to match on.")