PROVIDER-from-encompassingEncounter_responsibleParty ==================================================== *Source file:* ``PROVIDER-from-encompassingEncounter_responsibleParty.py`` Root XPath ---------- .. code-block:: xpath ./hl7:componentOf/hl7:encompassingEncounter/hl7:responsibleParty/hl7:assignedEntity **Expected OMOP domain:** Provider Fields ------ +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Field | Type | Order | Details | +=================================+==========+=======+==============================================================================================================================================================================================================+ | provider_id | HASH | 1 | hash(provider_id_street, provider_id_city, provider_id_state, provider_id_zip, provider_id_given, provider_id_family, provider_id_root, provider_id_extension, npi, dea, specialty_concept_id, care_site_id) | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | provider_name | DERIVED | 2 | ``VT.concat_fields(first_field=provider_id_given, second_field=provider_id_family)`` | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | npi | FIELD | 3 | ``hl7:id[@root="2.16.840.1.113883.4.6"]`` @extension | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | dea | FIELD | 4 | ``hl7:id[@root="2.16.840.1.113883.D.E.A"]`` @extension | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | specialty_concept_id | DERIVED | 5 | ``VT.codemap_xwalk_concept_id(concept_code=specialty_concept_id_code, vocabulary_oid=specialty_concept_id_codeSystem)`` | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | care_site_id | HASH | 6 | hash(care_site_id_root, care_site_id_extension) | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | year_of_birth | None | 7 | — | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | gender_concept_id | None | 8 | — | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | provider_source_value | CONSTANT | 9 | ```` | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | specialty_source_value | CONSTANT | 10 | ```` | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | specialty_source_concept_id | None | 11 | — | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | gender_source_value | CONSTANT | 12 | ```` | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | gender_source_concept_id | None | 13 | — | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | data_partner_id | DERIVED | 20 | ``VT.get_data_partner_id(filename=filename)`` | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | filename | FILENAME | 100 | source XML filename | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | cfg_name | CONSTANT | 101 | ``PROVIDER-from-encompassingEncounter_responsibleParty`` | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | care_site_id_extension | FIELD | | ``../../hl7:location/hl7:healthCareFacility`` @extension | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | care_site_id_root | FIELD | | ``../../hl7:location/hl7:healthCareFacility`` @root | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | provider_id_city | FIELD | | ``hl7:addr/hl7:city`` @#text | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | provider_id_extension | FIELD | | ``hl7:id[not(@nullFlavor="UNK")]`` @extension | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | provider_id_family | FIELD | | ``hl7:assignedPerson/hl7:name/hl7:family`` @#text | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | provider_id_given | FIELD | | ``hl7:assignedPerson/hl7:name/hl7:given`` @#text | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | provider_id_root | FIELD | | ``hl7:id[not(@nullFlavor="UNK")]`` @root | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | provider_id_state | FIELD | | ``hl7:addr/hl7:state`` @#text | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | provider_id_street | FIELD | | ``hl7:addr/hl7:streetAddressLine`` @#text | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | provider_id_zip | FIELD | | ``hl7:addr/hl7:postalCode`` @#text | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | specialty_concept_id_code | FIELD | | ``hl7:code`` @code | +---------------------------------+----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | specialty_concept_id_codeSystem | FIELD | | ``hl7:code`` @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) | +-------------+----------------------------------------------------------------+