A cross-institutional patient memory layer. Scattered fragments (notes, labs, prescriptions, voice notes, scans) become one queryable timeline that any participating hospital can read from.
01
The problem
Patients in under-resourced systems see a different provider almost every visit. Their history lives in fragments across clinics, on paper, in voice notes and photos, and nobody holds the whole story. Every new clinician starts from zero.
Who it’s for
Clinics and hospitals that share patients but not records, and the patients who get lost between them.
02
Goals & constraints
Goals
- Log a fragment at Hospital A; ask about it in plain language from Hospital B, and get a sourced answer.
- Accept any format: typed notes, voice, scanned documents.
- Surface disagreements between records instead of silently merging them.
Constraints
- One-week hackathon
- Cognee is a Python package; the rest of the stack is TypeScript
- A live demo that can’t afford to break
03
Approach
- 1.
Three services, one job each
React talks to an Express + Prisma backend, which talks to a small FastAPI service. That service is the only place in the codebase that imports Cognee.
- 2.
Cognee does the reasoning
Fragments are ingested per patient with cognee.add() and cognify(), and natural-language questions are answered with graph-completion search. That’s what makes the cross-hospital moment real, not scripted.
- 3.
Capture any format
Voice notes are recorded in the browser and transcribed with Groq Whisper; scans are read with Gemini. Both return editable text before anything is committed.
04
Architecture
A thin Python service wraps Cognee so Node never shells out to Python.
- 01React + Vite (timeline, knowledge graph, conflicts, proof)
- 02Express + TypeScript + Prisma → Neon Postgres (Patient → Visit → Fragment)
- 03Express → FastAPI cognee-service → cognee.add / cognify / search
- 04voice → Cloudinary + Groq Whisper · scans → Cloudinary + Gemini 2.5 Flash
- 05graph view rendered with d3-force from Postgres relationships
05
Key decisions
Render the graph from Postgres, reason with Cognee
Cognee’s internal graph export varies across versions, which is fragile for a live demo. The picture comes from our own data; the reconciliation and answers come from Cognee.
No ‘hide this from other providers’ toggle
Selective hiding is a treatment risk in a system clinicians act on. Consent here means consent to be in the network.
Honesty notes in the README
Login is a demo identity, conflict detection is a simple heuristic, and the proof page is a browser SHA-256 hash, not a ledger. Saying so up front is part of the design.
!
Challenges
A moving API surface
Cognee’s API was evolving during the hackathon, so the service pins its calling convention and documents exactly where to adjust.
Sensitive categories
Mental health, reproductive health and HIV status are flagged visibly; real enforcement needs consent workflows beyond a hackathon.
✓
Outcome & lessons
- Submitted to the WeMakeDevs × Cognee hackathon with a live deployment and demo video.
- Aligned with SDG 3: continuity of care across fragmented systems.
What I learned
- Knowledge graphs fit medical history better than tables.
- Writing down what’s wired vs. verified builds more trust than polish.
What’s next
- Real auth with break-the-glass emergency access
- Render Cognee’s own graph once its export stabilises