> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corti.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# NHS ICD-10

> United Kingdom modification of ICD-10. The standard for diagnosis coding in the NHS

The UK modification of ICD-10, maintained by [NHS England](https://digital.nhs.uk/). Around 16,000 alphanumeric codes (4–6 characters; codes shorter than four characters are padded with `X`) covering diagnoses across NHS inpatient and outpatient settings.

## Quick start

System identifiers: `icd10uk-inpatient` · `icd10uk-outpatient`

```ts title="JavaScript" theme={null}
const response = await client.codes.predict({
  system: ["icd10uk-inpatient"],
  context: [{ type: "text", text: "Patient admitted with COPD exacerbation and type 2 diabetes mellitus." }],
});
```

```python title="Python" theme={null}
import requests

# Replace these with your values
ENVIRONMENT = "<eu-or-us>"
TENANT = "<your-tenant-name>"
TOKEN = "<your-access-token>"

response = requests.post(
    f"https://api.{ENVIRONMENT}.corti.app/v2/tools/coding/",
    headers={
        "Authorization": f"Bearer {TOKEN}",
        "Tenant-Name": TENANT,
        "Content-Type": "application/json",
    },
    json={
        "system": ["icd10uk-inpatient"],
        "context": [{"type": "text", "text": "Patient admitted with COPD exacerbation and type 2 diabetes mellitus."}],
    },
)
response.raise_for_status()
print(response.json())
```

```bash title="cURL" theme={null}
# Replace these with your values
ENVIRONMENT="<eu-or-us>"
TENANT="<your-tenant-name>"
TOKEN="<your-access-token>"

curl -X POST "https://api.${ENVIRONMENT}.corti.app/v2/tools/coding/" \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Tenant-Name: ${TENANT}" \
  -H "Content-Type: application/json" \
  -d '{
    "system": ["icd10uk-inpatient"],
    "context": [{"type": "text", "text": "Patient admitted with COPD exacerbation and type 2 diabetes mellitus."}]
  }'
```

[API reference →](https://docs.corti.ai/api-reference/codes/predict-codes.md)

## Encounter type

> [!WARNING]
>
> **Encounter type is required.** ICD-10 coding guidelines differ significantly between inpatient and outpatient settings. For instance, in the outpatient setting, one should only code established diagnoses. In the inpatient setting, one should also include all diagnoses that are uncertain, even those that are ruled out. Use `icd10uk-inpatient` for inpatient cases and `icd10uk-outpatient` for outpatient cases. The correct guideline set is applied automatically based on the suffix.

## Inpatient procedures

> [!TIP]
>
> For UK inpatient episodes, NHS ICD-10 is paired with [OPCS-4](https://docs.corti.ai/coding/opcs-4.md) for procedure coding. Use `icd10uk-inpatient` for diagnoses and `opcs4` for procedures in the same request.

## Known issues

In England, there are certain secondary codes that one should always code, even if they do not directly impact patient care during the encounter. We have not implemented this list yet.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.