FhirEx.Resources.Practitioner (fhir_ex v0.3.0)

Copy Markdown View Source

FHIR R5 Practitioner resource.

A person who is directly or indirectly involved in the provisioning of healthcare.

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

Example

alias FhirEx.Resources.Practitioner
alias FhirEx.Types.{HumanName, Identifier, ContactPoint, Address, CodeableConcept, Coding}

practitioner = %Practitioner{
  id: "pract-001",
  identifier: [
    %Identifier{
      system: "http://hl7.org/fhir/sid/us-npi",
      value: "1234567890"
    }
  ],
  active: true,
  name: [%HumanName{use: "official", family: "Smith", given: ["Jane"], prefix: ["Dr."]}],
  gender: "female"
}

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.

Returns the FHIR resource type name string.

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

Types

communication()

@type communication() :: %{
  language: FhirEx.Types.CodeableConcept.t(),
  preferred: boolean() | nil
}

qualification()

@type qualification() :: %{
  identifier: [FhirEx.Types.Identifier.t()] | nil,
  code: FhirEx.Types.CodeableConcept.t(),
  period: FhirEx.Types.Period.t() | nil,
  issuer: map() | nil
}

t()

@type t() :: %FhirEx.Resources.Practitioner{
  active: boolean() | nil,
  address: [FhirEx.Types.Address.t()] | nil,
  birth_date: String.t() | nil,
  communication: [communication()] | nil,
  deceased_boolean: boolean() | nil,
  deceased_date_time: String.t() | nil,
  extension: [FhirEx.Types.Extension.t()] | nil,
  gender: String.t() | nil,
  id: String.t() | nil,
  identifier: [FhirEx.Types.Identifier.t()] | nil,
  meta: FhirEx.Types.Meta.t() | nil,
  name: [FhirEx.Types.HumanName.t()] | nil,
  photo: [map()] | nil,
  qualification: [qualification()] | nil,
  telecom: [FhirEx.Types.ContactPoint.t()] | nil,
  text: FhirEx.Types.Narrative.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.

resource_type()

@spec resource_type() :: String.t()

Returns the FHIR resource type name string.

to_map(pr)

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

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