UB Value Code and Amount (UVC) -- HL7v2 composite data type.
Links a UB value code to its monetary amount for billing segments (UB1-10, UB2-6).
2 components:
- Value Code (CNE) -- sub-components, Table 0153
- Value Amount (MO) -- sub-components (quantity & denomination)
Summary
Types
@type t() :: %HL7v2.Type.UVC{ value_amount: HL7v2.Type.MO.t() | nil, value_code: HL7v2.Type.CNE.t() | nil }
Functions
Encodes a UVC to a list of component strings.
Examples
iex> HL7v2.Type.UVC.encode(%HL7v2.Type.UVC{value_code: %HL7v2.Type.CNE{identifier: "01"}, value_amount: %HL7v2.Type.MO{quantity: "150.00"}})
["01", "150.00"]
iex> HL7v2.Type.UVC.encode(nil)
[]
Parses a UVC from a list of components.
Examples
iex> HL7v2.Type.UVC.parse(["01&Blood deductible&NUBC", "150.00&USD"])
%HL7v2.Type.UVC{
value_code: %HL7v2.Type.CNE{identifier: "01", text: "Blood deductible", name_of_coding_system: "NUBC"},
value_amount: %HL7v2.Type.MO{quantity: "150.00", denomination: "USD"}
}
iex> HL7v2.Type.UVC.parse([])
%HL7v2.Type.UVC{}