Inspiration

At SOLFUL we work on the gap between the value a business offers and what its users actually experience. In healthcare that gap is enormous, and it is not a clinical failure — it is an operational one. Independent doctors are world-class specialists who received zero training in operations, patient retention or lifetime value.

We co-designed this with Dr. Veronica Quevedo, an ophthalmologist, in a Lean Inception and Service Blueprint workshop on May 24, 2026. She pointed at a problem no dashboard solves: patients leave her consultation with dilated, photosensitive eyes. They physically cannot read the prescription they were just handed. That is the exact moment treatment adherence collapses — and nobody was designing for it.

Our initial pitch can be watch in https://youtu.be/wc_UPdf8Co8?si=gHnVzwWWS2zbvrud

What it does

SOLFUL Med runs the administrative life of a private practice over WhatsApp, the channel patients already use.

Before the visit. A patient writes in plain language. The assistant asks for consent under Colombian Law 1581 before storing anything, understands the reason for the visit, and books a slot. No forms, no app to install.

During the visit. The doctor opens the patient and gets a 30-second Clinical Context Card: reason for visit, symptoms, relevant history, current medication, and critical alerts — synthesized by Gemini from years of unstructured notes. In production this takes 3.1 seconds. A real example from our seeded pilot data:

Alerts: Penicillin allergy · Must stop acetylsalicylic acid 7 days before surgery, subject to cardiology clearance

Those are the two things that must be known before walking into the room, extracted from free text nobody had time to reread.

After the visit. An event engine schedules the follow-up the practice never had time for: staged appointment reminders, symptom check-ins based on the criticality the doctor assigned, no-show recovery, and a readable summary of the consultation.

It is live. All seven WhatsApp message templates are approved by Meta, and real phones converse with the assistant today: Dr. Quevedo booked an appointment by simply chatting with it, end to end, with zero human intervention.

How we built it

Gemini is the reasoning layer, and it never sees a patient. That is the architectural core. Before any call to the model, clinical text passes through a masking layer that replaces every identifier with a stable anonymous token. A runtime guard then asserts no known PII survived the masking, and only then does the text leave our infrastructure. The response is re-identified locally. One command in our public repo proves it: the verification tool generates a real clinical card and asserts no residual tokens remain.

The stack: TypeScript end to end — Next.js 16 route handlers as the backend, BullMQ over Redis for the event engine, Prisma over PostgreSQL, Zod for fail-fast configuration, Vitest for tests. Deployed on Railway. WhatsApp integrates directly against the Meta Cloud API with no intermediary. Models: gemini-3.5-flash for both conversation and clinical synthesis, through the AI SDK.

A boundary enforced in code, not just in the prompt. The assistant is administrative and must never give medical advice. A last-line guard inspects every model response before it reaches the patient and blocks dosages, asserted diagnoses and treatment changes. A false positive costs warmth; a false negative would mean a machine practicing medicine.

Try it yourself — step by step

Live right now:

Run the whole system locally in ~5 minutes (Docker + Node 22 + a free Google AI Studio key):

git clone https://github.com/SOLFUL-SAS/SOLFUL-Med && cd SOLFUL-Med
git checkout development
cp .env.example .env          # paste your Google AI Studio key
docker compose up -d          # PostgreSQL + Redis
npm install && npx prisma migrate deploy
npx tsx prisma/seed.ts        # synthetic patients only — no real data
npm run dev                   # terminal 1: web + dashboard
npm run worker                # terminal 2: queue worker

Then verify our three claims yourself:

npm test                                                  # 208 tests
npx tsx tools/verify-pipeline.ts                          # privacy: no residual tokens
npx tsx tools/wa-simulator.ts --url http://localhost:3000 # chat as a patient

The simulator posts payloads in Meta's exact webhook schema through the real pipeline — queue, masking, Gemini, unmasking — so what you see is what a patient gets.

Challenges we ran into

Privacy that survives contact with reality. An audit found that our masking let names of three letters or fewer through — Luz, Ana, Eva — and that the guard meant to catch it had the identical blind spot. A length heuristic looked reasonable and was wrong; we replaced it with an explicit particle list.

Concurrency that only shows up under load. Four simultaneous patients produced a real double-booking. Counting rows to pick a free slot cannot work with concurrent workers: exclusivity now lives in the database as a partial unique index, with collision retry. Regression test: six concurrent patients, six distinct slots.

A model migration that silently disabled the AI. Gemini 2.5 stopped being available to new accounts mid-project. We moved to 3.x — and every response quietly became a fallback template: the 3.x models reason before answering, which took clinical synthesis past our timeout. The system degraded exactly as designed — coherent replies, no exceptions — and it was only visible in the worker log. A well-built fallback is also the thing that hides the failure from you.

Accomplishments that we're proud of

  • The privacy guarantee is testable, not a promise in a slide: one command proves no patient identifier reaches the model
  • Real patients, real operations: WhatsApp live with Meta-approved templates, and appointments booked with zero human intervention
  • Consent is real: nothing is stored before the patient authorizes it, and an ambiguous answer counts as refusal
  • 208 tests, with the rules engine at 100% coverage
  • Measured unit economics: US$ 0.02 per complete patient cycle (Gemini inference + WhatsApp messages)

What we learned

Independent practices do not need another dashboard. They need the operational work to happen without them.

Building for healthcare taught us that the dangerous failures are the quiet ones. A double-booking looked like a successful booking. A dead fallback looked like a working AI. A 24-bit patient token looked unique until we measured 13 collisions in 20,000 patients. Every one of those was found by testing against reality, not by reasoning about the code.

What's next

The pilot with Dr. Quevedo is underway — the templates are approved and she has already booked through the assistant. Next: the v1 consent text now in legal review under Colombian data-protection law, then a second practice, which requires the multi-tenant model we deliberately did not build for a single-practice pilot. Beyond that, the SOLFUL Care engine underneath is industry-agnostic by design.

Built With

Share this project:

Updates

posted an update

We have partnered with Dr. Veronica Quevedo, an independent specialist, as our co-design partner. Together, we conducted a Lean Inception workshop to align the patient journey with clinical realities and mapped out our MVP work plan. Dr. Quevedo's practice will serve as our launchpad, allowing us to deploy SOLFUL Med and test real patient scheduling and autonomous retention workflows directly in her clinic before the August 17th deadline.

Log in or sign up for Devpost to join the conversation.