View Source Kindling.Schema (kindling v1.0.0)

Tools for working with the JSON schema for FHIR.

Summary

Types

A string representing a particular FHIR version ("R5" | "R4B" | "R4" | "R3" ).

Functions

Given a schema map in the style returned by &schema_map/1, and a root resource name (e.g. "Encounter"), return a MapSet of resources that are referenced (recursively) from the resource. This can be used to determine the set of resource schemas that need to be generated to full support that resource as a fully-defined set or schemas.

Load and process a JSON schema file for the given version, return the map defining the spec for that version.

Types

@type version_string() :: String.t()

A string representing a particular FHIR version ("R5" | "R4B" | "R4" | "R3" ).

Functions

Link to this function

add_choice_data(schema, map)

View Source
Link to this function

get_choice_data(version)

View Source
Link to this function

refs_recursive(schema, root_name)

View Source
@spec refs_recursive(map(), String.t()) :: MapSet.t()

Given a schema map in the style returned by &schema_map/1, and a root resource name (e.g. "Encounter"), return a MapSet of resources that are referenced (recursively) from the resource. This can be used to determine the set of resource schemas that need to be generated to full support that resource as a fully-defined set or schemas.

@spec schema_map(version_string()) :: map()

Load and process a JSON schema file for the given version, return the map defining the spec for that version.