patient_form_email table has one row per email Elation sent asking a patient to fill in the forms their appointment requires. It holds the address the email went to, when Elation queued it, when it went out, and how many attempts failed. Join appointment_id to appointment.id, patient_id to patient.id, and practice_id to practice.id.
This is how appointment forms reach patients. Forms that staff send by hand go out as Patient form requests instead. For how practices send forms, see Sending forms to patients.
This table’s columns and relationships are shown in the Hosted Database schema.
For reporting on but not limited to:
- Whether an appointment’s forms email actually went out
- Delivery problems by practice or period
- When an appointment’s forms were first asked for
- How long patients take to submit after the email
Before you query patient forms emails
Reading whether an email went out
Every forms email Elation queued is recorded, whether or not it went out. Read the outcome from two columns together:delivered_timeset: the email went out, even if earlier attempts failed.delivered_timenull andfailed_attempt_countabove 0: sending failed.delivered_timenull andfailed_attempt_countof 0: Elation has no record of sending it.
delivered_time a day after its sent_time did not go out. The vast majority do go out, so a practice with more than a handful of the last two cases is worth looking at.
sent_time is when Elation queued the email
delivered_time is when Elation handed the email to its email service, usually within seconds of sent_time. Neither is when the patient received or opened the message. Whether the email reached the inbox or bounced, and whether the patient opened it or the forms, is not recorded.
status is always sent
Elation writes status when it queues the email, so every row reads sent. It tells you nothing about the outcome; use delivered_time for that.
An email covers all of the appointment’s forms
There is one email per send, not one per form, and which forms it listed is not recorded. You can tell that an appointment’s patient was emailed, but not which of the appointment’s forms that email asked for. Who sent an email is not included either, and many go out automatically.An appointment can be emailed more than once
Use the earliestsent_time for an appointment_id as the point its forms were first asked for, and count distinct appointment_id rather than rows when you are counting appointments.
Emails for deleted appointments are kept
A row stays after its appointment is deleted, because the email was still sent. To leave those out, joinappointment and filter on its deletion_time. The row’s own deletion_time means something different: the record of the email was removed from Elation. Exclude those rows.