feat: MassHealth service history extraction, shown in Patient Details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 08:38:13 -05:00
co-authored by Claude Opus 5.5
parent 1ee3b0cfc9
commit 33bea3822c
172 changed files with 4044 additions and 127 deletions
+18
View File
@@ -92,6 +92,7 @@ model Patient {
documents PatientDocument[]
conversation PatientConversation?
cloudFolders CloudFolder[] @relation("PatientCloudFolder")
serviceHistory PatientServiceHistory[]
@@index([insuranceId])
@@index([createdAt])
@@ -745,6 +746,23 @@ model PatientConversation {
@@map("patient_conversation")
}
// Snapshot of the MassHealth Service History table, replaced on each eligibility check
model PatientServiceHistory {
id Int @id @default(autoincrement())
patientId Int
procedureCode String
description String?
toothQuadArchSurface String?
placeOfService String?
serviceDate String? // as shown by the portal, e.g. 10/15/2026
createdAt DateTime @default(now())
patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
@@index([patientId])
@@map("patient_service_history")
}
model LabRxTemplate {
id Int @id @default(autoincrement())
userId Int