feat(patient-connection-page demo added)
This commit is contained in:
@@ -32,13 +32,14 @@ model User {
|
||||
notifications Notification[]
|
||||
cloudFolders CloudFolder[]
|
||||
cloudFiles CloudFile[]
|
||||
communications Communication[]
|
||||
}
|
||||
|
||||
model Patient {
|
||||
id Int @id @default(autoincrement())
|
||||
id Int @id @default(autoincrement())
|
||||
firstName String
|
||||
lastName String
|
||||
dateOfBirth DateTime @db.Date
|
||||
dateOfBirth DateTime @db.Date
|
||||
gender String
|
||||
phone String
|
||||
email String?
|
||||
@@ -51,14 +52,15 @@ model Patient {
|
||||
policyHolder String?
|
||||
allergies String?
|
||||
medicalConditions String?
|
||||
status PatientStatus @default(UNKNOWN)
|
||||
status PatientStatus @default(UNKNOWN)
|
||||
userId Int
|
||||
createdAt DateTime @default(now())
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
createdAt DateTime @default(now())
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
appointments Appointment[]
|
||||
claims Claim[]
|
||||
groups PdfGroup[]
|
||||
payment Payment[]
|
||||
communications Communication[]
|
||||
|
||||
@@index([insuranceId])
|
||||
@@index([createdAt])
|
||||
@@ -109,22 +111,22 @@ model Staff {
|
||||
}
|
||||
|
||||
model Claim {
|
||||
id Int @id @default(autoincrement())
|
||||
patientId Int
|
||||
appointmentId Int
|
||||
userId Int
|
||||
staffId Int
|
||||
patientName String
|
||||
memberId String
|
||||
dateOfBirth DateTime @db.Date
|
||||
remarks String
|
||||
id Int @id @default(autoincrement())
|
||||
patientId Int
|
||||
appointmentId Int
|
||||
userId Int
|
||||
staffId Int
|
||||
patientName String
|
||||
memberId String
|
||||
dateOfBirth DateTime @db.Date
|
||||
remarks String
|
||||
missingTeethStatus MissingTeethStatus @default(No_missing)
|
||||
missingTeeth Json? // { "T_14": "X", "T_G": "O", ... }
|
||||
serviceDate DateTime
|
||||
insuranceProvider String // e.g., "Delta MA"
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
status ClaimStatus @default(PENDING)
|
||||
missingTeeth Json? // { "T_14": "X", "T_G": "O", ... }
|
||||
serviceDate DateTime
|
||||
insuranceProvider String // e.g., "Delta MA"
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
status ClaimStatus @default(PENDING)
|
||||
|
||||
patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
|
||||
appointment Appointment @relation(fields: [appointmentId], references: [id], onDelete: Cascade)
|
||||
@@ -145,7 +147,7 @@ enum ClaimStatus {
|
||||
}
|
||||
|
||||
enum MissingTeethStatus {
|
||||
No_missing
|
||||
No_missing
|
||||
endentulous
|
||||
Yes_missing
|
||||
}
|
||||
@@ -378,3 +380,46 @@ model CloudFileChunk {
|
||||
@@unique([fileId, seq])
|
||||
@@index([fileId, seq])
|
||||
}
|
||||
|
||||
// patient-connection-
|
||||
enum CommunicationChannel {
|
||||
sms
|
||||
voice
|
||||
}
|
||||
|
||||
enum CommunicationDirection {
|
||||
outbound
|
||||
inbound
|
||||
}
|
||||
|
||||
enum CommunicationStatus {
|
||||
queued
|
||||
sent
|
||||
delivered
|
||||
failed
|
||||
completed
|
||||
busy
|
||||
no_answer
|
||||
}
|
||||
|
||||
model Communication {
|
||||
id Int @id @default(autoincrement())
|
||||
patientId Int
|
||||
userId Int?
|
||||
|
||||
channel CommunicationChannel
|
||||
direction CommunicationDirection
|
||||
status CommunicationStatus
|
||||
|
||||
body String?
|
||||
callDuration Int?
|
||||
twilioSid String?
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
// Relations
|
||||
patient Patient @relation(fields: [patientId], references: [id])
|
||||
user User? @relation(fields: [userId], references: [id])
|
||||
|
||||
@@map("communications")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user