2026-05-19 22:29:29 +03:30
|
|
|
import {
|
|
|
|
|
ArrayMinSize,
|
|
|
|
|
IsArray,
|
|
|
|
|
IsOptional,
|
|
|
|
|
IsString,
|
|
|
|
|
IsUUID,
|
|
|
|
|
MaxLength,
|
|
|
|
|
ValidateNested,
|
|
|
|
|
} from 'class-validator';
|
|
|
|
|
import { Type } from 'class-transformer';
|
|
|
|
|
|
2026-06-28 15:34:56 +03:30
|
|
|
export class SaveTreatmentDetailDto {
|
2026-05-19 22:29:29 +03:30
|
|
|
@IsString()
|
|
|
|
|
@MaxLength(64)
|
|
|
|
|
clientId: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsUUID()
|
|
|
|
|
id?: string;
|
|
|
|
|
|
2026-06-28 16:46:42 +03:30
|
|
|
@IsString()
|
|
|
|
|
@MaxLength(64)
|
2026-05-19 22:29:29 +03:30
|
|
|
treatmentType: string;
|
|
|
|
|
|
|
|
|
|
@IsArray()
|
|
|
|
|
@IsString({ each: true })
|
|
|
|
|
teeth: string[];
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
@MaxLength(5000)
|
|
|
|
|
comment?: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsArray()
|
|
|
|
|
@IsUUID(undefined, { each: true })
|
|
|
|
|
attachmentIds?: string[];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class SaveTreatmentDraftDto {
|
|
|
|
|
@IsArray()
|
|
|
|
|
@ArrayMinSize(1)
|
|
|
|
|
@ValidateNested({ each: true })
|
2026-06-28 15:34:56 +03:30
|
|
|
@Type(() => SaveTreatmentDetailDto)
|
|
|
|
|
details: SaveTreatmentDetailDto[];
|
2026-05-19 22:29:29 +03:30
|
|
|
}
|
|
|
|
|
|
2026-07-06 20:40:19 +03:30
|
|
|
export class LabCaseToothProsthesisDto {
|
|
|
|
|
@IsUUID()
|
|
|
|
|
treatmentDetailId: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@MaxLength(8)
|
|
|
|
|
tooth: string;
|
|
|
|
|
|
|
|
|
|
@IsString()
|
|
|
|
|
@MaxLength(64)
|
|
|
|
|
prosthesisTypeCode: string;
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-28 15:34:56 +03:30
|
|
|
export class SaveLabCaseDto {
|
|
|
|
|
@IsString()
|
|
|
|
|
@MaxLength(64)
|
|
|
|
|
clientId: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsUUID()
|
|
|
|
|
id?: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsUUID()
|
|
|
|
|
destinationOrganizationId?: string;
|
|
|
|
|
|
2026-07-10 15:26:36 +03:30
|
|
|
@IsUUID()
|
|
|
|
|
treatmentDetailId: string;
|
2026-07-06 20:40:19 +03:30
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsArray()
|
|
|
|
|
@ValidateNested({ each: true })
|
|
|
|
|
@Type(() => LabCaseToothProsthesisDto)
|
|
|
|
|
toothProsthesis?: LabCaseToothProsthesisDto[];
|
2026-07-07 18:43:10 +03:30
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsArray()
|
|
|
|
|
@IsUUID(undefined, { each: true })
|
|
|
|
|
attachmentIds?: string[];
|
2026-06-28 15:34:56 +03:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class SaveTreatmentLabCasesDto {
|
|
|
|
|
@IsArray()
|
|
|
|
|
@ValidateNested({ each: true })
|
|
|
|
|
@Type(() => SaveLabCaseDto)
|
|
|
|
|
labCases: SaveLabCaseDto[];
|
2026-05-19 22:29:29 +03:30
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export class ListPatientTreatmentHistoryDto {
|
|
|
|
|
@IsOptional()
|
|
|
|
|
limit?: number;
|
|
|
|
|
}
|