Query run error - "Incorrect result size: expected 1, actual 2"

1,173 views
Skip to first unread message

Michael R.

unread,
Jun 4, 2014, 11:21:25 AM6/4/14
to i2b2-ins...@googlegroups.com
I'm continually getting the same error response for any queries I try to run in my i2b2 web client.  I'm using the VMware demo with a postgres database.  The request xml for a simple query to get the number of male patients is below:

Request:
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ns6:request xmlns:ns4="http://www.i2b2.org/xsd/cell/crc/psm/1.1/" xmlns:ns7="http://www.i2b2.org/xsd/cell/ont/1.1/" xmlns:ns3="http://www.i2b2.org/xsd/cell/crc/pdo/1.1/" xmlns:ns5="http://www.i2b2.org/xsd/hive/plugin/" xmlns:ns2="http://www.i2b2.org/xsd/hive/pdo/1.1/" xmlns:ns6="http://www.i2b2.org/xsd/hive/msg/1.1/" xmlns:ns8="http://www.i2b2.org/xsd/cell/crc/psm/querydefinition/1.1/"> <message_header> <proxy> <redirect_url>http://128.206.5.173:9090/i2b2/services/QueryToolService/request</redirect_url> </proxy> <sending_application> <application_name>i2b2_QueryTool</application_name> <application_version>1.6</application_version> </sending_application> <sending_facility> <facility_name>PHS</facility_name> </sending_facility> <receiving_application> <application_name>i2b2_DataRepositoryCell</application_name> <application_version>1.6</application_version> </receiving_application> <receiving_facility> <facility_name>PHS</facility_name> </receiving_facility> <security> <domain>i2b2demo</domain> <username>demo</username> <password token_ms_timeout="1800000" is_token="true">SessionKey:HrOO5oUA7SFCxNGGBa8p</password> </security> <message_type> <message_code>Q04</message_code> <event_type>EQQ</event_type> </message_type> <message_control_id> <message_num>0rHHDbN3tAo1qKb10K2p8</message_num> <instance_num>0</instance_num> </message_control_id> <processing_id> <processing_id>P</processing_id> <processing_mode>I</processing_mode> </processing_id> <accept_acknowledgement_type>messageId</accept_acknowledgement_type> <project_id>Demo</project_id> </message_header> <request_header> <result_waittime_ms>180000</result_waittime_ms> </request_header> <message_body> <ns4:psmheader> <user group="Demo" login="demo">demo</user> <patient_set_limit>0</patient_set_limit> <estimated_time>0</estimated_time> <query_mode>optimize_without_temp_table</query_mode> <request_type>CRC_QRY_runQueryInstance_fromQueryDefinition</request_type> </ns4:psmheader> <ns4:request xsi:type="ns4:query_definition_requestType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <query_definition> <query_name>Male@10:15:57</query_name> <query_timing>ANY</query_timing> <specificity_scale>0</specificity_scale> <panel> <panel_number>1</panel_number> <panel_accuracy_scale>100</panel_accuracy_scale> <invert>0</invert> <panel_timing>ANY</panel_timing> <total_item_occurrences>1</total_item_occurrences> <item> <hlevel>3</hlevel> <item_name>Male</item_name> <item_key>\\i2b2_DEMO\i2b2\Demographics\Gender\Male\</item_key> <tooltip>Demographic \ Gender \ Male</tooltip> <class>ENC</class> <item_icon>LA</item_icon> <item_is_synonym>false</item_is_synonym> </item> </panel> </query_definition> <result_output_list><result_output priority_index="9" name="patient_count_xml"/> </result_output_list> </ns4:request> </message_body> </ns6:request>

Response:
    <message_header>
        <i2b2_version_compatible>1.1</i2b2_version_compatible>
        <hl7_version_compatible>2.4</hl7_version_compatible>
        <sending_application>
            <application_name>CRC Cell</application_name>
            <application_version>1.7</application_version>
        </sending_application>
        <sending_facility>
            <facility_name>i2b2 Hive</facility_name>
        </sending_facility>
        <receiving_application>
            <application_name>i2b2_QueryTool</application_name>
            <application_version>1.6</application_version>
        </receiving_application>
        <receiving_facility>
            <facility_name>i2b2 Hive</facility_name>
        </receiving_facility>
        <message_control_id>
            <instance_num>1</instance_num>
        </message_control_id>
        <project_id>Demo</project_id>
    </message_header>
    <response_header>
        <info>Log information</info>
        <result_status>
            <status type="DONE">DONE</status>
            <polling_url interval_ms="100" />
        </result_status>
    </response_header>
    <message_body>
        <ns4:response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:master_instance_result_responseType">
            <status>
                <condition type="ERROR">Incorrect result size: expected 1, actual 2</condition>
            </status>
        </ns4:response>
    </message_body>
</ns5:response>

Mendis, Michael E.

unread,
Jun 4, 2014, 11:34:20 AM6/4/14
to i2b2-ins...@googlegroups.com
Take a look at the two tables qt_query_result_type and qt_quer_status_type and see if you have duplicate entries in it

-mike

--
You received this message because you are subscribed to the Google Groups "i2b2 Install Help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to i2b2-install-h...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Michael R.

unread,
Jun 4, 2014, 11:41:53 AM6/4/14
to i2b2-ins...@googlegroups.com
No duplicate entries in either of those tables.  I've also verified that it's the same in the postgres and oracle databases.  For the VMware demo, it defaults to oracle and those queries worked, but now I've made changes to use postgres instead and have run into this issue.

Mendis, Michael E.

unread,
Jun 4, 2014, 11:51:51 AM6/4/14
to i2b2-ins...@googlegroups.com
Also check the qt_privilege and qt_breakdown_path for duplicates

-mike

Michael R.

unread,
Jun 4, 2014, 12:12:46 PM6/4/14
to i2b2-ins...@googlegroups.com
There were duplicates in the qt_privilege table.  They're now removed and queries seem to be running normally.  Thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to i2b2-install-help+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages