Best approach is to report the error and point to a Template fileset so that we can recreate the .opt and see the original archetypes and templates.
I have tested with the postman collection which @birger.haarbrandt have posted above
-
first i have done save template
http://localhost:8080/ehrbase/rest/openehr/v1/definition/template/adl1.4/ -
after that i tried to do post composition in flat format
http://localhost:8080/ehrbase/rest/ecis/v1/composition/?format=FLAT&ehrId=a0cb45a7-f31b-414d-a104-dd057fa72d24&templateId=Corona_AnamneseThis gave me an error
{
āerrorā: āUnexpected value of CompositionFormat: āFLATāā,
āstatusā: āInternal Server Errorā
}
in prevoius post i have mentioned i am able to post compostion .i am able post in other formats but not in flat
Unfortunately Iām not able to reproduce your issue. I used postgres:latest and ehrbase:next in docker on windows 10.
Hello everyone,
i tested the new changes and working with the FLAT format feels great.
As far as i know the FLAT format is not included in the openEHR-Standard. Please correct me if i am wrong.
Since we aim for interoperability and interchangeability of components i have the following question:
Do you have any insight about if there are plans to include the FLAT format in the standard?
Is there any overview about upcoming and planned changes to the standard?
Hi Jendrick,
I am just to about a CR into the REST API to allow the /composition call to allow the current Better FLAT and STRUCTURED formats to be accepted. Probably custom headers??
However this just means that you can have the current Better formats as a payload.
A further piece of work is underway to incorporate the BETTER Flat format ideas as part of the formal standard
So you are definitely not committing yourself to a āproprietary dead-endā.
My current approach is to use the formal REST API for all of the CDR interactions, apart from /composition where I use the Better Ehrscape/Ethercis API endpoint so I can use FLAT formats - slightly annoying but it works.
Having said all of that, the canonical xml and json formats will remain the āgold standardā particularly for moving data between CDRs
We are aiming at 100% conformance with Betterās implementation. We found some design decisions that we would like to discuss and this will be reflected in the SDT format spec that @ian.mcnicoll mentioned.
I also fully endorse his push to have this format supported in the official REST API. So yes, it can be considered as part of the standard.
Hello @birger.haarbrandt,
Thank you for building this!
Will the adl2 template endpoint be supported ehrbase? if yes, is there an estimate on when it would be available?
Seems like the docker image has changed from ehrbaseorg/ehrbase:next to ehrbase/ehrbase:next now. I was using an old version of EHRBase for a long time not realizing this. For people getting started with docker, here is a quick start docker-compose.yml file that will get you running on the latest version:
version: "3"
services:
ehrbase:
image: ehrbase/ehrbase:next
ports:
- "8080:8080"
environment:
- DB_URL=jdbc:postgresql://db:5432/ehrbase
- DB_USER=ehrbase
- DB_PASS=ehrbase
- SYSTEM_NAME=local.ehrbase.org
depends_on:
- db
db:
image: ehrbaseorg/ehrbase-postgres:latest
environment:
- POSTGRES_PASSWORD=postgres
volumes:
- data:/var/lib/postgres
volumes:
data:
If you want to update, just do docker-compose pull
It will be supported sooner or later but unfortunately we donāt have this formally on the roadmap at the moment.
We have a quite mature .NET implementation of āall in openEHRā. Both a .NET openEHR server, SDK, clients and lots of tooling. You might be interested in some of these. Currently we donāt have any customers outside Norway and our main focus is our national customers. Anyway - I am writing this to check if there might be any interest in (some of) our software stack for your activities 
I am testing the improved FLAT composition support in 0.16.5. But I am unable to get any response from the server when I do POST. Are the paths same as per your postman collection? @birger.haarbrandt
I also could not find the FLAT composition APIs in the Swagger
regards
I have 0.16.5 working ok with FLAT.
curl --location --request POST āhttp://localhost:8080/ehrbase/rest/ecis/v1/composition?ehrId=d4a7af5d-4147-44ef-a567-e69e2fee214a&templateId=IDCR%20-%20Adverse%20Reaction%20List.v1&committerName=Dr%20Franke&format=FLATā
āheader āContent-Type: application/jsonā
āheader āAuthorization: Basic OWI4ZDhiMTEtYTJhNi00YzE5LWI4MGMtYWZmNzY5MWE1OTlmOiQyYSQxMCQ2MTlraQ==ā
ādata-raw ā {
āadverse_reaction_list/language|codeā: āenā,
āadverse_reaction_list/language|terminologyā: āISO_639-1ā,
ā¦
}}
Is committerName mandatory?
Regards
No optional -it will default to the logged in user and actually Iām not sure that Ehrbase supports it -may well be ignored.
Yes FLAT composition is working. The problem was with a couple of templates and is still having same problem. It is working for all the other templates.
I have managed to narrow down the problem to Upload a new ADL 1.4 template with PREFER:return=representation returns 400 Bad request Ā· Issue #512 Ā· ehrbase/ehrbase Ā· GitHub
These templates seem to have got corrupted while importing. Tried updating the template, but the problem persists
Thanks for creating the ticket. We are really keen to find and resolve as much issues as possible before the 1.0 release!
Hi Ehrbase team
What is the best way to generate flat format composition from a template. The example generator would be really useful
thanks much
Sangeeta
The VScode plug-in already does some example generation (using archie). It supports a.o. generate example flat json. (Not webtemplate)
Hello everyone, I am a little confused by all this different statements:/ Should it now be possible to get sample collection in flat format via
http://<ip>/ehrbase/rest/ecis/v1/template/<template_id>/example?format=FLAT?
If yes, what could be wrong if the answer of this request looks like the following, although the template_id does exist:
{"meta":{"href":{"url":"<ip>/ehrbase/rest/ecis/v1/template<template_id>/example"}},"action":"RETRIEVE","composition":}
I did use the updated yaml file of @Sidharth_Ramesh
Looks good, which version of EHRbase are you using? Latest dev branch?