@peopl-health/nexus 5.56.32 → 5.56.33
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.
|
@@ -15,7 +15,7 @@ const producedByOfTurn = (trace) => ({
|
|
|
15
15
|
|
|
16
16
|
const definition = {
|
|
17
17
|
name: 'submitRecommendationPlan',
|
|
18
|
-
description: '**Does:** Commits the symptom plan for THIS turn: ranked elements, each carrying its assessment fields AND its recommendation inline (rank/name/targets cannot diverge — one nested unit). Call ONCE per turn, AFTER submitSafetyGate on a triage turn (a chat turn may plan without a gate). Server-validated: contiguous ranks 1..N; denied symptoms excluded; main_recommendation 2-4 sentences; when_to_escalate ≤90 chars (auto-trimmed at a `;` boundary; required when the element escalates); every element delivers a patient-facing action (main_recommendation, otc_offer, or followup=team_referral); otc_offer only on chat turns and only complete (dose, frequency, duration, warnings) with non-null contraindications. Meds-need is carried solely by `recommendation.is_pharmacological_med_needed`; any element-level `are_meds_needed` is ignored. Repairs are disclosed in `auto_repairs`.\n\n**Required inputs:** `takeaways` (`safety_confirmation_needed`, `vital_risk_possible_now`, `summary_patient_facing`, `summary_internal`) and `elements[]` (each: `rank`, `type`, `name_short`, `targeted_ctcae_terms`, `why_relevant`, `escalation`, `recommendation`).\n\n**Returns:** `accepted`, `run_id`, `element_count`, `recommendation_ids` (rank order — reference these, never invent ids), `palliative_escalation`, `auto_repairs`.\n\n**Side effects:** persists the plan as a run-scoped FHIR ClinicalImpression + CarePlan + one Task per recommendation.',
|
|
18
|
+
description: '**Does:** Commits the symptom plan for THIS turn: ranked elements, each carrying its assessment fields AND its recommendation inline (rank/name/targets cannot diverge — one nested unit). Call ONCE per turn, AFTER submitSafetyGate on a triage turn (a chat turn may plan without a gate). Server-validated: contiguous ranks 1..N; denied symptoms excluded; main_recommendation 2-4 sentences; when_to_escalate ≤90 chars (auto-trimmed at a `;` boundary; required when the element escalates); every element delivers a patient-facing action (main_recommendation, otc_offer, or followup=team_referral); otc_offer only on chat turns and only complete (dose, frequency, duration, warnings) with non-null contraindications. Meds-need is carried solely by `recommendation.is_pharmacological_med_needed`; any element-level `are_meds_needed` is ignored. Repairs are disclosed in `auto_repairs`.\n\n**Required inputs:** `takeaways` (`safety_confirmation_needed`, `vital_risk_possible_now`, `summary_patient_facing`, `summary_internal`) and `elements[]` (each: `rank`, `type`, `name_short`, `targeted_ctcae_terms`, `why_relevant`, `escalation`, `recommendation`, `grounded_in`). `grounded_in` carries at least one quote copied word for word from what the patient wrote this turn — the words the element rests on, not a paraphrase. A plan that cites nothing commits with a quality warning.\n\n**Returns:** `accepted`, `run_id`, `element_count`, `recommendation_ids` (rank order — reference these, never invent ids), `palliative_escalation`, `auto_repairs`.\n\n**Side effects:** persists the plan as a run-scoped FHIR ClinicalImpression + CarePlan + one Task per recommendation.',
|
|
19
19
|
strict: false,
|
|
20
20
|
parameters: {
|
|
21
21
|
type: 'object',
|