EHR API (latest)
© 2003 - 2022 The openEHR Foundation | |
---|---|
The openEHR Foundation is an independent, non-profit foundation, facilitating the sharing of health records by consumers and clinicians via open specifications, clinical models and open platform implementations. | |
Licence | Creative Commons Attribution-NoDerivs 3.0 Unported. https://creativecommons.org/licenses/by-nd/3.0/ |
Support | Issues: Problem Reports Web: specifications.openEHR.org |
Amendment Record
Issue | Details | Raiser, Implementer | Completed |
---|---|---|---|
Release-1.0.3 | |||
5.1 | SPECITS-66: Migrate REST API specs to OpenAPI Specification | S Iancu | 19 Dec 2022 |
Release-1.0.2 | |||
4.2 | SPECITS-41: Add double quotes to ETag and If-Match headers | S Iancu | 21 Mar 2021 |
4.1 | SPECITS-49: Describing Resource Identification; add clarification over getting COMPOSITIONs by with `version_uid` vs `versioned_object_uid` | J Smolka, M Polajnar, S Iancu | 08 Mar 2021 |
4.0 | SPECITS-52: Fix wrong example on revision history of the VERSIONED_COMPOSITION and VERSIONED_EHR_STATUS | J Smolka, S Iancu | 06 Mar 2021 |
Release-1.0.1 | |||
3.2 | SPECITS-38: Fix response status code for semantic validation errors (fixes also SPECPR-298) | P Pazos, S Iancu | 01 Oct 2019 |
3.1 | SPECITS-40: Fix and improve documentation on EHR (fixes also SPECPR-312) | P Pazos, S Iancu | 28 Sep 2019 |
3.0 | SPECITS-32: Fix typos and minor documentary errors (fixes SPECPR-253, SPECPR-255, SPECPR-298, SPECPR-333, SPECPR-337) | J Smolka, P Pazos, E Sundvall, T Beale, S Iancu | 1 Sep 2019 |
2.2 | SPECITS-24: Added changelog | J Smolka, S Iancu | 12 May 2019 |
SPECITS-25, SPECITS-29: Change layout and structure | J Smolka, S Iancu | 12 May 2019 | |
2.1 | Update links to new openEHR specifications website | S Iancu | 16 Dec 2018 |
Release-1.0.0 |
Editor
- Sebastian Iancu, Architect, Code24, Netherlands
Contributors
This specification benefited from wide formal and informal input from the openEHR and wider health informatics community. The openEHR Foundation would like to recognise the following people for their contributions.
- Birger Haarbrandt, MSc, Peter L. Reichertz Institut for Medical Informatics (PLRI), Germany
- Bjørn Næss, DIPS, Norway
- Bostjan Lah, Senior Architect, Better, Slovenia
- Erik Sundvall, Information Architect at Karolinska University Hospital, Sweden
- Heath Frankel, Ocean Informatics, Australia
- Ian McNicoll MD, FreshEHR, UK
- Jake Smolka, Software Engineer, Better, Slovenia
- Matija Polajnar, PhD, Software Engineer, Better, Slovenia
- Pablo Pazos Gutierrez, Senior engineer, CaboLabs, Uruguay
- Rong Chen MD, PhD, Cambio Healthcare Systems, Sweden
- Sebastian Iancu, Architect, Code24, Netherlands
- Seref Arikan, MEcon, Ocean Informatics UK, Centre for Health Informatics and Multi-professional Education (CHIME) UK
- Thomas Beale, Ars Semantica UK, openEHR Foundation Management Board
Trademarks
- 'openEHR' is a trademark of the openEHR Foundation
- 'OpenAPI' is a trademark of the The Linux Foundation
Purpose
This specification describes service endpoints, resources and operations as well as details of requests and responses that interacts with EHR openEHR 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 Data Template (SDT)
- The openEHR Platform Abstract Service Model
Status
This specification is in the STABLE
state, and can be downloaded as OpenAPI specification file (in YAML format) for validation, or for code generators.
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 https://specifications.openehr.org/releases/ITS-REST/latest/ehr.html.
Feedback
Feedback may be provided on the Implementation Technology Specifications forum.
Issues may be raised on the specifications Problem Report tracker.
To see changes made due to previously reported issues, see the ITS component Change Request tracker.
Conformance
tbd.
Management of EHRs. Actions upon resources of this group are also formally described in the I_EHR_SERVICE Abstract Service Model interface.
Create EHR
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
: trueis_modifiable
: truesubject
: a PARTY_SELF object
All other required EHR attributes and resources will be automatically created as needed by the EHR creation semantics.
header Parameters
Prefer | string Default: return=minimal Enum: "return=representation" "return=minimal" Request header to indicate the preference over response details.
The response will contain the entire resource when the |
Request Body schema: application/json
An EHR_STATUS resource MAY be also supplied by the client as the request body.
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "EHR_STATUS" |
required | any (PARTY_PROXY) |
is_queryable required | boolean Default: true |
is_modifiable required | boolean Default: true |
other_details | object (ITEM_STRUCTURE) |
Responses
Request samples
- Payload
{- "archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1",
- "name": {
- "value": "EHR status"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "subject": {
- "_type": "PARTY_SELF"
}, - "is_queryable": true,
- "is_modifiable": true
}
Response samples
- 201
{- "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::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "EHR_STATUS"
}, - "ehr_access": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "59a8d0ac-140e-4feb-b2d6-af99f8e68af8::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "EHR_ACCESS"
}, - "time_created": {
- "value": "2015-01-20T19:30:22.765+01:00"
}
}
Get EHR by subject id
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.
query Parameters
subject_id required | string Example: subject_id=ins01 The EHR subject id. |
subject_namespace required | string Example: subject_namespace=examples The EHR subject id namespace. |
Responses
Response samples
- 200
{- "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::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "EHR_STATUS"
}, - "ehr_access": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "59a8d0ac-140e-4feb-b2d6-af99f8e68af8::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "EHR_ACCESS"
}, - "time_created": {
- "value": "2015-01-20T19:30:22.765+01:00"
}
}
Create EHR with id
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
: trueis_modifiable
: truesubject
: a PARTY_SELF object
All other required EHR attributes and resources will be automatically created as needed by the EHR creation semantics.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
header Parameters
Prefer | string Default: return=minimal Enum: "return=representation" "return=minimal" Request header to indicate the preference over response details.
The response will contain the entire resource when the |
Request Body schema: application/json
An EHR_STATUS resource MAY be also supplied by the client as the request body.
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "EHR_STATUS" |
required | any (PARTY_PROXY) |
is_queryable required | boolean Default: true |
is_modifiable required | boolean Default: true |
other_details | object (ITEM_STRUCTURE) |
Responses
Request samples
- Payload
{- "archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1",
- "name": {
- "value": "EHR status"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "subject": {
- "_type": "PARTY_SELF"
}, - "is_queryable": true,
- "is_modifiable": true
}
Response samples
- 201
{- "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::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "EHR_STATUS"
}, - "ehr_access": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "59a8d0ac-140e-4feb-b2d6-af99f8e68af8::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "EHR_ACCESS"
}, - "time_created": {
- "value": "2015-01-20T19:30:22.765+01:00"
}
}
Get EHR by id
Retrieve the EHR with the specified ehr_id
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
Responses
Response samples
- 200
{- "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::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "EHR_STATUS"
}, - "ehr_access": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "59a8d0ac-140e-4feb-b2d6-af99f8e68af8::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "EHR_ACCESS"
}, - "time_created": {
- "value": "2015-01-20T19:30:22.765+01:00"
}
}
Management of EHR_STATUS and VERSIONED_EHR_STATUS resources. Actions upon resources of this group are also formally described in the I_EHR_STATUS Abstract Service Model interface.
Get EHR_STATUS by version id
Retrieves a particular version of the EHR_STATUS identified by version_uid
and associated with the EHR identified by ehr_id
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
version_uid required | string Example: 6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2 VERSION identifier taken from VERSION.uid.value. |
Responses
Response samples
- 200
{- "archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1",
- "name": {
- "value": "EHR status"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "subject": {
- "_type": "PARTY_SELF"
}, - "is_queryable": true,
- "is_modifiable": true
}
Get EHR_STATUS at time
Retrieves 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 time, otherwise retrieves the latest EHR_STATUS version.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
query Parameters
version_at_time | string Example: version_at_time=2015-01-20T19:30:22.765+01:00 A given time in the extended ISO 8601 format. |
Responses
Response samples
- 200
{- "archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1",
- "name": {
- "value": "EHR status"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "subject": {
- "_type": "PARTY_SELF"
}, - "is_queryable": true,
- "is_modifiable": true
}
Update EHR_STATUS
Updates 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 be specified in the If-Match
header.
The response will contain the updated EHR_STATUS resource when the Prefer
header has a value of return=representation
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
header Parameters
If-Match required | string Example: "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::1" Header to make the request conditional.
Together with |
Prefer | string Default: return=minimal Enum: "return=representation" "return=minimal" Request header to indicate the preference over response details.
The response will contain the entire resource when the |
Request Body schema: application/json
The new EHR_STATUS.
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "EHR_STATUS" |
required | any (PARTY_PROXY) |
is_queryable required | boolean Default: true |
is_modifiable required | boolean Default: true |
other_details | object (ITEM_STRUCTURE) |
Responses
Request samples
- Payload
{- "archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1",
- "name": {
- "value": "EHR status"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "subject": {
- "_type": "PARTY_SELF"
}, - "is_queryable": true,
- "is_modifiable": true
}
Response samples
- 200
{- "archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1",
- "name": {
- "value": "EHR status"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "subject": {
- "_type": "PARTY_SELF"
}, - "is_queryable": true,
- "is_modifiable": true
}
Get versioned EHR_STATUS
Retrieves a VERSIONED_EHR_STATUS associated with an EHR identified by ehr_id
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
Responses
Response samples
- 200
{- "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"
}
}
Get versioned EHR_STATUS revision history
Retrieves revision history of the VERSIONED_EHR_STATUS associated with the EHR identified by ehr_id
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
Responses
Response samples
- 200
{- "items": [
- {
- "version_id": {
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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"
}
}
]
}
]
}
Get versioned EHR_STATUS version at time
Retrieves 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 at specified time, otherwise retrieves the latest VERSION.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
query Parameters
version_at_time | string Example: version_at_time=2015-01-20T19:30:22.765+01:00 A given time in the extended ISO 8601 format. |
Responses
Response samples
- 200
{- "_type": "ORIGINAL_VERSION",
- "contribution": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "COMPOSITION"
}, - "signature": "string",
- "commit_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"
}
}, - "data": {
- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}, - "uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}, - "preceding_version_uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}, - "other_input_version_uids": [
- {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}
], - "lifecycle_state": {
- "value": "Coded text value",
- "defining_code": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}
}, - "attestations": [
- {
- "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"
}
}
]
}
Get versioned EHR_STATUS version by id
Retrieves a VERSION identified by version_uid
of an EHR_STATUS associated with the EHR identified by ehr_id
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
version_uid required | string Example: 6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2 VERSION identifier taken from VERSION.uid.value. |
Responses
Response samples
- 200
{- "_type": "ORIGINAL_VERSION",
- "contribution": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "COMPOSITION"
}, - "signature": "string",
- "commit_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"
}
}, - "data": {
- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}, - "uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}, - "preceding_version_uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}, - "other_input_version_uids": [
- {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}
], - "lifecycle_state": {
- "value": "Coded text value",
- "defining_code": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}
}, - "attestations": [
- {
- "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"
}
}
]
}
Management of COMPOSITION and VERSIONED_COMPOSITION resources. Actions upon resources of this group are also formally described in the I_EHR_COMPOSITION Abstract Service Model interface.
Create COMPOSITION
Creates the first version of a new COMPOSITION in the EHR identified by ehr_id
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
header Parameters
Prefer | string Default: return=minimal Enum: "return=representation" "return=minimal" Request header to indicate the preference over response details.
The response will contain the entire resource when the |
Request Body schema: application/json
The COMPOSITION.
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "COMPOSITION" |
required | object (CODE_PHRASE) |
required | object (CODE_PHRASE) |
required | object (DV_CODED_TEXT) |
required | object (EVENT_CONTEXT) |
required | any (PARTY_PROXY) |
content required | Array of objects (CONTENT_ITEM) |
Responses
Request samples
- Payload
{- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}
Response samples
- 201
- 400
{- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}
Get COMPOSITION
Retrieves 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 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
).
The former is used to retrieve a specific known version of the COMPOSITION (e.g. one identified by 8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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).
When 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.
See Resource identification for more details about the identifiers usage and meaning.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
uid_based_id required | string Example: 8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1 An abstract identifier: it can take a form of an OBJECT_VERSION_ID identifier taken from VERSION.uid.value (i.e. a |
query Parameters
version_at_time | string Example: version_at_time=2015-01-20T19:30:22.765+01:00 A given time in the extended ISO 8601 format. |
Responses
Response samples
- 200
{- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}
Update COMPOSITION
Updates 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 identifier taken from VERSIONED_OBJECT.uid.value (i.e. a versioned_object_uid
).
If the request body already contains a COMPOSITION.uid.value, it must match the uid_based_id
in the URL.
The existing latest version_uid
of COMPOSITION resource (i.e. the preceding_version_uid
) must be specified in the If-Match
header.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
uid_based_id required | string Example: 8849182c-82ad-4088-a07f-48ead4180515 An identifier in a form of a HIER_OBJECT_ID identifier taken from VERSIONED_OBJECT.uid.value (i.e. a |
header Parameters
If-Match required | string Example: "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::1" Header to make the request conditional.
Together with |
Prefer | string Default: return=minimal Enum: "return=representation" "return=minimal" Request header to indicate the preference over response details.
The response will contain the entire resource when the |
Request Body schema: application/json
The new COMPOSITION.
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "COMPOSITION" |
required | object (CODE_PHRASE) |
required | object (CODE_PHRASE) |
required | object (DV_CODED_TEXT) |
required | object (EVENT_CONTEXT) |
required | any (PARTY_PROXY) |
content required | Array of objects (CONTENT_ITEM) |
Responses
Request samples
- Payload
{- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}
Response samples
- 200
- 400
{- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}
Delete COMPOSITION
Deletes 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 OBJECT_VERSION_ID identifier taken from the last (most recent) VERSION.uid.value, representing the preceding_version_uid
to be deleted.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
uid_based_id required | string Example: 8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1 An identifier in a form of an OBJECT_VERSION_ID identifier taken from VERSION.uid.value (i.e. a |
Responses
Get versioned COMPOSITION
Retrieves a VERSIONED_COMPOSITION identified by versioned_object_uid
and associated with the EHR identified by ehr_id
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
versioned_object_uid required | string Example: 8849182c-82ad-4088-a07f-48ead4180515 VERSIONED_COMPOSITION identifier taken from VERSIONED_COMPOSITION.uid.value. |
Responses
Response samples
- 200
{- "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"
}
}
Get versioned COMPOSITION revision history
Retrieves revision history of the VERSIONED_COMPOSITION identified by versioned_object_uid
and associated with the EHR identified by ehr_id
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
versioned_object_uid required | string Example: 8849182c-82ad-4088-a07f-48ead4180515 VERSIONED_COMPOSITION identifier taken from VERSIONED_COMPOSITION.uid.value. |
Responses
Response samples
- 200
{- "items": [
- {
- "version_id": {
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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"
}
}
]
}
]
}
Get versioned COMPOSITION version at time
Retrieves 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 supplied, retrieves the VERSION extant at specified time, otherwise retrieves the latest VERSION.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
versioned_object_uid required | string Example: 8849182c-82ad-4088-a07f-48ead4180515 VERSIONED_COMPOSITION identifier taken from VERSIONED_COMPOSITION.uid.value. |
query Parameters
version_at_time | string Example: version_at_time=2015-01-20T19:30:22.765+01:00 A given time in the extended ISO 8601 format. |
Responses
Response samples
- 200
{- "_type": "ORIGINAL_VERSION",
- "contribution": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "COMPOSITION"
}, - "signature": "string",
- "commit_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"
}
}, - "data": {
- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}, - "uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}, - "preceding_version_uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}, - "other_input_version_uids": [
- {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}
], - "lifecycle_state": {
- "value": "Coded text value",
- "defining_code": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}
}, - "attestations": [
- {
- "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"
}
}
]
}
Get versioned COMPOSITION version by id
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
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
versioned_object_uid required | string Example: 8849182c-82ad-4088-a07f-48ead4180515 VERSIONED_COMPOSITION identifier taken from VERSIONED_COMPOSITION.uid.value. |
version_uid required | string Example: 8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1 VERSION identifier taken from VERSION.uid.value. |
Responses
Response samples
- 200
{- "_type": "ORIGINAL_VERSION",
- "contribution": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "COMPOSITION"
}, - "signature": "string",
- "commit_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"
}
}, - "data": {
- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}, - "uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}, - "preceding_version_uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}, - "other_input_version_uids": [
- {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}
], - "lifecycle_state": {
- "value": "Coded text value",
- "defining_code": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}
}, - "attestations": [
- {
- "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"
}
}
]
}
Management of the directory FOLDER resource. Actions upon resources of this group are also formally described in the I_EHR_DIRECTORY Abstract Service Model interface.
Create directory
Creates a new directory FOLDER associated with the EHR identified by ehr_id
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
header Parameters
Prefer | string Default: return=minimal Enum: "return=representation" "return=minimal" Request header to indicate the preference over response details.
The response will contain the entire resource when the |
Request Body schema: application/json
The directory.
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "FOLDER" |
Array of objects (OBJECT_REF) | |
folders | Array of objects (FOLDER) |
details | object (ITEM_STRUCTURE) |
Responses
Request samples
- Payload
{- "archetype_node_id": "openEHR-EHR-FOLDER.directory.v1",
- "name": {
- "value": "Directory"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "items": [ ],
- "folders": [ ]
}
Response samples
- 201
{- "archetype_node_id": "openEHR-EHR-FOLDER.directory.v1",
- "name": {
- "value": "Directory"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "items": [ ],
- "folders": [ ]
}
Update directory
Updates directory FOLDER associated with the EHR identified by ehr_id
.
The existing latest version_uid
of directory FOLDER resource (i.e. the preceding_version_uid
) must be specified in the If-Match
header.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
header Parameters
If-Match required | string Example: "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::1" Header to make the request conditional.
Together with |
Prefer | string Default: return=minimal Enum: "return=representation" "return=minimal" Request header to indicate the preference over response details.
The response will contain the entire resource when the |
Request Body schema: application/json
The new directory.
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "FOLDER" |
Array of objects (OBJECT_REF) | |
folders | Array of objects (FOLDER) |
details | object (ITEM_STRUCTURE) |
Responses
Request samples
- Payload
{- "archetype_node_id": "openEHR-EHR-FOLDER.directory.v1",
- "name": {
- "value": "Directory"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "items": [ ],
- "folders": [ ]
}
Response samples
- 200
{- "archetype_node_id": "openEHR-EHR-FOLDER.directory.v1",
- "name": {
- "value": "Directory"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "items": [ ],
- "folders": [ ]
}
Delete directory
Deletes directory FOLDER associated with the EHR identified by ehr_id
.
The existing latest version_uid
of directory FOLDER resource (i.e. the preceding_version_uid
) must be specified in the If-Match
header.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
header Parameters
If-Match required | string Example: "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::1" Header to make the request conditional.
Together with |
Responses
Get folder in directory version at time
Retrieves 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 specified time, otherwise retrieves the latest directory FOLDER version.
If path
is supplied, retrieves from the directory only the sub-FOLDER that is associated with that path.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
query Parameters
version_at_time | string Example: version_at_time=2015-01-20T19:30:22.765+01:00 A given time in the extended ISO 8601 format. |
path | string Example: path=episodes/a/b/c A path to a sub-folder; consists of slash-separated values of the name attribute of FOLDERs in the directory. |
Responses
Response samples
- 200
{- "archetype_node_id": "openEHR-EHR-FOLDER.directory.v1",
- "name": {
- "value": "Directory"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "items": [ ],
- "folders": [ ]
}
Get folder in directory version
Retrieves a particular version of the directory FOLDER identified by version_uid
and associated with the EHR identified by ehr_id
.
If path
is supplied, retrieves from the directory only the sub-FOLDER that is associated with that path.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
version_uid required | string Example: 6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2 VERSION identifier taken from VERSION.uid.value. |
query Parameters
path | string Example: path=episodes/a/b/c A path to a sub-folder; consists of slash-separated values of the name attribute of FOLDERs in the directory. |
Responses
Response samples
- 200
{- "archetype_node_id": "openEHR-EHR-FOLDER.directory.v1",
- "name": {
- "value": "Directory"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "items": [ ],
- "folders": [ ]
}
Management of CONTRIBUTION resource. Actions upon resources of this group are also formally described in the I_EHR_CONTRIBUTION Abstract Service Model interface.
Create CONTRIBUTION
We 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 will be returnedaudit.time_committed
: server will always set itaudit.system_id
: when provided, it will be validated
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
header Parameters
Prefer | string Default: return=minimal Enum: "return=representation" "return=minimal" Request header to indicate the preference over response details.
The response will contain the entire resource when the |
Request Body schema: application/json
The CONTRIBUTION.
object (HIER_OBJECT_ID) | |
required | Array of objects (UPDATE_VERSION) |
required | object (UPDATE_AUDIT) 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. |
Responses
Request samples
- Payload
{- "uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b"
}, - "versions": [
- {
- "preceding_version_uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}, - "signature": "string",
- "lifecycle_state": {
- "terminology_id": "snomed_ct",
- "code_string": "308335008"
}, - "attestations": [
- {
- "change_type": {
- "value": "creation",
- "defining_code": {
- "terminology_id": "openehr",
- "code_string": "249"
}
}, - "description": "Description text",
- "committer": {
- "_type": "PARTY_IDENTIFIED",
- "name": "A user name"
}
}
], - "data": {
- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}, - "commit_audit": {
- "change_type": {
- "value": "creation",
- "defining_code": {
- "terminology_id": "openehr",
- "code_string": "249"
}
}, - "description": "Description text",
- "committer": {
- "_type": "PARTY_IDENTIFIED",
- "name": "A user name"
}
}
}
], - "audit": {
- "change_type": {
- "value": "creation",
- "defining_code": {
- "terminology_id": "openehr",
- "code_string": "249"
}
}, - "description": "Description text",
- "committer": {
- "_type": "PARTY_IDENTIFIED",
- "name": "A user name"
}
}
}
Response samples
- 201
- 400
{- "uid": {
- "value": "0826851c-c4c2-4d61-92b9-410fb8275ff0"
}, - "versions": [
- {
- "_type": "OBJECT_REF",
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "COMPOSITION"
}, - {
- "_type": "OBJECT_REF",
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "abcdefgh-1323-42bc-b7f8-787f3660a0ba::openEHRSys.example.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"
}
}
}
Get CONTRIBUTION by id
Retrieves a CONTRIBUTION identified by contribution_uid
and associated with the EHR identified by ehr_id
.
path Parameters
ehr_id required | string Example: 7d44b88c-4199-4bad-97dc-d78268e01398 EHR identifier taken from EHR.ehr_id.value. |
contribution_uid required | string Example: 0826851c-c4c2-4d61-92b9-410fb8275ff0 The CONTRIBUTION uid. |
Responses
Response samples
- 200
{- "uid": {
- "value": "0826851c-c4c2-4d61-92b9-410fb8275ff0"
}, - "versions": [
- {
- "_type": "OBJECT_REF",
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "COMPOSITION"
}, - {
- "_type": "OBJECT_REF",
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "abcdefgh-1323-42bc-b7f8-787f3660a0ba::openEHRSys.example.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"
}
}
}
This resource is formally specified in Reference Model as the EHR class.
object (HIER_OBJECT_ID) | |
object (HIER_OBJECT_ID) | |
object (OBJECT_REF) | |
object (OBJECT_REF) | |
object (DV_DATE_TIME) |
{- "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::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "EHR_STATUS"
}, - "ehr_access": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "59a8d0ac-140e-4feb-b2d6-af99f8e68af8::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "EHR_ACCESS"
}, - "time_created": {
- "value": "2015-01-20T19:30:22.765+01:00"
}
}
The following resources are formally specified in the Reference Model as EHR_STATUS and VERSIONED_EHR_STATUS classes.
The EHR_STATUS
resource:
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "EHR_STATUS" |
required | any (PARTY_PROXY) |
is_queryable required | boolean Default: true |
is_modifiable required | boolean Default: true |
other_details | object (ITEM_STRUCTURE) |
{- "archetype_node_id": "openEHR-EHR-EHR_STATUS.generic.v1",
- "name": {
- "value": "EHR status"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "subject": {
- "_type": "PARTY_SELF"
}, - "is_queryable": true,
- "is_modifiable": true
}
The VERSIONED_EHR_STATUS
resource:
_type | string Default: "VERSIONED_EHR_STATUS" |
required | object (HIER_OBJECT_ID) |
required | object (OBJECT_REF) |
required | object (DV_DATE_TIME) |
{- "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"
}
}
The following resources are formally specified in the Reference Model as COMPOSITION and VERSIONED_COMPOSITION classes.
The COMPOSITION
resource:
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "COMPOSITION" |
required | object (CODE_PHRASE) |
required | object (CODE_PHRASE) |
required | object (DV_CODED_TEXT) |
required | object (EVENT_CONTEXT) |
required | any (PARTY_PROXY) |
content required | Array of objects (CONTENT_ITEM) |
{- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}
The abstract CONTENT_ITEM
class, used in COMPOSITION
:
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
required | object (CODE_PHRASE) |
required | object (CODE_PHRASE) |
Array of objects (PARTICIPATION) | |
object (OBJECT_REF) | |
required | any (PARTY_PROXY) |
any (PARTY_PROXY) | |
_type required | string |
data required | object (ITEM_STRUCTURE) |
{- "name": {
- "_type": "DV_TEXT",
- "value": "Text value"
}, - "archetype_node_id": "string",
- "uid": {
- "_type": "HIER_OBJECT_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b"
}, - "links": [
- {
- "meaning": {
- "_type": "DV_TEXT",
- "value": "Text value"
}, - "type": {
- "_type": "DV_TEXT",
- "value": "Text value"
}, - "target": {
- "_type": "DV_EHR_URI",
- "value": "ehr://system_id/ehr_id/top_level_structure_locator/path_inside_top_level_structure"
}
}
], - "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"
}, - "feeder_audit": {
- "originating_system_item_ids": [
- {
- "id": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "type": "Patient"
}
], - "feeder_system_item_ids": [
- {
- "id": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "type": "Patient"
}
], - "original_content": {
- "_type": "DV_MULTIMEDIA",
- "charset": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "language": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "alternate_text": "string",
- "data": "string",
- "media_type": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "compression_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "integrity_check": "string",
- "integrity_check_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "thumbnail": {
- "_type": "DV_MULTIMEDIA",
- "charset": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "language": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "alternate_text": "string",
- "data": "string",
- "media_type": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "compression_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "integrity_check": "string",
- "integrity_check_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "thumbnail": { },
- "size": 0
}, - "size": 0
}, - "originating_system_audit": {
- "system_id": "string",
- "location": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "subject": {
- "_type": "PARTY_SELF",
- "external_ref": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "b52b9408-7048-4ec8-94bd-831fb0727e67::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "PERSON"
}
}, - "provider": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "time": {
- "_type": "DV_DATE_TIME",
- "value": "2017-08-15T10:37:15.422+02:00"
}, - "version_id": "string",
- "other_details": { }
}, - "feeder_system_audit": {
- "system_id": "string",
- "location": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "subject": {
- "_type": "PARTY_SELF",
- "external_ref": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "b52b9408-7048-4ec8-94bd-831fb0727e67::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "PERSON"
}
}, - "provider": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "time": {
- "_type": "DV_DATE_TIME",
- "value": "2017-08-15T10:37:15.422+02:00"
}, - "version_id": "string",
- "other_details": { }
}
}, - "language": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "encoding": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "other_participations": [
- {
- "function": {
- "_type": "DV_TEXT",
- "value": "Text value"
}, - "mode": {
- "value": "Coded text value",
- "defining_code": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}
}, - "performer": {
- "_type": "PARTY_SELF",
- "external_ref": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "b52b9408-7048-4ec8-94bd-831fb0727e67::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "PERSON"
}
}, - "time": {
- "_type": "DV_INTERVAL",
- "lower_unbounded": true,
- "upper_unbounded": true,
- "lower_included": true,
- "upper_included": true,
- "lower": {
- "_type": "DV_DATE_TIME",
- "value": "2017-08-15T10:37:15.422+02:00"
}, - "upper": {
- "_type": "DV_DATE_TIME",
- "value": "2017-08-15T10:37:15.422+02:00"
}
}
}
], - "workflow_id": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "COMPOSITION"
}, - "subject": {
- "_type": "PARTY_SELF",
- "external_ref": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "b52b9408-7048-4ec8-94bd-831fb0727e67::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "PERSON"
}
}, - "provider": {
- "_type": "PARTY_SELF",
- "external_ref": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "b52b9408-7048-4ec8-94bd-831fb0727e67::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "PERSON"
}
}, - "_type": "ADMIN_ENTRY",
- "data": { }
}
The abstract ITEM_STRUCTURE
class, used in CONTENT_ITEM
:
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "ITEM_SINGLE" |
required | object (ELEMENT) |
{- "name": {
- "_type": "DV_TEXT",
- "value": "Text value"
}, - "archetype_node_id": "string",
- "uid": {
- "_type": "HIER_OBJECT_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b"
}, - "links": [
- {
- "meaning": {
- "_type": "DV_TEXT",
- "value": "Text value"
}, - "type": {
- "_type": "DV_TEXT",
- "value": "Text value"
}, - "target": {
- "_type": "DV_EHR_URI",
- "value": "ehr://system_id/ehr_id/top_level_structure_locator/path_inside_top_level_structure"
}
}
], - "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"
}, - "feeder_audit": {
- "originating_system_item_ids": [
- {
- "id": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "type": "Patient"
}
], - "feeder_system_item_ids": [
- {
- "id": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "type": "Patient"
}
], - "original_content": {
- "_type": "DV_MULTIMEDIA",
- "charset": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "language": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "alternate_text": "string",
- "data": "string",
- "media_type": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "compression_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "integrity_check": "string",
- "integrity_check_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "thumbnail": {
- "_type": "DV_MULTIMEDIA",
- "charset": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "language": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "alternate_text": "string",
- "data": "string",
- "media_type": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "compression_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "integrity_check": "string",
- "integrity_check_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "thumbnail": { },
- "size": 0
}, - "size": 0
}, - "originating_system_audit": {
- "system_id": "string",
- "location": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "subject": {
- "_type": "PARTY_SELF",
- "external_ref": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "b52b9408-7048-4ec8-94bd-831fb0727e67::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "PERSON"
}
}, - "provider": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "time": {
- "_type": "DV_DATE_TIME",
- "value": "2017-08-15T10:37:15.422+02:00"
}, - "version_id": "string",
- "other_details": { }
}, - "feeder_system_audit": {
- "system_id": "string",
- "location": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "subject": {
- "_type": "PARTY_SELF",
- "external_ref": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "b52b9408-7048-4ec8-94bd-831fb0727e67::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "PERSON"
}
}, - "provider": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "time": {
- "_type": "DV_DATE_TIME",
- "value": "2017-08-15T10:37:15.422+02:00"
}, - "version_id": "string",
- "other_details": { }
}
}, - "_type": "ITEM_SINGLE",
- "item": {
- "name": {
- "_type": "DV_TEXT",
- "value": "Text value"
}, - "archetype_node_id": "string",
- "uid": {
- "_type": "HIER_OBJECT_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b"
}, - "links": [
- {
- "meaning": {
- "_type": "DV_TEXT",
- "value": "Text value"
}, - "type": {
- "_type": "DV_TEXT",
- "value": "Text value"
}, - "target": {
- "_type": "DV_EHR_URI",
- "value": "ehr://system_id/ehr_id/top_level_structure_locator/path_inside_top_level_structure"
}
}
], - "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"
}, - "feeder_audit": {
- "originating_system_item_ids": [
- {
- "id": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "type": "Patient"
}
], - "feeder_system_item_ids": [
- {
- "id": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "type": "Patient"
}
], - "original_content": {
- "_type": "DV_MULTIMEDIA",
- "charset": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "language": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "alternate_text": "string",
- "data": "string",
- "media_type": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "compression_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "integrity_check": "string",
- "integrity_check_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "thumbnail": {
- "_type": "DV_MULTIMEDIA",
- "charset": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "language": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "alternate_text": "string",
- "data": "string",
- "media_type": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "compression_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "integrity_check": "string",
- "integrity_check_algorithm": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}, - "thumbnail": { },
- "size": 0
}, - "size": 0
}, - "originating_system_audit": {
- "system_id": "string",
- "location": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "subject": {
- "_type": "PARTY_SELF",
- "external_ref": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "b52b9408-7048-4ec8-94bd-831fb0727e67::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "PERSON"
}
}, - "provider": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "time": {
- "_type": "DV_DATE_TIME",
- "value": "2017-08-15T10:37:15.422+02:00"
}, - "version_id": "string",
- "other_details": { }
}, - "feeder_system_audit": {
- "system_id": "string",
- "location": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "subject": {
- "_type": "PARTY_SELF",
- "external_ref": {
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "b52b9408-7048-4ec8-94bd-831fb0727e67::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "PERSON"
}
}, - "provider": {
- "_type": "PARTY_IDENTIFIED",
- "external_ref": {
- "id": {
- "_type": "GENERIC_ID",
- "value": "16b74749-e6aa-4945-b760-b42bdc07098a",
- "scheme": "pid"
}, - "namespace": "openEHRSys.example.com",
- "type": "PERSON"
}, - "name": "A name"
}, - "time": {
- "_type": "DV_DATE_TIME",
- "value": "2017-08-15T10:37:15.422+02:00"
}, - "version_id": "string",
- "other_details": { }
}
}, - "_type": "ELEMENT",
- "null_flavour": {
- "value": "Coded text value",
- "defining_code": {
- "terminology_id": {
- "value": "local"
}, - "code_string": "at0001"
}
}, - "value": {
- "_type": "DV_BOOLEAN",
- "value": true
}, - "null_reason": {
- "_type": "DV_TEXT",
- "value": "Text value"
}
}
}
The VERSIONED_COMPOSITION
resource:
_type | string Default: "VERSIONED_COMPOSITION" |
required | object (HIER_OBJECT_ID) |
required | object (OBJECT_REF) |
required | object (DV_DATE_TIME) |
{- "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"
}
}
required | any (DV_TEXT) |
archetype_node_id required | string |
any (UID_BASED_ID) | |
Array of objects (LINK) | |
object (ARCHETYPED) | |
object (FEEDER_AUDIT) | |
_type | string Default: "FOLDER" |
Array of objects (OBJECT_REF) | |
folders | Array of objects (FOLDER) |
details | object (ITEM_STRUCTURE) |
{- "archetype_node_id": "openEHR-EHR-FOLDER.directory.v1",
- "name": {
- "value": "Directory"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.com::1"
}, - "items": [ ],
- "folders": [ ]
}
The following resources are formally specified in the Reference Model as the CONTRIBUTION class.
A new CONTRIBUTION
to be committed:
object (HIER_OBJECT_ID) | |
required | Array of objects (UPDATE_VERSION) |
required | object (UPDATE_AUDIT) 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. |
{- "uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b"
}, - "versions": [
- {
- "preceding_version_uid": {
- "_type": "UID_BASED_ID",
- "value": "6cb19121-4307-4648-9da0-d62e4d51f19b::openEHRSys.example.com::2"
}, - "signature": "string",
- "lifecycle_state": {
- "terminology_id": "snomed_ct",
- "code_string": "308335008"
}, - "attestations": [
- {
- "change_type": {
- "value": "creation",
- "defining_code": {
- "terminology_id": "openehr",
- "code_string": "249"
}
}, - "description": "Description text",
- "committer": {
- "_type": "PARTY_IDENTIFIED",
- "name": "A user name"
}
}
], - "data": {
- "archetype_node_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "name": {
- "value": "Vital Signs"
}, - "uid": {
- "_type": "OBJECT_VERSION_ID",
- "value": "8849182c-82ad-4088-a07f-48ead4180515::openEHRSys.example.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": "openEHRSys.example.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": [ ]
}, - "commit_audit": {
- "change_type": {
- "value": "creation",
- "defining_code": {
- "terminology_id": "openehr",
- "code_string": "249"
}
}, - "description": "Description text",
- "committer": {
- "_type": "PARTY_IDENTIFIED",
- "name": "A user name"
}
}
}
], - "audit": {
- "change_type": {
- "value": "creation",
- "defining_code": {
- "terminology_id": "openehr",
- "code_string": "249"
}
}, - "description": "Description text",
- "committer": {
- "_type": "PARTY_IDENTIFIED",
- "name": "A user name"
}
}
}
A retrieved CONTRIBUTION
:
required | object (HIER_OBJECT_ID) |
required | Array of objects (OBJECT_REF) |
required | object (AUDIT_DETAILS) The set of attributes required to document the committal of an information item to a repository. |
{- "uid": {
- "value": "0826851c-c4c2-4d61-92b9-410fb8275ff0"
}, - "versions": [
- {
- "_type": "OBJECT_REF",
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "fb458d9c-1323-42bc-b7f8-787f3660a0b5::openEHRSys.example.com::1"
}, - "namespace": "local",
- "type": "COMPOSITION"
}, - {
- "_type": "OBJECT_REF",
- "id": {
- "_type": "OBJECT_VERSION_ID",
- "value": "abcdefgh-1323-42bc-b7f8-787f3660a0ba::openEHRSys.example.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"
}
}
}