Processing Type (PT) -- HL7v2 composite data type.
Used in MSH-11 to indicate processing mode.
2 components:
- Processing ID (ID) -- Table 0103: D (Debugging), P (Production), T (Training)
- Processing Mode (ID) -- Table 0207: A (Archive), R (Restore), I (Initial), T (Current)
Summary
Types
Functions
Encodes a PT to a list of component strings.
Examples
iex> HL7v2.Type.PT.encode(%HL7v2.Type.PT{processing_id: "P"})
["P"]
iex> HL7v2.Type.PT.encode(%HL7v2.Type.PT{processing_id: "P", processing_mode: "T"})
["P", "T"]
iex> HL7v2.Type.PT.encode(nil)
[]
Parses a PT from a list of components.
Examples
iex> HL7v2.Type.PT.parse(["P"])
%HL7v2.Type.PT{processing_id: "P"}
iex> HL7v2.Type.PT.parse(["P", "T"])
%HL7v2.Type.PT{processing_id: "P", processing_mode: "T"}
iex> HL7v2.Type.PT.parse([])
%HL7v2.Type.PT{}