<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="spark1698" />
  <meta>
    <versionId value="spark2091" />
    <lastUpdated value="2015-12-10T22:46:31.985+00:00" />
  </meta>
  <url value="http://premierinc.com/fhir/StructureDefinition/tdaf-location" />
  <name value="TheraDoc Data Access Framework (TDAF) Location Profile" />
  <display value="DAF-Location" />
  <status value="draft" />
  <publisher value="Health Level Seven International (Infrastructure and Messaging - Data Access Framework)" />
  <contact>
    <telecom>
      <system value="other" />
      <value value="http://www.healthit.gov" />
    </telecom>
  </contact>
  <date value="2015-03-17" />
  <description value="Defines basic constraints and extensions on the Location resource for use with other DAF resources" />
  <fhirVersion value="1.0.1" />
  <mapping>
    <identity value="servd" />
    <uri value="http://www.omg.org/spec/ServD/1.0/" />
    <name value="ServD" />
  </mapping>
  <kind value="resource" />
  <constrainedType value="Location" />
  <abstract value="false" />
  <base value="http://hl7.org/fhir/StructureDefinition/Location" />
  <differential>
    <element>
      <path value="Location" />
      <name value="DAF-Location" />
      <short value="Details and position information for a physical place" />
      <definition value="Details and position information for a physical place where services are provided  and resources and participants may be stored, found, contained or accommodated." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Location" />
      </type>
      <mapping>
        <identity value="servd" />
        <map value="Organization" />
      </mapping>
    </element>
    <element>
      <path value="Location.identifier" />
      <short value="Unique code or number identifying the location to its users" />
      <definition value="Unique code or number identifying the location to its users." />
      <requirements value="Organization label locations in registries, need to keep track of those." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Identifier" />
      </type>
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="servd" />
        <map value="n/a" />
      </mapping>
    </element>
    <element>
      <path value="Location.status" />
      <short value="active | suspended | inactive" />
      <definition value="active | suspended | inactive." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <mustSupport value="true" />
      <isModifier value="true" />
      <isSummary value="true" />
      <binding>
        <strength value="required" />
        <description value="Indicates whether the location is still in use." />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/location-status" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim" />
        <map value=".statusCode" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="status" />
      </mapping>
    </element>
    <element>
      <path value="Location.name" />
      <short value="Name of the location as used by humans" />
      <definition value="Name of the location as used by humans. Does not need to be unique." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="servd" />
        <map value="./PrimaryAddress and ./OtherAddresses" />
      </mapping>
    </element>
    <element>
      <path value="Location.type" />
      <short value="Type of function performed" />
      <definition value="Indicates the type of function performed at the location." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <mustSupport value="true" />
      <isSummary value="true" />
      <binding>
        <strength value="extensible" />
        <description value="Indicates the type of function performed at the location." />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v3-ServiceDeliveryLocationRoleType" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim" />
        <map value=".code" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="class" />
      </mapping>
    </element>
    <element>
      <path value="Location.telecom" />
      <short value="Contact details of the location" />
      <definition value="The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="ContactPoint" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".telecom" />
      </mapping>
    </element>
    <element>
      <path value="Location.address" />
      <short value="Physical location" />
      <definition value="Physical location." />
      <comments value="This was kept as 0..1 as there is no use property on the address, so wouldn't be able to identify different address types." />
      <requirements value="If locations can be visited, we need to keep track of their address." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Address" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="servd" />
        <map value="n/a" />
      </mapping>
    </element>
    <element>
      <path value="Location.address.line" />
      <short value="Street name, number, direction &amp; P.O. Box etc." />
      <definition value="This component contains the house number, apartment number, street name, street direction,  P.O. Box number, delivery hints, and similar address information." />
      <requirements value="home | work | temp | old - purpose of this address." />
      <min value="0" />
      <max value="2" />
      <type>
        <code value="string" />
      </type>
      <exampleString value="137 Nowhere Street" />
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="XAD.1 + XAD.2 (note: XAD.1 and XAD.2 have different meanings for a company address than for a person address)" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="AD.part[parttype = AL]" />
      </mapping>
      <mapping>
        <identity value="vcard" />
        <map value="street" />
      </mapping>
      <mapping>
        <identity value="servd" />
        <map value="./StreetAddress (newline delimitted)" />
      </mapping>
    </element>
    <element>
      <path value="Location.address.city" />
      <short value="Name of city, town etc." />
      <definition value="The name of the city, town, village or other community or delivery center." />
      <alias value="Municpality" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <exampleString value="Erewhon" />
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="XAD.3" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="AD.part[parttype = CTY]" />
      </mapping>
      <mapping>
        <identity value="vcard" />
        <map value="locality" />
      </mapping>
      <mapping>
        <identity value="servd" />
        <map value="./Jurisdiction" />
      </mapping>
    </element>
    <element>
      <path value="Location.address.state" />
      <short value="Sub-unit of country (abbreviations ok)" />
      <definition value="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)." />
      <alias value="Province" />
      <alias value="Territory" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mustSupport value="true" />
      <isSummary value="true" />
      <binding>
        <strength value="required" />
        <description value="Two letter USPS alphabetic codes." />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/usps-state" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="servd" />
        <map value="./Sites" />
      </mapping>
    </element>
    <element>
      <path value="Location.address.postalCode" />
      <short value="US Zip Codes" />
      <definition value="US Zip Codes." />
      <alias value="Zip" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <exampleString value="9132" />
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="v2" />
        <map value="XAD.5" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="AD.part[parttype = ZIP]" />
      </mapping>
      <mapping>
        <identity value="vcard" />
        <map value="code" />
      </mapping>
      <mapping>
        <identity value="servd" />
        <map value="./PostalIdentificationCode" />
      </mapping>
    </element>
    <element>
      <path value="Location.managingOrganization" />
      <short value="Organization responsible for provisioning and upkeep" />
      <definition value="The organization responsible for the provisioning and upkeep of the location." />
      <comments value="This can also be used as the part of the organization hierarchy where this location provides services. These services can be defined through the HealthcareService resource." />
      <requirements value="Need to know who manages the location." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <profile value="http://premierinc.com/fhir/StructureDefinition/tdaf-organization" />
      </type>
      <mustSupport value="true" />
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value=".scopingEntity[classCode=ORG determinerKind=INSTANCE]" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>