Compilation error of generated classes from template
Opened this issue · 1 comments
talex1 commented
Hi
I created own archetype and template by https://tools.openehr.org/designer/, generated classes from template by openEHR_SDK generator v.1.24.0 and while building I got an error:
"MyLaboratoryResultV3Composition.java:35: error: MyLaboratoryResultV3Composition is not abstract and does not override abstract method getSettingDefiningCode() in CompositionEntity public class MyLaboratoryResultV3Composition implements CompositionEntity..."
In generated class is:
"...
/**
- Path: my_laboratory_result/Event Context/location
*/
@path("/context[at0002]/location")
private String eventContextLocation;
........
public Setting getContextSettingDefiningCode() {
return this.contextSettingDefiningCode ;
}
"
Why method getContextSettingDefiningCode() instead of getSettingDefiningCode() is generated from this opt template?
I can add this opt template to ehrBase server and add composition for this template.
my_laboratory_result.v3.opt.zip
stefanspiska commented
this is because of https://discourse.openehr.org/t/composition-archetypes-are-generated-with-atcode-in-eventcontext/3202
you have to edit your composition archetype.