improvement: patient search moved to the top of treatment feature.

This commit is contained in:
2026-08-22 20:11:43 +03:30
parent 50725b7b3f
commit b1405b22b1
10 changed files with 124 additions and 30 deletions

View File

@@ -70,7 +70,7 @@ type SentLabCaseRow = Prisma.LabCaseGetPayload<{ include: typeof sentLabCaseIncl
const treatmentInclude = {
patient: {
select: { id: true, firstName: true, lastName: true, isWalkIn: true },
select: { id: true, firstName: true, lastName: true, isWalkIn: true, mobile: true, email: true },
},
details: {
orderBy: [{ sortOrder: 'asc' as const }],
@@ -1366,6 +1366,8 @@ export class TreatmentsService {
firstName: string;
lastName: string;
isWalkIn: boolean;
mobile?: string | null;
email?: string | null;
};
details: Array<{
id: string;
@@ -1426,6 +1428,8 @@ export class TreatmentsService {
firstName: treatment.patient.firstName,
lastName: treatment.patient.lastName,
isWalkIn: treatment.patient.isWalkIn,
mobile: treatment.patient.mobile ?? null,
email: treatment.patient.email ?? null,
}
: null,
details: treatment.details.map((d) => this.mapDetail(d)),