Inspiration

If you have ever been to an emergency room, you know the part nobody puts on the brochure. You walk in scared. You fill out a clipboard. You wait. And if your English is shaky, you wait longer and get taken less seriously. That is not a vibe, it is in the data: in big-city EDs, roughly one in five patients has limited English proficiency, and those patients get under-triaged.

The nurse is not ignoring you. They are buried. Registration, intake forms, and re-typing things the hospital already knows all happen before anyone clinical actually looks at you. That stretch between walking through the door and a clinician understanding your case is dead time. In an emergency, dead time is dangerous.

We wanted to delete that gap. Not with another tablet bolted to a wall, but with the one device every patient already has in their pocket.

What it does

Solace runs the intake and triage that normally happens at the front desk, except it happens before the patient sits down.

Patient side: you scan a QR code in the waiting room. No app, no account, no download. You speak your symptoms out loud in your own language, and Solace handles more than 20 of them. Snap a photo of a cut or your insurance card if you want. About seven seconds later you hear a calm voice, in your language, telling you your triage level and what to expect. If your pain spikes while you wait, one button lights up the clinician's board.

Clinician side: by the time the patient is roomed, the care team already has a full pre-brief. A provisional ESI acuity level. A plain-English reason for that score, pulled straight from the model's SHAP attributions. A confidence interval from conformal prediction, so the model can say "I am not sure" out loud instead of faking certainty. Matched EHR records with allergies, meds, conditions, and prior visits merged in. And a one-click scribe draft so the note half-writes itself. Bedside vitals feed back in and the acuity updates live.

There is also a phone line. Patients who cannot use the QR can call a Twilio voice agent that handles triage questions, books appointments, answers FAQs, and escalates to a human or to 911 when it has to.

The part we are proudest of is the part you do not see: every step is wrapped in real HIPAA-grade security, and the AI is built to be honest about what it does not know.

How we built it

The product is three pieces that run on their own.

The patient and clinician app is React 18, TypeScript, Vite, Tailwind, and Framer Motion, with a hand-written WebGL hero and an accessibility pass we actually took seriously (hundreds of focus-visible targets, live regions for screen readers, right-to-left support where languages need it).

The backend is FastAPI on AWS Lambda, packaged as an arm64 container, sitting behind API Gateway, CloudFront, and a WAF. It scales to zero and back without us babysitting a server.

The brain is the triage model, and this is where we went deep. It is a 4-model stacked ensemble: LightGBM, XGBoost, CatBoost, and a neural net, each trained with 5-fold cross-validation and stacked through a logistic-regression meta-learner. We tuned the ordinal decision thresholds with differential evolution plus Nelder-Mead, then wrapped the whole thing in split-conformal calibration so every prediction ships with a real 90 percent coverage interval. The explanations come from LightGBM pred_contrib, so the SHAP values a clinician sees are the model's actual internals, not a decorative bar chart. That ensemble is live in production right now. Hit the health endpoint and it reports trained_ensemble, not a simulation.

On top of the model sits a deterministic safety floor. The model is trained on synthetic data, so we never let it have the last word on a life threat. A rule layer can only raise acuity, never lower it, so a stroke or sepsis signal bumps a patient up no matter what the probabilities say.

The AI services route through Claude for the triage narrative, the scribe, the pre-brief, and insurance-card vision, with AWS Transcribe for speech in and AWS Polly for the voice out. Before any text leaves our perimeter for an AI provider, a content guard strips out 18 HIPAA Safe Harbor identifiers.

Security here is code, not a slide. One customer-managed KMS key encrypts DynamoDB, S3, and Secrets Manager. TLS 1.2 or higher everywhere. Audit logging is dual-written, 90 days hot and 6 years cold. There is brute-force lockout, identity-keyed rate limiting, prompt-injection scanning, and SMART-on-FHIR with PKCE so clinicians sign in with their real Epic, Cerner, or Athena credentials. The entire stack is provisioned by 28 idempotent scripts, so it rebuilds from scratch with a handful of commands.

Challenges we ran into

Keeping the model honest was the real fight. Train on synthetic emergency data and the model looks brilliant on paper, then gets cocky in the wild and quietly defaults everyone to the middle of the scale. The fix was not a fancier model, it was admitting the limit and building a guardrail that can only fail safe.

Train-serve parity ate a lot of hours too. The features the model sees during training and the features it sees inside a Lambda have to match exactly, down to how we encode the arrival hour and which keywords we flag, or the predictions drift without telling you. We built the inference path to re-derive the identical feature set every single time.

And pulling all of this off with no server was its own puzzle. Running customer-managed keys, multi-year audit trails, and OAuth state that survives cold starts on top of functions that vanish between requests took real care.

Accomplishments that we're proud of

The explanations are real. A clinician gets the model's actual reasoning plus a confidence interval that admits doubt, not a black box.

The security is real. We did not stamp "HIPAA-ready" in a footer and call it a day. Encryption, audit retention, redaction, and access control are written into the code and reproducible from scripts.

And the patient experience holds up for the person who needs it most: stressed, in pain, maybe not a native English speaker, holding nothing but their own phone.

What we learned

The hard problem in clinical AI is not accuracy, it is trust. A model that is right most of the time but cannot tell you when it is unsure is useless to a doctor with a license on the line. The moment we started treating uncertainty as a feature instead of a flaw, and paired the model with rules that can only fail safe, the whole thing started to feel like something a real department could actually pick up and use.

What's next for Solace

A clinical validation study on real records instead of synthetic ones. Write-back to the EHR, since today we mostly read. Multi-tenant onboarding so a new hospital can spin up on its own. And a serious look at the regulatory path, because a model that suggests acuity is plausibly Class II clinical decision support, and we want to walk that road properly with a clinician always in the loop.

Built With

Share this project:

Updates