Reference Range (RFR) -- HL7v2 composite data type.
Specifies a reference range for an observation with optional demographic qualifiers.
7 components:
- Numeric Range (NR) -- sub-components (low & high)
- Administrative Sex (IS) -- Table 0001
- Age Range (NR) -- sub-components
- Gestational Age Range (NR) -- sub-components
- Species (ST)
- Race/Subspecies (ST)
- Conditions (TX)
Summary
Types
@type t() :: %HL7v2.Type.RFR{ administrative_sex: binary() | nil, age_range: HL7v2.Type.NR.t() | nil, conditions: binary() | nil, gestational_age_range: HL7v2.Type.NR.t() | nil, numeric_range: HL7v2.Type.NR.t() | nil, race_subspecies: binary() | nil, species: binary() | nil }
Functions
Encodes an RFR to a list of component strings.
Examples
iex> HL7v2.Type.RFR.encode(%HL7v2.Type.RFR{numeric_range: %HL7v2.Type.NR{low: %HL7v2.Type.NM{value: "3.5", original: "3.5"}, high: %HL7v2.Type.NM{value: "5.5", original: "5.5"}}, administrative_sex: "M"})
["3.5&5.5", "M"]
iex> HL7v2.Type.RFR.encode(nil)
[]
Parses an RFR from a list of components.
Examples
iex> HL7v2.Type.RFR.parse(["3.5&5.5", "M"])
%HL7v2.Type.RFR{
numeric_range: %HL7v2.Type.NR{
low: %HL7v2.Type.NM{value: "3.5", original: "3.5"},
high: %HL7v2.Type.NM{value: "5.5", original: "5.5"}
},
administrative_sex: "M"
}
iex> HL7v2.Type.RFR.parse([])
%HL7v2.Type.RFR{}