UPSERTDATA(
"ET_Appointment_Action", 1,
"AppointmentID",@FamilyAppt,
"FamilyId",@familyid,
"PatientID",@PatientID,
"AppointmentDateTime",@FamilyApptTime,
"AppointmentClinicID",@ApptClinicID,
"ActionDateTime",@ActionDateTime,
"ActionType",@ActionType,
"Campaign_Name",@CampaignName,
"Send_id",@JobId,
"EventDate", RequestParameter('ed')
)