Two things to note:
-
the valid format doesn’t mention the fractional seconds which are allowed in openEHR durations, we even have a specific constraint for that in C_DURATION.fractional_seconds_allowed in the AOM spec;
-
IMO the description of the parameter
s
should be separated from the expected result:s
being any string, and result being: ifs
has this form … then the result istrue
, the result will befalse
otherwise. (also noting the way other methods of Time_Definitions could be improved).
From Foundation Types
String is a valid ISO 8601 duration, i.e. takes the form:
P[nnY][nnM][nnW][nnD][T[nnH][nnM][nnS]]
Where each nn represents a number of years, months, etc. nnW
represents a number of 7-day weeks.
Note: allowing the W
designator in the same expression as other designators is an exception to the published standard, but necessary in clinical information (typically for representing pregnancy duration).
Parameters
s
String is a valid ISO 8601 duration, i.e. takes the form:
P[nnY][nnM][nnW][nnD][T[nnH][nnM][nnS]]
Where each nn
represents a number of years, months, etc. nnW
represents a number of 7- day weeks.
Note allowing the W
designator in the same expression as other designators is an exception to the published standard, but necessary in clinical information (typically for representing pregnancy duration).