Dibujar la ronda subsecuente por última detección y conectar diagnóstico a tratamiento de CaMa
This commit is contained in:
@@ -508,3 +508,27 @@ describe('independent bars by group', () => {
|
||||
expect(bars(mode as any, () => r)!.rows.map((x) => x.color)).toEqual(['#a', '#b']);
|
||||
});
|
||||
});
|
||||
|
||||
describe('the subsequent round by last screening', () => {
|
||||
it('draws each answer as its own group after the subsequent one', () => {
|
||||
const cell = (n: number) => ({ 'initial-population': n });
|
||||
const r: Reading = {
|
||||
populations: { 'initial-population': 3 },
|
||||
strata: {
|
||||
'round-category': { 'subsequent|NILM': cell(3) },
|
||||
'subsequent_history-category': { 'within_1_year|NILM': cell(2) },
|
||||
},
|
||||
};
|
||||
const catalog = [{ code: 'NILM', label: 'Normal', color: '#000' }];
|
||||
const found = grouped(
|
||||
{ kind: 'grouped', label: 'x', measure: 'M', catalog, unit: 'pacientes', stratum: 'round', order: ['subsequent'] },
|
||||
() => r,
|
||||
)!;
|
||||
expect(found.groups.map((g) => [g.code, g.total])).toEqual([
|
||||
['subsequent', 3],
|
||||
['within_1_year', 2],
|
||||
['2_years', 0],
|
||||
['3_or_more_years', 0],
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user