{
  "resourceType": "StructureDefinition",
  "id": "Extension-UKCore-AddressKey",
  "url": "https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-AddressKey",
  "version": "1.0.0",
  "name": "ExtensionUKCoreAddressKey",
  "title": "Extension UK Core Address Key",
  "status": "draft",
  "date": "2020-07-10",
  "publisher": "HL7 UK",
  "contact": [
    {
      "name": "HL7 UK",
      "telecom": [
        {
          "system": "email",
          "value": "secretariat@hl7.org.uk",
          "use": "work",
          "rank": 1
        }
      ]
    },
    {
      "name": "NHS Digital",
      "telecom": [
        {
          "system": "email",
          "value": "interoperabilityteam@nhs.net",
          "use": "work",
          "rank": 2
        }
      ]
    }
  ],
  "description": "To allow an address key to be included in an address.",
  "purpose": "This extension extends the Address datatype to support the exchange of the type of address which is currently not supported by the FHIR standard.",
  "copyright": "Copyright © 2020 HL7 UK Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® standard is used under the FHIR license. You may obtain a copy of the FHIR license at  https://www.hl7.org/fhir/license.html.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    }
  ],
  "kind": "complex-type",
  "abstract": false,
  "context": [
    {
      "type": "element",
      "expression": "Address"
    }
  ],
  "type": "Extension",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Extension",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Extension",
        "path": "Extension",
        "short": "Address Key",
        "definition": "To record an Address Key and type."
      },
      {
        "id": "Extension.extension",
        "path": "Extension.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Extension.extension:type",
        "path": "Extension.extension",
        "sliceName": "type",
        "short": "Address Key Type",
        "definition": "To identify the type of Address Key recorded.",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Extension.extension:type.url",
        "path": "Extension.extension.url",
        "fixedUri": "type"
      },
      {
        "id": "Extension.extension:type.value[x]",
        "path": "Extension.extension.value[x]",
        "short": "Address Key Type",
        "definition": "To identify the type of Address Key recorded.",
        "min": 1,
        "type": [
          {
            "code": "Coding"
          }
        ],
        "binding": {
          "strength": "extensible",
          "description": "To identify the type of Address Key recorded",
          "valueSet": "https://fhir.nhs.uk/R4/ValueSet/UKCore-AddressKeyType"
        }
      },
      {
        "id": "Extension.extension:value",
        "path": "Extension.extension",
        "sliceName": "value",
        "short": "Address",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Extension.extension:value.url",
        "path": "Extension.extension.url",
        "fixedUri": "value"
      },
      {
        "id": "Extension.extension:value.value[x]",
        "path": "Extension.extension.value[x]",
        "min": 1,
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Extension.url",
        "path": "Extension.url",
        "fixedUri": "https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-AddressKey"
      },
      {
        "id": "Extension.value[x]",
        "path": "Extension.value[x]",
        "max": "0"
      }
    ]
  }
}