Location_pr

Source file: care_site_pr_location.py

Root XPath

./hl7:component/hl7:structuredBody/hl7:component/hl7:section/hl7:templateId[ @root="2.16.840.1.113883.10.20.22.2.22" or @root="2.16.840.1.113883.10.20.22.2.22.1" ]/../hl7:entry/hl7:encounter[@moodCode="EVN"]/hl7:participant/hl7:participantRole[@classCode="SDLOC"]

Expected OMOP domain: Location

Fields

Field

Type

Order

Details

location_id

HASH

1

hash(address_1, city, state, zip)

address_1

FIELD

2

hl7:addr/hl7:streetAddressLine @#text

address_2

None

3

city

FIELD

4

hl7:addr/hl7:city @#text

state

FIELD

5

hl7:addr/hl7:state @#text

zip

FIELD

6

hl7:addr/hl7:postalCode @#text

county

None

7

location_source_value

None

8

data_partner_id

DERIVED

20

VT.get_data_partner_id(filename=filename)

filename

FILENAME

100

source XML filename

cfg_name

CONSTANT

101

Location_pr

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)