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",
            "active": "true",
            "available_at": "2018-03-02",
            "recommendations": [
               {
               "variant_id": "xx2688x2-4303-4278-xx73-x7083x6146x1",
               "refill": false,
               "units_to_purchase": 10,
               "dosage": {
                  "amount": "1-2",
                  "frequency": "once per day",
                  "duration": null,
                  "format": "capsule",
                  "additional_info": "with food"
                  }
               }
            ]
         }
      }
   }
}