@peopl-health/nexus 5.48.0-dev.7382 → 5.48.0-dev.7383

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.
@@ -148,6 +148,7 @@ async function readTasks(kind, whatsappId) {
148
148
  tasks: tasks.slice(0, MAX_ROWS),
149
149
  openCount: tasks.filter((task) => task.isOpen).length,
150
150
  attentionCount: tasks.filter((task) => task.needsAttention).length,
151
+ isUrgent: tasks.some((task) => task.needsAttention && task.isUrgent),
151
152
  };
152
153
  }
153
154
 
@@ -159,7 +160,11 @@ async function getPatientTasks(code) {
159
160
  cases: cases.tasks,
160
161
  openCount: requests.openCount + cases.openCount,
161
162
  attentionCount: requests.attentionCount + cases.attentionCount,
162
- attention: { cases: cases.attentionCount, requests: requests.attentionCount },
163
+ attention: {
164
+ cases: cases.attentionCount,
165
+ requests: requests.attentionCount,
166
+ isUrgent: requests.isUrgent || cases.isUrgent,
167
+ },
163
168
  options: { requestStatus: REQUEST_STATUSES, caseStatus: CASE_STATUSES, operationsStatus: OPERATIONS_STATUSES },
164
169
  };
165
170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "5.48.0-dev.7382",
3
+ "version": "5.48.0-dev.7383",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",