You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 if is.null(dob) or is.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.")
The text was updated successfully, but these errors were encountered:
AmyMikhail
changed the title
lab2godata shiny app: gives NA/NAN error when column to match on is empty in Go.Data
lab2godata: app gives NA/NAN error when match column is empty in Go.Data
Sep 21, 2022
AmyMikhail
changed the title
lab2godata: app gives NA/NAN error when match column is empty in Go.Data
lab2godata: app gives error when match column is empty in Go.Data
Sep 21, 2022
AmyMikhail
changed the title
lab2godata: app gives error when match column is empty in Go.Data
lab2godata: app errors when match column is empty in Go.Data
Sep 21, 2022
If a required column such as date of birth has no data in the active outbreak, get_cases_epiwindow() still returns cases within the selected date range, and the column with no data (in this case dob) is just filled with NA. So the problem lies in lab2godata_wrapper() which needs a suitable error added for this scenario.
Running the following code when there is no date of birth in the active outbreak in Go.Data:
The function is now producing a user friendly error which asks you to choose a different set of columns to match on if there is no data in one of the ones you have chosen. However for some reason, the error is appearing in the R console, along with the traceback (which is handy for me but probably too much for users). I will find out how to make the error appear in the app instead.
godataR version / branch:
amymikhail_labimportfunctions
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:
get_cases_epiwindow()
when, as in this example, one of the core match columns is empty;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:
The text was updated successfully, but these errors were encountered: