Spaces:
Sleeping
π User Guide: Healthcare AI Assistant
Welcome! This guide will help you use the Healthcare AI Assistant effectively.
π Quick Start
Option 1: Simple UI (Recommended)
streamlit run streamlit_app/app_v2.py
Best for: First-time users, demos, quick access
Option 2: Full UI (same as Option 1)
streamlit run streamlit_app/app_healthcare.py --server.port 8501
Best for: Power users, technical demos, full features
π Home Page
When you first open the app, you'll see:
Quick Actions
- π¬ Start Chat - Ask health questions
- π Upload Now - Analyze medical reports
- π View History - See past conversations
Just click any button to get started!
π¬ Chat Page
How to Use
- Type your question in the text box
- Click "Send Question"
- Wait 3-5 seconds for the response
- Read the answer with sources
Example Questions
Symptoms:
- "What are the symptoms of diabetes?"
- "I have a headache and fever, what could it be?"
Medications:
- "What is metformin used for?"
- "What are the side effects of ibuprofen?"
General Health:
- "How can I lower my blood pressure naturally?"
- "What foods are good for heart health?"
Features
- Smart Routing: System automatically detects what type of question you're asking
- Multi-Step Reasoning: Complex questions get 5-step analysis
- Sources: See where the information comes from
- Emergency Detection: Urgent symptoms trigger immediate warnings
π Upload Report Page
How to Upload
- Click "Choose a file"
- Select your report (PDF, JPG, or PNG)
- Click "Analyze Report"
- Wait 30-60 seconds for analysis
What You'll See
- Patient Information: Name, age, gender
- Lab Results: All values with normal/abnormal flags
- Health Recommendations: Personalized advice based on results
- Abnormal Values: Highlighted in red/yellow
Supported Files
- β PDF lab reports
- β Photos of lab reports (JPG, PNG)
- β Scanned medical documents
- β Max file size: 10MB
π My History Page
What You'll See
- Total Queries: How many questions you've asked
- Average Confidence: How confident the AI was
- Recent Conversations: Your last 10 chats
How to Use
- Click on any conversation to see details
- Review past answers anytime
- Track your health questions over time
βοΈ Settings Page
Login
Demo Accounts (for testing):
admin@healthcare.ai/admin123(Admin)doctor@healthcare.ai/doctor123(Doctor)patient@healthcare.ai/patient123(Patient)
How to Login
- Go to Settings
- Enter email and password
- Click Login
- You're logged in!
User Preferences
- Enable notifications
- Save conversation history
- Show confidence scores
π¨ Emergency Detection
The system automatically detects 14 emergency symptoms:
- Chest pain
- Difficulty breathing
- Severe bleeding
- Loss of consciousness
- Stroke symptoms
- Seizure
- Suicidal thoughts
- Severe allergic reaction
- And more...
If detected: You'll see a red warning telling you to call 911 immediately.
π Privacy & Security
Your Data is Safe
- β Encrypted storage: All data is encrypted
- β HIPAA-compliant: Audit logs track all access
- β No sharing: Your data is never shared
- β Local processing: Can run entirely offline
What We Track
- Your questions and answers (for history)
- Uploaded reports (for your records)
- Login activity (for security)
- System usage (for improvements)
What We DON'T Track
- β Your personal health information outside the app
- β Your identity (unless you login)
- β Your location
- β Your browsing history
β‘ Tips for Best Results
Asking Questions
Good Questions:
- "What are the symptoms of diabetes?"
- "I have a persistent cough for 2 weeks, what should I do?"
- "Can I take ibuprofen with aspirin?"
Better Questions:
- "I'm 45 years old with high blood pressure. What are safe exercises?"
- "My lab report shows glucose at 180 mg/dL. What does this mean?"
- "I'm taking metformin. What foods should I avoid?"
Why Better: More context = more personalized answers!
Uploading Reports
Best Practices:
- β Use clear, readable scans
- β Ensure text is visible
- β Upload one report at a time
- β Wait for analysis to complete
Avoid:
- β Blurry photos
- β Handwritten notes (hard to read)
- β Multiple reports in one file
π Troubleshooting
"System Offline" in Sidebar
Problem: Can't connect to API
Solution:
- Check if API is running:
curl http://localhost:8000/health - Restart API:
uvicorn api.main:app --port 8000
"Analysis Timed Out"
Problem: Report analysis taking too long
Solution:
- Wait a bit longer (complex reports need 60+ seconds)
- Try a simpler report
- Check if API is responding: Visit
/healthendpoint
"Invalid Credentials"
Problem: Can't login
Solution:
- Use demo credentials:
admin@healthcare.ai/admin123 - Check if you typed email correctly
- Try registering a new account
"No History Found"
Problem: Can't see past conversations
Solution:
- Make sure you're using the same session
- Try asking a question first
- Check if database is initialized
π± Mobile Use
The app works on mobile browsers!
Tips:
- Use landscape mode for better layout
- Tap buttons instead of hover
- Use voice-to-text for questions
- Upload photos directly from camera
π Advanced Features
For Power Users
- Multi-Step Reasoning: Ask complex questions (>15 words) to trigger 5-step analysis
- Knowledge Graph: Mention diseases/drugs to get enhanced context
- Feedback: Rate responses to help improve the system
- API Access: Request API key for programmatic access
For Clinicians
- Login with clinician account for specialized features
- Access admin panel for system management
- Generate API keys for integrations
- View audit logs for compliance
π‘ Best Use Cases
1. Understanding Lab Reports
Upload β Analyze β Get explanations β Receive recommendations
2. Symptom Checking
Describe symptoms β Get possible causes β Know when to see doctor
3. Medication Information
Ask about drug β Learn uses β Understand side effects β Check interactions
4. Health Education
Ask general questions β Get evidence-based answers β See sources
β οΈ Important Disclaimers
This AI Assistant:
β CAN:
- Provide general health information
- Explain medical terms
- Analyze lab reports
- Suggest when to see a doctor
- Give evidence-based answers
β CANNOT:
- Diagnose diseases
- Prescribe medications
- Replace your doctor
- Provide emergency medical care
- Make treatment decisions
Always Remember:
This is an educational tool, not a replacement for professional medical advice.
For emergencies: Call 911
For medical decisions: Consult your doctor
π Getting Help
In the App
- Check System Status in sidebar
- Review error messages carefully
- Try refreshing the page
Technical Support
- GitHub Issues: https://github.com/Santhakumarramesh/healthcare-rag-agent/issues
- Email: (your email)
π― Quick Reference
Demo Credentials
admin@healthcare.ai / admin123
doctor@healthcare.ai / doctor123
patient@healthcare.ai / patient123
File Types Supported
- PDF: Lab reports, medical documents
- JPG/PNG: Photos of reports, scans
Response Times
- Simple questions: 3-5 seconds
- Complex reasoning: 9-12 seconds
- Report analysis: 30-60 seconds
System Requirements
- Modern web browser (Chrome, Firefox, Safari)
- Internet connection (for API access)
- JavaScript enabled
π Enjoy!
You now have a powerful AI health assistant at your fingertips. Ask questions, upload reports, and get instant, evidence-based answers!
Stay healthy! π₯π