Hi Rong, my name is Pablo Pazos and i’m working at the NIB with Rodrigo Filgueira.
We are trying to understand the openehr from the bottom, that’s the reason im implementing the AOM based on teh specification and taking your implementation as reference.
We based our implementation of AOM in OpenEHR AOM Release 1 Revision 2.0.1 and took the Branches Implementation Release 1.0 as a reference.
I have some questions and Im sure you can help me with them. The questions are separated following the AOM package structure.
Primitive package:
-
Whats the meaning of the standardRepresentation() method of CPrimitive class? Whats the use of the standardRepresentation of a CPrimitive object? How can I find the standardRepresentation of a CPrimitive class?
-
The validValue() method of the CDuration class is not implemented. There is only one restriction on a Duration, the range, but: What do I need to do to say a Duration is valid with respect to the range constraint?
-
If hasAssumedValue returns false, the assumedValue attribute is necesarilly null?
If so, lets consider the invariant validValue ( assumedValue ), my question is: validValue ( null ) returns true? or have we to check that hasAssumedValue() is true before we call the validValue(..) operation.
- There is only one constraint for CDateTime in the specification, the range constraint. And there is the validityIsRange() operation that returns true if the constraint is range, but we have only one type of constraint, so the operation returns always true?
The implementation has more types of constraints: a pattern and a list, but those do not appear in the spec.
Constraint Package:
We found some not implemented operations:
isValid(): boolean
hasPath(): boolean
isSubsetOf( other: ArchetypeConstraint ): Boolean
-
Why are they not implemented? Are there for future extensions of the model?
-
What do we need to implement them?
-
For isSubsetOf(..), how to compare the constraints in order to know whats narrower?
Other questions:
-
The CSingleAttribute has a list of alternative constraints, the question is: the alternatives are all the constraints for some object or we got the alternatives and have to choose only one of the alternatives? (the alternative word implies that an election should be done) If we have to choose only one of the alternatives, what criteria is used to choose one?
-
Maybe a documentation bug. The diagram of page 18 shows an attribute named CDomainType.standard_equivalent, but on page 27 there is a CDomainType.standard_representation, whats the correct name?
-
The ArchetypeInternalRef has an invariant: ultimate_root.hasPath( targetPath ), my question is: how to find the ultimate root?, the ultimate root is the root of the archetype (the definition attribute of the Archetype class)?
Ontology Package:
There are some operations that cant be implemented based on the attributes that appear in the spec., operations like hasLanguage(), termDefinition(), constraintDefinition() need a language but we havent got a lang. (your implementation has a list of languages).
-
Why those operations are implemented with things that not appear on the spec?
-
What are those operations for?
I cannot implement the binding operations either, because I dont know where to find the bindings. Your implementation has some extra classes that dont appear on the spec that may help with the binding, OntologyBinding, OntologyBindingItem, TermBindingItem and QueryBindingItem. Whats the need of those extra classes? Why dont they appear on the spec? Why does the ArchetypeOntology.termBinding attribute, which is in your implementation, not appear on the spec?
Archetype Package:
-
In Archetype.previousVersion() operation, how to find the previous version?, your implementation has a todo label with the same message.
-
should Archetype.conceptName() return Archetype.ontology.termDefinition(lang, this.conceptCode).toString(); ? why have you not implemented it? what is/will it be used for?
-
The Archetype.conceptName() operation has to return Archetype.ontology.termDefinition(lang, this.conceptCode).toString?
-
The Archetype.isSpecialised() has to return parented != null?
Thank you
regards,
Pablo Pazos
NIB