CohortDiagnostics icon indicating copy to clipboard operation
CohortDiagnostics copied to clipboard

incidence_rate results csv not matching the table specification

Open anthonysena opened this issue 2 years ago • 0 comments

CohortDiagnostics defines the incidence_rate table based on ref.

In reviewing the resulting incidence_rate.csv file, it appears that some fields are empty - for example, when producing an overall incidence rate that is not stratified by gender/age_group, you'll get something like this:

"cohort_count","person_years","gender","age_group","calendar_year","incidence_rate","cohort_id","database_id"
220227,41883569.8311,,,,5.258076159412607,10393,"-948018521"

I think the primary key definition of the incidence_rate table is correct and perhaps some additional formatting is required when producing the result such that an empty gender/age_group is given a designation (i.e. zero) to indicate that it is not used in that row? This is currently causing upload problems since the upload functionality in CD handles these cases by using an assumed value for these missing fields while the approach I've been working on will not make such an assumption.

anthonysena avatar Feb 08 '23 17:02 anthonysena