HealthShare Personal Community Appointments Setup Guide 1. Overview In Personal Community, members can manage their appointments both on the Home page and on the Appointments page. On the Home page, members can view details about their upcoming appointment (if they have one). This includes the date, time, address, and the option to download a calendar event to add the appointment to another calendar application. On the Appointments page, they can view both upcoming and past (or cancelled) appointments, which are in separate tabular views. Patients have the option to use telehealth for their appointment needs. 2. Filtering the Appointment List The appointments presented within the appointment lists can be filtered as needed. The filter can adjust the appointments that are present in the list as well as the actions that are available. This section describes the default appointment filter in Personal Community and the steps required to implement a custom appointment filter. 2.1. Default Appointment List Behavior The default, HSPortal.EHR.BaseFilters class is the configured Appointments Filter Class . This class does not filter out any appointments. See Creating a Custom Class for Appointment Filtering for information on extending this class to filter the appointment lists. By default, there is a 15 minute grace period before appointments transition from the Upcoming Appointments list to the Past Appointments list. During this grace period patients can select Join if a meeting link is available for the appointment, or select Pay if a payment link is available for the appointment. The actions available for appointments can be modified through logic updates in a custom appointment filter class. See Creating a Custom Class for Appointment Filtering for creating the custom class. 2.2. Creating a Custom Class for Appointment Filtering To create a custom class for filtering appointments, complete the following steps: In the appropriate namespace for your portal, create a class that extends the HSPortal.EHR.BaseFilters class. If an extension already exists, open it for editing. In that subclass, override the %FilterAppointments method. This method is called once for each appointment in the appointment list. For each appointment, the method should return: 1 to exclude that appointment from the list. 0 to include that appointment in the list. If desired, you can additionally modify the following fields within %FilterAppointments to further customize an appointment: pAppointment.PaymentLink – Controls the button to Pay, if payment link is present. If empty, no payment link will appear. pAppointment.MeetingLink – Controls the button to Join a meeting link, if a link is present. If empty, no telehealth link will appear. pAppointment.GracePeriodEnd – Modify this value to override the Grace Period setting in the Workbench for the associated appointment. pAppointment.PaymentLink and pAppointment.MeetingLink can all be modified specifically within the grace period. To modify this action only during the grace period, first verify that the current date and time are earlier than pAppointment.GracePeriodEnd . See the following example: // convert all times to seconds for comparison Set tSecsInDay = 24 * 60 * 60 Set tNowSec = ($piece($horolog,",",1) * tSecsInDay) + $piece($horolog,",",2) Set tApptSec = (pAppointment.Date * tSecsInDay) + pAppointment.Time Set tGraceH = $zdatetimeh(pAppointment.GracePeriodEnd, 3) Set tGraceSec = ($piece(tGraceH,",",1) * tSecsInDay) + $piece(tGraceH,",",2) // check if the current time is in the grace period If (tNowSec >= tApptSec) && (tNowSec <= tGraceSec) { Set pAppointment.MeetingLink = "" Set pAppointment.PaymentLink = "" } Save your custom class. Set your custom class as the Appointments Filter Class in the Appointments section of the Workbench, as described in Enabling Appointments in the Workbench. 3. Enabling Appointments in the Workbench To configure appointments in the Workbench: Log into the Workbench as a user with the Configuration Manager role. Go to the Configuration Application page ( Setup > Configuration Application ) and select the Feature Control tab. Select Edit Mode to make edits to the fields described below. To the right of the Appointments box, ensure that the Enable checkbox is selected to enable the appointments feature. Under Retrieve Appointments from , select Unified Care Record . The Appointments Filter Class determines which appointments will be filtered out of the patient's appointment list. By default, this will be set to HSPortal.EHR.BaseFilters. If you created a custom class that extends HSPortal.EHR.BaseFilters to implement custom appointment filtering logic, set it here. Under Grace Period (in minutes) , set the desired length of time to keep an appointment in the Upcoming list after the start time has passed. This is set to 15 minutes by default. To remove the grace period, set this to "0". After you have finished, select Submit at the bottom of the page to save your changes. 4. Enabling Pre-Payment of Services You can allow patients to pre-pay for service, if your appointment system supports this. Personal Community determines whether or not to display the Pay button next to a specific appointment based on whether the PaymentURL field is populated. If the PaymentLink field for an invoice is populated with a URL, the Pay button is present and the patient can click the button to be redirected to that URL. If it is not populated, the Pay button does not appear. You can populate the PaymentLink field with one of the two following options: A fully qualified URL to the payment gateway. A URL to an intermediate web page. This requires custom configuration. You can implement whatever additional logic or validation you desire, such as: time-based tokens error handling displaying additional instructions to the patient IMPORTANT If you choose to implement an intermediate web page, make sure that it is secure and that parameters are encrypted. You are responsible for implementing the logic that populates the PaymentLink field as well as clears it. You must update the HS.Local.SDA3.AppointmentExtension , in both your Personal Community and Unified Care Record instances, to have the PaymentURL property. See the documentation for more information on this process. You must recompile the HS.SDA3.Appointment class in both the Unified Care Record and Personal Community.