I was reading Code Complete regarding variable naming in trying to find an answer to this question and stumbled on a table of commonly accepted prefixes for programming word processor software. Well, I'm not a word processor software programmer, but if I was, I'd be happy to use those user defined types.

Since I'm a programmer for a smallish healthcare ISV, and have no contact with the larger community of healthcare software programmers (other than the neglected and forsaken HealthCareIT.SE where I never had the chance to ask this question). I want to know if there is a coding convention for medical records.

Like Patient = pnt and Chart = chrt and Medication = med or mdctn or whatever. I'm not talking full on hungarian notation, but just a standard that would fit in code complete in place of that wonderful chart of word processor UDT's which are of so little use to me.


I've worked with insurance companies, banks and real estate firms, which have some specialized voc too. When in doubt, I always use the full name. Lately I also started to put them at the end (since I noticed that I don't really use many different instantiations any more (in times of Lists, Collections and whatnot). I would do it like this:

Chart firstChart = new Chart("First");
Chart anotherChart = new Chart("Second");

Chart[] lotsOfCharts;

In the (not so) good old times when I was coding using VB (Script) and stuff like that, I did it like this:

Chart chartOne
Chart chartTwo
Chart chartThree

But again, why not just put it into a collection:

Chart[] charts
charts[0] = new Chart("One")
charts[1] = new Chart("Two")
charts[2] = new Chart("Three")

As you see there isn't really any need for a prefix any more.

When it's about data types I then borrow from mathematics.

int x = 0;
int y = x + 5;
string w = "test";

  • Chart was probably a bad example since it's a pretty concrete object and I'd probably go with what you've got there, but medications and individual chart entries could behave more like character and paragraphs in word processors and might benefit from User Defined Types. – Peter Turner May 30 '12 at 17:00
  • User Defined Types. What do you mean? C++ types? Database UDTs? – Dänu May 30 '12 at 18:05
  • It's in Code Complete in the variable naming section, I don't know a lot more than that. The author just gave an example of using ch for Character and pp for Paragraph, etc.. when naming variables when writing a word processor. – Peter Turner May 30 '12 at 18:28

I would try to talk to someone who documented everything in patient charts and get familiar with their abbreviations, most hospital had/have standard charting abbreviations that may be useful. This would also allow your app to be more closely related with your domain which can be useful.

  • That's good advice, but I'd like an answer, not a generic suggestion. Also, their abbreviations are either morbidly terse or just plain old Latin. Hence PRN means as needed, and BID means twice a day. – Peter Turner May 30 '12 at 18:37
  • I really don't see a problem with terse abbreviations, that's the whole point – Ryathal May 30 '12 at 18:43
  • @Ryathal abbrevations are only ok when most people can deduce what the full word is supposed to be. If an abbreviation is too terse (or worse yet, in Latin) you risk other developers not knowing the meaning of your identifiers. – Oleksi May 30 '12 at 18:46
  • Well, I asked the question specifically with the Code Complete in mind. According to it, using other languages is bad and using unintelligible abbreviations is not so good. – Peter Turner May 30 '12 at 18:48
  • 1
    I think the medical field benefits more from a DDD approach and embedding some domain knowledge in the app makes developing easier once that knowledge has been gained. – Ryathal May 30 '12 at 18:51

I have also worked in healthcare software and I've found very few "established" acronyms and abbreviations. The only one that I've seen used regularly is "MRN" for "medical record number". There's also some terms that are commonly used as abbreviations (EMPI, XDS, etc.), so those are OK to use in code as well.

Outside of this, it's much more clear to avoid using abbreviations and use full words. Certainly don't bother with abbreviations for things like "patient", "document", "medication".

Best practices for healthcare are the same as best practices for any other piece of software. Unless it's a universally established abbreviation, it's much safer and cleaner to use the full work.

  • I'm not talking about using abbreviations for entire variables I'm talking about using abbreviations for prefixes of variable names like medPRN instead of medicationPRN. But yeah it's safer and cleaner, but it also can get substantially above 20 characters, where apparently productivity is diminished. – Peter Turner May 30 '12 at 18:45
  • 1
    The same point applies to abbreviating parts of variables. You are reducing the clarity for a lot of other developers. I would still prefer a 20+ character variable to an unclear, non-standard abbreviated variable. – Oleksi May 30 '12 at 18:49
  • But why do you need what sounds like Hungarian notation at all when a properly named variable should pretty much tell you what it is? 'med' versus 'medication'...seems like a common enough and accepted abbreviation that its fine. Same rules mentioned in the answers apply. – Rig May 30 '12 at 19:13
  • @Rig you don't need Hungarian notation. In fact, it is widely consider bad practice to use it today. It became popular in the days when you couldn't just mouse over a variable in your IDE to get all it's type information. Today, IDEs make Hungarian notation obsolete. – Oleksi May 30 '12 at 19:15
  • 1
    @Oleksi That was my point. – Rig May 30 '12 at 19:25

Not the answer you're looking for? Browse other questions tagged or ask your own question.