FhirEx.Types.HumanName (fhir_ex v0.3.0)

Copy Markdown View Source

FHIR R5 HumanName data type.

A human's name with the ability to identify parts and usage.

https://www.hl7.org/fhir/R5/datatypes.html#HumanName

Use codes: usual | official | temp | nickname | anonymous | old | maiden

Example

%HumanName{
  use: "official",
  family: "Doe",
  given: ["John", "Michael"],
  prefix: ["Dr."],
  text: "Dr. John Michael Doe"
}

Summary

Functions

Builds the struct from a string-keyed map (e.g., from decoded FHIR JSON).

Builds a new struct from a map or keyword list of field values.

Converts the struct to a string-keyed map for use with FhirEx.JSON.

Types

t()

@type t() :: %FhirEx.Types.HumanName{
  family: String.t() | nil,
  given: [String.t()] | nil,
  period: FhirEx.Types.Period.t() | nil,
  prefix: [String.t()] | nil,
  suffix: [String.t()] | nil,
  text: String.t() | nil,
  use: use() | nil
}

use()

@type use() :: String.t()

Functions

from_map(map)

@spec from_map(map()) :: t()

Builds the struct from a string-keyed map (e.g., from decoded FHIR JSON).

new(attrs \\ %{})

@spec new(map() | keyword()) :: t()

Builds a new struct from a map or keyword list of field values.

to_map(n)

@spec to_map(t()) :: map()

Converts the struct to a string-keyed map for use with FhirEx.JSON.