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

Date restrict on non obs_fact values not added to generated SQL

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.6.08
    • 1.7.02
    • CRC Cell
    • None
    • Constraints - Date, Queries

    Description

      When building queries for "Inpatient" visit dimension term, generated SQL no longer contains the visit date restriction parameters if dates are restricted on the front end. For example, we query simply "Inpatient" for 01/01/13 - 01/31/13 and get the same result as when we query with no date restrict for the same term. In 1.5, the date restrict worked on non-observation_fact terms, but on 1.6 it doesn't seem to function appropriately. Tested in the Partners demo domain with the same result. See below for 1) example of 1.5 query with visit dim date restrict and 2) example of 1.6 query with date restrict on the front end of the web client and workbench, but not in the generated SQL. Was this function deprecated for some reason with the upgrade to 1.6? I cannot find any documentation on this particular issue.
      ------------------------------------------------------------------------------------------------------------------------
      INSERT INTO i2b2_did_crc.QUERY_GLOBAL_TEMP ( patient_num, panel_count)
      SELECT patient_num, 1 FROM (
      SELECT /*+ index(observation_fact fact_cnpt_pat_enct_idx) */ patient_num FROM i2b2_did_crc.visit_dimension WHERE (((encounter_num IN (select encounter_num from i2b2_did_crc.visit_dimension c where inout_path LIKE '\i2b2\Visit Details\Inpatient\%')) AND start_date>= to_date('01-Jan-2013 00:00:00','DD-MON-YYYY HH24:MI:SS') ))
      group by patient_num having count(*) >=1) t
      <*>
      INSERT INTO i2b2_did_crc.DX (patient_num) SELECT * FROM (
      SELECT DISTINCT t.patient_num FROM i2b2_did_crc.QUERY_GLOBAL_TEMP t WHERE panel_count = 1
      ) q
      <*>
      ------------------------------------------------------------------------------------------------------------------------------------------------------------
      select count(distinct patient_num) as patient_num_count from (

      (select patient_num ,1 as panel_count from ( select /*+ index(observation_fact fact_cnpt_pat_enct_idx) */ patient_num from i2b2_did_crc.visit_dimension where encounter_num IN (select encounter_num from i2b2_did_crc.visit_dimension where inout_path LIKE '\i2b2\Visit Details\Inpatient\%' {ESCAPE '?'} ) group by patient_num ) t
      )

       ) allitem

      Attachments

        Activity

          napathy Nate Apathy created issue -
          This issue has been fixed. We have verified that it is working correctly in 1.7.02 that will be released soon.
          jmd86 Janice Donahoe added a comment - This issue has been fixed. We have verified that it is working correctly in 1.7.02 that will be released soon.
          jmd86 Janice Donahoe made changes -
          Field Original Value New Value
          Fix Version/s 1.7.02 [ 10091 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          jmd86 Janice Donahoe made changes -
          Workflow classic default workflow [ 10218 ] i2b2 Issues [ 10404 ]
          jmd86 Janice Donahoe made changes -
          Component/s CRC Cell [ 10000 ]
          i2b2 Feature/s Queries [ 10081 ]
          jmd86 Janice Donahoe made changes -
          i2b2 Feature/s Queries [ 10081 ] Constraints - Date,Queries [ 10079, 10081 ]
          jmd86 Janice Donahoe made changes -
          Workflow i2b2 Issues [ 10404 ] i2b2 Issues Workflow [ 10475 ]
          jmd86 Janice Donahoe made changes -
          Component/s CRC Cell [ 10049 ]
          Component/s CRC Cell [ 10000 ]
          Fix Version/s 1.7.02 [ 10155 ]
          Fix Version/s 1.7.02 [ 10091 ]
          Key LEOPARD-127 CORE-80
          Project i2b2 [ 10000 ] i2b2 Core Project [ 10034 ]
          Affects Version/s 1.6.08 [ 10149 ]
          Affects Version/s 1.6.08 [ 10074 ]
          jmd86 Janice Donahoe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

          People

            mem61 Mike Mendis
            napathy Nate Apathy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: