FhirEx.Types.Identifier (fhir_ex v0.2.0)

Copy Markdown View Source

FHIR R5 Identifier data type.

A numeric or alphanumeric string that is associated with a single object or entity within a given system. Typically used to identify patients, orders, etc.

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

Example

# MRN identifier
%Identifier{
  use: "official",
  type: %CodeableConcept{
    coding: [%Coding{system: "http://terminology.hl7.org/CodeSystem/v2-0203", code: "MR"}],
    text: "Medical record number"
  },
  system: "http://hospital.example.org/mrn",
  value: "MRN-12345"
}

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.Identifier{
  assigner: FhirEx.Types.Reference.t() | nil,
  period: FhirEx.Types.Period.t() | nil,
  system: String.t() | nil,
  type: FhirEx.Types.CodeableConcept.t() | nil,
  use: use() | nil,
  value: String.t() | 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(id)

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

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