Extended Composite Name and ID for Organizations (XON) -- HL7v2 composite data type.
10 components:
- Organization Name (ST)
- Organization Name Type Code (IS) -- Table 0204: A=Alias, D=Display, L=Legal
- ID Number (NM) -- deprecated
- Check Digit (NM)
- Check Digit Scheme (ID) -- Table 0061
- Assigning Authority (HD) -- sub-components delimited by
& - Identifier Type Code (ID) -- Table 0203
- Assigning Facility (HD) -- sub-components delimited by
& - Name Representation Code (ID) -- Table 0465
- Organization Identifier (ST)
Summary
Types
@type t() :: %HL7v2.Type.XON{ assigning_authority: HL7v2.Type.HD.t() | nil, assigning_facility: HL7v2.Type.HD.t() | nil, check_digit: binary() | nil, check_digit_scheme: binary() | nil, id_number: binary() | nil, identifier_type_code: binary() | nil, name_representation_code: binary() | nil, organization_identifier: binary() | nil, organization_name: binary() | nil, organization_name_type_code: binary() | nil }
Functions
Encodes an XON to a list of component strings.
Examples
iex> HL7v2.Type.XON.encode(%HL7v2.Type.XON{organization_name: "General Hospital", organization_name_type_code: "L"})
["General Hospital", "L"]
iex> HL7v2.Type.XON.encode(nil)
[]
Parses an XON from a list of components.
Examples
iex> HL7v2.Type.XON.parse(["General Hospital", "L", "", "", "", "HOSP&2.16.840.1.113883.19.4.6&ISO", "XX", "", "", "GH001"])
%HL7v2.Type.XON{
organization_name: "General Hospital",
organization_name_type_code: "L",
assigning_authority: %HL7v2.Type.HD{namespace_id: "HOSP", universal_id: "2.16.840.1.113883.19.4.6", universal_id_type: "ISO"},
identifier_type_code: "XX",
organization_identifier: "GH001"
}
iex> HL7v2.Type.XON.parse([])
%HL7v2.Type.XON{}