Get the highlights in your inbox every week.
Open health - MUMPS programming
Join the M revolution
Are you a geek?
If so, driving the future of healthcare is now within your grasp.
What do you have to do?
Learn the M programming language, and teach it to others.
What’s the M programming language?
The M programming language is also known as MUMPS. Which stands for Massachusetts General Hospital Utility Multi-Programming System.
M is a multi-user, strongly imperative language designed to
manipulate and control massive databases. It is used in the high availability, high reliability niche of the computer market—which includes banking and hospitals. It provides simple data abstractions, in which all data values are strings of characters, and all data can be structured as multiple dimensional arrays. M data structures are sparse, using strings of characters as subscripts. M is itself a language combined with a database engine.
Is M difficult to learn?
Here is the common Hello World program, written in M:
MYLABEL ; This is a comment
WRITE !,”Hello World”
White spaces are significant in M. Commands typically start in the second column. Arguments are separated from commands by a single space.
Is M boring?
Not at all, M starts easy, and rapidly becomes interesting.
Here is one of the coolest features of M, the sparse indexed array:
SET ClientAddresses(“Main Street”,”1056”,”Apt 23”)=”John Doe”
SET ClientAddresses(“Main Street”,”1056”,”Apt 23”,”August 15”)=”Mary Poppins”
In this example, the strings “Main Street”, “1056”, “Apt 23” and “August 15” are all used as indexes in the sparse array “ClientAddresses.”
Sparse arrays are one of the features that make M uniquely well-suited for healthcare applications, because it matches the natural sparseness of data resulting from the series of unlikely events that compose a health record.
And here is the Fibonnaci series, computed in M:
FIBONACCI ; compute the Fibonacci series
FOR I=1:1 SET S=A+B WRITE !,S SET A=B SET B=S QUIT:S>100
WRITE !,"Result= ",S
Would programming in M help me get a job?
- More than 80 percent of hospitals in the US do not have electronic health records (EHRs). Instead, they still run on paper forms .
- Hospitals are being given monetary incentives for adopting EHRs in the next few years. Some will also be subject to penalties if they do not adopt EHRs by certain dates .
- The largest EHR systems currently deployed in the US are written in M, including VistA (Veterans Health Information Systems and Technology Architecture). VistA is the system that currently manages all hospitals and ambulatory care facilities run by the Department of Veterans Affairs .
- Deploying EHRs in hospitals will require of tens of thousands of developers over the next few years.
Institutions using M include: AmeriPath (now part of Quest Diagnostics), Care Centric, Epic Systems Corporation, EMIS, Partners HealthCare, MEDITECH, GE Healthcare (formerly IDX Systems and Centricity), Hospitals of the Department of Veterans Affairs, the Department of Defense and the Indian Health Service. Among the financial users are: Ameritrade, the largest online trading service in the US with over 12 billion transactions per day, as well as by the Bank of England and Barclays Bank.
Why have I never heard of M (or MUMPS)?
The application field of M is very specific to high demand and high performance databases that require support for sparse data. Most M developers have been working for many years in the specific niches of high performance healthcare and financial applications.
The initiative of deploying EHRs in all US hospitals, now brings M programming into the mainstream where thousands of developers would be needed to maintain and support all those installations.
Is M cool? Can I write mobile apps with it?
Yes and yes.
Once you have learned the basic techniques of M programming, you can check EWD, the Enterprise Web Development environment, and start interacting with M database applications from mobile devices, including both iOS and Android .
I’m into NoSQL databases. Why should I care about M?
Because M is a NoSQL database. M is indeed a language that has integrated a database engine to store data persistently. M existed well before SQL was around. And M is also a highly scalable and reliable database system.
It is quite likely that your payroll and your bank account are being managed by an M database.
How do I setup an M programming environment?
You can get a virtual machine with an M programming environment already set up on it here:
Or you can follow the instructions on this page to create your own:
Where can I learn more about M?
This article is intended to be the first in a series. In our next installment, we will cover M 101—a basic introduction to M programming, including the basics of flow control and routines.
If you have any specific questions of topics that you would like to see discussed, please post them in the comments, and I will address them in subsequent posts.
You may also find useful to look at the following books:
- M Programming by Richard F. Walters
- The Complete MUMPS by John Lewkowicz
 Use of Electronic Health Records in U.S. Hospitals, New England Journal of Medicine, 2009 (http://www.nejm.org/doi/full/10.1056/NEJMsa0900592)
 Enterprise Web Development (EWD) (http://gradvs1.mgateway.com/main/)