---
id: "uknhsnum"
kind: "datatype"
status: "stable"
is_pii: true
categories: ["pii", "persons", "medical"]
country: ["GB"]
langs: ["en"]
quality: 75
url: "https://registry.apicrafter.io/datatype/uknhsnum"
---

# UK NHS Number (`uknhsnum`)

NHS numbers are the unique numbers allocated to registered users of the three public health services in England, Wales and the Isle of Man; the three health systems use a shared numbering scheme.

- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Person related (persons), Medical/pharma identifiers (medical)
- Countries: United Kingdom (GB)
- Languages: English (en)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^([0-9]{3})[- ]?([0-9]{3})[- ]?([0-9]{4})$
```

## Mappings

- autotype: `nhs`
- dpv: `pd:OfficialID`
- fhir: `https://fhir.nhs.uk/Id/nhs-number`
- fta: `IDENTITY.NHS_UK`
- google_dlp: `UK_NATIONAL_HEALTH_SERVICE_NUMBER`
- presidio: `UK_NHS`
- purview: `U.K. national health service number`
- stdnum: `gb.nhs`

## Metacrafter rules

4 rules: 2 match the field name, 2 match values.

- `uknhsnumfield` (field, `gb/gb_persons.yaml`)
- `uknhsnumvalue` (data, `gb/gb_persons.yaml`)
- `gb_pii_uknhsnumfield` (field, `pii/gb/gb_pii.yaml`)
- `gb_pii_uknhsnumvalue` (data, `pii/gb/gb_pii.yaml`)

## Supported by tools

- `amazonmacie`
- `autotype`
- `awscomprehend`
- `awsglue`
- `azureailanguage`
- `cloudflaredlp`
- `collibra`
- `databricks`
- `datadogsds`
- `dataprep`
- `fta`
- `googledlp`
- `ibmguardium`
- `metacrafter`
- `microsoftpurview`
- `nightfall`
- `openmetadata`
- `presidio`
- `pythonstdnum`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/NHS_number>

## Quality

Score 75/100. Missing: examples, negative example, translation.

JSON: <https://registry.apicrafter.io/api/v1/datatypes/uknhsnum.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/GB/persons/uknhsnum.yaml>
