Hi, I'm digging into the specs again, and testing the modeling tools to produce different constraints for DV_DATE_TIME.
When I analyzed the partial datetime pattern yyyy-mm-ddTHH:??:?? that allows optional minutes and seconds, and the constraints that would correspond to "any allowed" it seems both are the same. I'll explain. "any allowed" for DV_DATE_TIME would be any value that actually is a datetime. For instance "1999-01-01" is not a datetime, so "any allowed should check for datetime that at least has hours, that is something like "1999-01-01T16". Having "1999-01-01" as a datetime would be a type mismatch if we are strict. With relaxed rules we can say "1999-01-01" is equivalent to "1999-01-01T00:00:00", but we are assuming something that might not be the intent of the user that inputs the data. Since this is health date, I prefer the strict approach. But if we have the partial datetime pattern, that is validating the same, that at least the hours are there, then minutes and seconds are optional. 1. Invalid datetime like "546454" won't be valid on any allowed or partial pattern 2. Date only like "1999-01-01" won't be valid on any allowed or partial pattern, since it is not a datetime, is date 3. Date with hours, will be valid on both 4. Date with hours and minutes, will be valid on both 5. Date with hours, minutes and seconds will be valid on both (on all cases timezone information can be added, if it is not present, UTC is default) Considering this, it seems both are equivalent. So why allow both? IMO this generates a point where implementers can have different interpretations and implement both constraints in a different way (any allowed and partial pattern). What do others think? Thanks! -- Ing. Pablo Pazos GutiƩrrez pablo.pa...@cabolabs.com +598 99 043 145 skype: cabolabs <http://cabolabs.com/> http://www.cabolabs.com https://cloudehrserver.com Subscribe to our newsletter <http://eepurl.com/b_w_tj>
_______________________________________________ openEHR-implementers mailing list openEHR-implementers@lists.openehr.org http://lists.openehr.org/mailman/listinfo/openehr-implementers_lists.openehr.org