Skip to main content
OutputSchema is a recursive structure that describes each field. instructions tells the model what to extract. Coding fields declare their catalog and source values.
This page describes the authoring format you send when you create a template. When you read a template back with GET /v1/medical-record-configurations/{id}, each object schema returns its properties as an ordered array of { "key": ..., "schema": ... } entries — not the map form shown here. The content is identical; only the serialization differs.

Types

These are the only keywords the API persists. Anything else is silently dropped — see Not supported. Supported format values for string: date-time, date, time, duration, email, uuid, ipv4, ipv6. A string with format of date, time, or date-time is returned as an ISO 8601 value.

Coded fields

A code or codeList field must be a property of an object. Its source values must be non-code siblings in that object. system names the catalog. source accepts one sibling name or a list; omission selects all non-code siblings. maxOptions is at least 1 and defaults to 1. The API preserves these declarations on create and retrieve. GET returns source as a list, or null when omitted. Code generation requires a resolver in the generation configuration.

Required and default

  • required (boolean, defaults to false) — a field is optional by default: the model may return null for it. Set required: true to force the model to always generate a value.
  • default (leaf fields only) — substituted when the model extracts nothing (returns null). Its type must match the field type; for an enum field it must be one of the enum values.
Interaction: default only takes effect when required is false (the default). A required: true field is always generated, so its default never fires. Leave required at its default and pair it with default to guarantee a fallback value when the encounter doesn’t mention the field.

Not supported

The following JSON-Schema keywords are accepted by the request parser but silently dropped — they never persist and never affect generation. Don’t rely on them.

Enum options

enum (on string fields, including the items of a multi-select array) accepts two forms:
  • Plain strings — the displayed text is the stored value: "enum": ["Low", "Medium", "High"].
  • { label, value } objects — decouple display from storage: show label, store value (a stable code such as a catalog id, ICD-10, or SNOMED). Generation returns the value; the label is for display only, so labels can be renamed or translated without changing what your integration receives.
value must be unique within a field. The two forms can be mixed in one list (a plain string is treated as label == value).

Limits

The section root is depth 0. Each nested property or array item adds one level for generated fields.

Example — object section

Example — optional field with default

Example — array of structured items