FHIR schematron - period format

Hi,
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,
z

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:restriction>
      <xs:simpleType>
        <xs:union memberTypes="xs:gYear xs:gYearMonth xs:date xs:dateTime"/>
      </xs:simpleType>
      <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)))?)?)?"/>
    </xs:restriction>
  </xs:simpleType>

From fhir-single.xsd

1 Like

Thank u very much Lloyd