Skip to content
Gaia Cecchi

All work

Case study 02

HEART / DiDi

A privacy-first clinical AI assistant inside a hospital-wide smart-care ecosystem

Period
Ongoing research initiative
Context
HEART (Networked Ecosystem for eXplainable and Ubiquitous Smart-care), with deployment at Centro Chirurgico Toscano
Role
AI strategy, RAG design, and edge-cloud deployment requirements
+40%
comprehension of out-of-range values
2000/15
RAG chunk size / top-K for MedGemma

Problem

  • Patient safety depends on rigorous hygiene protocols (hand-washing) to prevent healthcare-associated infections — but compliance is hard to monitor.
  • After discharge, there is no transparent tool for monitoring surgical wounds, which leads to avoidable readmissions.
  • Traditional rule-based clinical decision-support systems generate too many false alarms, eroding clinicians' attention.

Target user

Clinicians and nursing staff at the Centro Chirurgico Toscano: surgeons and scrub nurses in the operating block, and the medical staff who query patient records — experts who need trustworthy answers with sources, not a black box that decides for them.

My role

Within the technology team I focused on the language-model side of the ecosystem (the computer-vision hand-washing monitoring was led by colleagues):

  • AI strategy and investigation — analyzing the use of models such as Gemini to integrate OCR directly into the system, simplifying the technology stack.
  • Requirements and deployment — defining the technical requirements for installation on the hospital’s server and contributing to the edge-cloud architecture design.
  • DiDi, the clinical assistant — prototyped on Lovable/Supabase, focused on privacy-first document processing and LLM-generated clinical summaries.

Process

  • Retrieval-augmented generation — a RAG system built on models such as MedGemma to query patients' clinical data.
  • Human-in-the-loop design — an interface that does not replace the clinician but stimulates critical thinking, following a dialogic AI framework aligned with the EU AI Act.
  • In parallel, the wider team implemented computer-vision monitoring of hand-washing (duration, soaping and rinsing phases) via cameras in the operating block.

Key decisions

  • Hybrid Edge+Cloud architecture: OCR and anonymization run locally to protect patient privacy, while Gemini powers the clinical chat.
  • RAG tuning for precision: a chunk size of 2,000 characters with 200 of overlap and top-K of 15 fragments, maximizing MedGemma’s accuracy without saturating memory.
  • Semantic boosting: clinical tags weighting related terms (e.g. +0.8 between “fever” and “hyperpyrexia”) to improve retrieval of relevant records.

Final result

  • Real-world monitoring data: most hand-washes last two to three minutes, against the five minutes recommended for the first wash — evidence the hospital can act on.
  • In one documented case, the AI acted as a neutral mediator in a therapeutic disagreement between clinicians, contributing to the correct treatment choice for a critical patient.
  • Rendering CSV data as natural language increased comprehension of out-of-range values by 40% in tests.

What I learned

  • Bias lives in the data model. Distinguishing professional roles (surgeon vs. scrub nurse) in the data was essential to avoid distorted performance statistics.
  • Experts accept AI that shows its sources. Always citing the clinical record or literature was the single biggest factor in the system’s credibility with senior staff.
  • Hospital-grade means load-tested. Blocking FastAPI endpoints are a real scalability risk with concurrent users; load testing is not optional in a clinical environment.