feat: 7-state worklist framework — DMEPOS billing language

Labels: On Track, Clear to Ship, Begin Outreach, Confirm Appointment,
Escalate, Docs Required, New Patient

- SUPPLY_LAPSED → Docs Required
- VISIT_REQUIRED + RENEWAL_CRITICAL → Escalate
- RENEWAL_ELEVATED → Confirm Appointment
- RENEWAL_SOON → Begin Outreach
- RESUPPLY_READY → Clear to Ship (teal, checkmark, positive)
- ACTIVE → On Track
- TRANSFER_PENDING → New Patient (covers transfers + new CGM starts)
- Action text updated to DMEPOS billing staff language throughout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Kisa 2026-06-07 16:07:26 -04:00
parent bcb1a10fe6
commit 76386bf175
2 changed files with 79 additions and 74 deletions

View file

@ -115,25 +115,25 @@ DEVICE_DISPLAY = {
}
FLAG_LABELS = {
"SUPPLY_LAPSED": "Supply Lapsed",
"VISIT_REQUIRED": "Visit Required",
"TRANSFER_PENDING": "Needs Verification — Transfer",
"RENEWAL_CRITICAL": "Renewal Due — Critical",
"RENEWAL_ELEVATED": "Renewal Due SOON",
"RENEWAL_SOON": "Renewal Due SOON",
"RESUPPLY_READY": "Resupply Ready",
"ACTIVE": "Active",
"SUPPLY_LAPSED": "Docs Required",
"VISIT_REQUIRED": "Escalate",
"TRANSFER_PENDING": "New Patient",
"RENEWAL_CRITICAL": "Escalate",
"RENEWAL_ELEVATED": "Confirm Appointment",
"RENEWAL_SOON": "Begin Outreach",
"RESUPPLY_READY": "Clear to Ship",
"ACTIVE": "On Track",
}
FLAG_ACTIONS = {
"SUPPLY_LAPSED": "Contact Prescriber — Supply Lapsed",
"VISIT_REQUIRED": "Contact Prescriber — Visit Overdue",
"TRANSFER_PENDING": "Verify All Documentation",
"RENEWAL_CRITICAL": "Contact Prescriber — Confirm Visit Appointment",
"RENEWAL_ELEVATED": "Contact Prescriber — Schedule Qualifying Visit",
"RENEWAL_SOON": "Monitor — Visit Due in 90 Days",
"RESUPPLY_READY": "Initiate Resupply",
"ACTIVE": "No action needed",
"SUPPLY_LAPSED": "Pull patient file — verify documentation currency before initiating any new order",
"VISIT_REQUIRED": "Contact prescriber's office and patient directly — 6-month visit deadline has passed, no shipment until new visit is documented",
"TRANSFER_PENDING": "Obtain full documentation set (SWO, PECOS, PA, diagnosis) — Signal cannot assess status until records are on file",
"RENEWAL_CRITICAL": "Contact prescriber's office and patient directly — face-to-face appointment must be scheduled within 45 days",
"RENEWAL_ELEVATED": "Verify face-to-face appointment is on the calendar — follow up with prescriber's office if not yet confirmed",
"RENEWAL_SOON": "Contact prescriber's office to schedule the 6-month face-to-face visit",
"RESUPPLY_READY": "Initiate resupply order — patient is within the 30-day refill window",
"ACTIVE": "No action needed — documentation current, visit more than 90 days out",
}

View file

@ -1,67 +1,72 @@
const FLAG_CONFIG = {
SUPPLY_LAPSED: {
label: "Supply Lapsed",
bg: "bg-[rgba(180,0,0,0.12)]",
text: "text-[#B00000]",
border: "border-[#B00000]",
weight: "font-bold",
icon: "⚠",
},
VISIT_REQUIRED: {
label: "Visit Required",
bg: "bg-[rgba(220,30,30,0.10)]",
text: "text-[#CC2222]",
border: "border-[#CC2222]",
weight: "font-bold",
icon: "⚠",
},
TRANSFER_PENDING: {
label: "Needs Verification",
bg: "bg-[rgba(200,120,0,0.10)]",
text: "text-[#C87800]",
border: "border-[#C87800]",
weight: "font-semibold",
icon: "↔",
},
RENEWAL_CRITICAL: {
label: "Renewal Due — Critical",
bg: "bg-[rgba(220,60,0,0.10)]",
text: "text-[#DC3C00]",
border: "border-[#DC3C00]",
weight: "font-bold",
icon: "",
},
RENEWAL_ELEVATED: {
label: "Renewal Due SOON",
bg: "bg-[rgba(203,107,32,0.12)]",
text: "text-[#CB6B20]",
border: "border-[#CB6B20]",
weight: "font-semibold",
icon: "",
},
RENEWAL_SOON: {
label: "Renewal Due SOON",
bg: "bg-[rgba(203,107,32,0.08)]",
text: "text-[#CB6B20]",
border: "border-[#CB6B20]",
weight: "font-normal",
icon: "",
},
RESUPPLY_READY: {
label: "Resupply Ready",
bg: "bg-[rgba(46,163,163,0.10)]",
text: "text-[#1A7070]",
border: "border-[#2EA3A3]",
weight: "font-normal",
icon: "",
},
// 7-state display framework 8 enum values map to 7 visual states
// VISIT_REQUIRED and RENEWAL_CRITICAL both display as "Escalate"
// SUPPLY_LAPSED displays as "Docs Required"
// TRANSFER_PENDING displays as "New Patient"
ACTIVE: {
label: "Active",
label: "On Track",
bg: "bg-[rgba(40,160,80,0.10)]",
text: "text-[#1A8040]",
border: "border-[#28A050]",
weight: "font-normal",
icon: "",
icon: "●",
},
RESUPPLY_READY: {
label: "Clear to Ship",
bg: "bg-[rgba(46,163,163,0.12)]",
text: "text-[#1A7070]",
border: "border-[#2EA3A3]",
weight: "font-semibold",
icon: "✓",
},
RENEWAL_SOON: {
label: "Begin Outreach",
bg: "bg-[rgba(184,150,10,0.10)]",
text: "text-[#7A6000]",
border: "border-[#B8960A]",
weight: "font-normal",
icon: "→",
},
RENEWAL_ELEVATED: {
label: "Confirm Appointment",
bg: "bg-[rgba(203,107,32,0.12)]",
text: "text-[#8A4A00]",
border: "border-[#CB6B20]",
weight: "font-semibold",
icon: "○",
},
RENEWAL_CRITICAL: {
label: "Escalate",
bg: "bg-[rgba(204,34,34,0.10)]",
text: "text-[#CC2222]",
border: "border-[#CC2222]",
weight: "font-bold",
icon: "!",
},
VISIT_REQUIRED: {
label: "Escalate",
bg: "bg-[rgba(204,34,34,0.10)]",
text: "text-[#CC2222]",
border: "border-[#CC2222]",
weight: "font-bold",
icon: "!",
},
SUPPLY_LAPSED: {
label: "Docs Required",
bg: "bg-[rgba(155,68,0,0.10)]",
text: "text-[#7A3400]",
border: "border-[#9B4400]",
weight: "font-semibold",
icon: "!",
},
TRANSFER_PENDING: {
label: "New Patient",
bg: "bg-[rgba(74,104,144,0.10)]",
text: "text-[#2A4870]",
border: "border-[#4A6890]",
weight: "font-semibold",
icon: "+",
},
};