feat(procedureCodes-dialog) - v2 done
This commit is contained in:
@@ -14,7 +14,8 @@
|
||||
"./client": "./src/index.ts",
|
||||
"./shared/schemas": "./shared/schemas/index.ts",
|
||||
"./usedSchemas": "./usedSchemas/index.ts",
|
||||
"./types": "./types/index.ts"
|
||||
"./types": "./types/index.ts",
|
||||
"./generated/prisma": "./generated/prisma/index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@prisma/adapter-pg": "^7.0.1",
|
||||
|
||||
@@ -37,10 +37,10 @@ model User {
|
||||
}
|
||||
|
||||
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?
|
||||
@@ -53,12 +53,12 @@ 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[]
|
||||
procedures AppointmentProcedure[]
|
||||
procedures AppointmentProcedure[]
|
||||
claims Claim[]
|
||||
groups PdfGroup[]
|
||||
payment Payment[]
|
||||
@@ -90,11 +90,11 @@ model Appointment {
|
||||
|
||||
eligibilityStatus PatientStatus @default(UNKNOWN)
|
||||
|
||||
patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
staff Staff? @relation(fields: [staffId], references: [id])
|
||||
procedures AppointmentProcedure[]
|
||||
claims Claim[]
|
||||
patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
staff Staff? @relation(fields: [staffId], references: [id])
|
||||
procedures AppointmentProcedure[]
|
||||
claims Claim[]
|
||||
|
||||
@@index([patientId])
|
||||
@@index([date])
|
||||
@@ -119,25 +119,24 @@ enum ProcedureSource {
|
||||
}
|
||||
|
||||
model AppointmentProcedure {
|
||||
id Int @id @default(autoincrement())
|
||||
appointmentId Int
|
||||
patientId Int
|
||||
id Int @id @default(autoincrement())
|
||||
appointmentId Int
|
||||
patientId Int
|
||||
|
||||
procedureCode String
|
||||
procedureLabel String?
|
||||
fee Decimal? @db.Decimal(10,2)
|
||||
fee Decimal? @db.Decimal(10, 2)
|
||||
|
||||
category String?
|
||||
isDirect Boolean @default(false)
|
||||
category String?
|
||||
|
||||
toothNumber String?
|
||||
toothSurface String?
|
||||
oralCavityArea String?
|
||||
|
||||
source ProcedureSource @default(MANUAL)
|
||||
comboKey String?
|
||||
source ProcedureSource @default(MANUAL)
|
||||
comboKey String?
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
appointment Appointment @relation(fields: [appointmentId], references: [id], onDelete: Cascade)
|
||||
patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
|
||||
@@ -146,7 +145,6 @@ model AppointmentProcedure {
|
||||
@@index([patientId])
|
||||
}
|
||||
|
||||
|
||||
model Claim {
|
||||
id Int @id @default(autoincrement())
|
||||
patientId Int
|
||||
|
||||
Reference in New Issue
Block a user