<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="shr-core-Location-extension" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>
        <b>SHR Location Extension</b>
      </p>
      <p>A position, site, or point in space where something can be found.</p>
    </div>
  </text>
  <url value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Location-extension" />
  <identifier>
    <system value="http://standardhealthrecord.org" />
    <value value="shr.core.Location" />
  </identifier>
  <version value="0.0.1" />
  <name value="SHR Location Extension" />
  <title value="SHR Location Extension" />
  <status value="draft" />
  <date value="2017-12-20" />
  <publisher value="The MITRE Corporation: Standard Health Record Collaborative" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://standardhealthrecord.org" />
    </telecom>
  </contact>
  <description value="A position, site, or point in space where something can be found." />
  <fhirVersion value="3.0.1" />
  <kind value="complex-type" />
  <abstract value="false" />
  <contextType value="resource" />
  <context value="*" />
  <type value="Extension" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Extension" />
  <derivation value="constraint" />
  <differential>
    <element id="Extension:location">
      <path value="Extension" />
      <short value="SHR Location Extension" />
      <definition value="A position, site, or point in space where something can be found." />
      <min value="0" />
      <max value="*" />
      <constraint>
        <key value="choice-1" />
        <severity value="error" />
        <human value="shr-core-Location-extension SHALL have either extension('address') or extension('geoposition') or extension('geopoliticallocation')" />
        <expression value="( extension('address').url | extension('geoposition').url | extension('geopoliticallocation').url ).distinct().count() == 1" />
      </constraint>
    </element>
    <element id="Extension:location.extension:address">
      <path value="Extension.extension" />
      <sliceName value="address" />
      <definition value="An address expressed using postal conventions (as opposed to GPS or other location definition formats). This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery. There are a variety of postal address formats defined around the world. (Source: HL7 FHIR)." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Address-extension" />
      </type>
    </element>
    <element id="Extension:location.extension:geoposition">
      <path value="Extension.extension" />
      <sliceName value="geoposition" />
      <definition value="The location on the surface of the Earth, described by a latitude and longitude (and optional altitude)." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Geoposition-extension" />
      </type>
    </element>
    <element id="Extension:location.extension:geopoliticallocation">
      <path value="Extension.extension" />
      <sliceName value="geopoliticallocation" />
      <definition value="The countries of the world and major geopolitical subregions, such as US states." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-GeopoliticalLocation-extension" />
      </type>
    </element>
    <element id="Extension:location.extension:relatedencounter">
      <path value="Extension.extension" />
      <sliceName value="relatedencounter" />
      <definition value="If content was generated during a patient encounter, related encounter is the encounter where the information was gained." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-RelatedEncounter-extension" />
      </type>
    </element>
    <element id="Extension:location.extension:author">
      <path value="Extension.extension" />
      <sliceName value="author" />
      <definition value="The person or organization who created the entry and is responsible for (and may certify) the content." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-Author-extension" />
      </type>
    </element>
    <element id="Extension:location.extension:informant">
      <path value="Extension.extension" />
      <sliceName value="informant" />
      <definition value="The person or entity that provided the information in the entry, as distinct from who created the entry, e.g. the subject (patient), medical professional, family member, device or software program." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-Informant-extension" />
      </type>
    </element>
    <element id="Extension:location.extension:type">
      <path value="Extension.extension" />
      <sliceName value="type" />
      <definition value="The most specific code (lowest level term) describing the kind or sort of thing being represented." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Type-extension" />
      </type>
    </element>
    <element id="Extension:location.url">
      <path value="Extension.url" />
      <type>
        <code value="uri" />
      </type>
      <fixedUri value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Location-extension" />
    </element>
    <element id="Extension:location.value[x]">
      <path value="Extension.value[x]" />
      <min value="0" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>