A recent post on McSweeney's blog struck a chord with me. We are building a Personal Health Record for one of our clients and we're having a tough time integrating with HIS systems with a particularly large hospital chain in India. The HIS app is based on Windows and Microsoft.NET with code written in VB.net which was auto-migrated from VB 6. They construct SQL strings from forms and the app has 1500 tables of which only 50-70 tables are actually used. The application is rife with all sorts of security issues and is a nightmare to maintain. The design, if I may call it so, looked more like a result of natural selection rather than a well engineered product. You know humans have several unnecessary body parts and mechanisms as vestiges of our evolution, the HIS was no different from that. Most of the tables and forms were there because they were part of the evolutionary process and they had to fight the brutal evolutionary cycle to survive on the front-desks and the database server.
On closer inspection of the code, one can only conclude that the HIS was written by a bunch of intoxicated simians. It seems that their manager was aiming for the Ballmer peak but over shot it by a fair amount.
There are a few gems that I want to share with you. Guess where the bill details are stored
- dbo.xxxx_bill (where xxxx is a random 0-7 characters string)
The answer: Depending on when the patient enrolled
This table is for storing "special" test results.
The values may be or may not be stored in contiguous item numbers. I was interested how this came about and after a little digging around I got the answer. They copy-pasted existing forms to create new forms and did not want to alter the binding of the old controls so the created new ones and deleted the old ones. In short, you need to know which columns to select depending on the test that you want to load.
This one is a classic. Each one of the modules is a separate executable but is supposed to act like a single app. Once you click on a menu item or a button it is supposed to open a new executable. Guess where the state is stored. Exactly... the registry. If you locate the individual executable and open it, no authentication, viola. But the IT department has given strict orders that their front-desk guys login with the shortcut on the desktop.
In the end, you feel like gouging out your eyes after seeing such frankenware.
I cannot believe that people are dumb enough to buy such software. So, what should a IT manager do before they buy software? You should read Joel Test. If the company does not follow these practices, do not buy their software. I repeat. DO NOT BUY THEIR SOFTWARE . You will be making this world a much better place and saving a lot of good developers from undeserved grief.
Images licensed under creative commons. Click on the images to know the source.