profiles / ViewDefinition
MedicationAdministration → drug_exposure (FHIR-flat, stage 1)
Inpatient medication administration events. Each MedicationAdministration produces one drug_exposure row distinguished by drug_type_concept_id = 38000179 (Physician administered drug). MedicationAdministration carries the richest route and dose-event timing information of the four medication resources. Stage 1 of FHIR→OMOP: produce a flat row keeping source codes per vocabulary. Stage 2 joins vocab.concept to resolve concept_ids.
select.column (18)
| column name | FHIRPath | type | → OMOP column · stage-2 transform | description |
|---|---|---|---|---|
| id | MedicationAdministration.id | id | drug_exposure_id surrogate key from hash/sequence/lookup of FHIR id |
FHIR MedicationAdministration.id; surrogate OMOP key derived (hash/sequence) downstream. |
| drug_rxnorm | MedicationAdministration.medicationCodeableConcept.coding.where(system='http://www.nlm.nih.gov/research/umls/rxnorm').first().code | code | drug_concept_id lookup vocab.concept WHERE vocabulary_id='RxNorm' AND concept_code = (this column); standard_concept='S' preferred |
Medication code — RxNorm |
| drug_ndc | MedicationAdministration.medicationCodeableConcept.coding.where(system='http://hl7.org/fhir/sid/ndc').first().code | code | drug_concept_id lookup vocab.concept WHERE vocabulary_id='NDC' AND concept_code = (this column); standard_concept='S' preferred |
Medication code — NDC |
| drug_atc | MedicationAdministration.medicationCodeableConcept.coding.where(system='http://www.whocc.no/atc').first().code | code | drug_concept_id lookup vocab.concept WHERE vocabulary_id='ATC' AND concept_code = (this column); standard_concept='S' preferred |
Medication code — ATC |
| drug_snomed | MedicationAdministration.medicationCodeableConcept.coding.where(system='http://snomed.info/sct').first().code | code | drug_concept_id lookup vocab.concept WHERE vocabulary_id='SNOMED' AND concept_code = (this column); standard_concept='S' preferred |
Medication code — SNOMED |
| drug_text | MedicationAdministration.medicationCodeableConcept.text | string | drug_source_value copy text verbatim into OMOP source_value column |
Free text label from MedicationAdministration.medicationCodeableConcept |
| subject_id | MedicationAdministration.subject | Reference(Patient) | person_id resolve PERSON reference; downstream maps to person_id |
Resolved from subject reference to Patient. |
| drug_exposure_start_date | MedicationAdministration.effectiveDateTime | dateTime | drug_exposure_start_date |
Point-in-time (effectiveDateTime) or period start. Resource skipped if neither is available. |
| drug_exposure_start_datetime | MedicationAdministration.effectiveDateTime | dateTime | drug_exposure_start_datetime |
Full ISO datetime. |
| drug_exposure_end_date | MedicationAdministration.effectivePeriod.end | dateTime | drug_exposure_end_date effectivePeriod.end ?? drug_exposure_start_date |
When effectiveDateTime is used (single point), end = start. When effectivePeriod has no end, end = start. omoponfhir general rule: setDrugExposureEndDate(startDate) when no period end. |
| drug_exposure_end_datetime | MedicationAdministration.effectivePeriod.end | dateTime | drug_exposure_end_datetime |
Full ISO datetime. Null if no period end. |
| quantity | MedicationAdministration.dosage.dose.value | decimal | quantity |
Dose amount given. ETL-German computes mean of Range when doseRange is used. |
| sig | MedicationAdministration.dosage.text | string | sig |
Free-text dosage instructions. |
| route | MedicationAdministration.dosage.route | CodeableConcept | route_concept_id resolve CONCEPT reference; downstream maps to route_concept_id |
Administration route via SNOMED to OMOP Route domain lookup. MedicationAdministration carries the richest route data of the four medication resources. |
| route_text | MedicationAdministration.dosage.route.text | string | route_source_value |
Raw route text or first coding display. |
| performer_id | MedicationAdministration.performer[0].actor | Reference(Practitioner) | provider_id resolve PROVIDER reference; downstream maps to provider_id |
Administering clinician. First performer entry. |
| encounter_id | MedicationAdministration.context | Reference(Encounter) | visit_occurrence_id resolve VISIT_OCCURRENCE reference; downstream maps to visit_occurrence_id |
Resolved from context reference to Encounter. |
| dose_unit_text | MedicationAdministration.dosage.dose.unit | string | dose_unit_source_value |
Raw dose unit string from dosage.dose. |
Raw JSON
{
"resourceType": "ViewDefinition",
"id": "omop-medicationadministration-drug-exposure",
"url": "https://fhir2omop.health-samurai.io/ViewDefinition/omop-medicationadministration-drug-exposure",
"version": "0.2.0",
"name": "OmopMedicationAdministrationDrugExposureView",
"title": "MedicationAdministration → drug_exposure (FHIR-flat, stage 1)",
"status": "draft",
"experimental": true,
"description": "Inpatient medication administration events. Each MedicationAdministration produces one drug_exposure row distinguished by drug_type_concept_id = 38000179 (Physician administered drug). MedicationAdministration carries the richest route and dose-event timing information of the four medication resources.\n\nStage 1 of FHIR→OMOP: produce a flat row keeping source codes per vocabulary. Stage 2 joins vocab.concept to resolve concept_ids.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-target-table",
"valueString": "drug_exposure"
},
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-edge",
"valueString": "MedicationAdministration__drug_exposure"
}
],
"resource": "MedicationAdministration",
"select": [
{
"column": [
{
"name": "id",
"path": "MedicationAdministration.id",
"type": "id",
"description": "FHIR MedicationAdministration.id; surrogate OMOP key derived (hash/sequence) downstream.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "drug_exposure_id"
},
{
"url": "transform",
"valueString": "surrogate key from hash/sequence/lookup of FHIR id"
}
]
}
]
},
{
"name": "drug_rxnorm",
"path": "MedicationAdministration.medicationCodeableConcept.coding.where(system='http://www.nlm.nih.gov/research/umls/rxnorm').first().code",
"type": "code",
"description": "Medication code — RxNorm",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "drug_concept_id"
},
{
"url": "transform",
"valueString": "lookup vocab.concept WHERE vocabulary_id='RxNorm' AND concept_code = (this column); standard_concept='S' preferred"
}
]
}
]
},
{
"name": "drug_ndc",
"path": "MedicationAdministration.medicationCodeableConcept.coding.where(system='http://hl7.org/fhir/sid/ndc').first().code",
"type": "code",
"description": "Medication code — NDC",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "drug_concept_id"
},
{
"url": "transform",
"valueString": "lookup vocab.concept WHERE vocabulary_id='NDC' AND concept_code = (this column); standard_concept='S' preferred"
}
]
}
]
},
{
"name": "drug_atc",
"path": "MedicationAdministration.medicationCodeableConcept.coding.where(system='http://www.whocc.no/atc').first().code",
"type": "code",
"description": "Medication code — ATC",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "drug_concept_id"
},
{
"url": "transform",
"valueString": "lookup vocab.concept WHERE vocabulary_id='ATC' AND concept_code = (this column); standard_concept='S' preferred"
}
]
}
]
},
{
"name": "drug_snomed",
"path": "MedicationAdministration.medicationCodeableConcept.coding.where(system='http://snomed.info/sct').first().code",
"type": "code",
"description": "Medication code — SNOMED",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "drug_concept_id"
},
{
"url": "transform",
"valueString": "lookup vocab.concept WHERE vocabulary_id='SNOMED' AND concept_code = (this column); standard_concept='S' preferred"
}
]
}
]
},
{
"name": "drug_text",
"path": "MedicationAdministration.medicationCodeableConcept.text",
"type": "string",
"description": "Free text label from MedicationAdministration.medicationCodeableConcept",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "drug_source_value"
},
{
"url": "transform",
"valueString": "copy text verbatim into OMOP source_value column"
}
]
}
]
},
{
"name": "subject_id",
"path": "MedicationAdministration.subject",
"type": "Reference(Patient)",
"description": "Resolved from subject reference to Patient.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "person_id"
},
{
"url": "transform",
"valueString": "resolve PERSON reference; downstream maps to person_id"
}
]
}
]
},
{
"name": "drug_exposure_start_date",
"path": "MedicationAdministration.effectiveDateTime",
"type": "dateTime",
"description": "Point-in-time (effectiveDateTime) or period start. Resource skipped if neither is available.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "drug_exposure_start_date"
}
]
}
]
},
{
"name": "drug_exposure_start_datetime",
"path": "MedicationAdministration.effectiveDateTime",
"type": "dateTime",
"description": "Full ISO datetime.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "drug_exposure_start_datetime"
}
]
}
]
},
{
"name": "drug_exposure_end_date",
"path": "MedicationAdministration.effectivePeriod.end",
"type": "dateTime",
"description": "When effectiveDateTime is used (single point), end = start. When effectivePeriod has no end, end = start. omoponfhir general rule: setDrugExposureEndDate(startDate) when no period end.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "drug_exposure_end_date"
},
{
"url": "transform",
"valueString": "effectivePeriod.end ?? drug_exposure_start_date"
}
]
}
]
},
{
"name": "drug_exposure_end_datetime",
"path": "MedicationAdministration.effectivePeriod.end",
"type": "dateTime",
"description": "Full ISO datetime. Null if no period end.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "drug_exposure_end_datetime"
}
]
}
]
},
{
"name": "quantity",
"path": "MedicationAdministration.dosage.dose.value",
"type": "decimal",
"description": "Dose amount given. ETL-German computes mean of Range when doseRange is used.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "quantity"
}
]
}
]
},
{
"name": "sig",
"path": "MedicationAdministration.dosage.text",
"type": "string",
"description": "Free-text dosage instructions.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "sig"
}
]
}
]
},
{
"name": "route",
"path": "MedicationAdministration.dosage.route",
"type": "CodeableConcept",
"description": "Administration route via SNOMED to OMOP Route domain lookup. MedicationAdministration carries the richest route data of the four medication resources.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "route_concept_id"
},
{
"url": "transform",
"valueString": "resolve CONCEPT reference; downstream maps to route_concept_id"
}
]
}
]
},
{
"name": "route_text",
"path": "MedicationAdministration.dosage.route.text",
"type": "string",
"description": "Raw route text or first coding display.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "route_source_value"
}
]
}
]
},
{
"name": "performer_id",
"path": "MedicationAdministration.performer[0].actor",
"type": "Reference(Practitioner)",
"description": "Administering clinician. First performer entry.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "provider_id"
},
{
"url": "transform",
"valueString": "resolve PROVIDER reference; downstream maps to provider_id"
}
]
}
]
},
{
"name": "encounter_id",
"path": "MedicationAdministration.context",
"type": "Reference(Encounter)",
"description": "Resolved from context reference to Encounter.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "visit_occurrence_id"
},
{
"url": "transform",
"valueString": "resolve VISIT_OCCURRENCE reference; downstream maps to visit_occurrence_id"
}
]
}
]
},
{
"name": "dose_unit_text",
"path": "MedicationAdministration.dosage.dose.unit",
"type": "string",
"description": "Raw dose unit string from dosage.dose.",
"extension": [
{
"url": "https://fhir2omop.health-samurai.io/StructureDefinition/omop-column-target",
"extension": [
{
"url": "column",
"valueString": "dose_unit_source_value"
}
]
}
]
}
]
}
],
"targetTable": "drug_exposure",
"edgeKey": "MedicationAdministration__drug_exposure"
}