improvement: new prosthesis type data structure implemented and finally working!
This commit is contained in:
@@ -32,5 +32,16 @@ export function assertCompleteToothProsthesisMap(labCase: {
|
||||
throw new AppException(ErrorCode.TREATMENT_TOOTH_PROSTHESIS_INCOMPLETE, HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
if (teeth.length === 0) {
|
||||
const hasArchJob = labCase.toothProsthesis.some(
|
||||
(tp) =>
|
||||
tp.treatmentDetailId === link.treatmentDetailId &&
|
||||
(tp.tooth === 'UA' || tp.tooth === 'LA') &&
|
||||
Boolean(tp.prosthesisTypeCode),
|
||||
);
|
||||
if (!hasArchJob) {
|
||||
throw new AppException(ErrorCode.TREATMENT_TOOTH_PROSTHESIS_INCOMPLETE, HttpStatus.BAD_REQUEST);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user