FhirEx.Types.Annotation (fhir_ex v0.2.0)

Copy Markdown View Source

FHIR R5 Annotation data type.

A text note with additional information about the resource, including time, and who made the annotation.

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

Example

%Annotation{
  author_reference: %Reference{reference: "Practitioner/pract-001"},
  time: "2024-01-15T09:32:00Z",
  text: "Patient requires fasting for 8 hours before blood draw."
}

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.Annotation{
  author_reference: FhirEx.Types.Reference.t() | nil,
  author_string: String.t() | nil,
  text: String.t(),
  time: String.t() | nil
}

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(a)

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

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