Skip to content

About

Healthcare analytics platform with Flask, Streamlit, Azure-ready ETL, and Power BI reporting.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Healthcare Analytics System

A resume-ready healthcare analytics platform built with Flask, Streamlit, SQLAlchemy, Plotly, Azure-ready deployment patterns, and Power BI export support.

Live Demo

It models a realistic healthcare operations workflow:

  • generate or ingest patient admission data
  • curate the data through a lightweight ETL pipeline
  • load analytics-ready records into a relational database
  • surface KPIs and trends in both Flask and Streamlit dashboards
  • export a clean dataset for Power BI reporting

Highlights

  • Executive-style dashboards for readmission monitoring, cost tracking, risk segmentation, and utilization trends
  • Shared analytics layer so Flask and Streamlit use the same KPI and chart logic
  • Deployable Streamlit live demo path for recruiters and resume links
  • Basic automated test coverage for ETL and analytics transforms
  • GitHub Actions CI workflow for push and pull request validation
  • Clean separation between app code, ETL scripts, source data, curated data, Azure assets, and BI outputs
  • SQLite for local demos with a drop-in DATABASE_URL path for Azure SQL deployments
  • Sample Azure Data Factory pipeline JSON and architecture notes for cloud storytelling
  • Portfolio-friendly repository layout with generated files excluded from Git

Tech Stack

  • Flask
  • Streamlit
  • Flask-SQLAlchemy
  • Pandas
  • Plotly
  • Python
  • Azure SQL deployment pattern
  • Azure Data Factory reference pipeline
  • Power BI export dataset

Repository Layout

healthcare-analytics-system/
├── app.py
├── streamlit_app.py
├── Makefile
├── config.py
├── requirements.txt
├── requirements-dev.txt
├── requirements-azure.txt
├── .streamlit/
│   └── config.toml
├── .github/
│   └── workflows/
│       └── ci.yml
├── healthcare_app/
│   ├── __init__.py
│   ├── extensions.py
│   ├── models.py
│   ├── routes/
│   │   └── dashboard.py
│   ├── services/
│   │   ├── analytics.py
│   │   ├── analytics_core.py
│   │   └── seed.py
│   ├── static/
│   │   └── css/
│   │       └── styles.css
│   └── templates/
│       ├── base.html
│       └── dashboard.html
├── tests/
│   ├── test_analytics_core.py
│   └── test_etl.py
├── data/
│   ├── raw/
│   │   └── patient_admissions.csv
│   └── processed/
│       └── patient_admissions_curated.csv
├── scripts/
│   ├── generate_sample_data.py
│   ├── run_etl.py
│   └── export_power_bi_dataset.py
├── azure/
│   ├── architecture.md
│   └── data_factory_pipeline.json
└── power_bi/
    ├── README.md
    └── patient_analytics_dataset.csv

Data Flow

  1. scripts/generate_sample_data.py creates a realistic raw admissions dataset.
  2. scripts/run_etl.py curates and standardizes records into data/processed/.
  3. The Flask app seeds the curated data into the database on first run.
  4. healthcare_app/services/analytics_core.py computes KPIs, filters, and reusable chart objects.
  5. Flask and Streamlit consume the same analytics layer for consistent business logic.
  6. scripts/export_power_bi_dataset.py writes a Power BI-ready CSV.

Run Locally

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt
python scripts/generate_sample_data.py
python scripts/run_etl.py
python scripts/export_power_bi_dataset.py
python app.py

Open http://127.0.0.1:5000.

To run the Streamlit live demo locally:

streamlit run streamlit_app.py

Open http://localhost:8501.

Quick Commands

make generate
make etl
make export
make run-flask
make run-streamlit
make test

Streamlit Live Demo Deployment

This project is ready for a public Streamlit demo:

  1. Push the repository to GitHub.
  2. Create an app in Streamlit Community Cloud.
  3. Set the main file path to streamlit_app.py.
  4. Use requirements.txt for dependencies.
  5. Add secrets only if you want the hosted demo to connect to a live Azure SQL instance.

For a simple public portfolio demo, the included curated CSV is enough.

For Azure SQL environments, also install:

pip install -r requirements-azure.txt

Azure SQL Configuration

Create a .env file with:

DATABASE_URL=mssql+pyodbc://<username>:<password>@<server>.database.windows.net:1433/<database>?driver=ODBC+Driver+18+for+SQL+Server&Encrypt=yes&TrustServerCertificate=no&Connection+Timeout=30
SEED_ON_STARTUP=true

This lets the same codebase run locally with SQLite and connect to Azure SQL in deployment.

Engineering Quality

  • Shared analytics service layer to avoid duplicate business logic across UI surfaces
  • Automated tests covering ETL row curation and analytics transformations
  • GitHub Actions CI workflow to validate changes on push and pull request
  • Environment-based configuration for local SQLite or Azure SQL deployment
  • Clean Git hygiene with generated artifacts excluded by default

Portfolio Talking Points

  • Built a healthcare analytics platform with Flask and Streamlit, sharing a reusable analytics service layer across both applications.
  • Designed ETL-style data curation workflows and Azure-ready configuration so the same project supports local demos and cloud deployment storytelling.
  • Added CI, tests, and BI export capabilities to make the repo feel closer to a production-minded analytics application.

Resume Version

Use these stronger bullets instead of the original ones:

  • Developed a healthcare analytics platform using Flask, Streamlit, SQLAlchemy, and Plotly to analyze patient encounters, readmission risk, treatment trends, and regional cost performance.
  • Designed ETL-style data pipelines and Azure SQL-ready configuration to support local demo workflows and cloud deployment patterns aligned with Azure Data Factory architectures.
  • Built reusable analytics services, Power BI export datasets, and automated test and CI workflows to deliver a portfolio project with production-minded structure and live demo readiness.

Push To GitHub

From this folder you can run:

git add .
git commit -m "Build industry-ready healthcare analytics platform"
git branch -M main
git remote add origin <your-github-repo-url>
git push -u origin main

About

Healthcare analytics platform with Flask, Streamlit, Azure-ready ETL, and Power BI reporting.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages