# Update a practitioner profile

Operation ID: `provider.updatePractitioner`

Patch mutable fields on a Practitioner profile by FHIR resource ID. Only keys UpdatePractitionerRequest declares are ever written; any other body key is silently ignored. Specialties are patched via the 'specialty' key — a raw 'specialties' key is rejected. Scoped to the caller's tenant (resolved from the Bearer JWT).

## Public method

`update`

Signature: `provider.update(fhirPractitionerId, request)`

Return type: `Promise<Practitioner>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`PATCH /practitioners/{practitioner_id}`

## Path parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `practitioner_id` | `string` | Yes |  |  |  | No |  |

## Query parameters

None.

## Body parameters

| Name | Type | Required | Format | Allowed values | Default | Nullable | Description |
|---|---|---:|---|---|---|---:|---|
| `body` | [`UpdatePractitionerRequest`](../models/UpdatePractitionerRequest.md) | No |  |  |  | Yes |  |

Request model: [`UpdatePractitionerRequest`](../models/UpdatePractitionerRequest.md)

## Request example

```json
{
  "active": true,
  "address": {
    "city": "Boston",
    "country": "US",
    "is_primary": true,
    "state": "MA",
    "street1": "200 Medical Plaza",
    "street2": "Suite 300",
    "type": "work",
    "zip_code": "02108"
  },
  "birth_date": "1980-05-12",
  "board_certifications": [
    "Cardiovascular Disease"
  ],
  "credential": "MD",
  "department": "Cardiology",
  "education_credentials": [
    {
      "credential": "MD",
      "graduation_year": 2006,
      "institution": "Example University School of Medicine"
    }
  ],
  "email": "provider.user@example.com",
  "first_name": "Alex",
  "gender": "female",
  "graduation_year": 2006,
  "identifiers": [
    {
      "expiration_date": "2028-12-31",
      "state": "MA",
      "type": "DEA",
      "value": "EXAMPLE123"
    }
  ],
  "insurances_accepted": [
    {
      "payer_id": "payer-example-001",
      "payer_name": "Example Health Plan"
    }
  ],
  "languages_spoken": [
    {
      "code": "en",
      "display": "English"
    }
  ],
  "last_name": "Smith",
  "medical_school": "Example University School of Medicine",
  "middle_name": "Jordan",
  "notes": "Accepting new cardiology patients.",
  "npi": "1234567890",
  "organization_id": "organization-example-001",
  "organization_name": "Example Health Organization",
  "prefix": "Dr.",
  "race": [
    "white"
  ],
  "roles": [
    "physician"
  ],
  "specialty": [
    {
      "board_certified": true,
      "code": "207RC0000X",
      "display": "Cardiovascular Disease Physician",
      "primary": true,
      "system": "http://nucc.org/provider-taxonomy"
    }
  ],
  "state_licenses": [
    {
      "expiration_date": "2028-12-31",
      "license_number": "MA-EXAMPLE-12345",
      "state": "MA"
    }
  ],
  "suffix": "Jr.",
  "telecom": [
    {
      "system": "phone",
      "use": "work",
      "value": "+15550100000"
    }
  ]
}
```

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`UpdatePractitionerResponse`](../models/UpdatePractitionerResponse.md) | application/json | Updated practitioner profile |

## Success response examples

### 200

```json
{
  "active": true,
  "address": {
    "city": "Boston",
    "country": "US",
    "is_primary": true,
    "state": "MA",
    "street1": "200 Medical Plaza",
    "street2": "Suite 300",
    "type": "work",
    "zip_code": "02108"
  },
  "birth_date": "1980-05-12",
  "board_certifications": [
    "Cardiovascular Disease"
  ],
  "credential": "MD",
  "department": "Cardiology",
  "education_credentials": [
    {
      "credential": "MD",
      "graduation_year": 2006,
      "institution": "Example University School of Medicine"
    }
  ],
  "email": "provider.user@example.com",
  "fhir_id": "practitioner-example-001",
  "first_name": "Alex",
  "gender": "female",
  "graduation_year": 2006,
  "identifiers": [
    {
      "expiration_date": "2028-12-31",
      "state": "MA",
      "type": "DEA",
      "value": "EXAMPLE123"
    }
  ],
  "insurances_accepted": [
    {
      "payer_id": "payer-example-001",
      "payer_name": "Example Health Plan"
    }
  ],
  "languages_spoken": [
    {
      "code": "en",
      "display": "English"
    }
  ],
  "last_name": "Smith",
  "medical_school": "Example University School of Medicine",
  "middle_name": "Jordan",
  "notes": "Accepting new cardiology patients.",
  "npi": "1234567890",
  "organization_id": "organization-example-001",
  "organization_name": "Example Health Organization",
  "practitioner_id": "00000000-0000-4000-8000-000000000000",
  "prefix": "Dr.",
  "race": [
    "white"
  ],
  "roles": [
    "physician"
  ],
  "specialty": [
    {
      "board_certified": true,
      "code": "207RC0000X",
      "display": "Cardiovascular Disease Physician",
      "primary": true,
      "system": "http://nucc.org/provider-taxonomy"
    }
  ],
  "state_licenses": [
    {
      "expiration_date": "2028-12-31",
      "license_number": "MA-EXAMPLE-12345",
      "state": "MA"
    }
  ],
  "suffix": "Jr.",
  "telecom": [
    {
      "system": "phone",
      "use": "work",
      "value": "+15550100000"
    }
  ]
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `400` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | The body used the unsupported 'specialties' key, or the update failed |
| `401` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
| `404` | [`provider.ErrorResponse`](../models/provider.ErrorResponse.md) | application/json | No Practitioner resource exists for practitioner_id |

## Error examples

### 400 — Body used 'specialties' instead of 'specialty'

```json
{
  "error": "specialties is not supported; use specialty as a list"
}
```

### 401 — Missing or invalid access token

```json
{
  "error": "Authorization required"
}
```

### 404 — No Practitioner resource matches practitioner_id

```json
{
  "error": "Practitioner not found"
}
```

## NodeJS / TypeScript implementation

```ts
import { HCSDK } from "@healthcloudai/hc-sdk";
import type { UpdatePractitionerRequest } from "@healthcloudai/hc-sdk";
```

```ts
const fhirPractitionerId = "<FHIR_PRACTITIONER_ID>";

const request = {
  "active": true,
  "address": {
    "city": "Boston",
    "country": "US",
    "is_primary": true,
    "state": "MA",
    "street1": "200 Medical Plaza",
    "street2": "Suite 300",
    "type": "work",
    "zip_code": "02108"
  },
  "birth_date": "1980-05-12",
  "board_certifications": [
    "Cardiovascular Disease"
  ],
  "credential": "MD",
  "department": "Cardiology",
  "education_credentials": [
    {
      "credential": "MD",
      "graduation_year": 2006,
      "institution": "Example University School of Medicine"
    }
  ],
  "email": "provider.user@example.com",
  "first_name": "Alex",
  "gender": "female",
  "graduation_year": 2006,
  "identifiers": [
    {
      "expiration_date": "2028-12-31",
      "state": "MA",
      "type": "DEA",
      "value": "EXAMPLE123"
    }
  ],
  "insurances_accepted": [
    {
      "payer_id": "payer-example-001",
      "payer_name": "Example Health Plan"
    }
  ],
  "languages_spoken": [
    {
      "code": "en",
      "display": "English"
    }
  ],
  "last_name": "Smith",
  "medical_school": "Example University School of Medicine",
  "middle_name": "Jordan",
  "notes": "Accepting new cardiology patients.",
  "npi": "1234567890",
  "organization_id": "organization-example-001",
  "organization_name": "Example Health Organization",
  "prefix": "Dr.",
  "race": [
    "white"
  ],
  "roles": [
    "physician"
  ],
  "specialty": [
    {
      "board_certified": true,
      "code": "207RC0000X",
      "display": "Cardiovascular Disease Physician",
      "primary": true,
      "system": "http://nucc.org/provider-taxonomy"
    }
  ],
  "state_licenses": [
    {
      "expiration_date": "2028-12-31",
      "license_number": "MA-EXAMPLE-12345",
      "state": "MA"
    }
  ],
  "suffix": "Jr.",
  "telecom": [
    {
      "system": "phone",
      "use": "work",
      "value": "+15550100000"
    }
  ]
};

const result = await provider.update(fhirPractitionerId, request);
```

## cURL

```bash
curl -X PATCH \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"active":true,"address":{"city":"Boston","country":"US","is_primary":true,"state":"MA","street1":"200 Medical Plaza","street2":"Suite 300","type":"work","zip_code":"02108"},"birth_date":"1980-05-12","board_certifications":["Cardiovascular Disease"],"credential":"MD","department":"Cardiology","education_credentials":[{"credential":"MD","graduation_year":2006,"institution":"Example University School of Medicine"}],"email":"provider.user@example.com","first_name":"Alex","gender":"female","graduation_year":2006,"identifiers":[{"expiration_date":"2028-12-31","state":"MA","type":"DEA","value":"EXAMPLE123"}],"insurances_accepted":[{"payer_id":"payer-example-001","payer_name":"Example Health Plan"}],"languages_spoken":[{"code":"en","display":"English"}],"last_name":"Smith","medical_school":"Example University School of Medicine","middle_name":"Jordan","notes":"Accepting new cardiology patients.","npi":"1234567890","organization_id":"organization-example-001","organization_name":"Example Health Organization","prefix":"Dr.","race":["white"],"roles":["physician"],"specialty":[{"board_certified":true,"code":"207RC0000X","display":"Cardiovascular Disease Physician","primary":true,"system":"http://nucc.org/provider-taxonomy"}],"state_licenses":[{"expiration_date":"2028-12-31","license_number":"MA-EXAMPLE-12345","state":"MA"}],"suffix":"Jr.","telecom":[{"system":"phone","use":"work","value":"+15550100000"}]}' \
  'https://dev-api-provider.health.cloud/practitioners/%3CPRACTITIONER_ID%3E'
```

## Notes

None.

## Prepared Test Console scenario

No canonical scenario is currently associated.

## Real response

No approved real integration response is currently published. Unapproved candidates are never rendered as examples.
