Thursday, April 4, 2013

It means what I want it to

We struggled for the longest time today trying to figure out how to say the following in HQMF:

Find me the first instance of this medication (e.g., Aspirin), in these kinds of encounters (e.g., ED visits where DX = MI).

The challenge wasn't the medication, or the type of encounter, or even encounters where DX = MI, but rather how to apply FIRST and DURING operations at the same time so that FIRST returned more than one item.  E.g., it was the first item of its type in the time period expressed by the temporal relationship.

We struggled with it for quite a while, and I'd written something on the board, and then Dragon pointed out that we'd added the <subsetCode> attribute to the <temporallyRelated> act relationship and it all came together.

I don't know what that means I said, but we can define it to mean what we want it to.  Marc said "Wait, let me see if I can make this work before I agree." and he started digging into code.  The rest of use looked at it some more to poke more holes in it.  "Does it still work if we change LAST to FIRST?" I asked, and yes it did.  "Does it work if we use a different temporal relationship?" I asked again, "Like BEFORE?" Chimed in Dragon.  Yep, that worked too.  And Marc said, "Yes, I can make it work.  I like this."

And so, even though we weren't sure what it meant when we looked at it at first, by the time we were done, it meant exactly what we wanted it to, and it wasn't even a stretch to believe that someone had actually designed it to work that way.

So now, if you want to know what the average time is for a patient who needs it to be given Aspirin in the ED if they are having a heart attack, we know how to A) specify that measure, and B) compute it from the specification.  Being able to do A is nice, but the biggest change in HQMF Release 2 is that we can do so much more of B from A.



Post a Comment