Performing Person Time Stamp (PPN) -- HL7v2 composite data type.
Identifies a performing person with a timestamp of the action. Similar to XCN but includes a date/time field for when the action was performed.
24 components per HL7 v2.5.1:
- ID Number (ST)
- Family Name (FN) -- sub-components
- Given Name (ST)
- Second and Further Given Names (ST)
- Suffix (ST)
- Prefix (ST)
- Degree (IS)
- Source Table (IS)
- Assigning Authority (HD) -- sub-components
- Name Type Code (ID)
- Identifier Check Digit (ST)
- Check Digit Scheme (ID)
- Identifier Type Code (ID)
- Assigning Facility (HD) -- sub-components
- Date/Time Action Performed (TS) -- sub-components
- Name Representation Code (ID) 17-24: Additional components (raw)
Summary
Types
@type t() :: %HL7v2.Type.PPN{ assigning_authority: HL7v2.Type.HD.t() | nil, assigning_facility: HL7v2.Type.HD.t() | nil, check_digit_scheme: binary() | nil, date_time_action_performed: HL7v2.Type.TS.t() | nil, degree: binary() | nil, family_name: HL7v2.Type.FN.t() | nil, given_name: binary() | nil, id_number: binary() | nil, identifier_check_digit: binary() | nil, identifier_type_code: binary() | nil, name_representation_code: binary() | nil, name_type_code: binary() | nil, prefix: binary() | nil, raw_17_24: [binary()] | nil, second_name: binary() | nil, source_table: binary() | nil, suffix: binary() | nil }
Functions
Encodes a PPN to a list of component strings.
Examples
iex> HL7v2.Type.PPN.encode(%HL7v2.Type.PPN{id_number: "12345", family_name: %HL7v2.Type.FN{surname: "Smith"}, given_name: "John"})
["12345", "Smith", "John"]
iex> HL7v2.Type.PPN.encode(nil)
[]
Parses a PPN from a list of components.
The first 16 components are parsed into typed fields. Components 17-24 are preserved as raw strings.
Examples
iex> HL7v2.Type.PPN.parse(["12345", "Smith", "John"])
%HL7v2.Type.PPN{
id_number: "12345",
family_name: %HL7v2.Type.FN{surname: "Smith"},
given_name: "John"
}
iex> HL7v2.Type.PPN.parse([])
%HL7v2.Type.PPN{}