This falls into some of the short cuts supported and exposed through the modeling The getInternalReferences() is meant to be a connivence method The method you show to add a reference is valid - there has been an outstanding need to simplify parts of the API
mostly we looked into a fluent api
so 1 - not currently but you can extend the model to add methods 2 - its currently the best way
thanks
Sean
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
_______________________________________________ mdht-dev mailing list mdht-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/mdht-dev
|