---
title: "Update a patient"
method: PATCH
path: "/patients/{patientId}"
tags: ["Patients"]
---

# Update a patient

`PATCH /patients/{patientId}`

Partially updates an existing patient. Only the fields present in the request body are modified; omitted fields are left untouched. The clinic is determined by the provided API key and must own the patient.

For the array fields (`diagnoses`, `medications`, `allergies`, `insurances`, `relatedContacts`), each entry may include an optional `id`:
- When `id` matches an existing entry, that entry is updated (shallow-merged).
- When `id` is omitted, a new entry is appended.

## Path parameters

- `patientId` string, required

## Request body

- UpdatePatientRequest — Partial patient update payload. All fields are optional; only the fields provided are updated. For array fields, each item may carry an optional `id` for upsert (a matching id updates that entry, a missing id appends a new one).
  - `firstName` string
  - `lastName` string
  - `middleName` string
  - `gender` 'Male' | 'Female' | 'Non-binary' | 'Prefer not to say' | 'Other' | 'Unknown'
  - `genderIdentity` string
  - `pronoun` 'he/him' | 'she/her' | 'they/them'
  - `dateOfBirth` string — Date of birth in MM/DD/YYYY format
  - `raceEthnicity` 'White' | 'Black or African American' | 'Asian' | 'Hispanic or Latino' | 'American Indian or Alaska Native' | 'Native Hawaiian or Other Pacific Islander' | 'Other' | 'Prefer not to say'
  - `email` string, email
  - `phoneNumber` string
  - `address` object
    - `address1` string
    - `address2` string
    - `city` string
    - `state` string — 2-letter US state code
    - `zip` string
  - `diagnoses` object[]
    - `id` string — Existing diagnosisId to update; omit to append a new diagnosis.
    - `code` string
    - `description` string
  - `relatedContacts` object[]
    - `id` string — Existing emergency-contact id to update; omit to append a new contact.
    - `fullName` string
    - `email` string
    - `phones` string[]
    - `relationship` string
    - `hipaaConsent` boolean
  - `insurances` object[]
    - `id` string — Existing insurance id to update; omit to append a new insurance.
    - `tradingPartnerName` string
    - `memberId` string
    - `groupNumber` string
    - `company` string
    - `isPrimary` boolean
  - `medications` object[]
    - `id` string — Existing medicationId to update; omit to append a new medication.
    - `name` string
    - `brandName` string
    - `genericName` string
    - `strength` string
    - `route` string
    - `form` string
    - `reason` string
    - `comment` string
    - `currentMedication` boolean
    - `date` string
    - `stopDate` string
    - `dosage` object
      - `dose` string
      - `doseUnit` string
      - `doseTiming` string
      - `duration` string
      - `quantity` string
      - `refills` string
      - `asNeeded` boolean
  - `allergies` object[]
    - `id` string — Existing allergyId to update; omit to append a new allergy.
    - `name` string
    - `reactions` string[]
    - `severity` string
    - `notes` string

## Response `200`

Patient updated successfully

- object
  - `patientId` string

## Other responses

- `400` — Invalid input
- `401` — Unauthorized - Invalid or missing API key
- `403` — Patient does not belong to this clinic
- `404` — Patient not found
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.dev/mdhub/apis/mdhub-api.md) · [All operations](https://skmtc.dev/mdhub/apis/mdhub-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mdhub/mdhub-api/revisions/ee7fca23d80b/schema)
