smart-on-fhir / cumulus-library

https://docs.smarthealthit.org/cumulus/library/
Apache License 2.0
2 stars 0 forks source link

Core Medication tables could use a reorganization #227

Open mikix opened 2 months ago

mikix commented 2 months ago

Current State

My Proposal

I imagine the core__medication tables were named that because they sometimes inspect Medication resources (contained or external). But the rows do not represent Medication resources at all. They are summaries of MedicationRequests that happened to (behind the scenes) grab the correct codes from Medication resources.

Consumers of the tables don't care about all that abstraction work - let's actually provide the abstraction.

In this proposal, we don't need a core__medication table, since those aren't patient/encounter linked resources (maybe we could still provide one in the future, if someone wants the ability to look up detailed med info -- but not our concern right now).

Some other idea Or some better idea - but regardless of where we land, I think there's currently some unnecessary duplication between those two tables, and we could stand to develop an actual vision for them.