MyDomain

Source file: TEMPLATE.py

Root XPath

./hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:templateId[@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

my_domain_id

HASH

1

hash(person_id, my_concept_code, my_concept_code_system, my_start_date, my_end_date)

person_id

FK

2

FK → person_id

my_concept_id

DERIVED

3

VT.codemap_xwalk_concept_id(concept_code=my_concept_code, vocabulary_oid=my_concept_code_system)

my_start_date

FIELD

4

hl7:effectiveTime/hl7:low @value [DATE]

my_end_date

FIELD

5

hl7:effectiveTime/hl7:high @value [DATE]

my_type_concept_id

CONSTANT

8

0

provider_id

FK

11

FK → provider_id

visit_occurrence_id

FK

12

FK → visit_occurrence_id

visit_detail_id

None

13

filename

FILENAME

100

source XML filename

cfg_name

CONSTANT

101

MyDomain

domain_id

DERIVED

VT.codemap_xwalk_domain_id(concept_code=my_concept_code, vocabulary_oid=my_concept_code_system)

my_concept_code

FIELD

hl7:value @code

my_concept_code_system

FIELD

hl7:value @codeSystem

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)