CarePath Flow
CarePath Flow
Personalize patient education with dynamic, interactive care flows. Boost compliance.
Small to medium-sized health practices (e.g., dentists, physiotherapists, dermatologists, mental health therapists) face a significant challenge in delivering personalized and effective patient education. Currently, staff spend 1-2 hours daily manually preparing and explaining pre/post-care instructions, often relying on generic, static PDFs or verbal communication. This leads to a high degree of patient forgetfulness and misunderstanding, resulting in patient compliance rates that hover around 60-70%. The lack of tailored instructions contributes to 10-15% avoidable follow-ups or re-explanations, consuming valuable staff time and practice resources. Existing EHR systems often provide static document uploads or cumbersome patient portals that lack dynamic, personalized instruction capabilities, leaving a critical gap for an agile, targeted solution.
CarePath Flow empowers health practices to create and automate dynamic, interactive patient education flows using an intuitive drag-and-drop builder. Practices can design conditional pathways based on patient input, treatment plans, or specific conditions, ensuring each patient receives highly relevant information. Core features include multimedia content embedding (text, images, video), conditional logic for personalized journeys, and automated delivery via secure, personalized email links. Patients access these flows on any device, guided through clear, actionable steps. The platform also provides real-time tracking of patient engagement, completion rates, and responses, giving practices insights into compliance and understanding. CarePath Flow moves beyond static PDFs to truly interactive, adaptive patient education, specifically designed for the niche of dynamic patient engagement flows, not a full EHR.
Tech Stack
System Architecture
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Client (Browser) āāāāāāāāāŗā Next.js App (Frontend & API Routes) ā
āāāāāāāāāāāāāāāāāāā ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā Client-side React UI ā ā Server Actions / ā ā
ā ā (Flow Builder, Dash) ā ā API Routes ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāāāāāāā
ā ā
ā ā¼
ā āāāāāāāāāāāāāāāāāāāā
ā ā Stripe (Payments) ā
ā¼ āāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāā
ā Supabase ā
ā (PostgreSQL DB, Auth)āāāāāāāāāāāāāŗāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāā ā Resend (Email) ā
āāāāāāāāāāāāāāāāāāāāDatabase Schema
CREATE TABLE organizations (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
name TEXT NOT NULL,
slug TEXT UNIQUE NOT NULL,
owner_id UUID REFERENCES auth.users(id) ON DELETE CASCADE NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE TABLE user_profiles (
id UUID PRIMARY KEY REFERENCES auth.users(id) ON DELETE CASCADE,
organization_id UUID REFERENCES organizations(id) ON DELETE CASCADE NOT NULL,
first_name TEXT,
last_name TEXT,
role TEXT DEFAULT 'staff' NOT NULL, -- e.g., 'admin', 'staff'
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE TABLE patients (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
organization_id UUID REFERENCES organizations(id) ON DELETE CASCADE NOT NULL,
email TEXT UNIQUE NOT NULL,
first_name TEXT,
last_name TEXT,
phone_number TEXT,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE TABLE care_flows (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
organization_id UUID REFERENCES organizations(id) ON DELETE CASCADE NOT NULL,
title TEXT NOT NULL,
description TEXT,
status TEXT DEFAULT 'draft' NOT NULL, -- 'draft', 'published'
created_by UUID REFERENCES auth.users(id) ON DELETE SET NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE TABLE care_flow_steps (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
flow_id UUID REFERENCES care_flows(id) ON DELETE CASCADE NOT NULL,
step_order INTEGER NOT NULL,
title TEXT NOT NULL,
content JSONB NOT NULL, -- e.g., {type: 'text', value: '...', media: 'url'}, {type: 'question', question: '...', options: [...]}
step_type TEXT NOT NULL, -- 'info', 'question', 'action'
next_step_id UUID REFERENCES care_flow_steps(id) ON DELETE SET NULL, -- Default next step
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE TABLE care_flow_conditions (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
flow_id UUID REFERENCES care_flows(id) ON DELETE CASCADE NOT NULL,
source_step_id UUID REFERENCES care_flow_steps(id) ON DELETE CASCADE NOT NULL,
target_step_id UUID REFERENCES care_flow_steps(id) ON DELETE CASCADE NOT NULL,
condition_logic JSONB NOT NULL, -- e.g., {type: 'response_value', step_id: '...', operator: 'equals', value: 'Yes'}
priority INTEGER DEFAULT 0,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE TABLE patient_care_flows (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
patient_id UUID REFERENCES patients(id) ON DELETE CASCADE NOT NULL,
flow_id UUID REFERENCES care_flows(id) ON DELETE CASCADE NOT NULL,
unique_link TEXT UNIQUE NOT NULL,
assigned_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
completed_at TIMESTAMP WITH TIME ZONE,
current_step_id UUID REFERENCES care_flow_steps(id) ON DELETE SET NULL,
status TEXT DEFAULT 'assigned' NOT NULL, -- 'assigned', 'in_progress', 'completed'
last_accessed_at TIMESTAMP WITH TIME ZONE,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE TABLE patient_care_flow_responses (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
patient_care_flow_id UUID REFERENCES patient_care_flows(id) ON DELETE CASCADE NOT NULL,
step_id UUID REFERENCES care_flow_steps(id) ON DELETE CASCADE NOT NULL,
response JSONB NOT NULL, -- e.g., {question_id: '...', answer: '...'}, {action_confirmed: true}
responded_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE TABLE subscriptions (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
organization_id UUID UNIQUE REFERENCES organizations(id) ON DELETE CASCADE NOT NULL,
stripe_customer_id TEXT UNIQUE NOT NULL,
stripe_subscription_id TEXT UNIQUE NOT NULL,
status TEXT NOT NULL, -- e.g., 'active', 'past_due', 'canceled'
plan TEXT NOT NULL, -- e.g., 'basic', 'pro'
current_period_end TIMESTAMP WITH TIME ZONE NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
CREATE INDEX idx_organizations_owner_id ON organizations(owner_id);
CREATE INDEX idx_user_profiles_organization_id ON user_profiles(organization_id);
CREATE INDEX idx_patients_organization_id ON patients(organization_id);
CREATE INDEX idx_care_flows_organization_id ON care_flows(organization_id);
CREATE INDEX idx_care_flow_steps_flow_id ON care_flow_steps(flow_id);
CREATE INDEX idx_care_flow_conditions_flow_id ON care_flow_conditions(flow_id);
CREATE INDEX idx_patient_care_flows_patient_id ON patient_care_flows(patient_id);
CREATE INDEX idx_patient_care_flows_flow_id ON patient_care_flows(flow_id);
CREATE INDEX idx_patient_care_flow_responses_patient_care_flow_id ON patient_care_flow_responses(patient_care_flow_id);
CREATE INDEX idx_subscriptions_organization_id ON subscriptions(organization_id);API Endpoints
/api/auth/registerRegisters a new user and creates an organization./api/auth/loginLogs in an existing user./api/orgs/:orgIdRetrieves organization details for the authenticated user./api/patientsRetrieves a list of patients for the authenticated organization./api/patientsCreates a new patient record for the organization./api/patients/:patientIdUpdates an existing patient record./api/flowsRetrieves all care flows for the authenticated organization./api/flowsCreates a new care flow (draft status)./api/flows/:flowIdRetrieves a specific care flow with its steps and conditions./api/flows/:flowIdUpdates an existing care flow, its steps, and conditions./api/flows/:flowId/publishPublishes a draft care flow, making it assignable./api/patients/:patientId/assign-flowAssigns a published care flow to a specific patient and sends the unique link./api/patient-flows/:patientCareFlowId/statusRetrieves the status and progress of a patient's assigned care flow./public/flow/:uniqueLinkPublic endpoint to retrieve the current step content for a patient's care flow./public/flow/:uniqueLink/submit-responsePublic endpoint for a patient to submit a response for a care flow step./api/stripe/webhookWebhook endpoint for Stripe events (e.g., subscription changes)./api/billing/create-checkout-sessionInitiates a Stripe checkout session for subscription.Start Building with AI
Copy this prompt for Cursor, v0, Bolt, or any AI coding assistant
BuilderDaily Team
VerifiedIndie hackers and full-stack engineers creating validated Micro-SaaS blueprints with production-ready tech stacks.
Related Blueprints
More Micro-SaaS ideas you might like to build
MediBrief AI
AI-powered clinical note summarization for healthcare professionals.
GreenPage Guardian
Monitor website efficiency, reduce digital carbon footprint, and display a verifiable green badge.
CodeSpark Embeds
Embed interactive, executable code sandboxes directly into your educational content.
Gap Alert
Today's gap expires in ~14 hours
Get tomorrow's blueprint delivered to your inbox so you never miss a profitable idea.
(Email delivery launching soon ā sign up to be first!)