<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="pr-slot" />
  <meta>
    <source value="https://www.icanbwell.com/fhir_profile_definitions" />
    <security>
      <system value="https://www.icanbwell.com/owner" />
      <code value="bwell" />
    </security>
    <security>
      <system value="https://www.icanbwell.com/access" />
      <code value="bwell" />
    </security>
  </meta>
  <url value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-slot" />
  <version value="1.02" />
  <name value="Slot" />
  <title value="Profile: Slot" />
  <status value="active" />
  <experimental value="false" />
  <date value="2022-06-02" />
  <publisher value="b.Well Connected Health" />
  <description value="Appointment slot resource" />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="US" />
      <display value="United States of America" />
    </coding>
    <text value="United States of America" />
  </jurisdiction>
  <fhirVersion value="4.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Slot" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Slot" />
  <derivation value="constraint" />
  <differential>
    <element id="Slot">
      <path value="Slot" />
    </element>
    <element id="Slot.id">
      <path value="Slot.id" />
    </element>
    <element id="Slot.meta">
      <path value="Slot.meta" />
      <label value="meta" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Meta" />
      </type>
    </element>
    <element id="Slot.meta.source">
      <path value="Slot.meta.source" />
      <sliceName value="meta-source" />
      <label value="meta" />
      <short value="uri of the data source" />
      <definition value="Typically the data owner's URL followed by a source/file description" />
      <requirements value="mandatory for all resources in bWell's FHIR Server" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <example>
        <label value="example of meta.source" />
        <valueUri value="https://www.icanbwell.com/provider-directory" />
      </example>
    </element>
    <element id="Slot.meta.security">
      <path value="Slot.meta.security" />
      <sliceName value="meta-security" />
      <label value="meta" />
      <short value="security tags representing the data's owner, vendor, and accessibility" />
      <definition value="data owner: &#xA; &#xA; data vendor: &#xA; &#xA; data access:" />
      <requirements value="/owner &amp; /access are mandatory for all resources in bWell's FHIR Server" />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Coding" />
      </type>
      <example>
        <label value="example of data owner security tag" />
        <valueCoding>
          <system value="https://www.icanbwell.com/owner" />
          <code value="bwell" />
        </valueCoding>
      </example>
      <example>
        <label value="example of data access security tag" />
        <valueCoding>
          <system value="https://www.icanbwell.com/access" />
          <code value="bwell" />
        </valueCoding>
      </example>
      <example>
        <label value="example of data vendor security tag" />
        <valueCoding>
          <system value="https://www.icanbwell.com/vendor" />
          <code value="bwell" />
        </valueCoding>
      </example>
    </element>
    <element id="de-service-type">
      <path value="Slot.serviceType" />
      <label value="service-type" />
      <slicing>
        <description value="slice by type" />
        <rules value="open" />
      </slicing>
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="de-service-type.id">
      <path value="Slot.serviceType.id" />
      <label value="service-type" />
      <short value="set to service type code" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="de-service-type.coding">
      <path value="Slot.serviceType.coding" />
      <label value="service-type" />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Coding" />
      </type>
      <example>
        <label value="medical services" />
        <valueCoding id="medical-services">
          <system value="http://terminology.hl7.org/CodeSystem/service-type" />
          <code value="382" />
        </valueCoding>
      </example>
    </element>
    <element id="de-medical-services">
      <path value="Slot.serviceType" />
      <sliceName value="medical-services" />
      <label value="medical-services" />
      <code>
        <system value="https://www.icanbwell.com/product-feature-code" />
        <code value="provider-search" />
      </code>
      <short value="medical services type code" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <patternCodeableConcept>
        <coding id="medical">
          <system value="http://terminology.hl7.org/CodeSystem/service-type" />
          <code value="382" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="de-appointment-type">
      <path value="Slot.serviceType" />
      <sliceName value="appointment-type" />
      <label value="appointment-type" />
      <code>
        <system value="https://www.icanbwell.com/product-feature-code" />
        <code value="integrated-scheduling" />
      </code>
      <short value="appointment types" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <example>
        <label value="healthcare appointment slot for an existing patient" />
        <valueCodeableConcept id="appt-existing">
          <coding id="existing">
            <system value="https://www.healthsystem.org" />
            <code value="existing" />
          </coding>
        </valueCodeableConcept>
      </example>
    </element>
    <element id="Slot.schedule">
      <path value="Slot.schedule" />
      <short value="corresponding Schedule resource" />
      <definition value="The schedule resource that this slot defines" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-schedule" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Slot.status">
      <path value="Slot.status" />
      <short value="status for the appointment slot" />
      <definition value="default to free" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Slot.start">
      <path value="Slot.start" />
      <short value="appointment slot start time" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="instant" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Slot.end">
      <path value="Slot.end" />
      <short value="appointment slot end time" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="instant" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>