improvement: new prosthesis type data structure implemented and finally working!
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user