@peopl-health/nexus 5.75.4 → 5.75.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -401,7 +401,9 @@ class BaseLLMProvider {
|
|
|
401
401
|
};
|
|
402
402
|
const local = (at) => (at ? `${getCurrentMexicoDateTime(at)}${ago(at)}` : null);
|
|
403
403
|
const said = (message) => (message ? `${local(message.at)} — «${sanitizeInlineText(message.text)}»` : null);
|
|
404
|
+
const self = checkIn.reminderId ? `${checkIn.reminderId}${checkIn.dueAt ? `, programado para ${local(checkIn.dueAt)}` : ''}` : null;
|
|
404
405
|
const pending = lines([
|
|
406
|
+
['este check-in', self],
|
|
405
407
|
['lo que querías preguntarle', checkIn.question],
|
|
406
408
|
['por qué quedó abierto', checkIn.concern],
|
|
407
409
|
['qué dato esperabas', checkIn.awaiting],
|
|
@@ -424,6 +426,7 @@ class BaseLLMProvider {
|
|
|
424
426
|
'', '## Check-ins que ya le llegaron en las últimas 48 h', ...(sent.length ? sent : ['- ninguno']),
|
|
425
427
|
'',
|
|
426
428
|
`Cierra el turno con \`${OUTREACH_DECISION_TOOL}\`. Antes, revisa la conversación desde que quedó pendiente:`,
|
|
429
|
+
'- Este check-in es el seguimiento que está venciendo ahora, aunque lo veas programado unos minutos más tarde: ya no está pendiente y no se puede actualizar. Si decides esperar, programa uno nuevo.',
|
|
427
430
|
'- Si ya lo respondió, a ti o al equipo, no se lo vuelvas a preguntar. Si es una red de contingencia, resuélvela con setContingencyPlan y registra hold con hold_reason answered_since_armed.',
|
|
428
431
|
'- Si tu último mensaje ya le hace esta pregunta o la cubre, y ella estuvo activa hoy y dejó de contestar hace menos de 6 h, no la repitas hoy: programa la siguiente vez o resuélvela si ya no hace falta.',
|
|
429
432
|
'- Si sólo quedó una pregunta tuya sin respuesta y lleva 8 h o más en silencio, retomarla es justo para lo que existe este check-in: escríbele, salvo que sea de noche.',
|
|
@@ -96,6 +96,8 @@ async function planCheckInDue({ code, reminderId, type, question = '', firstName
|
|
|
96
96
|
if (await checkInsPausedUntil(code, now)) return { mode: 'stale', reason: 'patient_paused', planId };
|
|
97
97
|
checkIn = {
|
|
98
98
|
type,
|
|
99
|
+
reminderId,
|
|
100
|
+
dueAt: null,
|
|
99
101
|
question: netQuestion,
|
|
100
102
|
concern: net.carePlan.concern,
|
|
101
103
|
awaiting: net.carePlan.awaitingCharacterization,
|
|
@@ -111,6 +113,8 @@ async function planCheckInDue({ code, reminderId, type, question = '', firstName
|
|
|
111
113
|
if (await checkInsPausedUntil(code, now)) return { mode: 'stale', reason: 'patient_paused' };
|
|
112
114
|
checkIn = {
|
|
113
115
|
type,
|
|
116
|
+
reminderId,
|
|
117
|
+
dueAt: plan.fireAt || null,
|
|
114
118
|
question: plan.message || question,
|
|
115
119
|
concern: plan.windowReasoning,
|
|
116
120
|
awaiting: null,
|
package/lib/index.d.ts
CHANGED
|
@@ -468,7 +468,7 @@ declare module '@peopl-health/nexus' {
|
|
|
468
468
|
lastInboundAt?: string | null;
|
|
469
469
|
lastOutboundAt?: string | null;
|
|
470
470
|
lastOutreach?: string | null;
|
|
471
|
-
checkIn?: { type: string; question: string; concern?: string | null; awaiting?: string | null; armedAt?: string | null; urgency?: string | null; otherPlans?: number | null } | null;
|
|
471
|
+
checkIn?: { type: string; reminderId?: string | null; dueAt?: string | null; question: string; concern?: string | null; awaiting?: string | null; armedAt?: string | null; urgency?: string | null; otherPlans?: number | null } | null;
|
|
472
472
|
recentCheckIns?: string[];
|
|
473
473
|
exchange?: { patient: { at: string; text: string } | null; own: { at: string; text: string } | null; ownMessagesToday: number } | null;
|
|
474
474
|
asOf?: string | null;
|