Events

Here are the events each feature triggers.

Treatment Plan

EventDescription
patient.selectedFired when a practitioner creates or selects a patient. The data returned identifies the selected patient. You can store the Fullscript patient id with your local patient data to avoid triggering a search next time a practitioner creates a treatment plan for this patient. Event details found below.
treatmentPlan.activatedFired when the practitioner or staff member finalizes the treatment plan. The data returned includes details about who created the plan, for which patient, and an array with the selected products and their details. Event details found below.

Event details for Treatment Plan: patient.selected

Here is a TypeScript definition for the patient.selected event data. For more information about possible values and formats, refer to the Fullscript Patient object in our REST API docs.

declare type PatientPayload = {
  patient: {
    id: string;
    firstName: string;
    lastName: string;
    email: string;
    dateOfBirth: string;
    biologicalSex: string;
    discount: number;
    totalDiscount: number;
    mobileNumber: string;
    textMessageNotification: boolean;
  };
};

Event details for Treatment Plan: activated

Here is a TypeScript definition for the treatmentPlan.activated event data. For more information about possible values and formats, refer to the Fullscript TreatmentPlan object in our REST API docs.

declare type TreatmentPlanPayload = {
  treatmentPlan: {
    id: string;
    state: string;
    patient: {
      id: string;
    };
    practitioner: {
      id: string;
    };
    availableAt: string;
    recommendations: {
      variantId: string;
      refill: boolean;
      unitsToPurchase: number;
      dosage: {
        recommendedAmount: string;
        recommendedFrequency: string;
        recommendedDuration: string;
        format: string;
        additionalInfo: string;
      };
    }[];
  };
};