FhirEx.Types.Extension (fhir_ex v0.2.0)

Copy Markdown View Source

FHIR R5 Extension data type.

Extensions allow any resource or data type to carry additional information not part of the base specification.

https://www.hl7.org/fhir/R5/extensibility.html

Summary

Types

t()

A FHIR Extension

Functions

Builds an Extension from a string-keyed map (e.g., from JSON.decode!).

Creates a new Extension with the given attributes.

Converts an Extension struct to a JSON-compatible map.

Types

t()

@type t() :: %FhirEx.Types.Extension{
  extension: [t()] | nil,
  url: String.t(),
  value_boolean: boolean() | nil,
  value_code: String.t() | nil,
  value_date_time: String.t() | nil,
  value_decimal: float() | nil,
  value_integer: integer() | nil,
  value_string: String.t() | nil,
  value_uri: String.t() | nil
}

A FHIR Extension

Functions

from_map(map)

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

Builds an Extension from a string-keyed map (e.g., from JSON.decode!).

new(attrs \\ %{})

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

Creates a new Extension with the given attributes.

to_map(ext)

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

Converts an Extension struct to a JSON-compatible map.