Projects

Guided tour

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, transcript and document in this tour is synthetic, and so are the numbers on the sample screens. The numbers under The problem and Where it landed are real. The production system and its data stay private.

The problem.

Three near duplicate questionnaires, one per location, ran on a paid vendor. Staff filed each report by hand 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 Auto filed email and location routing
  • Questions 30+ with conditional logic and auto-save
  • Clinic email 2 of 2 reports ready before the clinic email goes

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
    • Audit log that only appends
    • 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 for 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 architecture

Stack

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