Archive for the ‘Software’ Category

Halamka: Rethinking Certification

October 2, 2013

Dr. Halamka of BIDMC has been a supporter of the ONC and their quest for meaningful use. He has been a “no whining, just solutions” voice in the industry, helping the ONC gain at least a little bit of traction to test their Meaningful Use wings.  I applaud him for his patience and stoicism,   but also now welcome his constructive criticisms of the meaningful use guidelines.   He calls for the ONC to make up it’s mind on which standards to use. Hear! hear!


We have recently re-visited our schedule for meeting meaningful use and put in a list of high/medium/low priorities for what tasks we have left. The tasks that are uniformly low on our priority list are functions such as “reporting to immunization health agencies”.  We run a cancer clinic. We MIGHT give out a flu shot or two, but we are not giving assays of immunizations to two year-olds.

Another feature is the displaying of growth charts. Why do we need to clutter our interface so that you can display a pediatric growth chart when our patients are reliably all over 20? The are just two examples of the ‘plumpness’ that still exists in the meaningful use guidelines that is nearly irrelevant to the success of medical specialty software.


And it is clear why such requirements are there. Our politicians want to show us how to make software by pointing to the horizon and shooting some money out of a cannon.  All of the software vendors start running in the same direction without asking “why?”, or saying “can you check the map again’?”  Instead, they fall in and throw enough money at a problem until all the tests pass. Success.


I can’t put it better than Dr. Halamka about how to foster a better healthcare software ecosystem:

Certifying organizations would not be prescriptive about user interfaces, workflow, or exhaustively test every variation of every option.   Instead, they would certify that an EHR can securely send a precisely formatted clinical summary and securely receive a compliant but less than perfect clinical summary.


How simple, succinct, successful.

Fighting the Internet

July 1, 2013

Last week our main Internet connection went down. The office didn’t even notice because we are hosting Ankhos in the basement and not in “The cloud”.  It happens.

Despite this outage, we have been working on getting an architecture set up for hosting Ankhos from Amazon.  There are lots of things to consider:

Heroku or Amazon or Xyz?: We determined that for our usage, Amazon would be more cost effective, and we would have great compatibility with S3 (The Amazon storage engine) and even Amazon Glacier(The Amazon long-term storage engine). Other suggestions for hosting platforms are welcome!

Amazon RDS or our own replicated Postgres instances? RDS means switching to MySQL which feels gross, but may make our lives a whole lot easier. Our ultimate decision was to go with RDS. There are too many moving parts in the Postgres approach that we would waste time solving a problem that didn’t need to be solved.

Deployment: We still don’t have this one quite ironed out. We would like to have a deployment similar to Heroku where a Git Push updates the code on the servers, then manually cycle the instances behind a load balancer to get the code running. Or even have the ec2 instances detect changes and cycle themselves!


We have already learned so much with this project:  A cursory vocabulary of chemotherapy, Knowledge of the oncology workflow, Unix administration, HL7, Django, ‘Meaningful Use’,… tons of stuff. We have also learned squishier things like Project Management, Resource/Requirements gathering and creating positive client relationships.

Now we get to learn even more with cloud hosting for all of our future customers 🙂


PS: If you know of a good Amazon veteran, send them our way!

Another Faxage Success Story

December 3, 2012

I just want to relay another success story we’ve had with Faxage, our bulk e-faxing provider.


We have switched to the Django 1.4.2 directory structure (Sort of a pain) and it broke some of our images we used when signing documents. While cleaning this up, we took the opportunity to change the way we submit faxes with images to Faxage.

We decided to start sending the images in-line with our markup using the the src attribute:


<img src=”data:image/png;base64,Wa43W6o1WrExMRAqVQiOTkZ…”>.


I sent a test fax with the example from Wikipedia and it didn’t work. I didn’t necessarily expect it to, as it isn’t specifically listed in their specs. So I emailed their support, asking if they support it in another way or if they will in the future.


6 minutes go by.


I get a response saying that they already put a change in and asked if would I test it on my end.


It works now.

Screenshot: Scheduling problem

July 22, 2010

**UPDATE  06/05/2012** Contains old/nonexistent screenshots!


I just posted about the scheduling problem and promised a mock-up screenshot. Here it is:

Diagram showing sliders and charts

The sliders on the left will affect the population histograms on the right.

Obviously numbers are off and scale is inaccurate… for now.

Ankhos + iPad: The perfect marriage

June 14, 2010

I just recieved our development iPad from the apple store this afternoon. If there has ever been an incarnation of poetry it is in the synergy of the iPad and Ankhos.  There is really something special in the iPad and I am now a believer.

I was skeptical that Safari would be able to handle what Ankhos was up to, or that the resolution might be to small or… well, that’s all in the past now. I hope iPad forgives me.

This is going to be awesome.

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:

;;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.

Ankhos Color Scheme

May 20, 2010

We’ve been using this great site to help us with our color schemes:  It has a lot of cool tools like masks for different types of color-blindness and easily allows you to shuffle hues and saturations around. It even provides example ‘Lorem Ipsum’ pages.

Here is a link to our current beta color scheme:–w0w0

There are a bunch of other color scheme helpers out there, but this is my favorite. Be careful though, it doesn’t put the ending in the url by default so refreshing the page will set the base hue back to #FF0000.

If anyone has comments on our color scheme, I’d love to hear them.

Chemo administration screenshot

May 19, 2010

**UPDATE  06/05/2012** Contains old screenshots!


This is a promised screenshot of our current iteration of the page our nurses will be using to administer chemo.  There is a LOT going on in this picture, but some of the important procedural bookkeeping that is required of the nurses is streamlined on this page.  IV notes, allergies, even plain old warnings about a patient are present here.  Also present are things like dual-signature chemo dose verification and minute-by-minute tracking of what has happened to this patient.

Keep in mind, this is a beta, and there are some debugging/feedback features here for the time being.

The orders these nurses are carrying out come from the specialized physician order interface (not pictured here).

I would love to get more into the rest of the application, but that is premature at this juncture.

Military TimeTextBox inside InlineEditBox

May 3, 2010

After about an hour and a half looking through the tattered remains of the dojo/dijit online documentation, I was finally able to figure out what I was doing wrong trying to put a TimeTextBox inside of an InlineEditBox (with the help of the O’Reilly book and the Pragmatic Programmers book) These books have been invaluable to me not only when the Internet is dead, but when the online docs fail to deliver.

Getting the widgets nested was easy, but I had a hard time figuring out how to get the parameters to the timebox, namely. I was trying desperately to make the time box in military time.

My initial markup was something like:

<span dojoType=”dijit.InlineEditBox”

It turns out I had forgotten the ‘constraints’ aspect of the editorParams. So the correct code for putting a military time timetextbox inside of an inlineeditbox is:

<span dojoType=”dijit.InlineEditBox”


Two more weeks of testing

May 2, 2010

The past two weeks have been very busy. I have been on-site at the office of Carolina Oncology Specialists working with the doctors, nurses and staff who will be using Ankhos, and there is a lot of work to be done. Two of the major improvements which have come from this most recent week have been:

Regimen creation UI: While the regimen framework has been fully able to represent and create the complicated chemotherapy regimens designed by the doctors, the UI is not yet ‘easy to use’  in this regard. The doctors and I spent some more time hashing out ideas and hopefully the next iteration will be better.

We are trying to focus more on the vocabulary of the user. For instance, being able to program “once a week for three weeks, skip a week and then a fourth treatment” is more natural to a MD than specifying “Days 1,8,15,29” for a treatment. We need to figure out how to fit that into a UI.

FTP file dump ingest:  I was able to set up the web server and get the automatic file ingest working. The lab machines are currently set up to dump a file each time a patient has their blood drawn.  This folder has never been emptied.  Ever. This means around 64 thousand files are in each of these folders (multiple machines * multiple office sites = multiple folders)
My original script simply looped through the files in the directory in Python determining, by the modification date of the file, which files to ingest. I quickly learned that this was entirely too slow. What I ended up having to do was perform a ‘ls’ or ‘dir’ command on the directory using the Python subprocess package and let the filesystem do the sorting for me. I’m sure there is a log(n) process in there somewhere, because it certainly made the ingest time acceptable.