Inspiration

A medical consultation does not end when the patient leaves the clinic.

Recommendations may be forgotten, symptoms can change, and patients may need another appointment before anyone from the care team knows. Clinics often handle this gap through manual calls, disconnected notes, or no follow-up at all.

I built CareLoop AI to turn consented post-consultation phone calls into structured, reviewable actions for clinical teams.

What it does

CareLoop AI helps a clinic coordinate the period between a consultation and the next human decision.

Clinical staff can:

  • Register patients and their explicit consent for automated calls
  • Record previous consultations and doctor recommendations
  • Schedule post-care follow-ups
  • Start a real or simulated CALL-E call
  • Review structured outcomes and call transcripts
  • Detect appointment requests or unresolved concerns
  • Escalate new or worsening symptoms for human review
  • Monitor follow-up activity from a unified dashboard

CareLoop does not diagnose patients, change prescriptions, or replace clinical judgment. It collects patient-reported information and routes it back to responsible clinical staff.

How it works

  1. A clinician records consultation notes and recommendations.
  2. Staff schedules a follow-up only after the patient has consented.
  3. CareLoop sends CALL-E a safety-bounded calling task.
  4. CALL-E conducts the conversation and returns the result.
  5. CareLoop validates and stores the canonical result.
  6. The patient timeline is updated with the summary, transcript, outcome, care rating, and appointment request.
  7. New symptoms, worsening conditions, or inconclusive outcomes create a human-review alert.

The application also includes a safe mock provider and reproducible fictional data, allowing the complete workflow to be demonstrated without contacting a real person.

How I built it

CareLoop AI is a responsive full-stack application built with:

  • Next.js 16 and React 19 for the application and server routes
  • TypeScript for strongly typed application logic
  • Supabase PostgreSQL for clinical workflow data
  • Supabase Authentication for user sessions
  • Supabase Row-Level Security for account-level data isolation
  • CALL-E Developer API for live AI phone calls
  • Verified webhook processing for call results
  • Tailwind CSS for the responsive interface
  • Recharts for operational insights
  • Vercel for deployment
  • Vitest and Playwright for automated testing

CALL-E credentials and Supabase server credentials remain server-side. The browser only receives public configuration and readiness indicators.

CALL-E integration

CareLoop uses a provider-neutral call interface. Mock mode is enabled by default, while real CALL-E calls require an explicit configuration change, a valid E.164 phone number, and recorded consent.

The CALL-E task identifies itself as automated and asks structured questions about:

  • Recommendation follow-through
  • Changes in the patient’s condition
  • New symptoms
  • Appointment needs
  • Overall care experience

Incoming webhook data is not trusted directly. CareLoop validates the event and retrieves the canonical call result from CALL-E using server-side credentials before storing it.

Challenges I faced

One major challenge was designing an AI calling workflow that remained useful without making unsafe medical claims.

Another challenge was handling the asynchronous nature of phone calls. A call can be accepted immediately, but its final transcript and structured result arrive later. CareLoop therefore separates call initiation from result processing and updates the timeline when the verified result becomes available.

Outbound calls to Argentina were temporarily restricted during final testing. I used CALL-E’s official U.S. test hotline instead. The call was successfully accepted and completed, but the hotline was another automated assistant rather than a patient. CareLoop correctly classified the outcome as inconclusive and routed it for human review.

This limitation became a valuable test of the application’s safety behavior.

Accomplishments that I am proud of

  • Completed a real CALL-E API integration
  • Converted a phone-call result into a structured patient timeline
  • Implemented consent checks before scheduling and starting calls
  • Added human escalation for uncertain or concerning outcomes
  • Protected clinical records with Supabase Row-Level Security
  • Kept API keys and private credentials outside the browser
  • Created a reproducible fictional demo mode
  • Built responsive views for desktop, tablet, and mobile
  • Added automated unit, integration, and end-to-end tests
  • Provided a safe no-call path for local development and demonstrations

What I learned

I learned that integrating an AI phone agent involves much more than starting a call. A reliable workflow must handle consent, asynchronous results, unavailable destinations, incomplete conversations, webhook verification, data isolation, and human escalation.

I also learned that an inconclusive call is still meaningful information. The correct system behavior is not to invent an answer, but to preserve uncertainty and ask a person to review it.

Safety and medical boundaries

CareLoop AI is a hackathon prototype and not a certified clinical system.

It does not:

  • Diagnose medical conditions
  • Provide emergency assistance
  • Prescribe or modify medication
  • Replace clinicians or other healthcare professionals

Clinical staff remain responsible for every medical decision. A production deployment would additionally require formal clinical validation, regulatory review, audit trails, retention policies, incident response procedures, and applicable health-data compliance.

What’s next

Future work includes:

  • Restoring additional international calling regions
  • Supporting multilingual follow-up scripts
  • Adding role-based clinic organizations and audit trails
  • Sending real-time staff notifications
  • Adding configurable follow-up protocols
  • Improving scheduling and calendar integration
  • Performing formal clinical, accessibility, privacy, and security reviews

CareLoop AI closes the gap between a consultation and the next human decision through consent-first, structured communication powered by CALL-E.

Built With

  • api
  • artificial
  • call-e
  • css
  • healthtech
  • intelligence
  • level
  • next.js
  • playwright
  • postgresql
  • react
  • recharts
  • rest
  • row
  • security
  • supabase
  • tailwind
  • typescript
  • vercel
  • vitest
  • voice
  • webhooks
Share this project:

Updates

Submission history