{ "openapi": "3.1.1", "info": { "title": "EHR API", "version": "latest", "x-status": "STABLE", "x-spec": "ehr" }, "servers": [ { "url": "https://{baseUrl}/openehr/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." } } } ], "security": [], "paths": { "/ehr": { "post": { "operationId": "ehr_create", "summary": "Create EHR", "description": "Create a new `EHR` with an auto-generated identifier.\n\nAn EHR_STATUS resource needs to be always created and committed in the new EHR.\nThis resource MAY be also supplied by the client as the request body.\nIf not supplied, a default EHR_STATUS will be used by the service with following attributes:\n - `is_queryable`: true\n - `is_modifiable`: true\n - `subject`: a PARTY_SELF object\n\nAll other required EHR attributes and resources will be automatically created as needed by the [EHR creation semantics](https://specifications.openehr.org/releases/RM/latest/ehr.html#_ehr_creation_semantics).\n\nThe optional `cadasto-person-uid` request header links the new EHR to an existing\n[Demographic](/docs/guides/openehr#demographics) PERSON in the same contribution.\nSee the [Cadasto demographic link guide](/docs/guides/cadasto-demographic-link).\n", "tags": [ "EHR" ], "parameters": [ { "$ref": "#/components/parameters/Prefer" }, { "$ref": "#/components/parameters/cadasto-person-uid" } ], "requestBody": { "description": "An EHR_STATUS resource MAY be also supplied by the client as the request body.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EhrStatus" } } }, "required": false }, "responses": { "201": { "$ref": "#/components/responses/201_EHR" }, "400": { "$ref": "#/components/responses/400" }, "409": { "$ref": "#/components/responses/409_EHR" }, "422": { "$ref": "#/components/responses/422_cadasto_person_uid_unknown" } } }, "get": { "operationId": "ehr_get_by_subject", "summary": "Get EHR by subject id", "description": "Retrieve the EHR with the specified `subject_id` and `subject_namespace`.\n\nThese subject parameters will be matched against EHR's EHR_STATUS.subject.external_ref.id.value and \nEHR_STATUS.subject.external_ref.namespace values.\n", "tags": [ "EHR" ], "parameters": [ { "$ref": "#/components/parameters/subject_id" }, { "$ref": "#/components/parameters/subject_namespace" } ], "responses": { "200": { "$ref": "#/components/responses/200_EHR" }, "404": { "$ref": "#/components/responses/404_EHR_subject" } } } }, "/ehr/{ehr_id}": { "put": { "operationId": "ehr_create_with_id", "summary": "Create EHR with id", "description": "Create a new EHR with the specified `ehr_id` identifier.\n\nThe value of the `ehr_id` unique identifier MUST be valid [HIER_OBJECT_ID](https://specifications.openehr.org/releases/BASE/latest/base_types.html#_hier_object_id_class) value.\nIt is strongly RECOMMENDED that an UUID always be used for this.\n\nAn EHR_STATUS resource needs to be always created and committed in the new EHR.\nThis resource MAY be also supplied by the client as the request body.\nIf not supplied, a default EHR_STATUS will be used by the service with following attributes:\n - `is_queryable`: true\n - `is_modifiable`: true\n - `subject`: a PARTY_SELF object\n\nAll other required EHR attributes and resources will be automatically created as needed by the [EHR creation semantics](https://specifications.openehr.org/releases/RM/latest/ehr.html#_ehr_creation_semantics).\n\nThe optional `cadasto-person-uid` request header links the new EHR to an existing\n[Demographic](/docs/guides/openehr#demographics) PERSON in the same contribution.\nSee the [Cadasto demographic link guide](/docs/guides/cadasto-demographic-link).\n", "tags": [ "EHR" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/Prefer" }, { "$ref": "#/components/parameters/cadasto-person-uid" } ], "requestBody": { "description": "An EHR_STATUS resource MAY be also supplied by the client as the request body.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EhrStatus" } } }, "required": false }, "responses": { "201": { "$ref": "#/components/responses/201_EHR" }, "400": { "$ref": "#/components/responses/400" }, "409": { "$ref": "#/components/responses/409_EHR_with_id" }, "422": { "$ref": "#/components/responses/422_cadasto_person_uid_unknown" } } }, "get": { "operationId": "ehr_get_by_id", "summary": "Get EHR by id", "description": "Retrieve the EHR with the specified `ehr_id`.\n\nSend the optional `include-cadasto-person-uid` request header to also receive the\nlinked PERSON UID in the `cadasto-person-uid` response header — see the\n[Cadasto demographic link guide](/docs/guides/cadasto-demographic-link).\n", "tags": [ "EHR" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/include-cadasto-person-uid" } ], "responses": { "200": { "$ref": "#/components/responses/200_EHR_get_by_id" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id" } } } }, "/ehr/{ehr_id}/ehr_status/{version_uid}": { "get": { "operationId": "ehr_status_get_by_version_id", "summary": "Get EHR_STATUS by version id", "description": "Retrieves a particular version of the EHR_STATUS identified by `version_uid` and associated with the EHR identified by `ehr_id`.\n\nSend `Prefer: include_item_tags` to also receive the `openehr-item-tag` response header with the current tags.\n", "tags": [ "EHR_STATUS" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/version_uid" }, { "$ref": "#/components/parameters/Prefer" } ], "responses": { "200": { "$ref": "#/components/responses/200_EHR_STATUS_retrieved" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_version_uid" } } } }, "/ehr/{ehr_id}/ehr_status": { "get": { "operationId": "ehr_status_get_at_time", "summary": "Get EHR_STATUS at time", "description": "Retrieves a version of the EHR_STATUS associated with the EHR identified by `ehr_id`.\n\nIf `version_at_time` is supplied, retrieves the version extant _at specified time_, otherwise retrieves the _latest_ EHR_STATUS version.\n\nSend `Prefer: include_item_tags` to also receive the `openehr-item-tag` response header with the current tags.\n", "tags": [ "EHR_STATUS" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/version_at_time" }, { "$ref": "#/components/parameters/Prefer" } ], "responses": { "200": { "$ref": "#/components/responses/200_EHR_STATUS_retrieved" }, "400": { "$ref": "#/components/responses/400_invalid_version_at_time" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_no_version_at_time" } } }, "put": { "operationId": "ehr_status_update", "summary": "Update EHR_STATUS", "description": "Updates EHR_STATUS associated with the EHR identified by `ehr_id`.\n\nThe existing latest `version_uid` of EHR_STATUS resource (i.e. the `preceding_version_uid`) must be specified in the `If-Match` header.\n\nThe response will contain the updated EHR_STATUS resource when the `Prefer` header has a value of `return=representation`.\n\nThe optional `openehr-item-tag` request header replaces all ITEM_TAG resources associated with the target in the same transaction as the update.\n\nThe optional `cadasto-person-uid` request header links the EHR to a PERSON in the\nsame contribution. The link is **append-only** here: an EHR that already has a\nlink cannot be re-linked via this header (`409 Conflict`). See the\n[Cadasto demographic link guide](/docs/guides/cadasto-demographic-link).\n", "tags": [ "EHR_STATUS" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/If-Match" }, { "$ref": "#/components/parameters/Prefer" }, { "$ref": "#/components/parameters/openehr-item-tag" }, { "$ref": "#/components/parameters/cadasto-person-uid" } ], "requestBody": { "description": "The new EHR_STATUS.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EhrStatus" } } }, "required": true }, "responses": { "200": { "$ref": "#/components/responses/200_EHR_STATUS_updated" }, "204": { "$ref": "#/components/responses/204_EHR_STATUS" }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id" }, "409": { "$ref": "#/components/responses/409_EHR_STATUS_cadasto_person_uid" }, "412": { "$ref": "#/components/responses/412_EHR_STATUS" }, "422": { "$ref": "#/components/responses/422_cadasto_person_uid_unknown" } } } }, "/ehr/{ehr_id}/versioned_ehr_status": { "get": { "operationId": "versioned_ehr_status_get", "summary": "Get versioned EHR_STATUS", "description": "Retrieves a VERSIONED_EHR_STATUS associated with an EHR identified by `ehr_id`.\n", "tags": [ "EHR_STATUS" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" } ], "responses": { "200": { "$ref": "#/components/responses/200_VERSIONED_EHR_STATUS" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id" } } } }, "/ehr/{ehr_id}/versioned_ehr_status/revision_history": { "get": { "operationId": "versioned_ehr_status_revision_history", "summary": "Get versioned EHR_STATUS revision history", "description": "Retrieves revision history of the VERSIONED_EHR_STATUS associated with the EHR identified by `ehr_id`.\n", "tags": [ "EHR_STATUS" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" } ], "responses": { "200": { "$ref": "#/components/responses/200_REVISION_HISTORY" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id" } } } }, "/ehr/{ehr_id}/versioned_ehr_status/version": { "get": { "operationId": "versioned_ehr_status_version_get_at_time", "summary": "Get versioned EHR_STATUS version at time", "description": "Retrieves a VERSION from the VERSIONED_EHR_STATUS associated with the EHR identified by `ehr_id`.\n\nIf `version_at_time` is supplied, retrieves the VERSION extant _at specified time_, otherwise retrieves the _latest_ VERSION.\n\nSend `Prefer: include_item_tags` to also receive the `openehr-item-tag` response header with the current tags.\n", "tags": [ "EHR_STATUS" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/version_at_time" }, { "$ref": "#/components/parameters/Prefer" } ], "responses": { "200": { "$ref": "#/components/responses/200_VERSION_at_time" }, "400": { "$ref": "#/components/responses/400_invalid_version_at_time" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_no_version_at_time" } } } }, "/ehr/{ehr_id}/versioned_ehr_status/version/{version_uid}": { "get": { "operationId": "versioned_ehr_status_version_get_by_id", "summary": "Get versioned EHR_STATUS version by id", "description": "Retrieves a VERSION identified by `version_uid` of an EHR_STATUS associated with the EHR identified by `ehr_id`.\n\nSend `Prefer: include_item_tags` to also receive the `openehr-item-tag` response header with the current tags.\n", "tags": [ "EHR_STATUS" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/version_uid" }, { "$ref": "#/components/parameters/Prefer" } ], "responses": { "200": { "$ref": "#/components/responses/200_VERSION" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_version_uid" } } } }, "/ehr/{ehr_id}/composition": { "post": { "operationId": "composition_create", "summary": "Create COMPOSITION", "description": "Creates the first version of a new COMPOSITION in the EHR identified by `ehr_id`.\n\nThe optional `openehr-item-tag` request header attaches ITEM_TAG resources to the new COMPOSITION in the same transaction as the create.\n", "tags": [ "COMPOSITION" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/Prefer" }, { "$ref": "#/components/parameters/openehr-item-tag" } ], "requestBody": { "description": "The COMPOSITION.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Composition" } } }, "required": true }, "responses": { "201": { "$ref": "#/components/responses/201_COMPOSITION" }, "400": { "$ref": "#/components/responses/400_COMPOSITION" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id" }, "422": { "$ref": "#/components/responses/422_COMPOSITION" } } } }, "/ehr/{ehr_id}/composition/{uid_based_id}": { "get": { "operationId": "composition_get", "summary": "Get COMPOSITION", "description": "Retrieves a version of the COMPOSITION identified by `uid_based_id` and associated with the EHR identified by `ehr_id`.\n\nThe `uid_based_id` can take a form of an OBJECT_VERSION_ID identifier taken from VERSION.uid.value (i.e. a `version_uid`), or a form of a HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a `versioned_object_uid`).\nThe former is used to retrieve a specific known version of the COMPOSITION (e.g. one identified by `8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1`), whereas the later (e.g. an identifier like `8849182c-82ad-4088-a07f-48ead4180515`) is be used to retrieve a version from the version container whenever the _version_tree_id_ is unknown or irrelevant (such as when most recent version is requested).\n\nWhen the `uid_based_id` has the form of a HIER_OBJECT_ID, if the `version_at_time` is supplied, retrieves the version extant _at specified time_, otherwise retrieves the _latest_ COMPOSITION version.\n\nSee [Resource identification](overview.html#tag/Resources/Resource-identification) for more details about the identifiers usage and meaning.\n\nSend `Prefer: include_item_tags` to also receive the `openehr-item-tag` response header with the current tags.\n", "tags": [ "COMPOSITION" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/uid_based_id" }, { "$ref": "#/components/parameters/version_at_time" }, { "$ref": "#/components/parameters/Prefer" } ], "responses": { "200": { "$ref": "#/components/responses/200_COMPOSITION_retrieved" }, "204": { "$ref": "#/components/responses/204_because_deleted_at_time" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_no_version_at_time" } } }, "put": { "operationId": "composition_update", "summary": "Update COMPOSITION", "description": "Updates COMPOSITION identified by `uid_based_id` and associated with the EHR identified by `ehr_id`.\n\nThe `uid_based_id` can take only a form of an HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a `versioned_object_uid`).\n\nIf the request body already contains a COMPOSITION.uid.value, it must match the `uid_based_id` in the URL.\n\nThe existing latest `version_uid` of COMPOSITION resource (i.e. the `preceding_version_uid`) must be specified in the `If-Match` header.\n\nThe optional `openehr-item-tag` request header replaces all ITEM_TAG resources associated with the target in the same transaction as the update.\n", "tags": [ "COMPOSITION" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/uid_based_id_as_versioned_object_uid" }, { "$ref": "#/components/parameters/If-Match" }, { "$ref": "#/components/parameters/Prefer" }, { "$ref": "#/components/parameters/openehr-item-tag" } ], "requestBody": { "description": "The new COMPOSITION.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Composition" } } }, "required": true }, "responses": { "200": { "$ref": "#/components/responses/200_COMPOSITION_updated" }, "400": { "$ref": "#/components/responses/400_COMPOSITION" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_uid_based_id" }, "412": { "$ref": "#/components/responses/412_COMPOSITION" }, "422": { "$ref": "#/components/responses/422_COMPOSITION" } } }, "delete": { "operationId": "composition_delete", "summary": "Delete COMPOSITION", "description": "Deletes the COMPOSITION identified by `uid_based_id` and associated with the EHR identified by `ehr_id`.\n\nThe `uid_based_id` MUST be in a form of an OBJECT_VERSION_ID identifier taken from the last (most recent) VERSION.uid.value, representing the `preceding_version_uid` to be deleted.\n", "tags": [ "COMPOSITION" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/uid_based_id_as_version_uid" } ], "responses": { "204": { "$ref": "#/components/responses/204_COMPOSITION_deleted" }, "400": { "$ref": "#/components/responses/400_already_deleted" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_uid_based_id" }, "409": { "$ref": "#/components/responses/409_COMPOSITION_with_uid_based_id" } } } }, "/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}": { "get": { "operationId": "versioned_composition_get", "summary": "Get versioned COMPOSITION", "description": "Retrieves a VERSIONED_COMPOSITION identified by `versioned_object_uid` and associated with the EHR identified by `ehr_id`.\n", "tags": [ "COMPOSITION" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/versioned_object_uid_COMPOSITION" } ], "responses": { "200": { "$ref": "#/components/responses/200_VERSIONED_COMPOSITION" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_versioned_object_uid" } } } }, "/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/revision_history": { "get": { "operationId": "versioned_composition_revision_history", "summary": "Get versioned COMPOSITION revision history", "description": "Retrieves revision history of the VERSIONED_COMPOSITION identified by `versioned_object_uid` and associated with the EHR identified by `ehr_id`.\n", "tags": [ "COMPOSITION" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/versioned_object_uid_COMPOSITION" } ], "responses": { "200": { "$ref": "#/components/responses/200_REVISION_HISTORY" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_versioned_object_uid" } } } }, "/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version": { "get": { "operationId": "versioned_composition_version_get_at_time", "summary": "Get versioned COMPOSITION version at time", "description": "Retrieves a VERSION from the VERSIONED_COMPOSITION identified by `versioned_object_uid` and associated with the EHR identified by `ehr_id`.\n\nIf `version_at_time` is supplied, retrieves the VERSION extant _at specified time_, otherwise retrieves the _latest_ VERSION.\n\nSend `Prefer: include_item_tags` to also receive the `openehr-item-tag` response header with the current tags.\n", "tags": [ "COMPOSITION" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/versioned_object_uid_COMPOSITION" }, { "$ref": "#/components/parameters/version_at_time" }, { "$ref": "#/components/parameters/Prefer" } ], "responses": { "200": { "$ref": "#/components/responses/200_VERSION_of_COMPOSITION_at_time" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_versioned_object_uid_or_no_version_at_time" } } } }, "/ehr/{ehr_id}/versioned_composition/{versioned_object_uid}/version/{version_uid}": { "get": { "operationId": "versioned_composition_version_get_by_id", "summary": "Get versioned COMPOSITION version by id", "description": "Retrieves a VERSION identified by `version_uid` of a VERSIONED_COMPOSITION identified by `versioned_object_uid` and associated with the EHR identified by `ehr_id`.\n\nSend `Prefer: include_item_tags` to also receive the `openehr-item-tag` response header with the current tags.\n", "tags": [ "COMPOSITION" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/versioned_object_uid_COMPOSITION" }, { "$ref": "#/components/parameters/version_uid_COMPOSITION" }, { "$ref": "#/components/parameters/Prefer" } ], "responses": { "200": { "$ref": "#/components/responses/200_VERSION" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_versioned_object_uid_or_version_uid" } } } }, "/ehr/{ehr_id}/directory": { "post": { "operationId": "directory_create", "summary": "Create directory", "description": "This endpoint is defined but not implemented by the server.", "tags": [ "DIRECTORY" ], "responses": { "501": { "description": "This endpoint is not implemented." } } }, "put": { "operationId": "directory_update", "summary": "Update directory", "description": "Updates directory FOLDER associated with the EHR identified by `ehr_id`.\n\nThe existing latest `version_uid` of directory FOLDER resource (i.e. the `preceding_version_uid`) must be specified in the `If-Match` header.\n", "tags": [ "DIRECTORY" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/If-Match" }, { "$ref": "#/components/parameters/Prefer" } ], "requestBody": { "description": "The new directory.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Folder" } } }, "required": true }, "responses": { "200": { "$ref": "#/components/responses/200_directory_updated" }, "204": { "$ref": "#/components/responses/204_directory_updated" }, "400": { "$ref": "#/components/responses/400_FOLDER" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id" }, "412": { "$ref": "#/components/responses/412_directory" } } }, "delete": { "operationId": "directory_delete", "summary": "Delete directory", "description": "This endpoint is defined but not implemented by the server.", "tags": [ "DIRECTORY" ], "responses": { "501": { "description": "This endpoint is not implemented." } } }, "get": { "operationId": "directory_get_at_time", "summary": "Get folder in directory version at time", "description": "Retrieves the version of the directory FOLDER associated with the EHR identified by `ehr_id`. \nIf `version_at_time` is supplied, retrieves the version extant _at specified time_, otherwise retrieves the _latest_ directory FOLDER version. \n\nIf `path` is supplied, retrieves from the directory only the sub-FOLDER that is associated with that path.\n", "tags": [ "DIRECTORY" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/version_at_time" }, { "$ref": "#/components/parameters/path" } ], "responses": { "200": { "$ref": "#/components/responses/200_FOLDER_retrieved" }, "204": { "$ref": "#/components/responses/204_because_deleted_at_time" }, "404": { "$ref": "#/components/responses/404_directory_unknown_ehr_id_or_no_version_at_time_or_no_path" } } } }, "/ehr/{ehr_id}/directory/{version_uid}": { "get": { "operationId": "directory_get_by_version_id", "summary": "Get folder in directory version", "description": "Retrieves a particular version of the directory FOLDER identified by `version_uid` and associated with the EHR identified by `ehr_id`.\n\nIf `path` is supplied, retrieves from the directory only the sub-FOLDER that is associated with that path.\n", "tags": [ "DIRECTORY" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/version_uid" }, { "$ref": "#/components/parameters/path" } ], "responses": { "200": { "$ref": "#/components/responses/200_FOLDER_retrieved" }, "404": { "$ref": "#/components/responses/404_directory_unknown_ehr_id_or_no_version_uid_or_no_path" } } } }, "/ehr/{ehr_id}/contribution": { "post": { "operationId": "contribution_create", "summary": "Create CONTRIBUTION", "description": "We will use the relaxed CONTRIBUTION with the following optional attributes:\n - `uid`: when provided, it will be accepted in case is not in-use, otherwise error will be returned\n - `audit.time_committed`: server will always set it\n - `audit.system_id`: when provided, it will be validated\n", "tags": [ "CONTRIBUTION" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/Prefer" } ], "requestBody": { "description": "The CONTRIBUTION.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NewContribution" } } }, "required": true }, "responses": { "201": { "$ref": "#/components/responses/201_CONTRIBUTION" }, "400": { "$ref": "#/components/responses/400_CONTRIBUTION" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id" }, "409": { "$ref": "#/components/responses/409" } } } }, "/ehr/{ehr_id}/contribution/{contribution_uid}": { "get": { "operationId": "contribution_get", "summary": "Get CONTRIBUTION by id", "description": "Retrieves a CONTRIBUTION identified by `contribution_uid` and associated with the EHR identified by `ehr_id`.\n", "tags": [ "CONTRIBUTION" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/contribution_uid" } ], "responses": { "200": { "$ref": "#/components/responses/200_CONTRIBUTION" }, "404": { "$ref": "#/components/responses/404_CONTRIBUTION" } } } }, "/ehr/{ehr_id}/tags": { "get": { "operationId": "ehr_tags_get", "summary": "Get EHR tags", "description": "Retrieves the list of ITEM_TAG resources associated with any target VERSIONED_OBJECT\nwithin the EHR identified by `ehr_id`.\n\nThe list can be filtered by `tag_key`, `tag_value`, or `tag_target_path` query parameters.\nWhen no filter is provided, all ITEM_TAG resources for the EHR are returned.\n\nReturns an empty list when the EHR has no tags matching the filter.\n\nMore than one ITEM_TAG may be associated with a single target — they are uniquely identified\nby their `(key, target_path)` pair.\n", "tags": [ "ITEM_TAG" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/tag_key" }, { "$ref": "#/components/parameters/tag_value" }, { "$ref": "#/components/parameters/tag_target_path" } ], "responses": { "200": { "$ref": "#/components/responses/200_COMPOSITION_ItemTagList_retrieved" }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id" } } } }, "/ehr/{ehr_id}/composition/{uid_based_id}/tags": { "get": { "operationId": "composition_tags_get", "summary": "Get COMPOSITION tags", "description": "Retrieves the list of all ITEM_TAG resources associated with the target COMPOSITION\nidentified by `uid_based_id` and owned by the EHR identified by `ehr_id`.\n\n> **Cadasto exception:** the `uid_based_id` must be a `versioned_object_uid` (HIER_OBJECT_ID).\n> Targeting a specific version with an OBJECT_VERSION_ID is **not** supported.\n\nReturns an empty list when the target has no tags. More than one ITEM_TAG may be\nassociated with a single target — they are uniquely identified by their `(key, target_path)` pair.\n", "tags": [ "ITEM_TAG" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/uid_based_id_for_tags" } ], "responses": { "200": { "$ref": "#/components/responses/200_COMPOSITION_ItemTagList_retrieved" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_uid_based_id" } } }, "put": { "operationId": "composition_tags_update", "summary": "Update COMPOSITION tags", "description": "Replaces the full ITEM_TAG list for the target COMPOSITION identified by `uid_based_id`\nand owned by the EHR identified by `ehr_id`.\n\nReplace semantics: the supplied list becomes the complete tag set. Tags that were present\nbut are not in the new list are removed. Sending an empty list clears all tags.\n\n> **Cadasto exception:** the `uid_based_id` must be a `versioned_object_uid` (HIER_OBJECT_ID).\n> Targeting a specific version with an OBJECT_VERSION_ID is **not** supported.\n\nMore than one ITEM_TAG may be associated with a single target — they are uniquely identified\nby their `(key, target_path)` pair.\n", "tags": [ "ITEM_TAG" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/uid_based_id_for_tags" }, { "$ref": "#/components/parameters/Prefer" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UpdateItemTag" } } } } }, "responses": { "200": { "$ref": "#/components/responses/200_COMPOSITION_ItemTagList_updated" }, "204": { "$ref": "#/components/responses/204_ItemTag_updated" }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_uid_based_id" } } } }, "/ehr/{ehr_id}/composition/{uid_based_id}/tags/{key}": { "delete": { "operationId": "composition_tags_delete", "summary": "Delete COMPOSITION tag by key", "description": "Deletes the ITEM_TAG resource(s) identified by `key`, associated with the target COMPOSITION\nidentified by `uid_based_id` and owned by the EHR identified by `ehr_id`.\n\n> **Cadasto exception:** the `uid_based_id` must be a `versioned_object_uid` (HIER_OBJECT_ID).\n> Targeting a specific version with an OBJECT_VERSION_ID is **not** supported.\n", "tags": [ "ITEM_TAG" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/uid_based_id_for_tags" }, { "$ref": "#/components/parameters/key" } ], "responses": { "204": { "$ref": "#/components/responses/204_ItemTag_updated" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_uid_based_id_or_key" } } } }, "/ehr/{ehr_id}/ehr_status/{uid_based_id}/tags": { "get": { "operationId": "ehr_status_tags_get", "summary": "Get EHR_STATUS tags", "description": "Retrieves the list of all ITEM_TAG resources associated with the target EHR_STATUS\nidentified by `uid_based_id` and owned by the EHR identified by `ehr_id`.\n\n> **Cadasto exception:** the `uid_based_id` must be a `versioned_object_uid` (HIER_OBJECT_ID).\n> Targeting a specific version with an OBJECT_VERSION_ID is **not** supported.\n\nReturns an empty list when the target has no tags. More than one ITEM_TAG may be\nassociated with a single target — they are uniquely identified by their `(key, target_path)` pair.\n", "tags": [ "ITEM_TAG" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/uid_based_id_for_tags" } ], "responses": { "200": { "$ref": "#/components/responses/200_EHR_STATUS_ItemTagList_retrieved" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_uid_based_id" } } }, "put": { "operationId": "ehr_status_tags_update", "summary": "Update EHR_STATUS tags", "description": "Replaces the full ITEM_TAG list for the target EHR_STATUS identified by `uid_based_id`\nand owned by the EHR identified by `ehr_id`.\n\nReplace semantics: the supplied list becomes the complete tag set. Tags that were present\nbut are not in the new list are removed. Sending an empty list clears all tags.\n\n> **Cadasto exception:** the `uid_based_id` must be a `versioned_object_uid` (HIER_OBJECT_ID).\n> Targeting a specific version with an OBJECT_VERSION_ID is **not** supported.\n\nMore than one ITEM_TAG may be associated with a single target — they are uniquely identified\nby their `(key, target_path)` pair.\n", "tags": [ "ITEM_TAG" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/uid_based_id_for_tags" }, { "$ref": "#/components/parameters/Prefer" } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UpdateItemTag" } } } } }, "responses": { "200": { "$ref": "#/components/responses/200_EHR_STATUS_ItemTagList_updated" }, "204": { "$ref": "#/components/responses/204_ItemTag_updated" }, "400": { "$ref": "#/components/responses/400" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_uid_based_id" } } } }, "/ehr/{ehr_id}/ehr_status/{uid_based_id}/tags/{key}": { "delete": { "operationId": "ehr_status_tags_delete", "summary": "Delete EHR_STATUS tag by key", "description": "Deletes the ITEM_TAG resource(s) identified by `key`, associated with the target EHR_STATUS\nidentified by `uid_based_id` and owned by the EHR identified by `ehr_id`.\n\n> **Cadasto exception:** the `uid_based_id` must be a `versioned_object_uid` (HIER_OBJECT_ID).\n> Targeting a specific version with an OBJECT_VERSION_ID is **not** supported.\n", "tags": [ "ITEM_TAG" ], "parameters": [ { "$ref": "#/components/parameters/ehr_id" }, { "$ref": "#/components/parameters/uid_based_id_for_tags" }, { "$ref": "#/components/parameters/key" } ], "responses": { "204": { "$ref": "#/components/responses/204_ItemTag_updated" }, "404": { "$ref": "#/components/responses/404_unknown_ehr_id_or_uid_based_id_or_key" } } } } }, "tags": [ { "name": "EHR", "description": "Management of [EHRs](https://specifications.openehr.org/releases/RM/latest/ehr.html#_ehr_class).\nActions upon resources of this group are also formally described in the [I_EHR_SERVICE](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_service_interface) Abstract Service Model interface.\n" }, { "name": "EHR_STATUS", "description": "Management of [EHR_STATUS](https://specifications.openehr.org/releases/RM/latest/ehr.html#_ehr_status_class) and [VERSIONED_EHR_STATUS](https://specifications.openehr.org/releases/RM/latest/ehr.html#_versioned_ehr_status_class) resources.\nActions upon resources of this group are also formally described in the [I_EHR_STATUS](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_status_interface) Abstract Service Model interface.\n" }, { "name": "COMPOSITION", "description": "Management of [COMPOSITION](https://specifications.openehr.org/releases/RM/latest/ehr.html#_composition_class) and [VERSIONED_COMPOSITION](https://specifications.openehr.org/releases/RM/latest/ehr.html#_versioned_composition_class) resources.\nActions upon resources of this group are also formally described in the [I_EHR_COMPOSITION](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_composition_interface) Abstract Service Model interface.\n" }, { "name": "DIRECTORY", "description": "Management of the [directory](https://specifications.openehr.org/releases/RM/latest/ehr.html#_directory) [FOLDER](https://specifications.openehr.org/releases/RM/latest/common.html#_folder_class) resource.\nActions upon resources of this group are also formally described in the [I_EHR_DIRECTORY](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_directory_interface) Abstract Service Model interface.\n" }, { "name": "CONTRIBUTION", "description": "Management of [CONTRIBUTION](https://specifications.openehr.org/releases/RM/latest/common.html#_contribution_class) resource.\nActions upon resources of this group are also formally described in the [I_EHR_CONTRIBUTION](https://specifications.openehr.org/releases/SM/latest/openehr_platform.html#_i_ehr_contribution_interface) Abstract Service Model interface.\n" }, { "name": "ITEM_TAG", "description": "Management of [ITEM_TAG](https://specifications.openehr.org/releases/RM/latest/common.html#_item_tag_class) resources for compositions and EHR_STATUS within an EHR.\n\nTags can also be set inline via the `openehr-item-tag` request header on COMPOSITION/EHR_STATUS create and update operations, and are emitted via the `openehr-item-tag` response header on read operations.\n\n> **Cadasto exceptions:**\n> - The `openehr-version-item-tag` request and response header is **not supported**. Sending it returns `400 Bad Request`.\n> - The `uid_based_id` path parameter on these endpoints accepts **only** `versioned_object_uid` (HIER_OBJECT_ID); OBJECT_VERSION_ID is not supported.\n\nSee the [item_tags guide](/docs/guides/item-tag) for end-to-end examples and error formats.\n" }, { "name": "EHR_schema", "x-displayName": "EHR", "description": "This resource is formally specified in Reference Model as the [EHR](https://specifications.openehr.org/releases/RM/latest/ehr.html#_ehr_class) class.\n\n\n" }, { "name": "EHR_STATUS_schema", "x-displayName": "EHR_STATUS", "description": "The following resources are formally specified in the Reference Model as [EHR_STATUS](https://specifications.openehr.org/releases/RM/latest/ehr.html#_ehr_status_class) and [VERSIONED_EHR_STATUS](https://specifications.openehr.org/releases/RM/latest/ehr.html#_versioned_ehr_status_class) classes.\n
\n\nThe `EHR_STATUS` resource:\n\n\nThe `VERSIONED_EHR_STATUS` resource:\n\n" }, { "name": "COMPOSITION_schema", "x-displayName": "COMPOSITION", "description": "The following resources are formally specified in the Reference Model as [COMPOSITION](https://specifications.openehr.org/releases/RM/latest/ehr.html#_composition_class) and [VERSIONED_COMPOSITION](https://specifications.openehr.org/releases/RM/latest/ehr.html#_versioned_composition_class) classes.\n
\n\nThe `COMPOSITION` resource:\n\n\nThe abstract `CONTENT_ITEM` class, used in `COMPOSITION`:\n\n\nThe abstract `ITEM_STRUCTURE` class, used in `CONTENT_ITEM`:\n\n\nThe `VERSIONED_COMPOSITION` resource:\n\n" }, { "name": "DIRECTORY_schema", "x-displayName": "DIRECTORY", "description": "This resource is formally specified in Reference Model in the [directory](https://specifications.openehr.org/releases/RM/latest/ehr.html#_directory) section, using [FOLDER](https://specifications.openehr.org/releases/RM/latest/common.html#_folder_class) class.\n\n\n" }, { "name": "CONTRIBUTION_schema", "x-displayName": "CONTRIBUTION", "description": "The following resources are formally specified in the Reference Model as the [CONTRIBUTION](https://specifications.openehr.org/releases/RM/latest/common.html#_contribution_class) class.\n
\n\nA new `CONTRIBUTION` to be committed:\n\n\nA retrieved `CONTRIBUTION`:\n\n" } ], "x-tagGroups": [ { "name": "Resource endpoints", "tags": [ "EHR", "EHR_STATUS", "COMPOSITION", "DIRECTORY", "CONTRIBUTION", "ITEM_TAG" ] }, { "name": "Resource schemas", "tags": [ "EHR_schema", "EHR_STATUS_schema", "COMPOSITION_schema", "DIRECTORY_schema", "CONTRIBUTION_schema" ] } ], "components": { "schemas": { "UAbstractItemStructure": { "title": "ITEM_STRUCTURE", "type": "object" }, "UAbstractContentItem": { "title": "CONTENT_ITEM", "type": "object" }, "HierObjectId": { "title": "HIER_OBJECT_ID", "required": [ "value" ], "type": "object", "properties": { "_type": { "type": "string", "default": "UID_BASED_ID" }, "value": { "type": "string", "format": "uuid", "examples": [ "6cb19121-4307-4648-9da0-d62e4d51f19b" ] } }, "x-discriminator-value": "HIER_OBJECT_ID" }, "ArchetypeId": { "title": "ARCHETYPE_ID", "type": "object", "properties": { "_type": { "type": "string", "default": "ARCHETYPE_ID" }, "value": { "type": "string" } }, "x-discriminator-value": "ARCHETYPE_ID", "required": [ "value" ] }, "UMArchetypeId": { "title": "ARCHETYPE_ID", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "ARCHETYPE_ID" ], "type": "string" }, "value": { "type": "string" } }, "x-discriminator-value": "ARCHETYPE_ID" }, "TemplateId": { "title": "TEMPLATE_ID", "type": "object", "properties": { "_type": { "type": "string", "default": "TEMPLATE_ID" }, "value": { "type": "string" } }, "x-discriminator-value": "TEMPLATE_ID", "required": [ "value" ] }, "UMTemplateId": { "title": "TEMPLATE_ID", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "TEMPLATE_ID" ], "type": "string" }, "value": { "type": "string" } }, "x-discriminator-value": "TEMPLATE_ID" }, "TerminologyId": { "title": "TERMINOLOGY_ID", "type": "object", "properties": { "_type": { "type": "string", "default": "TERMINOLOGY_ID" }, "value": { "type": "string" } }, "x-discriminator-value": "TERMINOLOGY_ID", "required": [ "value" ] }, "UMTerminologyId": { "title": "TERMINOLOGY_ID", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "TERMINOLOGY_ID" ], "type": "string" }, "value": { "type": "string" } }, "x-discriminator-value": "TERMINOLOGY_ID" }, "UMGenericId": { "title": "GENERIC_ID", "required": [ "value", "scheme", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "GENERIC_ID" ], "type": "string" }, "value": { "type": "string" }, "scheme": { "type": "string" } }, "x-discriminator-value": "GENERIC_ID", "examples": [ { "_type": "GENERIC_ID", "value": "c7ec861c-c413-39ff-9965-a198ebf44747", "scheme": "pid" } ] }, "UMHierObjectId": { "title": "HIER_OBJECT_ID", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "HIER_OBJECT_ID" ], "type": "string" }, "value": { "type": "string", "format": "uuid", "examples": [ "6cb19121-4307-4648-9da0-d62e4d51f19b" ] } }, "x-discriminator-value": "HIER_OBJECT_ID", "examples": [ { "_type": "HIER_OBJECT_ID", "value": "6cb19121-4307-4648-9da0-d62e4d51f19b" } ] }, "ObjectVersionId": { "title": "OBJECT_VERSION_ID", "required": [ "value" ], "type": "object", "properties": { "_type": { "type": "string", "default": "UID_BASED_ID" }, "value": { "type": "string", "examples": [ "6cb19121-4307-4648-9da0-d62e4d51f19b::cataniamc.prod.cadasto.com::2" ] } }, "x-discriminator-value": "OBJECT_VERSION_ID" }, "UMObjectVersionId": { "title": "OBJECT_VERSION_ID", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "OBJECT_VERSION_ID" ], "type": "string" }, "value": { "type": "string", "examples": [ "6cb19121-4307-4648-9da0-d62e4d51f19b::cataniamc.prod.cadasto.com::2" ] } }, "x-discriminator-value": "OBJECT_VERSION_ID", "examples": [ { "_type": "OBJECT_VERSION_ID", "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::cataniamc.prod.cadasto.com::2" } ] }, "UObjectId": { "title": "OBJECT_ID", "oneOf": [ { "$ref": "#/components/schemas/UMArchetypeId" }, { "$ref": "#/components/schemas/UMTemplateId" }, { "$ref": "#/components/schemas/UMTerminologyId" }, { "$ref": "#/components/schemas/UMGenericId" }, { "$ref": "#/components/schemas/UMHierObjectId" }, { "$ref": "#/components/schemas/UMObjectVersionId" } ], "discriminator": { "propertyName": "_type", "mapping": { "ARCHETYPE_ID": "#/components/schemas/UMArchetypeId", "TEMPLATE_ID": "#/components/schemas/UMTemplateId", "TERMINOLOGY_ID": "#/components/schemas/UMTerminologyId", "GENERIC_ID": "#/components/schemas/UMGenericId", "HIER_OBJECT_ID": "#/components/schemas/UMHierObjectId", "OBJECT_VERSION_ID": "#/components/schemas/UMObjectVersionId" } } }, "ObjectRef": { "title": "OBJECT_REF", "required": [ "namespace", "type", "id" ], "type": "object", "properties": { "namespace": { "type": "string" }, "type": { "type": "string" }, "id": { "$ref": "#/components/schemas/UObjectId" } }, "examples": [ { "id": { "_type": "OBJECT_VERSION_ID", "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::cataniamc.prod.cadasto.com::1" }, "namespace": "local", "type": "COMPOSITION" } ] }, "CodePhrase": { "title": "CODE_PHRASE", "required": [ "terminology_id", "code_string" ], "type": "object", "properties": { "terminology_id": { "$ref": "#/components/schemas/TerminologyId" }, "code_string": { "type": "string" }, "preferred_term": { "type": "string" } }, "examples": [ { "terminology_id": { "value": "local" }, "code_string": "at0001" } ] }, "DvInterval": { "title": "DV_INTERVAL", "required": [ "lower_unbounded", "upper_unbounded", "lower_included", "upper_included" ], "type": "object", "properties": { "_type": { "type": "string", "default": "DV_INTERVAL" }, "lower_unbounded": { "type": "boolean" }, "upper_unbounded": { "type": "boolean" }, "lower_included": { "type": "boolean" }, "upper_included": { "type": "boolean" } }, "x-discriminator-value": "DV_INTERVAL" }, "UMDvUri": { "title": "DV_URI", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_URI" ], "type": "string" }, "value": { "type": "string" } }, "x-discriminator-value": "DV_URI" }, "DvEhrUri": { "title": "DV_EHR_URI", "type": "object", "properties": { "_type": { "type": "string", "default": "DV_EHR_URI" }, "value": { "type": "string" } }, "x-discriminator-value": "DV_EHR_URI", "required": [ "value" ], "examples": [ { "_type": "DV_EHR_URI", "value": "ehr://system_id/ehr_id/top_level_structure_locator/path_inside_top_level_structure" } ] }, "UMDvEhrUri": { "title": "DV_EHR_URI", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_EHR_URI" ], "type": "string" }, "value": { "type": "string" } }, "x-discriminator-value": "DV_EHR_URI", "examples": [ { "_type": "DV_EHR_URI", "value": "ehr://system_id/ehr_id/top_level_structure_locator/path_inside_top_level_structure" } ] }, "UDvUri": { "title": "DV_URI", "oneOf": [ { "$ref": "#/components/schemas/UMDvUri" }, { "$ref": "#/components/schemas/UMDvEhrUri" } ], "discriminator": { "propertyName": "_type", "mapping": { "DV_URI": "#/components/schemas/UMDvUri", "DV_EHR_URI": "#/components/schemas/UMDvEhrUri" } }, "examples": [ { "_type": "DV_URI", "value": "https://www.example.com" } ] }, "DvCodedText": { "title": "DV_CODED_TEXT", "required": [ "value", "defining_code" ], "type": "object", "properties": { "_type": { "type": "string", "default": "DV_CODED_TEXT" }, "value": { "type": "string" }, "hyperlink": { "$ref": "#/components/schemas/UDvUri" }, "formatting": { "type": "string" }, "mappings": { "type": "array", "items": { "$ref": "#/components/schemas/TermMapping" } }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "encoding": { "$ref": "#/components/schemas/CodePhrase" }, "defining_code": { "$ref": "#/components/schemas/CodePhrase" } }, "x-discriminator-value": "DV_CODED_TEXT", "examples": [ { "value": "Coded text value", "defining_code": { "terminology_id": { "value": "local" }, "code_string": "at0001" } } ] }, "TermMapping": { "title": "TERM_MAPPING", "required": [ "match", "target" ], "type": "object", "properties": { "match": { "pattern": "/^[><=?]$/", "type": "string" }, "purpose": { "$ref": "#/components/schemas/DvCodedText" }, "target": { "$ref": "#/components/schemas/CodePhrase" } } }, "UMDvText": { "title": "DV_TEXT", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_TEXT" ], "type": "string" }, "value": { "type": "string" }, "hyperlink": { "$ref": "#/components/schemas/UDvUri" }, "formatting": { "type": "string" }, "mappings": { "type": "array", "items": { "$ref": "#/components/schemas/TermMapping" } }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "encoding": { "$ref": "#/components/schemas/CodePhrase" } }, "x-discriminator-value": "DV_TEXT" }, "UMDvCodedText": { "title": "DV_CODED_TEXT", "required": [ "value", "defining_code", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_CODED_TEXT" ], "type": "string" }, "value": { "type": "string" }, "hyperlink": { "$ref": "#/components/schemas/UDvUri" }, "formatting": { "type": "string" }, "mappings": { "type": "array", "items": { "$ref": "#/components/schemas/TermMapping" } }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "encoding": { "$ref": "#/components/schemas/CodePhrase" }, "defining_code": { "$ref": "#/components/schemas/CodePhrase" } }, "x-discriminator-value": "DV_CODED_TEXT", "examples": [ { "value": "Coded text value", "defining_code": { "terminology_id": { "value": "local" }, "code_string": "at0001" } } ] }, "UDvText": { "title": "DV_TEXT", "oneOf": [ { "$ref": "#/components/schemas/UMDvText" }, { "$ref": "#/components/schemas/UMDvCodedText" } ], "discriminator": { "propertyName": "_type", "mapping": { "DV_TEXT": "#/components/schemas/UMDvText", "DV_CODED_TEXT": "#/components/schemas/UMDvCodedText" } }, "examples": [ { "_type": "DV_TEXT", "value": "Text value" } ] }, "ReferenceRange": { "title": "REFERENCE_RANGE", "required": [ "meaning", "range" ], "type": "object", "properties": { "meaning": { "$ref": "#/components/schemas/UDvText" }, "range": { "$ref": "#/components/schemas/DvInterval" } } }, "DvDuration": { "title": "DV_DURATION", "type": "object", "properties": { "_type": { "type": "string", "default": "DV_DURATION" } }, "x-discriminator-value": "DV_DURATION" }, "DvDateTime": { "title": "DV_DATE_TIME", "required": [ "value" ], "type": "object", "properties": { "_type": { "type": "string", "default": "DV_DATE_TIME" }, "value": { "type": "string", "format": "date-time" } }, "x-discriminator-value": "DV_DATE_TIME", "examples": [ { "_type": "DV_DATE_TIME", "value": "2017-08-15T10:37:15.422+02:00" } ] }, "Ehr": { "title": "EHR", "type": "object", "properties": { "system_id": { "$ref": "#/components/schemas/HierObjectId" }, "ehr_id": { "$ref": "#/components/schemas/HierObjectId" }, "ehr_status": { "$ref": "#/components/schemas/ObjectRef" }, "ehr_access": { "$ref": "#/components/schemas/ObjectRef" }, "time_created": { "$ref": "#/components/schemas/DvDateTime" } }, "description": "An EHR resource", "examples": [ { "system_id": { "value": "9624982A-9F42-41A5-9318-AE13D5F5031F" }, "ehr_id": { "value": "7d44b88c-4199-4bad-97dc-d78268e01398" }, "ehr_status": { "id": { "_type": "OBJECT_VERSION_ID", "value": "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1" }, "namespace": "local", "type": "EHR_STATUS" }, "ehr_access": { "id": { "_type": "OBJECT_VERSION_ID", "value": "59a8d0ac-140e-4feb-b2d6-af99f8e68af8::cataniamc.prod.cadasto.com::1" }, "namespace": "local", "type": "EHR_ACCESS" }, "time_created": { "value": "2015-01-20T19:30:22.765+01:00" } } ] }, "UUidBasedId": { "title": "UID_BASED_ID", "oneOf": [ { "$ref": "#/components/schemas/UMHierObjectId" }, { "$ref": "#/components/schemas/UMObjectVersionId" } ], "discriminator": { "propertyName": "_type", "mapping": { "HIER_OBJECT_ID": "#/components/schemas/UMHierObjectId", "OBJECT_VERSION_ID": "#/components/schemas/UMObjectVersionId" } } }, "Link": { "title": "LINK", "required": [ "meaning", "type", "target" ], "type": "object", "properties": { "meaning": { "$ref": "#/components/schemas/UDvText" }, "type": { "$ref": "#/components/schemas/UDvText" }, "target": { "$ref": "#/components/schemas/DvEhrUri" } } }, "Archetyped": { "title": "ARCHETYPED", "required": [ "archetype_id", "rm_version" ], "type": "object", "properties": { "archetype_id": { "$ref": "#/components/schemas/ArchetypeId" }, "template_id": { "$ref": "#/components/schemas/TemplateId" }, "rm_version": { "type": "string" } }, "additionalProperties": false, "examples": [ { "archetype_id": { "value": "openEHR-EHR-COMPOSITION.encounter.v1" }, "template_id": { "value": "Example.v1::c7ec861c-c413-39ff-9965-a198ebf44747" }, "rm_version": "1.0.2" } ] }, "DvIdentifier": { "title": "DV_IDENTIFIER", "required": [ "id" ], "type": "object", "properties": { "issuer": { "type": "string" }, "assigner": { "type": "string" }, "id": { "type": "string" }, "type": { "type": "string" } }, "description": "Type for representing identifiers of real-world entities. Typical identifiers include drivers licence number, social security number, veterans affairs number, prescription id, order id, and so on.\n\nDV_IDENTIFIER is used to represent any identifier of a real thing, issued by some authority or agency.\n", "x-discriminator-value": "DV_IDENTIFIER", "examples": [ { "id": "16b74749-e6aa-4945-b760-b42bdc07098a", "type": "Patient" } ] }, "DvMultimedia": { "title": "DV_MULTIMEDIA", "required": [ "_type", "media_type", "size" ], "type": "object", "properties": { "_type": { "type": "string", "default": "DV_MULTIMEDIA" }, "charset": { "$ref": "#/components/schemas/CodePhrase" }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "alternate_text": { "type": "string" }, "uri": { "$ref": "#/components/schemas/UDvUri" }, "data": { "type": "string" }, "media_type": { "$ref": "#/components/schemas/CodePhrase" }, "compression_algorithm": { "$ref": "#/components/schemas/CodePhrase" }, "integrity_check": { "type": "string" }, "integrity_check_algorithm": { "$ref": "#/components/schemas/CodePhrase" }, "thumbnail": { "$ref": "#/components/schemas/DvMultimedia" }, "size": { "type": "integer" } }, "x-discriminator-value": "DV_MULTIMEDIA" }, "UMDvMultimedia": { "title": "DV_MULTIMEDIA", "required": [ "_type", "media_type", "size" ], "type": "object", "properties": { "_type": { "enum": [ "DV_MULTIMEDIA" ], "type": "string" }, "charset": { "$ref": "#/components/schemas/CodePhrase" }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "alternate_text": { "type": "string" }, "uri": { "$ref": "#/components/schemas/UDvUri" }, "data": { "type": "string" }, "media_type": { "$ref": "#/components/schemas/CodePhrase" }, "compression_algorithm": { "$ref": "#/components/schemas/CodePhrase" }, "integrity_check": { "type": "string" }, "integrity_check_algorithm": { "$ref": "#/components/schemas/CodePhrase" }, "thumbnail": { "$ref": "#/components/schemas/DvMultimedia" }, "size": { "type": "integer" } }, "x-discriminator-value": "DV_MULTIMEDIA" }, "DvParsable": { "title": "DV_PARSABLE", "required": [ "_type", "value", "formalism" ], "type": "object", "properties": { "_type": { "type": "string", "default": "DV_PARSABLE" }, "charset": { "$ref": "#/components/schemas/CodePhrase" }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "value": { "type": "string" }, "formalism": { "type": "string" } }, "x-discriminator-value": "DV_PARSABLE" }, "UMDvParsable": { "title": "DV_PARSABLE", "required": [ "_type", "value", "formalism" ], "type": "object", "properties": { "_type": { "enum": [ "DV_PARSABLE" ], "type": "string" }, "charset": { "$ref": "#/components/schemas/CodePhrase" }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "value": { "type": "string" }, "formalism": { "type": "string" } }, "x-discriminator-value": "DV_PARSABLE" }, "UDvEncapsulated": { "title": "DV_ENCAPSULATED", "oneOf": [ { "$ref": "#/components/schemas/UMDvMultimedia" }, { "$ref": "#/components/schemas/UMDvParsable" } ], "discriminator": { "propertyName": "_type", "mapping": { "DV_MULTIMEDIA": "#/components/schemas/UMDvMultimedia", "DV_PARSABLE": "#/components/schemas/UMDvParsable" } } }, "PartyRef": { "title": "PARTY_REF", "required": [ "namespace", "type", "id" ], "type": "object", "properties": { "namespace": { "type": "string" }, "type": { "pattern": "^PERSON|ORGANISATION|GROUP|AGENT|ROLE|PARTY|ACTOR$", "type": "string" }, "id": { "$ref": "#/components/schemas/UObjectId" } }, "description": "Identifier for parties in a demographic or identity service.", "examples": [ { "id": { "_type": "OBJECT_VERSION_ID", "value": "b52b9408-7048-4ec8-94bd-831fb0727e67::cataniamc.prod.cadasto.com::1" }, "namespace": "local", "type": "PERSON" } ] }, "UMPartyIdentified": { "title": "PARTY_IDENTIFIED", "required": [ "_type" ], "type": "object", "properties": { "_type": { "enum": [ "PARTY_IDENTIFIED" ], "type": "string" }, "external_ref": { "$ref": "#/components/schemas/PartyRef" }, "identifiers": { "type": "array", "items": { "$ref": "#/components/schemas/DvIdentifier" } } }, "x-discriminator-value": "PARTY_IDENTIFIED", "examples": [ { "_type": "PARTY_IDENTIFIED", "external_ref": { "id": { "_type": "GENERIC_ID", "value": "16b74749-e6aa-4945-b760-b42bdc07098a", "scheme": "pid" }, "namespace": "cataniamc.prod.cadasto.com", "type": "PERSON" } } ] }, "UMPartyRelated": { "title": "PARTY_RELATED", "required": [ "_type", "relationship" ], "type": "object", "properties": { "_type": { "enum": [ "PARTY_RELATED" ], "type": "string" }, "external_ref": { "$ref": "#/components/schemas/PartyRef" }, "identifiers": { "type": "array", "items": { "$ref": "#/components/schemas/DvIdentifier" } }, "relationship": { "$ref": "#/components/schemas/DvCodedText" } }, "x-discriminator-value": "PARTY_RELATED", "examples": [ { "_type": "PARTY_RELATED", "external_ref": { "id": { "_type": "GENERIC_ID", "value": "16b74749-e6aa-4945-b760-b42bdc07098a", "scheme": "pid" }, "namespace": "cataniamc.prod.cadasto.com", "type": "PERSON" } } ] }, "UPartyIdentified": { "title": "PARTY_IDENTIFIED", "oneOf": [ { "$ref": "#/components/schemas/UMPartyIdentified" } ], "discriminator": { "propertyName": "_type", "mapping": { "PARTY_IDENTIFIED": "#/components/schemas/UMPartyIdentified", "PARTY_RELATED": "#/components/schemas/UMPartyRelated" } } }, "UMPartySelf": { "title": "PARTY_SELF", "required": [ "_type" ], "type": "object", "properties": { "_type": { "enum": [ "PARTY_SELF" ], "type": "string" }, "external_ref": { "$ref": "#/components/schemas/PartyRef" } }, "x-discriminator-value": "PARTY_SELF" }, "UPartyProxy": { "title": "PARTY_PROXY", "oneOf": [ { "$ref": "#/components/schemas/UMPartySelf" }, { "$ref": "#/components/schemas/UMPartyIdentified" } ], "discriminator": { "propertyName": "_type", "mapping": { "PARTY_SELF": "#/components/schemas/UMPartySelf", "PARTY_IDENTIFIED": "#/components/schemas/UMPartyIdentified", "PARTY_RELATED": "#/components/schemas/UMPartyRelated" } } }, "UMDvBoolean": { "title": "DV_BOOLEAN", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_BOOLEAN" ], "type": "string" }, "value": { "type": "boolean" } }, "x-discriminator-value": "DV_BOOLEAN" }, "UMDvCount": { "title": "DV_COUNT", "required": [ "magnitude", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_COUNT" ], "type": "string" }, "magnitude": { "type": "integer" } }, "x-discriminator-value": "DV_COUNT" }, "DvDate": { "title": "DV_DATE", "required": [ "value" ], "type": "object", "properties": { "_type": { "type": "string", "default": "DV_DATE" }, "value": { "type": "string", "format": "date" } }, "x-discriminator-value": "DV_DATE", "examples": [ { "_type": "DV_DATE", "value": "2017-08-15" } ] }, "UMDvDate": { "title": "DV_DATE", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_DATE" ], "type": "string" }, "value": { "type": "string", "format": "date" } }, "x-discriminator-value": "DV_DATE", "examples": [ { "_type": "DV_DATE", "value": "2017-08-15" } ] }, "UMDvDateTime": { "title": "DV_DATE_TIME", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_DATE_TIME" ], "type": "string" }, "value": { "type": "string", "format": "date-time" } }, "x-discriminator-value": "DV_DATE_TIME", "examples": [ { "_type": "DV_DATE_TIME", "value": "2017-08-15T10:37:15.422+02:00" } ] }, "UMDvDuration": { "title": "DV_DURATION", "required": [ "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_DURATION" ], "type": "string" } }, "x-discriminator-value": "DV_DURATION" }, "UMDvIdentifier": { "title": "DV_IDENTIFIER", "required": [ "id", "_type" ], "type": "object", "properties": { "issuer": { "type": "string" }, "assigner": { "type": "string" }, "id": { "type": "string" }, "type": { "type": "string" }, "_type": { "enum": [ "DV_IDENTIFIER" ], "type": "string" } }, "x-discriminator-value": "DV_IDENTIFIER", "examples": [ { "id": "16b74749-e6aa-4945-b760-b42bdc07098a", "type": "Patient" } ] }, "UMDvOrdinal": { "title": "DV_ORDINAL", "required": [ "symbol", "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_ORDINAL" ], "type": "string" }, "symbol": { "$ref": "#/components/schemas/DvCodedText" }, "value": { "type": "integer" } }, "x-discriminator-value": "DV_ORDINAL" }, "UMDvProportion": { "title": "DV_PROPORTION", "required": [ "numerator", "denominator", "semantic_type", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_PROPORTION" ], "type": "string" }, "numerator": { "type": "number" }, "denominator": { "type": "number" }, "semantic_type": { "type": "integer" }, "precision": { "type": "integer" } }, "x-discriminator-value": "DV_PROPORTION" }, "UMDvQuantity": { "title": "DV_QUANTITY", "required": [ "magnitude", "units", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_QUANTITY" ], "type": "string" }, "magnitude": { "type": "number" }, "precision": { "type": "integer" }, "units": { "type": "string" }, "units_system": { "type": "string" }, "units_display_name": { "type": "string" } }, "x-discriminator-value": "DV_QUANTITY" }, "UMDvScale": { "title": "DV_SCALE", "required": [ "symbol", "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_SCALE" ], "type": "string" }, "symbol": { "$ref": "#/components/schemas/DvCodedText" }, "value": { "type": "number" } }, "x-discriminator-value": "DV_SCALE" }, "UMDvState": { "title": "DV_STATE", "required": [ "value", "is_terminal", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_STATE" ], "type": "string" }, "value": { "$ref": "#/components/schemas/DvCodedText" }, "is_terminal": { "type": "boolean" } }, "x-discriminator-value": "DV_STATE" }, "UMDvTime": { "title": "DV_TIME", "required": [ "value", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "DV_TIME" ], "type": "string" }, "value": { "type": "string", "format": "time" } }, "x-discriminator-value": "DV_TIME", "examples": [ { "_type": "DV_DATE", "value": "2017-08-15" } ] }, "UDataValue": { "title": "DATA_VALUE", "oneOf": [ { "$ref": "#/components/schemas/UMDvBoolean" }, { "$ref": "#/components/schemas/UMDvCodedText" }, { "$ref": "#/components/schemas/UMDvCount" }, { "$ref": "#/components/schemas/UMDvDate" }, { "$ref": "#/components/schemas/UMDvDateTime" }, { "$ref": "#/components/schemas/UMDvDuration" }, { "$ref": "#/components/schemas/UMDvEhrUri" }, { "$ref": "#/components/schemas/UMDvIdentifier" }, { "$ref": "#/components/schemas/UMDvMultimedia" }, { "$ref": "#/components/schemas/UMDvOrdinal" }, { "$ref": "#/components/schemas/UMDvParsable" }, { "$ref": "#/components/schemas/UMDvProportion" }, { "$ref": "#/components/schemas/UMDvQuantity" }, { "$ref": "#/components/schemas/UMDvScale" }, { "$ref": "#/components/schemas/UMDvState" }, { "$ref": "#/components/schemas/UMDvText" }, { "$ref": "#/components/schemas/UMDvUri" } ], "discriminator": { "propertyName": "_type", "mapping": { "DV_BOOLEAN": "#/components/schemas/UMDvBoolean", "DV_CODED_TEXT": "#/components/schemas/UMDvCodedText", "DV_COUNT": "#/components/schemas/UMDvCount", "DV_DATE": "#/components/schemas/UMDvDate", "DV_DATE_TIME": "#/components/schemas/UMDvDateTime", "DV_DURATION": "#/components/schemas/UMDvDuration", "DV_EHR_URI": "#/components/schemas/UMDvEhrUri", "DV_IDENTIFIER": "#/components/schemas/UMDvIdentifier", "DV_MULTIMEDIA": "#/components/schemas/UMDvMultimedia", "DV_ORDINAL": "#/components/schemas/UMDvOrdinal", "DV_PARSABLE": "#/components/schemas/UMDvParsable", "DV_PROPORTION": "#/components/schemas/UMDvProportion", "DV_QUANTITY": "#/components/schemas/UMDvQuantity", "DV_SCALE": "#/components/schemas/UMDvScale", "DV_STATE": "#/components/schemas/UMDvState", "DV_TEXT": "#/components/schemas/UMDvText", "DV_TIME": "#/components/schemas/UMDvTime", "DV_URI": "#/components/schemas/UMDvUri" } } }, "Element": { "title": "ELEMENT", "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "ELEMENT" }, "null_flavour": { "$ref": "#/components/schemas/DvCodedText" }, "value": { "$ref": "#/components/schemas/UDataValue" }, "null_reason": { "$ref": "#/components/schemas/UDvText" } }, "x-discriminator-value": "ELEMENT", "required": [ "name", "archetype_node_id" ] }, "ItemSingle": { "title": "ITEM_SINGLE", "required": [ "name", "archetype_node_id", "item" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "ITEM_SINGLE" }, "item": { "$ref": "#/components/schemas/Element" } }, "x-discriminator-value": "ITEM_SINGLE" }, "ItemList": { "title": "ITEM_LIST", "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "ITEM_LIST" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/Element" } } }, "x-discriminator-value": "ITEM_LIST", "required": [ "name", "archetype_node_id" ] }, "Clstr": { "title": "CLUSTER", "required": [ "name", "archetype_node_id", "items" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "CLUSTER" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/UItem" } } }, "x-discriminator-value": "CLUSTER" }, "UItem": { "title": "ITEM", "oneOf": [ { "$ref": "#/components/schemas/Element" }, { "$ref": "#/components/schemas/Clstr" } ], "discriminator": { "propertyName": "_type", "mapping": { "ELEMENT": "#/components/schemas/Element", "CLUSTER": "#/components/schemas/Clstr" } } }, "ItemTable": { "title": "ITEM_TABLE", "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "ITEM_TABLE" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/Clstr" } } }, "x-discriminator-value": "ITEM_TABLE", "required": [ "name", "archetype_node_id" ] }, "ItemTree": { "title": "ITEM_TREE", "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "ITEM_TREE" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/UItem" } } }, "x-discriminator-value": "ITEM_TREE", "required": [ "name", "archetype_node_id" ] }, "UItemStructure": { "title": "ITEM_STRUCTURE", "oneOf": [ { "$ref": "#/components/schemas/ItemSingle" }, { "$ref": "#/components/schemas/ItemList" }, { "$ref": "#/components/schemas/ItemTable" }, { "$ref": "#/components/schemas/ItemTree" } ], "discriminator": { "propertyName": "_type", "mapping": { "ITEM_SINGLE": "#/components/schemas/ItemSingle", "ITEM_LIST": "#/components/schemas/ItemList", "ITEM_TABLE": "#/components/schemas/ItemTable", "ITEM_TREE": "#/components/schemas/ItemTree" } } }, "FeederAuditDetails": { "title": "FEEDER_AUDIT_DETAILS", "required": [ "system_id" ], "type": "object", "properties": { "system_id": { "type": "string" }, "location": { "$ref": "#/components/schemas/UPartyIdentified" }, "subject": { "$ref": "#/components/schemas/UPartyProxy" }, "provider": { "$ref": "#/components/schemas/UPartyIdentified" }, "time": { "$ref": "#/components/schemas/DvDateTime" }, "version_id": { "type": "string" }, "other_details": { "$ref": "#/components/schemas/UItemStructure" } } }, "FeederAudit": { "title": "FEEDER_AUDIT", "required": [ "originating_system_audit" ], "type": "object", "properties": { "originating_system_item_ids": { "type": "array", "items": { "$ref": "#/components/schemas/DvIdentifier" } }, "feeder_system_item_ids": { "type": "array", "items": { "$ref": "#/components/schemas/DvIdentifier" } }, "original_content": { "$ref": "#/components/schemas/UDvEncapsulated" }, "originating_system_audit": { "$ref": "#/components/schemas/FeederAuditDetails" }, "feeder_system_audit": { "$ref": "#/components/schemas/FeederAuditDetails" } } }, "EhrStatus": { "title": "EHR_STATUS", "required": [ "name", "archetype_node_id", "subject", "is_queryable", "is_modifiable" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "EHR_STATUS" }, "subject": { "$ref": "#/components/schemas/UPartyProxy" }, "is_queryable": { "type": "boolean", "default": true }, "is_modifiable": { "type": "boolean", "default": true }, "other_details": { "$ref": "#/components/schemas/UItemStructure" } }, "description": "An EHR_STATUS resource", "x-discriminator-value": "EHR_STATUS", "examples": [ { "archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1", "name": { "value": "EHR status" }, "subject": { "_type": "PARTY_SELF" }, "is_queryable": true, "is_modifiable": true } ] }, "VersionedEhrStatus": { "title": "VERSIONED_EHR_STATUS", "type": "object", "properties": { "_type": { "type": "string", "default": "VERSIONED_EHR_STATUS" }, "uid": { "$ref": "#/components/schemas/HierObjectId" }, "owner_id": { "$ref": "#/components/schemas/ObjectRef" }, "time_created": { "$ref": "#/components/schemas/DvDateTime" } }, "description": "A VERSIONED_EHR_STATUS resource", "x-discriminator-value": "VERSIONED_EHR_STATUS", "required": [ "uid", "owner_id", "time_created" ], "examples": [ { "uid": { "value": "6cb19121-4307-4648-9da0-d62e4d51f19b" }, "owner_id": { "id": { "_type": "HIER_OBJECT_ID", "value": "7d44b88c-4199-4bad-97dc-d78268e01398" }, "namespace": "local", "type": "EHR" }, "time_created": { "value": "2015-01-20T19:30:22.765+01:00" } } ] }, "AuditDetails": { "title": "AUDIT_DETAILS", "required": [ "system_id", "time_committed", "change_type", "committer" ], "type": "object", "properties": { "_type": { "type": "string", "default": "AUDIT_DETAILS" }, "system_id": { "type": "string" }, "time_committed": { "$ref": "#/components/schemas/DvDateTime" }, "change_type": { "$ref": "#/components/schemas/DvCodedText" }, "description": { "$ref": "#/components/schemas/UDvText" }, "committer": { "$ref": "#/components/schemas/UPartyProxy" } }, "description": "The set of attributes required to document the committal of an information item to a repository.", "x-discriminator-value": "AUDIT_DETAILS", "examples": [ { "system_id": "9624982A-9F42-41A5-9318-AE13D5F5031F", "committer": { "_type": "PARTY_IDENTIFIED", "name": "A user name" }, "time_committed": { "value": "2017-08-15T10:37:15.422+02:00" }, "change_type": { "value": "creation", "defining_code": { "terminology_id": { "value": "openehr" }, "code_string": "249" } }, "description": { "value": "Description text" } } ] }, "RevisionHistoryItem": { "title": "REVISION_HISTORY_ITEM", "required": [ "version_id", "audits" ], "type": "object", "properties": { "version_id": { "$ref": "#/components/schemas/ObjectVersionId" }, "audits": { "type": "array", "items": { "$ref": "#/components/schemas/AuditDetails" } } }, "description": "A REVISION_HISTORY_ITEM resource", "examples": [ { "version_id": { "value": "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1" }, "audits": [ { "system_id": "d60e2348-b083-48ce-93b9-916cef1d3a5a", "time_committed": { "value": "2015-01-20T19:30:22.765+01:00" }, "change_type": { "value": "creation", "defining_code": { "terminology_id": { "value": "openehr" }, "code_string": "249" } }, "description": { "value": "An optional description string" }, "committer": { "_type": "PARTY_IDENTIFIED", "name": "A user name" } } ] } ] }, "RevisionHistory": { "title": "REVISION_HISTORY", "required": [ "items" ], "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/RevisionHistoryItem" } } }, "description": "A REVISION_HISTORY resource" }, "DvIntervalOfDateTime": { "title": "DV_INTERVAL_of_DATE_TIME", "type": "object", "properties": { "_type": { "type": "string", "default": "DV_INTERVAL" }, "lower_unbounded": { "type": "boolean" }, "upper_unbounded": { "type": "boolean" }, "lower_included": { "type": "boolean" }, "upper_included": { "type": "boolean" }, "lower": { "$ref": "#/components/schemas/UMDvDateTime" }, "upper": { "$ref": "#/components/schemas/UMDvDateTime" } }, "x-discriminator-value": "DV_INTERVAL_of_DATE_TIME", "required": [ "lower_unbounded", "upper_unbounded", "lower_included", "upper_included" ] }, "Participation": { "title": "PARTICIPATION", "required": [ "function", "performer" ], "type": "object", "properties": { "function": { "$ref": "#/components/schemas/UDvText" }, "mode": { "$ref": "#/components/schemas/DvCodedText" }, "performer": { "$ref": "#/components/schemas/UPartyProxy" }, "time": { "$ref": "#/components/schemas/DvIntervalOfDateTime" } } }, "EventContext": { "title": "EVENT_CONTEXT", "required": [ "start_time", "setting" ], "type": "object", "properties": { "start_time": { "$ref": "#/components/schemas/DvDateTime" }, "end_time": { "$ref": "#/components/schemas/DvDateTime" }, "location": { "type": "string" }, "setting": { "$ref": "#/components/schemas/DvCodedText" }, "other_context": { "$ref": "#/components/schemas/UItemStructure" }, "health_care_facility": { "$ref": "#/components/schemas/UPartyIdentified" }, "participations": { "type": "array", "items": { "$ref": "#/components/schemas/Participation" } } }, "x-discriminator-value": "EVENT_CONTEXT" }, "UMAdminEntry": { "title": "ADMIN_ENTRY", "required": [ "name", "archetype_node_id", "language", "encoding", "subject", "data", "_type" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "encoding": { "$ref": "#/components/schemas/CodePhrase" }, "other_participations": { "type": "array", "items": { "$ref": "#/components/schemas/Participation" } }, "workflow_id": { "$ref": "#/components/schemas/ObjectRef" }, "subject": { "$ref": "#/components/schemas/UPartyProxy" }, "provider": { "$ref": "#/components/schemas/UPartyProxy" }, "_type": { "enum": [ "ADMIN_ENTRY" ], "type": "string" }, "data": { "$ref": "#/components/schemas/UItemStructure" } }, "x-discriminator-value": "ADMIN_ENTRY" }, "Event": { "title": "EVENT", "required": [ "name", "archetype_node_id", "time", "data" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "EVENT" }, "time": { "$ref": "#/components/schemas/DvDateTime" }, "state": { "$ref": "#/components/schemas/UItemStructure" }, "data": { "$ref": "#/components/schemas/UItemStructure" } }, "x-discriminator-value": "EVENT" }, "History": { "title": "HISTORY", "required": [ "name", "archetype_node_id", "origin" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "HISTORY" }, "origin": { "$ref": "#/components/schemas/DvDateTime" }, "period": { "$ref": "#/components/schemas/DvDuration" }, "duration": { "$ref": "#/components/schemas/DvDuration" }, "summary": { "$ref": "#/components/schemas/UItemStructure" }, "events": { "type": "array", "items": { "$ref": "#/components/schemas/Event" } } }, "x-discriminator-value": "HISTORY" }, "UMObservation": { "title": "OBSERVATION", "required": [ "name", "archetype_node_id", "language", "encoding", "subject", "data", "_type" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "encoding": { "$ref": "#/components/schemas/CodePhrase" }, "other_participations": { "type": "array", "items": { "$ref": "#/components/schemas/Participation" } }, "workflow_id": { "$ref": "#/components/schemas/ObjectRef" }, "subject": { "$ref": "#/components/schemas/UPartyProxy" }, "provider": { "$ref": "#/components/schemas/UPartyProxy" }, "protocol": { "$ref": "#/components/schemas/UItemStructure" }, "guideline_id": { "$ref": "#/components/schemas/ObjectRef" }, "_type": { "enum": [ "OBSERVATION" ], "type": "string" }, "data": { "$ref": "#/components/schemas/History" }, "state": { "$ref": "#/components/schemas/History" } }, "x-discriminator-value": "OBSERVATION" }, "UMEvaluation": { "title": "EVALUATION", "required": [ "name", "archetype_node_id", "language", "encoding", "subject", "data", "_type" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "encoding": { "$ref": "#/components/schemas/CodePhrase" }, "other_participations": { "type": "array", "items": { "$ref": "#/components/schemas/Participation" } }, "workflow_id": { "$ref": "#/components/schemas/ObjectRef" }, "subject": { "$ref": "#/components/schemas/UPartyProxy" }, "provider": { "$ref": "#/components/schemas/UPartyProxy" }, "protocol": { "$ref": "#/components/schemas/UItemStructure" }, "guideline_id": { "$ref": "#/components/schemas/ObjectRef" }, "_type": { "enum": [ "EVALUATION" ], "type": "string" }, "data": { "$ref": "#/components/schemas/UItemStructure" } }, "x-discriminator-value": "EVALUATION" }, "Activity": { "title": "ACTIVITY", "required": [ "name", "archetype_node_id", "action_archetype_id", "description" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "ACTIVITY" }, "timing": { "$ref": "#/components/schemas/DvParsable" }, "action_archetype_id": { "type": "string" }, "description": { "$ref": "#/components/schemas/UItemStructure" } }, "x-discriminator-value": "ACTIVITY" }, "UMInstruction": { "title": "INSTRUCTION", "required": [ "name", "archetype_node_id", "language", "encoding", "subject", "narrative", "_type" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "encoding": { "$ref": "#/components/schemas/CodePhrase" }, "other_participations": { "type": "array", "items": { "$ref": "#/components/schemas/Participation" } }, "workflow_id": { "$ref": "#/components/schemas/ObjectRef" }, "subject": { "$ref": "#/components/schemas/UPartyProxy" }, "provider": { "$ref": "#/components/schemas/UPartyProxy" }, "protocol": { "$ref": "#/components/schemas/UItemStructure" }, "guideline_id": { "$ref": "#/components/schemas/ObjectRef" }, "_type": { "enum": [ "INSTRUCTION" ], "type": "string" }, "narrative": { "$ref": "#/components/schemas/UDvText" }, "expiry_time": { "$ref": "#/components/schemas/DvDateTime" }, "wf_definition": { "$ref": "#/components/schemas/DvParsable" }, "activities": { "type": "array", "items": { "$ref": "#/components/schemas/Activity" } } }, "x-discriminator-value": "INSTRUCTION" }, "IsmTransition": { "title": "ISM_TRANSITION", "required": [ "current_state" ], "type": "object", "properties": { "_type": { "type": "string", "default": "ISM_TRANSITION" }, "current_state": { "$ref": "#/components/schemas/DvCodedText" }, "transition": { "$ref": "#/components/schemas/DvCodedText" }, "careflow_step": { "$ref": "#/components/schemas/DvCodedText" }, "reason": { "type": "array", "items": { "$ref": "#/components/schemas/UDvText" } } }, "x-discriminator-value": "ISM_TRANSITION" }, "LocatableRef": { "title": "LOCATABLE_REF", "required": [ "namespace", "type", "id" ], "type": "object", "properties": { "namespace": { "type": "string" }, "type": { "type": "string" }, "id": { "$ref": "#/components/schemas/UUidBasedId" }, "path": { "type": "string" } } }, "InstructionDetails": { "title": "INSTRUCTION_DETAILS", "required": [ "instruction_id", "activity_id" ], "type": "object", "properties": { "_type": { "type": "string", "default": "INSTRUCTION_DETAILS" }, "instruction_id": { "$ref": "#/components/schemas/LocatableRef" }, "activity_id": { "type": "string" }, "wf_details": { "$ref": "#/components/schemas/UItemStructure" } }, "x-discriminator-value": "INSTRUCTION_DETAILS" }, "UMAction": { "title": "ACTION", "required": [ "name", "archetype_node_id", "language", "encoding", "subject", "time", "ism_transition", "description", "_type" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "encoding": { "$ref": "#/components/schemas/CodePhrase" }, "other_participations": { "type": "array", "items": { "$ref": "#/components/schemas/Participation" } }, "workflow_id": { "$ref": "#/components/schemas/ObjectRef" }, "subject": { "$ref": "#/components/schemas/UPartyProxy" }, "provider": { "$ref": "#/components/schemas/UPartyProxy" }, "protocol": { "$ref": "#/components/schemas/UItemStructure" }, "guideline_id": { "$ref": "#/components/schemas/ObjectRef" }, "_type": { "enum": [ "ACTION" ], "type": "string" }, "time": { "$ref": "#/components/schemas/DvDateTime" }, "ism_transition": { "$ref": "#/components/schemas/IsmTransition" }, "instruction_details": { "$ref": "#/components/schemas/InstructionDetails" }, "description": { "$ref": "#/components/schemas/UItemStructure" } }, "x-discriminator-value": "ACTION" }, "UContentItem": { "title": "CONTENT_ITEM", "oneOf": [ { "$ref": "#/components/schemas/UMAdminEntry" }, { "$ref": "#/components/schemas/UMObservation" }, { "$ref": "#/components/schemas/UMEvaluation" }, { "$ref": "#/components/schemas/UMInstruction" }, { "$ref": "#/components/schemas/UMAction" } ], "discriminator": { "propertyName": "_type", "mapping": { "ADMIN_ENTRY": "#/components/schemas/UMAdminEntry", "OBSERVATION": "#/components/schemas/UMObservation", "EVALUATION": "#/components/schemas/UMEvaluation", "INSTRUCTION": "#/components/schemas/UMInstruction", "ACTION": "#/components/schemas/UMAction" } } }, "Composition": { "title": "COMPOSITION", "required": [ "name", "archetype_node_id", "language", "territory", "category", "context", "composer", "content" ], "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "COMPOSITION" }, "language": { "$ref": "#/components/schemas/CodePhrase" }, "territory": { "$ref": "#/components/schemas/CodePhrase" }, "category": { "$ref": "#/components/schemas/DvCodedText" }, "context": { "$ref": "#/components/schemas/EventContext" }, "composer": { "$ref": "#/components/schemas/UPartyProxy" }, "content": { "type": "array", "items": { "$ref": "#/components/schemas/UContentItem" } } }, "description": "A COMPOSITION resource", "x-discriminator-value": "COMPOSITION", "examples": [ { "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1", "name": { "value": "Vital Signs" }, "uid": { "_type": "OBJECT_VERSION_ID", "value": "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1" }, "archetype_details": { "archetype_id": { "value": "openEHR-EHR-COMPOSITION.encounter.v1" }, "template_id": { "value": "Example.v1::c7ec861c-c413-39ff-9965-a198ebf44747" }, "rm_version": "1.0.2" }, "language": { "terminology_id": { "value": "ISO_639-1" }, "code_string": "en" }, "territory": { "terminology_id": { "value": "ISO_3166-1" }, "code_string": "NL" }, "category": { "value": "event", "defining_code": { "terminology_id": { "value": "openehr" }, "code_string": "433" } }, "composer": { "_type": "PARTY_IDENTIFIED", "external_ref": { "id": { "_type": "GENERIC_ID", "value": "16b74749-e6aa-4945-b760-b42bdc07098a", "scheme": "pid" }, "namespace": "cataniamc.prod.cadasto.com", "type": "PERSON" }, "name": "A name" }, "context": { "start_time": { "value": "2014-11-18T09:50:35.000+01:00" }, "setting": { "value": "other care", "defining_code": { "terminology_id": { "value": "openehr" }, "code_string": "238" } } }, "content": [] } ] }, "UVersionable": { "title": "Versionable", "oneOf": [ { "$ref": "#/components/schemas/Composition" }, { "$ref": "#/components/schemas/EhrStatus" } ], "discriminator": { "propertyName": "_type", "mapping": { "COMPOSITION": "#/components/schemas/Composition", "EHR_STATUS": "#/components/schemas/EhrStatus" } } }, "Attestation": { "title": "ATTESTATION", "required": [ "system_id", "time_committed", "change_type", "committer", "reason", "is_pending" ], "type": "object", "properties": { "_type": { "type": "string", "default": "ATTESTATION" }, "system_id": { "type": "string" }, "time_committed": { "$ref": "#/components/schemas/DvDateTime" }, "change_type": { "$ref": "#/components/schemas/DvCodedText" }, "description": { "$ref": "#/components/schemas/UDvText" }, "committer": { "$ref": "#/components/schemas/UPartyProxy" }, "attested_view": { "$ref": "#/components/schemas/DvMultimedia" }, "proof": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/DvEhrUri" } }, "reason": { "$ref": "#/components/schemas/UDvText" }, "is_pending": { "type": "boolean" } }, "x-discriminator-value": "ATTESTATION", "examples": [ { "system_id": "9624982A-9F42-41A5-9318-AE13D5F5031F", "committer": { "_type": "PARTY_IDENTIFIED", "name": "A user name" }, "time_committed": { "value": "2017-08-15T10:37:15.422+02:00" }, "change_type": { "value": "creation", "defining_code": { "terminology_id": { "value": "openehr" }, "code_string": "249" } }, "description": { "value": "Description text" } } ] }, "OriginalVersion": { "title": "ORIGINAL_VERSION", "required": [ "contribution", "commit_audit", "data", "uid", "lifecycle_state" ], "type": "object", "properties": { "_type": { "type": "string", "default": "ORIGINAL_VERSION" }, "contribution": { "$ref": "#/components/schemas/ObjectRef" }, "signature": { "type": "string" }, "commit_audit": { "$ref": "#/components/schemas/AuditDetails" }, "data": { "$ref": "#/components/schemas/UVersionable" }, "uid": { "$ref": "#/components/schemas/ObjectVersionId" }, "preceding_version_uid": { "$ref": "#/components/schemas/ObjectVersionId" }, "other_input_version_uids": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectVersionId" } }, "lifecycle_state": { "$ref": "#/components/schemas/DvCodedText" }, "attestations": { "type": "array", "items": { "$ref": "#/components/schemas/Attestation" } } }, "x-discriminator-value": "ORIGINAL_VERSION" }, "UMOriginalVersion": { "title": "ORIGINAL_VERSION", "required": [ "contribution", "commit_audit", "data", "uid", "lifecycle_state", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "ORIGINAL_VERSION" ], "type": "string" }, "contribution": { "$ref": "#/components/schemas/ObjectRef" }, "signature": { "type": "string" }, "commit_audit": { "$ref": "#/components/schemas/AuditDetails" }, "data": { "$ref": "#/components/schemas/UVersionable" }, "uid": { "$ref": "#/components/schemas/ObjectVersionId" }, "preceding_version_uid": { "$ref": "#/components/schemas/ObjectVersionId" }, "other_input_version_uids": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectVersionId" } }, "lifecycle_state": { "$ref": "#/components/schemas/DvCodedText" }, "attestations": { "type": "array", "items": { "$ref": "#/components/schemas/Attestation" } } }, "x-discriminator-value": "ORIGINAL_VERSION" }, "UMImportedVersion": { "title": "IMPORTED_VERSION", "required": [ "contribution", "commit_audit", "data", "item", "_type" ], "type": "object", "properties": { "_type": { "enum": [ "IMPORTED_VERSION" ], "type": "string" }, "contribution": { "$ref": "#/components/schemas/ObjectRef" }, "signature": { "type": "string" }, "commit_audit": { "$ref": "#/components/schemas/AuditDetails" }, "data": { "$ref": "#/components/schemas/UVersionable" }, "item": { "$ref": "#/components/schemas/OriginalVersion" } }, "x-discriminator-value": "IMPORTED_VERSION" }, "UVersion": { "title": "VERSION", "oneOf": [ { "$ref": "#/components/schemas/UMOriginalVersion" }, { "$ref": "#/components/schemas/UMImportedVersion" } ], "discriminator": { "propertyName": "_type", "mapping": { "ORIGINAL_VERSION": "#/components/schemas/UMOriginalVersion", "IMPORTED_VERSION": "#/components/schemas/UMImportedVersion" } } }, "Error": { "title": "Error", "required": [ "message", "validationErrors" ], "type": "object", "properties": { "message": { "type": "string" }, "validationErrors": { "type": "array", "items": { "type": "string" }, "description": "" } }, "examples": [ { "message": "Error message", "validationErrors": [ "error1", "error2" ] } ] }, "VersionedComposition": { "title": "VERSIONED_COMPOSITION", "type": "object", "properties": { "_type": { "type": "string", "default": "VERSIONED_COMPOSITION" }, "uid": { "$ref": "#/components/schemas/HierObjectId" }, "owner_id": { "$ref": "#/components/schemas/ObjectRef" }, "time_created": { "$ref": "#/components/schemas/DvDateTime" } }, "description": "A VERSIONED_COMPOSITION resource", "x-discriminator-value": "VERSIONED_COMPOSITION", "required": [ "uid", "owner_id", "time_created" ], "examples": [ { "uid": { "value": "8849182c-82ad-4088-a07f-48ead4180515" }, "owner_id": { "id": { "_type": "HIER_OBJECT_ID", "value": "7d44b88c-4199-4bad-97dc-d78268e01398" }, "namespace": "local", "type": "EHR" }, "time_created": { "value": "2015-01-20T19:30:22.765+01:00" } } ] }, "Folder": { "title": "FOLDER", "type": "object", "properties": { "name": { "$ref": "#/components/schemas/UDvText" }, "archetype_node_id": { "type": "string", "xml": { "attribute": true } }, "uid": { "$ref": "#/components/schemas/UUidBasedId" }, "links": { "type": "array", "items": { "$ref": "#/components/schemas/Link" } }, "archetype_details": { "$ref": "#/components/schemas/Archetyped" }, "feeder_audit": { "$ref": "#/components/schemas/FeederAudit" }, "_type": { "type": "string", "default": "FOLDER" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectRef" } }, "folders": { "type": "array", "items": { "$ref": "#/components/schemas/Folder" } }, "details": { "$ref": "#/components/schemas/UItemStructure" } }, "description": "A FOLDER resource", "x-discriminator-value": "FOLDER", "required": [ "name", "archetype_node_id" ], "examples": [ { "archetype_node_id": "openEHR-EHR-FOLDER.directory.v1", "name": { "value": "Directory" }, "uid": { "_type": "OBJECT_VERSION_ID", "value": "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1" }, "items": [], "folders": [] } ] }, "TerminologyCode": { "title": "TERMINOLOGY_CODE", "required": [ "terminology_id", "code_string" ], "type": "object", "properties": { "terminology_id": { "type": "string" }, "terminology_version": { "type": "string" }, "code_string": { "type": "string" }, "uri": { "type": "string", "format": "uri" } }, "examples": [ { "terminology_id": "snomed_ct", "code_string": "308335008" } ] }, "UpdateAudit": { "title": "UPDATE_AUDIT", "required": [ "change_type", "committer" ], "type": "object", "properties": { "_type": { "type": "string", "default": "UPDATE_AUDIT" }, "change_type": { "$ref": "#/components/schemas/TerminologyCode" }, "description": { "$ref": "#/components/schemas/UDvText" }, "committer": { "$ref": "#/components/schemas/UPartyProxy" } }, "description": "The set of attributes required to document the committal of an information item to a repository. Used by the server to create an AUDIT_DETAILS object.", "x-discriminator-value": "UPDATE_AUDIT", "examples": [ { "change_type": { "value": "creation", "defining_code": { "terminology_id": "openehr", "code_string": "249" } }, "description": "Description text", "committer": { "_type": "PARTY_IDENTIFIED", "name": "A user name" } } ] }, "UpdateAttestation": { "title": "UPDATE_ATTESTATION", "required": [ "change_type", "committer", "reason", "is_pending" ], "type": "object", "properties": { "_type": { "type": "string", "default": "UPDATE_ATTESTATION" }, "change_type": { "$ref": "#/components/schemas/TerminologyCode" }, "description": { "$ref": "#/components/schemas/UDvText" }, "committer": { "$ref": "#/components/schemas/UPartyProxy" }, "attested_view": { "$ref": "#/components/schemas/DvMultimedia" }, "proof": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/components/schemas/DvEhrUri" } }, "reason": { "$ref": "#/components/schemas/UDvText" }, "is_pending": { "type": "boolean" } }, "x-discriminator-value": "UPDATE_ATTESTATION", "examples": [ { "change_type": { "value": "creation", "defining_code": { "terminology_id": "openehr", "code_string": "249" } }, "description": "Description text", "committer": { "_type": "PARTY_IDENTIFIED", "name": "A user name" } } ] }, "UpdateVersion": { "title": "UPDATE_VERSION", "required": [ "lifecycle_state", "data", "commit_audit" ], "type": "object", "properties": { "preceding_version_uid": { "$ref": "#/components/schemas/ObjectVersionId" }, "signature": { "type": "string" }, "lifecycle_state": { "$ref": "#/components/schemas/TerminologyCode" }, "attestations": { "type": "array", "items": { "$ref": "#/components/schemas/UpdateAttestation" } }, "data": { "$ref": "#/components/schemas/UVersionable" }, "commit_audit": { "$ref": "#/components/schemas/UpdateAudit" } } }, "NewContribution": { "title": "NewContribution", "required": [ "versions", "audit" ], "type": "object", "properties": { "uid": { "$ref": "#/components/schemas/HierObjectId" }, "versions": { "type": "array", "items": { "$ref": "#/components/schemas/UpdateVersion" } }, "audit": { "$ref": "#/components/schemas/UpdateAudit" } }, "description": "A new (un-committed) CONTRIBUTION resource" }, "Contribution": { "title": "CONTRIBUTION", "required": [ "uid", "versions", "audit" ], "type": "object", "properties": { "uid": { "$ref": "#/components/schemas/HierObjectId" }, "versions": { "type": "array", "items": { "$ref": "#/components/schemas/ObjectRef" } }, "audit": { "$ref": "#/components/schemas/AuditDetails" } }, "description": "A CONTRIBUTION resource", "examples": [ { "uid": { "value": "0826851c-c4c2-4d61-92b9-410fb8275ff0" }, "versions": [ { "_type": "OBJECT_REF", "id": { "_type": "OBJECT_VERSION_ID", "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::cataniamc.prod.cadasto.com::1" }, "namespace": "local", "type": "COMPOSITION" }, { "_type": "OBJECT_REF", "id": { "_type": "OBJECT_VERSION_ID", "value": "abcdefgh-1323-42bc-b7f8-787f3660a0ba::cataniamc.prod.cadasto.com::1" }, "namespace": "local", "type": "FOLDER" } ], "audit": { "system_id": "9624982A-9F42-41A5-9318-AE13D5F5031F", "committer": { "_type": "PARTY_IDENTIFIED", "name": "A user name" }, "time_committed": { "value": "2017-08-15T10:37:15.422+02:00" }, "change_type": { "value": "creation", "defining_code": { "terminology_id": { "value": "openehr" }, "code_string": "249" } }, "description": { "value": "Description text" } } } ] }, "UpdateItemTag": { "title": "UPDATE_ITEM_TAG", "required": [ "key" ], "type": "object", "additionalProperties": false, "properties": { "key": { "type": "string", "description": "Tag key (identifier). Stored case-insensitively.\n" }, "value": { "type": "string", "description": "Optional tag value." }, "target_path": { "type": "string", "maxLength": 500, "description": "Optional pointer into the target resource (AQL path). Maximum length 500 characters.\n" } }, "examples": [ { "key": "flag", "value": "follow-up", "target_path": "/composition/start_time/value" } ] }, "ItemTagOfComposition": { "title": "ITEM_TAG", "type": "object", "required": [ "key", "target", "owner_id" ], "properties": { "key": { "type": "string" }, "value": { "type": "string" }, "target_path": { "type": "string" }, "target": { "$ref": "#/components/schemas/ObjectRef" }, "owner_id": { "$ref": "#/components/schemas/ObjectRef" } }, "examples": [ { "key": "flag", "value": "follow-up", "target_path": "/composition/start_time/value", "target": { "id": { "_type": "HIER_OBJECT_ID", "value": "8849182c-82ad-4088-a07f-48ead4180515" }, "namespace": "local", "type": "COMPOSITION" }, "owner_id": { "id": { "_type": "HIER_OBJECT_ID", "value": "7d44b88c-4199-4bad-97dc-d78268e01398" }, "namespace": "local", "type": "EHR" } } ] }, "ItemTagOfEhrStatus": { "title": "ITEM_TAG", "type": "object", "required": [ "key", "target", "owner_id" ], "properties": { "key": { "type": "string" }, "value": { "type": "string" }, "target_path": { "type": "string" }, "target": { "$ref": "#/components/schemas/ObjectRef" }, "owner_id": { "$ref": "#/components/schemas/ObjectRef" } }, "examples": [ { "key": "flag", "value": "follow-up", "target": { "id": { "_type": "HIER_OBJECT_ID", "value": "8849182c-82ad-4088-a07f-48ead4180515" }, "namespace": "local", "type": "EHR_STATUS" }, "owner_id": { "id": { "_type": "HIER_OBJECT_ID", "value": "7d44b88c-4199-4bad-97dc-d78268e01398" }, "namespace": "local", "type": "EHR" } } ] } }, "parameters": { "subject_id": { "name": "subject_id", "in": "query", "description": "The EHR subject id.\n", "required": true, "style": "form", "explode": true, "schema": { "type": "string", "examples": [ "ins01" ] } }, "subject_namespace": { "name": "subject_namespace", "in": "query", "description": "The EHR subject id namespace.\n", "required": true, "style": "form", "explode": true, "schema": { "type": "string", "examples": [ "examples" ] } }, "Prefer": { "name": "Prefer", "in": "header", "description": "RFC 7240 preference header. Multiple tokens may be sent in a single header as a\ncomma-separated list (e.g. `Prefer: return=representation, include_item_tags`)\nor as repeated headers. Cadasto recognises the following tokens:\n\n| Token | Where it applies | Effect |\n|-------|------------------|--------|\n| `return=representation` | write endpoints | Return the full updated resource in the response body. |\n| `return=minimal` (default on writes) | write endpoints | Empty response body. |\n| `include_item_tags` *(Cadasto extension)* | read endpoints, and write endpoints when the request does not already carry an `openehr-item-tag` header | Emit the `openehr-item-tag` response header with the current tags. On writes that ship `openehr-item-tag` in the request, the token is implied — the response always echoes the tags. Omitted by default on reads. See the [ITEM_TAG guide](/docs/guides/item-tag) for details. |\n\nThe `Preference-Applied` response header echoes the tokens the server actually honoured (`return=`, plus `include_item_tags` / `resolve_refs` when applied).\n", "required": false, "style": "simple", "schema": { "type": "string", "examples": [ "return=representation, include_item_tags" ] } }, "ehr_id": { "name": "ehr_id", "in": "path", "description": "EHR identifier taken from EHR.ehr_id.value.\n", "required": true, "style": "simple", "schema": { "type": "string", "examples": [ "7d44b88c-4199-4bad-97dc-d78268e01398" ] } }, "version_uid": { "name": "version_uid", "in": "path", "description": "VERSION identifier taken from VERSION.uid.value.\n", "required": true, "style": "simple", "schema": { "type": "string", "examples": [ "6cb19121-4307-4648-9da0-d62e4d51f19b::cataniamc.prod.cadasto.com::2" ] } }, "version_at_time": { "name": "version_at_time", "in": "query", "description": "A given time in the extended ISO 8601 format.\n", "style": "form", "explode": true, "schema": { "type": "string", "examples": [ "2015-01-20T19:30:22.765+01:00" ] } }, "If-Match": { "name": "If-Match", "in": "header", "description": "Header to make the request conditional. \nTogether with `ETag` request tag, it helps to prevent simultaneous updates of a resource from overwriting each other (\"mid-air collisions\").\nThe format is always an `version_uid` identifier enclosed by double quotes.\nThe operation will be performed only if the existing latest `version_uid` of the resource (i.e. the `preceding_version_uid`) matches this header's value.\n", "required": true, "style": "simple", "schema": { "type": "string", "examples": [ "\"6cb19121-4307-4648-9da0-d62e4d51f19b::cataniamc.prod.cadasto.com::1\"" ] } }, "uid_based_id": { "name": "uid_based_id", "in": "path", "description": "An abstract identifier: it can take a form of an OBJECT_VERSION_ID identifier taken from VERSION.uid.value (i.e. a `version_uid`), or a form of a HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a `versioned_object_uid`).\n", "required": true, "style": "simple", "schema": { "type": "string", "examples": [ "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1" ] } }, "uid_based_id_as_versioned_object_uid": { "name": "uid_based_id", "in": "path", "description": "An identifier in a form of a HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a `versioned_object_uid`).\n", "required": true, "style": "simple", "schema": { "type": "string", "examples": [ "8849182c-82ad-4088-a07f-48ead4180515" ] } }, "uid_based_id_as_version_uid": { "name": "uid_based_id", "in": "path", "description": "An identifier in a form of an OBJECT_VERSION_ID identifier taken from VERSION.uid.value (i.e. a `version_uid`).\n", "required": true, "style": "simple", "schema": { "type": "string", "examples": [ "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1" ] } }, "versioned_object_uid_COMPOSITION": { "name": "versioned_object_uid", "in": "path", "description": "VERSIONED_COMPOSITION identifier taken from VERSIONED_COMPOSITION.uid.value.\n", "required": true, "style": "simple", "schema": { "type": "string", "examples": [ "8849182c-82ad-4088-a07f-48ead4180515" ] } }, "version_uid_COMPOSITION": { "name": "version_uid", "in": "path", "description": "VERSION identifier taken from VERSION.uid.value.\n", "required": true, "style": "simple", "schema": { "type": "string", "examples": [ "8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1" ] } }, "path": { "name": "path", "in": "query", "description": "A path to a sub-folder; consists of slash-separated values of the name attribute of FOLDERs in the directory.\n", "style": "form", "explode": true, "schema": { "type": "string", "examples": [ "episodes/a/b/c" ] } }, "contribution_uid": { "name": "contribution_uid", "in": "path", "description": "The CONTRIBUTION uid.\n", "required": true, "style": "simple", "schema": { "type": "string", "examples": [ "0826851c-c4c2-4d61-92b9-410fb8275ff0" ] } }, "uid_based_id_for_tags": { "name": "uid_based_id", "in": "path", "description": "An identifier in the form of a HIER_OBJECT_ID identifier taken from\nVERSIONED_OBJECT.uid.value (i.e. a `versioned_object_uid`).\n\n> **Cadasto exception:** unlike the upstream openEHR ITS-REST specification,\n> Cadasto only accepts the `versioned_object_uid` form on `/tags` endpoints.\n> Targeting a specific version with an OBJECT_VERSION_ID is **not** supported —\n> tags are scoped to the versioned object as a whole.\n", "required": true, "style": "simple", "schema": { "type": "string", "format": "uuid", "examples": [ "8849182c-82ad-4088-a07f-48ead4180515" ] } }, "tag_key": { "name": "tag_key", "in": "query", "description": "Filter by ITEM_TAG `key` (exact, case-insensitive match).", "required": false, "style": "form", "explode": true, "schema": { "type": "string", "examples": [ "flag" ] } }, "tag_value": { "name": "tag_value", "in": "query", "description": "Filter by ITEM_TAG `value`.", "required": false, "style": "form", "explode": true, "schema": { "type": "string", "examples": [ "follow-up" ] } }, "tag_target_path": { "name": "tag_target_path", "in": "query", "description": "Filter by ITEM_TAG `target_path`.", "required": false, "style": "form", "explode": true, "schema": { "type": "string", "examples": [ "/composition/start_time/value" ] } }, "key": { "name": "key", "in": "path", "description": "The ITEM_TAG key.", "required": true, "style": "simple", "schema": { "type": "string", "examples": [ "flag" ] } }, "openehr-item-tag": { "name": "openehr-item-tag", "in": "header", "description": "The list of ITEM_TAG resources to associate with the current versioned object,\ncommitted in the same transaction as the create/update.\n\nTwo interchangeable formats are accepted:\n- **JSON (recommended)** — same shape as the `/tags` endpoint body\n- **Spec semicolon format** — `key=\"...\",value=\"...\"; key=\"...\",value=\"...\",target_path=\"...\"`\n\n> **Cadasto exception:** the `openehr-version-item-tag` request header — used by\n> upstream openEHR to scope tags to a single VERSION — is **not supported** by\n> Cadasto and will be rejected with `400 Bad Request`. Tags are always scoped to\n> the versioned object. See the\n> [item_tags guide](/docs/guides/item-tag) for details and error formats.\n", "required": false, "style": "simple", "explode": true, "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UpdateItemTag" } }, "examples": { "default": { "value": "[{\"key\":\"flag\",\"value\":\"follow-up\",\"target_path\":\"/composition/start_time/value\"}]" } } }, "cadasto-person-uid": { "name": "cadasto-person-uid", "in": "header", "description": "Links the EHR being created (or updated via EHR_STATUS) to an existing PERSON\nin the [Demographic API](/demographic-api). The link is written in the same\ncontribution as the EHR/EHR_STATUS write.\n\n> **Cadasto extension:** this header is not part of the\n> [openEHR ITS-REST](https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html)\n> specification. Standard openEHR clients can continue to use\n> `EHR_STATUS.subject.external_ref` and `GET /ehr?subject_id=…&subject_namespace=…`\n> instead; the two mechanisms are independent and can coexist. See the\n> [Cadasto demographic link guide](/docs/guides/cadasto-demographic-link).\n\nValue must be a **bare** PERSON UID in the\n[HIER_OBJECT_ID](https://specifications.openehr.org/releases/BASE/latest/base_types.html#_hier_object_id_class)\nform (no `::::` suffix). Versioned forms are rejected with\n`400 Bad Request`.\n\nOn `PUT /ehr/{ehr_id}/ehr_status` the link is **append-only** — an EHR that\nalready has a link cannot be re-linked via this header and the request is\nrejected with `409 Conflict`.\n", "required": false, "style": "simple", "schema": { "type": "string", "format": "uuid" }, "examples": { "default": { "value": "7d44b88c-4199-4bad-97dc-d78268e01398" } } }, "include-cadasto-person-uid": { "name": "include-cadasto-person-uid", "in": "header", "description": "Opt-in request header for `GET /ehr/{ehr_id}`. When present (any value), the\nresponse includes a `cadasto-person-uid` response header carrying the UID of\nthe linked PERSON, if a link exists.\n\n> **Cadasto extension:** this header is not part of the\n> [openEHR ITS-REST](https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html)\n> specification.\n\nWithout this header the link lookup is skipped and the response header is\nomitted. The header value itself is ignored — `1`, `true`, or any non-empty\nstring all opt in.\n\nSee the [Cadasto demographic link guide](/docs/guides/cadasto-demographic-link).\n", "required": false, "style": "simple", "schema": { "type": "string" }, "examples": { "default": { "value": "1" } } } }, "responses": { "400": { "description": "`400 Bad Request` is returned when the request URL or body (if provided) could not be parsed or has invalid content.\n" }, "409": { "description": "`409 Conflict` is returned when a resource with same identifier(s) already exists.\n" }, "200_EHR": { "description": "`200 OK` is returned when the requested EHR resource is successfully retrieved.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ehr" } } } }, "404_EHR_subject": { "description": "`404 Not Found` is returned when an EHR with supplied subject parameters does not exist.\n" }, "201_EHR": { "description": "`201 Created` is returned when the EHR has been successfully created. \nThe new EHR resource is returned in the body when the request's `Prefer` header value is `return=representation`, otherwise only headers are returned.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_EHR" }, "Location": { "$ref": "#/components/headers/Location_EHR" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ehr" } } } }, "409_EHR": { "description": "`409 Conflict` is returned when the create cannot proceed because of an existing EHR or link.\nPossible causes:\n- The supplied `EHR_STATUS.subject.external_ref` matches an already existing EHR's subject id, namespace pair.\n- The supplied `cadasto-person-uid` already points to another EHR (the same PERSON cannot be linked to more than one EHR).\n" }, "404_unknown_ehr_id": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist.\n" }, "409_EHR_with_id": { "description": "`409 Conflict` Unable to create a new EHR due to a conflict.\nPossible causes:\n- The supplied `ehr_id` is already used by an existing EHR.\n- The supplied `cadasto-person-uid` already points to another EHR.\n" }, "422_cadasto_person_uid_unknown": { "description": "`422 Unprocessable Entity` is returned when the supplied `cadasto-person-uid` does not resolve to an existing PERSON in the Demographic API, or resolves to a non-PERSON actor (Organisation, Agent, Group, Role).\n" }, "409_EHR_STATUS_cadasto_person_uid": { "description": "`409 Conflict` is returned when the `cadasto-person-uid` header cannot be honoured on the update.\nPossible causes:\n- The target EHR already has a link to a PERSON. The header is **append-only** on `PUT /ehr/{ehr_id}/ehr_status` — to re-link, delete and recreate the EHR.\n- The supplied PERSON is already linked to another EHR.\n" }, "200_EHR_get_by_id": { "description": "`200 OK` is returned when the requested EHR resource is successfully retrieved.\n", "headers": { "cadasto-person-uid": { "$ref": "#/components/headers/cadasto-person-uid" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Ehr" } } } }, "200_EHR_STATUS_retrieved": { "description": "`200 OK` is returned when the requested EHR_STATUS is successfully retrieved.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag" }, "Location": { "$ref": "#/components/headers/Location_EHR_STATUS" }, "openehr-item-tag": { "$ref": "#/components/headers/openehr-item-tag" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EhrStatus" } } } }, "404_unknown_ehr_id_or_version_uid": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when the `version_uid` does not exist.\n" }, "400_invalid_version_at_time": { "description": "`400 Bad Request` is returned when the request has invalid content such as an invalid `version_at_time` format.\n" }, "404_unknown_ehr_id_or_no_version_at_time": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when a version of the resource identified by the request parameters (at specified `version_at_time`) does not exist.\n" }, "200_EHR_STATUS_updated": { "description": "`200 OK` is returned when the EHR_STATUS is successfully updated, and the updated resource is returned in the body when `Prefer` header value is `return=representation`.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag" }, "Location": { "$ref": "#/components/headers/Location_EHR_STATUS" }, "openehr-item-tag": { "$ref": "#/components/headers/openehr-item-tag" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EhrStatus" } } } }, "204_EHR_STATUS": { "description": "`204 No Content` is returned when the `Prefer` header is missing or is set to `return=minimal`.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag" }, "Location": { "$ref": "#/components/headers/Location_EHR_STATUS" }, "openehr-item-tag": { "$ref": "#/components/headers/openehr-item-tag" } } }, "412_EHR_STATUS": { "description": "`412 Precondition Failed` is returned when `If-Match` request header doesn't match the latest version on the service side.\nReturns also latest `version_uid` in the `Location` and `ETag` headers.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag" }, "Location": { "$ref": "#/components/headers/Location_EHR_STATUS" } } }, "200_VERSIONED_EHR_STATUS": { "description": "`200 OK` is returned when the requested VERSIONED_EHR_STATUS is successfully retrieved.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VersionedEhrStatus" } } } }, "200_REVISION_HISTORY": { "description": "`200 OK` is returned when the requested REVISION_HISTORY is successfully retrieved.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevisionHistory" } } } }, "200_VERSION_at_time": { "description": "`200 OK` is returned when the requested VERSION is successfully retrieved.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_VERSION" }, "Location": { "$ref": "#/components/headers/Location_VERSIONED_EHR_STATUS_VERSION" }, "openehr-item-tag": { "$ref": "#/components/headers/openehr-item-tag" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UVersion" } } } }, "200_VERSION": { "description": "`200 OK` is returned when the requested VERSION is successfully retrieved.\n", "headers": { "openehr-item-tag": { "$ref": "#/components/headers/openehr-item-tag" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UVersion" } } } }, "201_COMPOSITION": { "description": "`201 Created` is returned when the COMPOSITION was created.\nContent body is only returned when `Prefer` header has `return=representation`, otherwise only headers are returned.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_COMPOSITION" }, "Location": { "$ref": "#/components/headers/Location_COMPOSITION" }, "openehr-item-tag": { "$ref": "#/components/headers/openehr-item-tag" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Composition" } } } }, "400_COMPOSITION": { "description": "`400 Bad Request` is returned when the request URL or body (if provided) could not be parsed or has invalid content (e.g. invalid `ehr_id`, or either the body of the request could not be read, or could not be converted to a valid COMPOSITION object).\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "422_COMPOSITION": { "description": "`422 Unprocessable Entity` is returned when the content could be converted to a COMPOSITION, but there are semantic validation errors, such as the underlying template is not known or is not validating the supplied COMPOSITION.\n" }, "200_COMPOSITION_retrieved": { "description": "`200 OK` is returned when the requested COMPOSITION is successfully retrieved.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_COMPOSITION" }, "Location": { "$ref": "#/components/headers/Location_COMPOSITION" }, "openehr-item-tag": { "$ref": "#/components/headers/openehr-item-tag" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Composition" } } } }, "204_because_deleted_at_time": { "description": "`204 No Content` is returned when the resource identified by the request parameters (at specified `version_at_time`) time has been deleted.\n" }, "200_COMPOSITION_updated": { "description": "`200 OK` is returned when the COMPOSITION is successfully updated and the updated resource is returned in the body when `Prefer` header value is `return=representation`.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_COMPOSITION" }, "Location": { "$ref": "#/components/headers/Location_COMPOSITION" }, "openehr-item-tag": { "$ref": "#/components/headers/openehr-item-tag" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Composition" } } } }, "404_unknown_ehr_id_or_uid_based_id": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when the `uid_based_id` does not exist.\n" }, "412_COMPOSITION": { "description": "`412 Precondition Failed` is returned when `If-Match` request header doesn't match the latest version on the service side.\nReturns also latest `version_uid` in the `Location` and `ETag` headers.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_COMPOSITION" }, "Location": { "$ref": "#/components/headers/Location_COMPOSITION" } } }, "204_COMPOSITION_deleted": { "description": "`204 No Content` is returned when COMPOSITION was deleted.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_COMPOSITION" }, "Location": { "$ref": "#/components/headers/Location_COMPOSITION" } } }, "400_already_deleted": { "description": "`400 Bad Request` is returned when the request URL could not be parsed (i.e. invalid format of request parameters) or when the resource identified by the request parameters is already deleted.\n" }, "409_COMPOSITION_with_uid_based_id": { "description": "`409 Conflict` is returned when supplied `uid_based_id` doesn't match the latest version.\nReturns also latest version in the `Location` and `ETag` headers.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_COMPOSITION" }, "Location": { "$ref": "#/components/headers/Location_COMPOSITION" } } }, "200_VERSIONED_COMPOSITION": { "description": "`200 OK` is returned when the requested VERSIONED_COMPOSITION is successfully retrieved.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VersionedComposition" } } } }, "404_unknown_ehr_id_or_versioned_object_uid": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when the `versioned_object_uid` does not exist.\n" }, "200_VERSION_of_COMPOSITION_at_time": { "description": "`200 OK` is returned when the requested VERSION is successfully retrieved.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_VERSION_of_COMPOSITION" }, "Location": { "$ref": "#/components/headers/Location_VERSIONED_COMPOSITION_VERSION" }, "openehr-item-tag": { "$ref": "#/components/headers/openehr-item-tag" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UVersion" } } } }, "404_unknown_ehr_id_or_versioned_object_uid_or_no_version_at_time": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when `versioned_object_uid` does not exist, or when a version of the resource does not exist at the specified `version_at_time`.\n" }, "404_unknown_ehr_id_or_versioned_object_uid_or_version_uid": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when `versioned_object_uid` does not exist, or when a VERSION with `version_uid` does not exist.\n" }, "200_FOLDER_retrieved": { "description": "`200 OK` is returned when the FOLDER is successfully retrieved.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Folder" } } } }, "404_directory_unknown_ehr_id_or_no_version_at_time_or_no_path": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when a directory does not exist at the specified `version_at_time`, or when `path` does not exists within the directory.\n" }, "200_directory_updated": { "description": "`200 OK` is returned when directory was successfully updated and the updated resource is returned in the body when `Prefer` header value is `return=representation`.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_FOLDER" }, "Location": { "$ref": "#/components/headers/Location_directory" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Folder" } } } }, "204_directory_updated": { "description": "`204 No Content` is returned when directory was updated and `Prefer` header is missing or is set to `return=minimal`.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_FOLDER" }, "Location": { "$ref": "#/components/headers/Location_directory" } } }, "400_FOLDER": { "description": "`400 Bad Request` is returned when the request URL or body (if provided) could not be parsed or has invalid content (e.g. invalid `ehr_id`, or either the body of the request could not be read, or could not be converted to a valid FOLDER object).\n" }, "412_directory": { "description": "`412 Precondition Failed` is returned when `If-Match` request header doesn't match the latest version on the service side.\nReturns also latest `version_uid` in the `Location` and `ETag` headers.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_FOLDER" }, "Location": { "$ref": "#/components/headers/Location_directory" } } }, "201_directory": { "description": "`201 Created` is returned when the FOLDER was created. \nContent body is only returned when `Prefer` header has `return=representation`, otherwise only headers are returned.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_FOLDER" }, "Location": { "$ref": "#/components/headers/Location_directory" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Folder" } } } }, "204_because_deleted": { "description": "`204 No Content` is returned when the resource identified by the request parameters has been (logically) deleted.\n" }, "400_invalid_ehr_id": { "description": "`400 Bad Request` is returned when the request has invalid `ehr_id`.\n" }, "404_directory_unknown_ehr_id_or_no_version_uid_or_no_path": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when a directory with `version_uid` does not exist, or when `path` does not exist within the directory.\n" }, "201_CONTRIBUTION": { "description": "`201 Created` is returned when the CONTRIBUTION was created. \nContent body is only returned when `Prefer` header has `return=representation`, otherwise only headers are returned.\n", "headers": { "ETag": { "$ref": "#/components/headers/ETag_CONTRIBUTION" }, "Location": { "$ref": "#/components/headers/Location_CONTRIBUTION" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Contribution" } } } }, "400_CONTRIBUTION": { "description": "`400 Bad Request` is returned when the request URL or body could not be parsed or has invalid content (e.g. invalid `ehr_id`, or either the body of the request not be converted to a valid CONTRIBUTION object, or the modification type doesn’t match the operation - i.e. first version of a composition with MODIFICATION).\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "200_CONTRIBUTION": { "description": "`200 OK` is returned when the CONTRIBUTION is successfully retrieved.\n", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Contribution" } } } }, "404_CONTRIBUTION": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist, or when a CONTRIBUTION with `contribution_uid` does not exist.\n" }, "200_COMPOSITION_ItemTagList_retrieved": { "description": "`200 OK` is returned when the requested ITEM_TAG list is successfully retrieved.\n", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ItemTagOfComposition" } } } } }, "200_COMPOSITION_ItemTagList_updated": { "description": "`200 OK` is returned when the ITEM_TAG list has been successfully replaced.\n", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ItemTagOfComposition" } } } } }, "200_EHR_STATUS_ItemTagList_retrieved": { "description": "`200 OK` is returned when the requested ITEM_TAG list is successfully retrieved.\n", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ItemTagOfEhrStatus" } } } } }, "200_EHR_STATUS_ItemTagList_updated": { "description": "`200 OK` is returned when the ITEM_TAG list has been successfully replaced.\n", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ItemTagOfEhrStatus" } } } } }, "204_ItemTag_updated": { "description": "`204 No Content` is returned when the ITEM_TAG list has been successfully replaced and the `Prefer` header is missing or set to `return=minimal`.\n" }, "404_unknown_ehr_id_or_uid_based_id_or_key": { "description": "`404 Not Found` is returned when an EHR with `ehr_id` does not exist, when the `uid_based_id` does not exist, or when the ITEM_TAG identified by `key` does not exist.\n" } }, "headers": { "ETag_EHR": { "description": "The `ETag` (i.e. entity tag) response header is the `ehr_id` identifier, enclosed by double quotes.\n", "schema": { "type": "string", "examples": [ "\"7d44b88c-4199-4bad-97dc-d78268e01398\"" ] } }, "Location_EHR": { "description": "The `Location` response header indicates the URL of the EHR resource.\n", "schema": { "type": "string", "format": "url", "examples": [ "https://cataniamc.prod.cadasto.com/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398" ] } }, "ETag": { "description": "The `ETag` (i.e. entity tag) response header is an identifier (e.g. a `version_uid` enclosed by double quotes) for a specific version of a resource.\n", "schema": { "type": "string", "examples": [ "\"6cb19121-4307-4648-9da0-d62e4d51f19b::cataniamc.prod.cadasto.com::2\"" ] } }, "Location_EHR_STATUS": { "description": "The `Location` response header indicates the URL of the EHR_STATUS resource.\n", "schema": { "type": "string", "format": "url", "examples": [ "https://cataniamc.prod.cadasto.com/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398/ehr_status/6cb19121-4307-4648-9da0-d62e4d51f19b::cataniamc.prod.cadasto.com::2" ] } }, "ETag_VERSION": { "description": "The `ETag` (i.e. entity tag) response header is the VERSION identifier (i.e. the `version_uid`) enclosed by double quotes.\n", "schema": { "type": "string", "examples": [ "\"6cb19121-4307-4648-9da0-d62e4d51f19b::cataniamc.prod.cadasto.com::2\"" ] } }, "Location_VERSIONED_EHR_STATUS_VERSION": { "description": "The `Location` response header indicates the URL of the VERSION resource.\n", "schema": { "type": "string", "format": "url", "examples": [ "https://cataniamc.prod.cadasto.com/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398/versioned_ehr_status/version/6cb19121-4307-4648-9da0-d62e4d51f19b::cataniamc.prod.cadasto.com::1" ] } }, "ETag_COMPOSITION": { "description": "The `ETag` (i.e. entity tag) response header is an identifier (e.g. a `version_uid` enclosed by double quotes) for a specific version of a resource.\n", "schema": { "type": "string", "examples": [ "\"8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1\"" ] } }, "Location_COMPOSITION": { "description": "The `Location` response header indicates the URL of the COMPOSITION resource.\n", "schema": { "type": "string", "format": "url", "examples": [ "https://cataniamc.prod.cadasto.com/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398/composition/8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1" ] } }, "ETag_VERSION_of_COMPOSITION": { "description": "The `ETag` (i.e. entity tag) response header is the VERSION identifier (i.e. the `version_uid`) enclosed by double quotes.\n", "schema": { "type": "string", "examples": [ "\"8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::2\"" ] } }, "Location_VERSIONED_COMPOSITION_VERSION": { "description": "The `Location` response header indicates the URL of the VERSION resource.\n", "schema": { "type": "string", "format": "url", "examples": [ "https://cataniamc.prod.cadasto.com/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398/versioned_composition/8849182c-82ad-4088-a07f-48ead4180515/version/8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1" ] } }, "ETag_FOLDER": { "description": "The `ETag` (i.e. entity tag) response header is an identifier (e.g. a `version_uid` enclosed by double quotes) for a specific version of a resource.\n", "schema": { "type": "string", "examples": [ "\"8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1\"" ] } }, "Location_directory": { "description": "The `Location` response header indicates the URL of the directory FOLDER resource.\n", "schema": { "type": "string", "format": "url", "examples": [ "https://cataniamc.prod.cadasto.com/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398/directory/8849182c-82ad-4088-a07f-48ead4180515::cataniamc.prod.cadasto.com::1" ] } }, "ETag_CONTRIBUTION": { "description": "The `ETag` (i.e. entity tag) response header is the `contribution_uid` identifier, enclosed by double quotes.\n", "schema": { "type": "string", "examples": [ "\"0826851c-c4c2-4d61-92b9-410fb8275ff0\"" ] } }, "Location_CONTRIBUTION": { "description": "The `Location` response header indicates the URL of the CONTRIBUTION resource.\n", "schema": { "type": "string", "format": "url", "examples": [ "https://cataniamc.prod.cadasto.com/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398/contribution/0826851c-c4c2-4d61-92b9-410fb8275ff0" ] } }, "openehr-item-tag": { "description": "The list of ITEM_TAG resources associated with the current versioned object,\nemitted as a JSON array.\n\n**When this header is emitted:**\n- On write endpoints (`POST` create, `PUT` update) — automatically, when the\n request carried an `openehr-item-tag` header (tag-aware request → tag-aware\n response) and the response uses `return=representation`. To force inclusion\n on a write that did not send tags, add `Prefer: include_item_tags`.\n- On read endpoints (`GET`) — only when the client opts in by sending\n `Prefer: include_item_tags`. Without the opt-in the additional tag lookup is\n skipped and the header is omitted entirely.\n\nThe header is also omitted when the resource has no tags.\n\n> **Cadasto exception:** the `openehr-version-item-tag` response header — used by\n> upstream openEHR to convey VERSION-scoped tags — is **never emitted** by Cadasto.\n> All tags are scoped to the versioned object as a whole.\n", "schema": { "type": "string" }, "examples": { "default": { "value": "[{\"key\":\"flag\",\"value\":\"follow-up\",\"target_path\":\"/composition/start_time/value\"}]" } } }, "cadasto-person-uid": { "description": "Response header on `GET /ehr/{ehr_id}`. Carries the bare UID of the PERSON\ncurrently linked to the EHR, when both:\n\n- the request supplied the `include-cadasto-person-uid` opt-in header, **and**\n- the EHR has a link.\n\nThe header is **omitted** when either of those conditions does not hold —\nthere is no \"empty value\" form. Without the opt-in the additional link\nlookup is skipped.\n\n> **Cadasto extension:** this response header is not part of the\n> [openEHR ITS-REST](https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html)\n> specification. See the\n> [Cadasto demographic link guide](/docs/guides/cadasto-demographic-link)\n> for the write side and conflict semantics.\n", "schema": { "type": "string", "format": "uuid" }, "examples": { "default": { "value": "7d44b88c-4199-4bad-97dc-d78268e01398" } } } } }, "x-ext-urls": {} }