@peopl-health/nexus 6.4.25 → 6.4.26
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.
|
@@ -3,7 +3,7 @@ const { logger } = require('../utils/logger');
|
|
|
3
3
|
const { redactDirectIdentifiers } = require('../utils/sanitizerUtils');
|
|
4
4
|
const { URGENCY_RANK, getEscalationReview } = require('../models/escalationReviewModel');
|
|
5
5
|
const { readGroupMessageId } = require('../clinical/services/clinicalAirtableService');
|
|
6
|
-
const { escalationAutoHandoffLive, escalationPatientTimerLive, escalationUntakenAlertsLive } = require('../clinical/flags/escalationFlags');
|
|
6
|
+
const { escalationAutoHandoffLive, escalationPatientTimerLive, escalationUntakenAlertsLive, feverPatientTimerLive } = require('../clinical/flags/escalationFlags');
|
|
7
7
|
|
|
8
8
|
const { logPatientChange } = require('./patientService');
|
|
9
9
|
const { BUSINESS_HOURS_LEVELS, levelsOf, responseDeadlinePolicy, untakenStagesOf } = require('./reviewDeadlineService');
|
|
@@ -87,10 +87,11 @@ function pendingQuestionOf(review, clock) {
|
|
|
87
87
|
return question ? question.slice(0, MAX_QUESTION_LENGTH) : null;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
// The early asap alert says when the armed prompt gives the patient the numbers
|
|
90
|
+
// The early asap alert says when the armed prompt, the fever one included, gives the patient the numbers.
|
|
91
91
|
function patientPromptNote(review, stage, now) {
|
|
92
|
-
if (stage.stage !== 'early'
|
|
93
|
-
|
|
92
|
+
if (stage.stage !== 'early') return null;
|
|
93
|
+
const fever = currentAlarms(review).some((alarm) => alarm.category === FEVER_CATEGORY);
|
|
94
|
+
if (!(fever ? feverPatientTimerLive() : escalationPatientTimerLive())) return null;
|
|
94
95
|
// A leased or retried slot (attempts above 0) is already being sent.
|
|
95
96
|
if (review.doctorAlertKind !== 'patient_prompt' || (review.doctorAlertAttempts ?? 0) !== 0 || !review.doctorAlertDueAt) return null;
|
|
96
97
|
const lead = Math.round((new Date(review.doctorAlertDueAt).getTime() - now.getTime()) / 60000);
|