Uploaded image for project: 'i2b2 Core Software'
  1. i2b2 Core Software
  2. CORE-355

Erroneous results on search by value with BETWEEN

Details

    • Bug
    • Status: New
    • Major
    • Resolution: Unresolved
    • None
    • TBD
    • None
    • None
    • Find (Previous Queries)

    Description

      In the client search by value, for the use case of searching for value between 4 and 6,
       
      the generated SQL:
      - for BETWEEN SEARCHES: (valtype_cd = 'N' AND nval_num BETWEEN 4 and 6 AND tval_char ='E'

      does not handle OBSERVATION_FACTs where numeric results are stored as '>=4' or '=<6'.
      For correct results, I think that TVAL_CHAR IN ('E', 'GE', 'LE') should be the generated code

      Attachments

        Activity

          Jim, we don't think this is an error. If you have a fact that is, for example <=4.9, the value could actually be 3. Therefore, if you search for values between 4 and 6, you would not expect that fact to be counted in the results. Do you agree, or are we missing something?
          jklann Jeffrey Klann added a comment - Jim, we don't think this is an error. If you have a fact that is, for example <=4.9, the value could actually be 3. Therefore, if you search for values between 4 and 6, you would not expect that fact to be counted in the results. Do you agree, or are we missing something?

          People

            mem61 Mike Mendis
            campbell@unmc.edu James Campbell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: