ppazos / cabolabs-ehrserver

Open platform to manage and share standardized clinical data, designed by @ppazos at CaboLabs Health Informatics.
https://cabolabs.com
Apache License 2.0
173 stars 110 forks source link

Is there an easier way to commit data to an EHR? #1108

Closed daguanyu closed 1 year ago

daguanyu commented 1 year ago

According to EHRServer v2.3 guide, I used Insomnia REST Client and our test scripts to commit data. However, I find out that to send request properly, I need to write a very complex request body. So I wonder if there is an easier way to help me get the request body json according to the template?

ppazos commented 1 year ago

Hi @daguanyu the complex request body you mention is a COMPOSITION structure serialized to JSON or XML, you don't need to write that structure, that is created by code, mapping from some input data, maybe a form a user uses to input the data, and then the COMPOSITION is serialized. That is how every openEHR system works.

Now, if you want to do a quick test with random data, you should use the openEHR Toolkit to generate data based on operational templates https://toolkit.cabolabs.com/

This step by step tutorial can help you https://www.cabolabs.com/blog/article/how_to_work_with_an_openehr_clinical_data_repository__step_by_step-5c51bc1c3ac69.html

If you have further questions please use the community support chat https://gitter.im/CaboLabs/EHRServer

daguanyu commented 1 year ago

Hi @daguanyu the complex request body you mention is a COMPOSITION structure serialized to JSON or XML, you don't need to write that structure, that is created by code, mapping from some input data, maybe a form a user uses to input the data, and then the COMPOSITION is serialized. That is how every openEHR system works.

Now, if you want to do a quick test with random data, you should use the openEHR Toolkit to generate data based on operational templates https://toolkit.cabolabs.com/

This step by step tutorial can help you https://www.cabolabs.com/blog/article/how_to_work_with_an_openehr_clinical_data_repository__step_by_step-5c51bc1c3ac69.html

If you have further questions please use the community support chat https://gitter.im/CaboLabs/EHRServer

Thank you very much for your help!