CureHelp+ is a Flask-based healthcare analytics platform that combines classical ML risk prediction, chest X-ray screening, medical report parsing, chatbot support, consultant discovery, a full-screen medical blog portal, and downloadable PDF reporting in one workflow.
It supports:
- Patient profile management with persistent storage and session sync
- Account authentication (OTP email verification + Google sign-in)
- Multi-disease risk prediction for tabular clinical inputs
- Pneumonia & Tuberculosis X-ray analysis via image upload endpoints
- Medical report autofill from uploaded CSV/PDF/XLS/XLSX files
- User dashboard overview with prediction/report/history aggregates
- Rule-based healthcare chatbot powered by curated datasets
- Consultant directory search (hospitals + doctors)
- Curated medical blog experience with interactive curved article navigator
- Admin dashboard for operational visibility and patient management
- Live Link: https://www.curehelplus.me
- Azure Container Deployment Link: https://curehelplus.grayground-1f565d06.centralindia.azurecontainerapps.io
- Docker Image Link: https://hub.decker.com/r/asimhusain/curehelplus
- Admin panel with login, dashboard metrics, and patient deletion actions
- Medical report upload with format validation and 200 MB size limit
- Enhanced PDF reports with risk gauges and detailed protocols
- Profile persistence layer with JSON and optional PostgreSQL backend
- OTP-based signup/login flows, password reset, and Google OAuth sign-in
- User profile photo upload and authenticated report/history tracking
- Dedicated
/blogpage with interactive 3D wheel article navigation UI - Chest X-ray endpoints for pneumonia and tuberculosis risk scoring
| Disease / Task | Input Type | Model/Approach | Output |
|---|---|---|---|
| Type-2 Diabetes | Tabular | Serialized sklearn pipeline | Probability (%) |
| Coronary Artery Disease | Tabular | Serialized sklearn pipeline | Probability (%) |
| Anemia | Tabular | Risk + type model stack | Probability (%) + severity/type |
| Pneumonia | X-ray Image | TensorFlow/Keras model (.keras) |
Probability + Normal/Pneumonia |
| Tuberculosis | X-ray Image | PyTorch model (.pth) |
Probability + Normal/Tuberculosis + confidence band |
- Create profile using JSON or multipart form data
- Optional medical report upload during profile creation
- Session tracks active profile and disease predictions
- Search, list, and delete stored profiles
- Tabular predictions:
- Type-2 Diabetes
- Coronary Artery Disease
- Anemia
- Image predictions:
- Pneumonia (
multipart/form-datawithimage) - Tuberculosis (
multipart/form-datawithimage)
- Pneumonia (
- Session prediction summary endpoint
- Filterable PDF export by selected diseases
- Risk-sensitive recommendation text generation
- Rule-based chatbot using
bot_data/datasets - Cached responses (TTL controlled by environment variable)
- Consultant directory with hospitals/doctors and search support
- Admin login/logout and protected routes
- Dashboard metrics: profile counts, prediction counts, high-risk indicators
- Disease and gender breakdowns
- Recent patient activity with delete operation
app.pyβ Flask entry point, route definitions, model inference orchestrationprofile_manager.pyβ profile persistence manager (JSON/PostgreSQL + fallback)report_parser.pyβ extraction + field mapping for CSV/PDF/XLS/XLSX reportschatbot.pyβ dataset loading, query processing, response formatting, cacheconsultant.pyβ hospitals/doctors catalog and provider searchmakepdf.pyβ PDF generation with gauge visualization and recommendationsadmin/β admin blueprint, auth flow, templates, dashboard logicmodels/β trained model artifacts used at runtimebot_data/β chatbot knowledge datasetstemplates/,static/β frontend templates and static assets
- Python 3.9 or higher
- pip
- Git
- Optional: Docker
- Optional: PostgreSQL (only if using DB-backed profile storage)
- Clone the repository
git clone https://github.com/asimhusain-ai/CureHelpPlus.git
cd CureHelpPlus- Create and activate a virtual environment
python -m venv .venv
.venv\Scripts\activate # Windows
source .venv/bin/activate # macOS / Linux- Install dependencies
pip install --upgrade pip
pip install -r requirements.txt- Run the application
flask --app app run- Open in browser
| Variable | Description | Default |
|---|---|---|
CUREHELP_SECRET_KEY |
Flask session secret key | curehelp-secret-key |
TB_THRESHOLD |
Tuberculosis decision threshold (0-1) | 0.50 |
MODEL_WARMUP_ENABLED |
Enable startup model warmup thread | true |
MODEL_HEALTH_CHECK_INTERVAL_SECONDS |
Periodic model health-check interval | 300 |
| Variable | Description | Default |
|---|---|---|
GOOGLE_CLIENT_ID |
Google OAuth client ID | empty |
GOOGLE_CLIENT_SECRET |
Google OAuth client secret | empty |
GOOGLE_REDIRECT_URI |
Explicit callback URL override | empty |
APP_BASE_URL |
Base URL used to compose callback when redirect URI is not set | empty |
| Variable | Description | Default |
|---|---|---|
CUREHELP_ADMIN_USER |
Admin username | admin |
CUREHELP_ADMIN_PASS |
Admin password | curehelp |
| Variable | Description | Default |
|---|---|---|
CHAT_CACHE_TTL_SECONDS |
Chat response cache TTL in seconds | 300 |
| Variable | Description | Default |
|---|---|---|
PROFILE_STORAGE_BACKEND |
Force backend (json / postgres) |
auto-detect |
DATABASE_URL |
PostgreSQL connection URL | empty |
PROFILE_STORAGE_STRICT |
Fail if postgres requested but unavailable | false |
PROFILE_RUNTIME_JSON_FALLBACK |
Enable runtime fallback to JSON on DB errors | true |
PROFILE_AUTO_MIGRATE_JSON |
Migrate JSON profiles into postgres on startup | true |
PROFILE_DB_CONNECT_TIMEOUT |
PostgreSQL connect timeout in seconds | 2 |
PROFILE_DB_STATEMENT_TIMEOUT_MS |
PostgreSQL statement timeout in milliseconds | 3000 |
PROFILE_SYNC_QUEUE_MAXSIZE |
Max queued async postgres sync operations | 2000 |
These timeout controls help reduce login/reload delays when PostgreSQL is slow or temporarily unavailable by failing fast and allowing JSON fallback behavior.
| Variable | Description | Default |
|---|---|---|
SMTP_EMAIL_ADDRESS |
Sender email/login for SMTP auth | empty |
SMTP_APP_PASSWORD |
SMTP app password / auth token | empty |
SMTP_HOST |
SMTP server host | smtp.gmail.com |
SMTP_PORT |
SMTP server port | 465 |
SMTP_USE_SSL |
Use implicit SSL SMTP connection | true |
SMTP_USE_TLS |
Upgrade plain SMTP with STARTTLS | false |
SMTP_TIMEOUT_SECONDS |
SMTP connect/send timeout | 20 |
For Gmail, keep SMTP_USE_SSL=true and SMTP_PORT=465 with an app password. If OTP emails fail, auth APIs now return explicit SMTP errors.
- Allowed formats:
.csv,.pdf,.xls,.xlsx - Maximum size: 200 MB
- Allowed formats:
.jpg,.jpeg,.png - Maximum size: 10 MB
- Request type:
multipart/form-data
GET /β frontend landing pageGET /blogβ medical blog portal with interactive wheel navigatorGET /api/configβ baseline normal values for selected diseasesGET /uploads/<path:subpath>β serve uploaded report/photo assets
GET /api/auth/statusPOST /api/auth/signupPOST /api/auth/verify-otpPOST /api/auth/loginGET /verify-emailPOST /api/auth/resend-verificationPOST /api/auth/forgot-passwordPOST /api/auth/reset-passwordPOST /api/auth/logoutPOST /api/auth/logout-allGET /api/auth/profilePATCH /api/auth/profileGET /api/auth/google/startGET /api/auth/google/callback
POST /api/profileβ create profile (+ optional report upload)GET /api/profileβ get currently active profile from sessionGET /api/profiles?q=<name>β list/search profilesDELETE /api/profiles/<profile_id>β delete profile (if not active)POST /api/resetβ clear session profile and predictionsPOST /api/profile/upload-photoβ upload/update authenticated user profile photoPOST /api/auth/reportsβ upload authenticated medical reportDELETE /api/auth/reports/<report_id>β delete authenticated medical reportGET /api/dashboard/overviewβ authenticated dashboard summary and charts payloadGET /api/auth/history/exportβ export authenticated activity history
POST /api/diabetesPOST /api/heartPOST /api/anemiaPOST /api/pneumonia(image upload)POST /api/tuberculosis(image upload)
GET /api/reportβ prediction summary for active sessionGET /api/report/pdf?disease=Type-2 Diabetes,Coronary Artery DiseasePOST /api/chatβ chatbot responseGET /api/consultants?q=<text>β provider searchGET /api/metrics/latencyβ p50/p95/p99 latency summary + model health snapshot
GET/POST /admin/loginPOST /admin/logoutGET /admin/homeGET /admin/POST /admin/patients/<profile_id>/deletePOST /admin/users/<user_id>/activatePOST /admin/users/<user_id>/deactivatePOST /admin/users/<user_id>/force-resetPOST /admin/users/<user_id>/delete
Ensure these model files are available under models/:
diabetes_model.pkldiabetes_scaler.pklheart_model.pklheart_scaler.pklanemia_risk_model.pklanemia_type_model.pklfeature_scaler.pkllabel_encoder.pklpneumonia_model.kerastb_model.pth
Chatbot dataset files expected in bot_data/:
Disease precaution.csvDiseaseAndSymptoms.csvmedquad.csvhumanqa.csv- Optional:
Final_Augmented.csv
Run all tests:
pytestBuild and run locally:
docker build -t curehelplus:latest .
docker run -p 5000:5000 curehelplus:latest- Build image
docker build -t curehelplus:latest .- Push to Azure Container Registry
az acr login --name cureacr
docker tag curehelplus:latest cureacr.azurecr.io/curehelplus:latest
docker push cureacr.azurecr.io/curehelplus:latest- Deploy
az containerapp up --name curehelplus --resource-group curehelplus --location central-india --image cureacr.azurecr.io/curehelplus:latest --target-port 5000 --ingress external --environment managedEnvironment-curehelplus-ade7Contributions are welcome.
- Fork the repository
- Create a feature branch
- Add/modify tests where relevant
- Open a pull request with a clear description
CureHelp+ is intended for informational and educational support only. It does not provide a medical diagnosis and is not a substitute for professional healthcare advice.
Made with β€οΈ by Asim Husain β https://www.asimhusain.dev