{
  "resourceType": "StructureDefinition",
  "id": "f5c5f511-5b94-4904-b1ff-9b6f16f9d2e3",
  "meta": {
    "lastUpdated": "2020-05-14T12:51:15.367+00:00"
  },
  "url": "http://electronichealth.se/fhir/r4/se-address.StructureDefinition.xml",
  "name": "AddressCoreSe",
  "status": "draft",
  "date": "2020-05-14T12:51:15.1102081+00:00",
  "fhirVersion": "4.0.1",
  "kind": "complex-type",
  "abstract": true,
  "type": "Address",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Address",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Address.extension",
        "path": "Address.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Address.extension:seAddressType",
        "path": "Address.extension",
        "sliceName": "seAddressType",
        "short": "Code for Swedish address type",
        "definition": "This is a Swedish national code that should be used to determine the national official address types \"Folkbokföringsadress\", \"Särskild adress\", \"Utlandsadress\" and \"Angiven adress\".",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://example.org/fhir/StructureDefinition/SeCoreAddressType"
            ]
          }
        ]
      },
      {
        "id": "Address.extension:seAddressType.value[x].system",
        "path": "Address.extension.value[x].system",
        "binding": {
          "strength": "extensible",
          "valueSet": "http://electronichealth.se/valuesets/seCoreAddressTypes"
        }
      },
      {
        "id": "Address.line.extension",
        "path": "Address.line.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Address.line.extension:addressLine-qualifier",
        "path": "Address.line.extension",
        "sliceName": "addressLine-qualifier",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.cambio.se/StructureDefinition/addressLine-qualifier"
            ]
          }
        ]
      },
      {
        "id": "Address.state",
        "path": "Address.state",
        "comment": "State is normally not a part of a Swedish address and is likely not supported by many systems."
      },
      {
        "id": "Address.postalCode",
        "path": "Address.postalCode",
        "comment": "A Swedish postal code consists of five digits, divided into two parts of first three digits, and then two digits. A blank space shall be inserted between the third and fourth digit."
      },
      {
        "id": "Address.country",
        "path": "Address.country",
        "short": "Country (using ISO 3166 2 letter code)",
        "comment": "ISO 3166 2 letter codes SHOULD be used in place of a full country name.",
        "example": [
          {
            "label": "Country",
            "valueString": "SE"
          }
        ],
        "binding": {
          "strength": "required",
          "valueSet": "http://hl7.org/fhir/ValueSet/iso3166-1-2"
        }
      }
    ]
  }
}