<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="pr-healthcare-service" />
  <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-healthcare-service" />
  <version value="1.02" />
  <name value="HealthcareService" />
  <title value="Profile: Healthcare Service" />
  <status value="active" />
  <experimental value="false" />
  <date value="2022-06-02" />
  <publisher value="b.Well Connected Health" />
  <description value="HealthcareService resource for bwell FHIR server. &#xA; &#xA; Includes indicators for ER, Urgent Care, and COVID services. &#xA; &#xA; Some elements need review." />
  <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="HealthcareService" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/HealthcareService" />
  <derivation value="constraint" />
  <differential>
    <element id="HealthcareService">
      <path value="HealthcareService" />
    </element>
    <element id="HealthcareService.id">
      <path value="HealthcareService.id" />
    </element>
    <element id="HealthcareService.meta">
      <path value="HealthcareService.meta" />
      <label value="meta" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Meta" />
      </type>
    </element>
    <element id="HealthcareService.meta.source">
      <path value="HealthcareService.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="HealthcareService.meta.security">
      <path value="HealthcareService.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-extension-any">
      <path value="HealthcareService.extension" />
      <label value="extension-any" />
      <slicing>
        <description value="slice by types" />
        <rules value="open" />
      </slicing>
      <type>
        <code value="Extension" />
      </type>
    </element>
    <element id="de-extension-any.id">
      <path value="HealthcareService.extension.id" />
      <label value="extension-any" />
      <short value="defined case-by-case, but is frequently the extension url" />
      <min value="1" />
    </element>
    <element id="de-extension-any.extension">
      <path value="HealthcareService.extension.extension" />
      <label value="extension-any" />
      <min value="0" />
      <max value="*" />
    </element>
    <element id="de-extension-any.url">
      <path value="HealthcareService.extension.url" />
      <label value="extension-any" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="de-extension-any.value[x]">
      <path value="HealthcareService.extension.value[x]" />
      <label value="extension-any" />
      <min value="0" />
      <max value="1" />
    </element>
    <element id="extension-accepted-patients">
      <path value="HealthcareService.extension" />
      <sliceName value="accepted-patients" />
      <label value="accepted-patients" />
      <short value="Includes: New vs Existing Patient indicator &amp; Patient Age Range(s)" />
      <type>
        <code value="Extension" />
      </type>
    </element>
    <element id="extension-accepted-patients.id">
      <path value="HealthcareService.extension.id" />
      <label value="accepted-patients" />
      <short value="accepted-patients" />
      <min value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="extension-accepted-patients.extension">
      <path value="HealthcareService.extension.extension" />
      <sliceName value="new-patients" />
      <label value="accepted-patients-new-patients" />
      <short value="an indicator for whether the provider accepts new and/or existing patients" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
      </type>
    </element>
    <element id="extension-accepted-patients.extension.id">
      <path value="HealthcareService.extension.extension.id" />
      <label value="accepted-patients-new-patients" />
      <short value="new-patients" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="extension-accepted-patients.extension.url">
      <path value="HealthcareService.extension.extension.url" />
      <label value="accepted-patients-new-patients" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="acceptingPatients" />
    </element>
    <element id="extension-accepted-patients.extension.valueCodeableConcept">
      <path value="HealthcareService.extension.extension.value[x]" />
      <label value="accepted-patients-new-patients" />
      <short value="coded value" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="extension-accepted-patients.extension">
      <path value="HealthcareService.extension.extension" />
      <sliceName value="age-range" />
      <label value="accepted-patients-age-range" />
      <short value="age range(s) accepted" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
      </type>
    </element>
    <element id="extension-accepted-patients.extension.id">
      <path value="HealthcareService.extension.extension.id" />
      <label value="accepted-patients-age-range" />
      <short value="age-range or category code" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="extension-accepted-patients.extension.url">
      <path value="HealthcareService.extension.extension.url" />
      <label value="accepted-patients-age-range" />
      <short value="fixed value: ageRange" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="ageRange" />
    </element>
    <element id="extension-accepted-patients.extension.valueRange">
      <path value="HealthcareService.extension.extension.value[x]" />
      <label value="accepted-patients-age-range" />
      <short value="age range in unit = years" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Range" />
      </type>
    </element>
    <element id="extension-accepted-patients.url">
      <path value="HealthcareService.extension.url" />
      <label value="accepted-patients" />
      <short value="fixed value: http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/newpatients" />
      <definition value="this spec is based upon Da-Vinci's extension for new patients" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="http://hl7.org/fhir/us/davinci-pdex-plan-net/StructureDefinition/newpatients" />
    </element>
    <element id="de-identifier">
      <path value="HealthcareService.identifier" />
      <label value="identifier" />
      <slicing>
        <description value="slice by types" />
        <rules value="open" />
      </slicing>
      <short value="a value to identify the resource by" />
      <type>
        <code value="Identifier" />
      </type>
    </element>
    <element id="identifier.id">
      <path value="HealthcareService.identifier.id" />
      <label value="identifier" />
      <short value="set case-by-case" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="identifier.use">
      <path value="HealthcareService.identifier.use" />
      <label value="identifier" />
      <short value="usual | official | temp | secondary | old (If known)" />
      <definition value="The purpose of this identifier." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
    </element>
    <element id="identifier.type">
      <path value="HealthcareService.identifier.type" />
      <label value="identifier" />
      <short value="Description of identifier" />
      <definition value="A coded type for the identifier that can be used to determine which identifier to use for a specific purpose." />
      <requirements value="Needs binding valueset" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="identifier.system">
      <path value="HealthcareService.identifier.system" />
      <label value="identifier" />
      <short value="The system which created the identifier" />
      <definition value="Values may be an oid, uri, url, or canonical" />
      <comment value="for mapped data, this is frequently a canonical url" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <example>
        <label value="a client's unknown system" />
        <valueUri value="https://www.health.org/person-identifier" />
      </example>
    </element>
    <element id="identifier.value">
      <path value="HealthcareService.identifier.value" />
      <label value="identifier" />
      <short value="The unique value" />
      <definition value="The raw identifier value that represents a resource" />
      <requirements value="This should be the raw value, as it exists in the source data (ie without prefix)" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
    </element>
    <element id="de-npi">
      <path value="HealthcareService.identifier" />
      <sliceName value="npi" />
      <label value="npi" />
      <code>
        <system value="https://www.icanbwell.com/product-feature-code" />
        <code value="provider-search" />
      </code>
      <short value="NPI of a practitioner or organization" />
      <definition value="national provider identifier as defined by nppes" />
      <type>
        <code value="Identifier" />
      </type>
      <patternIdentifier id="npi">
        <use value="official" />
        <type>
          <coding id="type-npi">
            <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
            <code value="NPI" />
          </coding>
        </type>
        <system value="http://hl7.org/fhir/sid/us-npi" />
      </patternIdentifier>
    </element>
    <element id="HealthcareService.active">
      <path value="HealthcareService.active" />
      <short value="Indicates if the resource is valid" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="HealthcareService.providedBy">
      <path value="HealthcareService.providedBy" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-healthcare-organization" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="HealthcareService.type">
      <path value="HealthcareService.type" />
      <mustSupport value="true" />
    </element>
    <element id="HealthcareService.specialty">
      <path value="HealthcareService.specialty" />
      <mustSupport value="true" />
    </element>
    <element id="HealthcareService.location">
      <path value="HealthcareService.location" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-healthcare-location" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>