FhirEx.Types.Range (fhir_ex v0.2.0)

Copy Markdown View Source

FHIR R5 Range data type.

A set of ordered Quantity values defined by a low and high limit. Used for reference ranges in lab results.

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

Example

# Normal WBC reference range
%Range{
  low: %Quantity{value: 4.5, unit: "10*3/uL", system: "http://unitsofmeasure.org", code: "10*3/uL"},
  high: %Quantity{value: 11.0, unit: "10*3/uL", system: "http://unitsofmeasure.org", code: "10*3/uL"}
}

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.Range{
  high: FhirEx.Types.Quantity.t() | nil,
  low: FhirEx.Types.Quantity.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(r)

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

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