C_DURATION in specs 1.0.2 & 1.0.3 (AOM 1.4) use the class Duration for the range constraint and the assumed type.
The Duration class is not included in the specs.
Checking the support specs, the only assumed class is ISO8601_DURATION.
The definition of C_DURATION on support_im.pdf page 46 section 6.2.9, says "ISO 8601-compatible constraint on instances of Duration....". It mentions Duration not DV_DURATION, the openEHR data type.
This generates a problem for implementers of previous versions of the standard.
1. Is Duration really DV_DURATION? The C_DURATION description seems to point that way. Some implementations, like the Java Ref Impl. DV_DURATION was used in C_DURATION (https://github.com/wware/openehr-java/blob/master/openehr-aom/src/main/java/org/openehr/am/archetype/constraintmodel/primitive/CDuration.java#L186).
2. Or maybe Duration is a missing assumed type? In the latest specs Duration was added as a foundation type http://openehr.org/releases/BASE/latest/docs/foundation_types/foundation_types.html#_duration_class.
3. We need to clarify the C_DURATION types for AOM 1.4 implementers.
Checking AOM2, C_DURATION also references the Duration class and I couldn't find that class in the 1.0.3 specs http://www.openehr.org/releases/AM/Release-2.0.6/docs/AOM2/AOM2.html#_overview_3
A solution would be clarifying those points on an errata / addendum to help avoiding implementation/interpretation errors.
I think on the latest specs, with the Duration class added, there are no issues from the model point of view, but since the C_DURATION description seems to point to DV_DURATION, there can be more implementation issues.
1. If the C_DURATION description doesn't change "ISO 8601-compatible constraint on instances of Duration.", we should use DV_DURATION on the constraints.
2. If Duration should be used in C_DURATION, explicitly state that Duration is not DV_DURATION from the RM.
3. The latest release has a clearer definition "Constraint on instances of assumed primitive type Duration, which is assumed to have the same parts as the ISO8601 duration string."
4. It would be useful to mention that Duration and DV_DURATION can be derived one from the other but are not the same. And that DV_DURATION is not used in the AOM to avoid generating a AOM-RM dependency.
If the better is to modify the descriptions a little instead of doing an errata doc, maybe we can think of releasing AOM 1.5 and adding this improvement to that release.
Related issue: the latest DV_DURATION description has a wrong text see http://openehr.org/releases/RM/latest/docs/data_types/data_types.html#_dv_duration_class "... See assumed types section in the Support IM." (assumed types were moved to the foundation types spec, there is a refernece from the support saying that but I think it would be better to point to foundation directly).
I suggest we just improve the text in the class definitions in AOM 1.4 model, here: https://specifications.openehr.org/releases/AM/latest/AOM1.4.html#_c_date_class
Where they refer to 'Date', ... 'Duration', we should change it to say "the primitive date type, represented in openEHR by the Foundation Types class 'Iso8601_date' " etc.
DV_DURATION is not assumed or intended anywhere in AOM1.4 or AOM2.