Hi all.
I?m working in the archetype validation alghoritm of the zilics models (more
on this thread -->
http://www.openehr.org/mailarchives/ref_impl_java/msg00975.html).
I ran into a little problem, and I?d like to hear your thoughts.
The specification for the C_QUANTITY_ITEM class states that the "units"
field is valid when:
units_valid: units /= Void and not units.is_empty, in other (java) words:
units != null && units.size() > 0
Ocean?s Archetype editor lets you create a Quantity Item as a Qualified
real, without any units.
The ADL it generates for such an item is like:
ELEMENT[at0005] occurrences matches {0..1} matches { -- INR
value matches {
C_DV_QUANTITY <
property = <[openehr::380]>
list = <
["1"] = <
units = <"">
magnitude = <|>=0.0|>
precision = <|0|>
>
>
>
}
}
For such an archetype, validation fails because the parsed Archetype object
will have a CQuantityItem object having units = [empty list]
So, which one is wrong? The archetype or the validation alghorithm?
Should I just avoid creating archetypes with Quantity items with no units?
If so, should Archetype editor prevent the user from creating such an item?
Cheers!
Tony L?mpada
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.openehr.org/mailman/private/openehr-technical_lists.openehr.org/attachments/20090209/3b335961/attachment.html>