Execute a Query and Get Its Results
The service queries the data mart using the query definition and generates output based on the result option. Each query request and its results will be recorded under the given user id and project id.
The server will read the value <result_waittime_ms> from the <request_header> and if the query did not complete before the wait time specified in the request, it will send a response to the client with a "PENDING" status. The client can later send a query instance request to see if the query has completed and retrieve the query result information.
The query definition option:
Element Name | Description |
query_name | Name of the query |
query_description | Description of the query |
query_timing | The values of the query timing are the same as the values of the <panel_timing> option in the panel definition. The panel timing will override the query timing value if both have values specified. |
Value | Description |
ANY | The query result doesn't depend on the patient's encounter / visit value |
SAME | The patients selected within the panel will have the same Encounter / Visit. |
SAMEINSTANCENUM | The patients selected across the panels will have the same Encounter / Visit, CONCEPT_CD, START_DATE, PROVIDER_ID, and INSTANCE_NUM value in the fact table. |
|
specificity_scale | Not implemented |
panel | The panel option is defined in the previous section called Panel Definition Details. |
The service supports the following result options.
- PATIENTSET
- PATIENT_ENCOUNTER_SET
- PATIENT_COUNT_XML
- PATIENT_GENDER_COUNT_XML
- PATIENT_AGE_COUNT_XML
- PATIENT_VITALSTATUS_COUNT_XML
- PATIENT_RACE_COUNT_XML
|
CRC_ENABLE_UNITCD_CONVERSION=ON|OFF
(https://community.i2b2.org/wiki/display/DevForum/Metadata+XML+for+Medication+Modifiers)
To use LARGETEXT constraint in the query, the minimum user role of DATA_DEID is required.
Notes:
- The CRC will take advantage of simple query by not using the temp table. As a default it is advisable to set the flag <query_mode> optimize_without_temp_table</query_mode> in the <psmheader>.
- To speed up the query, the CRC selects which panel SQL to run first. The selection of panel will be based on the individual item / concept's toal_num value specified on the Ontology's Metadata table. It is not necessary to populate total_num for each of the Metadata's concepts, but just populating some of the commonly used concepts like the '\Demographics\Gender\Male' would help. Please refer to the Ontology cell if you would like to automatically populate the total_num column for all the Ontology's metadata concept.
- If the concepts numerical facts value is not stored in normalized unit_cde, then the user can enable the unit conversion in the query before applying the value constraint by setting the PM project param (CRC_ENABLE_UNITCD_CONVERSION=ON|OFF). The fact's nval_num column will be converted based on the metadata xml (<ConvertingUnits/>, <MultiplyingFactor/> exists in the Ontology cell before applying the query's value constraint. For better query performance do not enable this option, make sure numerical fact values are in the normalized units.
- To enable the process timing information in the <query_instance> section of the response set the PM project param (PM_ENABLE_PROCESS_TIMING=INFO|DEBUG).
Result Output Name | Description | Output Value |
PATIENTSET | The patient set from the query will be persisted in the database | Not applicable |
PATIENT_ENCOUNTER_SET | The set of patients and the corresponding encounter will be persisted in the database. | Not applicable |
PATIENT_COUNT_XML | Returns the patient count in the i2b2 result xml format. The i2b2 result format is similar to the name-value pair. (i2b2_result_msg.xsd) | <i2b2_result_envelope xmlns:ns10="http://www.i2b2.org/xsd/hive/msg/result/1.1/"> |
PATIENT_GENDER_COUNT_XML | Returns the patient gender count in the i2b2 result xml format. | <i2b2_result_envelope xmlns:ns10="http://www.i2b2.org/xsd/hive/msg/result/1.1/"> |
PATIENT_AGE_COUNT_XML | Returns the patient age count in the i2b2 result xml format. | <i2b2_result_envelope xmlns:ns10="http://www.i2b2.org/xsd/hive/msg/result/1.1/"> |
PATIENT_VITALSTATUS_COUNT_XML | Returns the patient vital status count in the i2b2 result xml format. | <i2b2_result_envelope xmlns:ns10="http://www.i2b2.org/xsd/hive/msg/result/1.1/"> |
PATIENT_RACE_COUNT_XML | Returns the patient race count in the i2b2 result xml format. | <i2b2_result_envelope xmlns:ns10="http://www.i2b2.org/xsd/hive/msg/result/1.1/"> |
Message Request and Response
Request Type | Request | Response |
CRC_QRY_runQueryInstance_fromQueryDefinition | query_definition_requestType | master_instance_result_responseType |
Example:
<request_header>
<result_waittime_ms>90000</result_waittime_ms>
</request_header>
<message_body>
<crc:psmheader>
<query_mode>optimize_without_temp_table</query_mode>
<request_type>
CRC_QRY_runQueryInstance_fromQueryDefinition
</request_type>
</crc:psmheader>
<crc:request xsi:type="crc:query_definition_requestType">
<query_definition>
<query_name/>
<query_description/>
<query_timing>ANY</query_timing>
<panel>
<panel_number>1</panel_number>
<panel_date_from>2000-12-30T00:00:00</panel_date_from>
<panel_date_to>2000-12-30T00:00:00</panel_date_to>
<invert>0</invert>
<total_item_occurrences>1</total_item_occurrences>
<item>
<item_key>\\rpdr\RPDR\Diagnoses</item_key>
<!-- OR pass patient set id
<item_key>patient_set_coll_id:123</item_key>
-->
<!-- OR pass encounter set id
<item_key>patient_set_enc_id:123</item_key>
-->
<constrain_by_value>
<value_operator> </value_operator>
<value_constraint>value_constraint0</value_constraint>
<value_unit_of_measure>unit</value_unit_of_measure>
<value_type></value_type>
</constrain_by_value>
<constrain_by_modifier>
<applied_path>\i2b2\Medications%</applied_path>
<modifier_key>\\i2b2_DEMO\Dose{color:#0000ff}</modifier_key>
<constrain_by_value>
<value_operator></value_operator>
<value_constraint> </value_constraint>
<value_unit_of_measure></value_unit_of_measure>
<value_type></value_type>
</constrain_by_value>
</constrain_by_modifier>
<constrain_by_date>
</constrain_by_date>
</item>
</panel>
</query_definition>
<result_output_list>
<result_output name="PATIENT_COUNT_XML"/>
<result_output name="PATIENT_GENDER_COUNT_XML "/>
<result_output name="PATIENT_AGE_COUNT_XML "/>
<result_output name="PATIENT_VITALSTATUS_COUNT_XML "/>
<result_output name="PATIENT_RACE_COUNT_XML "/>
<result_output name="PATIENTSET"/>
</result_output_list>
</crc:request>
<crc:response xsi:type="crc:master_instance_result_responseType">
<query_master>
<query_master_id>0</query_master_id>
<name/>
<user_id/>
<group_id/>
<create_date>2000-12-30T00:00:00</create_date>
<request_xml/>
</query_master>
<query_instance>
<query_instance_id>0</query_instance_id>
<query_master_id>0</query_master_id>
<user_id/>
<group_id/>
<batch_mode/>
<message>
<!-- optional process status message -->
<process_step_timing>
<name/>
<start_date/>
<end_date/>
<total_time_second/>
<message/>
</process_step_timing>
. . .
</message>
<start_date>2000-12-30T00:00:00</start_date>
<end_date>2000-12-30T00:00:00</end_date>
<query_status_type>
<status_type_id>6</status_type_id>
<name>COMPLETED</name>
<description/>
</query_status_type>
</query_instance>
<query_result_instance>
<result_instance_id>0</result_instance_id>
<query_instance_id>0</query_instance_id>
<query_result_type>
<result_type_id>1</result_type_id>
<name>PATIENTSET</name>
<description/>
</query_result_type>
<set_size>0</set_size>
<obfuscate_method>OBTOTAL</obfuscate_method>
<start_date>2000-12-30T00:00:00</start_date>
<end_date>2000-12-30T00:00:00</end_date>
<query_status_type>
<status_type_id>3</status_type_id>
<name>FINISHED</name>
<description/>
</query_status_type>
</query_result_instance>
<query_result_instance>
<result_instance_id>0</result_instance_id>
<query_instance_id>0</query_instance_id>
<query_result_type>
<result_type_id>4</result_type_id>
<name> PATIENT_COUNT_XML </name>
<description/>
</query_result_type>
<set_size>0</set_size>
<obfuscate_method>OBSUBTOTAL</obfuscate_method>
<start_date>2000-12-30T00:00:00</start_date>
<end_date>2000-12-30T00:00:00</end_date>
<query_status_type>
<status_type_id>3</status_type_id>
<name>FINISHED</name>
<description/>
</query_status_type>
</query_result_instance>
</crc:response>
</message_body>
Scenario: Check if the query is completed and get its results
This request accepts a query_instance_id and returns the query status information. i.e. COMPLETED, RUNNING, ERROR, etc.
Request Type | Request | Response |
CRC_QRY_getQueryResultInstanceList_fromQueryInstanceId | instance_requestType | result_responseType |
Example:
<message_body>
<psmheader>
<user login="demo">demo</user>
<patient_set_limit>0</patient_set_limit>
<estimated_time>0</estimated_time>
<request_type>
CRC_QRY_getQueryResultInstanceList_fromQueryInstanceId
</request_type>
</psmheader>
<request xsi:type="ns4:instance_requestType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<query_instance_id>6280</query_instance_id>
</request>
<response xsi:type="ns5:result_responseType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<query_result_instance>
<result_instance_id>6280</result_instance_id>
<query_instance_id>6280</query_instance_id>
<query_result_type>
<result_type_id>1</result_type_id>
<name>PATIENTSET</name>
</query_result_type>
<set_size>2000</set_size>
<start_date>2007-09-06T10:42:14.000-04:00</start_date>
<end_date>2007-09-06T10:42:15.000-04:00</end_date>
<query_status_type>
<status_type_id>3</status_type_id>
<name>FINISHED</name>
</query_status_type>
</query_result_instance>
</response>
</message_body>
Scenario: Get the query result (XML output) by result instance
Pass the query result instance id and get the query result. If the result instance has xml output, then the xml output will be passed in the <xml_value> and the <xml_value> element will contain an i2b2 result xml document.
Request Type | Request | Response |
CRC_QRY_getResultDocument_fromResultInstanceId | result_requestType | crc_xml_result_responseType |
Example:
<message_body>
<psmheader>
<request_type>
CRC_QRY_getResultDocument_fromResultInstanceId
</request_type>
</psmheader>
<ns4:request xsi:type="ns4:result_requestType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<query_result_instance_id>7953</query_result_instance_id>
</ns4:request>
<ns4:response xsi:type="ns4:crc_xml_result_responseType">
<status>
<condition type="DONE">DONE</condition>
</status>
<query_result_instance>
<result_instance_id>7953</result_instance_id>
<query_instance_id>8192</query_instance_id>
<query_result_type>
<result_type_id>4</result_type_id>
<name>PATIENT_GENDER_COUNT_XML</name>
<description>PATIENT GENDER COUNT XML</description>
</query_result_type>
<set_size>5815</set_size>
<start_date>2008-07-02T11:07:05.000-04:00</start_date>
<end_date>2008-07-02T11:07:05.000-04:00</end_date>
<query_status_type>
<status_type_id>3</status_type_id>
<name>FINISHED</name>
<description>FINISHED</description>
</query_status_type>
</query_result_instance>
<crc_xml_result>
<xml_result_id>804</xml_result_id>
<result_instance_id>7953</result_instance_id>
<xml_value><?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns9:i2b2_result_envelope
xmlns:ns9="http://www.i2b2.org/xsd/hive/msg/result/1.1/">
<body>
<ns9:result name="patient_gender_count">
<data type="int" column="male_count">1559</data>
<data type="int" column="female_count">4256</data>
</ns9:result>
</body>
</ns9:i2b2_result_envelope>
</xml_value>
</crc_xml_result>
</ns4:response>
</message_body>
Scenario: Run an analysis plug-in and get the status
Run an Analysis plug-in by passing the plug-in name and its parameters. The analysis name and parameter are usually part of the individual Analysis plug-in document. The response message for this request is similar to the Setfinder's run query request.
Request Type | Request | Response |
CRC_QRY_runQueryInstance_fromAnalysisDefinition | analysis_definitionType | master_instance_result_responseType |
Example:
<request_header>
<result_waittime_ms>90000</result_waittime_ms>
</request_header>
<message_body>
<crc:psmheader>
<request_type>
CRC_QRY_runQueryInstance_fromAnalysisDefinition
</request_type>
</crc:psmheader>
<crc:request xsi:type="crc:analysis_definition_requestType">
<analysis_definition>
<analysis_plugin_name>
CALCULATE_PATIENTCOUNT_FROM_CONCEPTPATH
</analysis_plugin_name>
<crc_analysis_input_param name="ONT request">
<param type="int" column="item_key">
\\rpdr\RPDR\Diagnoses\Circulatory system (390-459)\
</param>
</crc_analysis_input_param>
<crc_analysis_result_list>
<result_output full_name="XML" priority_index="1" name="XML"/>
</crc_analysis_result_list>
</analysis_definition>
</crc:request>
<crc:response xsi:type="crc:master_instance_result_responseType">
<query_master>
<query_master_id>0</query_master_id>
<name>CALCULATE_PATIENTCOUNT_FROM_CONCEPTPATH</name>
<user_id/>
<group_id/>
<create_date>2000-12-30T00:00:00</create_date>
<request_xml/>
</query_master>
<query_instance>
<query_instance_id>0</query_instance_id>
<query_master_id>0</query_master_id>
<user_id/>
<group_id/>
<batch_mode/>
<start_date>2000-12-30T00:00:00</start_date>
<end_date>2000-12-30T00:00:00</end_date>
<query_status_type>
<status_type_id>6</status_type_id>
<name>COMPLETED</name>
<description/>
</query_status_type>
</query_instance>
<query_result_instance>
<result_instance_id>0</result_instance_id>
<query_instance_id>0</query_instance_id>
<query_result_type>
<query_result_type>
<result_type_id>3</result_type_id>
<name>XML</name>
<display_type>CATNUM</display_type>
<visual_attribute_type>LH</visual_attribute_type>
<description>Generic query result</description>
</query_result_type>
<set_size>0</set_size>
<obfuscate_method/>
<start_date>2000-12-30T00:00:00</start_date>
<end_date>2000-12-30T00:00:00</end_date>
<query_status_type>
<status_type_id>6</status_type_id>
<name>COMPLETED</name>
<description>COMPLETED</description>
</query_status_type>
</query_result_instance>
</crc:response>
</message_body>
Scenario: Get a list of queries by user id
This request fetches a list of query master information for the given user id. The client can also specify how many query master items to return from the server using the <fetch_size> element. The server returns the query master items in descending order of query creation time.
Request Type | Request | Response |
CRC_QRY_getQueryMasterList_fromUserId | user_requestType | master_responseType |
Example:
<message_body>
<psmheader>
<request_type>
CRC_QRY_getQueryMasterList_fromUserId
</request_type>
</psmheader>
<request xsi:type="ns3:user_requestType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<user_id>user1</user_id>
<fetch_size>100</fetch_size>
</request>
<response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns5:master_responseType">
<status>
<condition type="DONE">DONE</condition>
</status>
<query_master>
<query_master_id>6302</query_master_id>
<name>1 y-Femal-Rheum@10:17:55</name>
<user_id>demo</user_id>
<group_id>Asthma</group_id>
<create_date>2007-09-06T22:17:57.000-04:00</create_date>
</query_master>
<query_master>
<query_master_id>6301</query_master_id>
<name>10 ye-Female@10:42:41</name>
<user_id>demo</user_id>
<group_id>Asthma</group_id>
<create_date>2007-09-06T10:42:42.000-04:00</create_date>
</query_master>
</response>
</message_body>
Scenario: Get metadata of analysis plug-in
This request will return the analysis plug-in's metadata by <plugin_name>. The <plugin_name> value of "ALL" is used to return all the plug-in's metadata.
Request Type | Request | Response |
CRC_QRY_getAnalysisPluginMetadata | analysis_plugin_metadata_requestType | analysis_plugin_metadata_responseType |
Example:
<request_header>
<result_waittime_ms>90000</result_waittime_ms>
</request_header>
<message_body>
<crc:psmheader>
<request_type>
CRC_QRY_getAnalysisPluginMetadata
</request_type>
</crc:psmheader>
<crc:request xsi:type="crc:analysis_plugin_metadata_requestType ">
<plugin_name>ALL</plugin_name>
</crc:request>
<crc:response xsi:type="crc:analysis_plugin_metadata_responseType">
<analysis_plugin_metadata_type>
<plugin_id>1</plugin_id>
<plugin_name>
CALCULATE_PATIENTCOUNT_FROM_CONCEPTPATH
</plugin_name>
<description>Plugin description</description>
<version_cd>1.0</version_cd>
<parameter_info>
<crc_analysis_input_param name="name0">
<param column="item_key" type="string">some value</param>
</crc_analysis_input_param>
</parameter_info>
<parameter_info_xsd />
<status_cd>A</status_cd>
<command_line>
/opt/jboss/server/default/analysis_commons_launcher/bin/co.sh
</command_line>
<working_folder>
/opt/jboss/server/default/analysis_commons_launcher/bin
</working_folder>
<group_id>project_id</group_id>
</analysis_plugin_metadata_type>
</crc:response>
</message_body>
Scenario: Get query definition from master id
This request will return the <query_definition> information for the given query master id.
Request Type | Request | Response |
CRC_QRY_getRequestXml_fromQueryMasterId | master_requestType | request_xml_responseType |
Example:
<message_body>
<psmheader>
<request_type>
CRC_QRY_getRequestXml_fromQueryMasterId
</request_type>
</psmheader>
<request xsi:type="ns4:master_requestType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<query_master_id>6300</query_master_id>
</request>
<response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="request_xml_responseType ">
<status>
<condition type="DONE">DONE</condition>
</status>
<request_xml>
<![CDATA[
<query_definition>
<query_name/>
<query_description/>
<query_timing>ANY</query_timing>
<specificity_scale>0</specificity_scale>
<query_date_from>2000-12-30T00:00:00</query_date_from>
<query_date_to>2000-12-30T00:00:00</query_date_to>
<panel>
<panel_number>0</panel_number>
<panel_date_from>2000-12-30T00:00:00</panel_date_from>
<panel_date_to>2000-12-30T00:00:00</panel_date_to>
<invert>0</invert>
<total_item_occurrences>0</total_item_occurrences>
<item>
<hlevel>0</hlevel>
<item_name/>
<item_table/>
<item_key/>
<item_icon/>
<tooltip/>
<class/>
</item>
</panel>
</query_definition>]]>
</request_xml>
</response>
</message_body>
Scenario: Rename a query
Use this request to change the name of the query. If the same user already has a query with the specified name, then the server will return an error in the <status> tag.
Request Type | Request | Response |
CRC_QRY_renameQueryMaster | master_rename_requestType | master_responseType |
Example:
<span style="color: #0000ff"><</span><span style="color: #a31515">message_body</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">psmheader</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">user</span> <span style="color: #ff0000">login</span><span style="color: #0000ff">=</span>"<span style="color: #0000ff">demo</span>"<span style="color: #0000ff">></span>demo<span style="color: #0000ff"></</span><span style="color: #a31515">user</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">patient_set_limit</span><span style="color: #0000ff">></span>0<span style="color: #0000ff"></</span><span style="color: #a31515">patient_set_limit</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">estimated_time</span><span style="color: #0000ff">></span>0<span style="color: #0000ff"></</span><span style="color: #a31515">estimated_time</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">request_type</span><span style="color: #0000ff">></span>CRC_QRY_renameQueryMaster<span style="color: #0000ff"></</span><span style="color: #a31515">request_type</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"></</span><span style="color: #a31515">psmheader</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">request</span> <span style="color: #ff0000">xsi:type</span><span style="color: #0000ff">=</span>"<span style="color: #0000ff">ns4:master_rename_requestType</span>"
<span style="color: #ff0000">xmlns:xsi</span><span style="color: #0000ff">=</span>"<span style="color: #0000ff"><a href="http://www.w3.org/2001/XMLSchema-instance" class="external-link" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a></span>"<span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">user_id</span><span style="color: #0000ff">></span>demo<span style="color: #0000ff"></</span><span style="color: #a31515">user_id</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">query_master_id</span><span style="color: #0000ff">></span>5997<span style="color: #0000ff"></</span><span style="color: #a31515">query_master_id</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">query_name</span><span style="color: #0000ff">></span>Demographics@03:21:10 -n[07-20-2007 ]<span style="color: #0000ff"></</span><span style="color: #a31515">query_name</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"></</span><span style="color: #a31515">request</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">response</span> <span style="color: #ff0000">xmlns:xsi</span><span style="color: #0000ff">=</span>"<span style="color: #0000ff"><a href="http://www.w3.org/2001/XMLSchema-instance" class="external-link" rel="nofollow">http://www.w3.org/2001/XMLSchema-instance</a></span>"
<span style="color: #ff0000">xsi:type</span><span style="color: #0000ff">=</span>"<span style="color: #0000ff">ns5:master_responseType</span>"<span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">status</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">condition</span> <span style="color: #ff0000">type</span><span style="color: #0000ff">=</span>"<span style="color: #0000ff">DONE</span>"<span style="color: #0000ff">></span>DONE<span style="color: #0000ff"></</span><span style="color: #a31515">condition</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"></</span><span style="color: #a31515">status</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">query_master</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">query_master_id</span><span style="color: #0000ff">></span>5997<span style="color: #0000ff"></</span><span style="color: #a31515">query_master_id</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">name</span><span style="color: #0000ff">></span>Demographics@03:21:10 -n[07-20-2007 ]<span style="color: #0000ff"></</span><span style="color: #a31515">name</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"><</span><span style="color: #a31515">user_id</span><span style="color: #0000ff">></span>demo<span style="color: #0000ff"></</span><span style="color: #a31515">user_id</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"></</span><span style="color: #a31515">query_master</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"></</span><span style="color: #a31515">response</span><span style="color: #0000ff">></span>
<span style="color: #0000ff"></</span><span style="color: #a31515">message_body</span><span style="color: #0000ff">></span>
Scenario: Delete a query
Use this request to remove a query and its results. Deleting it will not permanently remove the query; it will just set the delete flag to true.
Request Type | Request | Response |
CRC_QRY_deleteQueryMaster | master_delete_requestType | master_responseType |
Example:
<message_body>
<psmheader>
<user login="demo">demo</user>
<patient_set_limit>0</patient_set_limit>
<estimated_time>0</estimated_time>
<request_type>CRC_QRY_deleteQueryMaster</request_type>
</psmheader>
<request xsi:type="ns4:master_delete_requestType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<user_id>demo</user_id>
<query_master_id>5997</query_master_id>
</request>
<response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns5:master_responseType">
<status>
<condition type="DONE">DONE</condition>
</status>
<query_master>
<query_master_id>5997</query_master_id>
</query_master>
</response>
</message_body>
Scenario: Cancel a query
The process of cancelling a query simply stops it from moving to the next queue. It does not stop the execution if the query has already started.
Request Type | Request | Response |
CRC_QRY_cancelQuery | instance_requestType | instance_result_responseType |
Example:
<message_body>
<psmheader>
<request_type>CRC_QRY_cancelQuery</request_type>
</psmheader>
<request xsi:type="ns4:instance_requestType">
<query_instance_id>1013</query_instance_id>
</request>
<crc:response xsi:type="crc:instance_result_responseType">
<query_instance>
<query_instance_id>0</query_instance_id>
<query_master_id>0</query_master_id>
<user_id/>
<group_id/>
<batch_mode/>
<start_date>2000-12-30T00:00:00</start_date>
<end_date>2000-12-30T00:00:00</end_date>
<query_status_type>
<status_type_id>9</status_type_id>
<name>CANCELLED</name>
<description/>
</query_status_type>
</query_instance>
<query_result_instance>
<result_instance_id>0</result_instance_id>
<query_instance_id>0</query_instance_id>
<query_result_type>
<query_result_type>
<result_type_id>3</result_type_id>
<name>XML</name>
<display_type>CATNUM</display_type>
<visual_attribute_type>LH</visual_attribute_type>
<description>Generic query result</description>
</query_result_type>
<set_size>0</set_size>
<obfuscate_method/>
<start_date>2000-12-30T00:00:00</start_date>
<end_date>2000-12-30T00:00:00</end_date>
<query_status_type>
<status_type_id>9</status_type_id>
<name>CANCELLED</name>
<description>CANCELLED</description>
</query_status_type>
</query_result_instance>
</crc:response>
</message_body>