# Update the patient's driver's license

Operation ID: `patient.updateDriversLicense`

Persist the patient's driver's license image + text fields.

FHIR: the image is stored as a DocumentReference (LOINC 71230-7, subject = the patient) and the text fields as a standard Patient.identifier (v2-0203 type DL, per-state OID system, expiration in period.end).

Vendor mirror (single-vendor - only the account's configured EHR integration runs): Athena receives the image on the patients/{id}/driverslicense singleton and the text fields on PUT patients/{id} (partial update); OpenLoop (Healthie) and SteadyMD receive the image only, as a photo-ID document / identification intake file.

The image is downscaled (long edge 1568px) and re-encoded as JPEG q80 server-side before any persistence; JPEG and PNG uploads are both accepted and the MIME type is detected from the bytes - no content type is sent by the client. Non-fatal: a vendor failure never discards the FHIR write.

## Public method

`updateDriversLicense`

Signature: `patient.updateDriversLicense(request)`

Return type: `Promise<UpdateDriversLicenseResponse>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`PUT /patients/drivers-license`

## Path parameters

None.

## Query parameters

None.

## Body parameters

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

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

## Request example

```json
{
  "expiration_date": "string",
  "image": "string",
  "number": "string",
  "state": "st"
}
```

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`UpdateDriversLicenseResponse`](../models/UpdateDriversLicenseResponse.md) | application/json | Driver's license updated |

## Success response examples

### 200

```json
{
  "athena_drivers_license_status": "linked",
  "fhir_document_reference_id": "string",
  "openloop_drivers_license_status": "linked",
  "steadymd_drivers_license_status": "linked"
}
```

## Common errors

None declared in canonical OpenAPI.

## Error examples

None declared in canonical OpenAPI.

## NodeJS / TypeScript implementation

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

```ts
const request = {
  "expiration_date": "string",
  "image": "string",
  "number": "string",
  "state": "st"
};

const result = await patient.updateDriversLicense(request);
```

## cURL

```bash
curl -X PUT \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{"expiration_date":"string","image":"string","number":"string","state":"st"}' \
  'https://dev-api-patient.health.cloud/patients/drivers-license'
```

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