F1b: user fixes
Use the existing Plotly card and registered Sankey trace. Build transition totals from the remaining stages and omit zero-flow links. Build the prevalence donut from the report counts, with a grey slice for missing sex and controls to highlight each recorded sex. Use grouped bars for M23 and separate age and sex stacks for M24. Use the existing stacked history style for M31 and put the M30 figure behind one page flag. Cover the builders and the existing TEA page case.
This commit is contained in:
@@ -31,7 +31,15 @@ export type FigureSpec =
|
||||
center: string;
|
||||
}
|
||||
| { kind: 'scenario-bars'; title: string; measure: string; catalog: Catalog; stratum: string }
|
||||
| { kind: 'counts'; title: string; measure: string; catalog: Catalog; axis: string }
|
||||
| {
|
||||
kind: 'counts';
|
||||
title: string;
|
||||
measure: string;
|
||||
catalog: Catalog;
|
||||
axis: string;
|
||||
bySex?: boolean;
|
||||
}
|
||||
| { kind: 'sankey' | 'sex-donut' | 'alterations'; title: string; measure: string }
|
||||
| {
|
||||
kind: 'age-stack' | 'age-share';
|
||||
title: string;
|
||||
@@ -61,6 +69,8 @@ export interface Catalog {
|
||||
faded?: string[];
|
||||
}
|
||||
|
||||
const TEA_ALTERATIONS_VALIDADAS = false;
|
||||
|
||||
const OLIVE = '#A8C243';
|
||||
const ROSE = '#C24269';
|
||||
|
||||
@@ -150,6 +160,7 @@ export const PAGES: Record<string, Page> = {
|
||||
kind: 'counts',
|
||||
title: 'Pacientes evaluados por resultado diagnóstico',
|
||||
measure: 'M23_PACIENTES_EVALUADOS',
|
||||
bySex: true,
|
||||
axis: 'Conteo (paciente)',
|
||||
catalog: {
|
||||
groups: [],
|
||||
@@ -178,29 +189,9 @@ export const PAGES: Record<string, Page> = {
|
||||
names: ['% de pacientes sin EEG', ''],
|
||||
},
|
||||
{
|
||||
kind: 'counts',
|
||||
kind: 'sankey',
|
||||
title: 'Casos por estatus',
|
||||
measure: 'M28_CASOS_POR_ESTADO',
|
||||
axis: 'Conteo (paciente)',
|
||||
catalog: {
|
||||
groups: [],
|
||||
categories: [
|
||||
{ code: 'mchat_only', label: 'Solo M-CHAT', color: '#B8433A', group: '' },
|
||||
{
|
||||
code: 'psychology',
|
||||
label: 'Hasta evaluación psicológica',
|
||||
color: '#42C29C',
|
||||
group: '',
|
||||
},
|
||||
{
|
||||
code: 'neuropediatrics',
|
||||
label: 'Hasta evaluación neuropediátrica',
|
||||
color: '#7184A2',
|
||||
group: '',
|
||||
},
|
||||
{ code: 'eeg', label: 'Con EEG', color: OLIVE, group: '' },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
kind: 'counts',
|
||||
@@ -216,6 +207,20 @@ export const PAGES: Record<string, Page> = {
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
kind: 'sex-donut',
|
||||
title: 'Prevalencia registrada de TEA',
|
||||
measure: 'M31_PREVALENCIA',
|
||||
},
|
||||
...(TEA_ALTERATIONS_VALIDADAS
|
||||
? ([
|
||||
{
|
||||
kind: 'alterations',
|
||||
title: 'Porcentaje de EEG normal y anormal',
|
||||
measure: 'M30_RESULTADO_EEG',
|
||||
},
|
||||
] satisfies FigureSpec[])
|
||||
: []),
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -569,10 +574,15 @@ export const HISTORY: Record<string, History> = {
|
||||
measure: 'M25_DIAS_MCHAT_DIAGNOSTICO',
|
||||
kind: 'median',
|
||||
},
|
||||
stack('Progresión del proceso diagnóstico', 'M23_PACIENTES_EVALUADOS', 'Pacientes', [
|
||||
['confirmed', 'Diagnóstico confirmado', '#A8C243'],
|
||||
['in_process', 'En proceso', '#B8433A'],
|
||||
]),
|
||||
stack(
|
||||
'Pacientes evaluados por resultado diagnóstico',
|
||||
'M23_PACIENTES_EVALUADOS',
|
||||
'Pacientes',
|
||||
[
|
||||
['confirmed', 'Diagnóstico confirmado', '#A8C243'],
|
||||
['in_process', 'En proceso', '#B8433A'],
|
||||
],
|
||||
),
|
||||
{
|
||||
title: 'Porcentaje de confirmación diagnóstica',
|
||||
measure: 'M24_CONFIRMACION_DIAGNOSTICO',
|
||||
@@ -588,7 +598,7 @@ export const HISTORY: Record<string, History> = {
|
||||
measure: 'M22_DIAGNOSTICADOS_SIN_EEG',
|
||||
kind: 'percent',
|
||||
},
|
||||
stack('Flujo del proceso diagnóstico y estudios de EEG', 'M28_CASOS_POR_ESTADO', 'Casos', [
|
||||
stack('Casos por estatus', 'M28_CASOS_POR_ESTADO', 'Casos', [
|
||||
['mchat_only', 'Solo M-CHAT', '#B8433A'],
|
||||
['psychology', 'Hasta evaluación psicológica', '#42C29C'],
|
||||
['neuropediatrics', 'Hasta evaluación neuropediátrica', '#7184A2'],
|
||||
@@ -600,10 +610,14 @@ export const HISTORY: Record<string, History> = {
|
||||
['not_analyzed', 'Sin analizar', GREY],
|
||||
]),
|
||||
{
|
||||
title: 'Porcentaje de EEG con alteraciones',
|
||||
title: 'Porcentaje de EEG normal y anormal',
|
||||
measure: 'M30_RESULTADO_EEG',
|
||||
kind: 'percent',
|
||||
},
|
||||
stack('Prevalencia registrada de TEA', 'M31_PREVALENCIA', 'Niños', [
|
||||
['confirmed', 'Diagnóstico confirmado', OLIVE],
|
||||
['in_population', 'Sin diagnóstico confirmado', GREY],
|
||||
]),
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user