improvement: new prosthesis type data structure implemented and finally working!

This commit is contained in:
2026-09-01 21:03:04 +03:30
parent dc71c73ced
commit a3c14a18c1
51 changed files with 3306 additions and 1117 deletions

View File

@@ -35,6 +35,36 @@ describe('assertCompleteToothProsthesisMap', () => {
).not.toThrow();
});
it('passes when there are no FDI teeth but an arch sentinel is mapped', () => {
expect(() =>
assertCompleteToothProsthesisMap({
details: [
{
treatmentDetailId: prosthesisDetailId,
detail: { id: prosthesisDetailId, treatmentType: 'prosthesis', teeth: [] },
},
],
toothProsthesis: [
{ treatmentDetailId: prosthesisDetailId, tooth: 'UA', prosthesisTypeCode: 'full_denture' },
],
}),
).not.toThrow();
});
it('throws when a prosthesis detail has neither teeth nor an arch job', () => {
expect(() =>
assertCompleteToothProsthesisMap({
details: [
{
treatmentDetailId: prosthesisDetailId,
detail: { id: prosthesisDetailId, treatmentType: 'prosthesis', teeth: [] },
},
],
toothProsthesis: [],
}),
).toThrow(AppException);
});
it('throws when a prosthesis tooth is missing from the map', () => {
expect(() =>
assertCompleteToothProsthesisMap({