Back to Projects
S
AI/ML

Staffmatics

AI/ML Engineer & Full-Stack Developer

FastAPIPythonNumPyPydanticNext.jsTypeScript

About the Project

Staffmatics is a healthcare workforce intelligence platform for hospitals, nursing homes, home health agencies, and staffing agencies. It replaces the spreadsheets, phone trees, and disconnected systems most healthcare organizations still use to fill shifts. The goal is to move an organization from reactive staffing to predictive workforce intelligence — forecasting shortages, matching qualified clinicians to open shifts, automating credential verification, and giving executives real-time visibility into labor cost, fill rates, and turnover risk. It runs as four services: a clinician-facing web app, an admin console, the main API, and a dedicated ML service that is deliberately separate so a model outage cannot take scheduling down with it.

What It's Made Of

Clinician web app

Next.js · React · Tailwind

What a nurse or therapist actually uses: browsing and claiming open shifts ranked by fit, managing availability, uploading and tracking credential expiry, viewing their schedule and hours, and seeing their own fatigue signals. Shift ranking arrives pre-scored by the ML service, so the list is ordered by genuine fit rather than by whichever posting is newest.

Admin console

Next.js · React · Tailwind

The operator surface for schedulers and executives: posting and filling shifts, reviewing and verifying credentials, managing the clinician roster, and the burnout and fatigue dashboard that tracks overtime, consecutive shifts and workload patterns to surface retention risk early. Executive views roll up labor cost, fill rates and turnover risk across facilities.

Main API

FastAPI · Pydantic · Alembic · SQL

Owns all durable state and every business rule: users and facilities, shift lifecycle, credential records and expiry, timesheets and payroll export. It calls the ML service for ranking and prediction but never depends on it — if that service is unreachable, the API falls back to local rule-based matching and the product keeps working with degraded ranking quality.

ML service

FastAPI · numpy-only · .npz artifacts

Three endpoints, one job each: re-rank a candidate list for a shift, score a clinician's burnout risk, and forecast shortages ahead of time. The models are logistic regressions implemented directly in numpy, with trained weights serialized to .npz, because the deployment environment's Application Control policy blocks scipy's compiled solver DLLs and takes scikit-learn off the table. A health endpoint reports whether each model's artifacts are present, and heuristics stand in when they are not.

Key Highlights

  • Built the ML service as a standalone FastAPI application handling match re-ranking, burnout prediction, and shortage forecasting
  • Implemented the models directly in numpy — the deployment environment's Application Control policy blocks scipy's compiled solver DLLs, so scikit-learn was off the table entirely
  • Designed graceful degradation at both layers: the main API falls back to local rule-based matching if the ML service is unavailable, and the ML service falls back to heuristics if no trained artifacts exist
  • Built AI shift matching that scores clinicians on credentials, specialty, availability, location, experience, and reliability
  • Shipped a burnout and fatigue dashboard tracking overtime, consecutive shifts, and workload patterns to surface retention risk early

Technical Challenges

The interesting constraint was that the target environment blocked scipy's compiled solver DLLs, so scikit-learn was off the table entirely. Rather than fight the security policy, I reimplemented the logistic regression models in pure numpy and serialized the trained weights to .npz. The models are small enough that this was tractable, and it removed a heavy dependency chain from the deployment. The other design decision I care about is that nothing hard-fails: every layer has a defined fallback, so an ML outage degrades match quality rather than taking scheduling down. In healthcare staffing that distinction matters — a shift that cannot be filled because a model is down is a shift with no nurse in it.