Uploaded image for project: 'QDM Issue Tracker'
  1. QDM Issue Tracker
  2. QDM-111

Clarification needed for order of operations in statements with temporal and comparison operators

XMLWordPrintable

    • Icon: Guidance Guidance
    • Resolution: Delivered
    • Icon: Moderate Moderate
    • Operator Logic

      I would like some clarification in how QDM calculates logic statements with a temporal operator, comparison operator, and unit of comparison. QDM 4.1.2 Section 3.5.2 states that the following example refers to the "set of inpatient encounters that started less than three days before a diagnosis of diabetes":

      "Encounter: Hospital Inpatient" < 3 day(s) starts before start of "Diagnosis, Active: Diabetes"

      My understanding is that the temporal operator "starts before start of" does not allow for overlap of the start date/times of the left-hand side and the right-hand side. Given that there exists a unit of comparison of "days", does QDM utilize this unit of comparison in calculation of the exclusive endpoint? Appendix B is abundantly clear that calculation unit of "days" is evaluated as number of midnights crossed.

      If an Inpatient Encounter starts 2012-02-01 12:30:00 and the diabetes diagnosis starts 2012-02-01 14:00:00, are the date/time stamps used in the calculation ignored (per Appendix B) for the evaluation of the temporal operator? If date/time is to be truncated, would this example fail as 2012-02-01 does not "start before start of" 2012-02-01?

      From the statement in Section 3.5.2, it sounds as if the supplied calculation unit should not be used in the evaluation of the temporal operator. Stating that the above example applies to the "set of inpatient encounters that started less than three days before a diagnosis of diabetes" will include events that both start on the same calendar day. For evaluation of the logic statement, it seems like QDM 4.1.2 implies that granularity of minutes should be used in evaluation of the temporal segment (starts before start of), and then the calculation unit should be used in evaluating the comparison operator(< 3 day(s)). Could you clarify how the supplied example should be evaluated?

            chris.moesel Chris Moesel (Inactive)
            Alex Liu Alex Liu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: