Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter

Categories

In this Discussion

El fin de este foro es dar soporte gratuito y comercial a los distintos productos y servicios de CaboLabs.com. El soporte gratuito se brinda en los foros de acceso público y no tiene garantía de tiempo mínimo de respuesta. El soporte comercial se brinda en foros privados donde se garantiza una respuesta dentro de las 24 horas.

Commit health data to ehrserver

I started developing a client side application for ehrserver using its rest api. till now I have created login part, list ehrs, show user info, create ehr etc using requests through ehrserver rest api. But now I am stuck at part where I want to commit medical data in ehrserver through POST /ehrs/$ehrUid/compositions request. the documentation says we have to send an xml or json in request body which will contain health data. But this xml seems too complicated and I am not able to understand how to create this xml. I just want to commit simple medical values like blood pressure, weight etc and I don't care if the document is in openEhr format or not. Suppose I just want to commit only a single value like height=80 to an ehr with ehruid=12345678, what should be my request body, parameters etc?

Comments

  • Hi,

    The XML used to commit data contains a list of versions that follow the openEHR XML format defined by this schema https://github.com/ppazos/cabolabs-ehrserver/blob/master/xsd/Version.xsd

    The container is just adding <versions> ... </versions>, inside there are one or many <version>...</version>

    I have created a tool that generates a valid version XML from an OPT with dummy data:https://github.com/ppazos/openEHR-OPT

    Using the option to generate a tagged XML allows you to inject your data without the need to generating the whole XML from your app. This doesn't deal with optional/mandatory data or with multiple occurrences of data, that should be solved by the client app, but it is a good simple start.

    The EHRServer is openEHR compliant, committing XML that is not openEHR compliant is not accepted, since can't know what the structure is. That is the point of using openEHR templates to define the data: the EHRServer doesn't know ti specific data structure you are committing until you upload a template. The template follows the openEHR information model, and the XML that is committed complies with a template and also follows the openEHR model. That allows to understand and process data committed, and also defining queries over that data, while being generic (no specific data points are hardcoded in the app, so there is no param for BP or heart rate, that would be having hardcoded data and is the typical way of creating health systems, that is also a blocker for evolution and interoperability and we avoid that approach by using openEHR).

    So first, you need to have an archetype that models the height, create a template that includes that archetype, export the OPT from the template, load the OPT in the EHRServer, generate a sample instance from the OPT using the openEHR-OPT tool, try to commit that XML, adding the <versions> envelope. That is the process for everything you need to add to the EHRServer.
  • Thanks the answer. Can you paste a sample xml/json generated using signos template here so that i can directly use it and send it in request body of api url.
  • Try doing the exercise of generating it. You will need to do it either way. Also you can check the insomnia script that has commit examples.
  • Hi, we have a data commit guide here: https://cloudehrserver.com/learn/data_commit

    Also the EHRServer guide published here contains detailed info about the commit service and format: https://cloudehrserver.com/learn
  • Hi, I have created a tool to help with the data generation tasks, is the CaboLabs openEHR Toolkit http://server001.cloudehrserver.com/cot/
  • Hello, thank you a lot for the step by step guide in the youtube channel,
    but what if i would like to commit with insomnia the clinical data to the EHRServer that are in a nosql format (JSON file for example) is this possible?

    in other words, instead of using an sql based data source i would like to use a nosql data source document oriented for example (json dataset) and then generate the JSON openEHR compliant format from it?

    thank you in advance for your help!
  • There is a mix of requests there, one thing is the format used on the commit service and the other how data is stored. Currently the EHRServer allows to send a JSON document to the commit service, You can generate one using the CaboLabs openEHR Toolkit mentioned in my comment above.

    Regarding the JSON-oriented storage, that actually is not part of EHRServer, and will require basically to rewrite the server from scratch since everything relies on a relational database. With that being said, the EHRServer is a microservice, you should worry about using the API not how data is stored internally, that is a basic architectural design principle behind the EHRServer, to help you build your products faster without worrying about how the data is stored, managed, and queried. If you focus on that, you are missing that basic design principle.
Sign In or Register to comment.