Every API here is available over the APIs.io API and to AI agents over MCP.
{
"openapi": "3.1.1",
"info": {
"title": "Definition API",
"version": "latest",
"x-status": "STABLE",
"x-spec": "definition"
},
"security": [],
"servers": [
{
"url": "https://{baseUrl}/v1",
"description": "An example openEHR server URL.",
"variables": {
"baseUrl": {
"default": "cataniamc.prod.cadasto.com",
"description": "The (example) server base URL prefix providing openEHR services. This may contain server name, port and base path prefix."
}
}
}
],
"paths": {
"/definition/template/adl1.4": {
"post": {
"operationId": "definition_template_adl1.4_upload",
"summary": "Upload a template",
"description": "Upload a new ADL 1.4 operational template (OPT).\n",
"tags": [
"ADL1.4"
],
"parameters": [
{
"$ref": "#/components/parameters/Prefer"
}
],
"requestBody": {
"description": "",
"content": {
"application/xml": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/OperationalTemplate"
},
{
"type": "string"
}
]
},
"examples": {
"default": {
"value": "<template xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.openehr.org/v1\">\n <language>\n <terminology_id>\n <value>ISO_639-1</value>\n </terminology_id>\n <code_string>en</code_string>\n </language>\n <description>\n <original_author id=\"Original Author\">Not Specified</original_author>\n <lifecycle_state>Initial</lifecycle_state>\n <other_details id=\"MetaDataSet:Sample Set \">Template metadata sample set</other_details>\n <other_details id=\"Acknowledgements\"></other_details>\n <other_details id=\"Business Process Level\"></other_details>\n <other_details id=\"Care setting\"></other_details>\n <other_details id=\"Client group\"></other_details>\n <other_details id=\"Clinical Record Element\"></other_details>\n <other_details id=\"Copyright\"></other_details>\n <other_details id=\"Issues\"></other_details>\n <other_details id=\"Owner\"></other_details>\n <other_details id=\"Sign off\"></other_details>\n <other_details id=\"Speciality\"></other_details>\n <other_details id=\"User roles\"></other_details>\n <details>\n <language>\n <terminology_id>\n <value>ISO_639-1</value>\n </terminology_id>\n <code_string>en</code_string>\n </language>\n <purpose>Not Specified</purpose>\n </details>\n </description>\n <uid>\n <value>b4d7f203-b329-4e89-a58a-c605b19e94de</value>\n </uid>\n <template_id>\n <value>Vital Signs</value>\n </template_id>\n <concept>Vital Signs</concept>\n <definition>\n <rm_type_name>COMPOSITION</rm_type_name>\n <occurrences>\n <lower_included>true</lower_included>\n <upper_included>true</upper_included>\n <lower_unbounded>false</lower_unbounded>\n <upper_unbounded>false</upper_unbounded>\n <lower>1</lower>\n <upper>1</upper>\n </occurrences>\n <node_id>at0000</node_id>\n ..."
}
}
}
},
"required": true
},
"responses": {
"201": {
"$ref": "#/components/responses/201_Template_adl1_4_upload"
},
"400": {
"$ref": "#/components/responses/400_invalid_template_content"
},
"409": {
"$ref": "#/components/responses/409_template_already_exists"
}
}
},
"get": {
"operationId": "definition_template_adl1.4_list",
"summary": "List templates",
"description": "List the available ADL 1.4 operational templates (OPT) on the system.\n",
"tags": [
"ADL1.4"
],
"responses": {
"200": {
"$ref": "#/components/responses/200_TemplateList_adl1_4"
}
}
}
},
"/definition/template/adl1.4/{template_id}": {
"get": {
"operationId": "definition_template_adl1.4_get",
"summary": "Get a template",
"description": "Retrieves the ADL 1.4 operational template (OPT) identified by `template_id` identifier.\n\nNote that this can return either the original (canonical) `XML` based OPT format (if called with the `Accept: application/xml` request header), as well as the simplified `JSON`-based “web template” format (if called with the `Accept: application/openehr.wt+json` request header). For more details see the [data representation specification](overview.html#tag/Resources/Data-representation).\n",
"tags": [
"ADL1.4"
],
"parameters": [
{
"$ref": "#/components/parameters/template_id"
},
{
"$ref": "#/components/parameters/Accept_template"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200_Template_adl1_4_retrieved"
},
"400": {
"$ref": "#/components/responses/400_invalid_template_id"
},
"404": {
"$ref": "#/components/responses/404_unknown_template_id"
},
"406": {
"$ref": "#/components/responses/406"
}
}
}
},
"/definition/template/adl1.4/{template_id}/example": {
"get": {
"operationId": "definition_template_adl1.4_example_get",
"summary": "Example composition from template",
"description": "Generated an example COMPOSITION instance based on the ADL 1.4 operational template (OPT) identified by `template_id` identifier.\n",
"tags": [
"ADL1.4"
],
"parameters": [
{
"$ref": "#/components/parameters/template_id"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200_ExampleComposition_generated"
},
"404": {
"$ref": "#/components/responses/404_unknown_template_id_or_version"
}
}
}
},
"/definition/template/adl2": {
"post": {
"operationId": "definition_template_adl2_upload",
"summary": "Upload a template",
"description": "This endpoint is defined but not implemented by the server.",
"tags": [
"ADL2"
],
"responses": {
"501": {
"description": "This endpoint is not implemented."
}
}
},
"get": {
"operationId": "definition_template_adl2_list",
"summary": "List templates",
"description": "This endpoint is defined but not implemented by the server.",
"tags": [
"ADL2"
],
"responses": {
"501": {
"description": "This endpoint is not implemented."
}
}
}
},
"/definition/template/adl2/{template_id}": {
"get": {
"operationId": "definition_template_adl2_get",
"summary": "Get a template",
"description": "This endpoint is defined but not implemented by the server.",
"tags": [
"ADL2"
],
"responses": {
"501": {
"description": "This endpoint is not implemented."
}
}
}
},
"/definition/template/adl2/{template_id}/{version}": {
"get": {
"operationId": "definition_template_adl2_version_get",
"summary": "Get a template at version",
"description": "This endpoint is defined but not implemented by the server.",
"tags": [
"ADL2"
],
"responses": {
"501": {
"description": "This endpoint is not implemented"
}
}
}
},
"/definition/query/{qualified_query_name}": {
"get": {
"operationId": "definition_query_list",
"summary": "List stored queries",
"description": "Retrieves list of all stored queries on the system matched by `qualified_query_name` as pattern.\n\nIf pattern should given be in the format of `[{namespace}::]{query-name}`, and when is empty, it will be treated as \"wildcard\" in the search. \n\nExamples:\n - `GET https://cataniamc.prod.cadasto.com/v1/definition/query/org.openehr` will list all versions of all queries with names starting with `org.openehr`\n - `GET https://cataniamc.prod.cadasto.com/v1/definition/query/org.openehr::compositions` will list all versions of the query named `org.openehr::compositions`\n",
"tags": [
"Query"
],
"parameters": [
{
"$ref": "#/components/parameters/qualified_query_name"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200_QueryList"
}
}
},
"put": {
"operationId": "definition_query_store.yaml",
"summary": "Store a query",
"description": "Stores a new query, or updates an existing query on the system.\n",
"tags": [
"Query"
],
"parameters": [
{
"$ref": "#/components/parameters/qualified_query_name"
},
{
"$ref": "#/components/parameters/query_type"
}
],
"requestBody": {
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/AQL"
},
"examples": {
"default": {
"value": "SELECT c FROM\n EHR e\n CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.encounter.v1]\n CONTAINS OBSERVATION obs[openEHR-EHR-OBSERVATION.blood_pressure.v1]\nWHERE\n obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude >= $systolic_bp"
}
}
}
},
"required": true
},
"responses": {
"200": {
"$ref": "#/components/responses/200_StoredQuery_stored"
},
"400": {
"$ref": "#/components/responses/400_StoredQuery"
}
}
}
},
"/definition/query/{qualified_query_name}/{version}": {
"put": {
"operationId": "definition_query_version_store.yaml",
"summary": "Store a query version",
"description": "This endpoint is defined but not implemented by the server.",
"tags": [
"Query"
],
"responses": {
"501": {
"description": "This endpoint is not implemented."
}
}
},
"get": {
"operationId": "definition_query_version_get",
"summary": "Get stored query at version",
"description": "Retrieves the definition of a particular stored query (at specified version) and its associated metadata.\n",
"tags": [
"Query"
],
"parameters": [
{
"$ref": "#/components/parameters/qualified_query_name"
},
{
"$ref": "#/components/parameters/version"
}
],
"responses": {
"200": {
"$ref": "#/components/responses/200_StoredQuery_get"
},
"404": {
"$ref": "#/components/responses/404_Query_version"
}
}
}
}
},
"tags": [
{
"name": "ADL1.4",
"x-displayName": "ADL1.4 TEMPLATE",
"description": "Management of [AOM and ADL 1.4](https://specifications.openehr.org/releases/AM/latest) Operational Templates (OPTs). \nThese templates can be created using [modelling tools](https://www.openehr.org/downloads/modellingtools) such as the Template Designer and the Archetype Designer. \n\nOperational templates simplify the creation of openEHR-based input or storage implementations by, for a specific COMPOSITION template (use case), collecting all labels, requirements and constraints from all contained archetypes and sub-templates into a single easily parsed file. \nThis file can be a basis for UI-generation/creation and for data validation.\n"
},
{
"name": "ADL2",
"x-displayName": "ADL2 TEMPLATE",
"description": "Management of [AOM2](https://specifications.openehr.org/releases/AM/latest/AOM2.html#_templates) templates.\n\nSee also [ADL2 Template specifications](https://specifications.openehr.org/releases/AM/latest/ADL2.html#_templates).\n"
},
{
"name": "Query",
"x-displayName": "Stored Query",
"x-summary": "",
"description": "Management of [stored (registered) queries](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_registered_queries) in the system.\nActions upon resources of this group are also formally described in the [I_DEFINITION_QUERY](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_definition_query_interface) Abstract Service Model interface.\n\nStored queries are identified by their [qualified name and version](query.html#tag/Qualified_query_name).\nThey can be executed using the [query endpoint](query.html#tag/Query/operation/query_execute_stored_query_body).\n"
},
{
"name": "TemplateList_schema",
"x-displayName": "Template list",
"description": "This resource represents the list of `Template` meta-information associated with uploaded templates - see also [Service Model - Definition Package](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_definition_package).\n\n<SchemaDefinition schemaRef=\"#/components/schemas/TemplateList\" />\n"
},
{
"name": "Template_schema",
"x-displayName": "Template",
"description": "The following resources are formally specified in the [Archetype Model](https://specifications.openehr.org/releases/AM/latest) as AOM/ADL 1.4 Operational Templates (OPTs) and as [AOM2 templates](https://specifications.openehr.org/releases/AM/latest/AOM2.html#_templates).\n<div class=\"mb-5\"></div>\n\nThe AOM/ADL 1.4 `OPERATIONAL_TEMPLATE` resource:\n<SchemaDefinition schemaRef=\"#/components/schemas/OperationalTemplate\" />\n\nThe `WebTemplate` alternative resource:\n<SchemaDefinition schemaRef=\"#/components/schemas/WebTemplate\" />\n"
},
{
"name": "StoredQuery_schema",
"x-displayName": "Stored Query",
"description": "This resource represents the definition of a stored Query and is formally specified in the Service Model as [Registered Queries](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_registered_queries).\n\n<SchemaDefinition schemaRef=\"#/components/schemas/StoredQuery\" />\n"
}
],
"x-tagGroups": [
{
"name": "Resource endpoints",
"tags": [
"ADL1.4",
"ADL2",
"Query"
]
},
{
"name": "Resource schema",
"tags": [
"TemplateList_schema",
"Template_schema",
"StoredQuery_schema"
]
}
],
"components": {
"schemas": {
"TemplateMetadata": {
"title": "TemplateMetadata",
"required": [
"template_id",
"concept",
"archetype_id",
"created_timestamp"
],
"type": "object",
"properties": {
"template_id": {
"type": "string"
},
"version": {
"type": "string"
},
"concept": {
"type": "string"
},
"archetype_id": {
"type": "string"
},
"created_timestamp": {
"type": "string"
}
},
"description": "Uploaded TEMPLATE meta information.",
"examples": [
{
"template_id": "openEHR-EHR-COMPOSITION.t_vital_signs.v1.0.0",
"version": "1.0.1",
"concept": "Vital Signs",
"archetype_id": "openEHR-EHR-COMPOSITION.encounter.v1",
"created_timestamp": "2017-08-14T19:24:56.639Z"
}
]
},
"TemplateList": {
"title": "TemplateList",
"type": "array",
"items": {
"$ref": "#/components/schemas/TemplateMetadata"
},
"description": "List of uploaded TEMPLATE resources.\n"
},
"OperationalTemplate": {
"title": "OPERATIONAL_TEMPLATE",
"type": "object",
"xml": {
"name": "response200"
}
},
"LocalizedNames": {
"title": "LocalizedNames",
"required": [
"en"
],
"type": "object",
"properties": {
"en": {
"type": "string"
}
},
"examples": [
{
"en": "Vital Signs"
}
]
},
"LocalizedDescriptions": {
"title": "LocalizedDescriptions",
"required": [
"sl"
],
"type": "object",
"properties": {
"sl": {
"type": "string"
}
},
"examples": [
{
"sl": "Generic encounter or progress note composition"
}
]
},
"LocalizedNames1": {
"title": "LocalizedNames1",
"required": [
"sl"
],
"type": "object",
"properties": {
"sl": {
"type": "string"
}
},
"examples": [
{
"sl": "Podrobnosti"
}
]
},
"LocalizedNames2": {
"title": "LocalizedNames2",
"required": [
"sl"
],
"type": "object",
"properties": {
"sl": {
"type": "string"
},
"en": {
"type": "string"
}
},
"examples": [
{
"sl": "Tagi"
}
]
},
"Annotations": {
"title": "Annotations",
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"default": {
"type": "string"
}
},
"examples": [
{
"comment": "Tags applied to the composition. They can contain various ids, such as episode id, central case id or other types of information forming composition meta-data."
}
]
},
"Precision": {
"title": "Precision",
"required": [
"minOp",
"min",
"maxOp",
"max"
],
"type": "object",
"properties": {
"minOp": {
"type": "string"
},
"min": {
"type": "integer",
"format": "int32"
},
"maxOp": {
"type": "string"
},
"max": {
"type": "integer",
"format": "int32"
}
},
"examples": [
{
"minOp": ">=",
"min": 1,
"maxOp": "<=",
"max": 1
}
]
},
"Range": {
"title": "Range",
"required": [
"minOp",
"min"
],
"type": "object",
"properties": {
"minOp": {
"type": "string"
},
"min": {
"type": "integer",
"format": "int32"
},
"maxOp": {
"type": "string"
},
"max": {
"type": "integer",
"format": "int32"
}
},
"examples": [
{
"minOp": ">=",
"min": 0,
"maxOp": "<",
"max": 1000
}
]
},
"Validation": {
"title": "Validation",
"type": "object",
"properties": {
"precision": {
"$ref": "#/components/schemas/Precision"
},
"range": {
"$ref": "#/components/schemas/Range"
}
},
"examples": [
{
"precision": {
"minOp": ">=",
"min": 1,
"maxOp": "<=",
"max": 1
}
}
]
},
"LocalizedLabels": {
"title": "LocalizedLabels",
"required": [
"sl"
],
"type": "object",
"properties": {
"sl": {
"type": "string"
}
},
"examples": [
{
"sl": "Gol"
}
]
},
"List": {
"title": "List",
"required": [
"value",
"label"
],
"type": "object",
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
},
"validation": {
"$ref": "#/components/schemas/Validation"
},
"localizedLabels": {
"$ref": "#/components/schemas/LocalizedLabels"
},
"localizedDescriptions": {
"$ref": "#/components/schemas/LocalizedDescriptions"
}
},
"examples": [
{
"value": "°C",
"label": "°C",
"validation": {
"precision": {
"minOp": ">=",
"min": 1,
"maxOp": "<=",
"max": 1
}
}
}
]
},
"Validation1": {
"title": "Validation1",
"required": [
"range"
],
"type": "object",
"properties": {
"range": {
"$ref": "#/components/schemas/Range"
},
"precision": {
"$ref": "#/components/schemas/Precision"
}
},
"examples": [
{
"range": {
"minOp": ">=",
"min": 0,
"maxOp": "<",
"max": 1000
},
"precision": {
"minOp": ">=",
"min": 0,
"maxOp": "<=",
"max": 0
}
}
]
},
"Input": {
"title": "Input",
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"type": "string"
},
"suffix": {
"type": "string"
},
"list": {
"type": "array",
"items": {
"$ref": "#/components/schemas/List"
},
"description": ""
},
"defaultValue": {
"type": "string"
},
"validation": {
"$ref": "#/components/schemas/Validation1"
}
},
"examples": [
{
"type": "TEXT"
}
]
},
"SNOMEDCT": {
"title": "SNOMEDCT",
"required": [
"value",
"terminologyId"
],
"type": "object",
"properties": {
"value": {
"type": "string"
},
"terminologyId": {
"type": "string"
}
},
"examples": [
{
"value": "163030003",
"terminologyId": "SNOMED-CT(2003)"
}
]
},
"TermBindings": {
"title": "TermBindings",
"required": [
"SNOMED-CT"
],
"type": "object",
"properties": {
"SNOMED-CT": {
"$ref": "#/components/schemas/SNOMEDCT"
}
},
"examples": [
{
"SNOMED-CT": {
"value": "163030003",
"terminologyId": "SNOMED-CT(2003)"
}
}
]
},
"Input1": {
"title": "Input1",
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"type": "string"
},
"suffix": {
"type": "string"
}
},
"examples": [
{
"type": "INTEGER"
}
]
},
"Child3": {
"title": "Child3",
"required": [
"id",
"localizedName",
"rmType",
"nodeId",
"min",
"max",
"localizedNames",
"localizedDescriptions",
"aqlPath",
"inputs"
],
"type": "object",
"properties": {
"id": {
"type": "string"
},
"localizedName": {
"type": "string"
},
"rmType": {
"type": "string"
},
"nodeId": {
"type": "string"
},
"min": {
"type": "integer",
"format": "int32"
},
"max": {
"type": "integer",
"format": "int32"
},
"localizedNames": {
"$ref": "#/components/schemas/LocalizedNames1"
},
"localizedDescriptions": {
"$ref": "#/components/schemas/LocalizedDescriptions"
},
"aqlPath": {
"type": "string"
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Input1"
},
"description": ""
},
"name": {
"type": "string"
}
},
"examples": [
{
"id": "count_value",
"localizedName": "Size",
"rmType": "DV_COUNT",
"nodeId": "",
"min": 0,
"max": 1,
"localizedNames": {
"sl": "Velikost"
},
"localizedDescriptions": {
"sl": "Velikost naprave"
},
"aqlPath": "/content[openEHR-EHR-OBSERVATION.blood_pressure.v1]/protocol[at0011]/items[openEHR-EHR-CLUSTER.device.v1]/items[at0016]/value",
"inputs": [
{
"type": "INTEGER"
}
]
}
]
},
"Child2": {
"title": "Child2",
"required": [
"id",
"name",
"localizedName",
"rmType",
"nodeId",
"min",
"max",
"localizedNames",
"localizedDescriptions",
"aqlPath",
"inputs"
],
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"localizedName": {
"type": "string"
},
"rmType": {
"type": "string"
},
"nodeId": {
"type": "string"
},
"min": {
"type": "integer",
"format": "int32"
},
"max": {
"type": "integer",
"format": "int32"
},
"localizedNames": {
"$ref": "#/components/schemas/LocalizedNames2"
},
"localizedDescriptions": {
"$ref": "#/components/schemas/LocalizedDescriptions"
},
"annotations": {
"$ref": "#/components/schemas/Annotations"
},
"aqlPath": {
"type": "string"
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Input"
},
"description": ""
},
"dependsOn": {
"type": "array",
"items": {
"type": "string"
},
"description": ""
},
"inContext": {
"type": "boolean"
},
"termBindings": {
"$ref": "#/components/schemas/TermBindings"
},
"children": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Child3"
},
"description": ""
}
},
"examples": [
{
"id": "tags",
"name": "Tags",
"localizedName": "Tags",
"rmType": "DV_TEXT",
"nodeId": "at0008",
"min": 1,
"max": -1,
"localizedNames": {
"sl": "Tagi"
},
"localizedDescriptions": {
"sl": "*"
},
"annotations": {
"comment": "Tags applied to the composition. They can contain various ids, such as episode id, central case id or other types of information forming composition meta-data."
},
"aqlPath": "/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.context_detail.v1]/items[at0008]/value",
"inputs": [
{
"type": "TEXT"
}
]
}
]
},
"List1": {
"title": "List1",
"required": [
"value",
"label",
"localizedLabels",
"localizedDescriptions"
],
"type": "object",
"properties": {
"value": {
"type": "string"
},
"label": {
"type": "string"
},
"localizedLabels": {
"$ref": "#/components/schemas/LocalizedLabels"
},
"localizedDescriptions": {
"$ref": "#/components/schemas/LocalizedDescriptions"
}
},
"examples": [
{
"value": "at0022",
"label": "Mouth",
"localizedLabels": {
"sl": "Usta"
},
"localizedDescriptions": {
"sl": "*Temperature is measured within the mouth(en)"
}
}
]
},
"Input2": {
"title": "Input2",
"required": [
"type"
],
"type": "object",
"properties": {
"type": {
"type": "string"
},
"suffix": {
"type": "string"
},
"list": {
"type": "array",
"items": {
"$ref": "#/components/schemas/List1"
},
"description": ""
}
},
"examples": [
{
"type": "DATETIME"
}
]
},
"Annotations1": {
"title": "Annotations1",
"type": "object",
"properties": {
"comment": {
"type": "string"
},
"view:pass_through": {
"type": "string"
}
},
"examples": [
{
"comment": "Perloff D, Grim C, Flack J, Frohlich ED, Hill M, McDonald M, Morgenstern BZ. Human blood pressure determination by sphygmomanometry. Circulation 1993;88;2460-2470. "
}
]
},
"Child1": {
"title": "Child1",
"required": [
"id",
"name",
"rmType",
"min",
"max",
"aqlPath"
],
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"localizedName": {
"type": "string"
},
"rmType": {
"type": "string"
},
"nodeId": {
"type": "string"
},
"min": {
"type": "integer",
"format": "int32"
},
"max": {
"type": "integer",
"format": "int32"
},
"localizedNames": {
"$ref": "#/components/schemas/LocalizedNames1"
},
"localizedDescriptions": {
"$ref": "#/components/schemas/LocalizedDescriptions"
},
"aqlPath": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Child2"
},
"description": ""
},
"inputs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Input2"
},
# --- truncated at 32 KB (60 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cadasto/refs/heads/main/openapi/cadasto-definition-api-openapi.json