TreatmentType and ProsthesisType database shcema and data updated. Lab dispatch wired through new data.

This commit is contained in:
2026-07-06 20:40:19 +03:30
parent 3e81c110a3
commit 667b08ed0c
48 changed files with 1813 additions and 275 deletions

View File

@@ -18,6 +18,9 @@ export interface LabCaseTask {
id: string;
tooth: string;
treatmentType: string;
prosthesisTypeCode: string;
prosthesisTypeLabel: string;
workflowStepCode?: string;
stepOrder: number;
stepLabel: string;
status: LabTaskStatus;
@@ -31,6 +34,8 @@ export interface LabCaseTask {
export interface LabCaseTasksByTooth {
tooth: string;
treatmentType: string;
prosthesisTypeCode: string;
prosthesisTypeLabel: string;
tasks: LabCaseTask[];
}
@@ -100,6 +105,8 @@ export interface LabTaskListItem {
labCaseId: string;
tooth: string;
treatmentType: string;
prosthesisTypeCode: string;
prosthesisTypeLabel: string;
stepOrder: number;
stepLabel: string;
status: LabTaskStatus;

View File

@@ -3,4 +3,11 @@ export interface TreatmentCatalogEntry {
code: string;
labDependent: boolean;
sortOrder: number;
label: string;
}
export interface ProsthesisCatalogEntry {
code: string;
sortOrder: number;
label: string;
}

View File

@@ -51,15 +51,14 @@ export interface TreatmentAttachmentMeta {
sizeBytes: number;
}
export const TREATMENT_TYPES = [
'consultation',
'filling',
'endo',
'visit',
'hygiene',
] as const;
export type TreatmentType = string;
export type TreatmentType = (typeof TREATMENT_TYPES)[number];
export interface LabCaseToothProsthesisDraft {
/** Treatment detail client id in the UI; mapped to UUID when saving. */
detailClientId: string;
tooth: string;
prosthesisTypeCode: string;
}
export interface LabCaseSendInfo {
organizationId: string;
@@ -99,6 +98,11 @@ export interface PastLabCase {
treatmentType: string;
teeth: FdiToothId[];
}>;
toothProsthesis?: Array<{
treatmentDetailId: string;
tooth: string;
prosthesisTypeCode: string;
}>;
sends?: LabCaseSendInfo[];
}
@@ -141,6 +145,7 @@ export interface LabCaseDraft {
destinationOrganizationId: string | null;
labComment: string;
detailClientIds: string[];
toothProsthesis: LabCaseToothProsthesisDraft[];
sentAt?: string | null;
sends?: LabCaseSendInfo[];
}
@@ -163,6 +168,11 @@ export interface SaveLabCasePayload {
destinationOrganizationId?: string;
labComment?: string;
treatmentDetailIds: string[];
toothProsthesis?: Array<{
treatmentDetailId: string;
tooth: string;
prosthesisTypeCode: string;
}>;
}
export interface SaveTreatmentPayload {
@@ -185,4 +195,5 @@ export interface LabCaseResponse {
teeth: string[];
}>;
sends: LabCaseSendInfo[];
toothProsthesis?: LabCaseToothProsthesisDraft[];
}