use of org.ehrbase.client.classgenerator.examples.minimalevaluationenv1composition.MinimalEvaluationEnV1Composition in project openEHR_SDK by ehrbase.
the class NumericTestsIT method setUp.
@Before
public void setUp() throws IOException {
super.setUp(null);
// build a number of compositions with different DvQuantity values and different names
aComposition = new CanonicalJson().unmarshal(IOUtils.toString(CompositionTestDataCanonicalJson.MINIMAL_EVAL.getStream(), StandardCharsets.UTF_8), Composition.class);
for (int i = 0; i < 10; i++) {
Element element = (Element) aComposition.itemsAtPath("/content[openEHR-EHR-EVALUATION.minimal.v1]/data[at0001]/items[at0002]").get(0);
element.setValue(new DvQuantity("kg", Double.valueOf("" + (i + 1)), 0L));
element.setName(new DvText("value-" + i + 1));
Flattener flattener = new Flattener(new TestDataTemplateProvider());
MinimalEvaluationEnV1Composition minimalEvaluationEnV1Composition = flattener.flatten(aComposition, MinimalEvaluationEnV1Composition.class);
// create the composition
MinimalEvaluationEnV1Composition comp = compositionEndpoint.mergeCompositionEntity(minimalEvaluationEnV1Composition);
}
numericQuery = new NumericQuery(ehrUUID, openEhrClient);
}
Aggregations