MedicationStatement
— maps to 1 OMOP table| OMOP Table | Status | Mapped | |
|---|---|---|---|
|
drug_exposure
primary
Patient self-reported medication events. Each MedicationStatement produces one drug_exposure row with drug_type_concept_id defaulting to 44787730 (Patient Self-Reported Medication). This is the only FHIR medication resource with a normative HL7 IG FML mapping. Dynamic type concept adjustment is possible based on basedOn/partOf references (omoponfhir behavior).
|
implemented | 23 fields | detail → |
MedicationStatement → OMOP Mapping
MedicationStatement represents the patient self-report stage of the medication lifecycle — what the patient is taking, has taken, or intends to take, regardless of whether it was prescribed in the system. This is the only medication resource for which the HL7 FHIR-to-OMOP IG provides a normative FML mapping.
Source FHIR Resource
| FHIR Resource | Lifecycle Stage | OMOP target | OMOP type_concept_id |
|---|---|---|---|
MedicationStatement | Patient self-report | drug_exposure | 44787730 (Patient Self-Reported Medication) — or dynamic, see below |
Target OMOP Tables
| OMOP Table | Purpose | Required? |
|---|---|---|
drug_exposure | One row per self-reported medication event | Yes |
drug_era | Derived: continuous drug exposure periods | No — computed post-ETL |
dose_era | Derived: continuous dose periods | No — computed post-ETL |
Mapping Strategy
-
Status filtering.
entered-in-erroris always skipped. omoponfhir mapsstoppedand populatesstop_reasonfromstatusReason. This project skipsstopped,on-hold, and other non-active/completed statuses. -
Dynamic type concept. Default is
44787730("Patient Self-Reported Medication"). omoponfhir dynamically adjusts:- If
basedOnreferences aMedicationRequest, use38000177(Prescription written) instead. - If
partOfreferences aMedicationAdministration, use38000179(Physician administered drug). - If
partOfreferences aMedicationDispense, use38000175(Prescription dispensed in pharmacy).
- If
-
Date handling.
effectiveDateTimeoreffectivePeriod.start→drug_exposure_start_date. Tertiary fallback:dateAsserted. omoponfhir sets end = start wheneffectiveDateTimeis used. omoponfhir falls back tonew Date()(current time) if no date found; this project falls back todateAsserted. -
Dosage parsing.
dosage[].doseAndRate[].doseQuantity→quantity+dose_unit_source_value.dosage[].route→route_concept_id+route_source_value.dosage[].text→sig. ETL-German fans out onedrug_exposurerow perdosage[]entry; others take the first. -
Medication resolution. Same strategies as MedicationRequest.
medicationCodeableConceptvsmedicationReferencedistinction. omoponfhir resolves contained references. ETL-German pre-indexes Medication resources viamedication_id_map. This project handles inline only. -
Provider.
informationSource→provider_id. omoponfhir filters toPractitioner-typed references only. ETL-German does not map provider for MedicationStatement.
Reference Implementations
- HL7 IG FML (normative) —
refs/refs/fhir-omop-ig/input/maps/medication.fml(46 lines). The only normative mapping for any FHIR medication resource and it covers only MedicationStatement. Maps drug concept, dates, type, and stop_reason.person_idanddrug_exposure_idare commented-out TODOs. Status: draft. - omoponfhir-omopv5-r4-mapping (Georgia Tech, Java) —
OmopMedicationStatement.java(983 lines). Most complete: RxNorm concept lookup, contained reference resolution, route concept lookup, dosage parsing, dynamic type concept frombasedOn/partOf, stop_reason extraction (truncated to 20 chars). Status: stale (2022). - ETL-German-FHIR-Core (OHDSI, Java) —
MedicationStatementMapper.java(965 lines). ATC vocabulary, dose form and route mapping, Range mean quantity, fan-out per dosage entry. Pre-indexes Medication resources viamedication_id_map. Type concept: CONCEPT_CLAIM (32817). Status: maintained. - This project —
src/mapper/medication-statement.ts(75 lines). Status filtering, inline medication only,dateAssertedfallback, dosage parsing.
Status in This Project
Implemented: src/mapper/medication-statement.ts. Status filtering, inline medication only, dateAsserted fallback chain, dosage parsing. drug_concept_id is hardcoded to 0 (no vocabulary lookup). route_concept_id is hardcoded to null (source value only). medicationReference resolution is not implemented. Dynamic type concept based on basedOn/partOf is not implemented (uses static 44787730).
Related Resources
../MedicationRequest/— prescription/order stage.../MedicationDispense/— pharmacy dispensing stage.../MedicationAdministration/— inpatient administration stage.../Medication/— vocabulary/codeable concept resource (not an event).