OpenEMR Review

From GPLMedicine

Contents

OpenEMR Version 2.8.0

History of OpenEMR

OpenEMR was first programed by a group of college students. These college students went on to form Synitech. Here is the history available from sunsetsystems openemr page.

SunsetSystems History...

OpenEMR was originally developed by Synitech and version 1.0 was released in June of 2001 as MP Pro (MedicalPractice Professional). Much of the code was then reworked for HIPAA compliance and improved security, and the product was reintroduced as OpenEMR version 1.3 a year later, in June 2002.

The project, now open source, evolved through version 2.0 and the Pennington Firm took over as its primary maintainer in January of 2004.

Pennfirm did a good job of making the medical community more aware of OpenEMR, and as more developers and users became active in making improvements (Sunset Systems was the most prolific of these), the project's code base was moved to SourceForge in March of 2005, where it remains today.

End Sunset Systems History...

Pennfirm has, for the most part, dropped from the OpenEMR scene. Before them Synitech did the same thing. This leaves OpenEMR.net largely unmaintained.

OpenEMR uses the orginal perl based version of FreeB for medical billing. It also uses the perl project SQLLedger for accounting.

OpenEMR Trademark

OpenEMR is the trademark of Walt Pennington. This is interesting since the term OpenEMR was first used by Synitech several years earlier. Pennington has not, as far as I know, published a trademark usage policy, however there are several companies besides Pennfirm that advertise services for OpenEMR.

OpenEMR Community

OpenEMR has, by far the largest and most vibrant community of the PHP based projects. This is a community lead project, and they have a community website available at www.oemr.org. Generally there are several different cvs commiters from several organizations, which indicates a very health developer ecology.

The results of the study of the openemr revision control system are the least valid. They were the only ones that had to converted to subversio for study and they did a bulk import to sourceforge CVS which hides earlier development. Still the ehr developer stats show that the current development is performed by several different parties. A quick investigation reveals that no two developers work for the same company. This is very reliable development environment; Lots of companies cooperating to generate code and lots of competition for support to the end users of the software. (unkown_user is probably from the bulk import, more later...)

OpenEMR Commericial Support

OpenEMR Websites

OpenEMR Installation

See the EHR Installation Review Process

OpenEMR Installation Procedure

As with FreeMED, OpenEMR works by untaring the download from the OpenEMR Sourceforge Project Page. For this version the commands where...

tar -xzvf openemr-2.8.0.tar.gz
mv openemr-2.8.0/ openemr

both executed from the webdirectory.

The OpenEMR tar politely untarred to a subdirectory called openemr-2.8.0.tar.gz but I wanted it to live under the more simple freemed directory name. Thats what the second command does. Note that on different releases of OpenEMR the file will be named something different.

As with FreeMED I pointed my browser to http://localhost/openemr/, the install routine automatically forwarded me into the installation routine.

The first screen is a click through warning that describes the software that is required by openemr. The second screen allows me to decide if I would like the setup routine to create the database for me. I choose to have openemr create the database for me. The next screen is a complex screen that allows you to configure the database settings very accurately. It not only allowed me to name the database, but allowed me to create a new user for the database that would only have access to the openemr database. It also forced me to choose a secure password. When I tried to ignore the password requirements the process refused to continue. The results were as follows.

OpenEMR Setup
Step 3
Connecting to MySQL Server... OK.
Creating database... OK.
Creating user with permissions for database... OK.
Reconnecting as new user... OK.
Opening database...OK.
Creating initial tables... OK
Adding Initial User... OK
Please make sure 'library/sqlconf.php' is world-writeable for the next step.
Next button.

There was no indication as to how to make the sqlconf world-writable. I choose to use chown to make it the same user as my webserver.

chown nobody:nobody openemr/library/sqlconf.php

(note that my webserver user is "nobody" yours may no be) Then I clicked next and got the following results...

OpenEMR Setup
Step 4
Writing SQL Configuration to disk... OK
Please restore secure permissions on the 'library/sqlconf.php' file now. 

Which I did using the following command as root

chown root:root openemr/library/sqlconf.php

The next screen was filled with very dense instructions. I needed to create two directories and then change the ownership of those directories to the webserver user. It also told me that to use the document storage features that you needed to similarly change the ownership of the documents directory and make some adjustments to the php.ini file. The instructions also refered me to various configuration files and the GACL setup system. At the bottom of the page there is a link to the newly installed system.

I had chosen the superuser account to be called admin. After trying to login with a password of, "admin", "password" the value I entered for the db password, "demo", and "test", I gave up and did a google search for the default password for OpenEMR. Apparently, it is "pass".

After logging in for the first time, I recieved the following error on the main screen.

Warning: Smarty error: problem creating directory "modules/PostCalendar/pntemplates/compiled/%%164/%%1643473877" in /var/www/html/openemr/interface/main/calendar/modules/PostCalendar/pnincludes/Smarty/Smarty.class.php on line 589
Warning: Smarty error: problem writing 'modules/PostCalendar/pntemplates/compiled/%%164/%%1643473877/default.html.php.' in /var/www/html/openemr/interface/main/calendar/modules/PostCalendar/pnincludes/Smarty/Smarty.class.php on line 589

I used the following command to change the ownership so that these templates could be created...

chown nobody:nobody openemr/modules/PostCalendar/pntemplates/compiled/

After doing this, the calendar on the main screen came up and the initial installation was complete.


OpenEMR Installation Conclusion

At first blush the OpenEMR was very powerful. The basic database creation and information gathering works quite well, with the notable exception of using a default password, and what is worse, not documenting it the setup procedure. Also, most of the complex configuration is left till after the installation, not by configuring inside the OpenEMR GUI, but rather by editing text files. For what the wizard did cover, however, it was very smooth and clear.

Also, there was an uncaught file permission error on the installation. It is possible to verify that important files have proper permissions, so this sort of error should not occur.

As for security, the creation of a seperate database user for just openemr is excellent. Forcing a strong password for that user is also excellent. Insisting on an default password, however, is not such a good idea. There was no option that I could find to restrict installation to a particular IP address. Overall...

  • Catching Errors - Poor (required me to understand a file permissions error)
  • Ease of installation - Good (lots of configuration was handled without editing text files)
  • Security - OK (Would have been excellent expect for the default password and the lack of IP security)

OpenEMR Medical Billing System

OpenEMR maintains the orginal version of FreeB for its billing engine. The original version of FreeB was written in perl, had hundreds of api calls and was relatively fragile. The OpenEMR version has been substancially improved. However compared to the second generation billing engines Remitt and FreeB 2.0, the original FreeB does lack some functionality.

Still OpenEMR has done good work with FreeB, they were the first project to support UB-92 paper billing.

OpenEMR Medical Accounts Recievable

The medical accounts receivable review will need to wait for a full billing review.

OpenEMR Scheduling System

OpenEMR uses a framed base view of the initial calendar. While that is a relatively anachronistic web development technique, it does allow you to resize the portion of the browser that is available for viewing the calendar. The calendar is displayed on a 15 minute increment grid.

The default view is the day view, with multiple providers schedules displayed on the same schedule. At the top of the screen is the main menu, allowing the user to move away from the scheduling system. Inside the main scheduling system window, the top left displays a provider chooser, allowing the user to change the calendar view to display the schedule of a particular provider, or all of the providers at once. In the center above the calendar is a day changer which allows the user to move one day forward or one day backwards. At the top right are the buttons "Add" and "Search". The "Add" button allows the user to access the appointment window, without pre-populating that window with information from the calendar. The "Search" screen brings up a simple search screen which allows for a user to search for a particular appointment.

From the search screen, and apparently only from the search screen, is possible to change the view of the calendar. The possible views are day, week, month, year and search. The week view is indentical to the day view except that week view displays extra days on the day display underneath the current display. The Month display shows what appointments exist for a particular week. The year view is simply a display of days in small month blocks, with the days linked to the day view for that particular day.

Clicking on a time listed inside the calendar brings up a new appointment window. This allows the user to choose the following datapoints.

  • Category, (select box)
  • Date, (Javascript/DHTML date select button)
  • Title, text field
  • Patient (clicking this brings up a new window)
  • Provider (drop down box) which is pre-populated with the provider whose schedule was selected.
  • Status (drop down box) a list of status, and status symbols for instance + = Chart Pulled
  • Comments (free text)
  • A chooser between all day and time of day
  • Time of day (pre-populated by the value clicked in the link) and a duration field
  • Repeats checkbox which enables an item to allow for repeating pattern.

The following status and status symbols are available from the status drop down.

* Reminder Done
+ Chart Pulled 
? No Show
@ Arrived
~ Arrived Late
! Left w/o visit
# Ins/fin issue
< In exam room
> Checked out
$ Coding Done 

When the patient field is clicked, a third window appears. This window allows the user to search through the patient database by id, name, social security number or date of birth. After choosing a patient on this window, that patient will appear in the initial appointment window.

Once the values have been chosen, it is possible to click the "Save" button. After this, the appointment appears on the calendar. The calendar displays the duration of the appointment, the status symbol and the patient attending the appointment.

Cleverly there is a "Find Available" button next to the save button on the appointment popup window. Clicking this button shows all of the appointment start times over a period of time that match the criteria on the appointment popup. This allows you to see much deeper into the schedule than the single day that displays on the calendaring system.

The sytem does not allow the user to move directly from the display of schedule into the encounter coding. The method to get to an encounter is to access the patient record and then manually create an encounter record.

The calendar is simplistic, but very functional. It is obvious that it was a precursor to the MirrorMed/ClearHealth calendar, since the functioning is similar. (ClearHealth started out life as an advanced calendar for OpenEMR.) It is a wonder why the other calendar views are not available from the main calendar view. The find available functionality is not found MirrorMed/ClearHealth (at this version) and is a welcome feature.

Generally the OpenEMR scheduling engine is clunky but functional.

Tracking Patient Data in OpenEMR

Creating a patient record

In order to create a patient record in OpenEMR, the user simply clicks the "New Patient" menu item. This will bring up a simple script that accepts the first, middle and last names for the patient, as well as a field for overriding the autonumbering system of the software. By filling out this form and clicking the "Create New Patient" button it is possible to create a new patient. At this release OpenEMR does not have a check to see if a patient name is already in the system, so it is easy to create duplicate patients. As a result OpenEMR users will need to search for a patient before creating a new one.

After creating a base patient record the a screen appears displaying the central patient record. From here it is possible to access different aspects of the patient record. OpenEMR has functionality to cover the following areas.

  • Problem (contains asthma, diabetes etc etc)
  • Allergy
  • Medication
  • Surgery
  • Dental


For each of these items it is possible to record a title, begin and end date, a diagnosis occurence, referred by and comments. A seperate interface is used to record immunizations, patient notes and to edit demographics.

The demographics system is a very large form, which collects a tremendous amount of information. This layout is very problematic from a software design standpoint, since it tends to create lots of unused database information. (This will be discussed at length in the system architecture review). Each section of the form is saved seperately, for instance the first section of the form is basic demographics regarding the patient. This includes...

  • First Name, Middle Name, Last Name (required)
  • DOB (required)
  • Sex (required)
  • Address (required)
  • City (required)
  • State (required)
  • Zip Code (required)
  • Country (required)
  • Marital Status (required)
  • Provider (required)
  • Patient Number (a secondary id that can link in data from a legacy system)
  • Emergency Contact
  • Emergency Contact Phone
  • Home Phone
  • Work Phone
  • Mobile Phone
  • Email
  • Four user defined fields


This is a good place to talk about how object oriented design impacts data records. Suppose that Mr and Mrs Smith visit a clinic using OpenEMR. The couple and their son, Johnny all intend to be patients, but at least initially Mr. Smith is seen for his headache. When Mr Smith is asked about his emergency contact information he of course lists his wife, Mrs. Smith, with thier current home phone number as the emergency contact phone number.

Later the Smiths move. Then Mrs. Smith makes an appointment for her twisted ankle. During this time she provides new contact information for herself. At that point there is a problem, because Mr. Smiths record is out of date. The OpenEMR user cannot know that Mr. Smith listed his wife as his contact information, and then new number will be lost to Mr. Smiths record. The same problem occurs with insurance. If Mr. Smiths insurance is through his wife, and her identity and contact information are recorded on his patient record, then when Mr. and Mrs Smith change insurance or homes then both records must be seperately updated. Addressing this problem gets more problematic as the number of family members goes up. When the father of 6 changes jobs and insurance, then potentially 8 patient records must be updated with idential contact information. This problem can be described as the "demographics double entry problem" which is fundementally tied to the underlying software design of the EMR.

OpenEMR Reporting System

There are two different methods of generating reports in OpenEMR. There are several standard reports.

  • Superbill Report
  • Appointments Report
  • Appointments-Encounters Report
  • Patient Insurance Distribution Report

There is also a rudimentary report engine that can generate custom reports. There is also a very detailed billing report that is accessible from the billing menu.

OpenEMR Security

Like both FreeMED and ClearHealth/MirrorMed OpenEMR uses phpGacl for access control. Sunsetsystems has some excellent screenshots of the OpenEMR access control system.

There is not much difference between the Access Control system of OpenEMR and ClearHealth/MirrorMed. The difference is that OpenEMR does not integrate the access control system into the main menu system. Instead it appears to the user as a totally seperate program. The only difference between this and ClearHealth/MirrorMed is that in the later, a menu item exists and the acl editor is displayed inside the standard menu environment.

OpenEMR Architecture

OpeneMR had the following results from the cyclic_guess script. Overall, OpenEMR fared better than FreeMED, but still not as well as ClearHealth/MirrorMed.

  • Total Files 626
  • Average Complex 15.47
  • Average Functions 6.71
  • Average Ratio 4.08

The goal of the cyclic test is to measure the complexity of the OpenEMR project. Not the projects that OpenEMR is based on. Libraries that where largely unmodified, like PEAR, and phpgacl, were not included in the review.

Take a look at the cyclic_guess summary for review 1

OpenEMRs cyclic guess ratio chart

OpenEMR CCHIT evaluation

CCHIT evaluation will not be included in this version of the review.

OpenEMR Documentation

Overall OpenEMR has excellent documentation and a large vibrant community.

OpenEMR emrupdate.com matrix

emrupdate matrix will not be included in this version of the review.

OpenEMR other resources

Julia Weatherby has allowed her paper to be published in its entirety here. An Evaluation of the Technical Aspects of OpenEMR - Julia Weatherby

Margaret Donahue has allowed her paper to be published in its entirety here. OpenEMR and its community - Margaret Donahue

T. Simbini has allowed th to be published here OpenEMR Architecture - T. Simbini

OpenEMR Conclusion

OpenEMR is developed by several different people who offer support through several different companies. Generally OpenEMR is not as pretty as ClearHealth/MirrorMed, but it has a larger and more active community.