Resources (latest)
Purpose
This specification describes openEHR API resources.
Related Documents
Prerequisite documents for reading this document include:
Related documents include:
- The EHR Information Model
- 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/resources.html.
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"
}
}
}
The following resources are formally specified in the Archetype Query Language (AQL) and in the Query Service.
The AdhocQueryExecute
resource:
q required | string (AQL) The given AQL query. |
offset | integer <int32> (Offset) Default: 0 The row number in result-set to start result-set from ( |
fetch | integer <int32> (Fetch) Number of rows to fetch (the default depends on the implementation). |
object (QueryParameters) A set of query parameters. |
{- "q": "SELECT e/ehr_id/value, c/context/start_time/value as startTime, obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude AS systolic, c/uid/value AS cid, c/name FROM EHR e CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.encounter.v1] CONTAINS OBSERVATION obs[openEHR-EHR-OBSERVATION.blood_pressure.v1] WHERE obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude >= $systolic_bp",
- "offset": 10,
- "fetch": 10,
- "query_parameters": {
- "ehr_id": "7d44b88c-4199-4bad-97dc-d78268e01398",
- "systolic_bp": 140
}
}
The stored-query execute, known as the Query
resource:
offset required | integer <int32> (Offset) Default: 0 The row number in result-set to start result-set from ( |
fetch required | integer <int32> (Fetch) Number of rows to fetch (the default depends on the implementation). |
required | object (QueryParameters) A set of query parameters. |
{- "offset": 10,
- "fetch": 10,
- "query_parameters": {
- "ehr_id": "7d44b88c-4199-4bad-97dc-d78268e01398",
- "systolic_bp": 140
}
}
This resource is formally specified in the Service Model as Query Result.
object (ResultSetMetadata) RESULT_SET metadata. | |
name | string (QueryName) The (fully qualified) name of the query (when is registered as a stored query), in a format of |
q | string (AQL) The given AQL query. |
Array of objects (RESULT_SET_COLUMN) A set of AQL column specifications, defined in the given AQL. | |
rows required | Array of any (RESULT_SET_ROW) [ items ] An ordered set of RESULT_SET rows. |
{- "meta": {
- "_type": "RESULTSET",
- "_schema_version": "1.0.0",
- "_created": "2017-08-19T00:25:47.568+02:00",
- "_generator": "openEHRSys.ResultSets.Serialization.Json.ResultSetJsonWriter (5.0.0.0)",
- "_executed_aql": "SELECT e/ehr_id/value, c/context/start_time/value as startTime, obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude AS systolic, c/uid/value AS cid, c/name FROM EHR e CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.encounter.v1] CONTAINS OBSERVATION obs[openEHR-EHR-OBSERVATION.blood_pressure.v1] WHERE obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude >= 50"
}, - "name": "org.openehr::compositions",
- "q": "SELECT e/ehr_id/value, c/context/start_time/value as startTime, obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude AS systolic, c/uid/value AS cid, c/name FROM EHR e CONTAINS COMPOSITION c[openEHR-EHR-COMPOSITION.encounter.v1] CONTAINS OBSERVATION obs[openEHR-EHR-OBSERVATION.blood_pressure.v1] WHERE obs/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude >= $systolic_bp",
- "columns": [
- {
- "name": "#0",
- "path": "/ehr_id/value"
}, - {
- "name": "startTime",
- "path": "/context/start_time/value"
}, - {
- "name": "systolic",
- "path": "/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value/magnitude"
}, - {
- "name": "cid",
- "path": "/uid/value"
}, - {
- "name": "#4",
- "path": "/name"
}
], - "rows": [
- [
- "81433066-c417-4813-9b29-79783e7bed23",
- "2017-02-16T13:50:11.308+01:00",
- 140,
- "90910cf0-66a0-4382-b1f8-c0f27e81b42d::openEHRSys.example.com::1",
- {
- "_type": "DV_TEXT",
- "value": "Labs"
}
]
]
}
This resource represents the list of Template
meta-information associated with uploaded templates - see also Service Model - Definition Package.
template_id required | string |
version | string |
concept required | string |
archetype_id required | string |
created_timestamp required | string |
[- {
- "template_id": "openEHR-EHR-COMPOSITION.t_vital_signs.v1.0.0",
- "version": "1.0.1",
- "concept": "Vital Signs",
- "archetype_id": "openEHR-EHR-COMPOSITION.encounter.v1",
- "created_timestamp": "2017-08-14T19:24:56.639Z"
}
]
The following resources are formally specified in the Archetype Model as AOM/ADL 1.4 Operational Templates (OPTs) and as AOM2 templates.
The AOM/ADL 1.4 OPERATIONAL_TEMPLATE
resource:
{ }
The AOM/ADL 2 OPERATIONAL_TEMPLATE
resource:
{ }
The WebTemplate
alternative resource:
templateId required | string |
version required | string |
defaultLanguage required | string |
languages required | Array of strings |
required | object (Tree) |
{- "templateId": "string",
- "version": "string",
- "defaultLanguage": "string",
- "languages": [
- "string"
], - "tree": {
- "id": "string",
- "name": "string",
- "localizedName": "string",
- "rmType": "string",
- "nodeId": "string",
- "min": 0,
- "max": 0,
- "localizedNames": {
- "en": "Vital Signs"
}, - "localizedDescriptions": {
- "sl": "Generic encounter or progress note composition"
}, - "aqlPath": "string",
- "children": [
- {
- "id": "context",
- "rmType": "EVENT_CONTEXT",
- "nodeId": "",
- "min": 1,
- "max": 1,
- "aqlPath": "/context",
- "children": [
- {
- "id": "context_detail",
- "name": "Context detail",
- "localizedName": "Context detail",
- "rmType": "CLUSTER",
- "nodeId": "openEHR-EHR-CLUSTER.context_detail.v1",
- "min": 0,
- "max": -1,
- "localizedNames": {
- "sl": "Podrobnosti"
}, - "localizedDescriptions": {
- "sl": "Dodatni podatki o kontekstu"
}, - "aqlPath": "/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.context_detail.v1]",
- "children": [
- {
- "id": "tags",
- "name": "Tags",
- "localizedName": "Tags",
- "rmType": "DV_TEXT",
- "nodeId": "at0008",
- "min": 1,
- "max": -1,
- "localizedNames": {
- "sl": "Tagi"
}, - "localizedDescriptions": {
- "sl": "*"
}, - "annotations": {
- "comment": "Tags applied to the composition. They can contain various ids, such as episode id, central case id or other types of information forming composition meta-data."
}, - "aqlPath": "/context/other_context[at0001]/items[openEHR-EHR-CLUSTER.context_detail.v1]/items[at0008]/value",
- "inputs": [
- {
- "type": "TEXT"
}
]
}
]
}, - {
- "id": "start_time",
- "name": "Start_time",
- "rmType": "DV_DATE_TIME",
- "min": 0,
- "max": 1,
- "aqlPath": "/context/start_time",
- "inputs": [
- {
- "type": "DATETIME"
}
], - "inContext": true
}, - {
- "id": "setting",
- "name": "Setting",
- "rmType": "DV_CODED_TEXT",
- "min": 0,
- "max": 1,
- "aqlPath": "/context/setting",
- "inputs": [
- {
- "suffix": "code",
- "type": "TEXT"
}, - {
- "suffix": "value",
- "type": "TEXT"
}
], - "inContext": true
}
]
}
]
}
}
This resource represents the definition of a stored Query and is formally specified in the Service Model as Registered Queries.
name required | string (QueryName) The (fully qualified) name of the query (when is registered as a stored query), in a format of |
type required | string (QueryType) Default: "AQL" Query formalism type. |
version required | string (QueryVersion) The SEMVER version number of the Stored Query. |
saved required | string <date-time> |
q required | string (AQL) The given AQL query. |
{- "name": "org.openehr::compositions",
- "type": "aql",
- "version": "1.0.1",
- "saved": "2017-07-16T19:20:30.450+01:00",
- "q": "SELECT c FROM EHR e[ehr_id/value=$ehr_id] CONTAINS COMPOSITION c[$compositionid] WHERE c/name/value = 'Vitals'"
}