Agrupar las tarjetas de CaMa y elegir el periodo en Trazabilidad
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { bars, grouped, hiddenNote, Mode, subsequentHistory, unavailable } from './bars';
|
||||
import { bars, grouped, hiddenNote, Mode, unavailable } from './bars';
|
||||
import { scenarioBars } from './figures';
|
||||
import { Reading } from './measures';
|
||||
|
||||
@@ -51,25 +51,6 @@ describe('bars', () => {
|
||||
)!;
|
||||
expect(g.groups[0].rows[1].text).toBe('3/10 · 30.0 %');
|
||||
});
|
||||
it('shows the form history within subsequent screening without treating missing answers as a category', () => {
|
||||
const r: Reading = {
|
||||
populations: {},
|
||||
strata: {
|
||||
round: { subsequent: { 'initial-population': 5 } },
|
||||
subsequent_history: {
|
||||
within_1_year: { 'initial-population': 1 },
|
||||
'3_or_more_years': { 'initial-population': 2 },
|
||||
no_data: { 'initial-population': 2 },
|
||||
},
|
||||
},
|
||||
};
|
||||
expect(subsequentHistory(r)).toEqual([
|
||||
{ label: 'Un año o menos', text: '1/5 · 20.0 %' },
|
||||
{ label: 'Dos años', text: '0/5 · 0.0 %' },
|
||||
{ label: 'Tres o más años', text: '2/5 · 40.0 %' },
|
||||
]);
|
||||
expect(subsequentHistory({ populations: {}, strata: {} })).toBeUndefined();
|
||||
});
|
||||
it('a group with no patients has no rate', () => {
|
||||
const r: Reading = {
|
||||
populations: {},
|
||||
@@ -353,7 +334,7 @@ describe('independent bars by group', () => {
|
||||
['0/0 · —', undefined],
|
||||
['0/0 · —', undefined],
|
||||
]);
|
||||
expect(empty.note).toContain('una categoría en cero significa');
|
||||
expect(empty.note).toBeUndefined();
|
||||
const unreconciled = grouped(mode({ complete: true }), () =>
|
||||
reading({ 'subsequent|NILM': 2 }, 5),
|
||||
)!;
|
||||
|
||||
Reference in New Issue
Block a user