{
  "resourceType": "StructureDefinition",
  "url": "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Patient",
  "name": "DataStandardsWalesPatientProfile",
  "status": "draft",
  "date": "2023-03-28T11:46:07.9909458+00:00",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "PAT.1",
      "name": "PMS Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Patient",
  "baseDefinition": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Patient.extension",
        "path": "Patient.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Patient.extension:ethnicCategory",
        "path": "Patient.extension",
        "sliceName": "ethnicCategory",
        "min": 0
      },
      {
        "id": "Patient.extension:ethnicCategory.value[x].coding.system",
        "path": "Patient.extension.value[x].coding.system",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "https://fhir.hl7.org.uk/CodeSystem/UKCore-EthnicCategoryEngland"
          }
        ]
      },
      {
        "id": "Patient.extension:ethnicCategory.value[x].coding.code",
        "path": "Patient.extension.value[x].coding.code",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "PEOPLE->ETHNIC_ORIGIN"
          }
        ]
      },
      {
        "id": "Patient.identifier",
        "path": "Patient.identifier",
        "mustSupport": true
      },
      {
        "id": "Patient.identifier:nhsNumber",
        "path": "Patient.identifier",
        "sliceName": "nhsNumber"
      },
      {
        "id": "Patient.identifier:nhsNumber.system",
        "path": "Patient.identifier.system",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "https://fhir.nhs.uk/Id/nhs-number"
          },
          {
            "identity": "PAT.1",
            "map": "https://wales.nhs.uk/Id/pms"
          }
        ]
      },
      {
        "id": "Patient.identifier:nhsNumber.value",
        "path": "Patient.identifier.value",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "PEOPLE->NHS_NO"
          },
          {
            "identity": "PAT.1",
            "map": "PATIENT_IDENTIFIERS->ID"
          }
        ]
      },
      {
        "id": "Patient.active",
        "path": "Patient.active",
        "mustSupport": true
      },
      {
        "id": "Patient.name",
        "path": "Patient.name",
        "mustSupport": true
      },
      {
        "id": "Patient.name.family",
        "path": "Patient.name.family",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "PEOPLE->SURNAME"
          }
        ]
      },
      {
        "id": "Patient.name.given",
        "path": "Patient.name.given",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "PEOPLE->FIRST_FORENAME"
          }
        ]
      },
      {
        "id": "Patient.telecom.system",
        "path": "Patient.telecom.system",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "home"
          }
        ]
      },
      {
        "id": "Patient.telecom.value",
        "path": "Patient.telecom.value",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "PEOPLE->HOME_PHONE_NO"
          }
        ]
      },
      {
        "id": "Patient.gender",
        "path": "Patient.gender",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "PEOPLE->SEX"
          }
        ]
      },
      {
        "id": "Patient.birthDate",
        "path": "Patient.birthDate",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "PEOPLE->DOB"
          }
        ]
      },
      {
        "id": "Patient.address",
        "path": "Patient.address",
        "mustSupport": true
      },
      {
        "id": "Patient.address.line",
        "path": "Patient.address.line",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "LOCATIONS->ADDRESS1"
          },
          {
            "identity": "PAT.1",
            "map": "LOCATIONS->ADDRESS2"
          }
        ]
      },
      {
        "id": "Patient.address.city",
        "path": "Patient.address.city",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "LOCATIONS->ADDRESS3"
          }
        ]
      },
      {
        "id": "Patient.address.postalCode",
        "path": "Patient.address.postalCode",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "LOCATIONS->POSTCODE"
          }
        ]
      },
      {
        "id": "Patient.maritalStatus",
        "path": "Patient.maritalStatus",
        "mustSupport": true
      },
      {
        "id": "Patient.maritalStatus.coding.system",
        "path": "Patient.maritalStatus.coding.system",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "https://fhir.hl7.org.uk/CodeSystem/UKCore-PersonMaritalStatusWales"
          }
        ]
      },
      {
        "id": "Patient.maritalStatus.coding.code",
        "path": "Patient.maritalStatus.coding.code",
        "mapping": [
          {
            "identity": "PAT.1",
            "map": "PEOPLE->MARITAL_STATUS"
          }
        ]
      }
    ]
  }
}