feature: a minimal v1 backend implemented for treatments feature.

This commit is contained in:
2026-05-19 22:29:29 +03:30
parent 935bb8c214
commit f743046b38
27 changed files with 1636 additions and 656 deletions

View File

@@ -0,0 +1,16 @@
import { generateTreatmentTitle, normalizeTeeth } from './treatment.utils';
describe('treatment.utils', () => {
it('normalizes valid FDI teeth', () => {
expect(normalizeTeeth(['45', '14', '14', '99'])).toEqual(['14', '45']);
});
it('generates a title from cases', () => {
expect(
generateTreatmentTitle([
{ treatmentType: 'filling', teeth: ['14', '15'] },
{ treatmentType: 'endo', teeth: ['45'] },
]),
).toBe('Filling 14, 15 · Endo 45');
});
});