Achilles
Achilles copied to clipboard
improve error handling when no data exists in cdm
exportAO will fail with the following error message if data only exists in the person table, but no other tables:
Error in aggregate.data.frame(as.data.frame(x), ...) :
no rows to aggregate
This error is occurring in the check for total records (https://github.com/OHDSI/Achilles/blob/main/R/exportAO.R#L1223) This should be modified to check for records returned from the query, if no records are returned provide an error message describing the problem and exit.