openapi: 3.2.0 info: title: Cadasto EHR API x-refined-note: - x-spec differs across the merged source definitions and was not carried - x-status differs across the merged source definitions and was not carried version: '1.0' description: 'Operations tagged EHR across 2 of this provider''s published API definitions: cadasto-admin-api-openapi.json, cadasto-ehr-api-openapi.json. Each path carries the servers of the definition it was published in.' servers: - url: https://{baseUrl}/v1 description: An example openEHR server URL. variables: baseUrl: default: openEHRSys.example.com description: The (example) server base URL prefix providing openEHR services. This may contain server name, port and base path prefix. - 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: [] tags: - name: EHR description: Admin management of EHRs. paths: /admin/ehr/{ehr_id}: delete: operationId: admin_ehr_delete summary: Delete EHR by id description: 'Deletes the EHR identified by `ehr_id`. All resources associated with or owned by the specified EHR (such as COMPOSITION, EHR_STATUS, ITEM_TAG, CONTRIBUTION, and their historical versions) will also be **permanently** and physically deleted, in compliance with applicable data protection regulations (e.g., the GDPR in the European Union). The server may execute this operation asynchronously (e.g. in batches), in which case returns status `202 Accepted`. If the deletion is processed synchronously and completes successfully, the server returns status `204 No Content`.' tags: - EHR parameters: - $ref: '#/components/parameters/ehr_id' responses: '202': $ref: '#/components/responses/202' '204': $ref: '#/components/responses/204_deleted_hard' '404': $ref: '#/components/responses/404_unknown_ehr_id' servers: - url: https://{baseUrl}/v1 description: An example openEHR server URL. variables: baseUrl: default: openEHRSys.example.com description: The (example) server base URL prefix providing openEHR services. This may contain server name, port and base path prefix. /admin/ehr/all: delete: operationId: admin_ehr_delete_all summary: Delete multiple EHRs description: 'Deletes all or multiple EHRs, or a specified subset of EHRs identified using the `ehr_id` query parameter. > NOTE: This functionality is intended primarily for **development** or **testing** purposes and may be disabled in **production** environments, in which case server may respond with `405 Method Not Allowed`. All resources associated with or owned by the targeted EHRs (such as COMPOSITION, EHR_STATUS, ITEM_TAG, CONTRIBUTION, and their historical versions) will also be **permanently** and physically deleted, in compliance with applicable data protection regulations (e.g., the GDPR in the European Union). The server may execute this operation asynchronously (e.g. in batches), in which case returns status `202 Accepted`. If the deletion is processed synchronously and completes successfully, the server returns status `204 No Content`.' tags: - EHR parameters: - $ref: '#/components/parameters/ehr_id_Admin' responses: '202': $ref: '#/components/responses/202' '204': $ref: '#/components/responses/204_deleted_hard' '404': $ref: '#/components/responses/404' '405': $ref: '#/components/responses/405' servers: - url: https://{baseUrl}/v1 description: An example openEHR server URL. variables: baseUrl: default: openEHRSys.example.com description: The (example) server base URL prefix providing openEHR services. This may contain server name, port and base path prefix. /admin/ehr/{ehr_id}/merge/{targetEhrUid}: put: operationId: admin_ehr_merge summary: Merge EHRs description: Merges the source EHR identified by `ehr_id` into the target EHR identified by `targetEhrUid`. tags: - EHR parameters: - $ref: '#/components/parameters/ehr_id' - name: targetEhrUid in: path description: 'Target EHR identifier taken from EHR.ehr_id.value. ' required: true style: simple schema: type: string format: uuid examples: - 297c3e91-7c17-4497-85dd-01e05aaae44e responses: '200': description: '`200 OK` is returned when the requested operation has been successfully completed. ' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404_unknown_ehr_id' servers: - url: https://{baseUrl}/v1 description: An example openEHR server URL. variables: baseUrl: default: openEHRSys.example.com description: The (example) server base URL prefix providing openEHR services. This may contain server name, port and base path prefix. /admin/ehr/{ehr_id}/composition/{composition_id}: delete: operationId: admin_ehr_delete_composition summary: Delete COMPOSITION by id within an EHR description: Deletes the COMPOSITION identified by `composition_id` within the EHR identified by `ehr_id`. tags: - EHR parameters: - $ref: '#/components/parameters/ehr_id' - name: composition_id in: path description: 'COMPOSITION identifier taken from COMPOSITION.uid.value. ' required: true style: simple schema: type: string format: uuid examples: - d290f1ee-6c54-4b01-90e6-d701748f0851 responses: '204': $ref: '#/components/responses/204_deleted_hard' '404': $ref: '#/components/responses/404_unknown_ehr_id' servers: - url: https://{baseUrl}/v1 description: An example openEHR server URL. variables: baseUrl: default: openEHRSys.example.com description: The (example) server base URL prefix providing openEHR services. This may contain server name, port and base path prefix. /admin/template/{template_id}: delete: operationId: admin_template_delete summary: Delete template by id description: Deletes the template identified by `template_id`. tags: - EHR parameters: - name: template_id in: path description: 'Template identifier. ' required: true style: simple schema: type: string examples: - openEHR-EHR-OBSERVATION.blood_pressure.v1 responses: '204': $ref: '#/components/responses/204_deleted_hard' '404': $ref: '#/components/responses/404' servers: - url: https://{baseUrl}/v1 description: An example openEHR server URL. variables: baseUrl: default: openEHRSys.example.com description: The (example) server base URL prefix providing openEHR services. This may contain server name, port and base path prefix. /ehr: post: operationId: ehr_create summary: Create EHR description: 'Create a new `EHR` with an auto-generated identifier. An EHR_STATUS resource needs to be always created and committed in the new EHR. This resource MAY be also supplied by the client as the request body. If not supplied, a default EHR_STATUS will be used by the service with following attributes: - `is_queryable`: true - `is_modifiable`: true - `subject`: a PARTY_SELF object All other required EHR attributes and resources will be automatically created as needed by the EHR creation semantics. The optional `cadasto-person-uid` request header links the new EHR to an existing Demographic PERSON in the same contribution. See the Cadasto demographic link guide.' 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. ' content: application/json: schema: $ref: '#/components/schemas/EhrStatus' required: false responses: '201': $ref: '#/components/responses/201_EHR' '400': $ref: '#/components/responses/400_2' '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`. These subject parameters will be matched against EHR''s EHR_STATUS.subject.external_ref.id.value and EHR_STATUS.subject.external_ref.namespace values.' 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' 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. /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. The value of the `ehr_id` unique identifier MUST be valid HIER_OBJECT_ID value. It is strongly RECOMMENDED that an UUID always be used for this. An EHR_STATUS resource needs to be always created and committed in the new EHR. This resource MAY be also supplied by the client as the request body. If not supplied, a default EHR_STATUS will be used by the service with following attributes: - `is_queryable`: true - `is_modifiable`: true - `subject`: a PARTY_SELF object All other required EHR attributes and resources will be automatically created as needed by the EHR creation semantics. The optional `cadasto-person-uid` request header links the new EHR to an existing Demographic PERSON in the same contribution. See the Cadasto demographic link guide.' tags: - EHR parameters: - $ref: '#/components/parameters/ehr_id_2' - $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. ' content: application/json: schema: $ref: '#/components/schemas/EhrStatus' required: false responses: '201': $ref: '#/components/responses/201_EHR' '400': $ref: '#/components/responses/400_2' '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`. Send the optional `include-cadasto-person-uid` request header to also receive the linked PERSON UID in the `cadasto-person-uid` response header — see the Cadasto demographic link guide.' tags: - EHR parameters: - $ref: '#/components/parameters/ehr_id_2' - $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' 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. components: responses: 404_unknown_ehr_id: description: '`404 Not Found` is returned when an EHR with `ehr_id` does not exist. ' '400': description: '`400 Bad Request` is returned when the server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). ' '202': description: "`202 Accepted` is returned when the requested operation has been accepted for processing, \nbut processing has not been completed or may not have started (i.e. when requests are processed asynchronously). \n" 204_deleted_hard: description: '`204 No Content` is returned when the requested operation succeeded and the resource(s) identified by the request parameters has been physically deleted (i.e. hard-delete). ' '404': description: '`404 Not Found` is returned when, based on the request parameters, the server did not find a current representation of a target resource, or is not willing to disclose that one exists. ' '405': description: "`405 Method Not Allowed` is returned when the service knows the request method, but the target resource doesn't support this method (e.g. due to security concerns). \n" 409_EHR: description: '`409 Conflict` is returned when the create cannot proceed because of an existing EHR or link. Possible causes: - The supplied `EHR_STATUS.subject.external_ref` matches an already existing EHR''s subject id, namespace pair. - The supplied `cadasto-person-uid` already points to another EHR (the same PERSON cannot be linked to more than one EHR). ' 200_EHR: description: '`200 OK` is returned when the requested EHR resource is successfully retrieved. ' content: application/json: schema: $ref: '#/components/schemas/Ehr' 200_EHR_get_by_id: description: '`200 OK` is returned when the requested EHR resource is successfully retrieved. ' headers: cadasto-person-uid: $ref: '#/components/headers/cadasto-person-uid' content: application/json: schema: $ref: '#/components/schemas/Ehr' '400_2': description: '`400 Bad Request` is returned when the request URL or body (if provided) could not be parsed or has invalid content. ' 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). ' 409_EHR_with_id: description: '`409 Conflict` Unable to create a new EHR due to a conflict. Possible causes: - The supplied `ehr_id` is already used by an existing EHR. - The supplied `cadasto-person-uid` already points to another EHR. ' 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' 404_EHR_subject: description: '`404 Not Found` is returned when an EHR with supplied subject parameters does not exist. ' parameters: ehr_id_Admin: name: ehr_id in: query description: 'An optional parameter to perform the operation on a subset of EHRs. ' style: form explode: true schema: type: string format: uuid examples: single: summary: A single EHR identifier value: 7d44b88c-4199-4bad-97dc-d78268e01398 multiple: summary: Multiple EHR identifiers value: - 7d44b88c-4199-4bad-97dc-d78268e01398 - 297c3e91-7c17-4497-85dd-01e05aaae44e ehr_id: name: ehr_id in: path description: 'EHR identifier taken from EHR.ehr_id.value. ' required: true style: simple schema: type: string format: uuid examples: - 7d44b88c-4199-4bad-97dc-d78268e01398 cadasto-person-uid: name: cadasto-person-uid in: header description: 'Links the EHR being created (or updated via EHR_STATUS) to an existing PERSON in the [Demographic API](/demographic-api). The link is written in the same contribution as the EHR/EHR_STATUS write. > **Cadasto extension:** this header is not part of the > [openEHR ITS-REST](https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html) > specification. Standard openEHR clients can continue to use > `EHR_STATUS.subject.external_ref` and `GET /ehr?subject_id=…&subject_namespace=…` > instead; the two mechanisms are independent and can coexist. See the > [Cadasto demographic link guide](/docs/guides/cadasto-demographic-link). Value must be a **bare** PERSON UID in the [HIER_OBJECT_ID](https://specifications.openehr.org/releases/BASE/latest/base_types.html#_hier_object_id_class) form (no `::::` suffix). Versioned forms are rejected with `400 Bad Request`. On `PUT /ehr/{ehr_id}/ehr_status` the link is **append-only** — an EHR that already has a link cannot be re-linked via this header and the request is rejected with `409 Conflict`. ' required: false style: simple schema: type: string format: uuid examples: default: value: 7d44b88c-4199-4bad-97dc-d78268e01398 subject_namespace: name: subject_namespace in: query description: 'The EHR subject id namespace. ' required: true style: form explode: true schema: type: string examples: - examples subject_id: name: subject_id in: query description: 'The EHR subject id. ' required: true style: form explode: true schema: type: string examples: - ins01 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 response includes a `cadasto-person-uid` response header carrying the UID of the linked PERSON, if a link exists. > **Cadasto extension:** this header is not part of the > [openEHR ITS-REST](https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html) > specification. Without this header the link lookup is skipped and the response header is omitted. The header value itself is ignored — `1`, `true`, or any non-empty string all opt in. See the [Cadasto demographic link guide](/docs/guides/cadasto-demographic-link). ' required: false style: simple schema: type: string examples: default: value: '1' ehr_id_2: name: ehr_id in: path description: 'EHR identifier taken from EHR.ehr_id.value. ' required: true style: simple schema: type: string examples: - 7d44b88c-4199-4bad-97dc-d78268e01398 Prefer: name: Prefer in: header description: 'RFC 7240 preference header. Multiple tokens may be sent in a single header as a comma-separated list (e.g. `Prefer: return=representation, include_item_tags`) or as repeated headers. Cadasto recognises the following tokens: | Token | Where it applies | Effect | |-------|------------------|--------| | `return=representation` | write endpoints | Return the full updated resource in the response body. | | `return=minimal` (default on writes) | write endpoints | Empty response body. | | `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. | The `Preference-Applied` response header echoes the tokens the server actually honoured (`return=`, plus `include_item_tags` / `resolve_refs` when applied). ' required: false style: simple schema: type: string examples: - return=representation, include_item_tags schemas: 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 UMDvBoolean: title: DV_BOOLEAN required: - value - _type type: object properties: _type: enum: - DV_BOOLEAN type: string value: type: boolean x-discriminator-value: DV_BOOLEAN UPartyIdentified: title: PARTY_IDENTIFIED oneOf: - $ref: '#/components/schemas/UMPartyIdentified' discriminator: propertyName: _type mapping: PARTY_IDENTIFIED: '#/components/schemas/UMPartyIdentified' PARTY_RELATED: '#/components/schemas/UMPartyRelated' 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 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' 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 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' 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 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 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 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' UMTerminologyId: title: TERMINOLOGY_ID required: - value - _type type: object properties: _type: enum: - TERMINOLOGY_ID type: string value: type: string x-discriminator-value: TERMINOLOGY_ID TermMapping: title: TERM_MAPPING required: - match - target type: object properties: match: pattern: /^[><=?]$/ type: string purpose: $ref: '#/components/schemas/DvCodedText' target: $ref: '#/components/schemas/CodePhrase' 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' ArchetypeId: title: ARCHETYPE_ID type: object properties: _type: type: string default: ARCHETYPE_ID value: type: string x-discriminator-value: ARCHETYPE_ID required: - value 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. DV_IDENTIFIER is used to represent any identifier of a real thing, issued by some authority or agency. ' x-discriminator-value: DV_IDENTIFIER examples: - id: 16b74749-e6aa-4945-b760-b42bdc07098a type: Patient 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' UMArchetypeId: title: ARCHETYPE_ID required: - value - _type type: object properties: _type: enum: - ARCHETYPE_ID type: string value: type: string x-discriminator-value: ARCHETYPE_ID 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' UMDvCount: title: DV_COUNT required: - magnitude - _type type: object properties: _type: enum: - DV_COUNT type: string magnitude: type: integer x-discriminator-value: DV_COUNT UMDvUri: title: DV_URI required: - value - _type type: object properties: _type: enum: - DV_URI type: string value: type: string x-discriminator-value: DV_URI 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 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 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 UMDvDuration: title: DV_DURATION required: - _type type: object properties: _type: enum: - DV_DURATION type: string x-discriminator-value: DV_DURATION 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 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 TerminologyId: title: TERMINOLOGY_ID type: object properties: _type: type: string default: TERMINOLOGY_ID value: type: string x-discriminator-value: TERMINOLOGY_ID required: - value 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 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 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 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 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 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 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 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 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' UItem: title: ITEM oneOf: - $ref: '#/components/schemas/Element' - $ref: '#/components/schemas/Clstr' discriminator: propertyName: _type mapping: ELEMENT: '#/components/schemas/Element' CLUSTER: '#/components/schemas/Clstr' 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 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 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 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 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 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' 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 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 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' 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 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 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' 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 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' 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' 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' 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 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 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 TemplateId: title: TEMPLATE_ID type: object properties: _type: type: string default: TEMPLATE_ID value: type: string x-discriminator-value: TEMPLATE_ID required: - value 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 UMTemplateId: title: TEMPLATE_ID required: - value - _type type: object properties: _type: enum: - TEMPLATE_ID type: string value: type: string x-discriminator-value: TEMPLATE_ID headers: Location_EHR: description: 'The `Location` response header indicates the URL of the EHR resource. ' schema: type: string format: url examples: - https://cataniamc.prod.cadasto.com/v1/ehr/7d44b88c-4199-4bad-97dc-d78268e01398 cadasto-person-uid: description: 'Response header on `GET /ehr/{ehr_id}`. Carries the bare UID of the PERSON currently linked to the EHR, when both: - the request supplied the `include-cadasto-person-uid` opt-in header, **and** - the EHR has a link. The header is **omitted** when either of those conditions does not hold — there is no "empty value" form. Without the opt-in the additional link lookup is skipped. > **Cadasto extension:** this response header is not part of the > [openEHR ITS-REST](https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html) > specification. See the > [Cadasto demographic link guide](/docs/guides/cadasto-demographic-link) > for the write side and conflict semantics. ' schema: type: string format: uuid examples: default: value: 7d44b88c-4199-4bad-97dc-d78268e01398 ETag_EHR: description: 'The `ETag` (i.e. entity tag) response header is the `ehr_id` identifier, enclosed by double quotes. ' schema: type: string examples: - '"7d44b88c-4199-4bad-97dc-d78268e01398"' x-refined-from: - cadasto-admin-api-openapi.json - cadasto-ehr-api-openapi.json x-tagGroups: - name: Resource endpoints tags: - EHR x-ext-urls: {}