Pages

Wednesday, November 7, 2012

Continuous Variable Measures and QueryHealth

If you thought I was done with Query Health, clearly I'm not.  I've been spending the last three days reviewing the HL7 Ballot for HQMF, reissued because the R-MIM Diagram hadn't been included during the previous ballot.  Today, BTW, is the last day to register to vote on this reissued ballot.  Voting closes in a week.

One of the challenges I knew I would face is continuous variable measures.  The challenge of continuous variable measures is being able to compute with more than one value.  I though I was done with this, but it appears that I'm not yet.

The first challenge is average wait time.  Suppose that for each visit, I have captured the patient arrival time, and the time that they are seen by the physician.  Suppose that each of these is a separate observation.  Say we label one observation with "Arrival", and the other with "Seen" (i.e., using localVariableName).  What I'd like to compute is the difference, for each visit, between Seen and Arrival.


The DataCriteriaSection identifies the data of interest.  Each criterion describes a set of acts that might be computed from (and can be labeled with a localVariableName).  

<entry>
  <localVariableName>Arrival</localVariableName>
  <actCriteria>
    ...
     <code code="441968004" codeSystem="2.16.840.1.113883.6.96"
      displayName="time of arrival at healthcare facility" />
  </actCriteria>
</entry>
<entry>
  <localVariableName>Seen</localVariableName>
  <actCriteria>
    ...
    <code code="308930007" codeSystem="2.16.840.1.113883.6.96"
      displayName="seen by health professional" />
  </actCriteria>
</entry>

So, what I'd think should work would be something like:

<measureObservation...>
  ...
  <derivationExpr>Seen.effectiveTime - Arrival.effectiveTime</derivationExpr>
  ...
</measureObservation>

Where it gets complicated is that there's an implicit JOIN here on Arrival and Seen.  Each of these observations is related to the same visit.  It wouldn't make any sense to subtract the Seen of one visit from the Arrival of another.

As specified, the measureObservation above doesn't express the implicit join.  I'm still struggling with how this needs to work.  I can see a way to introduce a higher level criterion that would rectify this case, but it doesn't work for other cases where the JOIN criteria isn't as simple.  For example, in the case where the measure is the time from placing an order for something, to the time that order was fulfilled.  I could also see expressing the JOIN as a precondition on the measureObservation, but that gets into other challenges when dealing with relationships between acts and representing them in an expression.

While I know what is wrong, what I'd like to do in my ballot comment is identify what's right.

1 comment:

  1. I decided last night that my concern over the use of precondition and the expression language is unfounded. So, I will be suggesting use of precondition in MeasureObservationDefinition as a means to specify the "join criteria". I'll post more on that Friday.

    ReplyDelete