Care_Site_pr ============ *Source file:* ``care_site_pr.py`` Root XPath ---------- .. code-block:: 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:** Care_Site Fields ------ +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Type | Order | Details | +=====================================+==========+=======+=================================================================================================================================================================================================================================================================================================+ | care_site_id | HASH | 1 | hash(care_site_id_root, care_site_id_extension, care_site_name, place_of_service_concept_code, place_of_service_concept_codeSystem, address_1, city, state, zip) | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | care_site_name | FIELD | 2 | ``hl7:playingEntity[@classCode="PLC"]/hl7:name`` @#text | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | place_of_service_concept_id | DERIVED | 3 | ``VT.codemap_xwalk_concept_id(concept_code=place_of_service_concept_code, vocabulary_oid=place_of_service_concept_codeSystem)`` | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | location_id | HASH | 4 | hash(address_1, city, state, zip) | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | care_site_source_value | DERIVED2 | 5 | {'config_type': 'DERIVED2', 'FUNCTION': VT.concat_field_list_values, 'argument_list': {'key_list': ['care_site_id_root', 'care_site_id_extension', 'care_site_name', 'place_of_service_concept_code', 'place_of_service_concept_codeSystem', 'address_1', 'city', 'state', 'zip']}, 'order': 5} | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | place_of_service_source_value | DERIVED | 6 | ``VT.concat_fields(first_field=place_of_service_concept_code, second_field=place_of_service_concept_codeSystem)`` | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | data_partner_id | DERIVED | 20 | ``VT.get_data_partner_id(filename=filename)`` | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | filename | FILENAME | 100 | source XML filename | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | cfg_name | CONSTANT | 101 | ``Care_Site_pr`` | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | address_1 | FIELD | | ``hl7:addr/hl7:streetAddressLine`` @#text | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | care_site_id_extension | FIELD | | ``hl7:id`` @extension | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | care_site_id_root | FIELD | | ``hl7:id`` @root | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | city | FIELD | | ``hl7:addr/hl7:city`` @#text | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | place_of_service_concept_code | FIELD | | ``hl7:code`` @code | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | place_of_service_concept_codeSystem | FIELD | | ``hl7:code`` @codeSystem | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | state | FIELD | | ``hl7:addr/hl7:state`` @#text | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | zip | FIELD | | ``hl7:addr/hl7:postalCode`` @#text | +-------------------------------------+----------+-------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 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) | +-------------+----------------------------------------------------------------+