feature: Phase3 - Task templates + generation on send
This commit is contained in:
86
frontend/src/types/cases.ts
Normal file
86
frontend/src/types/cases.ts
Normal 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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user