feature: phase0 - Global patients + mobile normalization

This commit is contained in:
2026-06-28 14:49:37 +03:30
parent 653d67e15b
commit 64c7e5a257
23 changed files with 535 additions and 260 deletions

View File

@@ -96,7 +96,7 @@ export class AppointmentsService {
},
include: {
patient: {
select: { id: true, firstName: true, lastName: true, phone: true },
select: { id: true, firstName: true, lastName: true, mobile: true },
},
},
orderBy: [{ startAt: 'asc' }],
@@ -152,7 +152,7 @@ export class AppointmentsService {
},
include: {
patient: {
select: { id: true, firstName: true, lastName: true, phone: true },
select: { id: true, firstName: true, lastName: true, mobile: true },
},
},
});
@@ -215,7 +215,7 @@ export class AppointmentsService {
},
include: {
patient: {
select: { id: true, firstName: true, lastName: true, phone: true },
select: { id: true, firstName: true, lastName: true, mobile: true },
},
},
});
@@ -300,9 +300,9 @@ export class AppointmentsService {
}
}
private async ensurePatientInOrg(patientId: string, organizationId: string) {
const patient = await this.prisma.patient.findFirst({
where: { id: patientId, organizationId },
private async ensurePatientInOrg(patientId: string, _organizationId: string) {
const patient = await this.prisma.patient.findUnique({
where: { id: patientId },
select: { id: true },
});
if (!patient) {