OsteoAdvisor is an AI-powered educational tool that helps patients with osteoporosis understand their DEXA scan results and explore personalized medication options.
Launch OsteoAdvisor on Streamlit Cloud
No installation needed β test it directly in your browser!
OsteoAdvisor simplifies the process of understanding bone density test results and connecting patients with evidence-based medication information. Users upload their DEXA (Dual-Energy X-ray Absorptiometry) scan, and the app:
- Analyzes bone density metrics (T-scores, BMD values)
- Classifies severity based on WHO criteria
- Recommends appropriate medication classes
- Educates about side effects, risks, and treatment options
OsteoAdvisor is an educational tool only and is NOT a medical device or substitute for professional medical advice.
- Always consult your healthcare provider (physician, rheumatologist, endocrinologist) before starting any medication
- This tool does not replace personalized medical evaluation
- Individual treatment decisions must consider complete medical history, comorbidities, and other factors
THIS IS A PROTOTYPE / VIBE CODING EXERCISE β NOT A PRODUCTION APPLICATION
- β NO backend database β This app has no secure storage infrastructure
- β NO data encryption β DEXA reports are processed in-memory only
- β NO user authentication β No login or user management
- β NOT HIPAA compliant β Do NOT use with real patient data
- β NOT production-ready β This is a prototype for educational purposes only
DO NOT upload real DEXA scans with personal health information (PII). This tool is designed for demonstration and testing only with sample/anonymized data.
- All data processing occurs locally in your browser/local server
- No data is sent to external servers or stored in any database
- DEXA reports are not saved after you close the app
- Refreshing the page clears all session data
- This tool is meant for educational and prototyping purposes only
- Extracts T-scores and BMD values from DEXA scan PDFs
- Classifies results using WHO criteria (Normal, Osteopenia, Osteoporosis)
- Displays bone density across multiple sites (spine, hip, forearm)
- Bisphosphonates (Fosamax, Actonel, Reclast) β first-line treatment
- Denosumab (Prolia) β monoclonal antibody injection
- Hormone Replacement Therapy (HRT) β estrogen-based treatments
- SERMs (Raloxifene) β selective estrogen receptor modulators
- Teriparatide (Forteo) β bone-building agent
Each medication includes:
- Mechanism of action
- Common side effects
- Important warnings
- Dosage information
- Estimated costs
- DEXA scan fundamentals
- WHO T-score classification
- FAQ about osteoporosis causes, risks, and management
- Lifestyle modifications for bone health
- Python 3.8+
- pip (Python package manager)
- Clone or download this repository:
git clone https://github.com/mikinmacwan-pm/OsteoAdvisor.git
cd OsteoAdvisor- Install dependencies:
pip install -r requirements.txt- Run the app:
streamlit run app.py- Open in browser:
- Streamlit will automatically open at
http://localhost:8501 - If not, manually navigate to that URL
- Streamlit will automatically open at
-
Upload DEXA Report
- Click "Upload your DEXA scan PDF" on the Upload & Analyze tab
- Select your DEXA scan file from your computer
-
Review Your Results
- View extracted T-scores and BMD values by bone location
- Check your overall classification (Normal, Osteopenia, or Osteoporosis)
-
Explore Medications
- Review recommended medication classes based on your results
- Read side effects, warnings, and cost information
- Share this information with your healthcare provider
-
Learn More
- Use the "Medication Info" tab for detailed medication comparisons
- Check the "FAQ" tab for bone health education
A typical DEXA report includes:
LUMBAR SPINE:
- BMD: 0.676 g/cmΒ²
- T-score: -3.4 β Osteoporosis
TOTAL HIP:
- BMD: 0.755 g/cmΒ²
- T-score: -1.5 β Osteopenia
FEMORAL NECK:
- BMD: 0.583 g/cmΒ²
- T-score: -2.4 β Osteopenia
Overall: Osteoporosis (based on worst T-score)
| Classification | T-Score | Meaning |
|---|---|---|
| π’ Normal | β₯ -1.0 | Healthy bone density |
| π‘ Osteopenia | -1.0 to -2.5 | Low bone mass; higher fracture risk |
| π΄ Osteoporosis | β€ -2.5 | Severe bone loss; high fracture risk |
- Drugs: Alendronate (Fosamax), Risedronate (Actonel), Zoledronic Acid (Reclast)
- How it works: Slows bone loss
- Cost: $50-150/month
- Key warning: Must be taken properly to avoid esophageal damage
- Drug: Prolia
- How it works: Blocks bone resorption
- Cost: $500-800 per injection (every 6 months)
- Key warning: Requires adequate calcium/vitamin D
- How it works: Estrogen preserves bone density
- Cost: $30-100/month
- Key warning: Increased risk of blood clots and breast cancer with long-term use
- Drug: Raloxifene (Evista)
- How it works: Estrogen-like effects on bones only
- Cost: $50-100/month
- Key warning: Blood clot risk (similar to HRT)
- Drug: Forteo
- How it works: Stimulates new bone formation
- Cost: $600-1000/month
- Key warning: Limited to 2-year use; not for cancer patients
After using OsteoAdvisor:
- Schedule an appointment with your healthcare provider
- Bring this report or a summary of results
- Discuss:
- Your complete medical history
- Other medications you're taking
- Fracture risk (using FRAX tool: https://frax.shef.ac.uk)
- Your preferences and lifestyle
- Make an informed decision with your doctor
- β All processing is local β no data is sent to external servers
- β No storage β DEXA reports are not saved after processing
- β Secure β reports are only visible in your browser session
β οΈ Remove PII β consider removing personal information from reports before sharing
- Frontend: Streamlit (Python web app framework)
- PDF Processing: pdfplumber (text extraction)
- Libraries: Python 3.8+, regex for data parsing
OsteoAdvisor has been tested with:
- Standard DEXA scan PDFs from major radiology centers
- T-scores ranging from -0.8 to -4.0
- Multiple anatomical sites (spine, hip, forearm)
Sample results are extracted accurately from standard radiology reports.
- PDF Parsing: Works best with standard radiology reports; complex formats may fail
- Manual Verification: Always verify extracted T-scores with your original report
- Not a Diagnostic Tool: Does not diagnose osteoporosis; DEXA scan diagnosis is from radiologist
- Medication Matching: Recommendations are general; individual suitability requires medical evaluation
- No Real-Time Updates: Medication information is curated; always check official sources for latest data
Found a bug? Have suggestions? Open an issue or submit a pull request!
- ISCD (International Society for Clinical Densitometry): https://www.iscd.org
- FRAX (Fracture Risk Assessment Tool): https://frax.shef.ac.uk/FRAX/tool.aspx
- NIH - Osteoporosis: https://www.bones.nih.gov
- WHO Classification: https://www.who.int
MIT License β see LICENSE file for details
OsteoAdvisor v1.0 β MVP Release
Questions? This is an educational tool. Always consult your healthcare provider for medical advice.
𦴠OsteoAdvisor β Empowering informed conversations about bone health.