Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Existing Result sets (and openEHR RM JSON serializations)

...

Archie can serialize RM Objects to XML using the standard openEHR RM XSD, or it can be used to serialize to JSON. The format we have now is very similar that the one Marand uses: snake_cased attribute names, type names as the same notation as the RM specs. Our EHR is still in the prototype phase, so the format is still subject to change, and no results from AQL queries yet.

The code to configure Jackson (XML serialization library) to serialize to /from this exact format is not yet or parse it to RM Objects is present in Archie starting from version 0.2.1

Code Block
languagejs
 "data" : {
      "type@type" : "HISTORY",
      "name" : {
        "type@type" : "DV_TEXT",
        "value" : "history"
      },
      "archetype_node_id" : "id2",
      "events" : [ {
        "type@type" : "POINT_EVENT",
        "name" : {
          "type@type" : "DV_TEXT",
          "value" : "any event"
        },
        "archetype_node_id" : "id7",
        "time" : {
          "type@type" : "DV_DATE_TIME",
          "magnitude" : 1466427403,
          "value" : "2016-06-20T14:56:43.702+02:00"
        },    
		"data" : {
          "type@type" : "ITEM_TREE",
          "name" : {
            "type" : "DV_TEXT"
          },
          "archetype_node_id" : "id4",
          "items" : [ {
            "type@type" : "ELEMENT",
            "name" : {
              "type@type" : "DV_TEXT",
              "value" : "Systolic"
            },
            "archetype_node_id" : "id5",
            "value" : {
              "type@type" : "DV_QUANTITY",
              "magnitude" : 120.0,
              "precision" : 0,
              "units" : "mm[Hg]"
            },
            "path" : "/data[id2]/event[id7]/data[id4]/item[id5]"
          }, {
            "type@type" : "ELEMENT",
            "name" : {
              "type@type" : "DV_TEXT",
              "value" : "Diastolic"
            },
            "archetype_node_id" : "id6",
            "value" : {
              "type@type" : "DV_QUANTITY",
              "magnitude" : 80.0,
              "precision" : 0,
              "units" : "mm[Hg]"
            },
            "path" : "/data[id2]/event[id7]/data[id4]/item[id6]"
          },







...

Code Block
languagejs
firstline1
titlenot grouped
[
  {
    "archetypeId": "openEHR-EHR-OBSERVATION.blood_pressure.v1",
    "archetypePath": "/data[at0001]/events[at0006]/data[at0003]/items[at0004at0005]/value": {,
    "typemagnitude": "DV_QUANTITY"69,
    "nameowner": "Sistólica", {
      "serieuid": ["123123123-..."
      {},
        "magnitudepath": 140,
   "/content[archetype_id=openEHR-EHR-OBSERVATION.blood_pressure.v1]/data[at0001]/events[at0006]/data[at0003]/items[at0005]/value",
    "templateId": "Signos",
    "units": "mm[Hg]"
  },
  {
     "datearchetypeId": "2016openEHR-04-23 03:12:20"EHR-OBSERVATION.blood_pressure.v1",
      },
      {"archetypePath": "/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value",
        "magnitude": 121107,
  
     "unitsowner": "mm[Hg]",{
        "dateuid": "2016-04-30 06:58:05123123123-..."
      },
      {
  "path": "/content[archetype_id=openEHR-EHR-OBSERVATION.blood_pressure.v1]/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value",
     "magnitudetemplateId": 180,
  "Signos",
     "units": "mm[Hg]"
  },
  {
     "datearchetypeId": "2016openEHR-05-02 21:45:26"EHR-OBSERVATION.body_temperature.v1",
      }"archetypePath": "/data[at0002]/events[at0003]/data[at0001]/items[at0004]/value",
      {
   "magnitude": 38,
    "magnitudeowner": 107,{
        "unitsuid": "mm[Hg]",123123123-..."
    },
    "datepath": "2016-05-23 22:52:34"
      }
    ]
  },
  "/content[archetype_id=openEHR-EHR-OBSERVATION.bloodbody_pressuretemperature.v1]/data[at0001at0002]/events[at0006at0003]/data[at0003at0001]/items[at0005at0004]/value": {
    "type": "DV_QUANTITY",
    "nametemplateId": "DiastólicaSignos",
    "serie": [
      {
        "magnitude": 76,
        "units": "mm[Hg]°C",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 54,
        "units": "mm[Hg]",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 92,
        "units": "mm[Hg]",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 69,
        "units": "mm[Hg]",
        "date": "2016-05-23 22:52:34"
      }
    ]
  },
  "openEHR-EHR-OBSERVATION.body_temperature.v1/data[at0002]/events[at0003]/data[at0001]/items[at0004]/value": {
    "type": "DV_QUANTITY",
    "name": "Temperature",
    "serie": [
      {
        "magnitude": 36,
        "units": "°C",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 39,
        "units": "°C",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 39,
        "units": "°C",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 38,
        "units": "°C",
        "date": "2016-05-23 22:52:34"
      }
    ]
  },
  "openEHR-EHR-OBSERVATION.body_weight.v1/data[at0002]/events[at0003]/data[at0001]/items[at0004]/value": {
    "type": "DV_QUANTITY",
    "name": "Peso",
    "serie": [
      {
        "magnitude": 81,
        "units": "kg",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 75,
        "units": "kg",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 48,
        "units": "kg",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 44,
        "units": "kg",
        "date": "2016-05-23 22:52:34"
      }
    ]
  },
  "openEHR-EHR-OBSERVATION.respiration.v1/data[at0001]/events[at0002]/data[at0003]/items[at0004]/value": {
    "type": "DV_QUANTITY",
    "name": "Rate",
    "serie": [
      {
        "magnitude": 50,
        "units": "/min",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 41,
        "units": "/min",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 66,
        "units": "/min",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 61,
        "units": "/min",
        "date": "2016-05-23 22:52:34"
      }
    ]
  },
  "openEHR-EHR-OBSERVATION.pulse.v1/data[at0002]/events[at0003]/data[at0001]/items[at0004]/value": {
    "type": "DV_QUANTITY",
    "name": "Frecuencia",
    "serie": [
      {
        "magnitude": 91,
        "units": "/min",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 47,
        "units": "/min",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 65,
        "units": "/min",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 42,
        "units": "/min",
        "date": "2016-05-23 22:52:34"
      }
    ]
  }
}...
]

 

 

Code Block
languagejs
firstline1
titlegrouped by path
{
  "openEHR-EHR-OBSERVATION.blood_pressure.v1/data[at0001]/events[at0006]/data[at0003]/items[at0004]/value": {
    "type": "DV_QUANTITY",
    "name": "Sistólica",
    "serie": [
      {
        "magnitude": 140,
        "units": "mm[Hg]",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 121,
        "units": "mm[Hg]",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 180,
        "units": "mm[Hg]",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 107,
        "units": "mm[Hg]",
        "date": "2016-05-23 22:52:34"
      }
    ]
  },
  "openEHR-EHR-OBSERVATION.blood_pressure.v1/data[at0001]/events[at0006]/data[at0003]/items[at0005]/value": {
    "type": "DV_QUANTITY",
    "name": "Diastólica",
    "serie": [
      {
        "magnitude": 76,
        "units": "mm[Hg]",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 54,
        "units": "mm[Hg]",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 92,
        "units": "mm[Hg]",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 69,
        "units": "mm[Hg]",
        "date": "2016-05-23 22:52:34"
      }
    ]
  },
  "openEHR-EHR-OBSERVATION.body_temperature.v1/data[at0002]/events[at0003]/data[at0001]/items[at0004]/value": {
    "type": "DV_QUANTITY",
    "name": "Temperature",
    "serie": [
      {
        "magnitude": 36,
        "units": "°C",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 39,
        "units": "°C",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 39,
        "units": "°C",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 38,
        "units": "°C",
        "date": "2016-05-23 22:52:34"
      }
    ]
  },
  "openEHR-EHR-OBSERVATION.body_weight.v1/data[at0002]/events[at0003]/data[at0001]/items[at0004]/value": {
    "type": "DV_QUANTITY",
    "name": "Peso",
    "serie": [
      {
        "magnitude": 81,
        "units": "kg",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 75,
        "units": "kg",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 48,
        "units": "kg",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 44,
        "units": "kg",
        "date": "2016-05-23 22:52:34"
      }
    ]
  },
  "openEHR-EHR-OBSERVATION.respiration.v1/data[at0001]/events[at0002]/data[at0003]/items[at0004]/value": {
    "type": "DV_QUANTITY",
    "name": "Rate",
    "serie": [
      {
        "magnitude": 50,
        "units": "/min",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 41,
        "units": "/min",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 66,
        "units": "/min",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 61,
        "units": "/min",
        "date": "2016-05-23 22:52:34"
      }
    ]
  },
  "openEHR-EHR-OBSERVATION.pulse.v1/data[at0002]/events[at0003]/data[at0001]/items[at0004]/value": {
    "type": "DV_QUANTITY",
    "name": "Frecuencia",
    "serie": [
      {
        "magnitude": 91,
        "units": "/min",
        "date": "2016-04-23 03:12:20"
      },
      {
        "magnitude": 47,
        "units": "/min",
        "date": "2016-04-30 06:58:05"
      },
      {
        "magnitude": 65,
        "units": "/min",
        "date": "2016-05-02 21:45:26"
      },
      {
        "magnitude": 42,
        "units": "/min",
        "date": "2016-05-23 22:52:34"
      }
    ]
  }
}

...