AI-Powered Prescription Digitization & Medical Assistant
MediGrid AI is an AI-powered FastAPI web application that converts handwritten medical prescriptions into structured digital insights, detects critical warnings, stores records in SQLite database, and provides an integrated medical AI assistant.
- 📸 Upload handwritten prescription image
- 🤖 AI-based prescription data extraction
⚠️ Critical medical warnings detection- 💾 Store extracted data in SQLite database
- 📍 Location-based pharmacy suggestions
- 💬 Integrated AI medical chat assistant
- 🌐 REST API built using FastAPI
- Backend: FastAPI
- AI Integration: Google Generative AI (Gemini)
- Database: SQLite3
- Frontend: HTML, CSS (Static)
- Server: Uvicorn
- Data Validation: Pydantic
MediAI/ │── static/ │── fast_api_file.py │── Extracting_prescription_data.py │── Critical_Warinings.py │── SQLLITE3_DataBase.py │── AI_assistant_logic.py │── MediGrid.db │── requirements.txt │── .env │── README.md
1️⃣ Clone the repository
git clone https://github.com/yourusername/MediGrid-AI.git
2️⃣ Navigate to project folder
cd MediAI
3️⃣ Create virtual environment
python -m venv venv
4️⃣ Activate environment
Windows: venv\Scripts\activate
5️⃣ Install dependencies
pip install -r requirements.txt
6️⃣ Run FastAPI server
uvicorn fast_api_file:api --reload
Create a .env file and add:
GEMINI_API_KEY=your_api_key_here
Make sure to load environment variables properly before running the server.
POST /data_extraction
→ Extract prescription data from image
POST /critical_warnings
→ Analyze critical medicine warnings
POST /post_into_db
→ Save extracted data into SQLite database
GET /get_Saved_data
→ Fetch stored prescription data
This application is for educational and informational purposes only. It does not replace professional medical consultation.
- Enable location services
- Upload prescription image
- View extracted medicines
- Find nearby pharmacies
- Download digital report
Rohit Shinde
AI & Backend Developer