{
  "resourceType": "StructureDefinition",
  "id": "Schedule",
  "meta": {
    "lastUpdated": "2021-01-01T21:58:31.578+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Base.Workflow"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 3
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "business"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "pa"
    },
    {
      "url": "http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status",
      "valueCode": ".active = false"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/Schedule",
  "version": "4.6.0",
  "name": "Schedule",
  "status": "draft",
  "date": "2021-01-01T21:58:31+00:00",
  "publisher": "Health Level Seven International (Patient Administration)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/pafm/index.cfm"
        }
      ]
    }
  ],
  "description": "A container for slots of time that may be available for booking appointments.",
  "fhirVersion": "4.6.0",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "ical",
      "uri": "http://ietf.org/rfc/2445",
      "name": "iCalendar"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Schedule",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "derivation": "specialization",
  "differential": {
    "element": [
      {
        "id": "Schedule",
        "path": "Schedule",
        "short": "A container for slots of time that may be available for booking appointments",
        "definition": "A container for slots of time that may be available for booking appointments.",
        "alias": [
          "Availability"
        ],
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          },
          {
            "identity": "ical",
            "map": "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)"
          },
          {
            "identity": "w5",
            "map": "workflow.scheduling"
          }
        ]
      },
      {
        "id": "Schedule.identifier",
        "path": "Schedule.identifier",
        "short": "External Ids for this item",
        "definition": "External Ids for this item.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.identifier"
          },
          {
            "identity": "ical",
            "map": "UID"
          }
        ]
      },
      {
        "id": "Schedule.active",
        "path": "Schedule.active",
        "short": "Whether this schedule is in active use",
        "definition": "Whether this schedule record is in active use or should not be used (such as was entered in error).",
        "comment": "This element is labeled as a modifier because it may be used to mark that the resource was created in error.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "boolean"
          }
        ],
        "meaningWhenMissing": "This resource is generally assumed to be active if no value is provided for the active element",
        "isModifier": true,
        "isModifierReason": "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": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.status"
          }
        ]
      },
      {
        "id": "Schedule.serviceCategory",
        "path": "Schedule.serviceCategory",
        "short": "High-level category",
        "definition": "A broad categorization of the service that is to be performed during this appointment.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "service-category"
            }
          ],
          "strength": "example",
          "valueSet": "http://hl7.org/fhir/ValueSet/service-category"
        },
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.class"
          }
        ]
      },
      {
        "id": "Schedule.serviceType",
        "path": "Schedule.serviceType",
        "short": "Specific service",
        "definition": "The specific service that is to be performed during this appointment.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "service-type"
            }
          ],
          "strength": "example",
          "valueSet": "http://hl7.org/fhir/ValueSet/service-type"
        },
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.class"
          },
          {
            "identity": "ical",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "Schedule.specialty",
        "path": "Schedule.specialty",
        "short": "Type of specialty needed",
        "definition": "The specialty of a practitioner that would be required to perform the service requested in this appointment.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "specialty"
            }
          ],
          "strength": "preferred",
          "description": "Additional details about where the content was created (e.g. clinical specialty).",
          "valueSet": "http://hl7.org/fhir/ValueSet/c80-practice-codes"
        },
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.class"
          }
        ]
      },
      {
        "id": "Schedule.actor",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/committee-notes",
            "valueString": "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)."
          }
        ],
        "path": "Schedule.actor",
        "short": "Resource(s) that availability information is being provided for",
        "definition": "Slots that reference this schedule resource provide the availability details to these referenced resource(s).",
        "comment": "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": 1,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/CareTeam",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://hl7.org/fhir/StructureDefinition/HealthcareService",
              "http://hl7.org/fhir/StructureDefinition/Location"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.subject[x]"
          },
          {
            "identity": "ical",
            "map": "ATTENDEE:MAILTO:john_public@host2.com This can be populated with a value from the referenced resource"
          },
          {
            "identity": "w5",
            "map": "FiveWs.subject"
          }
        ]
      },
      {
        "id": "Schedule.planningHorizon",
        "path": "Schedule.planningHorizon",
        "short": "Period of time covered by schedule",
        "definition": "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 \"template\" for planning outside these dates.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "w5",
            "map": "FiveWs.planned"
          },
          {
            "identity": "ical",
            "map": "DTSTART:20131201T003000Z DTEND:2014030101T003000Z"
          }
        ]
      },
      {
        "id": "Schedule.comment",
        "path": "Schedule.comment",
        "short": "Comments on availability",
        "definition": "Comments on the availability to describe any extended information. Such as custom constraints on the slots that may be associated.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "mapping": [
          {
            "identity": "ical",
            "map": "COMMENT:(comment) If there is no comment, then the line can be excluded from the iCalendar entry"
          }
        ]
      }
    ]
  }
}