MedicationDispense

— maps to 1 OMOP table
OMOP Table Status Mapped
drug_exposure primary
Pharmacy dispensing events. One FHIR MedicationDispense produces one OMOP drug_exposure row with drug_type_concept_id = 38000175 (Prescription dispensed in pharmacy). Date is taken from whenHandedOver (fallback whenPrepared). End date is computed from start + daysSupply, or defaults to start date. No reviewed reference implementation covers this mapping; the spec is reconstructed from OMOP drug_exposure schema and FHIR R4 MedicationDispense definition.
documented 23 fields detail →

MedicationDispense → OMOP Mapping

MedicationDispense represents the pharmacy dispensing stage of the medication lifecycle — the act of supplying medication in response to a prescription.

Source FHIR Resource

FHIR ResourceLifecycle StageOMOP targetOMOP type_concept_id
MedicationDispensePharmacy dispensingdrug_exposure38000175 (Prescription dispensed in pharmacy)

Target OMOP Tables

OMOP TablePurposeRequired?
drug_exposureOne row per dispense eventYes
drug_eraDerived: continuous drug exposure periodsNo — computed post-ETL
dose_eraDerived: continuous dose periodsNo — computed post-ETL

Mapping Strategy

  1. Date handling. whenHandedOverdrug_exposure_start_date (fallback: whenPrepared). End date computed from daysSupply + start, or fallback to start date.
  2. Quantity. quantity → OMOP quantity directly (the dispensed amount).
  3. Provider. performer[0].actorprovider_id.
  4. Medication resolution. Same strategies as MedicationRequest (inline medicationCodeableConcept, contained reference, external reference). Most implementations handle inline only. See ../Medication/index.md.
  5. Type concept. Constant 38000175 ("Prescription dispensed in pharmacy"). FhirToCdm and ETL-German use 32817 (EHR / CLAIM) universally.

Reference Implementations

No reviewed reference implementation has full MedicationDispense → drug_exposure coverage. This is a known gap across the FHIR-to-OMOP ecosystem:

  • omoponfhir-omopv5-r4-mapping — implements MedicationRequest and MedicationStatement, not MedicationDispense.
  • FhirToCdm — implements MedicationRequest and Immunization, not MedicationDispense.
  • ETL-German-FHIR-Core — implements MedicationStatement and MedicationAdministration, not MedicationDispense.
  • fhir-to-omop-demo — implements MedicationRequest and MedicationAdministration, not MedicationDispense.
  • NACHC — MedicationRequest only.
  • HL7 IG FML (refs/refs/fhir-omop-ig/input/maps/medication.fml) — MedicationStatement only.
  • This project — not yet implemented.

Status in This Project

Not yet implemented. Listed in mapspec/Medication/index.md (legacy) "Status in This Project" as a planned mapper.