MIMIC Implementation Guide
1.3.0 - Draft
MIMIC Implementation Guide - Local Development build (v1.3.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions
The medication information stored in the MIMIC-IV profiles covers many hospital medication workflows. The medication related data can be pulled out separately to be used as test data for medication applications.
The medication workflow found in the MIMIC-IV Profiles often appear in one of 3 main ways in MIMIC-IV-on-FHIR:
Each workflow can be explored in depth to test robustness of your application.
To retrieve all medication resources, a search should be applied to MimicPatient. Searching for Patient resources returning all linked resources that have a resource type of Encounter, Medication, MedicationAdministration, MedicationDispense, MedicationRequest, and MedicationStatement.
Medication in FHIR is organized into 5 resources
The hospital medicine workflow prescribe -> dispense -> administer in FHIR becomes: MedicationRequest -> MedicationDispense -> MedicationAdministration. MedicationStatement is often taken separately to record historical medication usage. The interconnected medication resources are shown below:
The medication across MIMIC do NOT have one single source, thus we need to create multiple CodeSystems fully describe the medication in MIMIC.
The medication CodeSystems that were generated were:
CodeSystem | Source | Usage | Notes |
---|---|---|---|
medication-formulary-drug-cd | prescriptions.formulary_drug_cd and emar_detail.product_code | Medication for MedicationRequest and MedicationAdministration | For requests, can be part of med mixes |
medication-name | prescriptions.drug, pharmacy.medication, emar.medication | Medication for MedicationDispense and some MedicationAdministration | Only used in medadmin if drug product_code is not present |
medication-poe-iv | poe.order_type | Medication for MedicationAdministration | Only used if product code and drug name are not present |
medication-ndc | prescriptions.ndc | Medication for MedicationRequest | NDC is used as the primary identifier in medication coming out of prescriptions |
medication-gsn | prescriptions.gsn | Medication for MedicationRequest | GSN is the secondary identifier in medication coming out of prescriptions |
medication-icu | d_items.itemid for inputevents | Medication for MedicationAdministrationICU | ICU meds are stored separately from the rest of the medication |
For the generation of medication resources the CodeSystems were effectively translated into fhir resources. The exception was prescription medication. Since there are multiple identifiers in prescriptions (ndc, gsn, formulary_drug_cd, drug name) more distinct medication were created. Some notes from creating prescription medication:
The other more complex medication was medication mixes. These were constructed from prescriptions with multiple drugs linked to one pharmacy_id. Thus once the base medication were created, the medication mixes were generated with references to the base medication in the ingredients element.