Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

🩺 AI-Based Healthcare Symptom Checker (ICD Prediction)

An AI-powered backend service that analyzes user-reported symptoms in natural language and predicts possible medical conditions using ICD-9 codes. The system uses Google Gemini (LLM) for symptom understanding and medical inference, exposed through a lightweight Flask REST API.

⚠️ Disclaimer: This project is for educational purposes only and is not a certified medical diagnostic tool. Always consult a qualified healthcare professional for medical advice.


🚀 Features

  • 🧠 AI-powered symptom understanding using Google Gemini
  • 🩹 Predicts possible medical conditions (ICD-9 based)
  • 🌐 REST API built with Flask
  • 🔗 CORS enabled for seamless frontend integration
  • 📦 Modular, easy-to-extend backend structure
  • 🧪 Simple to test via Postman or any frontend client
  • 🎙️ Voice-based symptom input for improved accessibility

Note: The Gemini model version originally used in this project has since been deprecated. See Known Issues below.


image

🛠️ Tech Stack

Category Technology
Backend Python, Flask
AI / NLP Google Gemini API
Frontend HTML, CSS, JavaScript
Environment dotenv
API Style REST
Security CORS
Data ICD-9 Codes

📁 Project Structure

├── backend/
│   ├── app.py              # Flask app entry point & API routes
│   ├── icd9.txt             # ICD-9 code reference data
│   ├── requirements.txt     # Python dependencies
│   └── .gitignore
├── frontend/                # Client-side interface
└── README.md

⚙️ Getting Started

Prerequisites

1. Clone the repository

git clone https://github.com/srishtyverma/<repo-name>.git
cd <repo-name>/backend

2. Install dependencies

pip install -r requirements.txt

3. Set up environment variables

Create a .env file in the backend/ directory:

GEMINI_API_KEY=your_api_key_here

4. Run the server

python app.py

The API will be available at http://localhost:5000 by default.


📡 API Usage

Endpoint: POST /predict

Request body:

{
  "symptoms": "I have a headache, fever, and sore throat"
}

Response:

{
  "predicted_conditions": [
    { "icd9_code": "462", "condition": "Acute Pharyngitis" },
    { "icd9_code": "780.60", "condition": "Fever, unspecified" }
  ]
}

(Adjust the request/response schema above to match your actual app.py implementation.)


🧭 Known Issues & Roadmap

  • Migrate to the latest supported Gemini model (current model version is deprecated)
  • Add input validation and error handling for malformed symptom text

🤝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to open a pull request or submit an issue.


About

An AI-powered healthcare symptom checker that analyzes user-reported symptoms and predicts possible medical conditions using ICD codes. Built a Flask-based REST API and integrated Google Gemini (LLM) for clinical text understanding, enabling accurate symptom extraction and condition inference.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages