workwell
Taleef7/workwell
Total Worker Health compliance platform with CQL authoring, risk outlook analytics, MAT/FHIR export, and auditable case workflows.
Instalação
npx convez-ai Taleef7/workwell1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
README
A tradução para o português deste README ainda está na fila.
WorkWell Measure Studio
WorkWell Measure Studio is a Spring Boot + Next.js monorepo for Total Worker Health (TWH) compliance operations. It combines measure authoring, deterministic CQL evaluation, case management, audit trails, admin tooling, and exportable evidence in one operational platform.
At a glance
- Lifecycle-managed measures:
Draft -> Approved -> Active -> Deprecated - CQL compile + fixture validation gates before activation
- Scoped run pipeline:
ALL_PROGRAMS,MEASURE,SITE,EMPLOYEE,CASE - Case operations: outreach, assign/escalate, rerun-to-verify, timeline audit
- AI assist for CQL drafting and test fixture generation (never compliance decisions)
- MAT-compatible FHIR R4 export for measure portability
- Risk outlook analytics for upcoming exposure and repeat non-compliance patterns
- Built on MIE's
@mieweb/uicomponent library: dark mode + Enterprise Health brand with a runtime brand switcher, plus the DataVis NITRO data grid on the large operational/audit tables
Status
- All planned sprints (0–7) are implemented and merged to
main; Sprint 7 issues#47–#51are closed. - Sprint 8 scoped-run parity, the 8-way CI test-sharding speedup (~3.8×), the MIE Container Manager v1 API deploy migration, and the
@mieweb/uifrontend migration (PR #68) are all merged. - Strategic roadmap underway (tracked as GitHub issues
#71–#78): the engine is being decomposed into reusable ports/adapters so real EHR/FHIR data can plug in later. E1 — reusable measure engine ports/adapters (PR #95, epic #71) is merged. Next: E2 — declarative YAML measures (#72). - Default branch:
main(feature branches deleted after merge).
Production surfaces
- Live frontend:
https://twh.os.mieweb.org - Live backend API:
https://twh-api.os.mieweb.org
The earlier Vercel + Fly.io public-preview stack (
workwell-measure-studio.vercel.app,workwell-measure-studio-api.fly.dev) is decommissioned. MIE TWH is the sole live deployment.
Technology stack
- Backend: Java 21, Spring Boot 3.x, Gradle Kotlin DSL, PostgreSQL 16, Flyway
- Frontend: Next.js 16 App Router, TypeScript, Tailwind 4,
@mieweb/ui(dark mode + Enterprise Health brand + runtime brand switcher), Monaco - CQL/FHIR: HAPI FHIR +
org.opencds.cqf.fhir:cqf-fhir-cr3.26.0 - Infra: MIE Create-a-Container (primary), Neon, GitHub Actions
Repository layout
backend/API, CQL evaluation, caseflow, exports, security, MCPfrontend/dashboard, Studio, admin, login, UX surfacesdocs/architecture, data model, deploy, runbooks, sprint and journal historye2e/Playwright tests
Quick start
Prerequisites
- Java 21
- Node.js 20+
- npm (or pnpm if installed locally)
Backend
cd backend
./gradlew.bat test
./gradlew.bat bootRun
Frontend
cd frontend
npm install
npm run lint
npm run build
npm run dev
Headless evaluation (patient + YAML → compliant?)
Measure bindings are declarative YAML files (backend/src/main/resources/measures/*.yaml, one per
runnable measure, sibling to its CQL). The engine can answer compliance for an arbitrary FHIR R4
patient bundle with no server and no database:
cd backend
./gradlew.bat evaluateMeasure --args="path/to/patient-bundle.json src/main/resources/measures/audiogram.yaml"
{
"subjectId" : "demo-patient-1",
"measure" : "Audiogram",
"outcome" : "COMPLIANT",
"evidence" : { "expressionResults" : [ { "define" : "Days Since Last Audiogram", "result" : 100 }, "..." ] }
}
Verification commands
# backend
cd backend
./gradlew.bat test
# frontend
cd ../frontend
npm run lint
npm run test
npm run build
Key routes
/programscompliance overview/programs/[measureId]trend, drivers, risk outlook/runsrun history and detail/casescase worklist and filters/cases/[id]evidence, actions, timeline/measurescatalog/studio/[id]measure authoring/adminintegration and scheduler controls
API highlights
POST /api/measures/{id}/ai/draft-cqlPOST /api/measures/{id}/ai/generate-test-fixturesGET /api/programs/{measureId}/risk-outlook?horizonDays=30GET /api/measures/{measureId}/versions/{versionId}/export/mat?format=xmlPOST /api/runs/manualPOST /api/runs/{id}/rerunGET /api/cases?status=openGET /api/exports/runs?format=csvGET /api/auditor/cases/{caseId}/packet?format=json|html
For full API surface and behavioral notes, see docs linked below.
Documentation map
Engineering and governance notes
- AI assist is constrained by
docs/AI_GUARDRAILS.md; compliance remains CQL-derived only. - Public API audit actor is always security-context derived.
- Evidence download/upload operations are role-gated and audited.
- Production startup enforces auth, JWT, and CORS safety checks.
Community and contribution
License
Licensed under the Apache License 2.0.