EHR Copy and Paste Considered Harmful

DRY principle – Don’t Repeat Yourself

How bad are Electronic Health Record (EHR) programs? Let me count the ways. Rather, let me not, as I and many other folks have already done so. Even non-tech savvy doctors (of which there are fewer and fewer) realize something is wrong when they compare their experience using an EHR with virtually every other computer program they come across, such as the apps on their phones. As the click counts required to do simple tasks mount up and repetitive stress injury of the hand sets in, even the most sanguine of medical personnel will eventually realize that something is not quite right. And as EHR companies forbid sharing of screenshots of their user interfaces, you’ll just have to take my word for it these UIs are, let us say, quaint. Hey EHRs, the 90s called and want their user interfaces back.

In this post I’ll point out just one of the many problems with EHRs: EHRs violate the DRY principle.  The acronym DRY is familiar to computer programmers, but not to most medical people. DRY stands for “Don’t Repeat Yourself.” In computer programming it means don’t write the same code in two or more different places. Code duplication is what some programmers refer to as a code “smell.” There is no reason to duplicate code in a computer program. A single block of code can be called from multiple procedures.  There is no reason for each procedure to have its own copy of this code block.   Code duplication leads to code bloat and code rot, where two procedures supposed to do the same thing get out of sync with each other because of changes in one copy of the duplicated code and not in the other.

Applying the DRY principle to a database requires that every item of data has a single location in the database. Multiple copies of the same data increase the size of the database and invariably cause confusion. Which copy is the original? Which copy is the true copy when copies disagree?

An EHR program is at root a gigantic database. Ideally Patient Smith’s X-ray report from 1/1/2017 is filed away properly in the database and easily retrieved. Same with his blood work, MRI results, etc., etc.

Enter Copy and Paste.

Copy and Paste is evil. Unlike Cut and Paste, Copy and Paste’s close cousin that moves data around without duplication, Copy and Paste is bad, lazy, and sloppy.  Copy and Paste needlessly duplicates data. Copy and Paste violates DRY.

EHR notes are rife with Copy and Paste. X-ray reports are copied and pasted. Blood work too. Even whole notes can by copied and pasted. It is easy to copy and paste a prior progress note and then make a few changes to make it look like it wasn’t copied and pasted. Everyone does it.

Many EHR progress notes fall just side short of novel length. Whole cath reports, MRI results, other doctor’s notes, kitchen sinks, and other potpourri are thrown in for good measure. Usually with a bit of skillful detective work one can determine the minor fraction of the note that is original. Usually it is last line. Something like: “Continue current plans.” These could be the only words actually typed on the keyboard. Everything else is just copied and pasted.

So you get all the downsides of DRY: bloated notes, duplication of data, possible inaccuracies and synchronization problems. The X-ray report may be revised by the radiologist after it is copied and pasted into the note. Nevertheless the unrevised report persists forever sitting as a big blob of text in the middle of a now inaccurate note. Of course there is some consolation that no one will ever read the whole note anyway, with the possible exception of a malpractice lawyer.

Why is Copy and Paste so prevalent in EHR notes? It isn’t just laziness. Like the pulp fiction writers of the 30s, doctors are effectively paid by the word, so that the longer the note the better. Longer notes reflect higher levels of care, more intricate thought processes, more — wait a minute! No they don’t. Longer notes reflect mastery of Copy and Paste, something that’s not too difficult to master. Even non-tech docs seem to have no trouble with it. Long notes are a way to justify billing for a higher level of care, i.e. more dollars. Since the Powers That Be Who Control All of Medicine (i.e. not doctors) decided that billing would not be based on what doctors do, but on what doctors write in the chart, it doesn’t take a crystal ball to predict that note bloat, electronically enhanced, would be the inevitable outcome of such a stupid policy.

What are the alternatives to Copy and Paste? The best is the use of hyperlinks, something that you might be familiar with if you ever use something called the World Wide Web. If I want to put a YouTube video on my blog, I don’t copy the video and paste it here, I just provide a link. Similarly, if you want to refer to an X-ray report in a progress note it should be possible to just provide a link to it. Something short and sweet.

Of course the example note I referred to above would be reduced in length to just a number of links and the sentence “Continue current plans.” This will hardly satisfy the coders and billing agents and whoever else is snooping around the EHR trying to find ways not to pay anyone (i.e. insurance companies). Nevertheless these shorter notes would be much easier to digest and might even encourage a doctor to elaborate a bit more in his or her own words on the history, physical, diagnosis, and plans. Unlinking billing and documentation would go a long way towards making EHR notes more manageable and informative. No one seems to keen on doing this however. Documentation as a proxy for care  is just one of many broken pillars of the Byzantine edifice known as the American Health Care System.

[note: the title refers to a famous (in computer circles) 1968 letter by Edsger Dijkstra entitled “Goto Statement Considered Harmful.” It has inspired tons of computer articles with similar titles, including this one.]

About mannd

I am a retired cardiac electrophysiologist who has worked both in private practice in Louisville, Kentucky and as a Professor of Medicine at the University of Colorado in Denver. I am interested not only in medicine, but also in computer programming, music, science fiction, fantasy, 30s pulp literature, and a whole lot more.

Leave a Reply