Error Location and Description (ELD) -- HL7v2 composite data type.
Deprecated in v2.5.1 (replaced by ERL + CWE), but retained for backward compatibility with ERR-1 which uses this type.
4 components:
- Segment ID (ST)
- Segment Sequence (NM)
- Field Position (NM)
- Code Identifying Error (CE) -- sub-components delimited by
&
Summary
Types
@type t() :: %HL7v2.Type.ELD{ code_identifying_error: HL7v2.Type.CE.t() | nil, field_position: binary() | nil, segment_id: binary() | nil, segment_sequence: binary() | nil }
Functions
Encodes an ELD to a list of component strings.
Examples
iex> HL7v2.Type.ELD.encode(%HL7v2.Type.ELD{segment_id: "PID", segment_sequence: "1", field_position: "4", code_identifying_error: %HL7v2.Type.CE{identifier: "101", text: "Required field missing", name_of_coding_system: "HL70357"}})
["PID", "1", "4", "101&Required field missing&HL70357"]
iex> HL7v2.Type.ELD.encode(%HL7v2.Type.ELD{segment_id: "PID", segment_sequence: "1"})
["PID", "1"]
iex> HL7v2.Type.ELD.encode(nil)
[]
iex> HL7v2.Type.ELD.encode(%HL7v2.Type.ELD{})
[]
Parses an ELD from a list of components.
Examples
iex> HL7v2.Type.ELD.parse(["PID", "1", "4", "101&Required field missing&HL70357"])
%HL7v2.Type.ELD{
segment_id: "PID",
segment_sequence: "1",
field_position: "4",
code_identifying_error: %HL7v2.Type.CE{identifier: "101", text: "Required field missing", name_of_coding_system: "HL70357"}
}
iex> HL7v2.Type.ELD.parse(["PID", "1"])
%HL7v2.Type.ELD{segment_id: "PID", segment_sequence: "1"}
iex> HL7v2.Type.ELD.parse([])
%HL7v2.Type.ELD{}