A disirable feature would be generation of example Instances of a Template for demo.
Currently, when open a specified Template, the right panel will render it as a form that could be used for entering some example data. So, sometime, displaying and export/save the example Instance data would be a nice feature.
For now, using the EHRbase Swagger UI, the operation GET {BASE-URL}/rest/openehr/v1/definition/template/{template_id}/example can be used to generate an example composition (populated with fake data; format = application/xml) for the specified template.
Generating example instances from a template is “easy” and can be fully automated (I know that @pablo, Archie and @borut.jures have done it – probably others too – please reply to add your solution).
Next level is generating fully randomized example instances where optional data is sometimes added and sometimes omitted and variable number of items is added for lists.
The interesting part is generating instances with clinically relevant data. I’m using YAML based formulas which clinicians can prepare:
Notice that there are no references to archetype names or paths (even if they are supported for more complex cases). This means that clinically relevant data will be added to ANY template based on LOINC codes alone.
Manually creating example instances is time consuming and in the long run hard to maintain. Writing formulas (as shown above) would be time better spent.
It would be great if example instances with clinically relevant data were available for download in the CKM (try googling “fhir blood pressure example” and “openehr blood pressure example” – Google will autocomplete it for FHIR, but not for openEHR). From my experience developers can better understand JSON example than reading archetype description in CKM (even if CKM is more detailed). Maybe this is one of the reasons why FHIR is picked up so quickly by the developers.
Blockquote Synthea is a Synthetic Patient Population Simulator that is used to generate the synthetic patients within SyntheticMass. Synthea outputs synthetic, realistic but not real patient data and associated health …
I’ll use Synthea FHIR data to map it to openEHR (Synthea doesn’t support openEHR format).
This is where posted formulas originate from – my MapEHR project for migrating legacy EHR data to openEHR
They were just re-purposed for my client’s example instance synthesizer.
And it helps that you have a lot of experience with the tools. Consider a new developer trying to figure out “STRUCTURED JSON”, “Composition instance”, “web template”, “canonical json or xml”, “post to CDR”. They will be overwhelmed.
It would be great if Archetype Designer would export directly to canonical composition
It is, but it uses Java classes for mapping FHIR to openEHR. I tried a similar “code-based” approach but it was quickly rejected as “unfriendly” to clinicians – they prefer YAML over programming languages.
Similar to two-level approach of openEHR archetypes, mapping should also separate formal definitions of mapping clinical content from the technical implementation.
The idea is to have a generic tool to convert EHR data to openEHR where mapping rules are defined outside the tool (e.g. YAML/JSON). Ideally the mapping rules would be reusable by different tools/vendors.
Yup @SevKohler is leading this work for HighMed to bring together the FHIR Bridge work and FHIR-Connect, so that it is based on sharable YAML-based artefacts.