Medication_medication_activity
Source file: medication_medication_activity.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='EVN']/hl7:consumable/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_code, drug_concept_codeSystem_code, drug_concept_code_translation, drug_concept_codeSystem_translation, 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 |
PRIORITY |
3 |
coalesce candidates by priority |
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 |
PRIORITY |
8 |
coalesce candidates by priority |
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 |
DERIVED |
15 |
|
lot_number |
None |
16 |
— |
provider_id |
FK |
17 |
FK → |
visit_occurrence_id |
FK |
18 |
FK → |
visit_detail_id |
None |
19 |
— |
drug_source_value |
PRIORITY |
20 |
coalesce candidates by priority |
drug_source_concept_id |
PRIORITY |
21 |
coalesce candidates by priority |
route_source_value |
DERIVED |
22 |
|
dose_unit_source_value |
FIELD |
23 |
|
data_partner_id |
DERIVED |
24 |
|
filename |
FILENAME |
100 |
source XML filename |
cfg_name |
CONSTANT |
101 |
|
domain_id |
PRIORITY |
coalesce candidates by priority |
|
domain_id_code |
DERIVED |
|
|
domain_id_translation |
DERIVED |
|
|
drug_concept_codeSystem_code |
FIELD |
|
|
drug_concept_codeSystem_translation |
FIELD |
|
|
drug_concept_code_code |
FIELD |
|
|
drug_concept_code_translation |
FIELD |
|
|
drug_concept_id_code |
DERIVED |
|
|
drug_concept_id_translation |
DERIVED |
|
|
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 |
|
|
drug_source_concept_id_code |
DERIVED |
|
|
drug_source_concept_id_translation |
DERIVED |
|
|
drug_source_value_code |
DERIVED |
|
|
drug_source_value_translation |
DERIVED |
|
|
route_concept_code |
FIELD |
|
|
route_concept_codeSystem |
FIELD |
|
|
verbatim_end_date_high |
FIELD |
|
|
verbatim_end_date_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) |