NHS demo application

National Health Services


For the NHS we made a small application demonstrating how research MEDrecord can be used to store information using OpenEHR. The main purpose of this demo is to show how easy it is to use the Lab API.

MEDrecord demo API – Chromium_066


Demo application showing a hGraph.
Instead of exposing all the OpenEHR complexities and large complex path/value JSON documents to the user interface, this application uses a much friendlier API which is currently under development.

Using this API, applications needing to store information in MEDrecord can use small, readable JSON documents containing the information.

The structure of these JSON documents is automatically generated using OpenEHR archetypes.

Besides the JSON documents a JSON schema is available describing all data inside the JSON document. This JSON schema contains localized texts which can be used to show to users though an user interface.

The API uses standard HTTP REST functionality and supports all standard HTTP headers for requesting resource variants (like language and content-type), cache control and others.

(the JSON schema and extended HTTP functionality are not yet used by the demo)

An example document for storing pulse measurements looks like the following JSON document:

JavaScript

 {
     "data": [
         {
             "rate": "75",
             "rateType": "HEART_RATE",
             "time": "2013-12-11T12:45:11Z"
         }
     ],
     "protocol": {
         "method": "DEVICE"
     }
 }

1
2
3
4
5
6
7
8
9
10
11
12
13
14

 {
     "data": [
         {
             "rate": "75",
             "rateType": "HEART_RATE",
             "time": "2013-12-11T12:45:11Z"
         }
     ],
     "protocol": {
         "method": "DEVICE"
     }
 }

This API is automatically generated using the OpenEHR archetype for measuring pulse as a guide. Please note the API currently only includes the fields required for the demo. In a real application the API will contain much more fields to accurately describe the conditions under which the measurement was taken. However, the API will contain only those fields specified by the OpenEHR archetype which are actually used.

For this demo a special service called archetyped Lab MEDrecord is used which translates all friendly JSON documents into OpenEHR path/value documents which MEDrecord can understand.

Archetyped MEDrecord. – Chromium_074
API documentation/testing


To see this process in action, a new measurement can be created using the archetyped MEDrecord API. For storing a pulse measurement the POST /ehr/{ehrId}/pulse operation of the archetyped MEDrecord API can be used. When a measurement is stored an ID is returned. This is the ID of a locatable in MEDrecord which can be retrieved using the GET /locatable/{id} operation. Before testing this manually make sure an EHR is created first using the POST /ehr operation.

Please note two difference services are used here. There is the Lab MEDrecord service which stores all information. The second service is the archetyped MEDrecord service which translates the friendly JSON documents into the path/value documents required by Lab MEDrecord.

The frontend is a simple Javascript application using bootstrap and hGraph.

Also note this demo lacks any security, authentication or performance which will be available to actual applications.