# List a patient's allergies

Operation ID: `ehr.listAllergies`

List FHIR AllergyIntolerance resources for a patient.

## Public method

`listAllergies`

Signature: `ehr.listAllergies(patientId)`

Return type: `Promise<ListAllergiesResponse>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`GET /patients/{patient_id}/allergies`

## Path parameters

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

## Query parameters

None.

## Body parameters

None.

Request model: None.

## Request example

None declared in canonical OpenAPI.

## Success responses

| Status | Shape | Content type | Description |
|---|---|---|---|
| `200` | [`ListAllergiesResponse`](../models/ListAllergiesResponse.md) | application/json | Successful Response |

## Success response examples

### 200

```json
{
  "allergies": [
    {
      "allergen": "Peanut",
      "allergen_code": {
        "code": "91935009",
        "display": "Allergy to peanut",
        "system": "http://snomed.info/sct"
      },
      "allergy_id": "00000000-0000-4000-8000-000000000301",
      "asserted_by": "provider-example-001",
      "asserted_date": "2026-01-15T10:00:00Z",
      "category": "food",
      "criticality": "high",
      "fhir_id": "allergy-example-001",
      "intolerance_type": "allergy",
      "notes": "Synthetic confirmed food allergy",
      "onset_date": "2015-06-01",
      "reactions": [
        {
          "manifestation": "Urticaria",
          "manifestation_code": {
            "code": "126485001",
            "display": "Urticaria",
            "system": "http://snomed.info/sct"
          },
          "notes": "Hives after exposure",
          "onset": "2015-06-01T12:00:00Z",
          "severity": "severe"
        }
      ],
      "resolved_date": null,
      "status": "active",
      "verification_status": "confirmed"
    }
  ],
  "patient_id": "patient-example-001",
  "total": 1
}
```

## Common errors

| Status | Shape | Content type | Description |
|---|---|---|---|
| `401` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Authorization required — missing or invalid Bearer JWT |
| `500` | [`StandardErrorResponse`](../models/StandardErrorResponse.md) | application/json | Internal server error |

## Error examples

### 401 — Missing or invalid access token

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

### 500 — Unexpected service failure (sanitized example)

```json
{
  "error": "Internal server error"
}
```

## NodeJS / TypeScript implementation

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

```ts
const patientId = "<PATIENT_ID>";

const result = await ehr.listAllergies(patientId);
```

## cURL

```bash
curl -X GET \
  -H 'Authorization: Bearer <ACCESS_TOKEN>' \
  'https://dev-api-ehr.health.cloud/patients/%3CPATIENT_ID%3E/allergies'
```

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