> ## Documentation Index
> Fetch the complete documentation index at: https://docs.olira.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# get_stable_data

> Get stable patient data: demographics, condition/diagnosis, medications, preferences.

Get stable patient data (demographics, condition/diagnosis, medications, preferences).

## Parameters

| Parameter    | Required | Type                    | Description                                                                                                                                                                                                                                                          |
| ------------ | -------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `patient_id` | Yes      | `string`                | Patient user ID                                                                                                                                                                                                                                                      |
| `modules`    | No       | `array`                 | Optional list of modules (`demographics`, `condition_diagnosis`, `treatment_phase`, `medications`, `care_team`, `insurance`, `pharmacy`, `emergency_contact`, `user_preferences`, `procedures`, `allergies`, `immunizations`, `devices`, `family_history`, `social`) |
| `date_from`  | No       | `string` (ISO 8601)     | Inclusive lower bound on `StableStateModuleDocument.created_at`. Resolves to the latest version per module in the window.                                                                                                                                            |
| `date_to`    | No       | `string` (ISO 8601)     | Inclusive upper bound on `StableStateModuleDocument.created_at`.                                                                                                                                                                                                     |
| `format`     | No       | `"raw"` or `"markdown"` | Output format (default: `raw`). `"pretty"` is accepted as a deprecated alias for `"markdown"`.                                                                                                                                                                       |

## Example output

Illustrative: with `format: raw` you receive structured JSON; with `markdown`, rendered text for the agent.

```json theme={null}
{
  "demographics": {
    "name": "Alex Patient",
    "dob": "1978-04-12",
    "timezone": "America/New_York",
    "telecom": [
      { "system": "phone", "value": "+1-617-555-0142", "use": "home", "rank": 1 },
      { "system": "email", "value": "alex@example.com", "use": "home" }
    ],
    "addresses": [
      { "street": "1 Main St", "city": "Boston", "state": "MA", "zip": "02118" }
    ],
    "identifiers": [{ "system": "mrn:rc", "value": "RC-00482" }],
    "phone": "+1-617-555-0142",
    "email": "alex@example.com",
    "address": { "street": "1 Main St", "city": "Boston", "state": "MA", "zip": "02118" }
  },
  "insurance": {
    "entries": [
      {
        "value": { "rank": "primary", "payer": "BlueCross", "plan_name": "PPO", "member_id": "XJ9920" },
        "event_log_ids": ["…"]
      }
    ]
  },
  "treatment_phase": {
    "value": { "phase": "active_treatment", "effective_period": { "start": "2026-02-01" } }
  },
  "medications": [
    {
      "name": "Example Drug",
      "dose": "10 mg",
      "frequency": "once daily",
      "codes": [{ "system": "rxnorm", "code": "1049502", "display": "Example Drug" }],
      "effective_period": { "start": "2026-01-15" },
      "entry_key": "rxnorm:1049502",
      "prescribed_by": {
        "name": "Dr. Smith",
        "identifiers": [{ "system": "npi", "value": "1234567890" }]
      },
      "sources": [{ "type": "clinician" }]
    }
  ]
}
```
