> ## 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.

# OPCS-4

> OPCS Classification of Interventions and Procedures, Version 4. The standard for procedure coding in the NHS

The UK procedure classification, maintained by NHS England. Required for all NHS inpatient procedure coding alongside [NHS ICD-10](/coding/icd-10-uk). Around 10,000 alphanumeric codes structured as a letter followed by two digits with optional decimal subdivision (e.g., `H01.1`). No encounter-type suffix required.

## Quick start

System identifier: `opcs4`

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST "https://api.$environment.corti.app/v2/tools/coding/" \
    -H "Authorization: Bearer <token>" \
    -H "Tenant-Name: <tenant-name>" \
    -H "Content-Type: application/json" \
    -d '{
      "system": ["opcs4"],
      "context": [{"type": "text", "text": "Patient underwent total hip replacement under general anaesthesia."}]
    }'
  ```

  ```ts JavaScript theme={null}
  const response = await client.codes.predict({
    system: ["opcs4"],
    context: [{ type: "text", text: "Patient underwent total hip replacement under general anaesthesia." }],
  });
  ```

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

  response = requests.post(
      "https://api.$environment.corti.app/v2/tools/coding/",
      headers={
          "Authorization": "Bearer <token>",
          "Tenant-Name": "<tenant-name>",
      },
      json={
          "system": ["opcs4"],
          "context": [{"type": "text", "text": "Patient underwent total hip replacement under general anaesthesia."}],
      },
  )
  print(response.json())
  ```
</CodeGroup>

[API reference →](/api-reference/codes/predict-codes)
