FHIR schematron - period format

Can anyone tell me if there is a pre-set format to the period field
I tried to find it in XSD but did not find and actual format it should appear in
In the few files i saw the format is: ‘YYYY-MM-DD’

But, I need to know that this format is constant and does not vary btw different files.

Assistance would be greatly appreciated,

Period refers to dateTime, which is a union of types - either YYYY, YYYY-MM, YYYY-MM-DD, or YYYY-MM-DDTHH:MM:SS[.ssss]. This is enforced in the XML schema.

can u please point me to the place it is enforced in the xsd schema?

  <xs:simpleType name="dateTime-primitive">
        <xs:union memberTypes="xs:gYear xs:gYearMonth xs:date xs:dateTime"/>
      <xs:pattern value="([0-9]([0-9]([0-9][1-9]|[1-9]0)|[1-9]00)|[1-9]000)(-(0[1-9]|1[0-2])(-(0[0-9]|[1-2][0-9]|3[0-1])(T([01][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00)))?)?)?"/>

From fhir-single.xsd

1 Like

Thank u very much Lloyd