Skip to content

Processing of dates

XDS

HL7’s DTM shall be encoded in the format YYYY[MM[DD[HH[MM[SS[.S[S[S[S]]]]]]]]][+/-ZZZZ]. It allows various precision levels and the choice of time zone.

DocumentEntries fields creationTime, serviceStartTime and serviceStopTime shall be specified in UTC (DTM’s time zone part is forbidden).

ITI-18 query parameters can be expressed in any time zone.

Parameters $XDSDocumentEntry(Creation|ServiceStart|ServiceStop)TimeFrom are inclusive, parameters $XDSDocumentEntry(Creation|ServiceStart|ServiceStop)TimeTo are exclusive.

When encountering an incomplete (i.e. a date that is not precise to the second) date, the date is set to the earliest instant covered by the partial date.

The PMP recommends to: 1. always give dates in UTC; 2. always give dates if possible at least at the second precision.

FHIR

In FHIR, periods are given with inclusive boundaries.

The dateTime format is different: YYYY, YYYY-MM, YYYY-MM-DD, YYYY-MM-DDThh:mm:ss+zz:zz or YYYY-MM-DDThh:mm:ss.sssZ. When using the time precision, the timezone is mandatory.


This page was updated 2022-11-17