openEHR EHR API
Description Purpose This specification describes service endpoints, resources and operations as well as details of requests and responses that interact with…
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Description
Purpose
This specification describes service endpoints, resources and operations as well as details of requests and responses that interact with the openEHR EHR API in a RESTful manner.
Related Documents
Prerequisite documents for reading this document include:
Related documents include:
- The openEHR Architecture Overview
- The openEHR Global Class Index
- The XML-Schemas (XSD)
- The JSON-Schemas and [Simplified Formats](simplified_formats.html)
Status
This specification is in the STABLE state, and can be downloaded as OpenAPI specification file (in YAML format) [for validation](computable/OAS/ehr-validation.openapi.yaml), or [for code generators](computable/OAS/ehr-codegen.openapi.yaml).
Users are encouraged to comment on and/or advise on these paragraphs as well as the main content.
The development version of this document can be found at .
Endpoints 33
EHR
- GETGet EHR by subject id
/ehr?subject_id=ins01&subject_namespace=examplesRetrieve the EHR with the specified subject_id and subject_namespace. These subject parameters will be matched against EHR's… - POSTCreate EHR
/ehrCreate 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… - GETGet EHR by id
/ehr/:ehr_idRetrieve the EHR with the specified ehr_id. - PUTCreate EHR with id
/ehr/:ehr_idCreate 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…
EHR_STATUS
- GETGet EHR_STATUS by version id
/ehr/:ehr_id/ehr_status/:version_uidRetrieves a particular version of the EHR_STATUS identified by version_uid and associated with the EHR identified by ehr_id. When there are ITEM_TAGs… - GETGet EHR_STATUS at time
/ehr/:ehr_id/ehr_statusRetrieves a version of the EHR_STATUS associated with the EHR identified by ehr_id. If version_at_time is supplied, retrieves the version extant _at specified… - PUTUpdate EHR_STATUS
/ehr/:ehr_id/ehr_statusUpdates EHR_STATUS associated with the EHR identified by ehr_id. The existing latest version_uid of EHR_STATUS resource (i.e. the preceding_version_uid) must… - GETGet versioned EHR_STATUS
/ehr/:ehr_id/versioned_ehr_statusRetrieves a VERSIONED_EHR_STATUS associated with an EHR identified by ehr_id. - GETGet versioned EHR_STATUS revision history
/ehr/:ehr_id/versioned_ehr_status/revision_historyRetrieves revision history of the VERSIONED_EHR_STATUS associated with the EHR identified by ehr_id. - GETGet EHR_STATUS version at time
/ehr/:ehr_id/versioned_ehr_status/versionRetrieves a VERSION from the VERSIONED_EHR_STATUS associated with the EHR identified by ehr_id. If version_at_time is supplied, retrieves the VERSION extant… - GETGet EHR_STATUS version by version id
/ehr/:ehr_id/versioned_ehr_status/version/:version_uidRetrieves a VERSION identified by version_uid of an EHR_STATUS associated with the EHR identified by ehr_id.
COMPOSITION
- POSTCreate COMPOSITION
/ehr/:ehr_id/compositionCreates the first version of a new COMPOSITION in the EHR identified by ehr_id. A list of ITEM_TAGs can be associated with the COMPOSITION, in which case a… - GETGet COMPOSITION
/ehr/:ehr_id/composition/:uid_based_idRetrieves a version of the COMPOSITION identified by uid_based_id and associated with the EHR identified by ehr_id. The uid_based_id can take a form of an… - PUTUpdate COMPOSITION
/ehr/:ehr_id/composition/:uid_based_idUpdates COMPOSITION identified by uid_based_id and associated with the EHR identified by ehr_id. The uid_based_id can take only a form of an HIER_OBJECT_ID… - DELETEDelete COMPOSITION
/ehr/:ehr_id/composition/:uid_based_idDeletes the COMPOSITION identified by uid_based_id and associated with the EHR identified by ehr_id. The uid_based_id MUST be in a form of an… - GETGet versioned COMPOSITION
/ehr/:ehr_id/versioned_composition/:versioned_object_uidRetrieves a VERSIONED_COMPOSITION identified by versioned_object_uid and associated with the EHR identified by ehr_id. - GETGet versioned COMPOSITION revision history
/ehr/:ehr_id/versioned_composition/:versioned_object_uid/revision_historyRetrieves revision history of the VERSIONED_COMPOSITION identified by versioned_object_uid and associated with the EHR identified by ehr_id. - GETGet COMPOSITION version at time
/ehr/:ehr_id/versioned_composition/:versioned_object_uid/versionRetrieves a VERSION from the VERSIONED_COMPOSITION identified by versioned_object_uid and associated with the EHR identified by ehr_id. If version_at_time is… - GETGet COMPOSITION version by version id
/ehr/:ehr_id/versioned_composition/:versioned_object_uid/version/:version_uidRetrieves a VERSION identified by version_uid of a VERSIONED_COMPOSITION identified by versioned_object_uid and associated with the EHR identified by ehr_id.
DIRECTORY
- GETGet folder in directory version at time
/ehr/:ehr_id/directoryRetrieves the version of the directory FOLDER associated with the EHR identified by ehr_id. If version_at_time is supplied, retrieves the version extant _at… - PUTUpdate directory
/ehr/:ehr_id/directoryUpdates directory FOLDER associated with the EHR identified by ehr_id. The existing latest version_uid of directory FOLDER resource (i.e. the… - POSTCreate directory
/ehr/:ehr_id/directoryCreates a new directory FOLDER associated with the EHR identified by ehr_id. - DELETEDelete directory
/ehr/:ehr_id/directoryDeletes directory FOLDER associated with the EHR identified by ehr_id. The existing latest version_uid of directory FOLDER resource (i.e. the… - GETGet folder in directory version
/ehr/:ehr_id/directory/:version_uidRetrieves a particular version of the directory FOLDER identified by version_uid and associated with the EHR identified by ehr_id. If path is supplied,…
CONTRIBUTION
- POSTCreate CONTRIBUTION
/ehr/:ehr_id/contributionWe will use the relaxed CONTRIBUTION with the following optional attributes: uid: when provided, it will be accepted in case is not in-use, otherwise error… - GETGet CONTRIBUTION by id
/ehr/:ehr_id/contribution/:contribution_uidRetrieves a CONTRIBUTION identified by contribution_uid and associated with the EHR identified by ehr_id. Simplified Formats (FLAT / STRUCTURED) The Accept…
ITEM_TAG
- GETGet EHR tags
/ehr/:ehr_id/tagsRetrieves the list of ITEM_TAG resources associated with any target VERSION or VERSIONED_OBJECT within the EHR identified by ehr_id. This list can be filtered… - GETGet COMPOSITION tags
/ehr/:ehr_id/composition/:uid_based_id/tagsRetrieves the list of all ITEM_TAG resources associated with a given target COMPOSITION version or VERSIONED_COMPOSITION identified by uid_based_id and owned… - PUTUpdate COMPOSITION tags
/ehr/:ehr_id/composition/:uid_based_id/tagsUpdates the list of all ITEM_TAG resources associated with a given target COMPOSITION version or VERSIONED_COMPOSITION identified by uid_based_id and owned by… - DELETEDelete COMPOSITION tags
/ehr/:ehr_id/composition/:uid_based_id/tags/:keyDeletes the ITEM_TAG resource(s) identified by tag_key, associated with a given target COMPOSITION version or VERSIONED_COMPOSITION identified by uid_based_id… - GETGet EHR_STATUS tags
/ehr/:ehr_id/ehr_status/:uid_based_id/tagsRetrieves the list of all ITEM_TAG resources associated with a given target EHR_STATUS version or VERSIONED_EHR_STATUS identified by uid_based_id and owned by… - PUTUpdate EHR_STATUS tags
/ehr/:ehr_id/ehr_status/:uid_based_id/tagsUpdates the list of all ITEM_TAG resources associated with a given target EHR_STATUS version or VERSIONED_EHR_STATUS identified by uid_based_id and owned by… - DELETEDelete EHR_STATUS tags
/ehr/:ehr_id/ehr_status/:uid_based_id/tags/:keyDeletes the ITEM_TAG resource(s) identified by tag_key, associated with a given target EHR_STATUS version or VERSIONED_EHR_STATUS identified by uid_based_id…
API details
- Base URL
https://{baseUrl}/v1- Authentication
- None declared in the description
- Operations
- 33 operations on 23 pathsGET 19PUT 6POST 4DELETE 4
- Main resources
- COMPOSITION 8EHR_STATUS 7ITEM_TAG 7DIRECTORY 5EHR 4CONTRIBUTION 2
- Description format
- OpenAPI 3.0.3, API version
latest - Links
- OpenAPI document · Support
- Listed from
- openEHR's published OpenAPI description (openEHR/specifications-ITS-REST) (Apache-2.0)
How to test the openEHR EHR API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the openEHR EHR API collection, without the publisher's secrets.
- Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
- Send a requestPick an endpoint, for example “Get EHR by subject id” (GET /ehr?subject_id=ins01&subject_namespace=examples), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the openEHR EHR API?
Description Purpose This specification describes service endpoints, resources and operations as well as details of requests and responses that interact with… It is listed under Healthcare and has 33 endpoints.
Who publishes the openEHR EHR API?
It is listed from openEHR's public API description (an OpenAPI document), not published by openEHR on Swastik Codes. Anyone who controls openehr.org can claim the profile by adding a DNS TXT record.
What is the base URL of the openEHR EHR API?
Requests go to https://{baseUrl}/v1. Endpoint paths are added to this base URL.
How do I authenticate with the openEHR EHR API?
Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.
How many endpoints does the openEHR EHR API have?
33 operations on 23 paths (19 GET, 6 PUT, 4 POST, 4 DELETE). The largest groups are COMPOSITION, EHR_STATUS, ITEM_TAG, DIRECTORY.
Is forking the openEHR EHR API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.