eForm Magic Examples
This page lists eForms as examples of how certain code customizations/tweaks in eForms are actually used.
Signature Image File
While there are hundreds of other eForms that use the Signature Image File for displaying the current user’s signature, the Ontario Heart Center eForm has one simple use of this method that is easy to spot.
Multiple Signature Options
The Postnatal Cytogenetics Lab Req eForm allows the user to select between using the signature image file, wet signature (drawing with mouse), or “Electronically Signed” for signature.
Faxing
While almost every eForm now has faxing capability, the code for faxcontrol can easily be found in the CanMed Endoscopy eForm.
Buttons to Toggle Pages
The Fraser Health Provider Progress Notes eForm contains buttons to toggle which page to show/jump to (Show Both Pages, Show Page 1, Show Page 2).
Jump & Scroll to Other Pages
The Fraser Health Community Response Short Stay Treatment Referral eForm uses getElementById(‘X’).scrollIntoView(); to jump to other pages or other places on the page.
Alert Popup Based on Age
The Colon Screening Program eForm warns the user with a popup that the patient may not qualify for the Colonoscopy program when it detects the patient is under 50 years of age.
Side Accordion Menu & Click to Copy Fax Number
The Fraser Health Adult Eating Disorders eForm has an accordion menu on the side for reference information that is not printed, as well as a click to copy button so you can paste a fax number into another program.
Checkboxes Autofill eForm Fields
The Ontario Lab Requisition with decision support, BC Standard Outpatient Lab Requisition, as well as the Special Authority Generic Request (SA_Generic) eForms both have handy checkboxes on the right which autofill specific eForm fields and do calculations.
Links Over an eForm Image
The Dementia Tool eForm has many links that are added over links in the eForm image.
Link to Areas of eChart, Add Database Tag Values and Multi Phone Number Selection
The MHSU Referral eForm contains a dropdown to select which phone number (home/work/cell) of the patient to display on the form, buttons to add medical history + medications + allergies into the medical conditions/info field, and buttons to quickly open the patient’s Consultations + Documents + Labs + Medications areas of the chart.
Warning on Print Only
Since pressing only the Print button does not save/submit the eForm, the BC LifeLabs Panorama MSP Covered eForm shows a warning popup after Print is pressed reminding the user to save the eForm by pressing submit: “eFORM has NOT been submitted. If needed, cancel print and complete required fields. Ensure you click SUBMIT after print.”
Ticklers Generated by eForm
The BC Pap Smear Requisition eForm contains code that generates a tickler to remind the user to ensure results are received.
New Pre-filled Email, Date Calculations
The SPARC BC eForm has a link that opens up your default email client program and starts you off with pre-filled email subject and body, Javascript to calculate months in the future and supply the date to separate inputs for year and Month+Day using Xboxes where the ID of the Xbox is in the fashion Month_1 and the number at the end is used to calculate the months in the future, and it uses nobler with the year input to check if the Year and Month+Day combined are more than 1 year in the future.
Link to Image
The BC LifeLabs Panorama Testing MSP covered requisition eForm has a link to a png file (in the eForm images folder) that you can choose to print using Control/Command + P
Alert Based on Measurement Date Observed
The Fraser Cardiology Associates Vascular Prevention and Lipid Clinic eForm contains several inputs for dates which are taken from the date observed for lab result values in measurements. It contains jQuery that checks dates and chances the font to red if they are over 1 year. There is an alert that pops up for this as well. The jQuery has been written to allow for easy adaptation to other eForms that check dates on results.
Autocomplete
The autocomplete feature is present in the Ontario General Public Health Test Requisition. When you type in a text box you get a live autocomplete to choose a test to order.
It references internal versions of jQuery and jQuery UI which are present across all OSCAR versions:
<script src="../js/jquery-1.12.3.js"></script>
<link href="../js/jquery_css/smoothness/jquery-ui-1.10.2.custom.min.css"
rel="stylesheet">
<script src="../js/jquery-ui-1.10.2.custom.min.js"></script>
Then the source of data for the autocomplete needs to be defined (usually defined as an array but it can be a JSON string):
var tests=["Adenovirus (virus detection only)", "Antimicrobial
Susceptibility - Bacteria"]
Then reference the ID of the eForm element you are autocompleting:
<script>
$(document).ready(function() {
$("#test1").autocomplete({
source: tests
});
});
</script>
And ensure that is indeed present later in the form:
<input name="test1" id="test1" type="text" class="noborder" style="position:absolute; left:115px; top:408px; width:291px; height:21px; " >