Medication_medication_dispense
Source file: medication_medication_dispense.py
Root XPath
./hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:templateId[@root="2.16.840.1.113883.10.20.22.2.1" or @root="2.16.840.1.113883.10.20.22.2.1.1"]/../hl7:entry/hl7:substanceAdministration[@moodCode="INT" or @moodCode="EVN"]/hl7:entryRelationship/hl7:supply/hl7:statusCode[@code="active" or @code="completed"]/hl7:statusCode[@code="active" or @code="completed"]/../hl7:templateId[@root="2.16.840.1.113883.10.20.22.4.18"]/../hl7:product/hl7:manufacturedProduct/hl7:manufacturedMaterial
Expected OMOP domain: Drug
Fields
Field |
Type |
Order |
Details |
|---|---|---|---|
drug_exposure_id |
HASH |
1 |
hash(person_id, provider_id, drug_concept_code, drug_concept_codeSystem, drug_exposure_start_date, drug_exposure_start_datetime, drug_exposure_end_date, drug_exposure_end_datetime, quantity, drug_exposure_id_root, drug_exposure_id_extension) |
person_id |
FK |
2 |
FK → |
drug_concept_id |
DERIVED |
3 |
|
drug_exposure_start_date |
PRIORITY |
4 |
coalesce candidates by priority |
drug_exposure_start_datetime |
PRIORITY |
5 |
coalesce candidates by priority |
drug_exposure_end_date |
PRIORITY |
6 |
coalesce candidates by priority |
drug_exposure_end_datetime |
PRIORITY |
7 |
coalesce candidates by priority |
verbatim_end_date |
FIELD |
8 |
|
drug_type_concept_id |
CONSTANT |
9 |
|
stop_reason |
CONSTANT |
10 |
|
refills |
None |
11 |
— |
quantity |
FIELD |
12 |
|
days_supply |
None |
13 |
— |
sig |
None |
14 |
— |
route_concept_id |
None |
15 |
— |
lot_number |
None |
16 |
— |
provider_id |
FK |
17 |
FK → |
visit_occurrence_id |
FK |
18 |
FK → |
visit_detail_id |
None |
19 |
— |
drug_source_value |
DERIVED |
20 |
|
drug_source_concept_id |
DERIVED |
21 |
|
route_source_value |
None |
22 |
— |
dose_unit_source_value |
FIELD |
23 |
|
data_partner_id |
DERIVED |
24 |
|
filename |
FILENAME |
100 |
source XML filename |
cfg_name |
CONSTANT |
101 |
|
domain_id |
DERIVED |
|
|
drug_concept_code |
FIELD |
|
|
drug_concept_codeSystem |
FIELD |
|
|
drug_exposure_end_date_high |
FIELD |
|
|
drug_exposure_end_date_low |
FIELD |
|
|
drug_exposure_end_date_value |
FIELD |
|
|
drug_exposure_end_datetime_high |
FIELD |
|
|
drug_exposure_end_datetime_low |
FIELD |
|
|
drug_exposure_end_datetime_value |
FIELD |
|
|
drug_exposure_id_extension |
FIELD |
|
|
drug_exposure_id_root |
FIELD |
|
|
drug_exposure_start_date_high |
FIELD |
|
|
drug_exposure_start_date_low |
FIELD |
|
|
drug_exposure_start_date_value |
FIELD |
|
|
drug_exposure_start_datetime_high |
FIELD |
|
|
drug_exposure_start_datetime_low |
FIELD |
|
|
drug_exposure_start_datetime_value |
FIELD |
|
Config type reference
config_type |
Meaning |
|---|---|
ROOT |
Defines the XPath root element for this config |
FIELD |
Extracts an XML attribute value via XPath |
DERIVED |
Computed by a Python function from other fields |
HASH |
MD5/hash of a set of fields, used as a surrogate key |
FK |
Foreign key copied from a joined dataset |
CONSTANT |
Fixed literal value written to every row |
PRIORITY |
Coalesces the first non-null value from prioritized candidates |
FILENAME |
The source XML filename |
None |
Not populated (placeholder) |