Open ppazos opened 3 years ago
After discussing with Thomas, I think the solution for this one is to add template validation on POST /template for constraint codes without a definition.
REF: https://discourse.openehr.org/t/is-unbinded-constraint-code-valid-in-archetypes-templates/1976/5
For instance the RIPPLE template has a constraint code ac0001 on the DV_CODED_TEXT of at0011, and the missing definition of the ac0001 seems to be what makes this commit fail.
I'm also trying to find the source files of the RIPPLE conformance template to add the definition of the ac0001 to the right archetype then regenerate the OPT.
While working in the conformance test cases found that the type of constraint when there is a CONSTRAINT_REF in ADL is mapped to a C_CODE_REFERENCE in the OPT.
I would like to confirm is this issue is due to EHRBASE not supporting C_CODE_REFERENCE or because of the missing constraint_bindings.
Please @chevalleyc @stefanspiska @birgerhaarbrandt do you have some insights on C_CODE_REFERENCE being supported by the OPT model we use internally? Thanks.
I found where in the code this log is shown:
Configuration information
Steps to reproduce
This issue is the same fixed by https://github.com/ehrbase/ehrbase/issues/594 but with a different template.
I have merged develop into my branch and still getting this error: o.e.v.constraints.wrappers.CDvCodedText : Constraint reference is not supported, path: /content[openEHR-EHR-SECTION.adhoc.v1]/items[openEHR-EHR-OBSERVATION.demo.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0004]/items[at0011]
That happens with the POST /composition of the RIPPLE example: (upload the template first)
EHRbase.postman_collection.json.txt
Actual result
In the response I get an exception message.
Expected result (Acceptance Criteria)