Hello all
Yet another MDHT question ...
I'm working with the ihe model. In the Medication class (which derives from SubstanceAdminstration) there is an association internalReference. Code generation made a getter out of it, but no setter.
* <!-- begin-user-doc -->
* @model kind="operation" required="true" ordered="false"
EList<InternalReference> getInternalReferences();
To add an internalReference I add now directly an internalReference like this the relationship:
InternalReference internalReference = IHEFactory.eINSTANCE.createInternalReference().init();
EntryRelationship entryRelationShip = CDAFactory.eINSTANCE.createEntryRelationship();
entryRelationShip.setTypeCode(x_ActRelationshipEntryRelationship.RSON);
entryRelationShip.setAct(internalReference);
this.getMdht().getEntryRelationships().add(entryRelationShip);
This is working, but needs coding for every insertions, so my two questions:
- Are objects insertions to relations somehow supported or can be specified in modeling? (My models show the same code generation behaviour like the ihe model, read only getters)?
- Is my described way with adding an entry to a relationship the correct way or is there a better way?
Thanks for any advice
Oliver
--
oliver egger
mobile: +41765795005
ahdis gmbh
agile health data information systems
bertastrasse 4
8003 zürich
switzerland