HL7v2.Type.ICD (HL7v2 v3.10.1)

Copy Markdown View Source

Insurance Certification Definition (ICD) -- HL7v2 composite data type.

Specifies pre-certification requirements for insurance claims.

3 components:

  1. Certification Patient Type (IS) -- Table 0150: e.g., "ER" (emergency), "IPE" (inpatient elective)
  2. Certification Required (ID) -- Table 0136 (Y/N): "Y" or "N"
  3. Date/Time Certification Required (TS) -- when certification is needed by

Summary

Functions

Encodes an ICD to a list of component strings.

Parses an ICD from a list of components.

Types

t()

@type t() :: %HL7v2.Type.ICD{
  certification_patient_type: binary() | nil,
  certification_required: binary() | nil,
  date_time_certification_required: HL7v2.Type.TS.t() | nil
}

Functions

encode(icd)

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

Encodes an ICD to a list of component strings.

Examples

iex> HL7v2.Type.ICD.encode(%HL7v2.Type.ICD{certification_patient_type: "ER", certification_required: "Y"})
["ER", "Y"]

iex> HL7v2.Type.ICD.encode(nil)
[]

parse(components)

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

Parses an ICD from a list of components.

Examples

iex> HL7v2.Type.ICD.parse(["ER", "Y", "20260101"])
%HL7v2.Type.ICD{
  certification_patient_type: "ER",
  certification_required: "Y",
  date_time_certification_required: %HL7v2.Type.TS{time: %HL7v2.Type.DTM{year: 2026, month: 1, day: 1}}
}

iex> HL7v2.Type.ICD.parse([])
%HL7v2.Type.ICD{}