From b514af5bbffbb5c4fa6a759731492f60d6a2d783 Mon Sep 17 00:00:00 2001 From: Pablo Pazos Date: Sun, 30 Oct 2022 22:50:46 -0300 Subject: [PATCH 1/2] several fixes to te all schemas, added 1.0.2 schemas and API-based schemas --- components/openehr_api_1.0.2_all.json | 16129 +++++++++++++++++++++++ components/openehr_api_1.0.3_all.json | 16205 +++++++++++++++++++++++ components/openehr_api_1.0.4_all.json | 16339 +++++++++++++++++++++++ components/openehr_api_1.1.0_all.json | 16737 ++++++++++++++++++++++++ components/openehr_rm_1.0.2_all.json | 16204 +++++++++++++++++++++++ components/openehr_rm_1.0.3_all.json | 881 +- components/openehr_rm_1.0.4_all.json | 1215 +- components/openehr_rm_1.1.0_all.json | 1188 +- 8 files changed, 82584 insertions(+), 2314 deletions(-) create mode 100644 components/openehr_api_1.0.2_all.json create mode 100644 components/openehr_api_1.0.3_all.json create mode 100644 components/openehr_api_1.0.4_all.json create mode 100644 components/openehr_api_1.1.0_all.json create mode 100644 components/openehr_rm_1.0.2_all.json diff --git a/components/openehr_api_1.0.2_all.json b/components/openehr_api_1.0.2_all.json new file mode 100644 index 0000000..8feb6a9 --- /dev/null +++ b/components/openehr_api_1.0.2_all.json @@ -0,0 +1,16129 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://specifications.openehr.org/releases/ITS-JSON/latest/components/openehr_api_1.0.2_all.json", + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + } + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTIVITY" + } + } + }, + "then": { + "$ref": "#/definitions/ACTIVITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION_DETAILS" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION_DETAILS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + } + }, + "then": { + "$ref": "#/definitions/PERSON" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + } + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + } + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + } + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + } + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HISTORY" + } + } + }, + "then": { + "$ref": "#/definitions/HISTORY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CONTRIBUTION" + } + } + }, + "then": { + "$ref": "#/definitions/CONTRIBUTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR" + } + } + }, + "then": { + "$ref": "#/definitions/EHR" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORIGINAL_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "IMPORTED_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/IMPORTED_VERSION" + } + } + ], + "definitions": { + "SYNC_EXTRACT_SPEC": { + "type": "object", + "required": [ + "includes_versions" + ], + "properties": { + "includes_versions": { + "type": "boolean" + }, + "contribution_list": { + "type": "array", + "items": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + "contributions_since": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "all_contributions": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT_SPEC" + } + }, + "additionalProperties": false + }, + "AUDIT_DETAILS": { + "type": "object", + "required": [ + "system_id", + "time_committed", + "change_type", + "committer" + ], + "properties": { + "system_id": { + "type": "string" + }, + "time_committed": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "change_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "description": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "committer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "_type": { + "type": "string", + "const": "AUDIT_DETAILS" + } + }, + "additionalProperties": false + }, + "TERMINOLOGY_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TERMINOLOGY_ID" + } + }, + "additionalProperties": false + }, + "EHR": { + "type": "object", + "required": [ + "system_id", + "ehr_id", + "time_created", + "ehr_status" + ], + "properties": { + "system_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "ehr_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "ehr_access": { + "$ref": "#/definitions/EHR_ACCESS" + }, + "ehr_status": { + "$ref": "#/definitions/EHR_STATUS" + }, + "directory": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "compositions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "contributions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EHR" + } + }, + "additionalProperties": false + }, + "DV_TIME": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_TIME" + } + }, + "additionalProperties": false + }, + "EXTRACT_MANIFEST": { + "type": "object", + "required": [ + ], + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EXTRACT_ENTITY_MANIFEST" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "EXTRACT_MANIFEST" + } + }, + "additionalProperties": false + }, + "REVISION_HISTORY_ITEM": { + "type": "object", + "required": [ + "version_id", + "audits" + ], + "properties": { + "version_id": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "audits": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "REVISION_HISTORY_ITEM" + } + }, + "additionalProperties": false + }, + "PARTY_IDENTITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "details" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "PARTY_IDENTITY" + } + }, + "additionalProperties": false + }, + "DV_PARSABLE": { + "type": "object", + "required": [ + "value", + "formalism" + ], + "properties": { + "charset": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "value": { + "type": "string" + }, + "formalism": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_PARSABLE" + } + }, + "additionalProperties": false + }, + "EXTRACT_VERSION_SPEC": { + "type": "object", + "required": [ + "include_all_versions", + "include_revision_history", + "include_data" + ], + "properties": { + "include_all_versions": { + "type": "boolean" + }, + "commit_time_interval": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "include_revision_history": { + "type": "boolean" + }, + "include_data": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "EXTRACT_VERSION_SPEC" + } + }, + "additionalProperties": false + }, + "EXTRACT_PARTICIPATION": { + "type": "object", + "required": [ + "performer", + "function" + ], + "properties": { + "performer": { + "type": "string" + }, + "function": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "mode": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "time": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "EXTRACT_PARTICIPATION" + } + }, + "additionalProperties": false + }, + "DV_COUNT": { + "type": "object", + "required": [ + "magnitude" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + } + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "magnitude": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_COUNT" + } + }, + "additionalProperties": false + }, + "DV_DATE_TIME": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DATE_TIME" + } + }, + "additionalProperties": false + }, + "DV_DURATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DURATION" + } + }, + "additionalProperties": false + }, + "CLUSTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "items" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "CLUSTER", + "ELEMENT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "CLUSTER" + } + }, + "additionalProperties": false + }, + "PARTY_RELATED": { + "type": "object", + "required": [ + "relationship" + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "name": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + }, + "minItems": 1 + }, + "relationship": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "PARTY_RELATED" + } + }, + "additionalProperties": false + }, + "ISO_OID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ISO_OID" + } + }, + "additionalProperties": false + }, + "EXTRACT_FOLDER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_FOLDER" + } + }, + "additionalProperties": false + }, + "INSTRUCTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "narrative" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "narrative": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "expiry_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "wf_definition": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "activities": { + "type": "array", + "items": { + "$ref": "#/definitions/ACTIVITY" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "INSTRUCTION" + } + }, + "additionalProperties": false + }, + "EXTRACT_CHAPTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_CHAPTER" + } + }, + "additionalProperties": false + }, + "PERSON": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "PERSON" + } + }, + "additionalProperties": false + }, + "RESOURCE_DESCRIPTION": { + "type": "object", + "required": [ + "original_author", + "lifecycle_state", + "parent_resource", + "details" + ], + "properties": { + "original_author": { + "type": "object" + }, + "other_contributors": { + "type": "array", + "items": { + "type": "string" + } + }, + "lifecycle_state": { + "type": "string" + }, + "resource_package_uri": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "parent_resource": { + "type": "object" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/RESOURCE_DESCRIPTION_ITEM" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION" + } + }, + "additionalProperties": false + }, + "GENERIC_ID": { + "type": "object", + "required": [ + "value", + "scheme" + ], + "properties": { + "value": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "GENERIC_ID" + } + }, + "additionalProperties": false + }, + "EVALUATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EVALUATION" + } + }, + "additionalProperties": false + }, + "CAPABILITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "credentials" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "credentials": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "CAPABILITY" + } + }, + "additionalProperties": false + }, + "CONTRIBUTION": { + "type": "object", + "required": [ + "uid", + "audit", + "versions" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "versions": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "CONTRIBUTION" + } + }, + "additionalProperties": false + }, + "ARCHETYPED": { + "type": "object", + "required": [ + "archetype_id", + "rm_version" + ], + "properties": { + "archetype_id": { + "$ref": "#/definitions/ARCHETYPE_ID" + }, + "template_id": { + "$ref": "#/definitions/TEMPLATE_ID" + }, + "rm_version": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPED" + } + }, + "additionalProperties": false + }, + "FEEDER_AUDIT_DETAILS": { + "type": "object", + "required": [ + "system_id" + ], + "properties": { + "system_id": { + "type": "string" + }, + "location": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "version_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "FEEDER_AUDIT_DETAILS" + } + }, + "additionalProperties": false + }, + "ORIGINAL_VERSION": { + "type": "object", + "required": [ + "contribution", + "commit_audit", + "uid", + "lifecycle_state" + ], + "properties": { + "contribution": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "commit_audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "signature": { + "type": "string" + }, + "uid": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "preceding_version_uid": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "other_input_version_uids": { + "type": "array", + "items": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "minItems": 1 + }, + "attestations": { + "type": "array", + "items": { + "$ref": "#/definitions/ATTESTATION" + }, + "minItems": 1 + }, + "lifecycle_state": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ORIGINAL_VERSION" + } + }, + "additionalProperties": false + }, + "POINT_EVENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "state": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "POINT_EVENT" + } + }, + "additionalProperties": false + }, + "CODE_PHRASE": { + "type": "object", + "required": [ + "terminology_id", + "code_string" + ], + "properties": { + "terminology_id": { + "$ref": "#/definitions/TERMINOLOGY_ID" + }, + "code_string": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "CODE_PHRASE" + } + }, + "additionalProperties": false + }, + "INSTRUCTION_DETAILS": { + "type": "object", + "required": [ + "instruction_id", + "activity_id" + ], + "properties": { + "instruction_id": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "wf_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "activity_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INSTRUCTION_DETAILS" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_PARTY": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_PARTY" + } + }, + "additionalProperties": false + }, + "EXTRACT_REQUEST": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "extract_spec" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "extract_spec": { + "$ref": "#/definitions/EXTRACT_SPEC" + }, + "update_spec": { + "$ref": "#/definitions/EXTRACT_UPDATE_SPEC" + }, + "_type": { + "type": "string", + "const": "EXTRACT_REQUEST" + } + }, + "additionalProperties": false + }, + "FEEDER_AUDIT": { + "type": "object", + "required": [ + "originating_system_audit" + ], + "properties": { + "originating_system_item_ids": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + "feeder_system_item_ids": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + "original_content": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_PARSABLE", + "DV_MULTIMEDIA" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARSABLE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_MULTIMEDIA" + } + } + }, + "then": { + "$ref": "#/definitions/DV_MULTIMEDIA" + } + } + ] + }, + "originating_system_audit": { + "$ref": "#/definitions/FEEDER_AUDIT_DETAILS" + }, + "feeder_system_audit": { + "$ref": "#/definitions/FEEDER_AUDIT_DETAILS" + }, + "_type": { + "type": "string", + "const": "FEEDER_AUDIT" + } + }, + "additionalProperties": false + }, + "EVENT_CONTEXT": { + "type": "object", + "required": [ + "start_time", + "setting" + ], + "properties": { + "health_care_facility": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "start_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "end_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + }, + "minItems": 1 + }, + "location": { + "type": "string" + }, + "setting": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "other_context": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EVENT_CONTEXT" + } + }, + "additionalProperties": false + }, + "ITEM_SINGLE": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "item" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "item": { + "$ref": "#/definitions/ELEMENT" + }, + "_type": { + "type": "string", + "const": "ITEM_SINGLE" + } + }, + "additionalProperties": false + }, + "SET": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "SET" + } + } + }, + "DV_PROPORTION": { + "type": "object", + "required": [ + "numerator", + "denominator", + "type" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "numerator": { + "type": "number" + }, + "denominator": { + "type": "number" + }, + "type": { + "type": "integer" + }, + "precision": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_PROPORTION" + } + }, + "additionalProperties": false + }, + "DV_QUANTITY": { + "type": "object", + "required": [ + "magnitude", + "units" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + } + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "magnitude": { + "type": "number" + }, + "units": { + "type": "string" + }, + "precision": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_QUANTITY" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_COMPOSITION": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_COMPOSITION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_FOLDER": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_FOLDER" + } + }, + "additionalProperties": false + }, + "DV_ORDINAL": { + "type": "object", + "required": [ + "value", + "symbol" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "value": { + "type": "integer" + }, + "symbol": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "DV_ORDINAL" + } + }, + "additionalProperties": false + }, + "SYNC_EXTRACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "specification" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "specification": { + "$ref": "#/definitions/SYNC_EXTRACT_SPEC" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/X_CONTRIBUTION" + } + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT" + } + }, + "additionalProperties": false + }, + "INTERNET_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INTERNET_ID" + } + }, + "additionalProperties": false + }, + "ROLE": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name", + "identities", + "performer" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "performer": { + "$ref": "#/definitions/PARTY_REF" + }, + "capabilities": { + "type": "array", + "items": { + "$ref": "#/definitions/CAPABILITY" + }, + "minItems": 1 + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "ROLE" + } + }, + "additionalProperties": false + }, + "AGENT": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "AGENT" + } + }, + "additionalProperties": false + }, + "MESSAGE": { + "type": "object", + "required": [ + "author", + "audit", + "content" + ], + "properties": { + "author": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "content": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "SYNC_EXTRACT", + "SYNC_EXTRACT_REQUEST" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT_REQUEST" + } + } + ] + }, + "signature": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "MESSAGE" + } + }, + "additionalProperties": false + }, + "GROUP": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "GROUP" + } + }, + "additionalProperties": false + }, + "EXTRACT_ENTITY_MANIFEST": { + "type": "object", + "required": [ + "extract_id_key" + ], + "properties": { + "extract_id_key": { + "type": "string" + }, + "ehr_id": { + "type": "string" + }, + "subject_id": { + "type": "string" + }, + "other_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "item_list": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_ENTITY_MANIFEST" + } + }, + "additionalProperties": false + }, + "INTERVAL": { + "type": "object", + "required": [ + "lower_unbounded", + "upper_unbounded", + "lower_included", + "upper_included" + ], + "properties": { + "lower": { + "type": "object" + }, + "upper": { + "type": "object" + }, + "lower_unbounded": { + "type": "boolean" + }, + "upper_unbounded": { + "type": "boolean" + }, + "lower_included": { + "type": "boolean" + }, + "upper_included": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "INTERVAL" + } + }, + "description": "Type defining an interval of any ordered type.", + "additionalProperties": false + }, + "EXTRACT_ACTION_REQUEST": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "request_id", + "action" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "request_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "action": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "EXTRACT_ACTION_REQUEST" + } + }, + "additionalProperties": false + }, + "PARTY_SELF": { + "type": "object", + "required": [ + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "_type": { + "type": "string", + "const": "PARTY_SELF" + } + }, + "additionalProperties": false + }, + "DV_MULTIMEDIA": { + "type": "object", + "required": [ + "media_type", + "size" + ], + "properties": { + "charset": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "alternate_text": { + "type": "string" + }, + "uri": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "data": { + "type": "string", + "contentEncoding": "base64" + }, + "media_type": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "compression_algorithm": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "integrity_check": { + "type": "string", + "contentEncoding": "base64" + }, + "integrity_check_algorithm": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "thumbnail": { + "$ref": "#/definitions/DV_MULTIMEDIA" + }, + "size": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_MULTIMEDIA" + } + }, + "additionalProperties": false + }, + "X_CONTRIBUTION": { + "type": "object", + "required": [ + "uid", + "audit" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "versions": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "ORIGINAL_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "IMPORTED_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/IMPORTED_VERSION" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "X_CONTRIBUTION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_EHR_ACCESS": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_EHR_ACCESS" + } + }, + "additionalProperties": false + }, + "VERSION_TREE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "VERSION_TREE_ID" + } + }, + "additionalProperties": false + }, + "DV_PARAGRAPH": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "DV_PARAGRAPH" + } + }, + "additionalProperties": false + }, + "REFERENCE_RANGE": { + "type": "object", + "required": [ + "range", + "meaning" + ], + "properties": { + "range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "meaning": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "REFERENCE_RANGE" + } + }, + "additionalProperties": false + }, + "ITEM_TREE": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "CLUSTER", + "ELEMENT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "ITEM_TREE" + } + }, + "additionalProperties": false + }, + "ELEMENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "null_flavour": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "value": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_GENERAL_TIME_SPECIFICATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_GENERAL_TIME_SPECIFICATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PERIODIC_TIME_SPECIFICATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PERIODIC_TIME_SPECIFICATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_ORDINAL" + } + } + }, + "then": { + "$ref": "#/definitions/DV_ORDINAL" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_COUNT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_COUNT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DURATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DURATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PROPORTION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PROPORTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_QUANTITY" + } + } + }, + "then": { + "$ref": "#/definitions/DV_QUANTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TIME" + } + } + }, + "then": { + "$ref": "#/definitions/DV_TIME" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DATE_TIME" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DATE_TIME" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DATE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DATE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARAGRAPH" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARAGRAPH" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_STATE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_STATE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_INTERVAL" + } + } + }, + "then": { + "$ref": "#/definitions/DV_INTERVAL" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARSABLE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_MULTIMEDIA" + } + } + }, + "then": { + "$ref": "#/definitions/DV_MULTIMEDIA" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_IDENTIFIER" + } + } + }, + "then": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_BOOLEAN" + } + } + }, + "then": { + "$ref": "#/definitions/DV_BOOLEAN" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + } + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ELEMENT" + } + }, + "additionalProperties": false + }, + "EXTRACT_SPEC": { + "type": "object", + "required": [ + "extract_type", + "include_multimedia", + "priority", + "link_depth", + "manifest" + ], + "properties": { + "extract_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "include_multimedia": { + "type": "boolean" + }, + "priority": { + "type": "integer" + }, + "link_depth": { + "type": "integer" + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + "manifest": { + "$ref": "#/definitions/EXTRACT_MANIFEST" + }, + "version_spec": { + "$ref": "#/definitions/EXTRACT_VERSION_SPEC" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EXTRACT_SPEC" + } + }, + "additionalProperties": false + }, + "DV_GENERAL_TIME_SPECIFICATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "_type": { + "type": "string", + "const": "DV_GENERAL_TIME_SPECIFICATION" + } + }, + "additionalProperties": false + }, + "DV_DATE": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DATE" + } + }, + "additionalProperties": false + }, + "DV_STATE": { + "type": "object", + "required": [ + "value", + "is_terminal" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "is_terminal": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_STATE" + } + }, + "additionalProperties": false + }, + "ITEM_LIST": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ELEMENT" + } + }, + "_type": { + "type": "string", + "const": "ITEM_LIST" + } + }, + "additionalProperties": false + }, + "HISTORY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "origin" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "origin": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "period": { + "$ref": "#/definitions/DV_DURATION" + }, + "duration": { + "$ref": "#/definitions/DV_DURATION" + }, + "summary": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "events": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "POINT_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/POINT_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INTERVAL_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/INTERVAL_EVENT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "HISTORY" + } + }, + "additionalProperties": false + }, + "DV_PERIODIC_TIME_SPECIFICATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "_type": { + "type": "string", + "const": "DV_PERIODIC_TIME_SPECIFICATION" + } + }, + "additionalProperties": false + }, + "SYNC_EXTRACT_REQUEST": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "specification" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "specification": { + "$ref": "#/definitions/SYNC_EXTRACT_SPEC" + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT_REQUEST" + } + }, + "additionalProperties": false + }, + "RESOURCE_DESCRIPTION_ITEM": { + "type": "object", + "required": [ + "language", + "purpose" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "purpose": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "use": { + "type": "string" + }, + "misuse": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "original_resource_uri": { + "type": "array", + "items": { + "type": "object" + } + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION_ITEM" + } + }, + "additionalProperties": false + }, + "CONTACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/ADDRESS" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "CONTACT" + } + }, + "additionalProperties": false + }, + "ARRAY": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "ARRAY" + } + } + }, + "TERM_MAPPING": { + "type": "object", + "required": [ + "match", + "target" + ], + "properties": { + "match": { + "type": "string" + }, + "purpose": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "target": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "TERM_MAPPING" + } + }, + "additionalProperties": false + }, + "EXTRACT_UPDATE_SPEC": { + "type": "object", + "required": [ + "persist_in_server", + "update_method" + ], + "properties": { + "persist_in_server": { + "type": "boolean" + }, + "trigger_events": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "minItems": 1 + }, + "repeat_period": { + "$ref": "#/definitions/DV_DURATION" + }, + "update_method": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "EXTRACT_UPDATE_SPEC" + } + }, + "additionalProperties": false + }, + "OBSERVATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "$ref": "#/definitions/HISTORY", + "description": "Data of the observation, in the form of a HISTORY of EVENTs." + }, + "state": { + "$ref": "#/definitions/HISTORY" + }, + "_type": { + "type": "string", + "const": "OBSERVATION" + } + }, + "description": "ENTRY subtype used to represent observation information in time, as either a single or multiple samples.", + "additionalProperties": false + }, + "X_VERSIONED_OBJECT": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_OBJECT" + } + }, + "additionalProperties": false + }, + "ADDRESSED_MESSAGE": { + "type": "object", + "required": [ + "sender", + "sender_reference" + ], + "properties": { + "sender": { + "type": "string" + }, + "sender_reference": { + "type": "string" + }, + "addressees": { + "type": "array", + "items": { + "type": "string" + } + }, + "urgency": { + "type": "integer" + }, + "message": { + "$ref": "#/definitions/MESSAGE" + }, + "_type": { + "type": "string", + "const": "ADDRESSED_MESSAGE" + } + }, + "additionalProperties": false + }, + "UUID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "UUID" + } + }, + "additionalProperties": false + }, + "ISM_TRANSITION": { + "type": "object", + "required": [ + "current_state" + ], + "properties": { + "current_state": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "transition": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "careflow_step": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "ISM_TRANSITION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_EHR_STATUS": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_EHR_STATUS" + } + }, + "additionalProperties": false + }, + "PARTICIPATION": { + "type": "object", + "required": [ + "function", + "performer", + "mode" + ], + "properties": { + "function": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "mode": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "performer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "_type": { + "type": "string", + "const": "PARTICIPATION" + } + }, + "additionalProperties": false + }, + "FOLDER": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "folders": { + "type": "array", + "items": { + "$ref": "#/definitions/FOLDER" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "FOLDER" + } + }, + "additionalProperties": false + }, + "EXTRACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time_created", + "system_id", + "sequence_nr" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "request_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "system_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "sequence_nr": { + "type": "integer" + }, + "specification": { + "$ref": "#/definitions/EXTRACT_SPEC" + }, + "chapters": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_ENTITY_CHAPTER", + "EXTRACT_CHAPTER" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ENTITY_CHAPTER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EXTRACT_ENTITY_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_CHAPTER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + } + ] + } + }, + "participations": { + "type": "array", + "items": { + "$ref": "#/definitions/EXTRACT_PARTICIPATION" + } + }, + "_type": { + "type": "string", + "const": "EXTRACT" + } + }, + "additionalProperties": false + }, + "OBJECT_VERSION_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "OBJECT_VERSION_ID" + } + }, + "additionalProperties": false + }, + "DV_INTERVAL": { + "type": "object", + "required": [ + "lower_unbounded", + "upper_unbounded", + "lower_included", + "upper_included" + ], + "properties": { + "lower": { + "type": "object" + }, + "upper": { + "type": "object" + }, + "lower_unbounded": { + "type": "boolean" + }, + "upper_unbounded": { + "type": "boolean" + }, + "lower_included": { + "type": "boolean" + }, + "upper_included": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_INTERVAL" + } + }, + "additionalProperties": false + }, + "ORGANISATION": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "ORGANISATION" + } + }, + "additionalProperties": false + }, + "VERSIONED_OBJECT": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "_type": { + "type": "string", + "const": "VERSIONED_OBJECT" + } + }, + "additionalProperties": false + }, + "GENERIC_CONTENT_ITEM": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "is_primary" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "is_primary": { + "type": "boolean" + }, + "is_changed": { + "type": "boolean" + }, + "is_masked": { + "type": "boolean" + }, + "item": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTITY" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_CHAPTER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ENTITY_CHAPTER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_ENTITY_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CAPABILITY" + } + } + }, + "then": { + "$ref": "#/definitions/CAPABILITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + } + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + } + }, + "then": { + "$ref": "#/definitions/PERSON" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + } + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + } + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + } + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ACTION_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_ACTION_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HISTORY" + } + } + }, + "then": { + "$ref": "#/definitions/HISTORY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CONTACT" + } + } + }, + "then": { + "$ref": "#/definitions/CONTACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "POINT_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/POINT_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INTERVAL_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/INTERVAL_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADDRESS" + } + } + }, + "then": { + "$ref": "#/definitions/ADDRESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATIONSHIP" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_ACCESS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_ACCESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + } + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTIVITY" + } + } + }, + "then": { + "$ref": "#/definitions/ACTIVITY" + } + } + ] + }, + "item_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "item_type_version": { + "type": "string" + }, + "author": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "date-time" + }, + "authoriser": { + "type": "string" + }, + "authorisation_time": { + "type": "string", + "format": "date-time" + }, + "item_status": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "version_id": { + "type": "string" + }, + "version_set_id": { + "type": "string" + }, + "system_id": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "GENERIC_CONTENT_ITEM" + } + }, + "additionalProperties": false + }, + "ITEM_TABLE": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/definitions/CLUSTER" + } + }, + "_type": { + "type": "string", + "const": "ITEM_TABLE" + } + }, + "additionalProperties": false + }, + "INTERVAL_EVENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time", + "data", + "width", + "math_function" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "state": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "width": { + "$ref": "#/definitions/DV_DURATION" + }, + "sample_count": { + "type": "integer" + }, + "math_function": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "INTERVAL_EVENT" + } + }, + "additionalProperties": false + }, + "ATTESTATION": { + "type": "object", + "required": [ + "system_id", + "time_committed", + "change_type", + "committer", + "reason", + "is_pending" + ], + "properties": { + "system_id": { + "type": "string" + }, + "time_committed": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "change_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "description": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "committer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "attested_view": { + "$ref": "#/definitions/DV_MULTIMEDIA" + }, + "proof": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + "reason": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "is_pending": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "ATTESTATION" + } + }, + "additionalProperties": false + }, + "ADDRESS": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "details" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ADDRESS" + } + }, + "additionalProperties": false + }, + "REVISION_HISTORY": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/REVISION_HISTORY_ITEM" + } + }, + "_type": { + "type": "string", + "const": "REVISION_HISTORY" + } + }, + "additionalProperties": false + }, + "DV_IDENTIFIER": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "issuer": { + "type": "string" + }, + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "assigner": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_IDENTIFIER" + } + }, + "additionalProperties": false + }, + "DV_CODED_TEXT": { + "type": "object", + "required": [ + "value", + "defining_code" + ], + "properties": { + "value": { + "type": "string" + }, + "hyperlink": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "formatting": { + "type": "string" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/definitions/TERM_MAPPING" + }, + "minItems": 1 + }, + "defining_code": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "DV_CODED_TEXT" + } + }, + "additionalProperties": false + }, + "LOCATABLE_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "LOCATABLE_REF" + } + }, + "additionalProperties": false + }, + "PARTY_RELATIONSHIP": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "source", + "target" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "source": { + "$ref": "#/definitions/PARTY_REF" + }, + "target": { + "$ref": "#/definitions/PARTY_REF" + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "PARTY_RELATIONSHIP" + } + }, + "additionalProperties": false + }, + "LIST": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "LIST" + } + } + }, + "EHR_ACCESS": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "settings": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "EHR_ACCESS" + } + }, + "additionalProperties": false + }, + "DV_EHR_URI": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string", + "format": "uri-reference" + }, + "_type": { + "type": "string", + "const": "DV_EHR_URI" + } + }, + "additionalProperties": false + }, + "ARCHETYPE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPE_ID" + } + }, + "additionalProperties": false + }, + "PARTY_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "PARTY_REF" + } + }, + "additionalProperties": false + }, + "TEMPLATE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TEMPLATE_ID" + } + }, + "additionalProperties": false + }, + "ADMIN_ENTRY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ADMIN_ENTRY" + } + }, + "additionalProperties": false + }, + "PARTY_IDENTIFIED": { + "type": "object", + "required": [ + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "name": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "PARTY_IDENTIFIED" + } + }, + "additionalProperties": false + }, + "OPENEHR_CONTENT_ITEM": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "is_primary" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "is_primary": { + "type": "boolean" + }, + "is_changed": { + "type": "boolean" + }, + "is_masked": { + "type": "boolean" + }, + "item": { + "allOf": [ + { + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_PARTY" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_PARTY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_EHR_ACCESS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_EHR_ACCESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_OBJECT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_OBJECT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_OBJECT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "OPENEHR_CONTENT_ITEM" + } + }, + "additionalProperties": false + }, + "COMPOSITION": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name", + "language", + "territory", + "category", + "composer" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "territory": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "category": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "composer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "context": { + "$ref": "#/definitions/EVENT_CONTEXT" + }, + "content": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "INSTRUCTION", + "EVALUATION", + "OBSERVATION", + "ACTION", + "ADMIN_ENTRY", + "GENERIC_ENTRY", + "SECTION" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "COMPOSITION" + } + }, + "additionalProperties": false + }, + "EHR_STATUS": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name", + "subject", + "is_queryable", + "is_modifiable" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "subject": { + "$ref": "#/definitions/PARTY_SELF" + }, + "is_queryable": { + "type": "boolean" + }, + "is_modifiable": { + "type": "boolean" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EHR_STATUS" + } + }, + "additionalProperties": false + }, + "LINK": { + "type": "object", + "required": [ + "meaning", + "type", + "target" + ], + "properties": { + "meaning": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "type": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "target": { + "$ref": "#/definitions/DV_EHR_URI" + }, + "_type": { + "type": "string", + "const": "LINK" + } + }, + "additionalProperties": false + }, + "TRANSLATION_DETAILS": { + "type": "object", + "required": [ + "language", + "author" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "author": { + "type": "object" + }, + "accreditation": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "TRANSLATION_DETAILS" + } + }, + "additionalProperties": false + }, + "ACCESS_GROUP_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ACCESS_GROUP_REF" + } + }, + "additionalProperties": false + }, + "OBJECT_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "OBJECT_REF" + } + }, + "additionalProperties": false + }, + "GENERIC_ENTRY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "data": { + "$ref": "#/definitions/ITEM_TREE" + }, + "_type": { + "type": "string", + "const": "GENERIC_ENTRY" + } + }, + "additionalProperties": false + }, + "IMPORTED_VERSION": { + "type": "object", + "required": [ + "contribution", + "commit_audit", + "item" + ], + "properties": { + "contribution": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "commit_audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "signature": { + "type": "string" + }, + "item": { + "$ref": "#/definitions/ORIGINAL_VERSION" + }, + "_type": { + "type": "string", + "const": "IMPORTED_VERSION" + } + }, + "additionalProperties": false + }, + "DV_BOOLEAN": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_BOOLEAN" + } + }, + "additionalProperties": false + }, + "DV_URI": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string", + "format": "uri-reference" + }, + "_type": { + "type": "string", + "const": "DV_URI" + } + }, + "additionalProperties": false + }, + "DV_TEXT": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "hyperlink": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "formatting": { + "type": "string" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/definitions/TERM_MAPPING" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "DV_TEXT" + } + }, + "additionalProperties": false + }, + "ACTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "time", + "description", + "ism_transition" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "description": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "ism_transition": { + "$ref": "#/definitions/ISM_TRANSITION" + }, + "instruction_details": { + "$ref": "#/definitions/INSTRUCTION_DETAILS" + }, + "_type": { + "type": "string", + "const": "ACTION" + } + }, + "additionalProperties": false + }, + "EXTRACT_ENTITY_CHAPTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "extract_id_key" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "extract_id_key": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "EXTRACT_ENTITY_CHAPTER" + } + }, + "additionalProperties": false + }, + "HIER_OBJECT_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "HIER_OBJECT_ID" + } + }, + "additionalProperties": false + }, + "SECTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "INSTRUCTION", + "EVALUATION", + "OBSERVATION", + "ACTION", + "ADMIN_ENTRY", + "GENERIC_ENTRY", + "SECTION" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "SECTION" + } + }, + "additionalProperties": false + }, + "ACTIVITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "description", + "action_archetype_id", + "timing" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "description": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "timing": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "action_archetype_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ACTIVITY" + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/components/openehr_api_1.0.3_all.json b/components/openehr_api_1.0.3_all.json new file mode 100644 index 0000000..2ffe5d1 --- /dev/null +++ b/components/openehr_api_1.0.3_all.json @@ -0,0 +1,16205 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://specifications.openehr.org/releases/ITS-JSON/latest/components/openehr_api_1.0.3_all.json", + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + } + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTIVITY" + } + } + }, + "then": { + "$ref": "#/definitions/ACTIVITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION_DETAILS" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION_DETAILS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CAPABILITY" + } + } + }, + "then": { + "$ref": "#/definitions/CAPABILITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + } + }, + "then": { + "$ref": "#/definitions/PERSON" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADDRESS" + } + } + }, + "then": { + "$ref": "#/definitions/ADDRESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + } + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + } + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTITY" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HISTORY" + } + } + }, + "then": { + "$ref": "#/definitions/HISTORY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CONTRIBUTION" + } + } + }, + "then": { + "$ref": "#/definitions/CONTRIBUTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR" + } + } + }, + "then": { + "$ref": "#/definitions/EHR" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORIGINAL_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "IMPORTED_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/IMPORTED_VERSION" + } + } + ], + "definitions": { + "SYNC_EXTRACT_SPEC": { + "type": "object", + "required": [ + "includes_versions" + ], + "properties": { + "includes_versions": { + "type": "boolean" + }, + "contribution_list": { + "type": "array", + "items": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + "contributions_since": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "all_contributions": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT_SPEC" + } + }, + "additionalProperties": false + }, + "AUDIT_DETAILS": { + "type": "object", + "required": [ + "system_id", + "time_committed", + "change_type", + "committer" + ], + "properties": { + "system_id": { + "type": "string" + }, + "time_committed": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "change_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "description": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "committer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "_type": { + "type": "string", + "const": "AUDIT_DETAILS" + } + }, + "additionalProperties": false + }, + "TERMINOLOGY_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TERMINOLOGY_ID" + } + }, + "additionalProperties": false + }, + "EHR": { + "type": "object", + "required": [ + "system_id", + "ehr_id", + "time_created", + "ehr_status" + ], + "properties": { + "system_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "ehr_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "ehr_access": { + "$ref": "#/definitions/EHR_ACCESS" + }, + "ehr_status": { + "$ref": "#/definitions/EHR_STATUS" + }, + "directory": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "compositions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "contributions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EHR" + } + }, + "additionalProperties": false + }, + "DV_TIME": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_TIME" + } + }, + "additionalProperties": false + }, + "EXTRACT_MANIFEST": { + "type": "object", + "required": [ + ], + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EXTRACT_ENTITY_MANIFEST" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "EXTRACT_MANIFEST" + } + }, + "additionalProperties": false + }, + "REVISION_HISTORY_ITEM": { + "type": "object", + "required": [ + "version_id", + "audits" + ], + "properties": { + "version_id": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "audits": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "REVISION_HISTORY_ITEM" + } + }, + "additionalProperties": false + }, + "PARTY_IDENTITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "details" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "PARTY_IDENTITY" + } + }, + "additionalProperties": false + }, + "DV_PARSABLE": { + "type": "object", + "required": [ + "value", + "formalism" + ], + "properties": { + "charset": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "value": { + "type": "string" + }, + "formalism": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_PARSABLE" + } + }, + "additionalProperties": false + }, + "EXTRACT_VERSION_SPEC": { + "type": "object", + "required": [ + "include_all_versions", + "include_revision_history", + "include_data" + ], + "properties": { + "include_all_versions": { + "type": "boolean" + }, + "commit_time_interval": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "include_revision_history": { + "type": "boolean" + }, + "include_data": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "EXTRACT_VERSION_SPEC" + } + }, + "additionalProperties": false + }, + "EXTRACT_PARTICIPATION": { + "type": "object", + "required": [ + "performer", + "function" + ], + "properties": { + "performer": { + "type": "string" + }, + "function": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "mode": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "time": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "EXTRACT_PARTICIPATION" + } + }, + "additionalProperties": false + }, + "DV_COUNT": { + "type": "object", + "required": [ + "magnitude" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + } + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "magnitude": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_COUNT" + } + }, + "additionalProperties": false + }, + "DV_DATE_TIME": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DATE_TIME" + } + }, + "additionalProperties": false + }, + "DV_DURATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DURATION" + } + }, + "additionalProperties": false + }, + "CLUSTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "items" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "CLUSTER", + "ELEMENT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "CLUSTER" + } + }, + "additionalProperties": false + }, + "PARTY_RELATED": { + "type": "object", + "required": [ + "relationship" + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "name": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + }, + "minItems": 1 + }, + "relationship": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "PARTY_RELATED" + } + }, + "additionalProperties": false + }, + "ISO_OID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ISO_OID" + } + }, + "additionalProperties": false + }, + "EXTRACT_FOLDER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_FOLDER" + } + }, + "additionalProperties": false + }, + "INSTRUCTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "narrative" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "narrative": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "expiry_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "wf_definition": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "activities": { + "type": "array", + "items": { + "$ref": "#/definitions/ACTIVITY" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "INSTRUCTION" + } + }, + "additionalProperties": false + }, + "EXTRACT_CHAPTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_CHAPTER" + } + }, + "additionalProperties": false + }, + "PERSON": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities", + "roles", + "languages" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "PERSON" + } + }, + "additionalProperties": false + }, + "RESOURCE_DESCRIPTION": { + "type": "object", + "required": [ + "original_author", + "lifecycle_state", + "parent_resource", + "details" + ], + "properties": { + "original_author": { + "type": "object" + }, + "other_contributors": { + "type": "array", + "items": { + "type": "string" + } + }, + "lifecycle_state": { + "type": "string" + }, + "resource_package_uri": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "parent_resource": { + "type": "object" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/RESOURCE_DESCRIPTION_ITEM" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION" + } + }, + "additionalProperties": false + }, + "GENERIC_ID": { + "type": "object", + "required": [ + "value", + "scheme" + ], + "properties": { + "value": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "GENERIC_ID" + } + }, + "additionalProperties": false + }, + "EVALUATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EVALUATION" + } + }, + "additionalProperties": false + }, + "CAPABILITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "credentials" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "credentials": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "CAPABILITY" + } + }, + "additionalProperties": false + }, + "CONTRIBUTION": { + "type": "object", + "required": [ + "uid", + "audit", + "versions" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "versions": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "CONTRIBUTION" + } + }, + "additionalProperties": false + }, + "ARCHETYPED": { + "type": "object", + "required": [ + "archetype_id", + "rm_version" + ], + "properties": { + "archetype_id": { + "$ref": "#/definitions/ARCHETYPE_ID" + }, + "template_id": { + "$ref": "#/definitions/TEMPLATE_ID" + }, + "rm_version": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPED" + } + }, + "additionalProperties": false + }, + "FEEDER_AUDIT_DETAILS": { + "type": "object", + "required": [ + "system_id" + ], + "properties": { + "system_id": { + "type": "string" + }, + "location": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "version_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "FEEDER_AUDIT_DETAILS" + } + }, + "additionalProperties": false + }, + "ORIGINAL_VERSION": { + "type": "object", + "required": [ + "contribution", + "commit_audit", + "uid", + "lifecycle_state" + ], + "properties": { + "contribution": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "commit_audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "signature": { + "type": "string" + }, + "uid": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "preceding_version_uid": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "other_input_version_uids": { + "type": "array", + "items": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "minItems": 1 + }, + "attestations": { + "type": "array", + "items": { + "$ref": "#/definitions/ATTESTATION" + }, + "minItems": 1 + }, + "lifecycle_state": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ORIGINAL_VERSION" + } + }, + "additionalProperties": false + }, + "POINT_EVENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "state": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "POINT_EVENT" + } + }, + "additionalProperties": false + }, + "CODE_PHRASE": { + "type": "object", + "required": [ + "terminology_id", + "code_string" + ], + "properties": { + "terminology_id": { + "$ref": "#/definitions/TERMINOLOGY_ID" + }, + "code_string": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "CODE_PHRASE" + } + }, + "additionalProperties": false + }, + "INSTRUCTION_DETAILS": { + "type": "object", + "required": [ + "instruction_id", + "activity_id" + ], + "properties": { + "instruction_id": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "wf_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "activity_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INSTRUCTION_DETAILS" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_PARTY": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_PARTY" + } + }, + "additionalProperties": false + }, + "EXTRACT_REQUEST": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "extract_spec" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "extract_spec": { + "$ref": "#/definitions/EXTRACT_SPEC" + }, + "update_spec": { + "$ref": "#/definitions/EXTRACT_UPDATE_SPEC" + }, + "_type": { + "type": "string", + "const": "EXTRACT_REQUEST" + } + }, + "additionalProperties": false + }, + "FEEDER_AUDIT": { + "type": "object", + "required": [ + "originating_system_audit" + ], + "properties": { + "originating_system_item_ids": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + "feeder_system_item_ids": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + "original_content": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_PARSABLE", + "DV_MULTIMEDIA" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARSABLE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_MULTIMEDIA" + } + } + }, + "then": { + "$ref": "#/definitions/DV_MULTIMEDIA" + } + } + ] + }, + "originating_system_audit": { + "$ref": "#/definitions/FEEDER_AUDIT_DETAILS" + }, + "feeder_system_audit": { + "$ref": "#/definitions/FEEDER_AUDIT_DETAILS" + }, + "_type": { + "type": "string", + "const": "FEEDER_AUDIT" + } + }, + "additionalProperties": false + }, + "EVENT_CONTEXT": { + "type": "object", + "required": [ + "start_time", + "setting" + ], + "properties": { + "health_care_facility": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "start_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "end_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + }, + "minItems": 1 + }, + "location": { + "type": "string" + }, + "setting": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "other_context": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EVENT_CONTEXT" + } + }, + "additionalProperties": false + }, + "ITEM_SINGLE": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "item" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "item": { + "$ref": "#/definitions/ELEMENT" + }, + "_type": { + "type": "string", + "const": "ITEM_SINGLE" + } + }, + "additionalProperties": false + }, + "SET": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "SET" + } + } + }, + "DV_PROPORTION": { + "type": "object", + "required": [ + "numerator", + "denominator", + "type" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "numerator": { + "type": "number" + }, + "denominator": { + "type": "number" + }, + "type": { + "type": "integer" + }, + "precision": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_PROPORTION" + } + }, + "additionalProperties": false + }, + "DV_QUANTITY": { + "type": "object", + "required": [ + "magnitude", + "units" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + } + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "magnitude": { + "type": "number" + }, + "units": { + "type": "string" + }, + "precision": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_QUANTITY" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_COMPOSITION": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_COMPOSITION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_FOLDER": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_FOLDER" + } + }, + "additionalProperties": false + }, + "DV_ORDINAL": { + "type": "object", + "required": [ + "value", + "symbol" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "value": { + "type": "integer" + }, + "symbol": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "DV_ORDINAL" + } + }, + "additionalProperties": false + }, + "SYNC_EXTRACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "specification" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "specification": { + "$ref": "#/definitions/SYNC_EXTRACT_SPEC" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/X_CONTRIBUTION" + } + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT" + } + }, + "additionalProperties": false + }, + "INTERNET_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INTERNET_ID" + } + }, + "additionalProperties": false + }, + "ROLE": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities", + "performer" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "performer": { + "$ref": "#/definitions/PARTY_REF" + }, + "capabilities": { + "type": "array", + "items": { + "$ref": "#/definitions/CAPABILITY" + }, + "minItems": 1 + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "ROLE" + } + }, + "additionalProperties": false + }, + "AGENT": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities", + "roles", + "languages" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "AGENT" + } + }, + "additionalProperties": false + }, + "MESSAGE": { + "type": "object", + "required": [ + "author", + "audit", + "content" + ], + "properties": { + "author": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "content": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "SYNC_EXTRACT", + "SYNC_EXTRACT_REQUEST" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT_REQUEST" + } + } + ] + }, + "signature": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "MESSAGE" + } + }, + "additionalProperties": false + }, + "GROUP": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities", + "roles", + "languages" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "GROUP" + } + }, + "additionalProperties": false + }, + "EXTRACT_ENTITY_MANIFEST": { + "type": "object", + "required": [ + "extract_id_key" + ], + "properties": { + "extract_id_key": { + "type": "string" + }, + "ehr_id": { + "type": "string" + }, + "subject_id": { + "type": "string" + }, + "other_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "item_list": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_ENTITY_MANIFEST" + } + }, + "additionalProperties": false + }, + "INTERVAL": { + "type": "object", + "required": [ + "lower_unbounded", + "upper_unbounded", + "lower_included", + "upper_included" + ], + "properties": { + "lower": { + "type": "object" + }, + "upper": { + "type": "object" + }, + "lower_unbounded": { + "type": "boolean" + }, + "upper_unbounded": { + "type": "boolean" + }, + "lower_included": { + "type": "boolean" + }, + "upper_included": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "INTERVAL" + } + }, + "description": "Type defining an interval of any ordered type.", + "additionalProperties": false + }, + "EXTRACT_ACTION_REQUEST": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "request_id", + "action" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "request_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "action": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "EXTRACT_ACTION_REQUEST" + } + }, + "additionalProperties": false + }, + "PARTY_SELF": { + "type": "object", + "required": [ + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "_type": { + "type": "string", + "const": "PARTY_SELF" + } + }, + "additionalProperties": false + }, + "DV_MULTIMEDIA": { + "type": "object", + "required": [ + "media_type", + "size" + ], + "properties": { + "charset": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "alternate_text": { + "type": "string" + }, + "uri": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "data": { + "type": "string", + "contentEncoding": "base64" + }, + "media_type": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "compression_algorithm": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "integrity_check": { + "type": "string", + "contentEncoding": "base64" + }, + "integrity_check_algorithm": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "thumbnail": { + "$ref": "#/definitions/DV_MULTIMEDIA" + }, + "size": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_MULTIMEDIA" + } + }, + "additionalProperties": false + }, + "X_CONTRIBUTION": { + "type": "object", + "required": [ + "uid", + "audit" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "versions": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "ORIGINAL_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "IMPORTED_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/IMPORTED_VERSION" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "X_CONTRIBUTION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_EHR_ACCESS": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_EHR_ACCESS" + } + }, + "additionalProperties": false + }, + "VERSION_TREE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "VERSION_TREE_ID" + } + }, + "additionalProperties": false + }, + "DV_PARAGRAPH": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "DV_PARAGRAPH" + } + }, + "additionalProperties": false + }, + "REFERENCE_RANGE": { + "type": "object", + "required": [ + "range", + "meaning" + ], + "properties": { + "range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "meaning": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "REFERENCE_RANGE" + } + }, + "additionalProperties": false + }, + "ITEM_TREE": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "CLUSTER", + "ELEMENT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "ITEM_TREE" + } + }, + "additionalProperties": false + }, + "ELEMENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "null_flavour": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "value": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_GENERAL_TIME_SPECIFICATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_GENERAL_TIME_SPECIFICATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PERIODIC_TIME_SPECIFICATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PERIODIC_TIME_SPECIFICATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_ORDINAL" + } + } + }, + "then": { + "$ref": "#/definitions/DV_ORDINAL" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_COUNT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_COUNT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DURATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DURATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PROPORTION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PROPORTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_QUANTITY" + } + } + }, + "then": { + "$ref": "#/definitions/DV_QUANTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TIME" + } + } + }, + "then": { + "$ref": "#/definitions/DV_TIME" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DATE_TIME" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DATE_TIME" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DATE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DATE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARAGRAPH" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARAGRAPH" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_STATE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_STATE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_INTERVAL" + } + } + }, + "then": { + "$ref": "#/definitions/DV_INTERVAL" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARSABLE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_MULTIMEDIA" + } + } + }, + "then": { + "$ref": "#/definitions/DV_MULTIMEDIA" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_IDENTIFIER" + } + } + }, + "then": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_BOOLEAN" + } + } + }, + "then": { + "$ref": "#/definitions/DV_BOOLEAN" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + } + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ELEMENT" + } + }, + "additionalProperties": false + }, + "EXTRACT_SPEC": { + "type": "object", + "required": [ + "extract_type", + "include_multimedia", + "priority", + "link_depth", + "manifest" + ], + "properties": { + "extract_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "include_multimedia": { + "type": "boolean" + }, + "priority": { + "type": "integer" + }, + "link_depth": { + "type": "integer" + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + "manifest": { + "$ref": "#/definitions/EXTRACT_MANIFEST" + }, + "version_spec": { + "$ref": "#/definitions/EXTRACT_VERSION_SPEC" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EXTRACT_SPEC" + } + }, + "additionalProperties": false + }, + "DV_GENERAL_TIME_SPECIFICATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "_type": { + "type": "string", + "const": "DV_GENERAL_TIME_SPECIFICATION" + } + }, + "additionalProperties": false + }, + "DV_DATE": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DATE" + } + }, + "additionalProperties": false + }, + "DV_STATE": { + "type": "object", + "required": [ + "value", + "is_terminal" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "is_terminal": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_STATE" + } + }, + "additionalProperties": false + }, + "ITEM_LIST": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ELEMENT" + } + }, + "_type": { + "type": "string", + "const": "ITEM_LIST" + } + }, + "additionalProperties": false + }, + "HISTORY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "origin" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "origin": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "period": { + "$ref": "#/definitions/DV_DURATION" + }, + "duration": { + "$ref": "#/definitions/DV_DURATION" + }, + "summary": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "events": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "POINT_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/POINT_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INTERVAL_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/INTERVAL_EVENT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "HISTORY" + } + }, + "additionalProperties": false + }, + "DV_PERIODIC_TIME_SPECIFICATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "_type": { + "type": "string", + "const": "DV_PERIODIC_TIME_SPECIFICATION" + } + }, + "additionalProperties": false + }, + "SYNC_EXTRACT_REQUEST": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "specification" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "specification": { + "$ref": "#/definitions/SYNC_EXTRACT_SPEC" + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT_REQUEST" + } + }, + "additionalProperties": false + }, + "RESOURCE_DESCRIPTION_ITEM": { + "type": "object", + "required": [ + "language", + "purpose" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "purpose": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "use": { + "type": "string" + }, + "misuse": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "original_resource_uri": { + "type": "array", + "items": { + "type": "object" + } + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION_ITEM" + } + }, + "additionalProperties": false + }, + "CONTACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/ADDRESS" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "CONTACT" + } + }, + "additionalProperties": false + }, + "ARRAY": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "ARRAY" + } + } + }, + "TERM_MAPPING": { + "type": "object", + "required": [ + "match", + "target" + ], + "properties": { + "match": { + "type": "string" + }, + "purpose": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "target": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "TERM_MAPPING" + } + }, + "additionalProperties": false + }, + "EXTRACT_UPDATE_SPEC": { + "type": "object", + "required": [ + "persist_in_server", + "update_method" + ], + "properties": { + "persist_in_server": { + "type": "boolean" + }, + "trigger_events": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "minItems": 1 + }, + "repeat_period": { + "$ref": "#/definitions/DV_DURATION" + }, + "update_method": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "EXTRACT_UPDATE_SPEC" + } + }, + "additionalProperties": false + }, + "OBSERVATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "$ref": "#/definitions/HISTORY", + "description": "Data of the observation, in the form of a HISTORY of EVENTs." + }, + "state": { + "$ref": "#/definitions/HISTORY" + }, + "_type": { + "type": "string", + "const": "OBSERVATION" + } + }, + "description": "ENTRY subtype used to represent observation information in time, as either a single or multiple samples.", + "additionalProperties": false + }, + "X_VERSIONED_OBJECT": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_OBJECT" + } + }, + "additionalProperties": false + }, + "ADDRESSED_MESSAGE": { + "type": "object", + "required": [ + "sender", + "sender_reference" + ], + "properties": { + "sender": { + "type": "string" + }, + "sender_reference": { + "type": "string" + }, + "addressees": { + "type": "array", + "items": { + "type": "string" + } + }, + "urgency": { + "type": "integer" + }, + "message": { + "$ref": "#/definitions/MESSAGE" + }, + "_type": { + "type": "string", + "const": "ADDRESSED_MESSAGE" + } + }, + "additionalProperties": false + }, + "UUID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "UUID" + } + }, + "additionalProperties": false + }, + "ISM_TRANSITION": { + "type": "object", + "required": [ + "current_state" + ], + "properties": { + "current_state": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "transition": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "careflow_step": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "reason": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "ISM_TRANSITION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_EHR_STATUS": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_EHR_STATUS" + } + }, + "additionalProperties": false + }, + "PARTICIPATION": { + "type": "object", + "required": [ + "function", + "performer" + ], + "properties": { + "function": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "mode": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "performer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "_type": { + "type": "string", + "const": "PARTICIPATION" + } + }, + "additionalProperties": false + }, + "FOLDER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "folders": { + "type": "array", + "items": { + "$ref": "#/definitions/FOLDER" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "FOLDER" + } + }, + "additionalProperties": false + }, + "EXTRACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time_created", + "system_id", + "sequence_nr" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "request_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "system_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "sequence_nr": { + "type": "integer" + }, + "specification": { + "$ref": "#/definitions/EXTRACT_SPEC" + }, + "chapters": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_ENTITY_CHAPTER", + "EXTRACT_CHAPTER" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ENTITY_CHAPTER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EXTRACT_ENTITY_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_CHAPTER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + } + ] + } + }, + "participations": { + "type": "array", + "items": { + "$ref": "#/definitions/EXTRACT_PARTICIPATION" + } + }, + "_type": { + "type": "string", + "const": "EXTRACT" + } + }, + "additionalProperties": false + }, + "OBJECT_VERSION_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "OBJECT_VERSION_ID" + } + }, + "additionalProperties": false + }, + "DV_INTERVAL": { + "type": "object", + "required": [ + "lower_unbounded", + "upper_unbounded", + "lower_included", + "upper_included" + ], + "properties": { + "lower": { + "type": "object" + }, + "upper": { + "type": "object" + }, + "lower_unbounded": { + "type": "boolean" + }, + "upper_unbounded": { + "type": "boolean" + }, + "lower_included": { + "type": "boolean" + }, + "upper_included": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_INTERVAL" + } + }, + "additionalProperties": false + }, + "ORGANISATION": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities", + "roles", + "languages" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "ORGANISATION" + } + }, + "additionalProperties": false + }, + "VERSIONED_OBJECT": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "_type": { + "type": "string", + "const": "VERSIONED_OBJECT" + } + }, + "additionalProperties": false + }, + "GENERIC_CONTENT_ITEM": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "is_primary" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "is_primary": { + "type": "boolean" + }, + "is_changed": { + "type": "boolean" + }, + "is_masked": { + "type": "boolean" + }, + "item": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTITY" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_CHAPTER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ENTITY_CHAPTER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_ENTITY_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CAPABILITY" + } + } + }, + "then": { + "$ref": "#/definitions/CAPABILITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + } + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + } + }, + "then": { + "$ref": "#/definitions/PERSON" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + } + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + } + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + } + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ACTION_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_ACTION_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HISTORY" + } + } + }, + "then": { + "$ref": "#/definitions/HISTORY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CONTACT" + } + } + }, + "then": { + "$ref": "#/definitions/CONTACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "POINT_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/POINT_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INTERVAL_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/INTERVAL_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADDRESS" + } + } + }, + "then": { + "$ref": "#/definitions/ADDRESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATIONSHIP" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_ACCESS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_ACCESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + } + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTIVITY" + } + } + }, + "then": { + "$ref": "#/definitions/ACTIVITY" + } + } + ] + }, + "item_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "item_type_version": { + "type": "string" + }, + "author": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "date-time" + }, + "authoriser": { + "type": "string" + }, + "authorisation_time": { + "type": "string", + "format": "date-time" + }, + "item_status": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "version_id": { + "type": "string" + }, + "version_set_id": { + "type": "string" + }, + "system_id": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "GENERIC_CONTENT_ITEM" + } + }, + "additionalProperties": false + }, + "ITEM_TABLE": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/definitions/CLUSTER" + } + }, + "_type": { + "type": "string", + "const": "ITEM_TABLE" + } + }, + "additionalProperties": false + }, + "INTERVAL_EVENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time", + "data", + "width", + "math_function" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "state": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "width": { + "$ref": "#/definitions/DV_DURATION" + }, + "sample_count": { + "type": "integer" + }, + "math_function": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "INTERVAL_EVENT" + } + }, + "additionalProperties": false + }, + "ATTESTATION": { + "type": "object", + "required": [ + "system_id", + "time_committed", + "change_type", + "committer", + "reason", + "is_pending" + ], + "properties": { + "system_id": { + "type": "string" + }, + "time_committed": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "change_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "description": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "committer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "attested_view": { + "$ref": "#/definitions/DV_MULTIMEDIA" + }, + "proof": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + "reason": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "is_pending": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "ATTESTATION" + } + }, + "additionalProperties": false + }, + "ADDRESS": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "details" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ADDRESS" + } + }, + "additionalProperties": false + }, + "REVISION_HISTORY": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/REVISION_HISTORY_ITEM" + } + }, + "_type": { + "type": "string", + "const": "REVISION_HISTORY" + } + }, + "additionalProperties": false + }, + "DV_IDENTIFIER": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "issuer": { + "type": "string" + }, + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "assigner": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_IDENTIFIER" + } + }, + "additionalProperties": false + }, + "DV_CODED_TEXT": { + "type": "object", + "required": [ + "value", + "defining_code" + ], + "properties": { + "value": { + "type": "string" + }, + "hyperlink": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "formatting": { + "type": "string" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/definitions/TERM_MAPPING" + }, + "minItems": 1 + }, + "defining_code": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "DV_CODED_TEXT" + } + }, + "additionalProperties": false + }, + "LOCATABLE_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "LOCATABLE_REF" + } + }, + "additionalProperties": false + }, + "PARTY_RELATIONSHIP": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "source", + "target" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "source": { + "$ref": "#/definitions/PARTY_REF" + }, + "target": { + "$ref": "#/definitions/PARTY_REF" + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "PARTY_RELATIONSHIP" + } + }, + "additionalProperties": false + }, + "LIST": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "LIST" + } + } + }, + "EHR_ACCESS": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "settings": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "EHR_ACCESS" + } + }, + "additionalProperties": false + }, + "DV_EHR_URI": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string", + "format": "uri-reference" + }, + "_type": { + "type": "string", + "const": "DV_EHR_URI" + } + }, + "additionalProperties": false + }, + "ARCHETYPE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPE_ID" + } + }, + "additionalProperties": false + }, + "PARTY_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "PARTY_REF" + } + }, + "additionalProperties": false + }, + "TEMPLATE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TEMPLATE_ID" + } + }, + "additionalProperties": false + }, + "ADMIN_ENTRY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ADMIN_ENTRY" + } + }, + "additionalProperties": false + }, + "PARTY_IDENTIFIED": { + "type": "object", + "required": [ + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "name": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "PARTY_IDENTIFIED" + } + }, + "additionalProperties": false + }, + "OPENEHR_CONTENT_ITEM": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "is_primary" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "is_primary": { + "type": "boolean" + }, + "is_changed": { + "type": "boolean" + }, + "is_masked": { + "type": "boolean" + }, + "item": { + "allOf": [ + { + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_PARTY" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_PARTY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_EHR_ACCESS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_EHR_ACCESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_OBJECT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_OBJECT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_OBJECT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "OPENEHR_CONTENT_ITEM" + } + }, + "additionalProperties": false + }, + "COMPOSITION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "territory", + "category", + "composer" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "territory": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "category": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "composer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "context": { + "$ref": "#/definitions/EVENT_CONTEXT" + }, + "content": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "INSTRUCTION", + "EVALUATION", + "OBSERVATION", + "ACTION", + "ADMIN_ENTRY", + "GENERIC_ENTRY", + "SECTION" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "COMPOSITION" + } + }, + "additionalProperties": false + }, + "EHR_STATUS": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "subject", + "is_queryable", + "is_modifiable" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "subject": { + "$ref": "#/definitions/PARTY_SELF" + }, + "is_queryable": { + "type": "boolean" + }, + "is_modifiable": { + "type": "boolean" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EHR_STATUS" + } + }, + "additionalProperties": false + }, + "LINK": { + "type": "object", + "required": [ + "meaning", + "type", + "target" + ], + "properties": { + "meaning": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "type": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "target": { + "$ref": "#/definitions/DV_EHR_URI" + }, + "_type": { + "type": "string", + "const": "LINK" + } + }, + "additionalProperties": false + }, + "TRANSLATION_DETAILS": { + "type": "object", + "required": [ + "language", + "author" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "author": { + "type": "object" + }, + "accreditation": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "TRANSLATION_DETAILS" + } + }, + "additionalProperties": false + }, + "ACCESS_GROUP_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ACCESS_GROUP_REF" + } + }, + "additionalProperties": false + }, + "OBJECT_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "OBJECT_REF" + } + }, + "additionalProperties": false + }, + "GENERIC_ENTRY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "data": { + "$ref": "#/definitions/ITEM_TREE" + }, + "_type": { + "type": "string", + "const": "GENERIC_ENTRY" + } + }, + "additionalProperties": false + }, + "IMPORTED_VERSION": { + "type": "object", + "required": [ + "contribution", + "commit_audit", + "item" + ], + "properties": { + "contribution": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "commit_audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "signature": { + "type": "string" + }, + "item": { + "$ref": "#/definitions/ORIGINAL_VERSION" + }, + "_type": { + "type": "string", + "const": "IMPORTED_VERSION" + } + }, + "additionalProperties": false + }, + "DV_BOOLEAN": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_BOOLEAN" + } + }, + "additionalProperties": false + }, + "DV_URI": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string", + "format": "uri-reference" + }, + "_type": { + "type": "string", + "const": "DV_URI" + } + }, + "additionalProperties": false + }, + "DV_TEXT": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "hyperlink": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "formatting": { + "type": "string" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/definitions/TERM_MAPPING" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "DV_TEXT" + } + }, + "additionalProperties": false + }, + "ACTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "time", + "description", + "ism_transition" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "description": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "ism_transition": { + "$ref": "#/definitions/ISM_TRANSITION" + }, + "instruction_details": { + "$ref": "#/definitions/INSTRUCTION_DETAILS" + }, + "_type": { + "type": "string", + "const": "ACTION" + } + }, + "additionalProperties": false + }, + "EXTRACT_ENTITY_CHAPTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "extract_id_key" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "extract_id_key": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "EXTRACT_ENTITY_CHAPTER" + } + }, + "additionalProperties": false + }, + "HIER_OBJECT_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "HIER_OBJECT_ID" + } + }, + "additionalProperties": false + }, + "SECTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "INSTRUCTION", + "EVALUATION", + "OBSERVATION", + "ACTION", + "ADMIN_ENTRY", + "GENERIC_ENTRY", + "SECTION" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "SECTION" + } + }, + "additionalProperties": false + }, + "ACTIVITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "description", + "action_archetype_id", + "timing" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "description": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "timing": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "action_archetype_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ACTIVITY" + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/components/openehr_api_1.0.4_all.json b/components/openehr_api_1.0.4_all.json new file mode 100644 index 0000000..9b62fd9 --- /dev/null +++ b/components/openehr_api_1.0.4_all.json @@ -0,0 +1,16339 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://specifications.openehr.org/releases/ITS-JSON/latest/components/openehr_api_1.0.4_all.json", + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + } + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTIVITY" + } + } + }, + "then": { + "$ref": "#/definitions/ACTIVITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION_DETAILS" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION_DETAILS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CAPABILITY" + } + } + }, + "then": { + "$ref": "#/definitions/CAPABILITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + } + }, + "then": { + "$ref": "#/definitions/PERSON" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADDRESS" + } + } + }, + "then": { + "$ref": "#/definitions/ADDRESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + } + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + } + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTITY" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HISTORY" + } + } + }, + "then": { + "$ref": "#/definitions/HISTORY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CONTRIBUTION" + } + } + }, + "then": { + "$ref": "#/definitions/CONTRIBUTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR" + } + } + }, + "then": { + "$ref": "#/definitions/EHR" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORIGINAL_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "IMPORTED_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/IMPORTED_VERSION" + } + } + ], + "definitions": { + "VERSION_STATUS": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "VERSION_STATUS" + } + } + }, + "SYNC_EXTRACT_SPEC": { + "type": "object", + "required": [ + "includes_versions" + ], + "properties": { + "includes_versions": { + "type": "boolean" + }, + "contribution_list": { + "type": "array", + "items": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + "contributions_since": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "all_contributions": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT_SPEC" + } + }, + "additionalProperties": false + }, + "AUDIT_DETAILS": { + "type": "object", + "required": [ + "system_id", + "time_committed", + "change_type", + "committer" + ], + "properties": { + "system_id": { + "type": "string" + }, + "time_committed": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "change_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "description": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "committer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "_type": { + "type": "string", + "const": "AUDIT_DETAILS" + } + }, + "additionalProperties": false + }, + "TERMINOLOGY_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TERMINOLOGY_ID" + } + }, + "additionalProperties": false + }, + "EHR": { + "type": "object", + "required": [ + "system_id", + "ehr_id", + "time_created", + "ehr_status" + ], + "properties": { + "system_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "ehr_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "ehr_access": { + "$ref": "#/definitions/EHR_ACCESS" + }, + "ehr_status": { + "$ref": "#/definitions/EHR_STATUS" + }, + "directory": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "compositions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "contributions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EHR" + } + }, + "additionalProperties": false + }, + "DV_TIME": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_TIME" + } + }, + "additionalProperties": false + }, + "EXTRACT_MANIFEST": { + "type": "object", + "required": [ + ], + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EXTRACT_ENTITY_MANIFEST" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "EXTRACT_MANIFEST" + } + }, + "additionalProperties": false + }, + "REVISION_HISTORY_ITEM": { + "type": "object", + "required": [ + "version_id", + "audits" + ], + "properties": { + "version_id": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "audits": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "REVISION_HISTORY_ITEM" + } + }, + "additionalProperties": false + }, + "PARTY_IDENTITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "details" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "PARTY_IDENTITY" + } + }, + "additionalProperties": false + }, + "DV_PARSABLE": { + "type": "object", + "required": [ + "value", + "formalism" + ], + "properties": { + "charset": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "value": { + "type": "string" + }, + "formalism": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_PARSABLE" + } + }, + "additionalProperties": false + }, + "EXTRACT_VERSION_SPEC": { + "type": "object", + "required": [ + "include_all_versions", + "include_revision_history", + "include_data" + ], + "properties": { + "include_all_versions": { + "type": "boolean" + }, + "commit_time_interval": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "include_revision_history": { + "type": "boolean" + }, + "include_data": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "EXTRACT_VERSION_SPEC" + } + }, + "additionalProperties": false + }, + "EXTRACT_PARTICIPATION": { + "type": "object", + "required": [ + "performer", + "function" + ], + "properties": { + "performer": { + "type": "string" + }, + "function": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "mode": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "time": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "EXTRACT_PARTICIPATION" + } + }, + "additionalProperties": false + }, + "DV_COUNT": { + "type": "object", + "required": [ + "magnitude" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + } + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "magnitude": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_COUNT" + } + }, + "additionalProperties": false + }, + "DV_DATE_TIME": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DATE_TIME" + } + }, + "additionalProperties": false + }, + "DV_DURATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DURATION" + } + }, + "additionalProperties": false + }, + "CLUSTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "items" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "CLUSTER", + "ELEMENT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "CLUSTER" + } + }, + "additionalProperties": false + }, + "PARTY_RELATED": { + "type": "object", + "required": [ + "relationship" + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "name": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + }, + "minItems": 1 + }, + "relationship": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "PARTY_RELATED" + } + }, + "additionalProperties": false + }, + "ISO_OID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ISO_OID" + } + }, + "additionalProperties": false + }, + "EXTRACT_FOLDER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_FOLDER" + } + }, + "additionalProperties": false + }, + "INSTRUCTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "narrative" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "narrative": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "expiry_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "wf_definition": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "activities": { + "type": "array", + "items": { + "$ref": "#/definitions/ACTIVITY" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "INSTRUCTION" + } + }, + "additionalProperties": false + }, + "EXTRACT_CHAPTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_CHAPTER" + } + }, + "additionalProperties": false + }, + "PERSON": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "PERSON" + } + }, + "additionalProperties": false + }, + "RESOURCE_DESCRIPTION": { + "type": "object", + "required": [ + "original_author", + "lifecycle_state", + "parent_resource", + "details" + ], + "properties": { + "original_author": { + "type": "object" + }, + "other_contributors": { + "type": "array", + "items": { + "type": "string" + } + }, + "lifecycle_state": { + "type": "string" + }, + "resource_package_uri": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "parent_resource": { + "type": "object" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/RESOURCE_DESCRIPTION_ITEM" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION" + } + }, + "additionalProperties": false + }, + "GENERIC_ID": { + "type": "object", + "required": [ + "value", + "scheme" + ], + "properties": { + "value": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "GENERIC_ID" + } + }, + "additionalProperties": false + }, + "EVALUATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EVALUATION" + } + }, + "additionalProperties": false + }, + "CAPABILITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "credentials" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "credentials": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "CAPABILITY" + } + }, + "additionalProperties": false + }, + "CONTRIBUTION": { + "type": "object", + "required": [ + "uid", + "audit", + "versions" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "versions": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "CONTRIBUTION" + } + }, + "additionalProperties": false + }, + "ARCHETYPED": { + "type": "object", + "required": [ + "archetype_id", + "rm_version" + ], + "properties": { + "archetype_id": { + "$ref": "#/definitions/ARCHETYPE_ID" + }, + "template_id": { + "$ref": "#/definitions/TEMPLATE_ID" + }, + "rm_version": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPED" + } + }, + "additionalProperties": false + }, + "FEEDER_AUDIT_DETAILS": { + "type": "object", + "required": [ + "system_id" + ], + "properties": { + "system_id": { + "type": "string" + }, + "location": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "version_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "FEEDER_AUDIT_DETAILS" + } + }, + "additionalProperties": false + }, + "ORIGINAL_VERSION": { + "type": "object", + "required": [ + "contribution", + "commit_audit", + "uid", + "lifecycle_state" + ], + "properties": { + "contribution": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "commit_audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "signature": { + "type": "string" + }, + "uid": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "preceding_version_uid": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "other_input_version_uids": { + "type": "array", + "items": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "minItems": 1 + }, + "attestations": { + "type": "array", + "items": { + "$ref": "#/definitions/ATTESTATION" + }, + "minItems": 1 + }, + "lifecycle_state": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ORIGINAL_VERSION" + } + }, + "additionalProperties": false + }, + "POINT_EVENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "state": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "POINT_EVENT" + } + }, + "additionalProperties": false + }, + "CODE_PHRASE": { + "type": "object", + "required": [ + "terminology_id", + "code_string" + ], + "properties": { + "terminology_id": { + "$ref": "#/definitions/TERMINOLOGY_ID" + }, + "code_string": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "CODE_PHRASE" + } + }, + "additionalProperties": false + }, + "INSTRUCTION_DETAILS": { + "type": "object", + "required": [ + "instruction_id", + "activity_id" + ], + "properties": { + "instruction_id": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "wf_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "activity_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INSTRUCTION_DETAILS" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_PARTY": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_PARTY" + } + }, + "additionalProperties": false + }, + "EXTRACT_REQUEST": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "extract_spec" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "extract_spec": { + "$ref": "#/definitions/EXTRACT_SPEC" + }, + "update_spec": { + "$ref": "#/definitions/EXTRACT_UPDATE_SPEC" + }, + "_type": { + "type": "string", + "const": "EXTRACT_REQUEST" + } + }, + "additionalProperties": false + }, + "FEEDER_AUDIT": { + "type": "object", + "required": [ + "originating_system_audit" + ], + "properties": { + "originating_system_item_ids": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + "feeder_system_item_ids": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + "original_content": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_PARSABLE", + "DV_MULTIMEDIA" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARSABLE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_MULTIMEDIA" + } + } + }, + "then": { + "$ref": "#/definitions/DV_MULTIMEDIA" + } + } + ] + }, + "originating_system_audit": { + "$ref": "#/definitions/FEEDER_AUDIT_DETAILS" + }, + "feeder_system_audit": { + "$ref": "#/definitions/FEEDER_AUDIT_DETAILS" + }, + "_type": { + "type": "string", + "const": "FEEDER_AUDIT" + } + }, + "additionalProperties": false + }, + "EVENT_CONTEXT": { + "type": "object", + "required": [ + "start_time", + "setting" + ], + "properties": { + "health_care_facility": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "start_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "end_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + }, + "minItems": 1 + }, + "location": { + "type": "string" + }, + "setting": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "other_context": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EVENT_CONTEXT" + } + }, + "additionalProperties": false + }, + "ITEM_SINGLE": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "item" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "item": { + "$ref": "#/definitions/ELEMENT" + }, + "_type": { + "type": "string", + "const": "ITEM_SINGLE" + } + }, + "additionalProperties": false + }, + "SET": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "SET" + } + } + }, + "DV_PROPORTION": { + "type": "object", + "required": [ + "numerator", + "denominator", + "type" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "numerator": { + "type": "number" + }, + "denominator": { + "type": "number" + }, + "type": { + "type": "integer" + }, + "precision": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_PROPORTION" + } + }, + "additionalProperties": false + }, + "DV_QUANTITY": { + "type": "object", + "required": [ + "magnitude", + "units" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + } + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "magnitude": { + "type": "number" + }, + "units": { + "type": "string" + }, + "precision": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_QUANTITY" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_COMPOSITION": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_COMPOSITION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_FOLDER": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_FOLDER" + } + }, + "additionalProperties": false + }, + "DV_ORDINAL": { + "type": "object", + "required": [ + "value", + "symbol" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "value": { + "type": "integer" + }, + "symbol": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "DV_ORDINAL" + } + }, + "additionalProperties": false + }, + "URI": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "URI" + } + } + }, + "SYNC_EXTRACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "specification" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "specification": { + "$ref": "#/definitions/SYNC_EXTRACT_SPEC" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/X_CONTRIBUTION" + } + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT" + } + }, + "additionalProperties": false + }, + "INTERNET_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INTERNET_ID" + } + }, + "additionalProperties": false + }, + "TERMINOLOGY_CODE": { + "type": "object", + "required": [ + "terminology_id", + "code_string", + "uri" + ], + "properties": { + "terminology_id": { + "type": "string" + }, + "terminology_version": { + "type": "string" + }, + "code_string": { + "type": "string" + }, + "uri": { + "$ref": "#/definitions/URI" + }, + "_type": { + "type": "string", + "const": "TERMINOLOGY_CODE" + } + }, + "additionalProperties": false + }, + "ROLE": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities", + "performer" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "performer": { + "$ref": "#/definitions/PARTY_REF" + }, + "capabilities": { + "type": "array", + "items": { + "$ref": "#/definitions/CAPABILITY" + }, + "minItems": 1 + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "ROLE" + } + }, + "additionalProperties": false + }, + "AGENT": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "AGENT" + } + }, + "additionalProperties": false + }, + "MESSAGE": { + "type": "object", + "required": [ + "author", + "audit", + "content" + ], + "properties": { + "author": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "content": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "SYNC_EXTRACT", + "SYNC_EXTRACT_REQUEST" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT_REQUEST" + } + } + ] + }, + "signature": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "MESSAGE" + } + }, + "additionalProperties": false + }, + "GROUP": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "GROUP" + } + }, + "additionalProperties": false + }, + "EXTRACT_ENTITY_MANIFEST": { + "type": "object", + "required": [ + "extract_id_key" + ], + "properties": { + "extract_id_key": { + "type": "string" + }, + "ehr_id": { + "type": "string" + }, + "subject_id": { + "type": "string" + }, + "other_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "item_list": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_ENTITY_MANIFEST" + } + }, + "additionalProperties": false + }, + "INTERVAL": { + "type": "object", + "required": [ + "lower_unbounded", + "upper_unbounded", + "lower_included", + "upper_included" + ], + "properties": { + "lower": { + "type": "object" + }, + "upper": { + "type": "object" + }, + "lower_unbounded": { + "type": "boolean" + }, + "upper_unbounded": { + "type": "boolean" + }, + "lower_included": { + "type": "boolean" + }, + "upper_included": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "INTERVAL" + } + }, + "description": "Type defining an interval of any ordered type.", + "additionalProperties": false + }, + "EXTRACT_ACTION_REQUEST": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "request_id", + "action" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "request_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "action": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "EXTRACT_ACTION_REQUEST" + } + }, + "additionalProperties": false + }, + "PARTY_SELF": { + "type": "object", + "required": [ + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "_type": { + "type": "string", + "const": "PARTY_SELF" + } + }, + "additionalProperties": false + }, + "DV_MULTIMEDIA": { + "type": "object", + "required": [ + "media_type", + "size" + ], + "properties": { + "charset": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "alternate_text": { + "type": "string" + }, + "uri": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "data": { + "type": "string", + "contentEncoding": "base64" + }, + "media_type": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "compression_algorithm": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "integrity_check": { + "type": "string", + "contentEncoding": "base64" + }, + "integrity_check_algorithm": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "thumbnail": { + "$ref": "#/definitions/DV_MULTIMEDIA" + }, + "size": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_MULTIMEDIA" + } + }, + "additionalProperties": false + }, + "X_CONTRIBUTION": { + "type": "object", + "required": [ + "uid", + "audit" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "versions": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "ORIGINAL_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "IMPORTED_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/IMPORTED_VERSION" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "X_CONTRIBUTION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_EHR_ACCESS": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_EHR_ACCESS" + } + }, + "additionalProperties": false + }, + "VERSION_TREE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "VERSION_TREE_ID" + } + }, + "additionalProperties": false + }, + "DV_PARAGRAPH": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "DV_PARAGRAPH" + } + }, + "additionalProperties": false + }, + "REFERENCE_RANGE": { + "type": "object", + "required": [ + "range", + "meaning" + ], + "properties": { + "range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "meaning": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "REFERENCE_RANGE" + } + }, + "additionalProperties": false + }, + "ITEM_TREE": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "CLUSTER", + "ELEMENT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "ITEM_TREE" + } + }, + "additionalProperties": false + }, + "ELEMENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "null_flavour": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "value": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_GENERAL_TIME_SPECIFICATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_GENERAL_TIME_SPECIFICATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PERIODIC_TIME_SPECIFICATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PERIODIC_TIME_SPECIFICATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_ORDINAL" + } + } + }, + "then": { + "$ref": "#/definitions/DV_ORDINAL" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_COUNT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_COUNT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DURATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DURATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PROPORTION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PROPORTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_QUANTITY" + } + } + }, + "then": { + "$ref": "#/definitions/DV_QUANTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TIME" + } + } + }, + "then": { + "$ref": "#/definitions/DV_TIME" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DATE_TIME" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DATE_TIME" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DATE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DATE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARAGRAPH" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARAGRAPH" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_STATE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_STATE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_INTERVAL" + } + } + }, + "then": { + "$ref": "#/definitions/DV_INTERVAL" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARSABLE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_MULTIMEDIA" + } + } + }, + "then": { + "$ref": "#/definitions/DV_MULTIMEDIA" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_IDENTIFIER" + } + } + }, + "then": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_BOOLEAN" + } + } + }, + "then": { + "$ref": "#/definitions/DV_BOOLEAN" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + } + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ELEMENT" + } + }, + "additionalProperties": false + }, + "EXTRACT_SPEC": { + "type": "object", + "required": [ + "extract_type", + "include_multimedia", + "priority", + "link_depth", + "manifest" + ], + "properties": { + "extract_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "include_multimedia": { + "type": "boolean" + }, + "priority": { + "type": "integer" + }, + "link_depth": { + "type": "integer" + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + "manifest": { + "$ref": "#/definitions/EXTRACT_MANIFEST" + }, + "version_spec": { + "$ref": "#/definitions/EXTRACT_VERSION_SPEC" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EXTRACT_SPEC" + } + }, + "additionalProperties": false + }, + "DV_GENERAL_TIME_SPECIFICATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "_type": { + "type": "string", + "const": "DV_GENERAL_TIME_SPECIFICATION" + } + }, + "additionalProperties": false + }, + "DV_DATE": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DATE" + } + }, + "additionalProperties": false + }, + "DV_STATE": { + "type": "object", + "required": [ + "value", + "is_terminal" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "is_terminal": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_STATE" + } + }, + "additionalProperties": false + }, + "ITEM_LIST": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ELEMENT" + } + }, + "_type": { + "type": "string", + "const": "ITEM_LIST" + } + }, + "additionalProperties": false + }, + "DURATION": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DURATION" + } + }, + "description": "Duration type based on IS8601 representation.", + "additionalProperties": false + }, + "HISTORY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "origin" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "origin": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "period": { + "$ref": "#/definitions/DV_DURATION" + }, + "duration": { + "$ref": "#/definitions/DV_DURATION" + }, + "summary": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "events": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "POINT_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/POINT_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INTERVAL_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/INTERVAL_EVENT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "HISTORY" + } + }, + "additionalProperties": false + }, + "DV_PERIODIC_TIME_SPECIFICATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "_type": { + "type": "string", + "const": "DV_PERIODIC_TIME_SPECIFICATION" + } + }, + "additionalProperties": false + }, + "SYNC_EXTRACT_REQUEST": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "specification" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "specification": { + "$ref": "#/definitions/SYNC_EXTRACT_SPEC" + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT_REQUEST" + } + }, + "additionalProperties": false + }, + "RESOURCE_DESCRIPTION_ITEM": { + "type": "object", + "required": [ + "language", + "purpose" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "purpose": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "use": { + "type": "string" + }, + "misuse": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "original_resource_uri": { + "type": "array", + "items": { + "type": "object" + } + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION_ITEM" + } + }, + "additionalProperties": false + }, + "CONTACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/ADDRESS" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "CONTACT" + } + }, + "additionalProperties": false + }, + "ARRAY": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "ARRAY" + } + } + }, + "TERM_MAPPING": { + "type": "object", + "required": [ + "match", + "target" + ], + "properties": { + "match": { + "type": "string" + }, + "purpose": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "target": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "TERM_MAPPING" + } + }, + "additionalProperties": false + }, + "EXTRACT_UPDATE_SPEC": { + "type": "object", + "required": [ + "persist_in_server", + "update_method" + ], + "properties": { + "persist_in_server": { + "type": "boolean" + }, + "trigger_events": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "minItems": 1 + }, + "repeat_period": { + "$ref": "#/definitions/DV_DURATION" + }, + "update_method": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "EXTRACT_UPDATE_SPEC" + } + }, + "additionalProperties": false + }, + "OBSERVATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "$ref": "#/definitions/HISTORY", + "description": "Data of the observation, in the form of a HISTORY of EVENTs." + }, + "state": { + "$ref": "#/definitions/HISTORY" + }, + "_type": { + "type": "string", + "const": "OBSERVATION" + } + }, + "description": "ENTRY subtype used to represent observation information in time, as either a single or multiple samples.", + "additionalProperties": false + }, + "X_VERSIONED_OBJECT": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_OBJECT" + } + }, + "additionalProperties": false + }, + "ADDRESSED_MESSAGE": { + "type": "object", + "required": [ + "sender", + "sender_reference" + ], + "properties": { + "sender": { + "type": "string" + }, + "sender_reference": { + "type": "string" + }, + "addressees": { + "type": "array", + "items": { + "type": "string" + } + }, + "urgency": { + "type": "integer" + }, + "message": { + "$ref": "#/definitions/MESSAGE" + }, + "_type": { + "type": "string", + "const": "ADDRESSED_MESSAGE" + } + }, + "additionalProperties": false + }, + "UUID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "UUID" + } + }, + "additionalProperties": false + }, + "ISM_TRANSITION": { + "type": "object", + "required": [ + "current_state" + ], + "properties": { + "current_state": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "transition": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "careflow_step": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "reason": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "ISM_TRANSITION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_EHR_STATUS": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_EHR_STATUS" + } + }, + "additionalProperties": false + }, + "PARTICIPATION": { + "type": "object", + "required": [ + "function", + "performer" + ], + "properties": { + "function": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "mode": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "performer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "_type": { + "type": "string", + "const": "PARTICIPATION" + } + }, + "additionalProperties": false + }, + "FOLDER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "folders": { + "type": "array", + "items": { + "$ref": "#/definitions/FOLDER" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "FOLDER" + } + }, + "additionalProperties": false + }, + "EXTRACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time_created", + "system_id", + "sequence_nr" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "request_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "system_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "sequence_nr": { + "type": "integer" + }, + "specification": { + "$ref": "#/definitions/EXTRACT_SPEC" + }, + "chapters": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_ENTITY_CHAPTER", + "EXTRACT_CHAPTER" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ENTITY_CHAPTER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EXTRACT_ENTITY_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_CHAPTER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + } + ] + } + }, + "participations": { + "type": "array", + "items": { + "$ref": "#/definitions/EXTRACT_PARTICIPATION" + } + }, + "_type": { + "type": "string", + "const": "EXTRACT" + } + }, + "additionalProperties": false + }, + "VALIDITY_KIND": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "VALIDITY_KIND" + } + } + }, + "OBJECT_VERSION_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "OBJECT_VERSION_ID" + } + }, + "additionalProperties": false + }, + "DV_INTERVAL": { + "type": "object", + "required": [ + "lower_unbounded", + "upper_unbounded", + "lower_included", + "upper_included" + ], + "properties": { + "lower": { + "type": "object" + }, + "upper": { + "type": "object" + }, + "lower_unbounded": { + "type": "boolean" + }, + "upper_unbounded": { + "type": "boolean" + }, + "lower_included": { + "type": "boolean" + }, + "upper_included": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_INTERVAL" + } + }, + "additionalProperties": false + }, + "ORGANISATION": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "ORGANISATION" + } + }, + "additionalProperties": false + }, + "VERSIONED_OBJECT": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "_type": { + "type": "string", + "const": "VERSIONED_OBJECT" + } + }, + "additionalProperties": false + }, + "GENERIC_CONTENT_ITEM": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "is_primary" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "is_primary": { + "type": "boolean" + }, + "is_changed": { + "type": "boolean" + }, + "is_masked": { + "type": "boolean" + }, + "item": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTITY" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_CHAPTER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ENTITY_CHAPTER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_ENTITY_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CAPABILITY" + } + } + }, + "then": { + "$ref": "#/definitions/CAPABILITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + } + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + } + }, + "then": { + "$ref": "#/definitions/PERSON" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + } + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + } + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + } + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ACTION_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_ACTION_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HISTORY" + } + } + }, + "then": { + "$ref": "#/definitions/HISTORY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CONTACT" + } + } + }, + "then": { + "$ref": "#/definitions/CONTACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "POINT_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/POINT_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INTERVAL_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/INTERVAL_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADDRESS" + } + } + }, + "then": { + "$ref": "#/definitions/ADDRESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATIONSHIP" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_ACCESS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_ACCESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + } + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTIVITY" + } + } + }, + "then": { + "$ref": "#/definitions/ACTIVITY" + } + } + ] + }, + "item_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "item_type_version": { + "type": "string" + }, + "author": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "date-time" + }, + "authoriser": { + "type": "string" + }, + "authorisation_time": { + "type": "string", + "format": "date-time" + }, + "item_status": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "version_id": { + "type": "string" + }, + "version_set_id": { + "type": "string" + }, + "system_id": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "GENERIC_CONTENT_ITEM" + } + }, + "additionalProperties": false + }, + "DATE": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DATE" + } + }, + "description": "Date type based on IS8601 representation.", + "additionalProperties": false + }, + "ITEM_TABLE": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/definitions/CLUSTER" + } + }, + "_type": { + "type": "string", + "const": "ITEM_TABLE" + } + }, + "additionalProperties": false + }, + "INTERVAL_EVENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time", + "data", + "width", + "math_function" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "state": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "width": { + "$ref": "#/definitions/DV_DURATION" + }, + "sample_count": { + "type": "integer" + }, + "math_function": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "INTERVAL_EVENT" + } + }, + "additionalProperties": false + }, + "ATTESTATION": { + "type": "object", + "required": [ + "system_id", + "time_committed", + "change_type", + "committer", + "reason", + "is_pending" + ], + "properties": { + "system_id": { + "type": "string" + }, + "time_committed": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "change_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "description": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "committer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "attested_view": { + "$ref": "#/definitions/DV_MULTIMEDIA" + }, + "proof": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + "reason": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "is_pending": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "ATTESTATION" + } + }, + "additionalProperties": false + }, + "ADDRESS": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "details" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ADDRESS" + } + }, + "additionalProperties": false + }, + "REVISION_HISTORY": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/REVISION_HISTORY_ITEM" + } + }, + "_type": { + "type": "string", + "const": "REVISION_HISTORY" + } + }, + "additionalProperties": false + }, + "DV_IDENTIFIER": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "issuer": { + "type": "string" + }, + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "assigner": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_IDENTIFIER" + } + }, + "additionalProperties": false + }, + "DV_CODED_TEXT": { + "type": "object", + "required": [ + "value", + "defining_code" + ], + "properties": { + "value": { + "type": "string" + }, + "hyperlink": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "formatting": { + "type": "string" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/definitions/TERM_MAPPING" + }, + "minItems": 1 + }, + "defining_code": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "DV_CODED_TEXT" + } + }, + "additionalProperties": false + }, + "LOCATABLE_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "LOCATABLE_REF" + } + }, + "additionalProperties": false + }, + "DATE_TIME": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DATE_TIME" + } + }, + "description": "Date Time type based on IS8601 representation.", + "additionalProperties": false + }, + "PARTY_RELATIONSHIP": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "source", + "target" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "source": { + "$ref": "#/definitions/PARTY_REF" + }, + "target": { + "$ref": "#/definitions/PARTY_REF" + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "PARTY_RELATIONSHIP" + } + }, + "additionalProperties": false + }, + "LIST": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "LIST" + } + } + }, + "EHR_ACCESS": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "settings": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "EHR_ACCESS" + } + }, + "additionalProperties": false + }, + "DV_EHR_URI": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string", + "format": "uri-reference" + }, + "_type": { + "type": "string", + "const": "DV_EHR_URI" + } + }, + "additionalProperties": false + }, + "TERMINOLOGY_TERM": { + "type": "object", + "required": [ + "text", + "concept" + ], + "properties": { + "text": { + "type": "string" + }, + "concept": { + "$ref": "#/definitions/TERMINOLOGY_CODE" + }, + "_type": { + "type": "string", + "const": "TERMINOLOGY_TERM" + } + }, + "additionalProperties": false + }, + "ARCHETYPE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPE_ID" + } + }, + "additionalProperties": false + }, + "PARTY_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "PARTY_REF" + } + }, + "additionalProperties": false + }, + "TEMPLATE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TEMPLATE_ID" + } + }, + "additionalProperties": false + }, + "ADMIN_ENTRY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ADMIN_ENTRY" + } + }, + "additionalProperties": false + }, + "PARTY_IDENTIFIED": { + "type": "object", + "required": [ + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "name": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "PARTY_IDENTIFIED" + } + }, + "additionalProperties": false + }, + "OPENEHR_CONTENT_ITEM": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "is_primary" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "is_primary": { + "type": "boolean" + }, + "is_changed": { + "type": "boolean" + }, + "is_masked": { + "type": "boolean" + }, + "item": { + "allOf": [ + { + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_PARTY" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_PARTY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_EHR_ACCESS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_EHR_ACCESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_OBJECT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_OBJECT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_OBJECT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "OPENEHR_CONTENT_ITEM" + } + }, + "additionalProperties": false + }, + "COMPOSITION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "territory", + "category", + "composer" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "territory": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "category": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "composer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "context": { + "$ref": "#/definitions/EVENT_CONTEXT" + }, + "content": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "INSTRUCTION", + "EVALUATION", + "OBSERVATION", + "ACTION", + "ADMIN_ENTRY", + "GENERIC_ENTRY", + "SECTION" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "COMPOSITION" + } + }, + "additionalProperties": false + }, + "EHR_STATUS": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "subject", + "is_queryable", + "is_modifiable" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "subject": { + "$ref": "#/definitions/PARTY_SELF" + }, + "is_queryable": { + "type": "boolean" + }, + "is_modifiable": { + "type": "boolean" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EHR_STATUS" + } + }, + "additionalProperties": false + }, + "LINK": { + "type": "object", + "required": [ + "meaning", + "type", + "target" + ], + "properties": { + "meaning": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "type": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "target": { + "$ref": "#/definitions/DV_EHR_URI" + }, + "_type": { + "type": "string", + "const": "LINK" + } + }, + "additionalProperties": false + }, + "TRANSLATION_DETAILS": { + "type": "object", + "required": [ + "language", + "author" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "author": { + "type": "object" + }, + "accreditation": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "TRANSLATION_DETAILS" + } + }, + "additionalProperties": false + }, + "ACCESS_GROUP_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ACCESS_GROUP_REF" + } + }, + "additionalProperties": false + }, + "OBJECT_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "OBJECT_REF" + } + }, + "additionalProperties": false + }, + "GENERIC_ENTRY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "data": { + "$ref": "#/definitions/ITEM_TREE" + }, + "_type": { + "type": "string", + "const": "GENERIC_ENTRY" + } + }, + "additionalProperties": false + }, + "TIME": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TIME" + } + }, + "description": "Time type based on IS8601 representation.", + "additionalProperties": false + }, + "IMPORTED_VERSION": { + "type": "object", + "required": [ + "contribution", + "commit_audit", + "item" + ], + "properties": { + "contribution": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "commit_audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "signature": { + "type": "string" + }, + "item": { + "$ref": "#/definitions/ORIGINAL_VERSION" + }, + "_type": { + "type": "string", + "const": "IMPORTED_VERSION" + } + }, + "additionalProperties": false + }, + "DV_BOOLEAN": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_BOOLEAN" + } + }, + "additionalProperties": false + }, + "DV_URI": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string", + "format": "uri-reference" + }, + "_type": { + "type": "string", + "const": "DV_URI" + } + }, + "additionalProperties": false + }, + "DV_TEXT": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "hyperlink": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "formatting": { + "type": "string" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/definitions/TERM_MAPPING" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "DV_TEXT" + } + }, + "additionalProperties": false + }, + "ACTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "time", + "description", + "ism_transition" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "description": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "ism_transition": { + "$ref": "#/definitions/ISM_TRANSITION" + }, + "instruction_details": { + "$ref": "#/definitions/INSTRUCTION_DETAILS" + }, + "_type": { + "type": "string", + "const": "ACTION" + } + }, + "additionalProperties": false + }, + "EXTRACT_ENTITY_CHAPTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "extract_id_key" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "extract_id_key": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "EXTRACT_ENTITY_CHAPTER" + } + }, + "additionalProperties": false + }, + "HIER_OBJECT_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "HIER_OBJECT_ID" + } + }, + "additionalProperties": false + }, + "SECTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "INSTRUCTION", + "EVALUATION", + "OBSERVATION", + "ACTION", + "ADMIN_ENTRY", + "GENERIC_ENTRY", + "SECTION" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "SECTION" + } + }, + "additionalProperties": false + }, + "ACTIVITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "description", + "action_archetype_id" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "description": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "timing": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "action_archetype_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ACTIVITY" + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/components/openehr_api_1.1.0_all.json b/components/openehr_api_1.1.0_all.json new file mode 100644 index 0000000..6b8e927 --- /dev/null +++ b/components/openehr_api_1.1.0_all.json @@ -0,0 +1,16737 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://specifications.openehr.org/releases/ITS-JSON/latest/components/openehr_api_1.1.0_all.json", + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + } + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTIVITY" + } + } + }, + "then": { + "$ref": "#/definitions/ACTIVITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION_DETAILS" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION_DETAILS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + { + "if": { + "properties": { + "_type": { + "const": "CAPABILITY" + } + } + }, + "then": { + "$ref": "#/definitions/CAPABILITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + } + }, + "then": { + "$ref": "#/definitions/PERSON" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADDRESS" + } + } + }, + "then": { + "$ref": "#/definitions/ADDRESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + } + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + } + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTITY" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HISTORY" + } + } + }, + "then": { + "$ref": "#/definitions/HISTORY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CONTRIBUTION" + } + } + }, + "then": { + "$ref": "#/definitions/CONTRIBUTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR" + } + } + }, + "then": { + "$ref": "#/definitions/EHR" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORIGINAL_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "IMPORTED_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/IMPORTED_VERSION" + } + } + ], + "definitions": { + "VERSION_STATUS": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "VERSION_STATUS" + } + } + }, + "SYNC_EXTRACT_SPEC": { + "type": "object", + "required": [ + "includes_versions" + ], + "properties": { + "includes_versions": { + "type": "boolean" + }, + "contribution_list": { + "type": "array", + "items": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + "contributions_since": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "all_contributions": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT_SPEC" + } + }, + "additionalProperties": false + }, + "AUDIT_DETAILS": { + "type": "object", + "required": [ + "system_id", + "time_committed", + "change_type", + "committer" + ], + "properties": { + "system_id": { + "type": "string" + }, + "time_committed": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "change_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "description": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "committer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "_type": { + "type": "string", + "const": "AUDIT_DETAILS" + } + }, + "additionalProperties": false + }, + "TERMINOLOGY_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TERMINOLOGY_ID" + } + }, + "additionalProperties": false + }, + "EHR": { + "type": "object", + "required": [ + "system_id", + "ehr_id", + "time_created", + "ehr_status" + ], + "properties": { + "system_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "ehr_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "ehr_access": { + "$ref": "#/definitions/EHR_ACCESS" + }, + "ehr_status": { + "$ref": "#/definitions/EHR_STATUS" + }, + "directory": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "folders": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "compositions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "contributions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EHR" + } + }, + "additionalProperties": false + }, + "DV_TIME": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_TIME" + } + }, + "additionalProperties": false + }, + "EXTRACT_MANIFEST": { + "type": "object", + "required": [ + ], + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EXTRACT_ENTITY_MANIFEST" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "EXTRACT_MANIFEST" + } + }, + "additionalProperties": false + }, + "REVISION_HISTORY_ITEM": { + "type": "object", + "required": [ + "version_id", + "audits" + ], + "properties": { + "version_id": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "audits": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "REVISION_HISTORY_ITEM" + } + }, + "additionalProperties": false + }, + "ARCHETYPE_HRID": { + "type": "object", + "required": [ + "namespace", + "rm_publisher", + "rm_package", + "rm_class", + "concept_id", + "release_version", + "version_status", + "build_count" + ], + "properties": { + "namespace": { + "type": "string" + }, + "rm_publisher": { + "type": "string" + }, + "rm_package": { + "type": "string" + }, + "rm_class": { + "type": "string" + }, + "concept_id": { + "type": "string" + }, + "release_version": { + "type": "string" + }, + "version_status": { + "$ref": "#/definitions/VERSION_STATUS" + }, + "build_count": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPE_HRID" + } + }, + "additionalProperties": false + }, + "PARTY_IDENTITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "details" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "PARTY_IDENTITY" + } + }, + "additionalProperties": false + }, + "DV_PARSABLE": { + "type": "object", + "required": [ + "value", + "formalism" + ], + "properties": { + "charset": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "value": { + "type": "string" + }, + "formalism": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_PARSABLE" + } + }, + "additionalProperties": false + }, + "EXTRACT_VERSION_SPEC": { + "type": "object", + "required": [ + "include_all_versions", + "include_revision_history", + "include_data" + ], + "properties": { + "include_all_versions": { + "type": "boolean" + }, + "commit_time_interval": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "include_revision_history": { + "type": "boolean" + }, + "include_data": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "EXTRACT_VERSION_SPEC" + } + }, + "additionalProperties": false + }, + "EXTRACT_PARTICIPATION": { + "type": "object", + "required": [ + "performer", + "function" + ], + "properties": { + "performer": { + "type": "string" + }, + "function": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "mode": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "time": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "EXTRACT_PARTICIPATION" + } + }, + "additionalProperties": false + }, + "DV_COUNT": { + "type": "object", + "required": [ + "magnitude" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + } + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "magnitude": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_COUNT" + } + }, + "additionalProperties": false + }, + "DV_DATE_TIME": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DATE_TIME" + } + }, + "additionalProperties": false + }, + "DV_DURATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DURATION" + } + }, + "additionalProperties": false + }, + "CLUSTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "items" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "CLUSTER", + "ELEMENT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "CLUSTER" + } + }, + "additionalProperties": false + }, + "PARTY_RELATED": { + "type": "object", + "required": [ + "relationship" + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "name": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + }, + "minItems": 1 + }, + "relationship": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "PARTY_RELATED" + } + }, + "additionalProperties": false + }, + "ISO_OID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ISO_OID" + } + }, + "additionalProperties": false + }, + "EXTRACT_FOLDER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_FOLDER" + } + }, + "additionalProperties": false + }, + "INSTRUCTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "narrative" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "narrative": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "expiry_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "wf_definition": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "activities": { + "type": "array", + "items": { + "$ref": "#/definitions/ACTIVITY" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "INSTRUCTION" + } + }, + "additionalProperties": false + }, + "EXTRACT_CHAPTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_CHAPTER" + } + }, + "additionalProperties": false + }, + "PERSON": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "PERSON" + } + }, + "additionalProperties": false + }, + "RESOURCE_DESCRIPTION": { + "type": "object", + "required": [ + "original_author", + "lifecycle_state", + "parent_resource", + "details" + ], + "properties": { + "original_author": { + "type": "object" + }, + "other_contributors": { + "type": "array", + "items": { + "type": "string" + } + }, + "lifecycle_state": { + "type": "string" + }, + "resource_package_uri": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "parent_resource": { + "type": "object" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/RESOURCE_DESCRIPTION_ITEM" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION" + } + }, + "additionalProperties": false + }, + "GENERIC_ID": { + "type": "object", + "required": [ + "value", + "scheme" + ], + "properties": { + "value": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "GENERIC_ID" + } + }, + "additionalProperties": false + }, + "EVALUATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EVALUATION" + } + }, + "additionalProperties": false + }, + "CAPABILITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "credentials" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "credentials": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "CAPABILITY" + } + }, + "additionalProperties": false + }, + "CONTRIBUTION": { + "type": "object", + "required": [ + "uid", + "audit", + "versions" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "versions": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "CONTRIBUTION" + } + }, + "additionalProperties": false + }, + "ARCHETYPED": { + "type": "object", + "required": [ + "archetype_id", + "rm_version" + ], + "properties": { + "archetype_id": { + "$ref": "#/definitions/ARCHETYPE_ID" + }, + "template_id": { + "$ref": "#/definitions/TEMPLATE_ID" + }, + "rm_version": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPED" + } + }, + "additionalProperties": false + }, + "FEEDER_AUDIT_DETAILS": { + "type": "object", + "required": [ + "system_id" + ], + "properties": { + "system_id": { + "type": "string" + }, + "location": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "version_id": { + "type": "string" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "FEEDER_AUDIT_DETAILS" + } + }, + "additionalProperties": false + }, + "ORIGINAL_VERSION": { + "type": "object", + "required": [ + "contribution", + "commit_audit", + "uid", + "lifecycle_state" + ], + "properties": { + "contribution": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "commit_audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "signature": { + "type": "string" + }, + "uid": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "preceding_version_uid": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "other_input_version_uids": { + "type": "array", + "items": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "minItems": 1 + }, + "attestations": { + "type": "array", + "items": { + "$ref": "#/definitions/ATTESTATION" + }, + "minItems": 1 + }, + "lifecycle_state": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ORIGINAL_VERSION" + } + }, + "additionalProperties": false + }, + "POINT_EVENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "state": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "POINT_EVENT" + } + }, + "additionalProperties": false + }, + "CODE_PHRASE": { + "type": "object", + "required": [ + "terminology_id", + "code_string" + ], + "properties": { + "terminology_id": { + "$ref": "#/definitions/TERMINOLOGY_ID" + }, + "code_string": { + "type": "string" + }, + "preferred_term": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "CODE_PHRASE" + } + }, + "additionalProperties": false + }, + "INSTRUCTION_DETAILS": { + "type": "object", + "required": [ + "instruction_id", + "activity_id" + ], + "properties": { + "instruction_id": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "wf_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "activity_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INSTRUCTION_DETAILS" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_PARTY": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_PARTY" + } + }, + "additionalProperties": false + }, + "EXTRACT_REQUEST": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "extract_spec" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "extract_spec": { + "$ref": "#/definitions/EXTRACT_SPEC" + }, + "update_spec": { + "$ref": "#/definitions/EXTRACT_UPDATE_SPEC" + }, + "_type": { + "type": "string", + "const": "EXTRACT_REQUEST" + } + }, + "additionalProperties": false + }, + "FEEDER_AUDIT": { + "type": "object", + "required": [ + "originating_system_audit" + ], + "properties": { + "originating_system_item_ids": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + "feeder_system_item_ids": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + "original_content": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_PARSABLE", + "DV_MULTIMEDIA" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARSABLE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_MULTIMEDIA" + } + } + }, + "then": { + "$ref": "#/definitions/DV_MULTIMEDIA" + } + } + ] + }, + "originating_system_audit": { + "$ref": "#/definitions/FEEDER_AUDIT_DETAILS" + }, + "feeder_system_audit": { + "$ref": "#/definitions/FEEDER_AUDIT_DETAILS" + }, + "_type": { + "type": "string", + "const": "FEEDER_AUDIT" + } + }, + "additionalProperties": false + }, + "EVENT_CONTEXT": { + "type": "object", + "required": [ + "start_time", + "setting" + ], + "properties": { + "health_care_facility": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "start_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "end_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + }, + "minItems": 1 + }, + "location": { + "type": "string" + }, + "setting": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "other_context": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EVENT_CONTEXT" + } + }, + "additionalProperties": false + }, + "ITEM_SINGLE": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "item" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "item": { + "$ref": "#/definitions/ELEMENT" + }, + "_type": { + "type": "string", + "const": "ITEM_SINGLE" + } + }, + "additionalProperties": false + }, + "SET": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "SET" + } + } + }, + "DV_PROPORTION": { + "type": "object", + "required": [ + "numerator", + "denominator", + "type" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "numerator": { + "type": "number" + }, + "denominator": { + "type": "number" + }, + "type": { + "type": "integer" + }, + "precision": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_PROPORTION" + } + }, + "additionalProperties": false + }, + "DV_QUANTITY": { + "type": "object", + "required": [ + "magnitude", + "units" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + } + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "magnitude": { + "type": "number" + }, + "units": { + "type": "string" + }, + "units_system": { + "type": "string" + }, + "units_display_name": { + "type": "string" + }, + "precision": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_QUANTITY" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_COMPOSITION": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_COMPOSITION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_FOLDER": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_FOLDER" + } + }, + "additionalProperties": false + }, + "DV_ORDINAL": { + "type": "object", + "required": [ + "value", + "symbol" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "value": { + "type": "integer" + }, + "symbol": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "DV_ORDINAL" + } + }, + "additionalProperties": false + }, + "URI": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "URI" + } + } + }, + "SYNC_EXTRACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "specification" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "specification": { + "$ref": "#/definitions/SYNC_EXTRACT_SPEC" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/X_CONTRIBUTION" + } + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT" + } + }, + "additionalProperties": false + }, + "INTERNET_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INTERNET_ID" + } + }, + "additionalProperties": false + }, + "TERMINOLOGY_CODE": { + "type": "object", + "required": [ + "terminology_id", + "code_string", + "uri" + ], + "properties": { + "terminology_id": { + "type": "string" + }, + "terminology_version": { + "type": "string" + }, + "code_string": { + "type": "string" + }, + "uri": { + "$ref": "#/definitions/URI" + }, + "_type": { + "type": "string", + "const": "TERMINOLOGY_CODE" + } + }, + "additionalProperties": false + }, + "ROLE": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities", + "performer" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "performer": { + "$ref": "#/definitions/PARTY_REF" + }, + "capabilities": { + "type": "array", + "items": { + "$ref": "#/definitions/CAPABILITY" + }, + "minItems": 1 + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "ROLE" + } + }, + "additionalProperties": false + }, + "AGENT": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "AGENT" + } + }, + "additionalProperties": false + }, + "MESSAGE": { + "type": "object", + "required": [ + "author", + "audit", + "content" + ], + "properties": { + "author": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "content": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "SYNC_EXTRACT", + "SYNC_EXTRACT_REQUEST" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT_REQUEST" + } + } + ] + }, + "signature": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "MESSAGE" + } + }, + "additionalProperties": false + }, + "GROUP": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "GROUP" + } + }, + "additionalProperties": false + }, + "EXTRACT_ENTITY_MANIFEST": { + "type": "object", + "required": [ + "extract_id_key" + ], + "properties": { + "extract_id_key": { + "type": "string" + }, + "ehr_id": { + "type": "string" + }, + "subject_id": { + "type": "string" + }, + "other_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "item_list": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_ENTITY_MANIFEST" + } + }, + "additionalProperties": false + }, + "INTERVAL": { + "type": "object", + "required": [ + "lower_unbounded", + "upper_unbounded", + "lower_included", + "upper_included" + ], + "properties": { + "lower": { + "type": "object" + }, + "upper": { + "type": "object" + }, + "lower_unbounded": { + "type": "boolean" + }, + "upper_unbounded": { + "type": "boolean" + }, + "lower_included": { + "type": "boolean" + }, + "upper_included": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "INTERVAL" + } + }, + "description": "Type defining an interval of any ordered type.", + "additionalProperties": false + }, + "EXTRACT_ACTION_REQUEST": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "request_id", + "action" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "request_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "action": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "EXTRACT_ACTION_REQUEST" + } + }, + "additionalProperties": false + }, + "PARTY_SELF": { + "type": "object", + "required": [ + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "_type": { + "type": "string", + "const": "PARTY_SELF" + } + }, + "additionalProperties": false + }, + "DV_MULTIMEDIA": { + "type": "object", + "required": [ + "media_type", + "size" + ], + "properties": { + "charset": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "alternate_text": { + "type": "string" + }, + "uri": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "data": { + "type": "string", + "contentEncoding": "base64" + }, + "media_type": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "compression_algorithm": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "integrity_check": { + "type": "string", + "contentEncoding": "base64" + }, + "integrity_check_algorithm": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "thumbnail": { + "$ref": "#/definitions/DV_MULTIMEDIA" + }, + "size": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_MULTIMEDIA" + } + }, + "additionalProperties": false + }, + "X_CONTRIBUTION": { + "type": "object", + "required": [ + "uid", + "audit" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "versions": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "ORIGINAL_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "IMPORTED_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/IMPORTED_VERSION" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "X_CONTRIBUTION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_EHR_ACCESS": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_EHR_ACCESS" + } + }, + "additionalProperties": false + }, + "VERSION_TREE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "VERSION_TREE_ID" + } + }, + "additionalProperties": false + }, + "DV_PARAGRAPH": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "DV_PARAGRAPH" + } + }, + "additionalProperties": false + }, + "REFERENCE_RANGE": { + "type": "object", + "required": [ + "range", + "meaning" + ], + "properties": { + "range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "meaning": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "REFERENCE_RANGE" + } + }, + "additionalProperties": false + }, + "ITEM_TREE": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "CLUSTER", + "ELEMENT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "ITEM_TREE" + } + }, + "additionalProperties": false + }, + "ELEMENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "null_flavour": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "value": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_GENERAL_TIME_SPECIFICATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_GENERAL_TIME_SPECIFICATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PERIODIC_TIME_SPECIFICATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PERIODIC_TIME_SPECIFICATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_ORDINAL" + } + } + }, + "then": { + "$ref": "#/definitions/DV_ORDINAL" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_SCALE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_SCALE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_COUNT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_COUNT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DURATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DURATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PROPORTION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PROPORTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_QUANTITY" + } + } + }, + "then": { + "$ref": "#/definitions/DV_QUANTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TIME" + } + } + }, + "then": { + "$ref": "#/definitions/DV_TIME" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DATE_TIME" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DATE_TIME" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DATE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DATE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARAGRAPH" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARAGRAPH" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_STATE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_STATE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_INTERVAL" + } + } + }, + "then": { + "$ref": "#/definitions/DV_INTERVAL" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARSABLE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_MULTIMEDIA" + } + } + }, + "then": { + "$ref": "#/definitions/DV_MULTIMEDIA" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_IDENTIFIER" + } + } + }, + "then": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_BOOLEAN" + } + } + }, + "then": { + "$ref": "#/definitions/DV_BOOLEAN" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + } + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + } + ] + }, + "null_reason": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ELEMENT" + } + }, + "additionalProperties": false + }, + "EXTRACT_SPEC": { + "type": "object", + "required": [ + "extract_type", + "include_multimedia", + "priority", + "link_depth", + "manifest" + ], + "properties": { + "extract_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "include_multimedia": { + "type": "boolean" + }, + "priority": { + "type": "integer" + }, + "link_depth": { + "type": "integer" + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + "manifest": { + "$ref": "#/definitions/EXTRACT_MANIFEST" + }, + "version_spec": { + "$ref": "#/definitions/EXTRACT_VERSION_SPEC" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EXTRACT_SPEC" + } + }, + "additionalProperties": false + }, + "DV_GENERAL_TIME_SPECIFICATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "_type": { + "type": "string", + "const": "DV_GENERAL_TIME_SPECIFICATION" + } + }, + "additionalProperties": false + }, + "DV_DATE": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DATE" + } + }, + "additionalProperties": false + }, + "DV_STATE": { + "type": "object", + "required": [ + "value", + "is_terminal" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "is_terminal": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_STATE" + } + }, + "additionalProperties": false + }, + "ITEM_LIST": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ELEMENT" + } + }, + "_type": { + "type": "string", + "const": "ITEM_LIST" + } + }, + "additionalProperties": false + }, + "DURATION": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DURATION" + } + }, + "description": "Duration type based on IS8601 representation.", + "additionalProperties": false + }, + "HISTORY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "origin" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "origin": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "period": { + "$ref": "#/definitions/DV_DURATION" + }, + "duration": { + "$ref": "#/definitions/DV_DURATION" + }, + "summary": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "events": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "POINT_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/POINT_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INTERVAL_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/INTERVAL_EVENT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "HISTORY" + } + }, + "additionalProperties": false + }, + "DV_PERIODIC_TIME_SPECIFICATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "_type": { + "type": "string", + "const": "DV_PERIODIC_TIME_SPECIFICATION" + } + }, + "additionalProperties": false + }, + "SYNC_EXTRACT_REQUEST": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "specification" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "specification": { + "$ref": "#/definitions/SYNC_EXTRACT_SPEC" + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT_REQUEST" + } + }, + "additionalProperties": false + }, + "RESOURCE_DESCRIPTION_ITEM": { + "type": "object", + "required": [ + "language", + "purpose" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "purpose": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "use": { + "type": "string" + }, + "misuse": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "original_resource_uri": { + "type": "array", + "items": { + "type": "object" + } + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION_ITEM" + } + }, + "additionalProperties": false + }, + "CONTACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/ADDRESS" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "CONTACT" + } + }, + "additionalProperties": false + }, + "ARRAY": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "ARRAY" + } + } + }, + "TERM_MAPPING": { + "type": "object", + "required": [ + "match", + "target" + ], + "properties": { + "match": { + "type": "string" + }, + "purpose": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "target": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "TERM_MAPPING" + } + }, + "additionalProperties": false + }, + "EXTRACT_UPDATE_SPEC": { + "type": "object", + "required": [ + "persist_in_server", + "update_method" + ], + "properties": { + "persist_in_server": { + "type": "boolean" + }, + "trigger_events": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "minItems": 1 + }, + "repeat_period": { + "$ref": "#/definitions/DV_DURATION" + }, + "update_method": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "EXTRACT_UPDATE_SPEC" + } + }, + "additionalProperties": false + }, + "OBSERVATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "$ref": "#/definitions/HISTORY", + "description": "Data of the observation, in the form of a HISTORY of EVENTs." + }, + "state": { + "$ref": "#/definitions/HISTORY" + }, + "_type": { + "type": "string", + "const": "OBSERVATION" + } + }, + "description": "ENTRY subtype used to represent observation information in time, as either a single or multiple samples.", + "additionalProperties": false + }, + "X_VERSIONED_OBJECT": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_OBJECT" + } + }, + "additionalProperties": false + }, + "ADDRESSED_MESSAGE": { + "type": "object", + "required": [ + "sender", + "sender_reference" + ], + "properties": { + "sender": { + "type": "string" + }, + "sender_reference": { + "type": "string" + }, + "addressees": { + "type": "array", + "items": { + "type": "string" + } + }, + "urgency": { + "type": "integer" + }, + "message": { + "$ref": "#/definitions/MESSAGE" + }, + "_type": { + "type": "string", + "const": "ADDRESSED_MESSAGE" + } + }, + "additionalProperties": false + }, + "UUID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "UUID" + } + }, + "additionalProperties": false + }, + "ISM_TRANSITION": { + "type": "object", + "required": [ + "current_state" + ], + "properties": { + "current_state": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "transition": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "careflow_step": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "reason": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "ISM_TRANSITION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_EHR_STATUS": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_EHR_STATUS" + } + }, + "additionalProperties": false + }, + "PARTICIPATION": { + "type": "object", + "required": [ + "function", + "performer" + ], + "properties": { + "function": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "mode": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "performer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "_type": { + "type": "string", + "const": "PARTICIPATION" + } + }, + "additionalProperties": false + }, + "FOLDER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "folders": { + "type": "array", + "items": { + "$ref": "#/definitions/FOLDER" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "FOLDER" + } + }, + "additionalProperties": false + }, + "EXTRACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time_created", + "system_id", + "sequence_nr" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "request_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "system_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "sequence_nr": { + "type": "integer" + }, + "specification": { + "$ref": "#/definitions/EXTRACT_SPEC" + }, + "chapters": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_ENTITY_CHAPTER", + "EXTRACT_CHAPTER" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ENTITY_CHAPTER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EXTRACT_ENTITY_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_CHAPTER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + } + ] + } + }, + "participations": { + "type": "array", + "items": { + "$ref": "#/definitions/EXTRACT_PARTICIPATION" + } + }, + "_type": { + "type": "string", + "const": "EXTRACT" + } + }, + "additionalProperties": false + }, + "VALIDITY_KIND": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "VALIDITY_KIND" + } + } + }, + "OBJECT_VERSION_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "OBJECT_VERSION_ID" + } + }, + "additionalProperties": false + }, + "DV_INTERVAL": { + "type": "object", + "required": [ + "lower_unbounded", + "upper_unbounded", + "lower_included", + "upper_included" + ], + "properties": { + "lower": { + "type": "object" + }, + "upper": { + "type": "object" + }, + "lower_unbounded": { + "type": "boolean" + }, + "upper_unbounded": { + "type": "boolean" + }, + "lower_included": { + "type": "boolean" + }, + "upper_included": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_INTERVAL" + } + }, + "additionalProperties": false + }, + "ORGANISATION": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "ORGANISATION" + } + }, + "additionalProperties": false + }, + "VERSIONED_OBJECT": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "_type": { + "type": "string", + "const": "VERSIONED_OBJECT" + } + }, + "additionalProperties": false + }, + "GENERIC_CONTENT_ITEM": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "is_primary" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "is_primary": { + "type": "boolean" + }, + "is_changed": { + "type": "boolean" + }, + "is_masked": { + "type": "boolean" + }, + "item": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTITY" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_CHAPTER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ENTITY_CHAPTER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_ENTITY_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CAPABILITY" + } + } + }, + "then": { + "$ref": "#/definitions/CAPABILITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + } + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + } + }, + "then": { + "$ref": "#/definitions/PERSON" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + } + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + } + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + } + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ACTION_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_ACTION_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HISTORY" + } + } + }, + "then": { + "$ref": "#/definitions/HISTORY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CONTACT" + } + } + }, + "then": { + "$ref": "#/definitions/CONTACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "POINT_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/POINT_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INTERVAL_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/INTERVAL_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADDRESS" + } + } + }, + "then": { + "$ref": "#/definitions/ADDRESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATIONSHIP" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_ACCESS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_ACCESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + } + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTIVITY" + } + } + }, + "then": { + "$ref": "#/definitions/ACTIVITY" + } + } + ] + }, + "item_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "item_type_version": { + "type": "string" + }, + "author": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "date-time" + }, + "authoriser": { + "type": "string" + }, + "authorisation_time": { + "type": "string", + "format": "date-time" + }, + "item_status": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "version_id": { + "type": "string" + }, + "version_set_id": { + "type": "string" + }, + "system_id": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "GENERIC_CONTENT_ITEM" + } + }, + "additionalProperties": false + }, + "DATE": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DATE" + } + }, + "description": "Date type based on IS8601 representation.", + "additionalProperties": false + }, + "ITEM_TABLE": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/definitions/CLUSTER" + } + }, + "_type": { + "type": "string", + "const": "ITEM_TABLE" + } + }, + "additionalProperties": false + }, + "INTERVAL_EVENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time", + "data", + "width", + "math_function" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "state": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "width": { + "$ref": "#/definitions/DV_DURATION" + }, + "sample_count": { + "type": "integer" + }, + "math_function": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "INTERVAL_EVENT" + } + }, + "additionalProperties": false + }, + "ATTESTATION": { + "type": "object", + "required": [ + "system_id", + "time_committed", + "change_type", + "committer", + "reason", + "is_pending" + ], + "properties": { + "system_id": { + "type": "string" + }, + "time_committed": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "change_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "description": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "committer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "attested_view": { + "$ref": "#/definitions/DV_MULTIMEDIA" + }, + "proof": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + "reason": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "is_pending": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "ATTESTATION" + } + }, + "additionalProperties": false + }, + "ADDRESS": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "details" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ADDRESS" + } + }, + "additionalProperties": false + }, + "REVISION_HISTORY": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/REVISION_HISTORY_ITEM" + } + }, + "_type": { + "type": "string", + "const": "REVISION_HISTORY" + } + }, + "additionalProperties": false + }, + "DV_IDENTIFIER": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "issuer": { + "type": "string" + }, + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "assigner": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_IDENTIFIER" + } + }, + "additionalProperties": false + }, + "DV_CODED_TEXT": { + "type": "object", + "required": [ + "value", + "defining_code" + ], + "properties": { + "value": { + "type": "string" + }, + "hyperlink": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "formatting": { + "type": "string" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/definitions/TERM_MAPPING" + }, + "minItems": 1 + }, + "defining_code": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "DV_CODED_TEXT" + } + }, + "additionalProperties": false + }, + "LOCATABLE_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "LOCATABLE_REF" + } + }, + "additionalProperties": false + }, + "DATE_TIME": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DATE_TIME" + } + }, + "description": "Date Time type based on IS8601 representation.", + "additionalProperties": false + }, + "PARTY_RELATIONSHIP": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "source", + "target" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "source": { + "$ref": "#/definitions/PARTY_REF" + }, + "target": { + "$ref": "#/definitions/PARTY_REF" + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "PARTY_RELATIONSHIP" + } + }, + "additionalProperties": false + }, + "LIST": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "LIST" + } + } + }, + "EHR_ACCESS": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "settings": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "EHR_ACCESS" + } + }, + "additionalProperties": false + }, + "DV_EHR_URI": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string", + "format": "uri-reference" + }, + "_type": { + "type": "string", + "const": "DV_EHR_URI" + } + }, + "additionalProperties": false + }, + "TERMINOLOGY_TERM": { + "type": "object", + "required": [ + "text", + "concept" + ], + "properties": { + "text": { + "type": "string" + }, + "concept": { + "$ref": "#/definitions/TERMINOLOGY_CODE" + }, + "_type": { + "type": "string", + "const": "TERMINOLOGY_TERM" + } + }, + "additionalProperties": false + }, + "DV_SCALE": { + "type": "object", + "required": [ + "value", + "symbol" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "value": { + "type": "number" + }, + "symbol": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "DV_SCALE" + } + }, + "additionalProperties": false + }, + "ARCHETYPE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPE_ID" + } + }, + "additionalProperties": false + }, + "PARTY_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "PARTY_REF" + } + }, + "additionalProperties": false + }, + "TEMPLATE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TEMPLATE_ID" + } + }, + "additionalProperties": false + }, + "ADMIN_ENTRY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ADMIN_ENTRY" + } + }, + "additionalProperties": false + }, + "PARTY_IDENTIFIED": { + "type": "object", + "required": [ + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "name": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "PARTY_IDENTIFIED" + } + }, + "additionalProperties": false + }, + "OPENEHR_CONTENT_ITEM": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "is_primary" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "is_primary": { + "type": "boolean" + }, + "is_changed": { + "type": "boolean" + }, + "is_masked": { + "type": "boolean" + }, + "item": { + "allOf": [ + { + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_PARTY" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_PARTY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_EHR_ACCESS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_EHR_ACCESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_OBJECT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_OBJECT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_OBJECT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "OPENEHR_CONTENT_ITEM" + } + }, + "additionalProperties": false + }, + "COMPOSITION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "territory", + "category", + "composer" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "territory": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "category": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "composer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "context": { + "$ref": "#/definitions/EVENT_CONTEXT" + }, + "content": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "INSTRUCTION", + "EVALUATION", + "OBSERVATION", + "ACTION", + "ADMIN_ENTRY", + "GENERIC_ENTRY", + "SECTION" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "COMPOSITION" + } + }, + "additionalProperties": false + }, + "EHR_STATUS": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "subject", + "is_queryable", + "is_modifiable" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "subject": { + "$ref": "#/definitions/PARTY_SELF" + }, + "is_queryable": { + "type": "boolean" + }, + "is_modifiable": { + "type": "boolean" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EHR_STATUS" + } + }, + "additionalProperties": false + }, + "LINK": { + "type": "object", + "required": [ + "meaning", + "type", + "target" + ], + "properties": { + "meaning": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "type": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "target": { + "$ref": "#/definitions/DV_EHR_URI" + }, + "_type": { + "type": "string", + "const": "LINK" + } + }, + "additionalProperties": false + }, + "TRANSLATION_DETAILS": { + "type": "object", + "required": [ + "language", + "author" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "author": { + "type": "object" + }, + "accreditation": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "TRANSLATION_DETAILS" + } + }, + "additionalProperties": false + }, + "ACCESS_GROUP_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ACCESS_GROUP_REF" + } + }, + "additionalProperties": false + }, + "OBJECT_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "OBJECT_REF" + } + }, + "additionalProperties": false + }, + "GENERIC_ENTRY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "data": { + "$ref": "#/definitions/ITEM_TREE" + }, + "_type": { + "type": "string", + "const": "GENERIC_ENTRY" + } + }, + "additionalProperties": false + }, + "TIME": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TIME" + } + }, + "description": "Time type based on IS8601 representation.", + "additionalProperties": false + }, + "IMPORTED_VERSION": { + "type": "object", + "required": [ + "contribution", + "commit_audit", + "item" + ], + "properties": { + "contribution": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "commit_audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "signature": { + "type": "string" + }, + "item": { + "$ref": "#/definitions/ORIGINAL_VERSION" + }, + "_type": { + "type": "string", + "const": "IMPORTED_VERSION" + } + }, + "additionalProperties": false + }, + "DV_BOOLEAN": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_BOOLEAN" + } + }, + "additionalProperties": false + }, + "DV_URI": { + "type": "object", + "required": [ + ], + "properties": { + "value": { + "type": "string", + "format": "uri-reference" + }, + "_type": { + "type": "string", + "const": "DV_URI" + } + }, + "additionalProperties": false + }, + "DV_TEXT": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "hyperlink": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "formatting": { + "type": "string" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/definitions/TERM_MAPPING" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "DV_TEXT" + } + }, + "additionalProperties": false + }, + "ACTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "time", + "description", + "ism_transition" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "description": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "ism_transition": { + "$ref": "#/definitions/ISM_TRANSITION" + }, + "instruction_details": { + "$ref": "#/definitions/INSTRUCTION_DETAILS" + }, + "_type": { + "type": "string", + "const": "ACTION" + } + }, + "additionalProperties": false + }, + "EXTRACT_ENTITY_CHAPTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "extract_id_key" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "extract_id_key": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "EXTRACT_ENTITY_CHAPTER" + } + }, + "additionalProperties": false + }, + "HIER_OBJECT_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "HIER_OBJECT_ID" + } + }, + "additionalProperties": false + }, + "SECTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "INSTRUCTION", + "EVALUATION", + "OBSERVATION", + "ACTION", + "ADMIN_ENTRY", + "GENERIC_ENTRY", + "SECTION" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "SECTION" + } + }, + "additionalProperties": false + }, + "ACTIVITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "description", + "action_archetype_id" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "description": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "timing": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "action_archetype_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ACTIVITY" + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/components/openehr_rm_1.0.2_all.json b/components/openehr_rm_1.0.2_all.json new file mode 100644 index 0000000..fb76c1f --- /dev/null +++ b/components/openehr_rm_1.0.2_all.json @@ -0,0 +1,16204 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "https://specifications.openehr.org/releases/ITS-JSON/latest/components/openehr_rm_1.0.2_all.json", + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + } + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTIVITY" + } + } + }, + "then": { + "$ref": "#/definitions/ACTIVITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION_DETAILS" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION_DETAILS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + } + }, + "then": { + "$ref": "#/definitions/PERSON" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + } + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + } + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + } + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + } + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HISTORY" + } + } + }, + "then": { + "$ref": "#/definitions/HISTORY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CONTRIBUTION" + } + } + }, + "then": { + "$ref": "#/definitions/CONTRIBUTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR" + } + } + }, + "then": { + "$ref": "#/definitions/EHR" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORIGINAL_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "IMPORTED_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/IMPORTED_VERSION" + } + } + ], + "definitions": { + "SYNC_EXTRACT_SPEC": { + "type": "object", + "required": [ + "includes_versions" + ], + "properties": { + "includes_versions": { + "type": "boolean" + }, + "contribution_list": { + "type": "array", + "items": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + "contributions_since": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "all_contributions": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT_SPEC" + } + }, + "additionalProperties": false + }, + "AUDIT_DETAILS": { + "type": "object", + "required": [ + "system_id", + "time_committed", + "change_type", + "committer" + ], + "properties": { + "system_id": { + "type": "string" + }, + "time_committed": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "change_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "description": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "committer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "_type": { + "type": "string", + "const": "AUDIT_DETAILS" + } + }, + "additionalProperties": false + }, + "TERMINOLOGY_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TERMINOLOGY_ID" + } + }, + "additionalProperties": false + }, + "EHR": { + "type": "object", + "required": [ + "system_id", + "ehr_id", + "time_created", + "ehr_access", + "ehr_status" + ], + "properties": { + "system_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "ehr_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "ehr_access": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "ehr_status": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "directory": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "compositions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "contributions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EHR" + } + }, + "additionalProperties": false + }, + "DV_TIME": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_TIME" + } + }, + "additionalProperties": false + }, + "EXTRACT_MANIFEST": { + "type": "object", + "required": [ + ], + "properties": { + "entities": { + "type": "array", + "items": { + "$ref": "#/definitions/EXTRACT_ENTITY_MANIFEST" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "EXTRACT_MANIFEST" + } + }, + "additionalProperties": false + }, + "REVISION_HISTORY_ITEM": { + "type": "object", + "required": [ + "version_id", + "audits" + ], + "properties": { + "version_id": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "audits": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "REVISION_HISTORY_ITEM" + } + }, + "additionalProperties": false + }, + "PARTY_IDENTITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "details" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "PARTY_IDENTITY" + } + }, + "additionalProperties": false + }, + "DV_PARSABLE": { + "type": "object", + "required": [ + "value", + "formalism" + ], + "properties": { + "charset": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "value": { + "type": "string" + }, + "formalism": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_PARSABLE" + } + }, + "additionalProperties": false + }, + "EXTRACT_VERSION_SPEC": { + "type": "object", + "required": [ + "include_all_versions", + "include_revision_history", + "include_data" + ], + "properties": { + "include_all_versions": { + "type": "boolean" + }, + "commit_time_interval": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "include_revision_history": { + "type": "boolean" + }, + "include_data": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "EXTRACT_VERSION_SPEC" + } + }, + "additionalProperties": false + }, + "EXTRACT_PARTICIPATION": { + "type": "object", + "required": [ + "performer", + "function" + ], + "properties": { + "performer": { + "type": "string" + }, + "function": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "mode": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "time": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "EXTRACT_PARTICIPATION" + } + }, + "additionalProperties": false + }, + "DV_COUNT": { + "type": "object", + "required": [ + "magnitude" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + } + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "magnitude": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_COUNT" + } + }, + "additionalProperties": false + }, + "DV_DATE_TIME": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DATE_TIME" + } + }, + "additionalProperties": false + }, + "DV_DURATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DURATION" + } + }, + "additionalProperties": false + }, + "CLUSTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "items" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "CLUSTER", + "ELEMENT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "CLUSTER" + } + }, + "additionalProperties": false + }, + "PARTY_RELATED": { + "type": "object", + "required": [ + "relationship" + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "name": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + }, + "minItems": 1 + }, + "relationship": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "PARTY_RELATED" + } + }, + "additionalProperties": false + }, + "ISO_OID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ISO_OID" + } + }, + "additionalProperties": false + }, + "EXTRACT_FOLDER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_FOLDER" + } + }, + "additionalProperties": false + }, + "INSTRUCTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "narrative" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "narrative": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "expiry_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "wf_definition": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "activities": { + "type": "array", + "items": { + "$ref": "#/definitions/ACTIVITY" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "INSTRUCTION" + } + }, + "additionalProperties": false + }, + "EXTRACT_CHAPTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_CHAPTER" + } + }, + "additionalProperties": false + }, + "PERSON": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "archetype_details", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "PERSON" + } + }, + "additionalProperties": false + }, + "RESOURCE_DESCRIPTION": { + "type": "object", + "required": [ + "original_author", + "lifecycle_state", + "parent_resource", + "details" + ], + "properties": { + "original_author": { + "type": "object" + }, + "other_contributors": { + "type": "array", + "items": { + "type": "string" + } + }, + "lifecycle_state": { + "type": "string" + }, + "resource_package_uri": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "parent_resource": { + "type": "object" + }, + "details": { + "type": "array", + "items": { + "$ref": "#/definitions/RESOURCE_DESCRIPTION_ITEM" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION" + } + }, + "additionalProperties": false + }, + "GENERIC_ID": { + "type": "object", + "required": [ + "value", + "scheme" + ], + "properties": { + "value": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "GENERIC_ID" + } + }, + "additionalProperties": false + }, + "EVALUATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EVALUATION" + } + }, + "additionalProperties": false + }, + "CAPABILITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "credentials" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "credentials": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "CAPABILITY" + } + }, + "additionalProperties": false + }, + "CONTRIBUTION": { + "type": "object", + "required": [ + "uid", + "audit", + "versions" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "versions": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "CONTRIBUTION" + } + }, + "additionalProperties": false + }, + "ARCHETYPED": { + "type": "object", + "required": [ + "archetype_id", + "rm_version" + ], + "properties": { + "archetype_id": { + "$ref": "#/definitions/ARCHETYPE_ID" + }, + "template_id": { + "$ref": "#/definitions/TEMPLATE_ID" + }, + "rm_version": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPED" + } + }, + "additionalProperties": false + }, + "FEEDER_AUDIT_DETAILS": { + "type": "object", + "required": [ + "system_id" + ], + "properties": { + "system_id": { + "type": "string" + }, + "location": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "version_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "FEEDER_AUDIT_DETAILS" + } + }, + "additionalProperties": false + }, + "ORIGINAL_VERSION": { + "type": "object", + "required": [ + "contribution", + "commit_audit", + "uid", + "lifecycle_state" + ], + "properties": { + "contribution": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "commit_audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "signature": { + "type": "string" + }, + "uid": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "preceding_version_uid": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "other_input_version_uids": { + "type": "array", + "items": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + }, + "minItems": 1 + }, + "attestations": { + "type": "array", + "items": { + "$ref": "#/definitions/ATTESTATION" + }, + "minItems": 1 + }, + "lifecycle_state": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ORIGINAL_VERSION" + } + }, + "additionalProperties": false + }, + "POINT_EVENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "state": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "POINT_EVENT" + } + }, + "additionalProperties": false + }, + "CODE_PHRASE": { + "type": "object", + "required": [ + "terminology_id", + "code_string" + ], + "properties": { + "terminology_id": { + "$ref": "#/definitions/TERMINOLOGY_ID" + }, + "code_string": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "CODE_PHRASE" + } + }, + "additionalProperties": false + }, + "INSTRUCTION_DETAILS": { + "type": "object", + "required": [ + "instruction_id", + "activity_id" + ], + "properties": { + "instruction_id": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "wf_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "activity_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INSTRUCTION_DETAILS" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_PARTY": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_PARTY" + } + }, + "additionalProperties": false + }, + "EXTRACT_REQUEST": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "extract_spec" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "extract_spec": { + "$ref": "#/definitions/EXTRACT_SPEC" + }, + "update_spec": { + "$ref": "#/definitions/EXTRACT_UPDATE_SPEC" + }, + "_type": { + "type": "string", + "const": "EXTRACT_REQUEST" + } + }, + "additionalProperties": false + }, + "FEEDER_AUDIT": { + "type": "object", + "required": [ + "originating_system_audit" + ], + "properties": { + "originating_system_item_ids": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + "feeder_system_item_ids": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + "original_content": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_PARSABLE", + "DV_MULTIMEDIA" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARSABLE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_MULTIMEDIA" + } + } + }, + "then": { + "$ref": "#/definitions/DV_MULTIMEDIA" + } + } + ] + }, + "originating_system_audit": { + "$ref": "#/definitions/FEEDER_AUDIT_DETAILS" + }, + "feeder_system_audit": { + "$ref": "#/definitions/FEEDER_AUDIT_DETAILS" + }, + "_type": { + "type": "string", + "const": "FEEDER_AUDIT" + } + }, + "additionalProperties": false + }, + "EVENT_CONTEXT": { + "type": "object", + "required": [ + "start_time", + "setting" + ], + "properties": { + "health_care_facility": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_RELATED", + "PARTY_IDENTIFIED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + } + ] + }, + "start_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "end_time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + }, + "minItems": 1 + }, + "location": { + "type": "string" + }, + "setting": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "other_context": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EVENT_CONTEXT" + } + }, + "additionalProperties": false + }, + "ITEM_SINGLE": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "item" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "item": { + "$ref": "#/definitions/ELEMENT" + }, + "_type": { + "type": "string", + "const": "ITEM_SINGLE" + } + }, + "additionalProperties": false + }, + "SET": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "SET" + } + } + }, + "DV_PROPORTION": { + "type": "object", + "required": [ + "numerator", + "denominator", + "type" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "numerator": { + "type": "number" + }, + "denominator": { + "type": "number" + }, + "type": { + "type": "integer" + }, + "precision": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_PROPORTION" + } + }, + "additionalProperties": false + }, + "DV_QUANTITY": { + "type": "object", + "required": [ + "magnitude", + "units" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + } + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "type": "number" + }, + "accuracy_is_percent": { + "type": "boolean" + }, + "magnitude": { + "type": "number" + }, + "units": { + "type": "string" + }, + "precision": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_QUANTITY" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_COMPOSITION": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_COMPOSITION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_FOLDER": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_FOLDER" + } + }, + "additionalProperties": false + }, + "DV_ORDINAL": { + "type": "object", + "required": [ + "value", + "symbol" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "value": { + "type": "integer" + }, + "symbol": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "DV_ORDINAL" + } + }, + "additionalProperties": false + }, + "SYNC_EXTRACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "specification" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "specification": { + "$ref": "#/definitions/SYNC_EXTRACT_SPEC" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/X_CONTRIBUTION" + } + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT" + } + }, + "additionalProperties": false + }, + "INTERNET_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INTERNET_ID" + } + }, + "additionalProperties": false + }, + "ROLE": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "archetype_details", + "name", + "identities", + "performer" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "performer": { + "$ref": "#/definitions/PARTY_REF" + }, + "capabilities": { + "type": "array", + "items": { + "$ref": "#/definitions/CAPABILITY" + }, + "minItems": 1 + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "ROLE" + } + }, + "additionalProperties": false + }, + "AGENT": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "archetype_details", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "AGENT" + } + }, + "additionalProperties": false + }, + "MESSAGE": { + "type": "object", + "required": [ + "author", + "audit", + "content" + ], + "properties": { + "author": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "content": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "SYNC_EXTRACT", + "SYNC_EXTRACT_REQUEST" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT_REQUEST" + } + } + ] + }, + "signature": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "MESSAGE" + } + }, + "additionalProperties": false + }, + "GROUP": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "archetype_details", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "GROUP" + } + }, + "additionalProperties": false + }, + "EXTRACT_ENTITY_MANIFEST": { + "type": "object", + "required": [ + "extract_id_key" + ], + "properties": { + "extract_id_key": { + "type": "string" + }, + "ehr_id": { + "type": "string" + }, + "subject_id": { + "type": "string" + }, + "other_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "item_list": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "EXTRACT_ENTITY_MANIFEST" + } + }, + "additionalProperties": false + }, + "INTERVAL": { + "type": "object", + "required": [ + "lower_unbounded", + "upper_unbounded", + "lower_included", + "upper_included" + ], + "properties": { + "lower": { + "type": "object" + }, + "upper": { + "type": "object" + }, + "lower_unbounded": { + "type": "boolean" + }, + "upper_unbounded": { + "type": "boolean" + }, + "lower_included": { + "type": "boolean" + }, + "upper_included": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "INTERVAL" + } + }, + "description": "Type defining an interval of any ordered type.", + "additionalProperties": false + }, + "EXTRACT_ACTION_REQUEST": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "name", + "request_id", + "action" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "request_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "action": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "EXTRACT_ACTION_REQUEST" + } + }, + "additionalProperties": false + }, + "PARTY_SELF": { + "type": "object", + "required": [ + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "_type": { + "type": "string", + "const": "PARTY_SELF" + } + }, + "additionalProperties": false + }, + "DV_MULTIMEDIA": { + "type": "object", + "required": [ + "media_type", + "size" + ], + "properties": { + "charset": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "alternate_text": { + "type": "string" + }, + "uri": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "data": { + "type": "string", + "contentEncoding": "base64" + }, + "media_type": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "compression_algorithm": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "integrity_check": { + "type": "string", + "contentEncoding": "base64" + }, + "integrity_check_algorithm": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "thumbnail": { + "$ref": "#/definitions/DV_MULTIMEDIA" + }, + "size": { + "type": "integer" + }, + "_type": { + "type": "string", + "const": "DV_MULTIMEDIA" + } + }, + "additionalProperties": false + }, + "X_CONTRIBUTION": { + "type": "object", + "required": [ + "uid", + "audit" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "versions": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "ORIGINAL_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "IMPORTED_VERSION" + } + } + }, + "then": { + "$ref": "#/definitions/IMPORTED_VERSION" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "X_CONTRIBUTION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_EHR_ACCESS": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_EHR_ACCESS" + } + }, + "additionalProperties": false + }, + "VERSION_TREE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "VERSION_TREE_ID" + } + }, + "additionalProperties": false + }, + "DV_PARAGRAPH": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "DV_PARAGRAPH" + } + }, + "additionalProperties": false + }, + "REFERENCE_RANGE": { + "type": "object", + "required": [ + "range", + "meaning" + ], + "properties": { + "range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "meaning": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "REFERENCE_RANGE" + } + }, + "additionalProperties": false + }, + "ITEM_TREE": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "CLUSTER", + "ELEMENT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "ITEM_TREE" + } + }, + "additionalProperties": false + }, + "ELEMENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "null_flavour": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "value": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_GENERAL_TIME_SPECIFICATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_GENERAL_TIME_SPECIFICATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PERIODIC_TIME_SPECIFICATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PERIODIC_TIME_SPECIFICATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_ORDINAL" + } + } + }, + "then": { + "$ref": "#/definitions/DV_ORDINAL" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_COUNT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_COUNT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DURATION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DURATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PROPORTION" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PROPORTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_QUANTITY" + } + } + }, + "then": { + "$ref": "#/definitions/DV_QUANTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TIME" + } + } + }, + "then": { + "$ref": "#/definitions/DV_TIME" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DATE_TIME" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DATE_TIME" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_DATE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_DATE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARAGRAPH" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARAGRAPH" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_STATE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_STATE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_INTERVAL" + } + } + }, + "then": { + "$ref": "#/definitions/DV_INTERVAL" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_PARSABLE" + } + } + }, + "then": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_MULTIMEDIA" + } + } + }, + "then": { + "$ref": "#/definitions/DV_MULTIMEDIA" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_IDENTIFIER" + } + } + }, + "then": { + "$ref": "#/definitions/DV_IDENTIFIER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_BOOLEAN" + } + } + }, + "then": { + "$ref": "#/definitions/DV_BOOLEAN" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + } + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + } + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ELEMENT" + } + }, + "additionalProperties": false + }, + "EXTRACT_SPEC": { + "type": "object", + "required": [ + "extract_type", + "include_multimedia", + "priority", + "link_depth", + "manifest" + ], + "properties": { + "extract_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "include_multimedia": { + "type": "boolean" + }, + "priority": { + "type": "integer" + }, + "link_depth": { + "type": "integer" + }, + "criteria": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_PARSABLE" + } + }, + "manifest": { + "$ref": "#/definitions/EXTRACT_MANIFEST" + }, + "version_spec": { + "$ref": "#/definitions/EXTRACT_VERSION_SPEC" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EXTRACT_SPEC" + } + }, + "additionalProperties": false + }, + "DV_GENERAL_TIME_SPECIFICATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "_type": { + "type": "string", + "const": "DV_GENERAL_TIME_SPECIFICATION" + } + }, + "additionalProperties": false + }, + "DV_DATE": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "normal_status": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "normal_range": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "other_reference_ranges": { + "type": "array", + "items": { + "$ref": "#/definitions/REFERENCE_RANGE" + }, + "minItems": 1 + }, + "magnitude_status": { + "type": "string" + }, + "accuracy": { + "$ref": "#/definitions/DV_DURATION" + }, + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_DATE" + } + }, + "additionalProperties": false + }, + "DV_STATE": { + "type": "object", + "required": [ + "value", + "is_terminal" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "is_terminal": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_STATE" + } + }, + "additionalProperties": false + }, + "ITEM_LIST": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/ELEMENT" + } + }, + "_type": { + "type": "string", + "const": "ITEM_LIST" + } + }, + "additionalProperties": false + }, + "HISTORY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "origin" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "origin": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "period": { + "$ref": "#/definitions/DV_DURATION" + }, + "duration": { + "$ref": "#/definitions/DV_DURATION" + }, + "summary": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "events": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "POINT_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/POINT_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INTERVAL_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/INTERVAL_EVENT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "HISTORY" + } + }, + "additionalProperties": false + }, + "DV_PERIODIC_TIME_SPECIFICATION": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "_type": { + "type": "string", + "const": "DV_PERIODIC_TIME_SPECIFICATION" + } + }, + "additionalProperties": false + }, + "SYNC_EXTRACT_REQUEST": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "specification" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "specification": { + "$ref": "#/definitions/SYNC_EXTRACT_SPEC" + }, + "_type": { + "type": "string", + "const": "SYNC_EXTRACT_REQUEST" + } + }, + "additionalProperties": false + }, + "RESOURCE_DESCRIPTION_ITEM": { + "type": "object", + "required": [ + "language", + "purpose" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "purpose": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "use": { + "type": "string" + }, + "misuse": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "original_resource_uri": { + "type": "array", + "items": { + "type": "object" + } + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION_ITEM" + } + }, + "additionalProperties": false + }, + "CONTACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "addresses": { + "type": "array", + "items": { + "$ref": "#/definitions/ADDRESS" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "CONTACT" + } + }, + "additionalProperties": false + }, + "ARRAY": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "ARRAY" + } + } + }, + "TERM_MAPPING": { + "type": "object", + "required": [ + "match", + "target" + ], + "properties": { + "match": { + "type": "string" + }, + "purpose": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "target": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "TERM_MAPPING" + } + }, + "additionalProperties": false + }, + "EXTRACT_UPDATE_SPEC": { + "type": "object", + "required": [ + "persist_in_server", + "update_method" + ], + "properties": { + "persist_in_server": { + "type": "boolean" + }, + "trigger_events": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "minItems": 1 + }, + "repeat_period": { + "$ref": "#/definitions/DV_DURATION" + }, + "update_method": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "EXTRACT_UPDATE_SPEC" + } + }, + "additionalProperties": false + }, + "OBSERVATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "$ref": "#/definitions/HISTORY", + "description": "Data of the observation, in the form of a HISTORY of EVENTs." + }, + "state": { + "$ref": "#/definitions/HISTORY" + }, + "_type": { + "type": "string", + "const": "OBSERVATION" + } + }, + "description": "ENTRY subtype used to represent observation information in time, as either a single or multiple samples.", + "additionalProperties": false + }, + "X_VERSIONED_OBJECT": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_OBJECT" + } + }, + "additionalProperties": false + }, + "ADDRESSED_MESSAGE": { + "type": "object", + "required": [ + "sender", + "sender_reference" + ], + "properties": { + "sender": { + "type": "string" + }, + "sender_reference": { + "type": "string" + }, + "addressees": { + "type": "array", + "items": { + "type": "string" + } + }, + "urgency": { + "type": "integer" + }, + "message": { + "$ref": "#/definitions/MESSAGE" + }, + "_type": { + "type": "string", + "const": "ADDRESSED_MESSAGE" + } + }, + "additionalProperties": false + }, + "UUID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "UUID" + } + }, + "additionalProperties": false + }, + "ISM_TRANSITION": { + "type": "object", + "required": [ + "current_state" + ], + "properties": { + "current_state": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "transition": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "careflow_step": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "ISM_TRANSITION" + } + }, + "additionalProperties": false + }, + "X_VERSIONED_EHR_STATUS": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created", + "total_version_count", + "extract_version_count" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "total_version_count": { + "type": "integer" + }, + "extract_version_count": { + "type": "integer" + }, + "revision_history": { + "$ref": "#/definitions/REVISION_HISTORY" + }, + "versions": { + "type": "array", + "items": { + "$ref": "#/definitions/ORIGINAL_VERSION" + } + }, + "_type": { + "type": "string", + "const": "X_VERSIONED_EHR_STATUS" + } + }, + "additionalProperties": false + }, + "PARTICIPATION": { + "type": "object", + "required": [ + "function", + "performer", + "mode" + ], + "properties": { + "function": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "mode": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "performer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "_type": { + "type": "string", + "const": "PARTICIPATION" + } + }, + "additionalProperties": false + }, + "FOLDER": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "folders": { + "type": "array", + "items": { + "$ref": "#/definitions/FOLDER" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + } + }, + "_type": { + "type": "string", + "const": "FOLDER" + } + }, + "additionalProperties": false + }, + "EXTRACT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time_created", + "system_id", + "sequence_nr" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "request_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "system_id": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "sequence_nr": { + "type": "integer" + }, + "specification": { + "$ref": "#/definitions/EXTRACT_SPEC" + }, + "chapters": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_ENTITY_CHAPTER", + "EXTRACT_CHAPTER" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ENTITY_CHAPTER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EXTRACT_ENTITY_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_CHAPTER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + } + ] + } + }, + "participations": { + "type": "array", + "items": { + "$ref": "#/definitions/EXTRACT_PARTICIPATION" + } + }, + "_type": { + "type": "string", + "const": "EXTRACT" + } + }, + "additionalProperties": false + }, + "OBJECT_VERSION_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "OBJECT_VERSION_ID" + } + }, + "additionalProperties": false + }, + "DV_INTERVAL": { + "type": "object", + "required": [ + "lower_unbounded", + "upper_unbounded", + "lower_included", + "upper_included" + ], + "properties": { + "lower": { + "type": "object" + }, + "upper": { + "type": "object" + }, + "lower_unbounded": { + "type": "boolean" + }, + "upper_unbounded": { + "type": "boolean" + }, + "lower_included": { + "type": "boolean" + }, + "upper_included": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_INTERVAL" + } + }, + "additionalProperties": false + }, + "ORGANISATION": { + "type": "object", + "required": [ + "uid", + "archetype_node_id", + "archetype_details", + "name", + "identities" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "identities": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_IDENTITY" + }, + "minItems": 1 + }, + "contacts": { + "type": "array", + "items": { + "$ref": "#/definitions/CONTACT" + }, + "minItems": 1 + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + }, + "minItems": 1 + }, + "reverse_relationships": { + "type": "array", + "items": { + "$ref": "#/definitions/LOCATABLE_REF" + }, + "minItems": 1 + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTY_REF" + }, + "minItems": 1 + }, + "languages": { + "type": "array", + "items": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "ORGANISATION" + } + }, + "additionalProperties": false + }, + "VERSIONED_OBJECT": { + "type": "object", + "required": [ + "uid", + "owner_id", + "time_created" + ], + "properties": { + "uid": { + "$ref": "#/definitions/HIER_OBJECT_ID" + }, + "owner_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time_created": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "_type": { + "type": "string", + "const": "VERSIONED_OBJECT" + } + }, + "additionalProperties": false + }, + "GENERIC_CONTENT_ITEM": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "is_primary" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "is_primary": { + "type": "boolean" + }, + "is_changed": { + "type": "boolean" + }, + "is_masked": { + "type": "boolean" + }, + "item": { + "allOf": [ + { + "required": [ + "_type" + ] + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTITY" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_CHAPTER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ENTITY_CHAPTER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_ENTITY_CHAPTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CAPABILITY" + } + } + }, + "then": { + "$ref": "#/definitions/CAPABILITY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CLUSTER" + } + } + }, + "then": { + "$ref": "#/definitions/CLUSTER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ELEMENT" + } + } + }, + "then": { + "$ref": "#/definitions/ELEMENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + } + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + } + }, + "then": { + "$ref": "#/definitions/PERSON" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + } + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + } + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + } + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_ACTION_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_ACTION_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HISTORY" + } + } + }, + "then": { + "$ref": "#/definitions/HISTORY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "CONTACT" + } + } + }, + "then": { + "$ref": "#/definitions/CONTACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "POINT_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/POINT_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INTERVAL_EVENT" + } + } + }, + "then": { + "$ref": "#/definitions/INTERVAL_EVENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADDRESS" + } + } + }, + "then": { + "$ref": "#/definitions/ADDRESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATIONSHIP" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATIONSHIP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_ACCESS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_ACCESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SYNC_EXTRACT_REQUEST" + } + } + }, + "then": { + "$ref": "#/definitions/SYNC_EXTRACT_REQUEST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + } + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + } + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTIVITY" + } + } + }, + "then": { + "$ref": "#/definitions/ACTIVITY" + } + } + ] + }, + "item_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "item_type_version": { + "type": "string" + }, + "author": { + "type": "string" + }, + "creation_time": { + "type": "string", + "format": "date-time" + }, + "authoriser": { + "type": "string" + }, + "authorisation_time": { + "type": "string", + "format": "date-time" + }, + "item_status": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "version_id": { + "type": "string" + }, + "version_set_id": { + "type": "string" + }, + "system_id": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "GENERIC_CONTENT_ITEM" + } + }, + "additionalProperties": false + }, + "ITEM_TABLE": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "rows": { + "type": "array", + "items": { + "$ref": "#/definitions/CLUSTER" + } + }, + "_type": { + "type": "string", + "const": "ITEM_TABLE" + } + }, + "additionalProperties": false + }, + "INTERVAL_EVENT": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "time", + "data", + "width", + "math_function" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "state": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "width": { + "$ref": "#/definitions/DV_DURATION" + }, + "sample_count": { + "type": "integer" + }, + "math_function": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "_type": { + "type": "string", + "const": "INTERVAL_EVENT" + } + }, + "additionalProperties": false + }, + "ATTESTATION": { + "type": "object", + "required": [ + "system_id", + "time_committed", + "change_type", + "committer", + "reason", + "is_pending" + ], + "properties": { + "system_id": { + "type": "string" + }, + "time_committed": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "change_type": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "description": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "committer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "attested_view": { + "$ref": "#/definitions/DV_MULTIMEDIA" + }, + "proof": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + "reason": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "is_pending": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "ATTESTATION" + } + }, + "additionalProperties": false + }, + "ADDRESS": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "details" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ADDRESS" + } + }, + "additionalProperties": false + }, + "REVISION_HISTORY": { + "type": "object", + "required": [ + "items" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/REVISION_HISTORY_ITEM" + } + }, + "_type": { + "type": "string", + "const": "REVISION_HISTORY" + } + }, + "additionalProperties": false + }, + "DV_IDENTIFIER": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "issuer": { + "type": "string" + }, + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "assigner": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "DV_IDENTIFIER" + } + }, + "additionalProperties": false + }, + "DV_CODED_TEXT": { + "type": "object", + "required": [ + "value", + "defining_code" + ], + "properties": { + "value": { + "type": "string" + }, + "hyperlink": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "formatting": { + "type": "string" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/definitions/TERM_MAPPING" + }, + "minItems": 1 + }, + "defining_code": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "_type": { + "type": "string", + "const": "DV_CODED_TEXT" + } + }, + "additionalProperties": false + }, + "LOCATABLE_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "LOCATABLE_REF" + } + }, + "additionalProperties": false + }, + "PARTY_RELATIONSHIP": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "source", + "target" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "source": { + "$ref": "#/definitions/PARTY_REF" + }, + "target": { + "$ref": "#/definitions/PARTY_REF" + }, + "details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "time_validity": { + "$ref": "#/definitions/DV_INTERVAL" + }, + "_type": { + "type": "string", + "const": "PARTY_RELATIONSHIP" + } + }, + "additionalProperties": false + }, + "LIST": { + "type": "object", + "required": [ + ], + "properties": { + "_type": { + "type": "string", + "const": "LIST" + } + } + }, + "EHR_ACCESS": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "settings": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "EHR_ACCESS" + } + }, + "additionalProperties": false + }, + "DV_EHR_URI": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string", + "format": "uri-reference" + }, + "_type": { + "type": "string", + "const": "DV_EHR_URI" + } + }, + "additionalProperties": false + }, + "ARCHETYPE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ARCHETYPE_ID" + } + }, + "additionalProperties": false + }, + "PARTY_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "PARTY_REF" + } + }, + "additionalProperties": false + }, + "TEMPLATE_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "TEMPLATE_ID" + } + }, + "additionalProperties": false + }, + "ADMIN_ENTRY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "data": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "ADMIN_ENTRY" + } + }, + "additionalProperties": false + }, + "PARTY_IDENTIFIED": { + "type": "object", + "required": [ + ], + "properties": { + "external_ref": { + "$ref": "#/definitions/PARTY_REF" + }, + "name": { + "type": "string" + }, + "identifiers": { + "type": "array", + "items": { + "$ref": "#/definitions/DV_IDENTIFIER" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "PARTY_IDENTIFIED" + } + }, + "additionalProperties": false + }, + "OPENEHR_CONTENT_ITEM": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "is_primary" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "is_primary": { + "type": "boolean" + }, + "is_changed": { + "type": "boolean" + }, + "is_masked": { + "type": "boolean" + }, + "item": { + "allOf": [ + { + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_PARTY" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_PARTY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_EHR_ACCESS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_EHR_ACCESS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "X_VERSIONED_OBJECT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_OBJECT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/X_VERSIONED_OBJECT" + } + } + ] + }, + "_type": { + "type": "string", + "const": "OPENEHR_CONTENT_ITEM" + } + }, + "additionalProperties": false + }, + "COMPOSITION": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name", + "language", + "territory", + "category", + "composer" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "territory": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "category": { + "$ref": "#/definitions/DV_CODED_TEXT" + }, + "composer": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "context": { + "$ref": "#/definitions/EVENT_CONTEXT" + }, + "content": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "INSTRUCTION", + "EVALUATION", + "OBSERVATION", + "ACTION", + "ADMIN_ENTRY", + "GENERIC_ENTRY", + "SECTION" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "COMPOSITION" + } + }, + "additionalProperties": false + }, + "EHR_STATUS": { + "type": "object", + "required": [ + "archetype_node_id", + "archetype_details", + "name", + "subject", + "is_queryable", + "is_modifiable" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "subject": { + "$ref": "#/definitions/PARTY_SELF" + }, + "is_queryable": { + "type": "boolean" + }, + "is_modifiable": { + "type": "boolean" + }, + "other_details": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "_type": { + "type": "string", + "const": "EHR_STATUS" + } + }, + "additionalProperties": false + }, + "LINK": { + "type": "object", + "required": [ + "meaning", + "type", + "target" + ], + "properties": { + "meaning": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "type": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "target": { + "$ref": "#/definitions/DV_EHR_URI" + }, + "_type": { + "type": "string", + "const": "LINK" + } + }, + "additionalProperties": false + }, + "TRANSLATION_DETAILS": { + "type": "object", + "required": [ + "language", + "author" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "author": { + "type": "object" + }, + "accreditation": { + "type": "string" + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "TRANSLATION_DETAILS" + } + }, + "additionalProperties": false + }, + "ACCESS_GROUP_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ACCESS_GROUP_REF" + } + }, + "additionalProperties": false + }, + "OBJECT_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "TERMINOLOGY_ID", + "GENERIC_ID", + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID", + "ARCHETYPE_ID", + "TEMPLATE_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TERMINOLOGY_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TERMINOLOGY_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ID" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ARCHETYPE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/ARCHETYPE_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "TEMPLATE_ID" + } + } + }, + "then": { + "$ref": "#/definitions/TEMPLATE_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "OBJECT_REF" + } + }, + "additionalProperties": false + }, + "GENERIC_ENTRY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "data" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "data": { + "$ref": "#/definitions/ITEM_TREE" + }, + "_type": { + "type": "string", + "const": "GENERIC_ENTRY" + } + }, + "additionalProperties": false + }, + "IMPORTED_VERSION": { + "type": "object", + "required": [ + "contribution", + "commit_audit", + "item" + ], + "properties": { + "contribution": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "commit_audit": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "ATTESTATION", + "AUDIT_DETAILS" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ATTESTATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ATTESTATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AUDIT_DETAILS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/AUDIT_DETAILS" + } + } + ] + }, + "signature": { + "type": "string" + }, + "item": { + "$ref": "#/definitions/ORIGINAL_VERSION" + }, + "_type": { + "type": "string", + "const": "IMPORTED_VERSION" + } + }, + "additionalProperties": false + }, + "DV_BOOLEAN": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "boolean" + }, + "_type": { + "type": "string", + "const": "DV_BOOLEAN" + } + }, + "additionalProperties": false + }, + "DV_URI": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string", + "format": "uri-reference" + }, + "_type": { + "type": "string", + "const": "DV_URI" + } + }, + "additionalProperties": false + }, + "DV_TEXT": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "hyperlink": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_EHR_URI", + "DV_URI" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_EHR_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_EHR_URI" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_URI" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_URI" + } + } + ] + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "formatting": { + "type": "string" + }, + "mappings": { + "type": "array", + "items": { + "$ref": "#/definitions/TERM_MAPPING" + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "DV_TEXT" + } + }, + "additionalProperties": false + }, + "ACTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", + "encoding", + "subject", + "time", + "description", + "ism_transition" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "encoding": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "subject": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "provider": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "PARTY_SELF", + "PARTY_IDENTIFIED", + "PARTY_RELATED" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_SELF" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_SELF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_IDENTIFIED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_IDENTIFIED" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_RELATED" + } + } + }, + "then": { + "$ref": "#/definitions/PARTY_RELATED" + } + } + ] + }, + "other_participations": { + "type": "array", + "items": { + "$ref": "#/definitions/PARTICIPATION" + } + }, + "workflow_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "protocol": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "guideline_id": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "LOCATABLE_REF", + "PARTY_REF", + "ACCESS_GROUP_REF", + "OBJECT_REF" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "LOCATABLE_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/LOCATABLE_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PARTY_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PARTY_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACCESS_GROUP_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ACCESS_GROUP_REF" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_REF" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/OBJECT_REF" + } + } + ] + }, + "time": { + "$ref": "#/definitions/DV_DATE_TIME" + }, + "description": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "ism_transition": { + "$ref": "#/definitions/ISM_TRANSITION" + }, + "instruction_details": { + "$ref": "#/definitions/INSTRUCTION_DETAILS" + }, + "_type": { + "type": "string", + "const": "ACTION" + } + }, + "additionalProperties": false + }, + "EXTRACT_ENTITY_CHAPTER": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "extract_id_key" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "EXTRACT_FOLDER", + "GENERIC_CONTENT_ITEM", + "OPENEHR_CONTENT_ITEM" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EXTRACT_FOLDER" + } + } + }, + "then": { + "$ref": "#/definitions/EXTRACT_FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_CONTENT_ITEM" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OPENEHR_CONTENT_ITEM" + } + } + }, + "then": { + "$ref": "#/definitions/OPENEHR_CONTENT_ITEM" + } + } + ] + } + }, + "extract_id_key": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "EXTRACT_ENTITY_CHAPTER" + } + }, + "additionalProperties": false + }, + "HIER_OBJECT_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "HIER_OBJECT_ID" + } + }, + "additionalProperties": false + }, + "SECTION": { + "type": "object", + "required": [ + "archetype_node_id", + "name" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "items": { + "type": "array", + "items": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "INSTRUCTION", + "EVALUATION", + "OBSERVATION", + "ACTION", + "ADMIN_ENTRY", + "GENERIC_ENTRY", + "SECTION" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "INSTRUCTION" + } + } + }, + "then": { + "$ref": "#/definitions/INSTRUCTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EVALUATION" + } + } + }, + "then": { + "$ref": "#/definitions/EVALUATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBSERVATION" + } + } + }, + "then": { + "$ref": "#/definitions/OBSERVATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ACTION" + } + } + }, + "then": { + "$ref": "#/definitions/ACTION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ADMIN_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/ADMIN_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GENERIC_ENTRY" + } + } + }, + "then": { + "$ref": "#/definitions/GENERIC_ENTRY" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "SECTION" + } + } + }, + "then": { + "$ref": "#/definitions/SECTION" + } + } + ] + }, + "minItems": 1 + }, + "_type": { + "type": "string", + "const": "SECTION" + } + }, + "additionalProperties": false + }, + "ACTIVITY": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "description", + "action_archetype_id", + "timing" + ], + "properties": { + "uid": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "archetype_node_id": { + "type": "string" + }, + "name": { + "allOf": [ + { + "properties": { + "_type": { + "type": "string", + "enum": [ + "DV_CODED_TEXT", + "DV_TEXT" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_CODED_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_CODED_TEXT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "DV_TEXT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + }, + { + "if": { + "not": { + "required": [ + "_type" + ] + } + }, + "then": { + "$ref": "#/definitions/DV_TEXT" + } + } + ] + }, + "archetype_details": { + "$ref": "#/definitions/ARCHETYPED" + }, + "feeder_audit": { + "$ref": "#/definitions/FEEDER_AUDIT" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/definitions/LINK" + }, + "minItems": 1 + }, + "description": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "ITEM_SINGLE", + "ITEM_TREE", + "ITEM_LIST", + "ITEM_TABLE" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TREE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TREE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + } + ] + }, + "timing": { + "$ref": "#/definitions/DV_PARSABLE" + }, + "action_archetype_id": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "ACTIVITY" + } + }, + "additionalProperties": false + } + } +} \ No newline at end of file diff --git a/components/openehr_rm_1.0.3_all.json b/components/openehr_rm_1.0.3_all.json index 00f881b..5216021 100644 --- a/components/openehr_rm_1.0.3_all.json +++ b/components/openehr_rm_1.0.3_all.json @@ -131,12 +131,12 @@ "if": { "properties": { "_type": { - "const": "CAPABILITY" + "const": "ELEMENT" } } }, "then": { - "$ref": "#/definitions/CAPABILITY" + "$ref": "#/definitions/ELEMENT" } }, { @@ -155,48 +155,60 @@ "if": { "properties": { "_type": { - "const": "ADDRESS" + "const": "ROLE" } } }, "then": { - "$ref": "#/definitions/ADDRESS" + "$ref": "#/definitions/ROLE" } }, { "if": { "properties": { "_type": { - "const": "ROLE" + "const": "ORGANISATION" } } }, "then": { - "$ref": "#/definitions/ROLE" + "$ref": "#/definitions/ORGANISATION" } }, { "if": { "properties": { "_type": { - "const": "ORGANISATION" + "const": "AGENT" } } }, "then": { - "$ref": "#/definitions/ORGANISATION" + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + } + }, + "then": { + "$ref": "#/definitions/GROUP" } }, { "if": { "properties": { "_type": { - "const": "PARTY_IDENTITY" + "const": "HISTORY" } } }, "then": { - "$ref": "#/definitions/PARTY_IDENTITY" + "$ref": "#/definitions/HISTORY" } }, { @@ -211,6 +223,42 @@ "$ref": "#/definitions/ITEM_TREE" } }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, { "if": { "properties": { @@ -481,7 +529,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", "ACCESS_GROUP_REF", "OBJECT_REF" ] @@ -503,21 +550,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, { "if": { "properties": { @@ -570,8 +602,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -592,36 +622,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -659,8 +659,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -681,36 +679,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -750,8 +718,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -772,36 +738,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -841,59 +777,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -2675,10 +2563,9 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", - "identities", - "roles", - "languages" + "identities" ], "properties": { "uid": { @@ -3801,17 +3688,6 @@ }, "additionalProperties": false }, - "ISO8601_TYPE": { - "type": "object", - "required": [ - ], - "properties": { - "_type": { - "type": "string", - "const": "ISO8601_TYPE" - } - } - }, "CONTRIBUTION": { "type": "object", "required": [ @@ -3889,9 +3765,6 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -3901,22 +3774,7 @@ "if": { "properties": { "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" + "const": "OBJECT_REF" } }, "required": [ @@ -3924,49 +3782,19 @@ ] }, "then": { - "$ref": "#/definitions/PARTY_REF" + "$ref": "#/definitions/OBJECT_REF" } }, { "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] + "not": { + "required": [ + "_type" + ] + } }, "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "OBJECT_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/OBJECT_REF" - } - }, - { - "if": { - "not": { - "required": [ - "_type" - ] - } - }, - "then": { - "$ref": "#/definitions/OBJECT_REF" + "$ref": "#/definitions/OBJECT_REF" } } ] @@ -4209,59 +4037,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -4375,7 +4155,148 @@ "$ref": "#/definitions/DV_CODED_TEXT" }, "data": { - "type": "object" + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] }, "_type": { "type": "string", @@ -4782,59 +4703,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -5415,7 +5288,6 @@ "type": "object", "required": [ "magnitude", - "property", "units" ], "properties": { @@ -5443,9 +5315,6 @@ "magnitude": { "type": "number" }, - "property": { - "$ref": "#/definitions/CODE_PHRASE" - }, "units": { "type": "string" }, @@ -5476,60 +5345,12 @@ "allOf": [ { "properties": { - "_type": { - "type": "string", - "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", - "OBJECT_REF" - ] - } - } - }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } } }, { @@ -5606,59 +5427,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -5906,6 +5679,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities", "performer" @@ -6147,10 +5921,9 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", - "identities", - "roles", - "languages" + "identities" ], "properties": { "uid": { @@ -6616,10 +6389,9 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", - "identities", - "roles", - "languages" + "identities" ], "properties": { "uid": { @@ -6924,7 +6696,10 @@ "type": "string" }, "other_ids": { - "type": "object" + "type": "array", + "items": { + "type": "string" + } }, "item_list": { "type": "array", @@ -7493,59 +7268,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -9043,8 +8770,7 @@ "type": "object", "required": [ "language", - "purpose", - "other_details" + "purpose" ], "properties": { "language": { @@ -9816,59 +9542,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -10073,59 +9751,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -10316,6 +9946,7 @@ "type": "object", "required": [ "archetype_node_id", + "archetype_details", "name" ], "properties": { @@ -10808,10 +10439,9 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", - "identities", - "roles", - "languages" + "identities" ], "properties": { "uid": { @@ -13267,6 +12897,7 @@ "DV_EHR_URI": { "type": "object", "required": [ + "value" ], "properties": { "value": { @@ -14115,6 +13746,7 @@ "type": "object", "required": [ "archetype_node_id", + "archetype_details", "name", "language", "territory", @@ -14426,6 +14058,7 @@ "type": "object", "required": [ "archetype_node_id", + "archetype_details", "name", "subject", "is_queryable", @@ -15167,59 +14800,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -15338,6 +14923,7 @@ "DV_URI": { "type": "object", "required": [ + "value" ], "properties": { "value": { @@ -16473,6 +16059,7 @@ "archetype_node_id", "name", "description", + "action_archetype_id", "timing" ], "properties": { diff --git a/components/openehr_rm_1.0.4_all.json b/components/openehr_rm_1.0.4_all.json index 34020f7..e5fde0f 100644 --- a/components/openehr_rm_1.0.4_all.json +++ b/components/openehr_rm_1.0.4_all.json @@ -131,12 +131,12 @@ "if": { "properties": { "_type": { - "const": "CAPABILITY" + "const": "ELEMENT" } } }, "then": { - "$ref": "#/definitions/CAPABILITY" + "$ref": "#/definitions/ELEMENT" } }, { @@ -155,48 +155,60 @@ "if": { "properties": { "_type": { - "const": "ADDRESS" + "const": "ROLE" } } }, "then": { - "$ref": "#/definitions/ADDRESS" + "$ref": "#/definitions/ROLE" } }, { "if": { "properties": { "_type": { - "const": "ROLE" + "const": "ORGANISATION" } } }, "then": { - "$ref": "#/definitions/ROLE" + "$ref": "#/definitions/ORGANISATION" } }, { "if": { "properties": { "_type": { - "const": "ORGANISATION" + "const": "AGENT" } } }, "then": { - "$ref": "#/definitions/ORGANISATION" + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + } + }, + "then": { + "$ref": "#/definitions/GROUP" } }, { "if": { "properties": { "_type": { - "const": "PARTY_IDENTITY" + "const": "HISTORY" } } }, "then": { - "$ref": "#/definitions/PARTY_IDENTITY" + "$ref": "#/definitions/HISTORY" } }, { @@ -211,6 +223,42 @@ "$ref": "#/definitions/ITEM_TREE" } }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, { "if": { "properties": { @@ -472,8 +520,7 @@ "ehr_id", "time_created", "ehr_access", - "ehr_status", - "contributions" + "ehr_status" ], "properties": { "system_id": { @@ -493,7 +540,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", "ACCESS_GROUP_REF", "OBJECT_REF" ] @@ -515,21 +561,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, { "if": { "properties": { @@ -582,8 +613,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -604,36 +633,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -671,8 +670,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -693,36 +690,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -762,8 +729,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -784,36 +749,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -853,59 +788,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -1075,50 +962,6 @@ }, "additionalProperties": false }, - "ARCHETYPE_HRID": { - "type": "object", - "required": [ - "namespace", - "rm_publisher", - "rm_package", - "rm_class", - "concept_id", - "release_version", - "version_status", - "build_count" - ], - "properties": { - "namespace": { - "type": "string" - }, - "rm_publisher": { - "type": "string" - }, - "rm_package": { - "type": "string" - }, - "rm_class": { - "type": "string" - }, - "concept_id": { - "type": "string" - }, - "release_version": { - "type": "string" - }, - "version_status": { - "$ref": "#/definitions/VERSION_STATUS" - }, - "build_count": { - "type": "string" - }, - "_type": { - "type": "string", - "const": "ARCHETYPE_HRID" - } - }, - "additionalProperties": false - }, "PARTY_IDENTITY": { "type": "object", "required": [ @@ -2731,6 +2574,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities" ], @@ -3021,26 +2865,6 @@ }, "additionalProperties": false }, - "GENERIC_ID": { - "type": "object", - "required": [ - "value", - "scheme" - ], - "properties": { - "value": { - "type": "string" - }, - "scheme": { - "type": "string" - }, - "_type": { - "type": "string", - "const": "GENERIC_ID" - } - }, - "additionalProperties": false - }, "RESOURCE_DESCRIPTION": { "type": "object", "required": [ @@ -3085,12 +2909,32 @@ }, "additionalProperties": false }, - "EVALUATION": { + "GENERIC_ID": { "type": "object", "required": [ - "archetype_node_id", - "name", - "language", + "value", + "scheme" + ], + "properties": { + "value": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "GENERIC_ID" + } + }, + "additionalProperties": false + }, + "EVALUATION": { + "type": "object", + "required": [ + "archetype_node_id", + "name", + "language", "encoding", "subject", "data" @@ -3855,22 +3699,6 @@ }, "additionalProperties": false }, - "ISO8601_TYPE": { - "type": "object", - "required": [ - ], - "properties": { - "value": { - "type": "string" - }, - "_type": { - "type": "string", - "const": "ISO8601_TYPE" - } - }, - "description": "Parent of ISO8601 types.", - "additionalProperties": false - }, "CONTRIBUTION": { "type": "object", "required": [ @@ -3948,59 +3776,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -4268,59 +4048,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -4434,7 +4166,148 @@ "$ref": "#/definitions/DV_CODED_TEXT" }, "data": { - "type": "object" + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] }, "_type": { "type": "string", @@ -4841,59 +4714,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -5501,9 +5326,6 @@ "magnitude": { "type": "number" }, - "property": { - "$ref": "#/definitions/CODE_PHRASE" - }, "units": { "type": "string" }, @@ -5537,59 +5359,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -5664,9 +5438,6 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -5949,7 +5720,23 @@ }, "_type": { "type": "string", - "const": "SYNC_EXTRACT" + "const": "SYNC_EXTRACT" + } + }, + "additionalProperties": false + }, + "INTERNET_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INTERNET_ID" } }, "additionalProperties": false @@ -5986,6 +5773,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities", "performer" @@ -6227,6 +6015,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities" ], @@ -6517,22 +6306,6 @@ }, "additionalProperties": false }, - "INTERNET_ID": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "string" - }, - "_type": { - "type": "string", - "const": "INTERNET_ID" - } - }, - "additionalProperties": false - }, "MESSAGE": { "type": "object", "required": [ @@ -6710,6 +6483,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities" ], @@ -7588,59 +7362,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -9150,6 +8876,50 @@ }, "additionalProperties": false }, + "RESOURCE_DESCRIPTION_ITEM": { + "type": "object", + "required": [ + "language", + "purpose" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "purpose": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "use": { + "type": "string" + }, + "misuse": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "original_resource_uri": { + "type": "array", + "items": { + "type": "object" + } + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION_ITEM" + } + }, + "additionalProperties": false + }, "CONTACT": { "type": "object", "required": [ @@ -9289,51 +9059,6 @@ }, "additionalProperties": false }, - "RESOURCE_DESCRIPTION_ITEM": { - "type": "object", - "required": [ - "language", - "purpose", - "other_details" - ], - "properties": { - "language": { - "$ref": "#/definitions/TERMINOLOGY_CODE" - }, - "purpose": { - "type": "string" - }, - "keywords": { - "type": "array", - "items": { - "type": "string" - } - }, - "use": { - "type": "string" - }, - "misuse": { - "type": "string" - }, - "copyright": { - "type": "string" - }, - "original_resource_uri": { - "type": "array", - "items": { - "type": "object" - } - }, - "other_details": { - "type": "object" - }, - "_type": { - "type": "string", - "const": "RESOURCE_DESCRIPTION_ITEM" - } - }, - "additionalProperties": false - }, "ARRAY": { "type": "object", "required": [ @@ -9927,59 +9652,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -10184,59 +9861,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -10427,6 +10056,7 @@ "type": "object", "required": [ "archetype_node_id", + "archetype_details", "name" ], "properties": { @@ -10644,74 +10274,6 @@ ] } }, - "details": { - "allOf": [ - { - "required": [ - "_type" - ], - "properties": { - "_type": { - "type": "string", - "enum": [ - "ITEM_SINGLE", - "ITEM_TREE", - "ITEM_LIST", - "ITEM_TABLE" - ] - } - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ITEM_SINGLE" - } - } - }, - "then": { - "$ref": "#/definitions/ITEM_SINGLE" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ITEM_TREE" - } - } - }, - "then": { - "$ref": "#/definitions/ITEM_TREE" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ITEM_LIST" - } - } - }, - "then": { - "$ref": "#/definitions/ITEM_LIST" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ITEM_TABLE" - } - } - }, - "then": { - "$ref": "#/definitions/ITEM_TABLE" - } - } - ] - }, "_type": { "type": "string", "const": "FOLDER" @@ -10998,6 +10560,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities" ], @@ -12064,10 +11627,7 @@ "type": "string" }, "other_details": { - "type": "array", - "items": { - "type": "string" - } + "type": "object" }, "_type": { "type": "string", @@ -13054,6 +12614,72 @@ }, "additionalProperties": false }, + "LOCATABLE_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "LOCATABLE_REF" + } + }, + "additionalProperties": false + }, "DATE_TIME": { "type": "object", "required": [ @@ -13278,72 +12904,6 @@ }, "additionalProperties": false }, - "LOCATABLE_REF": { - "type": "object", - "required": [ - "id", - "namespace", - "type" - ], - "properties": { - "id": { - "allOf": [ - { - "required": [ - "_type" - ], - "properties": { - "_type": { - "type": "string", - "enum": [ - "OBJECT_VERSION_ID", - "HIER_OBJECT_ID" - ] - } - } - }, - { - "if": { - "properties": { - "_type": { - "const": "OBJECT_VERSION_ID" - } - } - }, - "then": { - "$ref": "#/definitions/OBJECT_VERSION_ID" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "HIER_OBJECT_ID" - } - } - }, - "then": { - "$ref": "#/definitions/HIER_OBJECT_ID" - } - } - ] - }, - "namespace": { - "type": "string" - }, - "type": { - "type": "string" - }, - "path": { - "type": "string" - }, - "_type": { - "type": "string", - "const": "LOCATABLE_REF" - } - }, - "additionalProperties": false - }, "LIST": { "type": "object", "required": [ @@ -13490,6 +13050,7 @@ "DV_EHR_URI": { "type": "object", "required": [ + "value" ], "properties": { "value": { @@ -14358,6 +13919,7 @@ "type": "object", "required": [ "archetype_node_id", + "archetype_details", "name", "language", "territory", @@ -14669,6 +14231,7 @@ "type": "object", "required": [ "archetype_node_id", + "archetype_details", "name", "subject", "is_queryable", @@ -15014,7 +14577,7 @@ ], "properties": { "language": { - "$ref": "#/definitions/TERMINOLOGY_CODE" + "$ref": "#/definitions/CODE_PHRASE" }, "author": { "type": "object" @@ -15426,59 +14989,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -15597,6 +15112,7 @@ "DV_URI": { "type": "object", "required": [ + "value" ], "properties": { "value": { @@ -16731,7 +16247,8 @@ "required": [ "archetype_node_id", "name", - "description" + "description", + "action_archetype_id" ], "properties": { "uid": { diff --git a/components/openehr_rm_1.1.0_all.json b/components/openehr_rm_1.1.0_all.json index ed2b0a0..66b06eb 100644 --- a/components/openehr_rm_1.1.0_all.json +++ b/components/openehr_rm_1.1.0_all.json @@ -131,12 +131,12 @@ "if": { "properties": { "_type": { - "const": "CAPABILITY" + "const": "ELEMENT" } } }, "then": { - "$ref": "#/definitions/CAPABILITY" + "$ref": "#/definitions/ELEMENT" } }, { @@ -155,48 +155,60 @@ "if": { "properties": { "_type": { - "const": "ADDRESS" + "const": "ROLE" } } }, "then": { - "$ref": "#/definitions/ADDRESS" + "$ref": "#/definitions/ROLE" } }, { "if": { "properties": { "_type": { - "const": "ROLE" + "const": "ORGANISATION" } } }, "then": { - "$ref": "#/definitions/ROLE" + "$ref": "#/definitions/ORGANISATION" } }, { "if": { "properties": { "_type": { - "const": "ORGANISATION" + "const": "AGENT" } } }, "then": { - "$ref": "#/definitions/ORGANISATION" + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + } + }, + "then": { + "$ref": "#/definitions/GROUP" } }, { "if": { "properties": { "_type": { - "const": "PARTY_IDENTITY" + "const": "HISTORY" } } }, "then": { - "$ref": "#/definitions/PARTY_IDENTITY" + "$ref": "#/definitions/HISTORY" } }, { @@ -211,6 +223,42 @@ "$ref": "#/definitions/ITEM_TREE" } }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_TABLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_TABLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_LIST" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_LIST" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ITEM_SINGLE" + } + } + }, + "then": { + "$ref": "#/definitions/ITEM_SINGLE" + } + }, { "if": { "properties": { @@ -472,8 +520,7 @@ "ehr_id", "time_created", "ehr_access", - "ehr_status", - "contributions" + "ehr_status" ], "properties": { "system_id": { @@ -493,7 +540,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", "ACCESS_GROUP_REF", "OBJECT_REF" ] @@ -515,21 +561,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, { "if": { "properties": { @@ -582,8 +613,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -604,36 +633,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -671,8 +670,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -693,36 +690,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -762,8 +729,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -784,36 +749,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -854,8 +789,6 @@ "type": "string", "enum": [ "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } @@ -876,36 +809,6 @@ "$ref": "#/definitions/LOCATABLE_REF" } }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -945,59 +848,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -2823,6 +2678,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities" ], @@ -3113,26 +2969,6 @@ }, "additionalProperties": false }, - "GENERIC_ID": { - "type": "object", - "required": [ - "value", - "scheme" - ], - "properties": { - "value": { - "type": "string" - }, - "scheme": { - "type": "string" - }, - "_type": { - "type": "string", - "const": "GENERIC_ID" - } - }, - "additionalProperties": false - }, "RESOURCE_DESCRIPTION": { "type": "object", "required": [ @@ -3177,6 +3013,26 @@ }, "additionalProperties": false }, + "GENERIC_ID": { + "type": "object", + "required": [ + "value", + "scheme" + ], + "properties": { + "value": { + "type": "string" + }, + "scheme": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "GENERIC_ID" + } + }, + "additionalProperties": false + }, "EVALUATION": { "type": "object", "required": [ @@ -3947,22 +3803,6 @@ }, "additionalProperties": false }, - "ISO8601_TYPE": { - "type": "object", - "required": [ - ], - "properties": { - "value": { - "type": "string" - }, - "_type": { - "type": "string", - "const": "ISO8601_TYPE" - } - }, - "description": "Parent of ISO8601 types.", - "additionalProperties": false - }, "CONTRIBUTION": { "type": "object", "required": [ @@ -4040,59 +3880,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -4428,59 +4220,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -4594,7 +4338,148 @@ "$ref": "#/definitions/DV_CODED_TEXT" }, "data": { - "type": "object" + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "COMPOSITION", + "FOLDER", + "EHR_STATUS", + "ROLE", + "AGENT", + "GROUP", + "ORGANISATION", + "PERSON" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "COMPOSITION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/COMPOSITION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "FOLDER" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/FOLDER" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "EHR_STATUS" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/EHR_STATUS" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ROLE" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ROLE" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "AGENT" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/AGENT" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "GROUP" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/GROUP" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "ORGANISATION" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/ORGANISATION" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "PERSON" + } + }, + "required": [ + "_type" + ] + }, + "then": { + "$ref": "#/definitions/PERSON" + } + } + ] }, "_type": { "type": "string", @@ -5004,59 +4889,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -5664,9 +5501,6 @@ "magnitude": { "type": "number" }, - "property": { - "$ref": "#/definitions/CODE_PHRASE" - }, "units": { "type": "string" }, @@ -5706,59 +5540,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -5832,60 +5618,12 @@ "properties": { "_type": { "type": "string", - "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", + "enum": [ "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -6123,6 +5861,22 @@ }, "additionalProperties": false }, + "INTERNET_ID": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "INTERNET_ID" + } + }, + "additionalProperties": false + }, "TERMINOLOGY_CODE": { "type": "object", "required": [ @@ -6155,6 +5909,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities", "performer" @@ -6396,6 +6151,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities" ], @@ -6686,22 +6442,6 @@ }, "additionalProperties": false }, - "INTERNET_ID": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "string" - }, - "_type": { - "type": "string", - "const": "INTERNET_ID" - } - }, - "additionalProperties": false - }, "MESSAGE": { "type": "object", "required": [ @@ -6879,6 +6619,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities" ], @@ -7757,59 +7498,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -9388,6 +9081,50 @@ }, "additionalProperties": false }, + "RESOURCE_DESCRIPTION_ITEM": { + "type": "object", + "required": [ + "language", + "purpose" + ], + "properties": { + "language": { + "$ref": "#/definitions/CODE_PHRASE" + }, + "purpose": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "use": { + "type": "string" + }, + "misuse": { + "type": "string" + }, + "copyright": { + "type": "string" + }, + "original_resource_uri": { + "type": "array", + "items": { + "type": "object" + } + }, + "other_details": { + "type": "object" + }, + "_type": { + "type": "string", + "const": "RESOURCE_DESCRIPTION_ITEM" + } + }, + "additionalProperties": false + }, "CONTACT": { "type": "object", "required": [ @@ -9527,51 +9264,6 @@ }, "additionalProperties": false }, - "RESOURCE_DESCRIPTION_ITEM": { - "type": "object", - "required": [ - "language", - "purpose", - "other_details" - ], - "properties": { - "language": { - "$ref": "#/definitions/TERMINOLOGY_CODE" - }, - "purpose": { - "type": "string" - }, - "keywords": { - "type": "array", - "items": { - "type": "string" - } - }, - "use": { - "type": "string" - }, - "misuse": { - "type": "string" - }, - "copyright": { - "type": "string" - }, - "original_resource_uri": { - "type": "array", - "items": { - "type": "object" - } - }, - "other_details": { - "type": "object" - }, - "_type": { - "type": "string", - "const": "RESOURCE_DESCRIPTION_ITEM" - } - }, - "additionalProperties": false - }, "ARRAY": { "type": "object", "required": [ @@ -10159,63 +9851,15 @@ "$ref": "#/definitions/HIER_OBJECT_ID" }, "owner_id": { - "allOf": [ - { - "properties": { - "_type": { - "type": "string", - "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", - "OBJECT_REF" - ] - } - } - }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, + "allOf": [ { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_REF" + ] + } } }, { @@ -10422,59 +10066,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -10665,6 +10261,7 @@ "type": "object", "required": [ "archetype_node_id", + "archetype_details", "name" ], "properties": { @@ -11236,6 +10833,7 @@ "required": [ "uid", "archetype_node_id", + "archetype_details", "name", "identities" ], @@ -12302,10 +11900,7 @@ "type": "string" }, "other_details": { - "type": "array", - "items": { - "type": "string" - } + "type": "object" }, "_type": { "type": "string", @@ -13292,6 +12887,72 @@ }, "additionalProperties": false }, + "LOCATABLE_REF": { + "type": "object", + "required": [ + "id", + "namespace", + "type" + ], + "properties": { + "id": { + "allOf": [ + { + "required": [ + "_type" + ], + "properties": { + "_type": { + "type": "string", + "enum": [ + "OBJECT_VERSION_ID", + "HIER_OBJECT_ID" + ] + } + } + }, + { + "if": { + "properties": { + "_type": { + "const": "OBJECT_VERSION_ID" + } + } + }, + "then": { + "$ref": "#/definitions/OBJECT_VERSION_ID" + } + }, + { + "if": { + "properties": { + "_type": { + "const": "HIER_OBJECT_ID" + } + } + }, + "then": { + "$ref": "#/definitions/HIER_OBJECT_ID" + } + } + ] + }, + "namespace": { + "type": "string" + }, + "type": { + "type": "string" + }, + "path": { + "type": "string" + }, + "_type": { + "type": "string", + "const": "LOCATABLE_REF" + } + }, + "additionalProperties": false + }, "DATE_TIME": { "type": "object", "required": [ @@ -13516,72 +13177,6 @@ }, "additionalProperties": false }, - "LOCATABLE_REF": { - "type": "object", - "required": [ - "id", - "namespace", - "type" - ], - "properties": { - "id": { - "allOf": [ - { - "required": [ - "_type" - ], - "properties": { - "_type": { - "type": "string", - "enum": [ - "OBJECT_VERSION_ID", - "HIER_OBJECT_ID" - ] - } - } - }, - { - "if": { - "properties": { - "_type": { - "const": "OBJECT_VERSION_ID" - } - } - }, - "then": { - "$ref": "#/definitions/OBJECT_VERSION_ID" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "HIER_OBJECT_ID" - } - } - }, - "then": { - "$ref": "#/definitions/HIER_OBJECT_ID" - } - } - ] - }, - "namespace": { - "type": "string" - }, - "type": { - "type": "string" - }, - "path": { - "type": "string" - }, - "_type": { - "type": "string", - "const": "LOCATABLE_REF" - } - }, - "additionalProperties": false - }, "LIST": { "type": "object", "required": [ @@ -13728,6 +13323,7 @@ "DV_EHR_URI": { "type": "object", "required": [ + "value" ], "properties": { "value": { @@ -14629,6 +14225,7 @@ "type": "object", "required": [ "archetype_node_id", + "archetype_details", "name", "language", "territory", @@ -14940,6 +14537,7 @@ "type": "object", "required": [ "archetype_node_id", + "archetype_details", "name", "subject", "is_queryable", @@ -15285,7 +14883,7 @@ ], "properties": { "language": { - "$ref": "#/definitions/TERMINOLOGY_CODE" + "$ref": "#/definitions/CODE_PHRASE" }, "author": { "type": "object" @@ -15697,59 +15295,11 @@ "_type": { "type": "string", "enum": [ - "LOCATABLE_REF", - "PARTY_REF", - "ACCESS_GROUP_REF", "OBJECT_REF" ] } } }, - { - "if": { - "properties": { - "_type": { - "const": "LOCATABLE_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/LOCATABLE_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "PARTY_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/PARTY_REF" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ACCESS_GROUP_REF" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ACCESS_GROUP_REF" - } - }, { "if": { "properties": { @@ -15868,6 +15418,7 @@ "DV_URI": { "type": "object", "required": [ + "value" ], "properties": { "value": { @@ -17002,7 +16553,8 @@ "required": [ "archetype_node_id", "name", - "description" + "description", + "action_archetype_id" ], "properties": { "uid": { From 4cb59d0ad9cbc455690929f6bdc95b1a0a27f475 Mon Sep 17 00:00:00 2001 From: ppazos Date: Mon, 12 Dec 2022 13:42:14 -0300 Subject: [PATCH 2/2] fixed contribution.versions types for api schemas --- components/openehr_api_1.0.2_all.json | 113 ++------------------------ components/openehr_api_1.0.3_all.json | 112 ++----------------------- components/openehr_api_1.0.4_all.json | 112 ++----------------------- components/openehr_api_1.1.0_all.json | 112 ++----------------------- 4 files changed, 24 insertions(+), 425 deletions(-) diff --git a/components/openehr_api_1.0.2_all.json b/components/openehr_api_1.0.2_all.json index 8feb6a9..664ce49 100644 --- a/components/openehr_api_1.0.2_all.json +++ b/components/openehr_api_1.0.2_all.json @@ -353,7 +353,6 @@ "type": "object", "required": [ "system_id", - "time_committed", "change_type", "committer" ], @@ -3565,7 +3564,6 @@ "CONTRIBUTION": { "type": "object", "required": [ - "uid", "audit", "versions" ], @@ -3642,14 +3640,8 @@ "_type": { "type": "string", "enum": [ - "COMPOSITION", - "FOLDER", - "EHR_STATUS", - "ROLE", - "AGENT", - "GROUP", - "ORGANISATION", - "PERSON" + "ORIGINAL_VERSION", + "IMPORTED_VERSION" ] } } @@ -3658,97 +3650,7 @@ "if": { "properties": { "_type": { - "const": "COMPOSITION" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/COMPOSITION" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "FOLDER" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/FOLDER" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "EHR_STATUS" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/EHR_STATUS" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ROLE" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ROLE" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "AGENT" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/AGENT" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "GROUP" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/GROUP" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ORGANISATION" + "const": "ORIGINAL_VERSION" } }, "required": [ @@ -3756,14 +3658,14 @@ ] }, "then": { - "$ref": "#/definitions/ORGANISATION" + "$ref": "#/definitions/ORIGINAL_VERSION" } }, { "if": { "properties": { "_type": { - "const": "PERSON" + "const": "IMPORTED_VERSION" } }, "required": [ @@ -3771,7 +3673,7 @@ ] }, "then": { - "$ref": "#/definitions/PERSON" + "$ref": "#/definitions/IMPORTED_VERSION" } } ] @@ -4003,7 +3905,6 @@ "required": [ "contribution", "commit_audit", - "uid", "lifecycle_state" ], "properties": { @@ -9861,7 +9762,6 @@ "type": "object", "required": [ "archetype_node_id", - "archetype_details", "name" ], "properties": { @@ -11801,7 +11701,6 @@ "type": "object", "required": [ "system_id", - "time_committed", "change_type", "committer", "reason", diff --git a/components/openehr_api_1.0.3_all.json b/components/openehr_api_1.0.3_all.json index 2ffe5d1..5bd31e8 100644 --- a/components/openehr_api_1.0.3_all.json +++ b/components/openehr_api_1.0.3_all.json @@ -365,7 +365,6 @@ "type": "object", "required": [ "system_id", - "time_committed", "change_type", "committer" ], @@ -3579,7 +3578,6 @@ "CONTRIBUTION": { "type": "object", "required": [ - "uid", "audit", "versions" ], @@ -3656,14 +3654,8 @@ "_type": { "type": "string", "enum": [ - "COMPOSITION", - "FOLDER", - "EHR_STATUS", - "ROLE", - "AGENT", - "GROUP", - "ORGANISATION", - "PERSON" + "ORIGINAL_VERSION", + "IMPORTED_VERSION" ] } } @@ -3672,97 +3664,7 @@ "if": { "properties": { "_type": { - "const": "COMPOSITION" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/COMPOSITION" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "FOLDER" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/FOLDER" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "EHR_STATUS" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/EHR_STATUS" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ROLE" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ROLE" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "AGENT" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/AGENT" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "GROUP" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/GROUP" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ORGANISATION" + "const": "ORIGINAL_VERSION" } }, "required": [ @@ -3770,14 +3672,14 @@ ] }, "then": { - "$ref": "#/definitions/ORGANISATION" + "$ref": "#/definitions/ORIGINAL_VERSION" } }, { "if": { "properties": { "_type": { - "const": "PERSON" + "const": "IMPORTED_VERSION" } }, "required": [ @@ -3785,7 +3687,7 @@ ] }, "then": { - "$ref": "#/definitions/PERSON" + "$ref": "#/definitions/IMPORTED_VERSION" } } ] @@ -4017,7 +3919,6 @@ "required": [ "contribution", "commit_audit", - "uid", "lifecycle_state" ], "properties": { @@ -11879,7 +11780,6 @@ "type": "object", "required": [ "system_id", - "time_committed", "change_type", "committer", "reason", diff --git a/components/openehr_api_1.0.4_all.json b/components/openehr_api_1.0.4_all.json index 9b62fd9..872a225 100644 --- a/components/openehr_api_1.0.4_all.json +++ b/components/openehr_api_1.0.4_all.json @@ -376,7 +376,6 @@ "type": "object", "required": [ "system_id", - "time_committed", "change_type", "committer" ], @@ -3588,7 +3587,6 @@ "CONTRIBUTION": { "type": "object", "required": [ - "uid", "audit", "versions" ], @@ -3665,14 +3663,8 @@ "_type": { "type": "string", "enum": [ - "COMPOSITION", - "FOLDER", - "EHR_STATUS", - "ROLE", - "AGENT", - "GROUP", - "ORGANISATION", - "PERSON" + "ORIGINAL_VERSION", + "IMPORTED_VERSION" ] } } @@ -3682,97 +3674,7 @@ "if": { "properties": { "_type": { - "const": "COMPOSITION" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/COMPOSITION" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "FOLDER" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/FOLDER" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "EHR_STATUS" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/EHR_STATUS" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ROLE" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ROLE" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "AGENT" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/AGENT" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "GROUP" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/GROUP" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ORGANISATION" + "const": "ORIGINAL_VERSION" } }, "required": [ @@ -3780,14 +3682,14 @@ ] }, "then": { - "$ref": "#/definitions/ORGANISATION" + "$ref": "#/definitions/ORIGINAL_VERSION" } }, { "if": { "properties": { "_type": { - "const": "PERSON" + "const": "IMPORTED_VERSION" } }, "required": [ @@ -3795,7 +3697,7 @@ ] }, "then": { - "$ref": "#/definitions/PERSON" + "$ref": "#/definitions/IMPORTED_VERSION" } } ] @@ -4027,7 +3929,6 @@ "required": [ "contribution", "commit_audit", - "uid", "lifecycle_state" ], "properties": { @@ -11964,7 +11865,6 @@ "type": "object", "required": [ "system_id", - "time_committed", "change_type", "committer", "reason", diff --git a/components/openehr_api_1.1.0_all.json b/components/openehr_api_1.1.0_all.json index 6b8e927..3660728 100644 --- a/components/openehr_api_1.1.0_all.json +++ b/components/openehr_api_1.1.0_all.json @@ -376,7 +376,6 @@ "type": "object", "required": [ "system_id", - "time_committed", "change_type", "committer" ], @@ -3692,7 +3691,6 @@ "CONTRIBUTION": { "type": "object", "required": [ - "uid", "audit", "versions" ], @@ -3769,14 +3767,8 @@ "_type": { "type": "string", "enum": [ - "COMPOSITION", - "FOLDER", - "EHR_STATUS", - "ROLE", - "AGENT", - "GROUP", - "ORGANISATION", - "PERSON" + "ORIGINAL_VERSION", + "IMPORTED_VERSION" ] } } @@ -3785,97 +3777,7 @@ "if": { "properties": { "_type": { - "const": "COMPOSITION" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/COMPOSITION" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "FOLDER" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/FOLDER" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "EHR_STATUS" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/EHR_STATUS" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ROLE" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/ROLE" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "AGENT" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/AGENT" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "GROUP" - } - }, - "required": [ - "_type" - ] - }, - "then": { - "$ref": "#/definitions/GROUP" - } - }, - { - "if": { - "properties": { - "_type": { - "const": "ORGANISATION" + "const": "ORIGINAL_VERSION" } }, "required": [ @@ -3883,14 +3785,14 @@ ] }, "then": { - "$ref": "#/definitions/ORGANISATION" + "$ref": "#/definitions/ORIGINAL_VERSION" } }, { "if": { "properties": { "_type": { - "const": "PERSON" + "const": "IMPORTED_VERSION" } }, "required": [ @@ -3898,7 +3800,7 @@ ] }, "then": { - "$ref": "#/definitions/PERSON" + "$ref": "#/definitions/IMPORTED_VERSION" } } ] @@ -4198,7 +4100,6 @@ "required": [ "contribution", "commit_audit", - "uid", "lifecycle_state" ], "properties": { @@ -12281,7 +12182,6 @@ "type": "object", "required": [ "system_id", - "time_committed", "change_type", "committer", "reason",