Projects

Live demo

Patient Assessment. One form in place of three vendor questionnaires.

An in-house replacement for a third-party questionnaire vendor: a schema-driven patient assessment that produces a premium patient-facing PDF with a psychographic profile, routes copies to the right clinic's distribution list, and files itself into the patient's records folder.

Full-stack product · Psychographics 6 steps · synthetic data

Walk through it, six steps

Step 1 of 6

A personalized link, no login

The coordinator sends a signed link whose token encodes the location. The patient just opens it: no account, no password, and the form already knows which clinic's branding, questions, and distribution list apply.

Signed linkSynthetic data
$ /assess?token=eyJs…
token verified · location: Clinic A · schema v3
patient session created · progress auto-saves per section
Step 1 of 6

Every name, number, transcript and document in this tour is synthetic. The mechanisms, thresholds and architecture are real. The production system and its data stay private.

The problem.

Three near-duplicate questionnaires, one per location, ran on a paid vendor with no signed healthcare agreement. Staff screenshotted results into notes, hand-filed PDFs, and re-keyed lead sources into the CRM, several minutes of copy-paste per patient, with the interesting signal (how this patient decides) buried in raw answers.

  • Vendor replaced 3-in-1 one schema-driven form with location routing
  • Manual loop removed 0 re-keying email, filing, and routing are automatic
  • Questions 30+ with conditional logic and auto-save
  • Compliance CMEK + audit append-only audit log from day one

How it fits together.

4 layers, left to right
  1. Apps

    • pnpm monorepo: questionnaire app, staff app, PDF renderer
    • Next.js 15 + Tailwind + shadcn/ui
    • Shared schema, lib, and UI packages
  2. Pipeline

    • Signed location-encoded links, no patient login
    • Schema-version validation on submit
    • Playwright renders React templates to PDF
  3. Delivery

    • Patient email + per-location distribution lists
    • Records-folder filing with retry queue
    • Report regeneration feedback loop
  4. Platform

    • Firestore + Cloud Storage + Firebase Auth
    • CMEK, append-only audit log
    • Keyless deploys via Workload Identity Federation on version tags

Where it landed.

One schema-driven system replaced three vendor questionnaires and an entire manual routing ritual, and turned raw answers into a document staff actually use in the consult room. The honest boundary is stated in the product itself: this phase produces context and a risk score, never a diagnosis or treatment recommendation. The patient and profile shown here are entirely synthetic.

Concepts

Schema-driven formsConditional logicLLM profile synthesisPDF rendering pipelinesMonorepo architectureHIPAA-minded design

Stack

Next.js 15TypeScriptTailwind + shadcn/uiFirestorePlaywright PDF renderingVertex AICloud RunTerraformWorkload Identity Federation