<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="bwell-ex-provider-search" />
  <url value="https://www.hl7.org/fhir/us/bwell/bwell-ex-provider-search" />
  <version value="1.0" />
  <name value="ExtensionProviderSearch" />
  <title value="Extension: Provider Search" />
  <status value="active" />
  <experimental value="false" />
  <date value="2024-03-01" />
  <description value="characteristics and/or behaviors of the record for provider searching and the corresponding system for which it applies. &#xA; &#xA; Contains flags for **searchable** and **bookable**" />
  <purpose value="The extension is designed to describe the specific behaviors/visibility requirements of the resource, bucketed per Provider Search service." />
  <fhirVersion value="4.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <context>
    <type value="extension" />
    <expression value="HealthcareService" />
  </context>
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension">
      <path value="Extension" />
      <short value="extension container for provider search characteristics per system" />
    </element>
    <element id="Extension.id">
      <path value="Extension.id" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Extension.extension">
      <path value="Extension.extension" />
      <short value="extension(s) for a coded characteristic" />
      <definition value="a list of characteristics to describe the behavior and/or visibility of the record. Examples: online bookable; provider searchable" />
      <min value="2" />
      <max value="*" />
    </element>
    <element id="Extension.extension:searchable">
      <path value="Extension.extension" />
      <sliceName value="searchable" />
      <short value="coded concept for whether the provider should be searchable in pss" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="Extension.extension:searchable.id">
      <path value="Extension.extension.id" />
      <min value="1" />
    </element>
    <element id="Extension.extension:searchable.extension">
      <path value="Extension.extension.extension" />
      <max value="0" />
    </element>
    <element id="Extension.extension:searchable.url">
      <path value="Extension.extension.url" />
      <short value="fixed value: searchCharacteristic" />
      <min value="1" />
      <fixedUri value="searchCharacteristic" />
    </element>
    <element id="Extension.extension:searchable.value[x]">
      <path value="Extension.extension.value[x]" />
      <sliceName value="valueCodeableConcept" />
      <short value="searchable | hide-from-search" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="https://www.hl7.org/fhir/us/bwell/bwell-vs-provider-search-characteristic" />
      </binding>
    </element>
    <element id="Extension.extension:bookable">
      <path value="Extension.extension" />
      <sliceName value="bookable" />
      <short value="coded concept for whether the provider should be online bookable in pss" />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="Extension.extension:bookable.id">
      <path value="Extension.extension.id" />
      <min value="1" />
    </element>
    <element id="Extension.extension:bookable.extension">
      <path value="Extension.extension.extension" />
      <max value="0" />
    </element>
    <element id="Extension.extension:bookable.url">
      <path value="Extension.extension.url" />
      <short value="fixed value: searchCharacteristic" />
      <min value="1" />
      <fixedUri value="searchCharacteristic" />
    </element>
    <element id="Extension.extension:bookable.value[x]">
      <path value="Extension.extension.value[x]" />
      <sliceName value="valueCodeableConcept" />
      <short value="bookable | not-bookable" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="required" />
        <valueSet value="https://www.hl7.org/fhir/us/bwell/bwell-vs-provider-search-characteristic" />
      </binding>
    </element>
    <element id="Extension.extension:search-system">
      <path value="Extension.extension" />
      <sliceName value="search-system" />
      <short value="the provider search system" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Extension.extension:search-system.id">
      <path value="Extension.extension.id" />
      <min value="1" />
    </element>
    <element id="Extension.extension:search-system.extension">
      <path value="Extension.extension.extension" />
      <max value="0" />
    </element>
    <element id="Extension.extension:search-system.url">
      <path value="Extension.extension.url" />
      <short value="fixed value: forSystem" />
      <definition value="Although the context of this already implies it's for the Helix Provider Search Service, this field was included in the definition to specify which front end version of PSS. This would accommodate clients in the event they have more than one portal with us." />
      <min value="1" />
      <max value="1" />
      <fixedUri value="forSystem" />
    </element>
    <element id="Extension.extension:search-system.value[x]">
      <path value="Extension.extension.value[x]" />
      <short value="uri / url of the search system" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
    </element>
    <element id="Extension.url">
      <path value="Extension.url" />
      <short value="fixed value: https://raw.githubusercontent.com/imranq2/SparkAutoMapper.FHIR/main/StructureDefinition/provider_search" />
      <min value="1" />
      <fixedUri value="https://raw.githubusercontent.com/imranq2/SparkAutoMapper.FHIR/main/StructureDefinition/provider_search" />
      <mustSupport value="true" />
    </element>
    <element id="Extension.value[x]">
      <path value="Extension.value[x]" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>