AI medical audit for breast cancer screening compliance. Compares patient EHR data to clinical guidelines (BI-RADS follow-up, screening intervals) and produces structured audit reports with findings, evidence, and corrective actions. Clinicians use the web UI to run and review audits; Celery Beat runs daily scheduled audits for due patients.
| Layer | Technology | Role |
|---|---|---|
| Frontend | React, Vite, shadcn | Dashboard, jobs, reports, annotations. Served via nginx. |
| Backend | FastAPI, Celery | Auth, jobs (single/batch), audit reports, annotations. Workers run the audit pipeline; Beat runs scheduled audits. |
| Data | PostgreSQL, Redis, ChromaDB | Users, jobs, audit_reports, annotations; Celery broker; RAG over docs/Medical_KB. EHR from ehr service or local files. |
| AI | MedGemma / Gemini / OpenAI | Pluggable audit engine; LangGraph pipeline: fetch EHR → RAG → AI report. |
- Docker and
Docker Compose v2
- On Ubuntu/Debian:
sudo apt install docker-compose-v2
- On Ubuntu/Debian:
The demo uses a FHIR API at http://localhost:9080.
If you do not have a FHIR API server but wish to test, see the instructions in ehr/README.md.
-
Copy
.env.exampleto.envand set required variables (at leastJWT_SECRET_KEY; for AI setAUDIT_AI_PROVIDERand the matching keys: Gemini, OpenAI, or MedGemma/Vertex). -
From project root:
docker compose up --build
-
Open http://localhost
-
Sign in using "chief@medarmor.com" with the credentials in
backend/app/core/database.pyfor that user.
- Backend:
backend/— FastAPI; run withuv run uvicorn main:app --reloadfrombackend/(seebackend/README.md). - Frontend:
frontend/— Vite HMR; run withpnpm dev(seefrontend/README.md). - EHR service:
ehr/— patient list and bundle API; in Docker it runs as a separate container.
- http://localhost → nginx → frontend (static) and
/api→ backend (FastAPI). - Backend talks to: PostgreSQL (medaudit_db), Redis (Celery), ChromaDB (RAG volume), EHR service (port 8001).
- Worker / Beat use the same image as the backend with different commands.
- Branches:
main(production),develop(integration). Usefeature/frontend/...orfeature/backend/...for work. - Commits: Use Conventional Commits (
feat:,fix:,docs:, etc.).