Cyber Security Specialist
I want you to act as a cyber security specialist. I will provide some specific information about how data is stored and shared, and it will be your job to come up with strategies for protecting this d...
> Copiá estos prompts como comentarios arriba de los archivos o usalos en Copilot Chat.
Sign in to like and favorite skills
I want you to act as a cyber security specialist. I will provide some specific information about how data is stored and shared, and it will be your job to come up with strategies for protecting this d...
I want to act as a Statistician. I will provide you with details related with statistics. You should be knowledge of statistics terminology, statistical distributions, confidence interval, probabillit...
I want you to act as a scientific data visualizer. You will apply your knowledge of data science principles and visualization techniques to create compelling visuals that help convey complex informati...
Copiá estos prompts como comentarios arriba de los archivos o usalos en Copilot Chat.
Contexto: App de agenda accesible para pacientes con problemas de memoria. Stack: Java SE, Swing, JDBC, H2 embebido. Patrones: MVC + DAO + Observer (+ Strategy/Factory opcional). Objetivo: Recordatorios de medicación y rutinas con estados PENDIENTE/APLAZADO/PERDIDO/HECHO y reprogramación de próxima toma.
Generá DDL para H2 con estas relaciones: - Cuidador 1─N Paciente (paciente.cuidador_id FK) - Paciente 1─1 Rutina; Rutina 1─N ItemRutina - Paciente N─M Medicamento vía PacienteMedicamento (con: dosis, unidad, intervalo_min, ventana_min, hora_inicio, proxima_toma_at, activo boolean) - Recordatorio(paciente_id, tipo{MEDICACION,ACTIVIDAD,TURN0}, referencia_tipo{PAC_MED|ITEM_RUTINA}, referencia_id, programado_at, ventana_min, estado{PENDIENTE,APLAZADO,PERDIDO,HECHO}, motivo_estado) - Notificacion(recordatorio_id, emitida_at, canal_visual, canal_sonoro, entregada boolean) - Adherencia(recordatorio_id, registrada_at, accion{HECHO,OMITIDO,POSPUESTO}, observaciones) Incluí índices en FKs y búsquedas por paciente/fechas.
Escribí una clase ConexionDB con: - getConnection(): Connection a jdbc:h2:./data/db;AUTO_SERVER=TRUE - initSchemaIfAbsent(): ejecuta /db/schema.sql una sola vez (crear carpeta ./data si no existe) - manejo de excepciones claro; logs mínimos.
Creá interfaces: - PacienteDAO (crud + findByCuidador) - CuidadorDAO (crud + findAll) - MedicamentoDAO (crud + searchByNombre) - PacienteMedicamentoDAO: findActivosByPaciente, updateProximaToma, marcarInactivo, savePauta, findByPacienteYMedicamento - RecordatorioDAO: crearPendiente, pasarAplazado, pasarPerdido, marcarHecho, findPendientesByPacienteYFecha - AdherenciaDAO: registrarAccion, findByPacienteRangoFechas - NotificacionDAO: crear, marcarEntregada, findByRecordatorio Solo firmas. Sin frameworks.
Implementá los DAO anteriores con JDBC puro (PreparedStatement, try-with-resources). Extraé mapRow(ResultSet) para evitar duplicaciones. Manejá SQLExceptions como RuntimeException con mensajes claros.
Escribí un servicio con ScheduledExecutorService que: - Recorre PacienteMedicamento activos. - Si now >= proxima_toma_at - ventana_min y no hay recordatorio abierto -> crearPendiente - Si now > proxima_toma_at + ventana_min y sigue pendiente -> pasarAplazado + notificación - Si excede política de recuperación -> pasarPerdido - Al marcarHecho(hora_real): proxima_toma_at = hora_real + intervalo_min; cerrar recordatorio; registrarAdherencia Agregá método tick() para test manual y logs.
Ventana con pestañas: Hoy | Medicación | Rutina | Historial. En 'Hoy': tabla de recordatorios con estado y botones 'Hecho' (Alt+H), 'Posponer' (Alt+P); tooltips accesibles. Evitar layouts absolutos; usar BorderLayout/GridBagLayout; alto contraste y tamaño de fuente configurable.
Definí Subject/Observer minimalistas para notificar a la UI cuando cambian recordatorios/adherencia.
Pedir: "Refactorizá X eliminando duplicación, extraé mapRow, aplicá early return". Pedir: "Revisá manejo de recursos/errores en DAO Y". Pedir: "Generá casos de prueba manuales para máquina de estados PENDIENTE→APLAZADO→PERDIDO→HECHO".