Working as Designed

The other day, we had an amusing little situation. I don’t want to embarrass any of the people involved, but it’s such an interesting situation I wanted to blog about it.

Our biggest beta-client for TL7 is a pharmacy chain. (Over 25,000 messages served!) Intelliware does the development for their pharmacy management application and the development team is just down the hall from us.

The other day, one of the pharmacy system developers wandered in to our room and told us that they were experiencing a problem with TL7. What’s the problem? A normal Find Candidates message is taking a verrrrrry long time to execute.

We jumped into action. We tried a few things to isolate the problem. We brought up the simple “process a message” web interface, and plugged in a simple find candidates message. Worked pretty quickly. Then we went to the message logs and took a copy of the exact message that had been sent from the pharmacy system. We pasted that into the simple web interface, and it took a looooooooong time.

What was going on? The second message contained some additional criteria: could those other fields have somehow forced a sequential search of the database or something? That didn’t seem to make a lot of sense to us, but, we couldn’t imagine very many other possibilities. So we threw one of our developers on the problem.

Shortly after, the root problem became clear.

We’ve built a lot of interesting features into TL7. The hope is that TL7 can help you test all kinds of aspects of your HL7-enabled application. And one such area of support is the ability to emulate transport-level problems.

Earlier, the pharmacy team set up a “special handling” rule. Basically, they wanted to know how the pharmacy system would behave if the HIAL takes a long time to respond. So they set up a rule such that if the author section of a message specifies a certain person, then the message will take an extra four minutes to respond.

Guess which author they were using for the find candidates request?

I’ve never been a big fan of the phrase “working as designed”, but it seems apt, here.

What this incident did highlight for us was that in all of our logging, it might have been helpful if there was some kind of record of the fact that a special handling rule was triggered.

It's only fair to share...
Share on FacebookGoogle+Tweet about this on TwitterShare on LinkedIn

Leave a Reply