synthetichealth / synthea

Synthetic Patient Population Simulator
https://synthetichealth.github.io/synthea
Apache License 2.0
2.2k stars 657 forks source link

MedicationStatement resource #1013

Closed tamasVarjas closed 2 years ago

tamasVarjas commented 2 years ago

Hi! I'm in a bit of a confusion regarding the support for MedicationStatement FHIR resources in Synthea. According to the HL7 FHIR wiki page, MedicationStatement is supported with the R4 and US Core option. However, I found this commit from late 2019, where MedicationStatement was apparently removed. Does this mean that the above wiki page is not up-to-date and in fact MedicationStatement is currently not supported at all?

If so, can I ask why that change was made? Additionally, is there a way we can nevertheless generate MedicationStatement resources with Synthea or is that not an option at all?

jawalonoski commented 2 years ago

US Core does not use MedicationStatement

MedicationStatement is not in the current version of US Core. See https://www.hl7.org/fhir/us/core/medication-list-guidance.html

Here is a screenshot from the US Core specification (the above link I provided):

image

How Synthea represent medications

US Core uses Medication and MedicationRequest.

Synthea uses Medication, MedicationRequest, and MedicationAdministration. We removed MedicationStatement when it was dropped from US Core because it was redundant. It did not contain any information that wasn't already in the other resources. We kept the administration resource because clinicians who peer-reviewed the work said it was important.

There are 145 resources in FHIR R4. Approximately 16 resources are related to Medications. Do we need to support all of them? Will any system?

Options

If users are limited by the lack of MedicationDispense or MedicationStatement then Synthea data can be post-processed (e.g., an ETL process) in order to create matching dispense resources and statement resources for every request and administration that gets generated.

Synthea doesn't do that out of the box, because frankly it is noise.

An alternative is to edit the FHIR R4 exporter and add code so those resources get generated at runtime. If there are enough users who really really want MedicationStatement we'll accept that pull request, or add it in ourselves (eventually).

jawalonoski commented 2 years ago

Also, I apologize for the wiki being out of date. There are a few pages and we often forget to update details here and there. Thank you for pointing that out. It is now corrected.