Closed chevalleyc closed 4 years ago
In the template the name of openEHR-EHR-OBSERVATION.laboratory_test_result is renamed from "Laborergebnis" to "Befund" however virology_finding_with_specimen.json.txt the name of openEHR-EHR-OBSERVATION.laboratory_test is "Laborergebnis". If I change it to "Befund" the first assert works.
The second assert was a bug in handling of paths with names.
see
Steps to reproduce
Flatten and unflatten composition using the attached template failed as follows (also attached the corresponding canonical json for use with Postman). Corresponding snippet is as follows:
Statement
assertThat(virologischerBefundComposition.getBefund()).isNotNull();
failsStatement
openEhrClient.compositionEndpoint(ehr).mergeCompositionEntity(virologischerBefundComposition);
raises a ClassCastException in Unflattener.java line 97:The test data snippet to construct the composition is attached below (the .txt should be removed...)
TestData.buildTestVirologischerBefundComposition()
scratch_5.java.txtCanonical JSON
virology_finding_with_specimen.json.txt
Template Virologischer Befund.opt.txt
Expected result
Success criteria