@peopl-health/nexus 6.0.0-dev.15839 → 6.0.0-dev.15840

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.
@@ -197,6 +197,8 @@ async function generateEscalationDraft({
197
197
  urgentUnassessedRedFlags: [...new Set(blocks.flatMap((block) => flagsByStatus(block).urgent))],
198
198
  unobtainableRedFlags: [...new Set(blocks.flatMap((block) => flagsByStatus(block).unobtainable))],
199
199
  missingCharacterization: textList(parsed?.missingCharacterization),
200
+ sufficientForDoctor: typeof parsed?.sufficientForDoctor === 'boolean' ? parsed.sufficientForDoctor : null,
201
+ blockingQuestion: parsed?.sufficientForDoctor === false ? trimmed(parsed?.blockingQuestion) || null : null,
200
202
  suggestCall: suggestCallOf(parsed?.suggestCall),
201
203
  sectionsUnavailable: context.degradedSections ?? [],
202
204
  };
@@ -123,6 +123,8 @@ const draftSchema = new mongoose.Schema({
123
123
  unassessedRedFlags: { type: [String], default: undefined },
124
124
  urgentUnassessedRedFlags: { type: [String], default: undefined },
125
125
  unobtainableRedFlags: { type: [String], default: undefined },
126
+ sufficientForDoctor: { type: Boolean, default: undefined },
127
+ blockingQuestion: { type: String, default: undefined },
126
128
  missingCharacterization: { type: [String], default: undefined },
127
129
  suggestCall: { type: suggestCallSchema, default: undefined },
128
130
  sectionsUnavailable: { type: [String], default: undefined },
@@ -1391,6 +1391,8 @@ async function generateBotDraft({ id, lease = null } = {}) {
1391
1391
  unassessedRedFlags: draft.unassessedRedFlags,
1392
1392
  urgentUnassessedRedFlags: draft.urgentUnassessedRedFlags,
1393
1393
  unobtainableRedFlags: draft.unobtainableRedFlags,
1394
+ sufficientForDoctor: draft.sufficientForDoctor,
1395
+ blockingQuestion: draft.blockingQuestion,
1394
1396
  missingCharacterization: draft.missingCharacterization,
1395
1397
  ...(draft.suggestCall && { suggestCall: draft.suggestCall }),
1396
1398
  ...(draft.sectionsUnavailable?.length && { sectionsUnavailable: draft.sectionsUnavailable }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peopl-health/nexus",
3
- "version": "6.0.0-dev.15839",
3
+ "version": "6.0.0-dev.15840",
4
4
  "description": "Core messaging and assistant library for WhatsApp communication platforms",
5
5
  "keywords": [
6
6
  "whatsapp",