A comprehensive web-based medical portal that allows healthcare workers (doctors, nurses, radiologists) to access patient information and perform AI-assisted X-ray analysis with comparison capabilities.
- Secure login system for medical workers
- Role-based access control (Doctor, Nurse, Radiologist)
- Doctors can only access their assigned patients
- Session management
- 100 pre-generated fake patient records
- Comprehensive patient demographics
- Detailed medical history including:
- Allergies
- Chronic conditions
- Current medications
- Previous surgeries
- Family medical history
- Blood type
- HOPPR AI Integration: Analyzes chest X-rays using state-of-the-art radiology AI
- Doctor Input: Doctors provide their own diagnosis and findings
- Gemini AI Comparison: Automatically compares doctor's assessment with AI results
- Agreement Analysis: Provides detailed comparison showing:
- Agreement level (High/Medium/Low)
- Key agreements and differences
- Clinical significance
- Recommendations for follow-up
The system includes sample DICOM images for:
- Aortic enlargement
- Atelectasis
- Calcification
- Cardiomegaly
- Consolidation
- Interstitial Lung Disease (ILD)
- Infiltration
- Lung Opacity
- Normal studies
- Pleural effusion
- Pleural thickening
- Pneumothorax
- Pulmonary fibrosis
- Python 3.8 or higher
- pip package manager
-
Navigate to the project directory:
cd c:\Users\nours\Downloads\hackathon
-
Install required packages:
pip install -r requirements.txt
-
Generate fake patient data:
python generate_fake_data.py
This will create:
- 20 doctors
- 10 nurses
- 5 radiologists
- 100 patients with complete medical histories
-
Start the web application:
python app.py
-
Access the portal: Open your web browser and navigate to:
http://localhost:5000
All accounts use the password: password123
Sample Doctor Logins:
- Username:
drsmith1,drjohnson1,drwilliams1, etc.
Sample Nurse Logins:
- Username:
nursebrown1,nursejones1, etc.
Sample Radiologist Logins:
- Username:
radgarcia1,radmiller1, etc.
- Login to the portal using your credentials
- Select a patient from the dashboard
- Click "New X-ray Analysis" button
- Enter your assessment:
- Diagnosis
- Clinical findings
- Severity (mild/moderate/severe)
- Select a DICOM file from the available X-rays
- Click "Analyze with AI"
- Review the comparison between your assessment and the AI analysis
The results page shows:
- Your Assessment: Your diagnosis, findings, and severity rating
- AI Analysis: HOPPR AI's diagnosis, findings, and confidence level
- Gemini Comparison: Detailed comparison including:
- Agreement percentage
- Points of agreement
- Key differences
- Clinical significance
- Recommendations
hackathon/
├── app.py # Main Flask application
├── generate_fake_data.py # Data generation script
├── hoppr_integration.py # HOPPR AI integration
├── gemini_comparison.py # Gemini AI comparison logic
├── requirements.txt # Python dependencies
├── templates/ # HTML templates
│ ├── base.html # Base template
│ ├── login.html # Login page
│ ├── dashboard.html # Main dashboard
│ ├── patient_detail.html # Patient information
│ ├── analyze_xray.html # X-ray analysis form
│ └── analysis_result.html # Analysis results
├── HackathonSampleDICOMImages/ # DICOM image files
└── medical_portal.db # SQLite database (created after setup)
- Login credentials
- Full name, role, department
- Relationship to patients
- Demographics (age, sex, blood type)
- Medical history
- Assigned doctor
- Doctor's assessment
- AI analysis results
- Gemini comparison data
- Timestamps and file references
The application uses the following APIs:
- HOPPR AI: For chest X-ray analysis
- Gemini AI: For comparing doctor and AI assessments
API keys are configured in:
classification_demo_single.py: Contains both API keyshoppr_integration.py: HOPPR API keygemini_comparison.py: Gemini API key
- This is a demonstration/educational project
- Passwords are simplified for demo purposes
- In production, use proper password hashing and environmental variables
- Implement proper HIPAA compliance for real medical data
- Use HTTPS for all communications
- Store API keys securely
- Backend: Flask, SQLAlchemy
- Frontend: Bootstrap 5, Bootstrap Icons
- AI/ML:
- HOPPR AI (Medical imaging analysis)
- Google Gemini (Natural language comparison)
- Medical Imaging: pydicom for DICOM file handling
- Database: SQLite
- Login as
drsmith1/password123 - View your assigned patients on the dashboard
- Click on a patient (e.g., "John Doe")
- Review patient's medical history
- Click "New X-ray Analysis"
- Enter your diagnosis:
- Diagnosis: "Pleural effusion, moderate"
- Findings: "Blunting of right costophrenic angle with opacity in lower right lung field"
- Severity: "moderate"
- Select a DICOM file from the Pleural_effusion folder
- Click "Analyze with AI"
- Review the detailed comparison showing agreement/differences
Database not found:
python generate_fake_data.pyPort 5000 already in use:
Edit app.py and change:
app.run(debug=True, host='0.0.0.0', port=5001)Missing dependencies:
pip install -r requirements.txt --force-reinstall- Real-time DICOM viewer
- Export analysis reports to PDF
- Multi-factor authentication
- Advanced search and filtering
- Audit logging
- Integration with hospital information systems
- Support for additional imaging modalities (CT, MRI)
This is an educational/demonstration project for the hackathon.
For questions or issues, please refer to the project documentation.