HL7v2.Type.UVC (HL7v2 v3.10.1)

Copy Markdown View Source

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:

  1. Value Code (CNE) -- sub-components, Table 0153
  2. Value Amount (MO) -- sub-components (quantity & denomination)

Summary

Functions

Encodes a UVC to a list of component strings.

Parses a UVC from a list of components.

Types

t()

@type t() :: %HL7v2.Type.UVC{
  value_amount: HL7v2.Type.MO.t() | nil,
  value_code: HL7v2.Type.CNE.t() | nil
}

Functions

encode(uvc)

@spec encode(t() | nil) :: list()

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)
[]

parse(components)

@spec parse(list()) :: t()

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{}