View Source Kindling.Converter (kindling v1.0.0)

Convert between JSON-style maps and Elixir structs, using the generated resource Ecto schemas as a guide.

Summary

Functions

Convert a JSON-style map with string keys to a FHIR resource schema. version_namespace is the module namespace where your resource schema module have been generated (e.g. FHIR.R4) and resource_json is the map of data.

Functions

Link to this function

convert(version_namespace, resource_json)

View Source
@spec convert(atom() | binary(), map()) :: Kindling.Schema.Resource.schema()

Convert a JSON-style map with string keys to a FHIR resource schema. version_namespace is the module namespace where your resource schema module have been generated (e.g. FHIR.R4) and resource_json is the map of data.