<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="4bef8e64-d1d4-4496-b49f-e7e7df46b02b" />
  <url value="https://cloudconnect.cognisantmd.com/fhir/StructureDefinition/Schedule" />
  <name value="Schedule" />
  <status value="draft" />
  <description value="Schedules are used for OAB and schedule synchronization for the Ocean daysheet and kiosks. Note: these constraints extend the Canadian Baseline profile as a baseDefinition but avoid using it directly, due to a broken link in the Canadian registry." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <type value="Schedule" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Schedule" />
  <derivation value="constraint" />
  <differential>
    <element id="Schedule.id">
      <path value="Schedule.id" />
      <definition value="This ID should match the schedule's database ID since it is used by subsequent lookups and references by Ocean. Do not use a human-readable schedule code or description here." />
    </element>
    <element id="Schedule.active">
      <path value="Schedule.active" />
      <short value="active flag" />
      <type>
        <code value="boolean" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Schedule.serviceCategory">
      <path value="Schedule.serviceCategory" />
      <definition value="The category of service provided by the schedule. This code is typically 17, 'General Practice'. Check the example Schedule JSON for formatting. The complete list of codes is defined here: https://build.fhir.org/ig/HL7/UTG/ValueSet-service-category.html" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.serviceType">
      <path value="Schedule.serviceType" />
      <definition value="The type of service provided by the schedule. This code is typically 124, 'General Practice', which gives this schedule default preference over other schedule service types. This is used to determine the default schedule to select for a patient during the online booking. Check the example Schedule JSON for formatting. The complete list of codes is defined here: https://terminology.hl7.org/3.1.0/CodeSystem-service-type.html" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.actor">
      <path value="Schedule.actor" />
      <slicing>
        <rules value="open" />
      </slicing>
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/PractitionerRole" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Schedule.actor.display">
      <path value="Schedule.actor.display" />
      <definition value="The actor display is used to display the title of the schedule in Ocean's configuration UI." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.actor.practitioner">
      <path value="Schedule.actor.practitioner" />
      <short value="The practitioner the schedule pertains to" />
      <definition value="The provider (practitioner) for the schedule at the clinic." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/Practitioner" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>