Pantalla: Alertas Predictivas
Identificador: SCR-NTF-004
Modulo: MTS-NTF-001 - Notificaciones Inteligentes
Version: 1.0.0
Fecha: 2025-12-05
Autor: MobileUxUiDrone (Eight of Eight)
Estado: Especificado
FASE: 2 - Value
| Atributo |
Valor |
| Nombre |
Alertas Predictivas |
| Proposito |
Configuracion de alertas proactivas basadas en prediccion de omision |
| Tipo |
Full Screen |
| Acceso |
SCR-NTF-001 > "Alertas predictivas" |
| Prioridad |
Media |
| Disponibilidad |
Solo Perfect tier |
2. Wireframe ASCII
2.1. Estado: Configuracion de Alertas Predictivas
+------------------------------------------+
| [<] Alertas Predictivas |
+------------------------------------------+
| |
| ┌─────────────────────────────────────┐ |
| │ 🔮 Alertas predictivas [ON] │ |
| │ │ |
| │ El sistema enviara alertas extras │ |
| │ cuando prediga alta probabilidad │ |
| │ de omision. │ |
| └─────────────────────────────────────┘ |
| |
| PREDICCION PARA HOY |
| ┌─────────────────────────────────────┐ |
| │ │ |
| │ Riesgo de omision: BAJO 🟢 │ |
| │ │ |
| │ No se detectan factores de riesgo │ |
| │ significativos para hoy. │ |
| │ │ |
| │ Factores analizados: │ |
| │ • Dia de semana: Martes (bajo) │ |
| │ • Racha activa: 15 dias (bajo) │ |
| │ • Hora proxima: 14:00 (medio) │ |
| │ │ |
| └─────────────────────────────────────┘ |
| |
| CONFIGURACION |
| ───────────────────────────────────── |
| |
| Umbral de riesgo para alertar |
| ┌─────────────────────────────────────┐ |
| │ [○ Bajo] [● Medio] [○ Alto] │ |
| │ │ |
| │ Medio: Alertara cuando riesgo > 50%│ |
| └─────────────────────────────────────┘ |
| |
| Anticipacion de alerta |
| ┌─────────────────────────────────────┐ |
| │ [○ 15 min] [● 30 min] [○ 60 min] │ |
| │ │ |
| │ La alerta preventiva se enviara │ |
| │ 30 minutos antes de la toma. │ |
| └─────────────────────────────────────┘ |
| |
| Incluir racha en alerta |
| ┌─────────────────────────────────────┐ |
| │ [ON] Mostrar racha actual para │ |
| │ motivacion adicional │ |
| └─────────────────────────────────────┘ |
| |
| ESTADISTICAS DE PRECISION |
| ┌─────────────────────────────────────┐ |
| │ Ultimos 30 dias │ |
| │ │ |
| │ Omisiones predichas: 8 │ |
| │ Omisiones reales: 6 │ |
| │ Precision: 75% │ |
| │ Falsas alarmas: 2 │ |
| └─────────────────────────────────────┘ |
| |
+------------------------------------------+
2.2. Prediccion de Riesgo Alto
+------------------------------------------+
| [<] Alertas Predictivas |
+------------------------------------------+
| |
| ┌─────────────────────────────────────┐ |
| │ 🔮 Alertas predictivas [ON] │ |
| └─────────────────────────────────────┘ |
| |
| PREDICCION PARA HOY |
| ┌─────────────────────────────────────┐ |
| │ │ |
| │ Riesgo de omision: ALTO 🔴 │ |
| │ │ |
| │ ⚠️ Detectamos factores de riesgo │ |
| │ para tu toma de las 14:00 │ |
| │ │ |
| │ Factores contribuyentes: │ |
| │ ┌────────────────────────────────┐ │ |
| │ │ • Sabado (historico bajo) 40% │ │ |
| │ │ • Hora mediodia (problematico) │ │ |
| │ │ 25% │ │ |
| │ │ • Sin acceso app > 2h: 15% │ │ |
| │ └────────────────────────────────┘ │ |
| │ │ |
| │ Riesgo total calculado: 68% │ |
| │ │ |
| │ Se enviara alerta preventiva │ |
| │ a las 13:30 │ |
| │ │ |
| └─────────────────────────────────────┘ |
| |
3. Componentes UI
| Propiedad |
Valor |
| Componente |
CMP-NTF-009 (PredictiveHeaderCard) NUEVO |
| Icono |
Bola de cristal |
| Toggle |
ON/OFF |
| Descripcion |
Texto explicativo |
3.2. Risk Prediction Card
| Propiedad |
Valor |
| Componente |
CMP-NTF-010 (RiskPredictionCard) NUEVO |
| Layout |
Badge de nivel + factores |
| Colores |
Verde (bajo), Amarillo (medio), Rojo (alto) |
| Factores |
Lista con porcentajes |
Niveles de Riesgo:
| Nivel |
Porcentaje |
Color |
Icono |
| Bajo |
< 40% |
success.500 |
🟢 |
| Medio |
40-60% |
warning.500 |
🟡 |
| Alto |
> 60% |
error.500 |
🔴 |
3.3. Threshold Selector
| Propiedad |
Valor |
| Componente |
CMP-INP-009 (SegmentedControl) |
| Opciones |
Bajo, Medio, Alto |
| Default |
Medio |
| Descripcion |
Texto explicativo debajo |
3.4. Anticipation Selector
| Propiedad |
Valor |
| Componente |
CMP-INP-009 (SegmentedControl) |
| Opciones |
15 min, 30 min, 60 min |
| Default |
30 min |
3.5. Precision Stats Card
| Propiedad |
Valor |
| Background |
neutral.50 |
| Layout |
Metricas en lista |
| Periodo |
Ultimos 30 dias |
4. Comportamientos
4.1. Calculo de Riesgo
El modelo ML local calcula riesgo basado en:
| Factor |
Peso |
| Dia de semana |
30% |
| Hora del dia |
25% |
| Racha actual |
20% |
| Ultimo acceso app |
15% |
| Eventos calendario |
10% |
4.2. Generacion de Alerta Preventiva
flowchart TD
A[Calcular riesgo] --> B{Riesgo > umbral?}
B -->|No| C[No enviar alerta]
B -->|Si| D[Programar alerta]
D --> E[Anticipacion configurada]
E --> F[Enviar push preventivo]
F --> G{Usuario confirma?}
G -->|Si| H[Cancelar alerta regular]
G -->|No| I[Enviar alerta regular]
4.3. Contenido de Alerta Preventiva
+------------------------------------------+
| RECORDATORIO PREVENTIVO |
+------------------------------------------+
| |
| Hola! Solo un recordatorio amigable |
| |
| Tienes una toma de Metformina |
| programada para las 14:00 |
| |
| Los sabados sueles tener mas |
| dificultad con esta toma. |
| |
| Llevas una racha de 15 dias! |
| No la pierdas |
| |
| [Entendido] [Configurar alerta] |
+------------------------------------------+
5. Datos Requeridos
interface PredictiveAlertsData {
isEnabled: boolean;
// Prediccion actual
currentPrediction: {
riskLevel: 'LOW' | 'MEDIUM' | 'HIGH';
riskPercentage: number;
factors: RiskFactor[];
nextAlertTime?: string;
scheduledPreventiveTime?: string;
};
// Configuracion
config: {
threshold: 'LOW' | 'MEDIUM' | 'HIGH';
anticipationMinutes: 15 | 30 | 60;
includeStreak: boolean;
};
// Estadisticas
stats: {
periodDays: number;
predictedOmissions: number;
actualOmissions: number;
precision: number;
falseAlarms: number;
};
}
interface RiskFactor {
name: string;
description: string;
contribution: number; // %
}
5.2. Output Events
| Evento |
Payload |
Destino |
| onToggle |
enabled |
Update config |
| onThresholdChange |
threshold |
Update config |
| onAnticipationChange |
minutes |
Update config |
| onStreakToggle |
enabled |
Update config |
6. Accesibilidad
6.1. Labels
| Elemento |
accessibilityLabel |
| Risk level |
"Riesgo de omision: {nivel}, {porcentaje}%" |
| Factor |
"{factor}: contribuye {X}%" |
| Threshold |
"Umbral: {nivel}" |
| Stats |
"{metrica}: {valor}" |
7. Metricas
7.1. Analytics Events
| Evento |
Parametros |
| screen_view |
screen_name: "predictive_alerts" |
| predictive_toggle |
enabled |
| threshold_change |
from, to |
| anticipation_change |
minutes |
8. Referencias
Documento generado por MobileUxUiDrone (Eight of Eight)