top of page

Letting Data Speak, AI Act!

Case Study

Clinical Application for Tracking and Managing Autoimmune Diseases

A digital health startup founded by a product leader with deep operational experience at Shopify where she generated $850M in revenue, led teams of 700+, and helped sell a $2B business unit. She personally manages a chronic condition and has tracked daily with wearables for 8 years, making her both the builder and the customer.

The company is building the missing intelligence layer for patients living with Multiple Sclerosis, Rheumatoid Arthritis, and Lupus aggregating signals from wearables, daily check-ins, and labs to detect health drift before flares occur and deliver personalized actions that help patients stabilize before symptoms escalate.

About the Client

A digital health startup founded by a product leader with deep operational experience at Shopify where she generated $850M in revenue, led teams of 700+, and helped sell a $2B business unit. She personally manages a chronic condition and has tracked daily with wearables for 8 years, making her both the builder and the customer.

The company is building the missing intelligence layer for patients living with Multiple Sclerosis, Rheumatoid Arthritis, and Lupus aggregating signals from wearables, daily check-ins, and labs to detect health drift before flares occur and deliver personalized actions that help patients stabilize before symptoms escalate.

Untitled design - 2024-09-27T104509.589.png

Challenge

Patients managing MS, RA, and Lupus were generating hundreds of data points daily through wearables — sleep, HRV, heart rate, activity yet still had no way to answer: "Did yesterday's decisions actually help? What should I change today?" The intelligence layer was missing.


Every other domain where data drives outcomes already had this layer. Finance had Mint. Logistics had Route. E-commerce had Shopify. But chronic care patients were left manually correlating fragmented data, experimenting through trial and error, and learning after flares happened instead of catching them early.


Three structural thresholds had just crossed simultaneously:

  • Wearables reached ubiquity among people managing chronic illness — Apple Watch and Fitbit were mainstream.

  • AI could now reason across individual, longitudinal time-series data rather than population averages.

  • Chronic conditions had outpaced clinical capacity — 60% of Americans had at least one chronic condition, while the average doctor visit lasted under 20 minutes.


Generic wellness tools failed this population entirely — offering population-level advice irrelevant to MS, RA, and Lupus patients, tracking data reactively after flares rather than detecting drift beforehand, and surfacing insights without actions.

Untitled design - 2024-09-27T105551.128.png

Key Results

  • Eliminated fragmented health tracking by integrating wearable and manual inputs into a unified pipeline, enabling consistent capture of 14+ biometric and behavioral metrics per user per day

  • Improved data reliability and continuity with automated device registration and reconnection logic, ensuring seamless ingestion even during intermittent sync failures

  • Built a large-scale disease intelligence base by analyzing 10,000+ patient discussions across Multiple Sclerosis, Rheumatoid Arthritis, and Lupus cohorts

  • Enabled personalized patient insights from day one by combining AI with community data, delivering context-aware recommendations during onboarding

  • Accelerated patient understanding of disease patterns through quantified insights (e.g., prevalence trends with confidence scores), reducing reliance on trial-and-error decision making

  • Delivered a scalable backend foundation with 30+ production-ready APIs, supporting full lifecycle workflows from onboarding to long-term health monitoring

Solution

This is the alpha version of Theme Health, focused on the data collection phase. The core of this release establishes the foundational infrastructure for capturing, storing, and beginning to make sense of patient health data across MS, RA, and Lupus.


1. Onboarding & Health Profile Setup The onboarding flow captures a patient complete health baseline without requiring clinical credentials. The API covers diagnosis timeline, primary and secondary condition selection, medication mapping with real side-effect statistics drawn from existing user data, symptom baselines, flare frequency history, demographics, and wearable device preferences. Race conditions on account creation are handled gracefully, profile completion scores are initialized (35–40% at baseline), and default user preferences are seeded — ensuring a clean, fully initialized profile on first login.

At the end of onboarding, the /community_insight endpoint fires — querying community posts and extracted entities for the user's condition and medications, passing the data to Claude AI, and returning a personalized community insight with cohort size and confidence level (e.g., "Many people with MS on Methotrexate report that fatigue peaks in the first few weeks. Most find it stabilizes after 2–3 months."). This gives every new patient immediate, relevant context before they've logged a single check-in.

2. Daily Check-In — The Core Data Collection Engine The daily check-in is the heartbeat of the data collection phase. Each submission via POST /v1/checkin/daily captures:

  • Energy level, and severity scores for Pain, Stress, Fatigue, and Brain Fog

  • Comparison to baseline ("about the same", "worse", "better")

  • Triggers — both from a condition-scoped master list and free-text custom triggers created by the user

  • Medication adherence status

  • Additional symptoms beyond the four static ones, including custom symptom names

  • Time-of-day context (morning, afternoon, evening) derived from the client-side timestamp in the user's local timezone

Every submission returns a motivational message, the user's current consecutive day streak, and asynchronously fires a background insight generation job — so AI processing never blocks the response. A companion Boost Accuracy flow (GET/POST /v1/checkin/boost-accuracy) incrementally captures activity level, age range, region, and work status, pushing profile completion toward 100% over time.

3. Flare Reporting The POST /v1/flare/report endpoint captures disease exacerbation events with structured severity scoring (mild = 3, moderate = 6, severe = 9), relative start date resolution, full symptom and trigger logging, and a supportive message generated from the patient's personal flare history. If notifications are enabled in Supabase user preferences, a follow-up check-in is automatically scheduled 4 hours post-report. Flares are tagged as user_reported in the flare_history table — laying the groundwork to distinguish self-reported events from algorithm-detected drift events in future releases.

4. Apple Watch & Fitbit Data Ingestion The POST /v1/wearable/data endpoint accepts 14 biometric metrics per submission from Apple Watch and Fitbit — HRV, resting heart rate, sleep duration and efficiency, deep/REM/light/awake sleep stages, steps, active calories, SpO2, respiratory rate, and exercise type. All data is persisted in Supabase across wearable_device_master and wearable_data_points tables. Device management is fully automated: new devices register on first submission, previously disconnected devices reactivate without data loss, and users can toggle connection status via PUT /v1/wearable/connection or retrieve their full device history via GET /v1/wearable/devices.

5. Personalized Community Insights at Onboarding The /community_insight endpoint is the alpha's first AI-powered feature. It accepts the user's condition and medication list as query parameters, queries the extracted_entities tables for community-sourced discussions relevant to that profile, and passes the data to Claude AI to generate a personalized insight. The response includes the insight text, cohort size, and a confidence level (low / medium / high). This is the first moment a patient sees that the platform knows something specific about people like them — before they've contributed any data of their own.

6. Drift Detection — Laying the Early Warning Foundation The GET /v1/drift_detection endpoint runs z-score analysis against each user's personal Supabase-stored baseline. For each metric — energy, stress, fatigue, pain, brain fog — it computes the user's personal mean and standard deviation across all historical check-ins, then calculates the z-score for the most recent day. Energy is flagged at z < -2.0 (significant decline); all other metrics are flagged at z > +2.0 (significant spike). Human-readable descriptions are returned for every flagged metric. In this alpha phase, this endpoint establishes the statistical foundation for the proactive flare prediction layer planned for the next release.



Untitled design - 2024-09-27T104509.589.png

Technologies Used

  • Supabase — PostgreSQL database with JSONB columns for health metric storage (daily_metrics, llm_output), audit logging (user_consents with IP and user-agent), pre-computed community stats (condition_community_stats), and wearable time-series data

  • RESTful API — 30+ endpoints across onboarding, check-in, flare, wearable, drift detection, insights, dashboard, and settings

  • JWT Authentication — Token-only tier for onboarding (no profile required yet) and Full Auth tier for all active user endpoints

  • Anthropic LLM — Community insight generation at onboarding via /community_insight, synthesizing data with user condition and medication profile

  • Z-Score Statistical Engine — Personalized drift detection using individual Supabase-stored baselines

  • Apple Watch & Fitbit — 14 biometric metrics per submission with automated device lifecycle management

  • Background Task Queue — Asynchronous post-check-in insight jobs (run_post_checkin_insight_job) and notification backfill that never block user responses

  • Notification System — Timezone-aware scheduling with quiet hours, low-capacity mode, and flare follow-up scheduling

Other Case Study Items

Revolutionizing Personal Loans with AI-Driven Underwriting

Revolutionizing Personal Loans with AI-Driven Underwriting

A leading Indian personal loan provider revolutionized their underwriting process by leveraging AI and machine learning to automate 80% of loan decisions. By integrating social and financial data into a sophisticated predictive algorithm, the company drastically reduced decision times to seconds expanded access to underserved segments, and achieved lower default rates compared to human underwriters.

Artificial Intelligence - Powered Tyre Dimension Extraction System

Artificial Intelligence - Powered Tyre Dimension Extraction System

JashDS developed an AI-powered computer vision system for a leading automotive e-commerce platform, enabling accurate extraction of tire dimensions from images. The solution, which increased conversion rates by 25% and reduced customer support inquiries by 80%, utilized advanced technologies such as YoloV8 for instance segmentation and custom-designed augmentation techniques to simplify the online tire purchasing process.

Enhanced Jira Data Analysis for Strategic Insights

Enhanced Jira Data Analysis for Strategic Insights

JashDS developed a flexible framework for analyzing Jira project data that is capable of handling varying export structures and custom fields. The solution leveraged GenAI and LLM technologies to provide actionable insights, identify productivity trends, and uncover potential risks across diverse software projects, resulting in a ___% improvement in team efficiency and a ___% increase in successful project outcomes.

bottom of page