Skip to content

Instantly share code, notes, and snippets.

@pieterbos
Last active Mar 8, 2021
Embed
What would you like to do?
{
"$schema": "http://json-schema.org/draft-07/schema",
"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": "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": "ITEM_TREE"
}
}
},
"then": {
"$ref": "#/definitions/ITEM_TREE"
}
}
],
"definitions": {
"VERSION_STATUS": {
"type": "object",
"required": [
],
"properties": {
"_type": {
"type": "string",
"pattern": "^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",
"pattern": "^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",
"pattern": "^AUDIT_DETAILS(<.*>)?$"
}
},
"additionalProperties": false
},
"TERMINOLOGY_ID": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string"
},
"_type": {
"type": "string",
"pattern": "^TERMINOLOGY_ID(<.*>)?$"
}
},
"additionalProperties": false
},
"EHR": {
"type": "object",
"required": [
"system_id",
"ehr_id",
"time_created",
"ehr_access",
"ehr_status",
"contributions"
],
"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",
"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"
}
}
]
},
"ehr_status": {
"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"
}
}
]
},
"directory": {
"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"
}
}
]
},
"folders": {
"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"
}
}
]
}
},
"compositions": {
"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"
}
}
]
}
},
"contributions": {
"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",
"pattern": "^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",
"pattern": "^DV_TIME(<.*>)?$"
}
},
"additionalProperties": false
},
"EXTRACT_MANIFEST": {
"type": "object",
"required": [
],
"properties": {
"entities": {
"type": "array",
"items": {
"$ref": "#/definitions/EXTRACT_ENTITY_MANIFEST"
},
"minItems": 1
},
"_type": {
"type": "string",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"pattern": "^PARTY_RELATED(<.*>)?$"
}
},
"additionalProperties": false
},
"ISO_OID": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "string"
},
"_type": {
"type": "string",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"pattern": "^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",
"patte