Room Coverage (RMC) -- HL7v2 composite data type.
Specifies room coverage type, amount, and percentage for insurance.
4 components:
- Room Type (IS) -- Table 0145: e.g., "PR" (private), "SP" (semi-private)
- Amount Type (IS) -- Table 0146: e.g., "LM" (limit), "PC" (percentage), "UP" (unlimited)
- Coverage Amount (NM) -- the numeric coverage value
- Money or Percentage (MOP) -- v2.5.1 added; rarely populated, treated as ST
Summary
Types
@type t() :: %HL7v2.Type.RMC{ amount_type: binary() | nil, coverage_amount: HL7v2.Type.NM.t() | nil, money_or_percentage: binary() | nil, room_type: binary() | nil }
Functions
Encodes an RMC to a list of component strings.
Examples
iex> HL7v2.Type.RMC.encode(%HL7v2.Type.RMC{room_type: "PR", amount_type: "LM", coverage_amount: %HL7v2.Type.NM{value: "500", original: "500"}})
["PR", "LM", "500"]
iex> HL7v2.Type.RMC.encode(nil)
[]
Parses an RMC from a list of components.
Examples
iex> HL7v2.Type.RMC.parse(["PR", "LM", "500"])
%HL7v2.Type.RMC{room_type: "PR", amount_type: "LM", coverage_amount: %HL7v2.Type.NM{value: "500", original: "500"}}
iex> HL7v2.Type.RMC.parse([])
%HL7v2.Type.RMC{}