Open aspedrosa opened 2 years ago
Analysis 200 is _"Number of persons with at least one visit occurrence, by visit_conceptid" with stratum_1 being the visit_concept_id. Apparently in some databases the visit_concept_id is empty (NULL). This is not according to the OMOP CDM conventions (it should indeed be 0 if no visit concept applicable).
In short, I agree with your solution (adding a coalesce(stratum_1, 0)
should work), but the actual solution is with the data owners to fix their data and populate the visit_concept_id.
Didn't know about the coalesce
function. I updated the visit-related queries to use it, for analysis_id IN (200, 2001)
, and now Databases with this issue (German MS Registry for example) will show a "No matching concept" record as intended.
Not sure if this is the correct place to place these issues.
For some databases on the NetworkDashboard EHDEN installation, the record of analysis_id=200 has a stratum_1 value of NULL. This affects all Visit related graphs, making these databases not show in such graphs.
However, there is a workaround that we can do on the NetworkDashboards side, I'm just not sure if it's correct. Basically assume that values of stratum_1=NULL are the same as stratum_1=0, which will display "No matching concept".