Treatment plan created

The treatment_plan.created webhook is triggered when a treatment plan is activated. Treatment plans are created in draft mode. A practitioner or staff member activates a treatment plan to share it with the patient.

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.created",
      "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",
          "patient": {
            "id": "xx4688x2-4303-4278-xx73-x7083x6146x5"
          },
          "practitioner": {
            "id": "xx4432x2-4303-4278-xx73-x7083x7765x1"
          },
          "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"]
              }
            }
          ],
          "resources": [
            {
              "id": "7c9e03fd-c41a-45e8-9091-0d420408293b",
              "attachment_url": "https://api-us-snd.fullscript.io/api/clinic/resources/7c9e03fd-c41a-45e8-9091-0d420408293b/download?type=practitioner_resource",
              "category": "Lifestyle",
              "name": "logo",
              "type": "Handout"
            }
          ],
          "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"
                }
              ]
            }
          ]
        }
      }
    }
  }
}