<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ca-on-seris-profile-Schedule" />
  <url value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-seris-profile-Schedule" />
  <version value="1.0.1" />
  <name value="Schedule" />
  <title value="Schedule" />
  <status value="draft" />
  <date value="2023-03-10" />
  <publisher value="Ontario Health" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://ontariohealth.ca/fhir/" />
    </telecom>
    <telecom>
      <system value="email" />
      <value value="some.email@ontariohealth.ca" />
    </telecom>
  </contact>
  <description value="SERIS Schedule Profile" />
  <copyright value="Used by permission of HL7 International, all rights reserved Creative Commons License" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="ical" />
    <uri value="http://ietf.org/rfc/2445" />
    <name value="iCalendar" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="SERIS-MDS-Mapping" />
    <name value="SERIS MDS Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Schedule" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Schedule" />
  <derivation value="constraint" />
  <differential>
    <element id="Schedule.meta">
      <path value="Schedule.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.meta.profile">
      <path value="Schedule.meta.profile" />
      <comment value="#### **_` FOR SERIS USAGE: The meta.profile = http://ontariohealth.ca/fhir/StructureDefinition/ca-on-seris-profile-Schedule|1.0.1 `_**&#xD;&#xA;&#xD;&#xA;It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.meta.security">
      <path value="Schedule.meta.security" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.meta.security.system">
      <path value="Schedule.meta.security.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v3-ActReason" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.meta.security.code">
      <path value="Schedule.meta.security.code" />
      <fixedCode value="HTEST" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.meta.tag">
      <path value="Schedule.meta.tag" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.meta.tag.system">
      <path value="Schedule.meta.tag.system" />
      <min value="1" />
      <fixedUri value="https://fhir.infoway-inforoute.ca/NamingSystem/ca-on-health-care-facility-id" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.meta.tag.code">
      <path value="Schedule.meta.tag.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.extension">
      <path value="Schedule.extension" />
      <min value="1" />
    </element>
    <element id="Schedule.extension:shiftType">
      <path value="Schedule.extension" />
      <sliceName value="shiftType" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-seris-ext-shift-type" />
      </type>
      <isModifier value="false" />
      <mapping>
        <identity value="SERIS-MDS-Mapping" />
        <map value="Shift Type (Main, Second, etc)" />
      </mapping>
    </element>
    <element id="Schedule.extension:shiftType.url">
      <path value="Schedule.extension.url" />
      <fixedUri value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-seris-ext-shift-type" />
    </element>
    <element id="Schedule.extension:hoursOfOperation">
      <path value="Schedule.extension" />
      <sliceName value="hoursOfOperation" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-seris-ext-hours-of-operation" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Schedule.extension:hoursOfOperation.extension:startTime">
      <path value="Schedule.extension.extension" />
      <sliceName value="startTime" />
      <mapping>
        <identity value="SERIS-MDS-Mapping" />
        <map value="Elective Schedule Start Time (Availability Hours)" />
      </mapping>
    </element>
    <element id="Schedule.extension:hoursOfOperation.extension:stopTime">
      <path value="Schedule.extension.extension" />
      <sliceName value="stopTime" />
      <mapping>
        <identity value="SERIS-MDS-Mapping" />
        <map value="Elective Schedule Stop Time (Availability Hours)" />
      </mapping>
    </element>
    <element id="Schedule.extension:hoursOfOperation.extension:daysOfWeek">
      <path value="Schedule.extension.extension" />
      <sliceName value="daysOfWeek" />
      <mapping>
        <identity value="SERIS-MDS-Mapping" />
        <map value="Days of the week (Mon-Fri)" />
      </mapping>
    </element>
    <element id="Schedule.extension:hoursOfOperationAdjustment">
      <path value="Schedule.extension" />
      <sliceName value="hoursOfOperationAdjustment" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-seris-ext-hours-of-operationAdjustment" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="Schedule.extension:hoursOfOperationAdjustment.extension:startTime">
      <path value="Schedule.extension.extension" />
      <sliceName value="startTime" />
      <mapping>
        <identity value="SERIS-MDS-Mapping" />
        <map value="Elective Schedule Start Time Adjustment (Availability Hours)" />
      </mapping>
    </element>
    <element id="Schedule.extension:hoursOfOperationAdjustment.extension:stopTime">
      <path value="Schedule.extension.extension" />
      <sliceName value="stopTime" />
      <mapping>
        <identity value="SERIS-MDS-Mapping" />
        <map value="Elective Schedule Stop Time Adjustment (Availability Hours)" />
      </mapping>
    </element>
    <element id="Schedule.identifier">
      <path value="Schedule.identifier" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.identifier.system">
      <path value="Schedule.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.identifier.value">
      <path value="Schedule.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.active">
      <path value="Schedule.active" />
      <short value="Whether this schedule is entered-in-error or not" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="SERIS-MDS-Mapping" />
        <map value="Entered In Error (Y/N)" />
      </mapping>
    </element>
    <element id="Schedule.actor">
      <path value="Schedule.actor" />
      <short value="Reference to the Location(OR Room) which will be specified by identifier for this Schedule" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/StructureDefinition/ca-on-seris-profile-Location" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Schedule.actor.identifier">
      <path value="Schedule.actor.identifier" />
      <short value="indicates the identifier of the Location(OR Room)" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.actor.identifier.system">
      <path value="Schedule.actor.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.actor.identifier.value">
      <path value="Schedule.actor.identifier.value" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.planningHorizon">
      <path value="Schedule.planningHorizon" />
      <short value="Main Schedule Start/Stop Time" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="SERIS-MDS-Mapping" />
        <map value="Planning Horizon" />
      </mapping>
    </element>
    <element id="Schedule.planningHorizon.start">
      <path value="Schedule.planningHorizon.start" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Schedule.planningHorizon.end">
      <path value="Schedule.planningHorizon.end" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>