ClearHealth/MirrorMed Review

From GPLMedicine

Contents

ClearHealth 1.0RC2 MirrorMed 1.0RC1

History of ClearHealth/MirrorMed

ClearHealth was originally formed by Fred Trotter and David Uhlman. Fred Trotter was a core developer on the FreeMED project and David Uhlman was a core developer on the OpenEMR project. David is the CEO of ClearHealth (was Uversa) and Fred Trotter was hired by Uversa as the project manager for ClearHealth. Trotter resigned from Uversa and now heads the MirrorMed project for SynSeer.

ClearHealth and MirrorMed are two different trademarks for the same codebase. ClearHealth and SynSeer cooperatively develop the codebase, however ClearHealth trademark policies do not allow other companies to offer support services under that name. As a result, SynSeer uses the MirrorMed trademark for the same codebase.

Recently, Resolution Systems has started supporting the codebase under the trademark Resolution EMR

ClearHealth/MirrorMed Trademark

ClearHealth is the trademark of ClearHealth Inc. ClearHealth (the company) has strict rules for the use of its trademark. There is a good discussion on the clearhealth forums about the rules for using the ClearHealth name. MirrorMed is the trademark of SynSeer. SynSeer does not allow the use of the trademark by other companies, for the time being. Here are the MirrorMed and FreeB trademark use guidelines

ClearHealth/MirrorMed Community

ClearHealth and MirrorMed are both young projects, as a result an active community has yet to grow. Both projects have forums and regular users.

They also have a very broad development group. There are two companies that sponsor development, SynSeer and ClearHealth. SynSeer sponsors one developer and ClearHealth sponsors the rest. ehr developer stats shows that no one person dominates the development of the codebase, although Josh Eichorn is the most prolific single writer of code. As a result the codebase has the stability of multiple companies and multiple core developers.

The most striking fact regarding the ClearHealth MirrorMed project is that it is being developed at a rate about double that of the other two projects, according to the very bad measure of lines of code. EHR basic stats shows that CH/MM has a commit rate on average of 586.8 lines a day. Compares with 308.9 for openemr and 383.9 for freemed. It should be noted that lines of code are not a good measure of program improvement, still it is well ahead of the other two projects by this measure, and it pretty difficult to otherwise objectively assess the projects progress.

ClearHealth/MirrorMed Commericial Support

SynSeer MirrorMed Support

ClearHealth ClearHealth Support

Resolution EMR Resolution EMR Support

ClearHealth/MirrorMed Websites

clear-health.org ClearHealth project website

www.mirrormed.org MirrorMed project website

docs.mirrormed.org MirrorMed documentation website

forums.mirrormed.org MirrorMed forums website

bugs.mirrormed.org MirrorMed Bug tracking

ClearHealth/MirrorMed Installation

See the EHR Installation Review Process

ClearHealth/MirrorMed Installation procedure

For this installation I will be using the clearhealth tarball, however the MirrorMed tarball is essentially identical.

After downloading the clearhealth tar file from the op-en download site I untared it into a web accessible directory and moved it to the "clearhealth" directory as follows...

tar -xzvf clearhealth.tgz
mv clearhealth-1.0RC2/ clearhealth

Afterwards I pointed my browser to http://localhost/clearhealth/ and the installation automatically forwarded me to the installer. The first screen was a welcome screen. The second screen requested the database username, password, server and name.

On the next screen the system checked for several configuration issues.

_/ PHP Version 4.3.0 or greater is required, you are running 4.3.11
_/ PHP Version lower than 5.0.0 is required, you are running 4.3.11
_/ PHP Memory 8M or greater is required, you are running 88M
_/ PHP Magic Quotes is Off
_/ PHP Register Globals is Off
_/ Found extensions: mysql
X Can not write to /var/www/html/clearhealth/tmp!
X Can not write to /var/www/html/clearhealth/freeb2/tmp!
X Can not write to /var/www/html/clearhealth/local/config.php!
X Can not write to /var/www/html/clearhealth/freeb2/local/config.php!
_/ You are running mysql version 4.1.12 which is >= 4.0.0

_/ was actually a green check graphic and X was a red X graphic. I used the following commands from the clearhealth directory to change the permissions...

chown nobody:nobody tmp
chown nobody:nobody freeb2/tmp
chown nobody:nobody local/config.php
chown nobody:nobody freeb2/local/config.php

I pressed the refresh button on the test screen and all of the tests showed checkboxes, and the "continue" link had appeared.

The next screen was the license acceptance screen. Here you can read and accept the GPL license and move forwward by clicking "I Agree". After this a blue status bar appeared while the database was being configured..

The next screen gave you the options of installing the ICD9, and HCPCS codebases. As well as the opportunity to install a demo database. For the sake of comparision I chose not to install the demo data, but I did install the other databases. Each additional database showed another status bar while installing. After installing the codepacks I clicked the continue link. The system displayed a page indicating that I was finished with my installation and then a page with a link to the main application.

After clicking this link I was able to login with a default password of admin/admin

ClearHealth/MirrorMed Installation Conclusion

This installation was very smooth. The system understood its own requirements and checked for everything important. I never saw an error at the programming level. While the system did verify the database password However, it also insisted on using a default password. There is no cabability that I could find for limiting the security of the installation.

Catching Errors - Excellent (all errors were caught) Ease of installation - Excellent (the system had multiple configuration options included in the installation process) Security - OK (points off for a default password and lack of IP security)

ClearHealth/MirrorMed Medical Billing System

The ClearHealth and MirrorMed medical billing system are based on the FreeB2 codebase. This codebase has several features...

These two features are pretty standard to the various FreeB projects.

  1. Medical Bill Format Abstraction
  2. SOAP interface - Other EHRs can interface with FreeB2 using SOAP

These features are currently unique to FreeB2

  1. Web based claim data editing - the claim data can be changed from a web interface
  2. EHR and Claim Data isolation - changing the claim data does not change the EHR data
  3. Claim Searching - it is easy to find and change the status on claims
  4. Claim Revision Control - Each time the claim data is changed the old version is saved off

Generally everything under the "Billing" main menu is actually FreeB. This is illustrated by the URL, whenever FreeB code is in use, the URL will include freeb2.

FreeB supports the following formats

  • HCFA/CMS 1500
  • X12 837p 4010A

ClearHealth/MirrorMed Medical Accounts Recievable

The ClearHealth/MirrorMed Codebase for billing is still beta code. It is probabely possible to get the code working with a knowledgeable programmer. However, without one, the current billing engine is nor workable.

The workflow in CH/MM is encounter driven. Once an encounter is final, it can be closed and the information can be used to create a claim. Once a claim has been created and sent, there is an "EOB" link that appears next to the claim line.

It is possible to search through the sent claims based on the status of "sent" and various other factors, including date range for date of service, date range for the last revision, payer and provider. With an EOB in hand the system can be quickly used to search for the claim that has been paid. Every "sent" claim has a hyperlink to the "EOB". At the time of the writing the EOB link simply transfers to a page that says...

Notice: Only variables should be assigned by reference in /var/www/html/mirrormed/demo/local/controllers/C_Eob.class.php on line 33

at the end of the page the following error is displayed

There are no codes to add payments on for this claim.

This appears to be an error condition that occures when a bill is sent out for $0.00. This is an error condition that should not occur. This section will be updated when possible to describe the result when this is configured properly UPDATEME.

A serious problem with the CH/MM architecture is the lack of direct access to the medical accounting. It is possible to view the account history from a account history block on the patient dashboard. This block gives an immediate display of the patients account balance which is excellent. Further by clicking the block it is possible to see the entire history of the patients account. This makes understanding of the patients financial history convenient. However making changes to the account is more difficult, and cannot be done at this same screen.

Overall the CH/MM is a buggy but could end up with a very elegant result.

ClearHealth/MirrorMed Scheduling System

The ClearHealth/MirrorMed Scheduling system is very advanced and flexible. It boasts the following features.

  • Day, Week, Month and Print Views
  • Multiple provider schedules displayed in parallel
  • Visual display of multiple provider availability
  • The display looks like a calendar, and makes intuitive sense when printed
  • The display can be limited to a particular location
  • The display can be limited to a particular provider
  • Patient selection is handled by a powerful autocomplete widget

The calendar appears very well laid out. On the right of the window are various shortcuts and the left side contains a visual display of the schedule. When the schedule is blank there are several small bands of color that represent the available time for the providers. These small bands of colors contain checkboxes at each 15 mintute interval. To schedule an appointment, a calendar user clicks a checkbox for a start time and a checkbox for an end time. An appointment block appears, with the correct provider, location, and times pre-filled. Patients can be selected by simply typing in the patients last name. As the name is typed the system will display all of the patients that match the string so far. So if you type "Tro" both "Trotter, Laura 111-22-3333" and "Trotter, Fred 111-22-3344" would appear. Once you have limited your selection you can choose the correct patient with the mouse. This is very effective for patient names like Cruz and Smith which could include hundreds of patients. After typing in "Smith, John" for instance, it would be possible to determine which patient should be selected by the display of the social security number. Perhaps the full social security number should not be displayed for privacy reasons (perhaps only the last six?), but this system is extremely innovative and fast and it maps well to typical clinic workflow.

Once an appointment has been created the band of color that once represented the providers free time is mixed with a block of the same color that displays the appointment information, this can be called the appointment block. Along with a link to the patient record, the appointment block has several hyperlinks at the bottom of the block to determine the fate of a particular appointment.

edit, del, ns, can, enc

The edit link allows the details of the appointment to be changed. The del link removes all record of the appointment from the system. The "ns" and "can" link removes the appointment from the visual display on the schedule, but the appointment is labeled as a no show (ns link) or a cancellation (can). The reporting engine can be used to provide a list of canceled or no show appointments.

The last link, "enc", will auto-populate an encounter with the information from the appointment. It is possible to create multiple encounters by repeated clicking of the "enc" link, which could be considered both a bug and a feature.

The week shortcut link displays a layout identical to the day layout, except that more days are displayed. The month layout abstracts appointments to much smaller links so that an entire month can fit on one screen. The print layout is available for any calendar view, and presents a version of the current view that is appropriate for printing. Some users have had trouble printing this view from Firefox.

Tracking Patient Data in ClearHealth/MirrorMed

Data tracking on in ClearHealth MirrorMed is handled through the use of "EHR Extensions". This is a powerful concept that allows arbirtary data to be associated with either encounters or patients in the system.

The system is very simple. First a user must create an HTML form that collects the data that is desired. Then the form elements are replaced with special smarty tags of the same name. This file is uploaded into a CH/MM installation, and then associated with either an encounter or a patient. Information that does not change, (like the name of the patients grandparents) should be associated with the patient. Information that does change over time (like vitals) is associated with the encounter.

This mechanism makes it trivial for a non-programmer to extend the EHR in arbitrary ways and is one of the strongest features of MM/CH. The procedure for creating these forms is detailed at the MirrorMed EHR Extensions wiki entry.

While the EHR engine is very powerful no good library of such EHR components exists. Although the community is developing them slowly it will take some time before there is general consensus regarding what data should be collected in what circumstance.

ClearHealth/MirrorMed Reporting System

FOSS reporting engines in PHP systems has been a gap for several years. Although there are several good tools available for java. PHP has a distinct lack. As a result all three projects must innovate to create reliable reporting engines.

MirrorMed and ClearHealth both use technology developed in-house at Uversa for reporting. This software will be released seperately by Uversa eventually as phReporting. This tool is very powerful but because it was developed in house, the use of the system is largely undocumented. (Although this will be changing)

The system is driven by through two systems. The first is a sql query engine, that can accept input from the user. SQL statements are developed in advance of entry into CH/MM, a SQL tool like phpmyadmin can be used for this task. Using a tool like this it is easy to develop a statement like..

SELECT `last_name` , `first_name` 
FROM `person` 
WHERE `last_name` = 'Trotter'

This kind of simple statement can then be modified to accept input from the user...

SELECT `last_name` , `first_name` 
FROM `person` 
WHERE `last_name` = '[last_name:GET]'

So that it can be used to get information regarding any person in the system.

Several SQL statements like this can be strung together to gather data from different parts of the system. The resulting data will either be displayed in a simple grid, or the layout of the display can be controlled using a smarty template. These smarty templates layout the data using standard HTML layout, and the engine is capable of converting the reports from html to pdf automatically.

While the system is very powerful, CH/MM does not have a strong library of pre-made reports. The open source community in medical software is good at generating these kinds of libraries. However without good documentation available for how the engine works it will be difficult for these efforts to move forward.

ClearHealth/MirrorMed Security

Like FreeMED, ClearHealth and MirrorMed (CH/MM) use the phpgacl project for access control. As a result the power of the access control system is very substancial. However, phpgacl is a complex system that uses generic terms for roles. The user interface to phpgacl in CH/MM is a window into the standard phpgacl interface. This is interface is difficult to use and generally unclear.

At the current version, the logging level of CH/MM is almost non-existent. It is very trivial to add syslog logging to any portion of the code when needed, but this is far from a generalized logging engine. A logging engine is under development.

Another glaring hole in the code is that the user passwords are stored in plaintext. This makes the database user capable of performing as any user. While this may not be specifically detailed as incorrect by HIPAA it is definately against best-practices, especially since the reporting engine is powerful enough to retrieve these plain text fields. This will probably be addressed in future releases.

For HIPAA compliance at least user logins must be logged, which is also not the case.

Generally, the security of CH/MM is passable, but needs improvement if it is going to stay viable. Given that this is a review of a Release Candidate these issues may be addressed in a final release.

ClearHealth/MirrorMed Architecture

ClearHealth/MirrorMed had the following results from the cyclic_guess script.

  • Total Files 646
  • Average Complex 6.7
  • Average Functions 5.97
  • Average Ratio 1.02

The goal of the cyclic test is to measure the complexity of the ClearHealth/MirrorMed project. Not the projects that ClearHealth/MirrorMed 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

ClearHealth/MirrorMeds cyclic guess ratio chart (for the time being cannot load images directly into the page because of a server error )

ClearHealth and MirrorMed have a very strong OOP architecture. The system is based on the Model View Controller (MVC) paradigm. Generally the view portion of the system is driven by the powerful Smarty Templating Engine

The general layout of the directory structure is as follows...

Model code /mirrormed/local/ordo
View code  /mirrormed/local/templates
Controller code /mirrormed/local/controller

Both ClearHealth and MirrorMed use the Celini library as the basis for code. As with many of its development this code is also released as a seperate project. The celini library contains the base classes for many of the classes defined in the EHR. The term "ordo" refers to the object persistence mapping system that is provided by celini. Celini provides powerful object based access to many of the powerful php libraries that CH/MM takes advantage of, including ADOdb, phpgacl and smarty.

More importantly, celini provides a base for the clean OOP architecture based on solid patterns and sensible Object Relational translation in CH/MM.

For those interested in a deeper analysis, take a look at the inheritance of the person class. The User class, Provider class (both internal and external), and Patient class are all based on the person class. As a result the only place where a field with "first_name" exists is in the person class and the name history class. The user, provider and patient tables all refer to the person class for their information regarding first name. This follows the standard OOP principle of inheritence.

Compare this to FreeMED, which has at least 14 different first and last name instances (you can check this by searching for lname on a mysql dump). The ClearHealth/MirrorMed EHR has one person database, (There is another person database for the billing engine) while FreeMED has 14. FreeMED maintains order by giving every lname and fname a prefix, while ClearHealth/MirrorMed maintains order through good SQL design.

ClearHealth/MirrorMed CCHIT evaluation

CCHIT evalution will not be included in the first review draft

ClearHealth/MirrorMed emrupdate.com matrix

emrupdate.com table will not be included in first draft

ClearHealth/MirrorMed documentation

MirrorMed documentation is found at docs.mirrormed.org

ClearHealth documentation is found at www.op-en.org/wiki

The sourcecode is documented using phpDocumentor which is also authored by Josh Eichorn.

ClearHealth/MirrorMed conclusion

ClearHealth and MirrorMed share the newest and most untested codebase. There are numerous small bugs that appear in the default installation. Most of them do not signifigantly effect the performance of the application and almost all of them could be easily corrected by a competent programmer. However these errors serve as a reminder of the projects Release Candidate status, and the youth of the project.

CH/MM have major gaps in functionality, especially support for prescriptions and pharmacy interfacing. However, the fundamental design of the application is elegant enough that these features will be easy to add. The rapid pace of development and the breadth of developers working on the project could mean the project will ultimately achieve dominance in the space.

ClearHealth/MirrorMed is being developed several different people and is supported by two companies. It is being developed at about double the rate of the other two projects. It has the most modern architecture, based on an MVC design.

In summary, strong core, lacks maturity, lots of potential.