T17: sweep of the WebApp after the feature-parity work
Removed the legacy indicator layout, unused chart helpers, styles and exports, the card-actions component, fetch-all and explanatory comments; one pager shared by the four worklists, shared filter-row styles, one FHIR name and CURP reader, downloads through export/, the concept-map editor on Material controls.
This commit is contained in:
@@ -1,13 +1,7 @@
|
||||
import type {
|
||||
Bundle,
|
||||
DiagnosticReport,
|
||||
Measure,
|
||||
Observation,
|
||||
Patient,
|
||||
RiskAssessment,
|
||||
} from 'fhir/r4';
|
||||
import type { Bundle, DiagnosticReport, Observation, Patient, RiskAssessment } from 'fhir/r4';
|
||||
import { EXT } from '../fhir';
|
||||
import { donut, type Reading } from './measures';
|
||||
import { nestedDonut, shareDonut } from './figures';
|
||||
import type { Catalog } from './pages';
|
||||
import {
|
||||
ageMonths,
|
||||
associationRows,
|
||||
@@ -17,8 +11,6 @@ import {
|
||||
teaWorkbook,
|
||||
} from './tea-rows';
|
||||
|
||||
const measure: Measure = { resourceType: 'Measure', status: 'active' };
|
||||
const r: Reading = { strata: {}, populations: {}, score: 12, low: 7, high: 18 };
|
||||
const cssPair = 'spindles|central|CSS';
|
||||
const DAY = new Date('2026-11-30T12:00:00Z');
|
||||
|
||||
@@ -110,14 +102,34 @@ function fixture(): Bundle {
|
||||
}
|
||||
|
||||
describe('TEA indicators', () => {
|
||||
it('builds two concentric rings from the supplied counts', () => {
|
||||
const inner = { labels: ['Femenino'], values: [3] };
|
||||
const outer = { labels: ['Femenino · 16-23', 'Femenino · 24-29'], values: [2, 1] };
|
||||
expect(donut(measure, r, 'category', inner, outer).data).toEqual([
|
||||
expect.objectContaining(outer),
|
||||
expect.objectContaining(inner),
|
||||
it('builds the category and group rings from the supplied counts', () => {
|
||||
const catalog: Catalog = {
|
||||
groups: [{ id: 'female', label: 'Femenino', color: '#123456' }],
|
||||
categories: [
|
||||
{ code: 'female-16-23', label: 'Femenino · 16-23', group: 'female', color: '#123456' },
|
||||
{ code: 'female-24-29', label: 'Femenino · 24-29', group: 'female', color: '#123456' },
|
||||
],
|
||||
};
|
||||
const reading = {
|
||||
populations: {},
|
||||
strata: {
|
||||
category: {
|
||||
'female-16-23': { 'initial-population': 2 },
|
||||
'female-24-29': { 'initial-population': 1 },
|
||||
},
|
||||
},
|
||||
};
|
||||
expect(nestedDonut(reading, catalog, 'Pacientes').data).toEqual([
|
||||
expect.objectContaining({ name: 'centro' }),
|
||||
expect.objectContaining({ labels: ['Femenino'], values: [3] }),
|
||||
expect.objectContaining({
|
||||
labels: ['Femenino · 16-23', 'Femenino · 24-29'],
|
||||
values: [2, 1],
|
||||
}),
|
||||
]);
|
||||
expect(donut(measure, r).data).toHaveLength(1);
|
||||
expect(
|
||||
shareDonut(reading, catalog, 'Pacientes').data.filter((trace) => 'hole' in trace),
|
||||
).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('maps every search filter and encodes closed ranges as repeated ge/le values', () => {
|
||||
|
||||
Reference in New Issue
Block a user