Analytics & Insights Use Cases (ANL)¶
UC-ANL-001: Generate Tumor Board Digest¶
Purpose: Provide weekly summaries of key patient changes for tumor board review.
| Property | Value |
|---|---|
| Actor | Insights Service |
| Trigger | Scheduled job every Friday 04:00 IST |
| Priority | P2 |
Main Success Scenario:
1. Scheduler queries patients flagged for tumor board in next 7 days
2. For each patient, gather deltas (new labs, imaging, notes) since last digest
3. Run NLP summarizer to create bullet list (max 5 items) with citation links
4. Assemble PDF/HTML packet grouped by tumor board agenda order
5. Store artifacts in `reports/tumor-board/{date}` and notify oncologists via email + UI badge
6. Record delivery status and link digest ID to meeting record
Acceptance Criteria: 1. [ ] Digest generation completes within 10 minutes for 30 patients 2. [ ] Each bullet references source artifact (lab ID, imaging study) 3. [ ] Email + in-app notifications include secure deep link with JWT tokenization
UC-ANL-002: Compute Care Gap Scorecards¶
Purpose: Highlight overdue screenings or interventions per patient cohort.
| Property | Value |
|---|---|
| Actor | Population Analytics Worker |
| Trigger | Nightly ETL completion event |
| Priority | P1 |
Main Success Scenario:
1. Worker ingests canonical bundles into Spark/Delta Lake table `patient_events`
2. Join with clinical guidelines table (per cancer type) to build expected milestone list
3. Evaluate rules (e.g., "CBC within 14 days of chemo cycle")
4. Compute gap scores (0-100) per patient and aggregate per care team
5. Persist results to `care_gap_scores` table and publish to Redis for UI widgets
6. Emit `care_gap_scorecard_ready` event consumed by UI/notifications
Acceptance Criteria: 1. [ ] Rules configurable via YAML without redeploying worker 2. [ ] Score computation finishes < 30 min for 10k patients 3. [ ] Historical snapshots retained for 12 months for trend analysis
UC-ANL-003: Forecast Lab Trajectories¶
Purpose: Predict likelihood of critical lab breaches to allow proactive interventions.
| Property | Value |
|---|---|
| Actor | Predictive Analytics Service |
| Trigger | Lab bundle update event |
| Priority | P2 |
Main Success Scenario:
1. Event contains patientId + new lab results
2. Service pulls last 180 days of the same analyte (e.g., ANC)
3. Fit/update temporal model (Prophet/LSTM) per analyte + patient
4. Generate 7-day forecast with confidence intervals
5. If probability of breaching threshold > configurable limit, create "Forecast Alert"
6. Persist forecast curves for visualization in UI lab trends module
Acceptance Criteria: 1. [ ] Supports incremental model updates (online learning) 2. [ ] Forecasts available within 2 minutes of new lab ingestion 3. [ ] Alerts deduplicated per patient/analyte per day
UC-ANL-004: Build Quality KPI Dashboard¶
Purpose: Surface operational metrics (turnaround time, DLQ rate) to leadership dashboards.
| Property | Value |
|---|---|
| Actor | BI Pipeline |
| Trigger | Hourly data warehouse refresh |
| Priority | P2 |
Main Success Scenario:
1. ETL job aggregates metrics from ClickHouse/Prometheus exports into warehouse fact tables
2. Calculate KPIs (median OCR turnaround, % jobs in DLQ, API p95 latency) by site and modality
3. Load curated dataset into Looker/Power BI via incremental model
4. Apply row-level security so regional leads only see their hospitals
5. Cache tiles for 1h to keep dashboard responsive (<2s load)
6. Send anomaly notifications when KPI deviates >20% from baseline
Acceptance Criteria: 1. [ ] KPI refresh SLA < 15 minutes from source event 2. [ ] Data lineage documented for each metric (source table + transform) 3. [ ] Dashboard access audited (viewer, timestamp)