feature: Phase3 - Task templates + generation on send

This commit is contained in:
2026-06-28 16:46:42 +03:30
parent 8b4ef6195d
commit 21f545ebdb
25 changed files with 1448 additions and 31 deletions

View File

@@ -0,0 +1,86 @@
export type LabTaskStatus = 'PENDING' | 'IN_PROGRESS' | 'COMPLETED';
export interface LabCaseListItem {
id: string;
sentAt: string | null;
clinic: { id: string; name: string };
patient: {
id: string;
firstName: string;
lastName: string;
mobile: string;
};
treatmentTypes: string[];
taskProgress: { completed: number; total: number };
}
export interface LabCaseTask {
id: string;
tooth: string;
treatmentType: string;
stepOrder: number;
stepLabel: string;
status: LabTaskStatus;
assigneeUserId: string | null;
assignee: { id: string; name: string; email: string } | null;
}
export interface LabCaseTasksByTooth {
tooth: string;
treatmentType: string;
tasks: LabCaseTask[];
}
export interface LabCaseDetail {
id: string;
sentAt: string | null;
labComment: string | null;
clinic: { id: string; name: string };
patient: {
id: string;
firstName: string;
lastName: string;
mobile: string;
};
appointmentStartAt: string | null;
treatmentTypes: string[];
details: Array<{
id: string;
treatmentType: string;
teeth: string[];
comment: string | null;
}>;
sends: Array<{
organizationId: string;
organizationName: string;
sentAt: string;
}>;
tasks: LabCaseTask[];
tasksByTooth: LabCaseTasksByTooth[];
taskProgress: { completed: number; total: number };
}
export interface AssignableMember {
userId: string;
name: string;
email: string;
isOwner: boolean;
}
export interface ListLabCasesParams {
q?: string;
page?: number;
limit?: number;
clinicOrganizationId?: string;
treatmentType?: string;
}
export interface PaginatedLabCases {
items: LabCaseListItem[];
pagination: {
page: number;
limit: number;
total: number;
totalPages: number;
};
}