Closed bmamlin closed 3 months ago
Fixed in c3b64de1b63a5fdf124f15bd7c025b43f1dc6f11
Done quite a bit differently than emailOptOut
.
Created a new table called patientportal_patient_email_subscriptions
with three important columns: person_id
, broadcast_email
, and appointment_reminder_email
. The email columns are tinyint(1)s (booleans effectively) that persist whether or not the person is subscribed to those emails
When creating a new patient, two checkboxes capture that info, and are checked by default. The person creating the patient account can opt to uncheck them
On each patients profile edit page, two checkboxes show the current subscriptions, and patients can check and uncheck at will
Add a user property (e.g.,
emailOptOut
) that, when the user property exists and is set to anything but "false" (case-insensitive), the system suppresses all email to that person's email address except for a password reset request.