{
  "resourceType": "StructureDefinition",
  "id": "shr-core-Location-extension",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n  <p><b>SHR Location Extension</b></p>\n  <p>A position, site, or point in space where something can be found.</p>\n</div>"
  },
  "url": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Location-extension",
  "identifier": [
    {
      "system": "http://standardhealthrecord.org",
      "value": "shr.core.Location"
    }
  ],
  "version": "0.0.1",
  "name": "SHR Location Extension",
  "title": "SHR Location Extension",
  "status": "draft",
  "date": "2017-12-20",
  "publisher": "The MITRE Corporation: Standard Health Record Collaborative",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://standardhealthrecord.org"
        }
      ]
    }
  ],
  "description": "A position, site, or point in space where something can be found.",
  "fhirVersion": "3.0.1",
  "kind": "complex-type",
  "abstract": false,
  "contextType": "resource",
  "context": [
    "*"
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Extension:location",
        "path": "Extension",
        "short": "SHR Location Extension",
        "definition": "A position, site, or point in space where something can be found.",
        "min": 0,
        "max": "*",
        "constraint": [
          {
            "key": "choice-1",
            "severity": "error",
            "human": "shr-core-Location-extension SHALL have either extension('address') or extension('geoposition') or extension('geopoliticallocation')",
            "expression": "( extension('address').url | extension('geoposition').url | extension('geopoliticallocation').url ).distinct().count() == 1"
          }
        ]
      },
      {
        "id": "Extension:location.extension:address",
        "path": "Extension.extension",
        "sliceName": "address",
        "definition": "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": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Address-extension"
          }
        ]
      },
      {
        "id": "Extension:location.extension:geoposition",
        "path": "Extension.extension",
        "sliceName": "geoposition",
        "definition": "The location on the surface of the Earth, described by a latitude and longitude (and optional altitude).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Geoposition-extension"
          }
        ]
      },
      {
        "id": "Extension:location.extension:geopoliticallocation",
        "path": "Extension.extension",
        "sliceName": "geopoliticallocation",
        "definition": "The countries of the world and major geopolitical subregions, such as US states.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-GeopoliticalLocation-extension"
          }
        ]
      },
      {
        "id": "Extension:location.extension:relatedencounter",
        "path": "Extension.extension",
        "sliceName": "relatedencounter",
        "definition": "If content was generated during a patient encounter, related encounter is the encounter where the information was gained.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-RelatedEncounter-extension"
          }
        ]
      },
      {
        "id": "Extension:location.extension:author",
        "path": "Extension.extension",
        "sliceName": "author",
        "definition": "The person or organization who created the entry and is responsible for (and may certify) the content.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-Author-extension"
          }
        ]
      },
      {
        "id": "Extension:location.extension:informant",
        "path": "Extension.extension",
        "sliceName": "informant",
        "definition": "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": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-Informant-extension"
          }
        ]
      },
      {
        "id": "Extension:location.extension:type",
        "path": "Extension.extension",
        "sliceName": "type",
        "definition": "The most specific code (lowest level term) describing the kind or sort of thing being represented.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Type-extension"
          }
        ]
      },
      {
        "id": "Extension:location.url",
        "path": "Extension.url",
        "type": [
          {
            "code": "uri"
          }
        ],
        "fixedUri": "http://standardhealthrecord.org/fhir/StructureDefinition/shr-core-Location-extension"
      },
      {
        "id": "Extension:location.value[x]",
        "path": "Extension.value[x]",
        "min": 0,
        "max": "0"
      }
    ]
  }
}