diff --git a/signal-ui/src/App.jsx b/signal-ui/src/App.jsx index 9ae093f..e10098e 100644 --- a/signal-ui/src/App.jsx +++ b/signal-ui/src/App.jsx @@ -21,15 +21,16 @@ function AppInner() { const [importLabel, setImportLabel] = useState("No data imported"); const csvImportRef = useRef(null); - // New flag names from backend v0.2 const supplyLapsed = records.filter((r) => r.flag === "SUPPLY_LAPSED").length; const visitRequired = records.filter((r) => r.flag === "VISIT_REQUIRED").length; const renewalCritical = records.filter((r) => r.flag === "RENEWAL_CRITICAL").length; const renewalElevated = records.filter((r) => r.flag === "RENEWAL_ELEVATED").length; + const renewalSoon = records.filter((r) => r.flag === "RENEWAL_SOON").length; const transferPending = records.filter((r) => r.flag === "TRANSFER_PENDING").length; const refill = records.filter((r) => r.flag === "RESUPPLY_READY").length; const okCount = records.filter((r) => r.flag === "ACTIVE").length; - const urgent = supplyLapsed + visitRequired + renewalCritical + renewalElevated + transferPending; + const escalateCount = visitRequired + renewalCritical; + const outreachCount = renewalSoon + renewalElevated; const handleResults = useCallback(async (file) => { const label = new Date().toLocaleDateString("en-US", { @@ -71,9 +72,9 @@ function AppInner() {
{/* Sidebar */} csvImportRef.current?.trigger()} @@ -111,19 +112,19 @@ function AppInner() {
+ -
diff --git a/signal-ui/src/components/Sidebar.jsx b/signal-ui/src/components/Sidebar.jsx index 28edba1..a41d230 100644 --- a/signal-ui/src/components/Sidebar.jsx +++ b/signal-ui/src/components/Sidebar.jsx @@ -1,7 +1,7 @@ export default function Sidebar({ - oocCount, - visitDueCount, - refillCount, + supplyLapsedCount, + escalateCount, + clearToShipCount, activeFilter, onFilterChange, onImportClick, @@ -14,23 +14,24 @@ export default function Sidebar({ badge: null, }, { - label: "Resupply Ready", - key: "REFILL_WINDOW", - icon: "⚠", - badge: refillCount, + label: "Docs Required", + key: "SUPPLY_LAPSED", + icon: "!", + badge: supplyLapsedCount, badgeWarn: true, }, { - label: "Renewal Due", - key: "VISIT_DUE", - icon: "⚡", - badge: visitDueCount, + label: "Escalate", + key: "escalate", + icon: "!", + badge: escalateCount, + badgeWarn: true, }, { - label: "Supply Lapsed", - key: "OUT_OF_COVERAGE", - icon: "✕", - badge: oocCount, + label: "Clear to Ship", + key: "RESUPPLY_READY", + icon: "✓", + badge: clearToShipCount, }, ]; diff --git a/signal-ui/src/components/WorklistTable.jsx b/signal-ui/src/components/WorklistTable.jsx index 1a0f4f8..5ce0694 100644 --- a/signal-ui/src/components/WorklistTable.jsx +++ b/signal-ui/src/components/WorklistTable.jsx @@ -24,14 +24,13 @@ function scoreClass(priority) { const FILTERS = [ { key: "all", label: "All" }, - { key: "SUPPLY_LAPSED", label: "Supply Lapsed" }, - { key: "VISIT_REQUIRED", label: "Visit Required" }, - { key: "RENEWAL_CRITICAL", label: "Renewal Critical" }, - { key: "RENEWAL_ELEVATED", label: "Renewal Elevated" }, - { key: "RENEWAL_SOON", label: "Renewal Due" }, - { key: "RESUPPLY_READY", label: "Resupply Ready" }, - { key: "ACTIVE", label: "Active" }, - { key: "TRANSFER_PENDING", label: "Transfer" }, + { key: "SUPPLY_LAPSED", label: "Docs Required" }, + { key: "escalate", label: "Escalate" }, + { key: "RENEWAL_ELEVATED", label: "Confirm Appt." }, + { key: "RENEWAL_SOON", label: "Begin Outreach" }, + { key: "RESUPPLY_READY", label: "Clear to Ship" }, + { key: "TRANSFER_PENDING", label: "New Patient" }, + { key: "ACTIVE", label: "On Track" }, ]; const HIGH_PRIORITY_FLAGS = ["SUPPLY_LAPSED", "VISIT_REQUIRED", "RENEWAL_CRITICAL", "TRANSFER_PENDING"]; @@ -55,6 +54,8 @@ export default function WorklistTable({ records, activeFilter, onFilterChange }) const filtered = activeFilter === "all" ? localRecords + : activeFilter === "escalate" + ? localRecords.filter((r) => r.flag === "RENEWAL_CRITICAL" || r.flag === "VISIT_REQUIRED") : localRecords.filter((r) => r.flag === activeFilter); const todayStr = new Date().toLocaleDateString("en-US", {