Inspiration

Canadians are no strangers to pain.

According to the Canadian Chiropractic Association report All Pain, No Gain: Shining a Light on Canada's Back Pain and Opioid Crisis, almost 90 percent of Canadians have experienced muscle or joint pain in the last year, with back pain and headaches being the most common.

Pain often begins with everyday activities such as:

  • sitting at a desk for long hours
  • lifting heavy objects
  • repetitive strain
  • even sleeping posture

When pain first appears, people often ask themselves the same questions.

Is the pain serious?
Should I rest or stretch?
Do I need a specialist?
Is treatment covered by my insurance?

Without clear guidance, many people end up guessing. Some search the internet for advice. Others ignore the pain until it becomes worse.

When patients finally visit a healthcare professional, they often struggle to explain what actually happened.

  • When did the pain start?
  • Where exactly does it hurt?
  • How severe is it?
  • What activities made it worse?

Doctors frequently receive incomplete information. This slows diagnosis and treatment.

The core issue is simple.

People experiencing muscle and joint pain lack structured guidance and symptom tracking before they reach a healthcare professional.

Source:
The Pain Problem: Spine, Muscle and Joint Pain


What it does

FlexCare is an AI-powered recovery assistant that helps people understand muscle and joint pain, track symptoms, get safe guidance, and build a clear picture of their history so they can have better conversations with doctors.

Users tap an interactive body map (front and back, male or female) to choose where it hurts and rate severity from 1 to 10. They can add duration, triggers, and a short description. The system records pain locations, intensity, and context.

Behind the scenes, a multi-step AI pipeline runs: an assessment agent summarizes symptoms and risk level; a safety agent checks for red flags (e.g. numbness, loss of function, recent trauma). If it's safe to continue, a recovery agent suggests personalized steps and precautions; otherwise a referral agent recommends a care type (e.g. physiotherapy, chiropractic, massage) and when to seek it. Users always see a short "Why this recommendation" so the logic is transparent.

When the recommendation is recovery

FlexCare suggests numbered actions (stretches, posture, rest) and guided exercises—for example bodyweight squat, cat–cow, and chin tucks—with step-by-step instructions. Users can record themselves doing an exercise for future form feedback. Precautions are listed so people know what to avoid.

When the recommendation is referral

Users see why that type of care was suggested and a list of providers (with recommended match, direct billing, languages). They can choose their insurer and plan; FlexCare then shows an estimate of what their plan covers (e.g. 70%) and what they pay out of pocket, and offers short AI explanations for "Why this provider?" and "Why not?" so they can compare options. Optional health and insurance details in their profile can prefill this flow.

Symptom history is kept in a structured format (locations, levels, dates, notes) so users—and, if they choose to share it, their doctor—have a clear timeline instead of relying on memory.

The goal is simple: help people move from pain to the right care.


How we built it

FlexCare is a React (Vite) + Tailwind frontend and a FastAPI (Python) backend. The body map uses react-muscle-highlighter for front/back and male/female views; taps and sliders capture regions and pain levels (1–10). Optional profile and insurer/plan data are stored per session and used to tailor recommendations and referral content.

The backend runs a linear AI pipeline powered by Gemini (via Railtracks): AssessmentSafetyRecovery or Referral. Each step returns structured output (symptom summary, risk level, red-flag decision, actions, or referral type and reason). The safety step explicitly decides: safe to continue, recommend professional care soon, or recommend urgent care. That gate determines whether the user sees recovery guidance or referral and timing.

Recovery content includes a fixed set of guided exercises (id, name, instructions) served from the API; the frontend can fetch and show them and support "Record & get feedback" for later form analysis. Referral data (providers, insurers, plans) lives in JSON/CSV; cost estimate is computed from plan benefits and provider fees (coverage_percent, you_pay, etc.); explain is a separate Gemini call that gets plan + optional provider and returns plain-language "why this fits" or "why not," including "plan covers X%; you pay the rest." The UI is built so users can describe symptoms and compare providers without medical knowledge, with disclaimers that FlexCare supports decisions and education and does not replace professional care.


Challenges we ran into

One challenge was designing a system that gives useful guidance without sounding like a medical diagnosis. We wanted to support decision-making and education, not replace a clinician. Clear disclaimers and framing ("why this recommendation," "when to seek care") were important.

Another was structuring symptom and referral information so it's simple for users (body map, a few fields, one referral block) but still useful for providers and for coverage logic. We had to balance detail in the pipeline with clarity in the UI.

A third was explainability: making "why recovery" vs "why referral" and "why this provider" vs "why not" concrete and trustworthy. We used structured prompts and plan/provider data so the AI could refer to coverage percent, out-of-pocket cost, and provider attributes (e.g. direct billing, languages) instead of vague advice.

Balancing usability, safety, and clarity was a central design focus throughout.


Accomplishments that we're proud of

We built an end-to-end flow from "where it hurts" to either safe recovery steps or referral with provider and coverage context.

  • Multi-agent pipeline with a dedicated safety step and clear recovery vs referral path.
  • Transparent recommendations: users see "Why this recommendation" for every result.
  • Guided exercises (e.g. squat, cat–cow, chin tucks) with instructions and a path to record for form feedback.
  • Referral and coverage: provider list, insurer/plan selection, cost estimate ("plan covers X%; you pay the rest"), and per-provider "Why?" / "Why not?" powered by the same plan and provider data.
  • Structured symptom history (locations, levels, triggers, duration) so users have a clear timeline and can reference or share it with a doctor.
  • Profile-aware flow: optional health and insurance details that prefill referral and improve relevance.

We're proud that the platform focuses on better information—for the user and for the healthcare provider—and on right care, right time.


What we learned

We learned that structured information is critical in healthcare. Even simple, consistent symptom tracking (where, how bad, when, what helps or worsens) can improve conversations between patients and doctors.

We also learned how many important decisions happen before someone sees a professional. Giving clear, safety-gated guidance in that window can help people choose rest, exercise, or referral more confidently and avoid worsening conditions.

Finally, we saw how AI can support assessment, safety checks, recovery suggestions, and referral explanation without replacing judgment—especially when the system is explicit about "why" and about coverage and out-of-pocket cost.


What's next for FlexCare

Possible next steps:

  • Wearables and posture: activity and posture tracking to enrich symptom context.
  • Deeper exercise library and form feedback: more exercises and real form analysis from recorded video.
  • Provider and benefits integration: live provider networks and real-time coverage checks.
  • Shareable report: export or share symptom history and recommendations in a format doctors can use easily.

The long-term vision is a system that helps people navigate pain, recovery, and healthcare decisions with confidence and improves the flow of information between patients and providers so more people reach the right care at the right time.

Built With

Share this project:

Updates