<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="Schedule" />
  <meta>
    <lastUpdated value="2021-01-02T08:58:31.578+11:00" />
  </meta>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-category">
    <valueString value="Base.Workflow" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="3" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category">
    <valueCode value="business" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="pa" />
  </extension>
  <extension url="http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status">
    <valueCode value=".active = false" />
  </extension>
  <url value="http://hl7.org/fhir/StructureDefinition/Schedule" />
  <version value="4.6.0" />
  <name value="Schedule" />
  <status value="draft" />
  <date value="2021-01-02T08:58:31+11:00" />
  <publisher value="Health Level Seven International (Patient Administration)" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org/fhir" />
    </telecom>
  </contact>
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://www.hl7.org/Special/committees/pafm/index.cfm" />
    </telecom>
  </contact>
  <description value="A container for slots of time that may be available for booking appointments." />
  <fhirVersion value="4.6.0" />
  <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>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Schedule" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DomainResource" />
  <derivation value="specialization" />
  <differential>
    <element id="Schedule">
      <path value="Schedule" />
      <short value="A container for slots of time that may be available for booking appointments" />
      <definition value="A container for slots of time that may be available for booking appointments." />
      <alias value="Availability" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="rim" />
        <map value="n/a" />
      </mapping>
      <mapping>
        <identity value="ical" />
        <map value="BEGIN:VFREEBUSY  ???  END:VFREEBUSY (If your fhir server provides this information via calDAV, then you may want to include addressing information in a URL section, and with the search, a DTSTART and DTEND component can be included to indicate the range of time that has been covered in the collection of slots, where these overlap the resources period values. For all slots that reference this resource, include a FREEBUSY row for each slot)" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="workflow.scheduling" />
      </mapping>
    </element>
    <element id="Schedule.identifier">
      <path value="Schedule.identifier" />
      <short value="External Ids for this item" />
      <definition value="External Ids for this item." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Identifier" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.identifier" />
      </mapping>
      <mapping>
        <identity value="ical" />
        <map value="UID" />
      </mapping>
    </element>
    <element id="Schedule.active">
      <path value="Schedule.active" />
      <short value="Whether this schedule is in active use" />
      <definition value="Whether this schedule record is in active use or should not be used (such as was entered in error)." />
      <comment value="This element is labeled as a modifier because it may be used to mark that the resource was created in error." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="boolean" />
      </type>
      <meaningWhenMissing value="This resource is generally assumed to be active if no value is provided for the active element" />
      <isModifier value="true" />
      <isModifierReason value="This element is labelled as a modifier because it is a status element that can indicate that a record should not be treated as valid" />
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.status" />
      </mapping>
    </element>
    <element id="Schedule.serviceCategory">
      <path value="Schedule.serviceCategory" />
      <short value="High-level category" />
      <definition value="A broad categorization of the service that is to be performed during this appointment." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="service-category" />
        </extension>
        <strength value="example" />
        <valueSet value="http://hl7.org/fhir/ValueSet/service-category" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
    </element>
    <element id="Schedule.serviceType">
      <path value="Schedule.serviceType" />
      <short value="Specific service" />
      <definition value="The specific service that is to be performed during this appointment." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="service-type" />
        </extension>
        <strength value="example" />
        <valueSet value="http://hl7.org/fhir/ValueSet/service-type" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
      <mapping>
        <identity value="ical" />
        <map value="n/a" />
      </mapping>
    </element>
    <element id="Schedule.specialty">
      <path value="Schedule.specialty" />
      <short value="Type of specialty needed" />
      <definition value="The specialty of a practitioner that would be required to perform the service requested in this appointment." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="specialty" />
        </extension>
        <strength value="preferred" />
        <description value="Additional details about where the content was created (e.g. clinical specialty)." />
        <valueSet value="http://hl7.org/fhir/ValueSet/c80-practice-codes" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
    </element>
    <element id="Schedule.actor">
      <extension url="http://hl7.org/fhir/build/StructureDefinition/committee-notes">
        <valueString value="Many discussions were had at 2 WGMs over the name of this field, and considered individual, subject and several others, but landed on this property name as it doesn't have other meanings and is applicable for people, services, locations and devices, also this has been updated to support multiple actors for a single schedule where they are not managed seperately (e.g. context where a practitioner and location are not available alone)." />
      </extension>
      <path value="Schedule.actor" />
      <short value="Resource(s) that availability information is being provided for" />
      <definition value="Slots that reference this schedule resource provide the availability details to these referenced resource(s)." />
      <comment value="The capacity to support multiple referenced resource types should be used in cases where the specific resources themselves cannot be scheduled without the other, and thus only make sense to the system exposing them as a group. Common examples of this are where the combination of a practitioner and a room (Location) are always required by a system." />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/HealthcareService" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.subject[x]" />
      </mapping>
      <mapping>
        <identity value="ical" />
        <map value="ATTENDEE:MAILTO:john_public@host2.com This can be populated with a value from the referenced resource" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.subject" />
      </mapping>
    </element>
    <element id="Schedule.planningHorizon">
      <path value="Schedule.planningHorizon" />
      <short value="Period of time covered by schedule" />
      <definition value="The period of time that the slots that reference this Schedule resource cover (even if none exist). These  cover the amount of time that an organization's planning horizon; the interval for which they are currently accepting appointments. This does not define a &quot;template&quot; for planning outside these dates." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Period" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.planned" />
      </mapping>
      <mapping>
        <identity value="ical" />
        <map value="DTSTART:20131201T003000Z DTEND:2014030101T003000Z" />
      </mapping>
    </element>
    <element id="Schedule.comment">
      <path value="Schedule.comment" />
      <short value="Comments on availability" />
      <definition value="Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="ical" />
        <map value="COMMENT:(comment) If there is no comment, then the line can be excluded from the iCalendar entry" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>