Posts Tagged ‘M’

Legacy Health IT: Case of the MUMPS

June 3, 2010

I recently recalled an article at The Daily WTF I read a while back on legacy health IT software, specifically regarding the language MUMPS, or “M”. It was developed by Mass. General Hospital and was pretty innovative in its time.

But that was 1960. Programming language have diversified and evolved (I like Python). But looking at a sample of code (Wikipedia) from this language makes it easy to understand why these large health IT companies find it hard to have an agile approach to software changes:

Here is some example code from Wikipedia:


%DTC
%DTC ; SF/XAK – DATE/TIME OPERATIONS ;1/16/92 11:36 AM
;;19.0;VA FileMan;;Jul 14, 1992
D I ‘X1!’X2 S X=”" Q
S X=X1 D H S X1=%H,X=X2,X2=%Y+1 D H S X=X1-%H,%Y=%Y+1&X2
K %H,X1,X2 Q
;
C S X=X1 Q:’X D H S %H=%H+X2 D YMD S:$P(X1,”.”,2) X=X_”.”_$P(X1,”.”,2) K X1,X2 Q
S S %=%#60/100+(%#3600\60)/100+(%\3600)/100 Q
;
H I X<1410000 S %H=0,%Y=-1 Q S %Y=$E(X,1,3),%M=$E(X,4,5),%D=$E(X,6,7) S %T=$E(X_0,9,10)*60+$E(X_”000″,11,12)*60+$E(X_”00000″,13,14) TOH S %H=%M>2&’(%Y#4)+$P(“^31^59^90^120^151^181^212^243^273^304^334″,”^”,%M)+%D
S %=’%M!’%D,%Y=%Y-141,%H=%H+(%Y*365)+(%Y\4)-(%Y>59)+%,%Y=$S(%:-1,1:%H+4#7)
K %M,%D,% Q

Compared to some example Python code:


my_list = ['john', 'pat', 'gary', 'michael']
for i, name in enumerate(my_list):
     print "iteration %i is %s" % (i, name)

I’m being a tad unfair here, as the above MUMPS code does not simply print a list of names (I think), but what should be clear is the degree to which some of this legacy health IT code is completely un-manageable. It might be worth asking your large EMR vendor which types of platforms they are using and what they think of their ability to add features and fix bugs in a timely manner.