The DV_QUANTITY.property was removed in Release 0.9 as part of “Remove property attribute from Quantity package” (Jira) but is still present in the BMM files.
It was removed from the current web specifications:
@sebastian.garde Is it possible that CKM is still using this attribute and modelers fill it in? If so, shouldn’t it be removed from the UI? The exporter should probably remove this attribute from the exported ADL to make them valid.
That kind of breaks the normal way of constraining, because property is not a physical attribute in the RM but an implicit concept behind the units. I’m guessing that is why this pattern is actually defined in the Archetype Profile model and not in the AOM itself, because the AOM only works over physical/explicit attributes of the RM (declared in a RM class).
I certainly find this odd as well and not sure what to make of it, but a few comments from my end:
From memory Better originally removed ‘property’ from AD to align with the specs but that proved to be difficult for modellers so they reintroduced it.
I’m fine if DV_QUANTITY.property is reintroduced (lets wait for @siljelb and maybe somebody from Better to comment on their experience with this). I’m just pointing out that without it being reintroduced, the archetypes are not valid.
Let’s keep this to ADL2. It doesn’t have C_DV_QUANTITY to complicate things (being somewhere between AM and RM). DV_QUANTITY is an RM data type.
I know it is easy for the existing vendors and modelers to remember what was needed to change to make openEHR production ready. However, we must be more thorough in documenting such decisions when it comes to the specifications.
In this case the removal is documented.
The reintroduction by Better was not documented. Is there a link to a discussion about why it was difficult for modelers? Was it ADL14 related or is the difficulty gone in ADL2?
Keeping it in archetypes is just ignoring the issue of the removal which makes the archetypes invalid. Tooling hosted on openEHR.org domain must produce valid archetypes to avoid all the new openEHR users to avoid headaches in the future.
Maybe @thomas.beale will share his reasoning for not including DV_QUANTITY.property in the S2 model for Quantity and how the difficulties for modelers are resolved.
Or do you need to leave the units “open” at the archetype level? The above example could be further constrained in templates to include only one of the units (or whatever makes clinical sense).
If DV_QUANTITY.property is reintroduced, it introduces a two-level constraining pattern between two RM attributes. Would this be the only such usage?
TERM/latest/SupportTerminology.html#_property does not specify the units. This means they still have to be specified in the archetypes (as supported by AD) or we would need a mapping table for the property codes to the actual units codes (openEHR unit list).
There are posts here and here that point out that the openEHR unit list is a pain point.
Don’t we solve the issue with the openEHR unit list if we agree that DV_QUANTITY.property was removed 20+ years ago?
I agree with @siljelb that this is needed in archetypes for the reasons stated.
My view is that current CKM archetypes using the C_DV_QUANTITY profile to constrain DV_QUANTITY are valid as per the profile spec. It may be a bit odd and a stretch but I don’t think that it absolutely must be an exact match of an attribute in the RM for any archetype modelled upon this to be regarded as valid.
However, even if this view is agreeable, we still need a way forward for ADL2. That is assuming we are not missing anything here, @thomas.beale (asking you because the adl2 reference archetype mentioned has the property attribute)?
That’s interesting, as I first started looking at openEHR in 2008, and “properties” has been available in tools when using DV_QUANTITY since then.
Not sure? This is what we need to do:
But this doesn’t require persisting the property in the archetype, just that the units source file has properties.
But helping users understand what the unit is, does require persisting the property in the archetype, I think.
List of filtered units is a very important “nice to have” for the modelers but it is a tooling feature. It also means “openEHR units list” is not an openEHR maintained list, but a list of each tooling provider (tooling providers can still decide to maintain a common list).
Persisting the property in the archetype, makes everything dependent on the “openEHR units list”. Specifications don’t mention that implementations must in any way use DV_QUANTITY.property to restrict the list of valid units for a quantity data. This means it doesn’t make sense to leave the units unconstrained in the archetype. Once the units are constrained, DV_QUANTITY.property is redundant (it is still nice to have it in tooling).
Are there archetypes with only DV_QUANTITY.property and without DV_QUANTITY.units?
while these semantics will allow comparison of e.g. two pressures recorded in mbar and mmHg, or even two accelerations whose units are `“m.s^-2” and “m/s^2”, they provide no guarantee that this is a sensible thing to do in terms of domain semantics: comparing a blood pressure to an atmospheric pressure for example may or may not make any sense. It is not within the scope of the quantity package to express such semantics - this is up to application software which uses Quantities found in specific places in the data.
I’m not against having DV_QUANTITY.property in the archetypes. We just have to add this property back to RM
p.s.
My tools support DV_QUANTITY.property so it is easiest for me if it is officially reintroduced to RM. The goal here is to decide what to do with it and make the specifications consistent with the decisions made.
IIRC I was doing compliance verification for ehrbase and checking the specs in detail at the same time.
I believe the idea of the property is to simplify archetype modeling tools and processes to constraint the units at the UI level, but not at the data level, since that attribute doesn’t even exists in the RM. Though for some reason, maybe it was a bug on the Archetype Editor, it was included in the ADL, or maybe it was used as a hint when opening the archetype again for editing, to still have the units constrained by property. Still, it’s not a real RM attribute and IMHO it’s one of those things that are borderline spec-valid (though nobody is discussing its usefulness).
Though this could be formalized in the specs besides being a common practice for years, if it’s formalized/specified, there is no need to remove anything.
Just an idea – tools could work without DV_QUANTITY.property in the archetypes:
The current UI would remain the same. For new archetypes, the tool would offer a list of categories as shown in the image above.
If the property is not saved in the archetype, and such an archetype is opened in the tool, the proper category would be determined from the constrained units in the archetype (based on the first unit is probably enough).
I think that is a perfectly reasonable proposition @borut.jures.
@borut.fabjan - do you have any thoughts on this - can we easily support ‘unit property’ in tooling, without it being recorded explicitly in archetypes?