Condition
Source file: condition.py
Root XPath
./hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:templateId[@root='2.16.840.1.113883.10.20.22.2.5' or @root='2.16.840.1.113883.10.20.22.2.5.1' ] /../hl7:entry/hl7:act/hl7:entryRelationship/hl7:observation
Expected OMOP domain: Condition
Fields
Field |
Type |
Order |
Details |
|---|---|---|---|
condition_occurrence_id |
HASH |
1 |
hash(person_id, provider_id, condition_concept_code, condition_concept_codeSystem, condition_start_date, condition_start_datetime, condition_end_date, condition_end_datetime, condition_id_root, condition_id_extension) |
person_id |
FK |
2 |
FK → |
condition_concept_id |
DERIVED |
3 |
|
condition_start_date |
PRIORITY |
4 |
coalesce candidates by priority |
condition_start_datetime |
PRIORITY |
5 |
coalesce candidates by priority |
condition_end_date |
PRIORITY |
6 |
coalesce candidates by priority |
condition_end_datetime |
PRIORITY |
7 |
coalesce candidates by priority |
condition_type_concept_id |
CONSTANT |
8 |
|
condition_status_concept_id |
None |
9 |
— |
stop_reason |
CONSTANT |
10 |
|
provider_id |
FK |
11 |
FK → |
visit_occurrence_id |
FK |
12 |
FK → |
visit_detail_id |
None |
13 |
— |
condition_source_value |
DERIVED |
14 |
|
condition_source_concept_id |
None |
15 |
— |
condition_status_source_value |
CONSTANT |
16 |
|
data_partner_id |
DERIVED |
20 |
|
filename |
FILENAME |
100 |
source XML filename |
cfg_name |
CONSTANT |
101 |
|
condition_concept_code |
FIELD |
|
|
condition_concept_codeSystem |
FIELD |
|
|
condition_end_date_high |
FIELD |
|
|
condition_end_datetime_high |
FIELD |
|
|
condition_id_extension |
FIELD |
|
|
condition_id_root |
FIELD |
|
|
condition_start_date_low |
FIELD |
|
|
condition_start_date_value |
FIELD |
|
|
condition_start_datetime_low |
FIELD |
|
|
condition_start_datetime_value |
FIELD |
|
|
domain_id |
DERIVED |
|
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) |