Treatment plan recommendation updated

The treatment_plan.recommendation.updated webhook is triggered when an active treatment plan's details are changed. Includes adding a new variant, removing a variant, or updating a variant (i.e. going from the 60 capsule option to 30 capsule option). Specifically triggered by changes to any of the following attributes of an active treatment plan:

  • variant_id
  • refill
  • dosage.amount
  • dosage.frequency
  • dosage.duration
  • dosage.additional_info
  • dosage.format
  • quantity_recommended
  • treatment_plan_id
  • current_state
  • units_to_purchase

Details

Scopes needed:patients:treatment_plan_history
Event payload:a subset of the treatment plan object

Event payload

"event_payload": { "event": { "id": "x5xxxxx8-92x7-4xxx-9x0x-345x404x94x1", "type": "treatment_plan.recommendation.updated", "created_at": "2018-10-16T04:00:00.000Z", "clinic_id": "xx7x357x-9x36-xxxx-x553-7x3xx398xxx", "data": { "treatment_plan": { "id": "xx45x0xx-x840-41xx-9922-98xx6001507x", "state": "active", "partner_session_id": "visit-12345", "available_at": "2018-03-02", "recommendations": [ { "variant_id": "xx2688x2-4303-4278-xx73-x7083x6146x1", "refill": false, "units_to_purchase": 10, "take_with": "food", "dosage": { "amount": "1-2", "frequency": "once per day", "duration": null, "format": "capsule", "additional_info": "with food", "time_of_day": [ "morning" ] } } ], "lab_recommendations": [ { "id": "233df3fd-c41a-45e8-9091-0d420408293b", "name": "Lab Test 1", "requires_fasting": false, "instructions": "Instructions for Lab Company 1", "tests": [{ "id": "5ccf88ae-532e-41c1-9404-1142fbf7c4f7", "name": "Basic Metabolic Panel" }] } ] } } } }

partner_session_id is the partnerSessionId your app passed when it launched the Fullscript Embed session linked to this plan, or null.