feat: MassHealth service history extraction, shown in Patient Details
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user