# List a patient's family history

Operation ID: `ehr.listFamilyHistory`

List FHIR FamilyMemberHistory resources for a patient.

## Public method

`listFamilyHistory`

Signature: `ehr.listFamilyHistory(patientId)`

Return type: `Promise<ListFamilyHistoryResponse>`

## Authentication

Classification: **AUTHENTICATED**

Schemes: `bearerAuth`

## Prerequisites

None documented.

## HTTP

`GET /patients/{patient_id}/family-history`

## 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` | [`ListFamilyHistoryResponse`](../models/ListFamilyHistoryResponse.md) | application/json | Successful Response |

## Success response examples

### 200

```json
{
  "family_history": [
    {
      "age_at_death": 0,
      "biological": true,
      "born_date": "2026-01-01",
      "cause_of_death": "string",
      "conditions": [
        {
          "age_at_death": 0,
          "age_at_onset": 0,
          "condition": "string",
          "icd10_code": "string",
          "notes": "string",
          "snomed_code": "string"
        }
      ],
      "deceased": true,
      "entry_id": "00000000-0000-0000-0000-000000000000",
      "fhir_id": "string",
      "member_name": "string",
      "notes": "string",
      "recorded_date": "2026-01-01",
      "relationship": "mother",
      "sex": "string",
      "status": "completed"
    }
  ],
  "patient_id": "string",
  "total": 0
}
```

## 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.listFamilyHistory(patientId);
```

## cURL

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

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