Wednesday, December 30, 2009

OSCAR mods: Improving the Consult request letter

The default OSCAR consult request letter is not to everyone's taste.

Unfortunately, there is no way to change this without altering the OSCAR code.

The good news, though, is that this alteration is relatively straightforward.

First, log into your server as an administrator (don't forget to back it up first!).

Then edit the following file:

$CATALINA_BASE/webapps/oscar/oscarEncounter/oscarConsultationRequest/ConsultationFormPrint.jsp

You should backup the original before making any changes with, for example:

sudo cp $CATALINA_BASE/webapps/oscar/oscarEncounter/oscarConsultationRequest/ConsultationFormPrint.jsp $CATALINA_BASE/webapps/oscar/oscarEncounter/oscarConsultationRequest/ConsultationFormPrint.jsp.bak

You will see that the file contains the layout for the consultation request, and that by modifying the file you can alter the layout.

I've created a version that will fit into a double window envelope showing my clinic address and the name and address of the specialist I am referring to.  You can view my version of the file here.

Once you have saved the new version of this file, then restart tomcat to make the changes take effect.

OSCAR mods: Named physician on all scripts

I get my nurses to print out prescriptions for me to sign to save time on occasions. 

However, with a standard OSCAR install, this results in their names coming up as the prescriber rather than me.

To alter this so that your name always appears on prescriptions:

Log into your server and type:

sudo vi $CATALINA_BASE/webapps/oscar/oscarRx/Preview.jsp

Then search for the sections that contains the line doctorName% and replace <%=doctorName %> with your name.


Save that file.

Then open

sudo vi $CATALINA_BASE/webapps/oscar/oscarRx/Preview2.jsp

and search for the sections that contains the line doctorName% and replace <%=doctorName %> with your name.

Save the file and restart tomcat for the changes to take effect.

Tuesday, December 29, 2009

Run complex searches for CPP, encounter, and medication data using Report by Template

Report by Template is a key feature of OSCAR and is available through the Admin tab in the main screen.

It allows searches to be run on the OSCAR database using templates that can be created by the user.

These templates allows you to perform complex searches for data in either the CPP and encounter sections of the eChart or the medication lists.   It includes:

  • Multiple search strings combined with AND/OR operators.
  • Exclusion of patients already on a chronic disease register from the search.
  • Searching of patients by registration status.

I use this search to periodically check for patients with conditions that may have accidentally not been added to our chronic disease registers (for example, patients with diabetes).

You can use this search by clicking on the 'Add Template' link in the Report By Template page on OSCAR and then copying and pasting this tex into the box (for the CPP/Encounter searchest or this text for medication searches.  Click on EDIT to save your changes, then DONE to use the template.

Note: Searches using this template can take a long time to run and use a lot of resources.  You should save them for when the server is not in heavy use.

Sunday, December 20, 2009

Walk In Clinic Swipe-Card System

We use OSCAR in our Walk In Clinic in Charlottetown.

This means needing to be able to take any patient, not just ones registered with us, and quickly enter them into the system and add them to the next appointment slot.

This script does all of that using a card-swipe.

1.  The patient presents their health card
2.  Our receptionist swipes on her reception computer.  This brings up the patient's details on her screen.
3.  The receptionist enters any extra data we want (their phone number and their own family doctor's name, which she selects from a list)
4.  The patient is then automatically entered into the OSCAR EMR demographic table (if not already present) and given an appointment time which is automatically entered into the OSCAR EMR appointment table.
5.  The script asks for the next patient, calculating the next appointment time based on the start time and appointment lengths entered by the receptionist when she first opened the script.


You can download the script here.

This print script prints out letters for the patients' own Family Doctors and can be run at the end of the clinic.

Online Registration for New Patients

Coding in new-patient data into OSCAR is very time consuming, especially for new clinics taking on a lot of patients.

I recently wrote and tested an online registration system that displayed the number of spaces available, and allowed patients to register all of their details online when space was available.

You can view our implementation from my clinic home page.

The patients enter not just demographics, but their medical history, medications, allergies, social history, family history, and preventions history (eg: date of last PAP).  This is then imported into OSCAR so it is all available in the appropriate sections of the EMR when they come to visit.

We registered over 2500 patients in two months using the system, and it was fantastic.  It saved me hundreds of hours of staff time as checking data is far, far faster than entering it by hand.

The system requires two servers (the usual OSCAR EMR server and a separate, but secure, web sever that is not connected to the OSCAR server) and has several parts:

1.  The spaces available script - this script resides on the OSCAR server and generates text files containing the number of spaces available for registration (in plain text and as a javascript insert).

2.  The sync script - this script resides on the OSCAR server and synchronizes the output of the spaces available script above between the OSCAR server and the web server.

3.  The link to the registration page - usually found on the clinic home page, it lists the number of spaces available and links to the registration page.

4.  The registration page script - this CGI script resides on the web server.  You will need to have an SSL certificate for this page for security reasons, and you will need to have your Apache web server set up so that this page can only be accessed using https.

5.  The data harvesting script - this resides on the OSCAR server and pulls registrations from the web server to the OSCAR server for processing.

6.  The processing script - this resides on the OSCAR server and processes registrations, including checking that the patient is not already registered, and imports the patient data into OSCAR.  It then emails the patient a confirmation email.

You can download each part of the system using the links above.

(Scripts still to be uploaded - coming soon!)

Importing Demographic Data

Sometimes you get a list of patient demographics (name, phone number, health number, date of birth) and would like to import all of those into OSCAR.

This script does that.

(Script still to be uploaded - coming soon!)

No Show Letters

Patients that fail to attend clinics can be a big problem.

This script can be run on a regular basis to print out letter for patients that fail to attend.  It will  search for patients that have missed an appointment and print out a letter to them. 

The first letter will be a warning letter only.

Subsequent letters for the same patient (on future runs) will do two things:

1.  It will mark them as 'Inactive' and 'SU' roster status (for suspended) in the demographic list.  This prevents them from making any further appointments until the staff update their status.

2.  It will print letter informing them that they will remain suspended until they pay the fee for the missed appointment.


Note that this script requires a new table to be created in the database to store no-show data.  Also, note that correcting information (for example, where a letter has been sent in error) currently needs to be done manually on the database.


Also, if you have any searches that run on 'active' patients, you might want to update them to include inactive patients with the 'SU' roster code.


You can download the script here.

Instructions for installation are listed in the script.  It is written to run on a CLIENT machine, but can be modified to run on the server (via a cron script with a connected printer).