ehrbase / ehrbase

An open source openEHR server
http://ehrbase.org
Apache License 2.0
253 stars 101 forks source link

Get web template from definitions api according to specification #990

Open abebehailu opened 1 year ago

abebehailu commented 1 year ago

Configuration information

EHRbase version: 0.21.1 openEHR_SDK version: 1.19.0 Archie version: 2.0.1 PostgreSQL version: PostgreSQL 13.4 Java Runtime version: Oracle Corporation 11.0.15 Operating System version: Linux amd64 4.18.0

Steps to reproduce

According to the OpenEHR specification of the definitions api; a client should be able to send request with the accept header "application/openehr.wt+json" to get a template in web template format. The request should be done towards this endpoint: "/definition/template/adl1.4/{template_id}".

Actual result

Status code 406 Not Acceptable.

Expected result (Acceptance Criteria)

Status code 200 with template in web template format.

According to your documentation there is another endpoint that works "/ehrbase/rest/ecis/v1/template/{templateId}". It would be great if you could consolidate this with the specification. There is a discussion on the topic on OpenEHR discourse.

Definition of Done

vladislavploaia commented 1 year ago

Hello @abebehailu, Thanks for pointing on this issue. This type of Accept header value was added in a newer version of specifications, therefore, it is still not implemented even in EHRBase version v.0.22.0. Implementation is planned after we have the confirmation about new version of specifications. In terms of timings, don't have enough clarity on that side. In any case, will let you know,

CC: @stefanspiska