...
- Ocean
- Marand/DIPS
- All the LiU-EEE-specific schemas are at https://github.com/LiU-IMT/EEE/tree/master/src/main/xsd
- Our experimental result format for queries of XML data (originally intended for openEHR AQL queries) in that directory is at https://github.com/LiU-IMT/EEE/blob/master/src/main/xsd/xml-result-v1.xsd It was inspired by SPARQL's result set at http://www.w3.org/TR/rdf-sparql-XMLres/
- ...
Marand Ehrscape result set
Code Block |
---|
{
"meta": {
"href": "http://thinkehr2:8082/rest/v1/query/?aql=select%20%20%20%20%20a_a/data%5Bat0002%5D/events%5Bat0003%5D/data%5Bat0001%5D/items%5Bat0004%5D/value%20as%20Temperature,%20%20%20%20%20a_b/data%5Bat0001%5D/events%5Bat0006%5D/data%5Bat0003%5D/items%5Bat0004%5D/value%20as%20Blood_Pressure_Systolic,%20%20%20%20%20a_b/data%5Bat0001%5D/events%5Bat0006%5D/data%5Bat0003%5D/items%5Bat0005%5D/value%20as%20Diastolic%20from%20EHR%20e%20contains%20COMPOSITION%20a%20contains%20(%20%20%20%20%20OBSERVATION%20a_a%5BopenEHR-EHR-OBSERVATION.body_temperature.v1%5D%20and%20%20%20%20%20OBSERVATION%20a_b%5BopenEHR-EHR-OBSERVATION.blood_pressure.v1%5D)%20offset%200%20limit%20100"
},
"aql": "select a_a/data[at0002]/events[at0003]/data[at0001]/items[at0004]/value as Temperature, a_b/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value as Blood_Pressure_Systolic, a_b/data[at0001]/events[at0006]/data[at0003]/items[at0005]/value as Diastolic from EHR e contains COMPOSITION a contains ( OBSERVATION a_a[openEHR-EHR-OBSERVATION.body_temperature.v1] and OBSERVATION a_b[openEHR-EHR-OBSERVATION.blood_pressure.v1]) offset 0 limit 100",
"executedAql": "select a_a/data[at0002]/events[at0003]/data[at0001]/items[at0004]/value as Temperature, a_b/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value as Blood_Pressure_Systolic, a_b/data[at0001]/events[at0006]/data[at0003]/items[at0005]/value as Diastolic from EHR e contains COMPOSITION a contains ( OBSERVATION a_a[openEHR-EHR-OBSERVATION.body_temperature.v1] and OBSERVATION a_b[openEHR-EHR-OBSERVATION.blood_pressure.v1]) offset 0 limit 100",
"resultSet": [
{
"Temperature": {
"@class": "DV_QUANTITY",
"magnitude": 37.1,
"units": "°C",
"precision": 1
},
"Blood_Pressure_Systolic": {
"@class": "DV_QUANTITY",
"magnitude": 120,
"units": "mm[Hg]"
},
"Diastolic": {
"@class": "DV_QUANTITY",
"magnitude": 90,
"units": "mm[Hg]"
}
},
{
... |
There is some meta-data at the beginning:
- href: href of the call
- aql: the AQL client sent
- executedAql: AQL the server executed - this will have potential parameters replaced
Resultset is a simple array of rows with one object per column. Columns names are taken from AQL select aliases, if none is present then just 0-based column index prefixed by a hash-sign (#) is used instead, i.e.: #0 for first column, etc.
JSON format used here for the RM is also used for other operations. Here is an example where we select an Observation rather than simple DATA_VALUEs:
Code Block |
---|
"Measurement": {
"@class": "OBSERVATION",
"name": {
"@class": "DV_TEXT",
"value": "Body temperature"
},
"archetype_details": {
"@class": "ARCHETYPED",
"archetype_id": {
"@class": "ARCHETYPE_ID",
"value": "openEHR-EHR-OBSERVATION.body_temperature.v1"
... |
Attribute names are snake-case (like defined in MagicDraw). We also add attribute @class to every object to define the exact class used for the object. Class names are all upper case and also snake-case.
JSON Specifics
Proposed Standard
...