PIH-EMR

The PIH informatics team’s blog

  • PIH logo

Posts Tagged ‘Rwanda’

Rwanda Upgraded to OpenMRS 1.4

Posted by djazayeri on November 20, 2008

I want to congratulate Chase and Maros for getting Rwinkwavu and Kirehe’s OpenMRS servers upgraded to version 1.4 with sync. Jeremy and Evan, you two owe them beers for having upgraded first and finding and fixing a whole slew of bugs in 1.4 that you would otherwise have had the pleasure of experiencing firsthand.

I’d also like to share this conversation for those who couldn’t be here:

(Scene 1: Wednesday night, 10pm)

Maros: So, Darius, unless you tell us not to, we’re going to start the upgrade now.
Darius: Hmm…okay, go ahead.
Simon (BCG): WTF? You’re going to do a major upgrade on a Wednesday night?
Chase: Yes.

(Maros and Chase leave.)

Simon: You’re really okay with this?
Darius: Yes, I have complete confidence.

(Scene 2: Thursday morning, 8am. Chase and Maros are sitting around their laptops. They haven’t slept. Darius and Simon arrive.)

Simon: So?
Chase: Rwinkwavu is up and running.
Darius: Whew.

Not that I doubted for a moment. 🙂

-Darius

PS- Anyone reading this from the broader OpenMRS community, we’re going to release 1.4 as alpha now that this first round of bugfixing has happened.

Advertisements

Posted in Uncategorized | Tagged: , | Leave a Comment »

A Check Digit for Polyphemus

Posted by chaseinrwanda on June 26, 2008

“‘Cyclops, you asked my noble name, and I will tell it; but do you give the stranger’s gift, just as you promised. My name is Nobody. Nobody I am called by mother, father, and by all my comrades.’

“So I spoke, and from a ruthless heart he straightway answered: ‘Nobody I eat up last, after his comrades; all the rest first; and that shall be the stranger’s gift for you.’

–Odyssey, Book IX

Ever since the age of myth, the human race has been engaged in an epic struggle against mistaken identity. Oedipus unknowingly kills his father and marries his mother, because he does not know their true identity. The unlucky neighbors of Baucis and Philemon in Ovid’s tragic tale could have been spared if only they had a better way to accurately identify guests. Belle was lucky enough that the Beast’s true identity was a handsome prince, but most of us would prefer to know in advance. And of course, “Nobody” knows better than the now-blind cyclops the importance of accurately identifying visitors.

In the medical world, mistaking a patient’s identity can also have severe consequences. Imagine the following scenario. Annie Nonymous goes to the clinic for a scheduled visit and has blood work done. Annie Nonymous has a system ID of 12543912. The lab technician, who enters hundreds of lab tests into his computer every day, mistakenly types in Annie Nonymous’s system ID as 12543412 (which is actually the ID for Anne Nonymous). The next day, the doctor sees Annie’s CD4 count in Anne’s file and mistakenly starts Anne on ART instead of Annie! Of course, this is a simplified scenario, and in reality there are more opportunities to catch mistakes before they result in a change in drug regimen, but medical mistakes based on mistaken identity are indeed a serious problem. In fact, according to the Institute of Medicine, in the United States alone medical errors lead to around 100,000 patient deaths per year [1].

At Inshuti mu Buzima, we are taking a big step forward to prevent mistaken patient identity. From the beginning, we have been issuing patient identifiers that are verified with a check digit, generated according to Verhoeff’s Dihedral Check Digit Algorithm [2]. A check digit is a simply a letter appended to the end of an identifier that is calculated from the rest of the identifier string. You can play with generating check digits here: http://rwanda.pih-emr.org/verhoeff.html.

Although we have been issuing identifiers with check digits from the beginning, until now we had not actually been checking that check digit anywhere in the EMR. OpenMRS used to have the Luhn Check Digit Algorithm hard-coded into place, but we have recently rewritten the OpenMRS core to allow the addition of any check digit algorithm of the one’s choosing. We prefer the Verhoeff algorithm over Luhn because the Verhoeff algorithm guarantees to catch all single digit replacements and transpositions of adjacent digits. For example XXXaXXX will never have the same check digit as XXXbXXX, and XXXabXX will never have the same check digit as XXXbaXX. Luhn can also detect any single digit replacements, but it does not catch all transpositions of adjacent digits.

Now that we have the tools to detect mistaken identifiers, Cheryl, our data manager, is feverishly working to correct identifiers in the system we know are invalid, with the peace of mind to know that more will not be created. Although check digits are not able to prevent all cases of mistaken identity, we’re confident that together with the other systems of checks and balances we have in place, mankind’s ancient struggle against mistaken identity may be drawing to a close.

[1] To Err is Human:Building a Safer Health System. Institute of Medicine. Washington, DC: 1999.

[2] Wagner, Neal. “Verhoeff’s Decimal Error Detection”. The Laws of Cryptography with Java Code. p 54. San Antonio, TX: 2003. http://www.cs.utsa.edu/~wagner/lawsbookcolor/laws.pdf

Posted in Rwanda | Tagged: , , | Leave a Comment »