feat: add Remaining/Third Party columns, toggle PDF viewer, retire CMSP as separate insurance type

- Add remainingBenefit and thirdPartyInsurance columns to Patient; extract both
  from the MassHealth accumulator/member-detail pages during the eligibility
  check and surface them in the eligibility table
- Add an updated-date display and a toggle to suppress the post-check PDF
  viewer popup (default off) on the insurance eligibility page
- Rename CMSP-prefixed PDF filenames and UI copy to MH, since CMSP and MH now
  share the same worker
- Fold CMSP into MassHealth/MH across patient/claim insurance-type dropdowns
  and the chatbot's eligibility routing, since they're the same insurance
- Remove auto-download of saved eligibility PDFs; downloading is now manual

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-02 22:32:43 -04:00
co-authored by Claude Sonnet 5
parent f8235787db
commit 52ddfd9f57
96 changed files with 561 additions and 160 deletions
+33 -31
View File
@@ -55,37 +55,39 @@ model User {
}
model Patient {
id Int @id @default(autoincrement())
firstName String
lastName String
dateOfBirth DateTime? @db.Date
gender String
phone String
email String?
address String?
city String?
zipCode String?
insuranceProvider String?
insuranceId String?
groupNumber String?
policyHolder String?
allergies String?
medicalConditions String?
preferredLanguage String? @default("English")
status PatientStatus @default(UNKNOWN)
userId Int
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id])
appointments Appointment[]
procedures AppointmentProcedure[]
claims Claim[]
groups PdfGroup[]
payment Payment[]
communications Communication[]
documents PatientDocument[]
conversation PatientConversation?
cloudFolders CloudFolder[] @relation("PatientCloudFolder")
id Int @id @default(autoincrement())
firstName String
lastName String
dateOfBirth DateTime? @db.Date
gender String
phone String
email String?
address String?
city String?
zipCode String?
insuranceProvider String?
insuranceId String?
groupNumber String?
policyHolder String?
allergies String?
medicalConditions String?
preferredLanguage String? @default("English")
status PatientStatus @default(UNKNOWN)
remainingBenefit String?
thirdPartyInsurance String?
userId Int
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
user User @relation(fields: [userId], references: [id])
appointments Appointment[]
procedures AppointmentProcedure[]
claims Claim[]
groups PdfGroup[]
payment Payment[]
communications Communication[]
documents PatientDocument[]
conversation PatientConversation?
cloudFolders CloudFolder[] @relation("PatientCloudFolder")
@@index([insuranceId])
@@index([createdAt])