improvement: v1 standalone treatment/case creation made possible.

This commit is contained in:
2026-08-19 15:05:58 +03:30
parent e5c39c6b7e
commit 8bfa8c88fe
39 changed files with 3296 additions and 387 deletions

View File

@@ -10,6 +10,8 @@ export interface LabCaseProsthesisGroup {
export interface LabCaseListItem {
id: string;
sentAt: string | null;
startedAt?: string | null;
origin?: 'CLINIC_DISPATCH' | 'LAB_INTERNAL';
dueDate: string | null;
isOverdue: boolean;
isImportant: boolean;
@@ -86,16 +88,33 @@ export interface LabCaseAttachmentMeta {
mimeType: string;
sizeBytes: number;
createdAt: string;
detailClientKey?: string | null;
}
export interface LabCaseLine {
id: string;
clientId: string;
treatmentType: string;
teeth: string[];
toothSelectionGroups?: unknown;
comment: string | null;
}
export interface LabCaseDetail {
id: string;
sentAt: string | null;
startedAt?: string | null;
origin?: 'CLINIC_DISPATCH' | 'LAB_INTERNAL';
dueDate: string | null;
isOverdue: boolean;
isImportant: boolean;
/** Optional external lab-app code (e.g. exocad); used as PDF order number when set. */
externalCode?: string | null;
referringClinicName?: string | null;
referringDentistName?: string | null;
patientDisplayName?: string | null;
patientDisplayMobile?: string | null;
partnerClinicOrganizationId?: string | null;
clinic: { id: string; name: string };
patient: {
id: string;
@@ -111,8 +130,10 @@ export interface LabCaseDetail {
teeth: string[];
comment: string | null;
} | null;
lines?: LabCaseLine[];
toothProsthesis: Array<{
treatmentDetailId: string;
treatmentDetailId: string | null;
lineId?: string | null;
tooth: string;
prosthesisTypeCode: string;
selectionGroupId?: string;

View File

@@ -116,7 +116,7 @@ export interface PastLabCase {
toothSelectionGroups?: ToothSelectionGroup[];
} | null;
toothProsthesis?: Array<{
treatmentDetailId: string;
treatmentDetailId?: string | null;
tooth: string;
prosthesisTypeCode: string;
selectionGroupId?: string;
@@ -131,8 +131,15 @@ export interface PastTreatment {
id: string;
patientId: string;
appointmentId?: string | null;
providerUserId?: string | null;
title: string;
treatmentAt: string;
patient?: {
id: string;
firstName: string;
lastName: string;
isWalkIn: boolean;
} | null;
details: PastTreatmentDetail[];
labCases: PastLabCase[];
documents: TreatmentAttachmentMeta[];