# CareBridge AI

ONE Light Analytics healthcare administrative operations demonstration. CareBridge Clinic is fictional. Its synthetic records include 24 appointments, five provider availability windows, five rooms and six invoices. No patient names, contact details, diagnoses or clinical notes are used.

## Run and deploy

Python 3.11 or later:

```sh
python -m pip install -r requirements.txt
python -m streamlit run streamlit_app.py
```

Deploy in its own `carebridge-ai-demo` repository, branch `main`, main file `streamlit_app.py`. Suggested Streamlit subdomain: `carebridge-ai-demo`, subject to availability. Configure `GEMINI_API_KEY` or `GOOGLE_API_KEY` privately in this app's Secrets or environment. Never commit keys. Scenario mode needs no key. The default provider model is `gemini-3.5-flash-lite`; `GEMINI_MODEL` overrides it.

## Explore

Ask for the clinic administrative briefing, waiting and arrival reviews, room readiness or billing follow-up. Read the labelled Evidence desk. As operations manager or front desk, prepare appointment `CB-A015` for `2026-10-10T13:00:00+01:00` in Action Lab. Review and explicitly confirm the session-only simulation. Inspect Audit trail. Reminder drafts are never sent.

## Definitions and baseline

Fixed clock: 10 October 2026, 10:00 WAT. Appointment counts reconcile to 8 completed + 6 checked in + 8 scheduled + 2 cancelled = 24. Three checked-in visits have elapsed waiting over 30 minutes. Two past appointments remain Scheduled and require arrival-status review; they are not confirmed no-shows. Two rooms are recorded available. Outstanding balances are ₦70,000, including ₦55,000 past the recorded due time. Balance equals invoiced amount minus paid amount.

These figures are synthetic starting conditions, not achieved client results. Waiting time is administrative elapsed time, not clinical acuity or triage. Billing does not determine access to care. Recorded availability does not guarantee a service can proceed.

## Controlled actions

Proposals require the front-desk or operations-manager role and a Scheduled appointment. New times require Lagos timezone +01:00, must be after the fixed clock, fit entirely in the provider window, and avoid provider appointment overlaps. Confirmation rechecks role, revision and proposal fields. Stale and tampered proposals are rejected. Audit records preserve before/after booking time. State is private to the Streamlit session; reset discards changes. The model can read, draft and propose but cannot commit.

Demo roles are not production authentication. No clinical recommendations, diagnoses, treatment, patient messaging, payment collection or real bookings are implemented. A production system would require approved integrations, real identity and permissions, verified availability, patient agreement, appropriate data governance and durable auditing.

## Verify

```sh
python -m unittest test_operations.py
python test_agent.py
python test_app.py
```

Tests cover reconciled counts, billing permissions, unsent drafts, coherent provider slots, overlap and time-window rejection, explicit confirmation, stale/tampered proposals, audit records, readable UI, role isolation and reset. Provider wiring uses a mock; a separate deployed Live AI check is required.
