# Patients

> The people your organisation cares for. Most other resources (appointments, consultations, episodes, questionnaires) belong to a patient.

Source: https://docs.usejump.co.uk/api-reference/patients

* **Patients can't be deleted.** Archive one with `PATCH /patients/{id}`, setting `status` to `archived`.
  * **Status filters are case-sensitive.** Use the exact values listed under each parameter.
  * **The patient's NHS GP** is set with a `gp_registration` block on create or update; there is no separate GP endpoint. See [Recording the patient's GP](https://docs.usejump.co.uk/guides/patient-sync#recording-the-patients-nhs-gp).
  * **`consultation_context`** records where an item was captured. It is not a way to rebuild a consultation: use [`GET /consultations/{id}`](https://docs.usejump.co.uk/api-reference/consultations).
## List patients

`GET /patients`

API-key scope: `read_patients`

Returns a paginated list of patients for the authenticated organisation. Supports filtering and text search.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no | Maximum number of records to return (1–100, default 20) |
| `offset` | query | integer | no | Number of records to skip (default 0) |
| `status` | query | string | no | One of: `active`, `inactive`, `archived`, `merged`. |
| `patient_type` | query | string | no | One of: `active`, `temporary`, `dummy`, `archived`, `merged`. |
| `status_in` | query | string | no | Comma-separated list of statuses |
| `created_at_gte` | query | string (date-time) | no |  |
| `created_at_lte` | query | string (date-time) | no |  |
| `search` | query | string | no | Case-insensitive search across first_name, last_name, email, nhs_number |

### Responses

- `200` Paginated list of patients
- `401` Missing or invalid API key
- `500` Unexpected server error

## Create a patient

`POST /patients`

API-key scope: `write_patients`

Creates a new patient record. The `organization_id` is set from the API key — it cannot be overridden in the request body.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | string (uuid) | no | Optional UUID for request deduplication. Same key + same body returns the cached response. Same key + different body returns 409 CONFLICT. Keys are scoped to your organisation and endpoint, and expire after 24 hours. |

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `first_name` | string | yes |  |
| `last_name` | string | yes |  |
| `date_of_birth` | string (date) | yes |  |
| `middle_name` | string | no |  |
| `preferred_name` | string | no |  |
| `title` | string | no |  |
| `biological_sex` | string | no | One of: `male`, `female`, `unknown`, `indeterminate`. |
| `gender` | string | no | One of: `man`, `woman`, `non_binary`, `other`, `prefer_not_to_say`. |
| `ethnicity` | string | no |  |
| `nhs_number` | string | no | Format: 123-123-1234 or 1231231234 |
| `email` | string (email) | no |  |
| `phone` | string | no |  |
| `mobile_phone` | string | no |  |
| `home_phone` | string | no |  |
| `address_line_1` | string | no |  |
| `address_line_2` | string | no |  |
| `address_line_3` | string | no |  |
| `town_city` | string | no |  |
| `postcode` | string | no |  |
| `country` | string | no |  |
| `status` | string | no | One of: `active`, `inactive`, `archived`, `merged`. |
| `patient_type` | string | no | One of: `active`, `temporary`, `dummy`, `archived`, `merged`. |
| `pronouns` | string | no | Free-text pronouns, e.g. "she/her". |
| `named_clinician_id` | string (uuid) | no | The patient's named clinician. Must reference a clinician in the caller's organisation, otherwise the request is rejected with 422. |
| `patient_id` | string | no | Human-facing patient identifier. Must be unique across all patients; auto-generated if omitted. A collision is rejected with 422. |
| `external_id` | string | no | Your own reference for this patient. Must be unique within your organisation; a collision is rejected with 422. |
| `accessibility_needs` | AccessibilityNeeds | no | Patient accessibility needs. Accepts either the modern object form (recommended — carries interpreter-language and BSL flags) or the legacy array form (a plain list of access-need codes). Stored as JSON. |
| `gp_registration` | GpRegistrationBlock | no | The patient's GP registration. Stored in a child table, not on the patient row. On create it seeds the current registration; on update it merges into the current (is_current) registration, field by field — only the keys you send are changed. Written atomically with the patient (a partial failure rolls the whole request back). `confirmed_source` is always stamped `api`. |
| `emergency_contact` | EmergencyContactBlock | no | The patient's emergency contact. Stored in a child table, not on the patient row. On create it inserts the emergency contact; on update it merges into the existing emergency contact, field by field. Written atomically with the patient. A single emergency contact is supported; next-of-kin / carer contacts are not exposed here yet. |

### Responses

- `201` Patient created
- `401` Missing or invalid API key
- `409` `CONFLICT`: the `patient_id` is already in use, or the `nhs_number` is already recorded against another patient in your organisation (the field is named in `details`); or the idempotency key was reused with a different request body
- `422` Request body failed validation
- `500` Unexpected server error

## Get a patient

`GET /patients/{id}`

API-key scope: `read_patients`

Returns a single patient by ID. Returns NOT_FOUND for both missing records and records belonging to a different organisation.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |

### Responses

- `200` Patient found
- `401` Missing or invalid API key
- `404` Resource not found (or belongs to a different organisation)
- `500` Unexpected server error

## Update a patient

`PATCH /patients/{id}`

API-key scope: `write_patients`

Partially updates a patient record. Only supplied fields are changed. Fields like `organization_id`, `password_hash`, and internal integration IDs are silently ignored.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |

### Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `first_name` | string | no |  |
| `last_name` | string | no |  |
| `date_of_birth` | string (date) | no |  |
| `middle_name` | string | no |  |
| `preferred_name` | string | no |  |
| `title` | string | no |  |
| `biological_sex` | string | no | One of: `male`, `female`, `unknown`, `indeterminate`. |
| `gender` | string | no | One of: `man`, `woman`, `non_binary`, `other`, `prefer_not_to_say`. |
| `ethnicity` | string | no |  |
| `nhs_number` | string | no |  |
| `email` | string (email) | no |  |
| `phone` | string | no |  |
| `mobile_phone` | string | no |  |
| `home_phone` | string | no |  |
| `address_line_1` | string | no |  |
| `address_line_2` | string | no |  |
| `address_line_3` | string | no |  |
| `town_city` | string | no |  |
| `postcode` | string | no |  |
| `country` | string | no |  |
| `preferred_contact_method` | string | no | One of: `email`, `mobile`, `home_phone`, `letter`. |
| `status` | string | no | One of: `active`, `inactive`, `archived`, `merged`. |
| `patient_type` | string | no | One of: `active`, `temporary`, `dummy`, `archived`, `merged`. |
| `is_deceased` | boolean | no |  |
| `date_of_death` | string (date) | no |  |
| `requires_review` | boolean | no |  |
| `review_reason` | string | no |  |
| `accessibility_needs` | AccessibilityNeeds | no | Patient accessibility needs. Accepts either the modern object form (recommended — carries interpreter-language and BSL flags) or the legacy array form (a plain list of access-need codes). Stored as JSON. |
| `accessibility_notes` | string | no |  |
| `occupation` | string | no |  |
| `pronouns` | string | no | Free-text pronouns, e.g. "she/her". |
| `named_clinician_id` | string (uuid) | no | The patient's named clinician. Must reference a clinician in the caller's organisation, otherwise the request is rejected with 422. |
| `patient_id` | string | no | Human-facing patient identifier. Must be unique across all patients; a collision is rejected with 422. |
| `external_id` | string | no | Your own reference for this patient. Must be unique within your organisation; a collision is rejected with 422. |
| `patient_notes` | string | no |  |
| `consent_sms` | boolean | no |  |
| `consent_email` | boolean | no |  |
| `consent_marketing` | boolean | no |  |
| `consent_electronic_communication` | boolean | no |  |
| `gp_registration` | GpRegistrationBlock | no | The patient's GP registration. Stored in a child table, not on the patient row. On create it seeds the current registration; on update it merges into the current (is_current) registration, field by field — only the keys you send are changed. Written atomically with the patient (a partial failure rolls the whole request back). `confirmed_source` is always stamped `api`. |
| `emergency_contact` | EmergencyContactBlock | no | The patient's emergency contact. Stored in a child table, not on the patient row. On create it inserts the emergency contact; on update it merges into the existing emergency contact, field by field. Written atomically with the patient. A single emergency contact is supported; next-of-kin / carer contacts are not exposed here yet. |

### Responses

- `200` Patient updated
- `401` Missing or invalid API key
- `404` Resource not found (or belongs to a different organisation)
- `409` `CONFLICT`: the `patient_id` is already in use, or the `nhs_number` is already recorded against another patient in your organisation (the field is named in `details`)
- `422` Request body failed validation
- `500` Unexpected server error

## List patient observations

`GET /patients/{id}/observations`

API-key scope: `read_patients`

Returns a paginated longitudinal list of observations for a patient (not scoped to a single consultation).

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |
| `limit` | query | integer | no | Maximum number of records to return (1–100, default 20) |
| `offset` | query | integer | no | Number of records to skip (default 0) |
| `code` | query | string | no | Filter by SNOMED/observation code |
| `status` | query | string | no | One of: `final`, `amended`, `entered-in-error`. |
| `effective_datetime_gte` | query | string (date-time) | no |  |
| `effective_datetime_lte` | query | string (date-time) | no |  |

### Responses

- `200` Paginated observations
- `404` Resource not found (or belongs to a different organisation)

## List patient medications

`GET /patients/{id}/medications`

API-key scope: `read_patients`

Returns a paginated longitudinal list of medications for a patient.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |
| `limit` | query | integer | no | Maximum number of records to return (1–100, default 20) |
| `offset` | query | integer | no | Number of records to skip (default 0) |
| `status` | query | string | no | One of: `active`, `stopped`, `suspended`, `completed`. |
| `status_in` | query | string | no | Comma-separated status values |

### Responses

- `200` Paginated medications
- `404` Resource not found (or belongs to a different organisation)

## List patient problems

`GET /patients/{id}/problems`

API-key scope: `read_patients`

Returns a paginated longitudinal problem list for a patient.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |
| `limit` | query | integer | no | Maximum number of records to return (1–100, default 20) |
| `offset` | query | integer | no | Number of records to skip (default 0) |
| `status` | query | string | no | One of: `Active`, `Health Administration`, `Past Ended`. |
| `status_in` | query | string | no | Comma-separated status values |
| `significance` | query | string | no | One of: `Significant`, `Minor`. |

### Responses

- `200` Paginated problems
- `404` Resource not found (or belongs to a different organisation)

## List patient referrals

`GET /patients/{id}/referrals`

API-key scope: `read_patients`

Returns a paginated longitudinal list of referrals for a patient.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |
| `limit` | query | integer | no | Maximum number of records to return (1–100, default 20) |
| `offset` | query | integer | no | Number of records to skip (default 0) |
| `status` | query | string | no | One of: `active`, `closed`. |
| `priority` | query | string | no | One of: `routine`, `urgent`, `asap`, `stat`. |
| `authored_on_gte` | query | string (date) | no |  |
| `authored_on_lte` | query | string (date) | no |  |

### Responses

- `200` Paginated referrals
- `404` Resource not found (or belongs to a different organisation)

## List patient allergies

`GET /patients/{id}/allergies`

API-key scope: `read_patients`

Returns a paginated allergy record for a patient.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |
| `limit` | query | integer | no | Maximum number of records to return (1–100, default 20) |
| `offset` | query | integer | no | Number of records to skip (default 0) |
| `clinical_status` | query | string | no | One of: `active`, `inactive`, `resolved`. |
| `criticality` | query | string | no | One of: `high`, `low`, `unable-to-assess`. |

### Responses

- `200` Paginated allergies
- `404` Resource not found (or belongs to a different organisation)

## List patient immunisations

`GET /patients/{id}/immunisations`

API-key scope: `read_patients`

Returns a paginated immunisation history for a patient. The existing `date_administered` response field contains the source administration timestamp (`administered_at`), including timezone; it is not the encounter or record creation time. Older date-only values were migrated to midnight UTC.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |
| `limit` | query | integer | no | Maximum number of records to return (1–100, default 20) |
| `offset` | query | integer | no | Number of records to skip (default 0) |
| `status` | query | string | no |  |

### Responses

- `200` Paginated immunisations
- `404` Resource not found (or belongs to a different organisation)

## List patient supplements

`GET /patients/{id}/supplements`

API-key scope: `read_patients`

Returns a paginated list of the dietary supplements, vitamins and herbal remedies on a patient's record, newest first. Supplements are a separate record section from medications: they are never prescriptions and do not appear under `/patients/{id}/medications`. Purchase links are held on the practice's supplement catalogue, not on the patient's record, and are not returned. A `status` or `source` value outside the listed values is a 422, never an empty list.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string (uuid) | yes |  |
| `limit` | query | integer | no | Maximum number of records to return (1–100, default 20) |
| `offset` | query | integer | no | Number of records to skip (default 0) |
| `status` | query | string | no | One of: `active`, `stopped`. |
| `source` | query | string | no | One of: `patient_reported`, `clinician_entered`. |
| `category` | query | string | no |  |

### Responses

- `200` Paginated supplements
- `404` Resource not found (or belongs to a different organisation)
- `422` Request body failed validation
