# Get patient flags

Operation ID: `patient.getPatientFlags`

Return the complete boolean flags dictionary for the authenticated patient, e.g. {"imported_vitals": true}. A patient with no flags set (including any patient created before this field existed) returns an empty object {}. Requires a patient Bearer JWT; the patient is always resolved from the token, never from client input.

## Public method

`getFlags`

Signature: `patient.getFlags()`

Return type: `Promise<PatientFlags>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`GET /patients/flags`

## Path parameters

None.

## Query parameters

None.

## Body parameters

None.

Request model: None.

## Request example

None declared in canonical OpenAPI.

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`GetPatientFlagsResponse`](../models/GetPatientFlagsResponse.md) | application/json | Complete patient flags dictionary |

## Success response examples

### 200

```json
{
  "imported_vitals": true,
  "onboarding_completed": true
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `401` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | Authorization required — missing, invalid, expired, or non-patient Bearer JWT |
| `404` | [`patient.ErrorResponse`](../models/patient.ErrorResponse.md) | application/json | The authenticated patient has no FHIR Patient record |

## Error examples

### 401 — Missing or invalid access token

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

### 404 — Patient not found

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

## NodeJS / TypeScript implementation

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

```ts
const result = await patient.getFlags();
```

## cURL

```bash
curl -X GET \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  'https://dev-api-patient.health.cloud/patients/flags'
```

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