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

Mimic Fhir Mappings

MIMIC to FHIR Mappings

The MIMIC-IV database was converted into FHIR. The tables from MIMIC-IV were each mapped to a one or more resources. The diagram below depicts these mappings:

Overall mappings MIMIC to FHIR
mimic-to-fhir-mappings.png

Custom profiles were created to house the tables coming into FHIR. This was necessary to handle the unique terminology coming from MIMIC. In the following sections you will see tables detailing the mapping from each MIMIC table to these MIMIC-FHIR profiles.

Condition

MIMIC-IV Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
diagnosis_icd hadm_id, seq_num, icd_code Condition.id MimicCondition Id made up of concatenation of hadm_id, seq_num, and icd_code, converted to UUID5
diagnosis_icd subject_id Condition.subject MimicCondition  
diagnosis_icd hadm_id Condition.encounter MimicCondition  
d_icd_diagnoses icd_code Condition.code.coding.code MimicCondition  
d_icd_diagnoses long_title Condition.code.coding.display MimicCondition  
  • Condition.category set to fixed value of ‘encounter-diagnosis’

Encounter

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
admissions hadm_id Encounter.id MimicEncounter Hadm_id converted to UUID5
admissions hadm_id Encounter.identifier.value MimicEncounter  
admissions admission_type Encounter.class MimicEncounter  
admissions admission_type Encounter.priority MimicEncounter  
admissions admission_location Encounter.hospitalization.admitSource MimicEncounter  
admissions discharge_location Encounter.hospitalization.dischargeDisposition MimicEncounter  
admissions subject_id Encounter.subject MimicEncounter  
admissions admittime Encounter.period.start MimicEncounter  
admissions dischtime Encounter.period.end MimicEncounter  
admissions dischtime Encounter.period.end MimicEncounter  
hcpcsevents hcpcs_cd Encounter.type.coding.code MimicEncounter  
hcpcsevents short_description Encounter.type.coding.display MimicEncounter  
services curr_service Encounter.serviceType MimicEncounter  
transfers careunit Encounter.location.reference MimicEncounter  
transfers intime Encounter.location.period.start MimicEncounter  
transfers outtime Encounter.location.period.end MimicEncounter  
  • Encounter.status is fixed to ‘finished’ for all MIMIC encounters
  • Encounter.serviceProvider is set to an UUID for BIDMC organization
MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
icustays stay_id Encounter.id MimicEncounter Stay_id converted to UUID5
icustays stay_id Encounter.identifier.value MimicEncounter  
icustays first_careunit Encounter.location.reference MimicEncounter  
icustays intime Encounter.period.start MimicEncounter  
icustays outtime Encounter.period.end MimicEncounter  
icustays subject_id Encounter.subject MimicEncounter Convert to UUID
icustays hadm_id Encounter.partOf MimicEncounter Links to MIMIC_Encounter’s
transfers intime Encounter.location.period.start MimicEncounter Take the min intime in the transfers table
transfers outtime Encounter.location.period.end MimicEncounter Take the max outtime in the transfers table
  • Encounter.status is fixed to ‘finished’ for all MIMIC encounters
  • Encounter.class is fixed to ‘ACUTE’
  • Encounter.type is fixed to SCT code 308335008 for “Patient encounter procedure”

MedicationAdministration

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
emar subject_id MedicationAdministration.subject MimicMedicationAdministration convert to UUID5
emar hadm_id MedicationAdministration.context MimicMedicationAdministration convert to UUID5
emar charttime MedicationAdminstration.effectiveDateTime MimicMedicationAdministration  
emar_detail emar_id, parent_field_ordinal MedicationAdministration.id MimicMedicationAdministration Id is concatenation of mimic data elements and converted to UUID5
emar_detail pharmacy_id MedicationAdministration.request MimicMedicationAdministration  
emar_detail dose_given, dose_given_unit MedicationAdministration.dosage.text [MedicationAdministration] concat the text and units
emar_detail site MedicationAdministration.site [MedicationAdministration]  
emar_detail route MedicationAdministration.route [MedicationAdministration]  
emar_detail event_txt MedicationAdministration.route [MedicationAdministration]  
emar_detail infusion_rate MedicationAdministration.rateQuantity.value [MedicationAdministration]  
emar_detail infusion_rate_unit MedicationAdministration.rateQuantity.unit [MedicationAdministration] also set for code element
emar_detail product_code MedicationAdministration.medicationCodeableConcept MimicMedicationAdministration product code used if present
emar medication MedicationAdministration.medicationCodeableConcept MimicMedicationAdministration medication used if product code not present
poe order_type MedicationAdministration.medicationCodeableConcept MimicMedicationAdministration Used for IV and TPN medication
  • MedicationAdministration.status is fixed to ‘completed’
  • MedicationAdministration.medicationCodeableConcept set to ‘UNK’ if product_code, medication, and poe.order_type are all NULL
MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
inputevents stay_id, orderid, itemid MedicationAdministration.id MimicMedicationAdministrationICU Id is concatenation of mimic data elements and converted to UUID5
inputevents subject_id MedicationAdministration.subject MimicMedicationAdministrationICU convert to UUID5
inputevents stay_id MedicationAdministration.context MimicMedicationAdministrationICU convert to UUID5
inputevents starttime MedicationAdministration.effectivePeriod.start MimicMedicationAdministrationICU  
inputevents rate MedicationAdministration.effectiveDateTime MimicMedicationAdministrationICU  
inputevents endtime MedicationAdministration.effectivePeriod.end MimicMedicationAdministrationICU only set period if inputevents.rate is null
inputevents ordercategorydescription MedicationAdministration.dosage.method MimicMedicationAdministrationICU  
inputevents amount MedicationAdministration.dosage.dose.value MimicMedicationAdministrationICU  
inputevents amountuom MedicationAdministration.dosage.dose.unit MimicMedicationAdministrationICU used for dose.unit and dose.code
inputevents rate MedicationAdministration.dosage.rateQuantity.value MimicMedicationAdministrationICU  
inputevents rateuom MedicationAdministration.dosage.rateQuantity.unit MimicMedicationAdministrationICU ised for rateQuantity unit and code
d_items itemid MedicationAdministration.medicationCodeableConcept.coding.code MimicMedicationAdministrationICU  
d_items label MedicationAdministration.medicationCodeableConcept.coding.display MimicMedicationAdministrationICU  
  • MedicationAdministration.status is fixed to ‘completed’

MedicationDispense

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
pharmacy pharmacy_id MedicationDispense.id MimicMedicationDispense convert to UUID5
pharmacy pharmacy_id MedicationDispense.identifier MimicMedicationDispense  
pharmacy medication MedicationDispense.medicationCodeableConcept MimicMedicationDispense  
pharmacy subject MedicationDispense.subject_id MimicMedicationDispense convert to UUID5
pharmacy hadm_id MedicationDispense.context MimicMedicationDispense convert to UUID5
pharmacy pharmacy_id MedicationDispense.authorizingPrescription MimicMedicationDispense convert to UUID5
pharmacy fill_quantity MedicationDispense.quantity MimicMedicationDispense  
pharmacy route MedicationDispense.dosageInstruction.route MimicMedicationDispense  
pharmacy frequency MedicationDispense.dosageInstruction.timing.code MimicMedicationDispense  
pharmacy duration MedicationDispense.dosageInstruction.timing.duration MimicMedicationDispense  
pharmacy one_hr_max MedicationDispense.dosageInstruction.maxDosePerPeriod MimicMedicationDispense  
  • MedicationDispense.status is fixed to ‘completed’

MedicationRequest

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
prescriptions pharmacy_id MedicationRequest.id MimicMedicationRequest convert to UUID5
prescriptions pharmacy_id MedicationRequest.identifier MimicMedicationRequest  
prescriptions subject_id MedicationRequest.subject MimicMedicationRequest convert to UUID5
prescriptions hadm_id MedicationRequest.encounter MimicMedicationRequest convert to UUID5
prescriptions drug_code MedicationRequest.medicationReference MimicMedicationRequest convert to UUID5
prescriptions status MedicationRequest.status MimicMedicationRequest  
prescriptions entertime MedicationRequest.authoredOn MimicMedicationRequest  
prescriptions prod_strength MedicationRequest.dosageInstruction.text MimicMedicationRequest  
prescriptions route MedicationRequest.dosageInstruction.route MimicMedicationRequest  
prescriptions dose_val_rx MedicationRequest.dosageInstruction.doseAndRate.doseQuantity.value MimicMedicationRequest  
prescriptions dose_unit_rx MedicationRequest.dosageInstruction.doseAndRate.doseQuantity.unit MimicMedicationRequest  
prescriptions frequency MedicationRequest.dosageInstruction.timing.code MimicMedicationRequest  
prescriptions duration MedicationRequest.dosageInstruction.timing.repeat.duration MimicMedicationRequest  
prescriptions one_hr_max MedicationRequest.dosageInstruction.maxDosePerPeriod MimicMedicationRequest  
prescriptions starttime MedicationRequest.dispenseRequest.validityPeriod.start MimicMedicationRequest  
prescriptions stoptime MedicationRequest.dispenseRequest.validityPeriod.end MimicMedicationRequest  
  • MedicationRequest.intent is fixed to ‘order’

Observation - labevents

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
labevents labevent_id Observation.id MimicObservationLabevents Convert to UUID5
labevents labevent_id Observation.identifier MimicObservationLabevents  
labevents status Observation.status MimicObservationLabevents  
labevents subject_id Observation.subject MimicObservationLabevents Convert to UUID5
labevents hadm_id Observation.encounter MimicObservationLabevents Convert to UUID5
labevents specimen_id Observation.specimen MimicObservationLabevents Convert to UUID5
labevents charttime Observation.effectiveDateTime MimicObservationLabevents  
labevents storetime Observation.issued MimicObservationLabevents  
labevents valuenum Observation.valueQuantity.value MimicObservationLabevents  
labevents valueuom Observation.valueQuantity.unit MimicObservationLabevents Used for valueQuantity unit and code
labevents value Observation.valueString MimicObservationLabevents Only used if MIMIC-IV valuenum is NULL
labevents comments Observation.valueString MimicObservationLabevents Only used if MIMIC-IV valuenum is NULL and value is NULL
labevents comments Observation.note.text MimicObservationLabevents Always capture the comment, but does not always match valueString
labevents flag Observation.interpretation MimicObservationLabevents  
labevents ref_range_lower Observation.referenceRange.low.value MimicObservationLabevents  
labevents valueuom Observation.referenceRange.low.unit MimicObservationLabevents Used for unit and code
labevents ref_range_upper Observation.referenceRange.high.value MimicObservationLabevents  
labevents valueuom Observation.referenceRange.high.unit MimicObservationLabevents Used for unit and code
labevents priority Observation.extension:lab-priority MimicObservationLabevents Set value to a custom extension LabPriority
d_labitems itemid Observation.code.coding.code MimicObservationLabevents  
d_labitems label Observation.code.coding.display MimicObservationLabevents  
  • Observation.category is set to code ‘laboratory’
  • Observation.value[x] has a 0..1 cardinality, hence only one measurement is captured in an Observation resource. When a value is missing, an Observation.dataAbsentReason is given (always ‘unknown’ (Unknown)).

Observation - microbiology

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
microbiologyevents micro_specimen_id, test_itemid Observation.id MimicObservationMicroTest Concat elements and convert to UUID5
microbiologyevents subject_id Observation.subject MimicObservationMicroTest Convert to UUID5
microbiologyevents hadm_id Observation.encounter MimicObservationMicroTest Convert to UUID5
microbiologyevents micro_specimen_id Observation.specimen MimicObservationMicroTest Convert to UUID5
microbiologyevents test_itemid Observation.code.coding.code MimicObservationMicroTest  
microbiologyevents test_name Observation.code.coding.display MimicObservationMicroTest  
microbiologyevents charttime Observation.effectiveDateTime MimicObservationMicroTest  
microbiologyevents org_itemid Observation.hasMember MimicObservationMicroTest Group all the references to org_itemid associated with the test_itemid
microbiologyevents org_itemid Observation.valueString MimicObservationMicroTest  
  • Observation.status is fixed to ‘final’
  • Observation.category is set to code ‘laboratory’
  • Observation.value[x] has a 0..1 cardinality, hence only one measurement is captured in an Observation resource. When a value is missing, an Observation.dataAbsentReason is given (always ‘unknown’ (Unknown)).
MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
microbiologyevents micro_specimen_id, test_itemid, org_itemid Observation.id MimicObservationMicroOrg Concat elements and convert to UUID5
microbiologyevents subject_id Observation.subject MimicObservationMicroOrg Convert to UUID5
microbiologyevents hadm_id Observation.encounter MimicObservationMicroOrg Convert to UUID5
microbiologyevents org_itemid Observation.code.coding.code MimicObservationMicroOrg  
microbiologyevents org_name Observation.code.coding.display MimicObservationMicroOrg  
microbiologyevents charttime Observation.effectiveDateTime MimicObservationMicroOrg  
microbiologyevents micro_specimen_id, test_itemid Observation.derivedFrom MimicObservationMicroOrg Point to the parent microbiology test
microbiologyevents microevent_id Observation.hasMember MimicObservationMicroOrg Group all the references to microevent_id associated with an org_itemid and test_itemid
microbiologyevents org_itemid Observation.valueString MimicObservationMicroOrg  
  • Observation.status is fixed to ‘final’
  • Observation.category is set to code ‘laboratory’
  • Observation.value[x] has a 0..1 cardinality, hence only one measurement is captured in an Observation resource. When a value is missing, an Observation.dataAbsentReason is given (always ‘unknown’ (Unknown)).
MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
microbiologyevents microevent_id Observation.id MimicObservationMicroSusc Convert to UUID5
microbiologyevents microevent_id Observation.identifer MimicObservationMicroSusc  
microbiologyevents subject_id Observation.subject MimicObservationMicroSusc Convert to UUID5
microbiologyevents hadm_id Observation.encounter MimicObservationMicroSusc Convert to UUID5
microbiologyevents ab_itemid Observation.code.coding.code MimicObservationMicroSusc  
microbiologyevents ab_name Observation.code.coding.display MimicObservationMicroSusc  
microbiologyevents storetime Observation.effectiveDateTime MimicObservationMicroSusc  
microbiologyevents comments Observation.note.text MimicObservationMicroSusc  
microbiologyevents dilution_value Observation.extension:dilution_details MimicObservationMicroSusc Set dilution value to custom extension dilution_details
microbiologyevents micro_specimen_id, test_itemid, org_itemid Observation.derivedFrom MimicObservationMicroSusc Reference back to parent Observation. Concat elements and convert to UUID5
  • Observation.status is fixed to ‘final’
  • Observation.category is set to code ‘laboratory’
  • Observation.value[x] has a 0..1 cardinality, hence only one measurement is captured in an Observation resource. When a value is missing, an Observation.dataAbsentReason is given (always ‘unknown’ (Unknown)).

Observation - ICU

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
chartevents stay_id, itemid, value Observation.id MimicObservationChartevents Concat MIMIC elements and convert to UUID5
chartevents subject_id Observation.subject MimicObservationChartevents Convert to UUID5
chartevents stay_id Observation.encounter MimicObservationChartevents Convert to UUID5
chartevents charttime Observation.effectiveDateTime MimicObservationChartevents  
chartevents storetime Observation.issued MimicObservationChartevents  
chartevents valuenum Observation.valueQuantity.value MimicObservationChartevents  
chartevents valueuom Observation.valueQuantity.unit MimicObservationChartevents Used for both unit and code element
chartevents value Observation.valueString MimicObservationChartevents Only store valueString if valueQuantity is not present
chartevents lownormalvalue Observation.referenceRange.low.value MimicObservationChartevents  
chartevents valueuom Observation.referenceRange.low.unit MimicObservationChartevents Used for both unit and code element
chartevents highnormalvalue Observation.referenceRange.high.value MimicObservationChartevents  
chartevents valueuom Observation.referenceRange.high.unit MimicObservationChartevents Used for both unit and code element
d_items category Observation.category MimicObservationChartevents  
d_items itemid Observation.code.coding.code MimicObservationChartevents  
d_items label Observation.code.coding.display MimicObservationChartevents  
  • Observation.status is fixed to ‘final’
MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
datetimeevents stay_id, charttime, itemid Observation.id MimicObservationDatetimeevents Concat MIMIC elements and convert to UUID5
datetimeevents subject_id Observation.subject MimicObservationDatetimeevents Convert to UUID5
datetimeevents stay_id Observation.encounter MimicObservationDatetimeevents Convert to UUID5
datetimeevents charttime Observation.effectiveDateTime MimicObservationDatetimeevents  
datetimeevents storetime Observation.issued MimicObservationDatetimeevents  
datetimeevents value Observation.valueDateTime MimicObservationDatetimeevents  
d_items category Observation.category MimicObservationDatetimeevents  
d_items itemid Observation.code.coding.code MimicObservationDatetimeevents  
d_items label Observation.code.coding.display MimicObservationDatetimeevents  
  • Observation.status is fixed to ‘final’
MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
outputevents stay_id, charttime, itemid Observation.id MimicObservationOutputevents Concat MIMIC elements and convert to UUID5
outputevents subject_id Observation.subject MimicObservationOutputevents Convert to UUID5
outputevents stay_id Observation.encounter MimicObservationOutputevents Convert to UUID5
outputevents charttime Observation.effectiveDateTime MimicObservationOutputevents  
outputevents storetime Observation.issued MimicObservationOutputevents  
outputevents value Observation.valueQuantity.value MimicObservationOutputevents  
outputevents valueuom Observation.valueQuantity.unit MimicObservationOutputevents Used for unit and code elements
d_items category Observation.category MimicObservationOutputevents  
d_items itemid Observation.code.coding.code MimicObservationOutputevents  
d_items label Observation.code.coding.display MimicObservationOutputevents  
  • Observation.status is fixed to ‘final’

Location

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
transfers careunit Location.id MimicLocation careunit converted to UUID5
transfers careunit Location.name MimicLocation  
  • Location.physicalType set to a fixed code ‘wa’ for Wards
  • Location.status is set to ‘active’
  • Location.managingOrganization set to BIDMC

Patient

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
patients subject_id Patient.id MimicPatient Convert to UUID5
patients subject_id Patient.identifier MimicPatient  
patients gender Patient.gender MimicPatient  
patients anchor_age Patient.birthDate MimicPatient Using transfers.intime as a relative point to create a birthDate
patients dod Patient.deceasedDateTime MimicPatient  
patients gender Patient.extension:birthsex MimicPatient  
admissions ethnicity Patient.extension:race MimicPatient Map MIMIC ethnicity to the FHIR race categories
admissions ethnicity Patient.extension:ethnicity MimicPatient Map MIMIC ethnicity to the FHIR ethnicity groups
admissions marital_status Patient.maritalStatus MimicPatient  
admissions language Patient.communication.language MimicPatient  
  • Patient.name is created with a combination of “Patient_” and subject_id being concatenated
  • Patient.managingOrganization is set to BIDMC

Procedure

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
procedures_icd hadm_id, seq_num, icd_code Procedure.id MimicProcedure Concat elements and convert to UUID5
procedures_icd subject_id Procedure.subject MimicProcedure Convert to UUID5
procedures_icd hadm_id Procedure.encounter MimicProcedure Convert to UUID5
procedures_icd chartdate Procedure.performedDateTime MimicProcedure  
procedures_icd icd_code Procedure.code.coding.code MimicProcedure  
procedures_icd icd_version Procedure.code.coding.system MimicProcedure ICD Version used to select FHIR ICD codesystem
d_icd_procedures long_title Procedure.code.coding.display MimicProcedure  
  • Procedure.status is fixed to ‘completed’ (Completed) for all procedures.
MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes
procedureevents stay_id, order_id, itemid Procedure.id MimicProcedureICU Concat elements and convert to UUID5
procedureevents subject_id Procedure.subject MimicProcedureICU Convert to UUID5
procedureevents stay_id Procedure.encounter MimicProcedureICU Convert to UUID5
procedureevents starttime Procedure.performedPeriod.start MimicProcedureICU  
procedureevents endtime Procedure.performedPeriod.end MimicProcedureICU  
procedureevents location Procedure.bodySite MimicProcedureICU  
procedureevents statusdescription Procedure.status MimicProcedureICU  
procedureevents ordercategoryname Procedure.category MimicProcedureICU  
procedureevents itemid Procedure.code.coding.code MimicProcedureICU  
d_items label Procedure.code.coding.display MimicProcedureICU  

Specimen

MimicSpecimen is mapped from both MIMIC-IV tables labevents and microbiologyevents.

MIMIC Table MIMIC Data Element FHIR Data Element FHIR Profile Notes  
  labevents specimen_id Specimen.id MimicSpecimen Convert to UUID5
  labevents specimen_id Specimen.identifier MimicSpecimen  
  labevents subject_id Specimen.subject MimicSpecimen Convert to UUID5
  labevents charttime Specimen.collection.collectedDateTime MimicSpecimen  
  labevents fluid Specimen.type.coding.code MimicSpecimen  
  microbiologyevents micro_specimen_id Specimen.id MimicSpecimen Convert to UUID5
  microbiologyevents micro_specimen_id Specimen.identifier MimicSpecimen  
  microbiologyevents subject_id Specimen.subject MimicSpecimen Convert to UUID5
  microbiologyevents charttime Specimen.collection.collectedDateTime MimicSpecimen  
  microbiologyevents spec_itemid Specimen.type.coding.code MimicSpecimen  
  microbiologyevents spec_type_desc Specimen.type.coding.code MimicSpecimen