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

# EHR Integration

> Connect HANA to Electronic Health Record systems via direct API or middleware partners. Bidirectional data flow — read patient context, write clinical notes back.

## How EHR Integration Works

HANA's clinical value depends on being part of the care record, not separate from it. The integration model is bidirectional:

1. **Read** → HANA pulls patient context (demographics, diagnoses, medications, care plans) to inform the reasoning engine before each interaction
2. **Write-back** → After engagement, HANA pushes structured clinical notes, tasks, and flags directly into the patient chart

This closed loop is what makes HANA infrastructure rather than another disconnected tool.

```
┌─────────────┐     Read      ┌─────────────┐     Engage    ┌─────────────┐
│     EHR     │ ────────────→ │    HANA     │ ────────────→ │   Patient   │
│             │ ←──────────── │  Reasoning  │ ←──────────── │             │
└─────────────┘   Write-back  └─────────────┘   Respond     └─────────────┘
```

***

## Integration Paths

HANA supports three integration approaches, depending on your EHR and technical requirements:

### 1. Direct API Integration

For EHR systems with open APIs. Lowest latency, most control.

| EHR               | Integration Status | Setup Time | Notes                     |
| ----------------- | ------------------ | ---------- | ------------------------- |
| PracticeQ         | ✅ Live             | 1-2 weeks  | Direct API, bidirectional |
| Charma            | ✅ Live             | 1-2 weeks  | Direct API, bidirectional |
| Custom / In-House | ✅ Supported        | 2-4 weeks  | Via HANA REST API         |

**How it works:**

```
Your EHR API ←→ HANA Connector ←→ HANA Reasoning Engine
```

HANA maintains pre-built connectors for supported EHRs. For systems with standard REST/FHIR APIs, we build custom connectors during onboarding.

### 2. Integration Middleware (Redox, Keragon)

For EHR systems without open APIs, or when you need a standard interoperability layer. The breadth of EHR connectivity here comes from our middleware partners — Redox and Keragon maintain pre-built connections to hundreds of EHR systems, and HANA integrates through their platforms.

| Middleware | EHRs Supported                               | Setup Time | Notes                                              |
| ---------- | -------------------------------------------- | ---------- | -------------------------------------------------- |
| Redox      | Athena, Epic, Cerner, 200+ via Redox network | 2-4 weeks  | HL7 FHIR, production-ready                         |
| Keragon    | Multiple EU/US EHRs via Keragon platform     | 2-4 weeks  | Healthcare automation platform with EHR connectors |

**How it works:**

```
Your EHR ←→ Redox/Keragon ←→ HANA Connector ←→ HANA Reasoning Engine
```

<Note>
  Middleware platforms carry their own licensing costs. Redox typically charges a platform fee + per-connector fees. Keragon has its own pricing model. HANA works with your existing middleware subscription if you have one, or we can help you get set up.
</Note>

### 3. HANA Dashboard (No EHR Required)

For organizations without an EHR, or with legacy systems that don't support integration.

HANA provides a lightweight clinical dashboard where care teams can:

* View patient engagement status and history
* Review clinical notes and tasks
* Manage agent configurations
* Export data as CSV or via API

```
HANA Dashboard (web) ←→ HANA Reasoning Engine ←→ Patient
```

This is the fastest path to deployment (typically 1 week) and is commonly used by:

* Small practices without modern EHR systems
* Pilot deployments before full EHR integration
* Platform partners building their own UI

***

## Data Flow Specification

### Inbound Data (EHR → HANA)

Data HANA reads from your system to inform the reasoning engine:

```json theme={null}
{
  "patient": {
    "id": "P-12345",
    "demographics": {
      "name": "Maria Garcia",
      "age": 58,
      "language": "en",
      "timezone": "America/New_York"
    },
    "clinical": {
      "diagnoses": [
        {"code": "E11.9", "description": "Type 2 diabetes", "onset": "2020-03-15"}
      ],
      "medications": [
        {"name": "Metformin", "dose": "500mg", "frequency": "2x daily", "start": "2020-04-01"}
      ],
      "allergies": ["penicillin"],
      "vitals": {
        "last_bp": "138/88",
        "last_glucose": 142,
        "recorded_at": "2026-01-28T09:00:00Z"
      }
    },
    "care_plan": {
      "active_goals": ["improve_medication_adherence", "reduce_hba1c"],
      "upcoming_appointments": [
        {"date": "2026-02-15", "provider": "Dr. Chen", "type": "follow_up"}
      ]
    },
    "engagement_history": {
      "last_contact": "2026-02-01",
      "preferred_channel": "voice",
      "preferred_time": "morning"
    }
  }
}
```

### Outbound Data (HANA → EHR)

After each engagement, HANA writes back:

```json theme={null}
{
  "engagement_id": "eng_abc123",
  "patient_id": "P-12345",
  "timestamp": "2026-02-08T10:08:30Z",
  "clinical_note": {
    "format": "fhir_document_reference",
    "narrative": "Patient reports taking metformin approximately 4 of 7 days this week. Primary barrier identified as cost — recent insurance change increased copay. Mild nausea reported but considered tolerable by patient. No additional side effects. Mood and sleep stable. Recommended: review copay assistance programs.",
    "structured": {
      "medication_adherence": {
        "metformin": {"reported_days": 4, "prescribed_days": 7, "rate": 0.57}
      },
      "barriers": [{"type": "cost", "detail": "Insurance copay increase"}],
      "side_effects": [{"medication": "metformin", "effect": "mild_nausea", "severity": "low"}],
      "mood": "stable",
      "sdoh_flags": ["insurance_change"]
    }
  },
  "tasks": [
    {
      "type": "review_medication_assistance",
      "priority": "medium",
      "assigned_to_role": "care_manager",
      "reason": "Cost barrier to medication adherence"
    }
  ],
  "risk_level": "low",
  "next_engagement": "2026-02-15T10:00:00Z"
}
```

***

## FHIR Support

HANA supports HL7 FHIR R4 for structured data exchange. Clinical notes are formatted as FHIR `DocumentReference` resources:

```json theme={null}
{
  "resourceType": "DocumentReference",
  "status": "current",
  "type": {
    "coding": [{
      "system": "http://loinc.org",
      "code": "11488-4",
      "display": "Consult note"
    }]
  },
  "subject": {
    "reference": "Patient/P-12345"
  },
  "date": "2026-02-08T10:08:30Z",
  "content": [{
    "attachment": {
      "contentType": "text/plain",
      "data": "base64-encoded-clinical-note"
    }
  }]
}
```

FHIR resources supported for read/write:

* `Patient` — demographics, contact
* `Condition` — active diagnoses
* `MedicationStatement` — current medications
* `DocumentReference` — clinical notes (write-back)
* `Task` — clinical follow-up tasks
* `Flag` — risk alerts

***

## Integration Checklist

Use this checklist when planning your EHR integration:

<Steps>
  <Step title="Identify EHR and API Availability">
    What EHR does the organization use? Does it have an open API? Is Redox/Keragon already in use?
  </Step>

  <Step title="Define Data Scope">
    Which patient data fields should HANA read? What should HANA write back? Map the specific fields.
  </Step>

  <Step title="Configure Authentication">
    Set up API keys or OAuth credentials for the EHR connection. Define user/service account permissions.
  </Step>

  <Step title="Test in Sandbox">
    Use HANA's sandbox environment with synthetic patient data. Verify read/write operations end-to-end.
  </Step>

  <Step title="Clinical Validation">
    Have clinical staff review sample write-back notes. Confirm escalation pathways trigger correctly.
  </Step>

  <Step title="Go Live">
    Deploy to pilot cohort. Monitor data flow, note quality, and any integration errors for the first 2 weeks.
  </Step>
</Steps>

***

## Troubleshooting

| Issue                                 | Likely Cause                    | Resolution                                                        |
| ------------------------------------- | ------------------------------- | ----------------------------------------------------------------- |
| Write-back notes not appearing in EHR | Incorrect document type mapping | Verify FHIR resource type matches your EHR's expected format      |
| Patient data stale                    | Sync frequency too low          | Configure real-time or near-real-time data polling                |
| Connection timeout                    | EHR rate limits                 | Implement backoff; contact EHR vendor for rate limit increase     |
| Missing medications in context        | API permissions                 | Ensure HANA service account has read access to medication records |

<Card title="Next: White-Label Guide" icon="palette" href="/developers/white-label">
  Deploy HANA under your own brand with HANA Connect.
</Card>
