smart-on-fhir / cumulus-library-data-metrics

A data metrics study for the Cumulus project
https://docs.smarthealthit.org/cumulus/
Apache License 2.0
2 stars 0 forks source link

Add resource_cnt column to c_system_use tables #31

Open gotdan opened 5 months ago

gotdan commented 5 months ago

It seems like these values are mostly interesting in the context of the total resource count in that category, status and year.

mikix commented 5 months ago

This and #32 seem like yet another cube vs aggregate issue. A CUBE provides that info automatically.

But you could also get it by summing up the aggregate rows, right?

gotdan commented 5 months ago

I think that's only true if a terminology element is populated in all resources though. If I want to get a sense of how many Encounters I can find with a particular coding, I think the total number of Encounters would be the more useful denominator, not the total number of Encounters with a coding populated.

mikix commented 5 months ago

The rows with cumulus__none for the systems field will tell you the count of Encounters without any terminology element populated (as well as Encounters with the element populated but no actual system filled in).

So you should still be able to sum up to get the total.

gotdan commented 5 months ago

Ah, cool, in that case agree that summing in a query in the presentation layer could be a workaround.