Specialty Description (SPD) -- HL7v2 composite data type.
Describes a practitioner's specialty or board certification.
4 components:
- Specialty Name (ST)
- Governing Board (ST)
- Eligible or Certified (ID) -- C (certified), E (eligible)
- Date of Certification (DT)
Summary
Types
@type t() :: %HL7v2.Type.SPD{ date_of_certification: Date.t() | HL7v2.Type.DT.t() | nil, eligible_or_certified: binary() | nil, governing_board: binary() | nil, specialty_name: binary() | nil }
Functions
Encodes an SPD to a list of component strings.
Examples
iex> HL7v2.Type.SPD.encode(%HL7v2.Type.SPD{specialty_name: "Cardiology", governing_board: "ABIM", eligible_or_certified: "C", date_of_certification: ~D[2020-06-01]})
["Cardiology", "ABIM", "C", "20200601"]
iex> HL7v2.Type.SPD.encode(nil)
[]
Parses an SPD from a list of components.
Examples
iex> HL7v2.Type.SPD.parse(["Cardiology", "ABIM", "C", "20200601"])
%HL7v2.Type.SPD{specialty_name: "Cardiology", governing_board: "ABIM", eligible_or_certified: "C", date_of_certification: ~D[2020-06-01]}
iex> HL7v2.Type.SPD.parse(["Internal Medicine"])
%HL7v2.Type.SPD{specialty_name: "Internal Medicine"}
iex> HL7v2.Type.SPD.parse([])
%HL7v2.Type.SPD{}