Slashdot Mirror


MUMPS, the Programming Language For Healthcare

citadrianne writes: An ICU patient is monitored and assessed according to 12 different variables. These include such measurements as body temperature, heart rate, blood oxygenation, blood pH, and others. Together, they're used to formulate a quantitative answer to the question, "How bad is it, doc?" Many of these physiological signs are measured in real-time via electrodes and like a billion different varieties of catheter. Add to it barrages of lab tests done multiple times per day per patient and the need for 20 or so clinicians (per patient) to have access to all of this data, and the result is very a deep data problem. Multiply that data problem by hundreds of thousands of patients.

This is the fundamental problem that the programming language MUMPS (sometimes called just "M"), or the Massachusetts General Hospital Utility Multi-Programming System, aims to solve. To its proponents, MUMPS allows for a one of a kind synthesis of programming and database management, while to to its detractors, it's a bizarre anachronism with little connection to the evolution and innovation taking place elsewhere in programming. Probably to most people that do things with computers, MUMPS/M is poorly understood, at best, and more likely to be completely unknown.

18 of 166 comments (clear)

  1. MUMPS, ancient and rarely used by Sez+Zero · · Score: 5, Interesting

    I have a doctor friend who, before becoming a doctor, was a CS grad. He's in his 50's now. When I told him we hired someone from Epic Systems that knew MUMPS, he exclaimed, "They still use that?! MUMPS was going out of style back when I was an undergrad!"

    I believe it is also still used in older banking/financial tools.

    1. Re:MUMPS, ancient and rarely used by Registered+Coward+v2 · · Score: 5, Funny

      I have a doctor friend who, before becoming a doctor, was a CS grad. He's in his 50's now. When I told him we hired someone from Epic Systems that knew MUMPS, he exclaimed, "They still use that?! MUMPS was going out of style back when I was an undergrad!" I believe it is also still used in older banking/financial tools.

      While MMR vaccine has pretty much eradicated MUMPS the anti-VAX crowd is big enough so that it still crops up in isolated populations.

      --
      I'm a consultant - I convert gibberish into cash-flow.
    2. Re:MUMPS, ancient and rarely used by angel'o'sphere · · Score: 4, Informative

      That is not really correct. Cache is an objecy oriented database, Mumps is a programming language/programming system which happens to use Cache.

      https://en.wikipedia.org/wiki/...é ... I wonder if that link works :)

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:MUMPS, ancient and rarely used by nmb3000 · · Score: 3, Insightful

      I have a doctor friend who, before becoming a doctor, was a CS grad. He's in his 50's now. When I told him we hired someone from Epic Systems that knew MUMPS, he exclaimed, "They still use that?! MUMPS was going out of style back when I was an undergrad!"

      Yep, and MUMPS is still used at Epic, though they call it M and claim to have made customizations and improvements to it. I was offered a job there a few years ago and they go to great expense to attract recent graduates with high starting pay (more than $84,000 in Wisconsin), unbeatable benefits including the most amazing health care plan I've seen, and a pretty cool campus.

      Unfortunately it wasn't enough for me to overcome moving to Madison, working long hours, and (most importantly) becoming an expert in an all-but-dead language. When I investigated career paths at the time, the only path MUMPS offers appeared to be (1) work at Epic for a couple of years and then (2) consult for Epic's products for the rest of your career.

      If you want to see the very worst 1966 has to offer today:

      A Case of the MUMPS
      MUMPS Madness
      Revenge of MUMPS Madness!
      MUMPS

      It's kind of like the worst parts of COBOL, Javascript and PHP were all mixed together and then baked at 400* until charred and smoking.

      --
      "What do you despise? By this are you truly known." --Princess Irulan, Manual of Muad'Dib
      /)
    4. Re:MUMPS, ancient and rarely used by ValentineMSmith · · Score: 3, Funny

      Actually, it's kind of the other way around in reverse. MUMPS is the database backend. Cache exists as an object oriented datastore that uses MUMPS. Cache also has a VB-ish scripting language that can be used for those that don't feel like parsing stuff that looks like

      N X S X="^DIC(",X=$QS(@X)

      Many (but not all) of my personality problems derive from supporting software written in MUMPS for the last 15 or so years.

      --
      Karma: Chameleon - mostly influenced by bad '80s New Wave music
  2. MUMPS: are you kidding? by iTrawl · · Score: 5, Informative

    O M G

    --
    "Everybody's naked underneath" -- The Doctor
    1. Re:MUMPS: are you kidding? by Apocryphos · · Score: 3, Interesting

      As usual, the real WTF has more to do with the people/management than the languages used.

    2. Re:MUMPS: are you kidding? by jthill · · Score: 4, Informative

      I'm used to anti-{language,tool,method} screeds being ignorant braying in lieu of effort, but this . . . This isn't even remotely the worst of it, it's only that it's soundbite-able. That first link deserves the word "mindboggling". The list here starts out slow, easing you in to it gently. No, seriously..

      • CASE SENSITIVITY: Commands and intrinsic functions are case-insensitive. Variable names and labels are case-sensitive.
      • COMMANDS: may be abbreviated to one letter, case-insensitive. Includes commands such as IF, ELSE, GOTO, WRITE, and XECUTE [which is my personal favorite, it allows arbitrary execution of code contained in a variable]
      • OPERATORS: No precedence, executed left to right, parenthesize as desired. 2+3*10 yields 50.
      • DATA TYPES: one universal datatype, interpreted/converted to string, integer, or floating-point number as context requires.
      • DECLARATIONS: NONE. Everything dynamically created on first reference.
      • LINES: important syntactic entities. Multiple statements per line are idiomatic. Scope of IF and FOR is "remainder of current line."
      • LOCAL ARRAYS: created dynamically, any number of subscripts, subscripts can be strings or integers. Stored in process space and expire when process terminates.
      • GLOBAL ARRAYS: arrays that start with a caret symbol. Stored on disk, available to all processes, persist when process terminates. This is M's main "database" mechanism.
      --
      As always, all IMO. Insert "I think" everywhere grammatically possible.
  3. Why? by drinkypoo · · Score: 5, Insightful

    Maybe it made sense once. But reading TFA, what convinced me that MUMPS is really BOLLOCKS was this quote:

    For one thing, as a programmer, I can take an item stored in one of those globals and give it "children," which might be some additional properties of that item. So, we wind up with lists of different things that can be described and added to in different ways on the fly.

    Hmm. That sounds almost like you're tracking relationships. Maybe you should use... (wait for it) A RELATIONAL DATABASE. Seriously, we often store object databases in relational databases. It's easy to add more properties to objects in your database with a relational db because of its very nature. You just create a new relationship, appropriately keyed. And there are lots of examples of systems backed by relational databases which permit you to add arbitrary new properties to objects. Take Drupal, for example; you can always either add a new module which will add new properties to old node types, or just add more data types to old node types. You could add, for example, a parent-child relationship. In fact, modules exist to do this already.

    Maybe there is something about MUMPS which makes sense, but if there is, it wasn't articulated in this article. I tunneled down to the MUMPS/II page and found this:

    1. Hierarchical database facility. Mumps data sets are not only organized along traditional sequential and direct access methods, but also as trees whose data nodes can addressed as path descriptions in a manner which is easy for a novice programmer to master in a relatively short time;
    2. Flexible and powerful string manipulation facilities. Mumps built-in string manipulation operators and functions provide programmers with access to efficient means to accomplish complex string manipulation and pattern matching operations.

    So basically, nothing you can't have in perl today, with a relational database, and a table or two to track relationships between objects. But instead, it's a whole new opportunity to create problems! MUMPS is a great name for it.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    1. Re:Why? by Anonymous Coward · · Score: 3, Informative

      MUMPS originally had a sort of in-memory database layer (map > >). They then abstracted that so it could load chunks of the database on the fly from disk. Later, that became a separate product (forked?) known as Intersystems Caché, which billed itself as a post-relational database (read: pre-relational, hierarchical database). Caché at least added SQL-like language to the product so it could pretend to be an RDBMS... so it's not necessarily no-SQL, because they added SQL later, but it is non-relational, yes.

    2. Re:Why? by dmr001 · · Score: 3, Interesting

      As noted above, MUMPS (in the guise of Intersystems' Caché) is the database underlying both the VA's Vista and Epic Systems' Epic, which are probably the two leading large-scale EMR vendors on the planet. My 5 state hospital system uses the latter, having upgraded from a system that just handled part of one state and ran on top of Oracle and would regularly slow to a crawl. I don't know how much of Intersystem's marketing-speak to believe, but for a gigantic disparate database of branching nodes of something on the order of a million patients and all their chart notes, telemetry data for those who have been hospitalized, lab results and links out to everything from fetal heart tracings to MRI's, the thing is fast and seems to be close to bullet-proof. MUMPS itself is scary (to me, anyway) with its global variables and odd syntax, and I have a few bones to pick about the interface, but the database layer is really remarkable.

    3. Re:Why? by Apocryphos · · Score: 3, Interesting

      Agreed. I worked for Epic for many years and while M was a lot to get used to, you DO get used to it. And it is amazing for certain tasks.

      Epic crushed a lot of competition by marketing a "fully integrated suite". All of the applications (there could be dozens) for a customer run off a single M database. Why wasn't the competition stronger? Many reasons, but one was because most competitors were using SQL and couldn't compete on performance.

      The big limitation of M is reporting. Epic solved that by running extracts to a SQL "reporting database" and hooking up off the shelf reporting tools.

    4. Re:Why? by littlewink · · Score: 3, Interesting

      Hmm. That sounds almost like you're tracking relationships. Maybe you should use... (wait for it) A RELATIONAL DATABASE. Seriously, we often store object databases in relational databases. It's easy to add more properties to objects in your database with a relational db because of its very nature. You just create a new relationship, appropriately keyed. And there are lots of examples of systems backed by relational databases which permit you to add arbitrary new properties to objects. Take Drupal, for example; you can always either add a new module which will add new properties to old node types, or just add more data types to old node types. You could add, for example, a parent-child relationship. In fact, modules exist to do this already.

      Except that MUMPS did it 30-40 years before such features were available in relational databases.

      And see Henry Baker on "Relational Databases", Comm. of the ACM 35,4 (April 1992), 16,18.:

      Why were relational databases such a Procrustean bed? Because organizations, budgets, products, etc., are hierarchical; hierarchies require transitive closures for their "explosions"; and transitive closures cannot be expressed within the classical Codd model using only a finite number of joins (I wrote a paper in 1971 discussing this problem). Perhaps this sounds like 20-20 hindsight, but most manufacturing databases of the late 1960's were of the "Bill of Materials" type, which today would be characterized as "object-oriented". Parts "explosions" and budgets "explosions" were the norm, and these databases could easily handle the complexity of large amounts of CAD-equivalent data. These databases could also respond quickly to "real-time" requests for information, because the data was readily accessible through pointers and hash tables--without performing "joins".

      I shudder to think about the large number of man-years that were devoted during the 1970's and 1980's to "optimizing" relational databases to the point where they could remotely compete in the marketplace. It is also a tribute to the power of the universities, that by teaching only relational databases, they could convince an entire generation of computer scientists that relational databases were more appropriate than "ad hoc" databases such as flat files and Bills of Materials.

      Computing history will consider the past 20 years as a kind of Dark Ages of commercial data processing in which the religious zealots of the Church of Relationalism managed to hold back progress until a Renaissance rediscovered the Greece and Rome of pointer-based databases. Database research has produced a number of good results, but the relational database is not one of them.

      Sincerely,

      Henry G. Baker, Ph.D.

  4. Re:This MUMPS? by nitehawk214 · · Score: 3, Funny

    Yeah, you would think Vax would get rid of MUMPS.

    Must be those damn Anti-Vaxers.

    --
    I'm a good cook. I'm a fantastic eater. - Steven Brust
  5. Oh the pain... by aethelrick · · Score: 5, Interesting

    I was unlucky enough to have to advise how best to integrate a cobbled-together creaking MUMPS system into a more modern healthcare environment where the business wanted to "use SQL" to write reports against the data in the MUMPS system... of course the ancients who wrote the MUMPS system had done so with a complete disregard for maintenance and extensibility. NOTHING in the system was well thought out... in fact it looked a lot like a bunch of programming novices had just added a crap-ton of data in attribute/value pairs in no particular structure over a period spanning many years with each individual change being in complete isolation because the authors did not understand what had gone on before. It was also sadly really easy to copy/paste vast tracts of code along with the persistent storage bit so guess what the novices I mentioned earlier did? Yup, they copied and pasted a bunch. Now while this distasteful in any language, consider how much this hurts when it's in effect your actual data storage you're copying and pasting along with the code Furthermore... the authors had used every shorthand short-cut in the book because they hated typing (and the reader apparently). I can honestly say I'd rather debug befunge in my head than work with anything remotely related to MUMPS, M or Cache every again. From what I saw, the system was a write-once/read-never data soup that had no place in the GP practice management software that had been written in it. The system held fairly small amounts of data in bloody idiotic structures that were impossible to read without writing more MUMPS. All the business was trying to do with it was print a few letters and government forms... something ANY SQL database along with a report writer would have handled in a much simpler, cheaper and more maintainable manner. *shudder*

  6. MUMPS is nothing special by xaintly · · Score: 4, Interesting

    MUMPS is only used in healthcare/financial systems because those institutions developed applications in the 1970s and are still maintaining them. There is zero interest in MUMPS for any new development. At the time (the 1970s), MUMPS offered a lot of features that other languages didn't. It is basically a hierarchical key/value datastore (like the windows registry, or a filesystem), coupled with a minimalist programming language (it still doesn't support 'while' loops, switch statements or variable scoping). There is no concept of relationships (except between layers of the hierarchy), no way to enforce datatypes, no way to sort an array, no way to search the hierarchy for anything, no way to create discrete objects or associate methods with data.

    It does contain some advanced features (for the 1970s); multi-threading, distributed data, and the ability to abbreviate all language commands down to 1-2 letters so your program can fit into 4k of RAM.

    EPIC, the medical records product used by many hospitals in the US, is built on top of Intersystems Caché. Caché adds relational features to the MUMPS database, object-ish features to the MUMPS language and supports SQL queries. Internally, it converts all queries to MUMPS, and you could totally bypass the API and write anything you like directly to the database (violating any constraints the API would have imposed on you).

    If you are interested in schema-less/noSQL databases, I would suggest you have a look at MongoDB. It has all the features MUMPS does, but without the ancient programming language attached to it. It also has powerful searching capabilities, can store terabytes of data and supports transparent replication and distributed storage.

    If you are interested in a schema-less database for a MEDICAL ENVIRONMENT, where accuracy matters and the difference between having a '12' in the dosage column vs. "123 any street, anytown, usa" (silently converted to 123 when treated as a number) could kill somebody, then please consider an alternate profession.

  7. Mumps usage by kcokane · · Score: 4, Informative

    /. comments seem to be a contest to see who can demonstrate the least knowledge of the subject. While Mumps is largely unknown to many, it is widely used in health care and finance. Epic Systems controls about 40% of the US market (http://medicaleconomics.modernmedicine.com/medical-economics/content/tags/electronic-health-records/why-epics-market-dominance-could-stifle-ehr?page=full) and is written in Mumps as is the world's largest clinical information system, VISTA (http://worldvista.org/AboutVistA).

    Mumps is a simple, string oriented scripting language for a builtin multi-dimensional and hierarchical database (http://www.cs.uni.edu/~okane/source/MUMPS-MDH/stonehill.pdf). It is especially well suited for applications such as medicine where knowledge is often as varying depth hierarchies that are not well suited for relational systems.

    The commercial vendors are Intersystems (http://www.intersystems.com - their version is called Cache') and GT.M (http://www.fisglobal.com/products-technologyplatforms-gtm) whose version is open source / GPL. My own version (http://www.cs.uni.edu/~okane/) is also open source / GPL and can map the Mumps global arrays (the sparse array trees) to PostgreSQL.

    --
    Kevin O'Kane http://www.cs.uni.edu/~okane/
  8. Comments from a former MUMPS programmer by lurker412 · · Score: 4, Informative

    I used MUMPS (and MIIS) extensively while working in healthcare in the 80s and 90s. It was an efficient programming and database environment for mini-computers which combined a hierarchical database and interpreted language with sparse arrays and extensive pattern-matching capabilities baked in. It was widely used in hospitals for clinical operations and that legacy is still present in healthcare. The language itself would scare the shit out of anybody using modern technologies (self-modifying code, anyone?), but used with discipline it ran many applications that were literally a matter of life or death for patients. Some variants (MIIS, DEC) were also stand-alone operating systems running on the bare metal. It gave you lots of bang for the buck, even if the code itself looked like a printer test. There used to be a small but active community of vendors and users. Today, there is one large player, Epic Systems, which dominates the applications market, especially in the electronic medical records area. They use Intersystems MUMPS (now known as M) as the underlying language; it has an extensive application building environment on top of the basic language to provide relational, Web and object-oriented abstractions. You can build applications in this environment without ever touching MUMPS code, though commercial applications will generally drop down into MUMPS for special purpose routines.