Value Range (VR) -- HL7v2 composite data type.
Specifies a range of values for a field. Used as a query parameter.
2 components:
- First Data Code Value (ST)
- Last Data Code Value (ST)
Summary
Types
Functions
Encodes a VR to a list of component strings.
Examples
iex> HL7v2.Type.VR.encode(%HL7v2.Type.VR{first_data_code_value: "A", last_data_code_value: "Z"})
["A", "Z"]
iex> HL7v2.Type.VR.encode(%HL7v2.Type.VR{first_data_code_value: "100"})
["100"]
iex> HL7v2.Type.VR.encode(nil)
[]
Parses a VR from a list of components.
Examples
iex> HL7v2.Type.VR.parse(["A", "Z"])
%HL7v2.Type.VR{first_data_code_value: "A", last_data_code_value: "Z"}
iex> HL7v2.Type.VR.parse(["100"])
%HL7v2.Type.VR{first_data_code_value: "100"}
iex> HL7v2.Type.VR.parse([])
%HL7v2.Type.VR{}