# Health Risk Cockpit Contract

Phase 8E changes JARVIS Health from technical pipeline metadata to a safe, compressed risk cockpit. JARVIS still does **not** diagnose, parse reports, read PDFs, display raw labs, or execute Health workflows.

## Purpose

The contract carries only traffic-light categories and short safe reasons for six fixed Health domains:

1. `behcet_activity` — Behçet-Aktivität
2. `eye_risk` — Augen-Risiko
3. `vascular_thrombosis_risk` — Gefässe/Thrombose
4. `inflammation_lab_trend` — Entzündung/Labortrend
5. `medication_safety` — Medikamenten-Sicherheit
6. `controls_data_status` — Kontrollen & Datenstatus

## JSON Shape

See `schemas/health-risk-snapshot.schema.json`.

```json
{
  "schema_version": "1.0",
  "generated_at": "2026-01-01T00:00:00Z",
  "overall_status": "yellow",
  "domains": [
    {
      "id": "behcet_activity",
      "label": "Behçet-Aktivität",
      "status": "unknown",
      "reason": "keine safe Flags",
      "action": "watch"
    }
  ],
  "data_freshness": {
    "labs": "stale",
    "duplex": "unknown",
    "eye_check": "unknown",
    "dashboard": "available"
  }
}
```

The real payload must contain all six domains in the fixed order.

## Allowed Values

- `status`: `green | yellow | red | unknown`
- `action`: `none | watch | contact_doctor | urgent`
- `data_freshness`: `fresh | stale | missing | unknown`
- `dashboard`: `available | missing | unknown`

## Safety Rules

Allowed:

- traffic-light category
- short controlled reason label
- action category
- freshness category
- protected link-only dashboard availability status

Forbidden:

- lab values or raw lab rows
- doctor reports
- OCR output
- PDFs, filenames, paths, Drive links, Drive IDs
- symptom free text
- medication detail lists
- diagnosis text generated by JARVIS
- dynamic domain IDs or nested raw objects
- long free text

## ModuleSnapshot Mapping

JARVIS Overview maps Health to at most three KPIs:

- `Overall Health Risk`
- `Vascular risk`
- `Data freshness`

Attention items are short labels only, for example:

- `Health risk red: eye symptoms`
- `Vascular warning signs`
- `Lab trend stale`
- `Health dashboard unreachable`

## Health Dashboard Handoff

If a safe existing HealthManager dashboard can be served locally/Tailnet-only, JARVIS exposes only a link-only button:

- label: `Health Dashboard öffnen`
- Settings status: `configured_protected`

The dashboard itself may contain sensitive details. JARVIS does not parse or embed it.
