ERx10 Online Check-in Code Guide

If you're ready to get right to adding the ER Express codes to your website, please see the First-available-time script and the Reservation form iframe accordion sections below to get started. If you'd like more detailed information on how to implement our scripts, we recommend reading our Overview and How to set it up sections first.

 

Overview

The ER Express web widget consists of two parts:

  • First-available-time script - Shows patients the first available check-in time slot and is grouped with a book-now button. 
  • The reservation form iframe - After clicking on a book-now button, patients should be led to your reservation form. They fill this out in order to hold their spot in line at a specific facility.

The first-available-time script consists of several components:

Component What it does
jQuery library

Loads an important library for the JavaScript to execute properly.

Call URL Points to the ER Express server and contains the unique identifier (the facilityID) for each health system location.
facilityID

Unique identifier in the ER Express software.

Get statement Uses the Call URL to retrieve the first available time.
divID Unique variable to render the first available time on the health system web page.

 

The reservation form iframe consists of several components:

Component What it does Notable features
Reservation form

Patient fills in and submits this form to make a reservation.

Unique facilityID for each clinic/location.

CampaignID Tracks a unique identifier to each reservation based on which campaign the patient responded to.

Enables you to calculate campaign performance at the individual patient level, including tying the traffic source (e.g. Facebook vs Google) to the actual reimbursement for a particular patient.

Conversion tracking

Tracks attempts and completions based on web traffic parameters such as organic source/medium, UTM, Facebook pixel, Google Ads campaign, etc. and feeds them into your measurement system, such as Google Analytics.

  • 100% implemented through Google Tag Manager (GTM)
  • Simpler, more reliable implementation of cross-domain tracking

 

First-available-time script

The first-available-time script supplies the first available check-in time slot for each participating location. Below are two parts of the script you need.

Part 1 - Insert jQuery script

This is sample script to load jQuery (3.5.1 is the latest version). You can also choose a different version here, but make sure it's a more recent version or it will not work properly. Make sure to place it above the first-available-time script. 

<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>

 

Part 2 - Call first available time

We recommend putting this in the header of the online check-in landing page.

<script type="text/javascript">

$ ( function() {

$.getJSON("https://apps10.erexpress.com/erx-reservationform/api/firstavailable/facilityID?callback=?", function( data )

{
$('#divID').html("<p style='margin-bottom: 0; line-height:10px;'> First Available Time: " + data.reservationTime + "</p>");

});

});

</script>

 

Plug these in

Facility ID: We will provide this to you. Please plug this in in place of the highlighted text once you receive the ID(s).

divID: Customize by facility. Please plug in a unique name. For example, if the facility is named GetWell Fairfield Urgent Care, you might label this as Fairfield.

 

Reservation form iframe

The code below will generate the reservation form. Please place this code on a separate page per facility. You will need to add your facility ID + insert a height and width to fit your requirements. We recommend a height of at least 700px and a width of 100%.

<iframe class="checkin-iframe" id="ERExpressiframe" src="https://online.erexpress.com/#/facilityID"></iframe>

 

How to set it up

Before you start, you will need:

  • A list from ER Express with each location's facilityID
  • The latest jQuery library

In addition, we also recommend:

  • Testing the new script using a test facility (ER Express will provide)
  • A debugging script (which you will remove when you are ready to move to production)
  • Using jsFiddle to test and compare results first in a test facility, then in a real one.
  • Asking your ER Express Customer Success rep to add some time slots to the inventory (otherwise you will always see the “Walk-in Only” message)

Also, at the start, it will help us to know:

  • Are you using our standard implementation or has your digital team implemented its own custom script? If you’re doing any of the following, we should first have a phone call to have a technical discussion:
    • Off-page JavaScript reference file
    • A customized plug-in (such as those available in WordPress) to “skin” the iframe
    • An in-house utility in your content management system to get and produce either the first available time or the iFrame
  • Do you have set release windows for your patient-facing website? This can help us coordinate the go-live date with the clinical operations team and digital.

Standard implementation steps

We recommend using our test facility 100004 the first time you implement and use our debugging script to publish the results to your console. 

    1. Copy and paste the jQuery script from Part 1 or make sure you have the latest jQuery library loaded on the page. It needs to run BEFORE the page loads the JavaScript get statement. In other words, it needs to be placed on the check-in page above your first-available-time script. We recommend that you load the jQuery from a CDN: https://code.jquery.com/
    2. Copy and paste Part 2 to call the first available time script on your check-in landing page.
    3. Plug in the facilityID. Plug in the divID. Repeat this step per each facility.
    4. For each location, create a separate page on your website (if you only have one location you may choose to put your iframe on the online check-in landing page instead) and paste the iframe on it to render the actual reservation form. Plug in the corresponding facilityID to each iframe.

 

Testing & debugging

Testing

  • We recommend doing a test implementation using our fictional test clinic, Milford Urgent Care. Its facilityID is 100004.
  • Once you copy the script below, run it through a script cleaner since this document has likely added carriage returns, etc. We recommend: https://html-cleaner.com/js/
  • You will need to insert the div ID from your health system website.
  • Compare the first available time returned by our server to the first time slot shown on the reservation form – they should match.

Test facility

jQuery library

<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>

 

First-available-time script

<script type="text/javascript">

$ ( function() {

$.getJSON("https://apps10.erexpress.com/erx-reservationform/api/firstavailable/100004?callback=?", function( data )

{
$('#divID').html("<p style='margin-bottom: 0; line-height:10px;'> First Available Time: " + data.reservationTime + "</p>");

});

});

</script>

 

Debugging

We recommend using jsFiddle (https://jsfiddle.net/) to debug because it lets you first isolate retrieving the first available time without trying to publish it in HTML.

New to jsFiddle?  Here's a few tips:

      • Add the jQuery library
      • You can then paste your own facilityID (which ER Express will provide)
      • Once you click run (upper left corner), it will publish the first-available-time in the console log

You can see a live real-time example with the first available time slot published to the console here: https://jsfiddle.net/spatelerx/3f8h2dve/

Here is a video of the process (using jsFiddle):

 

FAQs

Question Answer
I'm getting an error message: "ReferenceError: $ is not defined"

There are several possible reasons for this:

  • You have not loaded the jQuery library or may not have an up-to-date version of the library on the page.
  • Or, you may have a competing version of jQuery loaded.
  • Also, make sure it loads BEFORE the first available time JS
The script is working, but the results say, "Walk-in Only" This is normal for new locations. It means there is no inventory of time slots in the next 24 hours. Ask your ER Express Customer Success rep to add some time slots. 
The iframe is working, but the results say, "Walk-in Only"
See above - we just need to add some inventory.

 

Need help? 

If you're having difficultly implementing our online scheduling codes or just have a question please  contact help@erexpress.com or submit a request.

 

Have more questions? Submit a request