Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

51 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฅ Discharge Buddy

Your AI-Powered Companion for Seamless Post-Hospital Recovery

Google Solution Challenge Expo License: MIT

๐Ÿ“š New to the project? Start with DOCUMENTATION_INDEX.md for a complete guide to all resources.


๐Ÿ“– Overview

Discharge Buddy is a premium, end-to-end recovery ecosystem designed to bridge the "last mile" gap between hospital discharge and full patient recovery.

While hospitals provide expert care, the transition to home is often fraught with confusion. Patients are handed complex prescriptions, confusing instructions, and a daunting schedule of follow-upsโ€”all while they are physically and mentally vulnerable. Discharge Buddy transforms this chaotic process into a structured, gamified, and AI-monitored journey, ensuring patients stay on track and caregivers stay informed.

๐ŸŽฏ Who is it for?

  • Patients recovering from surgery or managing chronic illnesses.
  • Caregivers who need real-time peace of mind regarding their loved ones' health.
  • Healthcare Providers looking for higher patient adherence and better recovery outcomes.

๐Ÿ’ก Motivation: The "Post-Discharge" Crisis

Every year, millions of patients experience complications shortly after discharge due to medication non-adherence and misunderstood instructions.

  • The Problem: Medical jargon is intimidating. Handwritten prescriptions are hard to read. Caregivers are often stressed and out of the loop.
  • The Solution: A bridge that digitizes instructions, simplifies language, automates reminders, and creates a real-time safety net between patient and guardian.

โœจ Key Features

Feature Description
๐Ÿ“ธ Smart OCR Scanner Digitizes handwritten or printed prescriptions with 98% accuracy using an AI ensemble.
๐Ÿ’Š Automated Scheduler Converts raw text into a morning/afternoon/night medication timeline automatically.
๐Ÿ‘ฅ Caregiver Portal Real-time monitoring for family members with instant alerts for missed doses.
๐Ÿป Mascot "Beary" A gamified companion that reacts to your recovery progress and encourages adherence.
๐Ÿง  Jargon Simplifier Translates complex medical terms into simple, actionable language using LLMs.
๐Ÿšจ Emergency SOS One-tap emergency trigger that notifies caregivers and provides a digital medical card.

๐Ÿ” Detailed Feature Breakdown

1. The Intelligent Onboarding (OCR & Vision)

Our pipeline uses a multi-stage Vision-Language Ensemble.

  • Phase 1: Image preprocessing to enhance clarity.
  • Phase 2: Text extraction via NVIDIA Nemotron-Parse and Tesseract.
  • Phase 3: Entity extraction via Gemini 1.5 Flash, identifying medicine names, dosages, frequencies (OD/BD/TDS), and duration.

2. Gamified Adherence (Mascot & Streaks)

Recovery doesn't have to be depressing. Our mascot, Beary, evolves as you hit your milestones.

  • XP & Levels: Earn points for logging vitals and taking medicine on time.
  • Emotional Response: Beary gets happy when you're consistent and worried when you miss a dose, building an emotional feedback loop for better adherence.

3. The Caregiver Safety Net

Caregivers get a dedicated "Guardian Interface" where they can:

  • View live dose logs.
  • Receive Push Notifications the moment a patient reports a symptom or misses a pill.
  • Remotely trigger reminders if the patient is unresponsive.

๐Ÿง  How It Works (Architecture)

graph TD
    subgraph "Frontend (Mobile App)"
        UI[React Native / Expo]
        Ctx[State Management]
        Scan[Vision OCR Engine]
        Anim[Reanimated Mascot]
    end

    subgraph "Backend (API Server)"
        API[Express.js Server]
        Auth[JWT / Google OAuth]
        Logic[Recovery Logic Services]
        AI[Gemini / Groq / NVIDIA]
    end

    subgraph "Storage & Infrastructure"
        DB[(PostgreSQL / Neon)]
        Cache[(AsyncStorage)]
        Notif[Firebase Cloud Messaging]
    end

    UI <--> Ctx
    Ctx <--> API
    API <--> DB
    API <--> AI
    Ctx <--> Cache
    Scan --> UI
    API --> Notif
Loading

๐Ÿ› ๏ธ Tech Stack

Frontend

  • Framework: React Native with Expo (SDK 50+)
  • Routing: Expo Router (File-based)
  • Animations: Moti & React Native Reanimated
  • State: React Context API + TanStack Query

Backend

  • Runtime: Node.js (TypeScript)
  • Framework: Express.js
  • Database: PostgreSQL via Neon Serverless
  • ORM: Drizzle ORM

AI & ML Pipeline

  • Prescription Parsing: Gemini 1.5 Flash
  • Language Simplification: Anthropic Claude 3.5 Sonnet / Llama 3.3 (Groq)
  • OCR Engine: NVIDIA Nemotron-Parse + docTR Ensemble

๐Ÿ“ธ UI Showcase

Patient Dashboard Prescription Scanner Caregiver Portal

Note: Explore the PPT Assests folder for full-resolution wireframes and mascot animations.


โš™๏ธ Installation & Setup

1. Prerequisites

  • Node.js (v18+)
  • pnpm (Recommended)
  • Expo Go app on your mobile device.

2. Clone & Install

git clone https://github.com/your-repo/d-buddy.git
cd d-buddy
pnpm install

3. Environment Configuration

Create a .env file in the root directory:

# Server
PORT=3000
JWT_SECRET=your_super_secret

# Database
DATABASE_URL=your_neon_postgres_url

# Google OAuth (See GOOGLE_OAUTH_SETUP.md for detailed configuration)
GOOGLE_CLIENT_ID=your_google_oauth_web_client_id
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID=your_google_oauth_web_client_id
EXPO_PUBLIC_GOOGLE_ANDROID_CLIENT_ID=your_google_oauth_android_client_id
EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID=your_google_oauth_ios_client_id

# AI Providers
GEMINI_API_KEY=your_google_ai_key
ANTHROPIC_API_KEY=your_anthropic_key
GROQ_API_KEY=your_groq_key
NVIDIA_API_KEY=your_nvidia_key

โš ๏ธ Important: For Google OAuth setup with native Android/iOS client IDs, see GOOGLE_OAUTH_SETUP.md

4. Run Services

Backend:

cd artifacts/api-server
pnpm run dev

Mobile App:

cd artifacts/discharge-buddy
npx expo start

โ–ถ๏ธ Usage Guide

  1. Sign Up: Create a profile as a Patient or Caregiver.
  2. Scan: Take a photo of your discharge summary or prescription.
  3. Verify: Confirm the AI-extracted medicine list and frequency.
  4. Link: (Caregivers) Scan the patient's unique QR code to start monitoring.
  5. Track: Log your symptoms and medicine intake daily to keep Beary happy!

๐ŸŽฏ Use Cases

  • Post-Surgery Recovery: Managing pain meds and wound care instructions.
  • Chronic Care: Keeping elderly patients on complex multi-drug regimens.
  • Remote Monitoring: Allowing children to care for aging parents living in different cities.

๐Ÿšง Challenges & Learnings

  • Handwriting OCR: Dealing with doctor's handwriting was the biggest hurdle. We solved this by using an ensemble of multiple OCR engines and an LLM-based correction layer.
  • Real-Time Sync: Ensuring caregivers get notified within seconds of a missed dose required a robust notification and socket architecture.
  • User Empathy: Designing for people who are sick meant minimizing clicks and using high-contrast, accessible UI elements.

๐Ÿ”ฎ Future Improvements

  • Telemedicine Integration: One-tap video calls with doctors directly from the app.
  • Drug Interaction Alerts: Automatically flag potential risks between scanned medicines.
  • Predictive Health: Using AI to predict potential relapse based on symptom patterns.

๐Ÿค Contributing

Contributions make the open-source community an amazing place to learn and inspire.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“œ License

Distributed under the MIT License. See LICENSE for more information.


Built with โค๏ธ by the Discharge Buddy Team
For the Google Solution Challenge 2026

About

๐Ÿฅ Discharge Buddy streamlines the patient discharge process by managing discharge summaries, medications, and follow-up instructions in one place. It helps healthcare staff reduce paperwork ๐Ÿ“„, improve coordination ๐Ÿค, and provide patients with a smoother recovery experience ๐Ÿ’™.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages