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

Toolkit - Instance Generator doesn't accept proportion datatype #1082

Closed Andre-Gunner closed 3 years ago

Andre-Gunner commented 3 years ago

I'm not able to generate instances of templates that have the DV_PROPORTION datatype. I can upload these templates on EHRServer and generate instances using only the "Canonical JSON Composition Generator". But, when I try to generate an instance using either the "Clinical Document Instance Generator XML" or the "Clinical Document Instance Generator JSON" (both from the toolkit's free tools), I get the following error message: "No such property: random_gen for class: com.cabolabs.openehr.opt.instance_generator.XmlInstanceGenerator".

After noticing this pattern, I changed the DV_PROPORTION elements to another datatype, and it seems to work, therefore, I believe there's some issue with these generators and the proportion datatype. As an example, I have attached a file that exemplifies this problem (it's an .opt file transformed into .txt; you'll have to save it as .opt first).

As I said, the "Canonical JSON Composition Generator" works with this template, but unfortunately I haven't managed to work out how can I submit data to the server using the canonical generator (any help regarding this would also be appreciated).

Oximetria.opt.txt

ppazos commented 3 years ago

@Andre-Gunner the toolkit generator it's been fixed, tested with your template and it's generating JSON and XML correctly.

The EHRServer doesn't support the canonical JSON format yet, it's been implemented in Atomik though https://atomik.app/

In the EHRServer guide we mention the XML format and support to the JSON transformation from the XML format, which is generated by the openEHR Toolkit JSON instance generator (not "canonical").

Andre-Gunner commented 3 years ago

Thank you Pablo!