Details
Description
There are five changes. However, users will only see change #1. The others only affect the UI if the CRC has a cell parameter named QUERY_OPTIONS_XML. This is how our custom sampling-based CRC lets the UI know that it isn't a standard CRC cell. We tried to generalize the web client code changes to support different kinds of CRC query execution options in the future.
We added commas to numbers in several places: (a) the totalnum values displayed in the ontology, (b) the patient count and the breakdown counts in Show Query Status and Graph Results, (c) the vertical axis values in the breakdown graphs, and (d) the Query Report.
We modified PM_crlr.js to allow cell parameter values to optionally be in XML format.
We added a drop-down menu to the Run Query dialog box that allows the user to select a "query method". This menu only appears if there is a CRC cell parameter named QUERY_OPTIONS_XML. The value of the cell parameter should be XML in the format:
Exact CountFast Estimate Using Sampling
The options in the drop-down menu come from the QueryMethods listed in the XML. In this example, there are two methods, EXACT and SAMPLING. However, there can be any number of values depending on what the CRC cell supports.
If a QueryMethod is selected, then a tag like "<query_method>SAMPLING</query_method>" is added to the "psmheader" section of the runQueryInstance_fromQueryDefinition request XML. (Note that the new tag will appear right before the existing "query_mode" tag in the psmheader.) If the CRC cell does not have a QUERY_OPTIONS_XML, then no "query_method" tag is added to the request XML.
The data tags in the current result XML contain the counts and breakdown values of queries. An example is:
123
Our modified CRC cell (which isn't part of i2b2 1.7.12), when using sampling, returns something like:
123
We modified the web client code so that it looks for the "display" and "comment" attributes. If the display attribute is present, it will show that instead of the actual count. If the comment attribute is present, it will show that in brackets. For the regular CRC and modified CRC, the Show Query Status box will show:
patient_count: 123 +/- 3
patient_count: 123 +/- 10% [sampled estimate]
We made this change for counts and breakdowns on the Show Query Status, Graph Results, and Query Report tabs.
We added commas to numbers in several places: (a) the totalnum values displayed in the ontology, (b) the patient count and the breakdown counts in Show Query Status and Graph Results, (c) the vertical axis values in the breakdown graphs, and (d) the Query Report.
We modified PM_crlr.js to allow cell parameter values to optionally be in XML format.
We added a drop-down menu to the Run Query dialog box that allows the user to select a "query method". This menu only appears if there is a CRC cell parameter named QUERY_OPTIONS_XML. The value of the cell parameter should be XML in the format:
Exact CountFast Estimate Using Sampling
The options in the drop-down menu come from the QueryMethods listed in the XML. In this example, there are two methods, EXACT and SAMPLING. However, there can be any number of values depending on what the CRC cell supports.
If a QueryMethod is selected, then a tag like "<query_method>SAMPLING</query_method>" is added to the "psmheader" section of the runQueryInstance_fromQueryDefinition request XML. (Note that the new tag will appear right before the existing "query_mode" tag in the psmheader.) If the CRC cell does not have a QUERY_OPTIONS_XML, then no "query_method" tag is added to the request XML.
The data tags in the current result XML contain the counts and breakdown values of queries. An example is:
123
Our modified CRC cell (which isn't part of i2b2 1.7.12), when using sampling, returns something like:
123
We modified the web client code so that it looks for the "display" and "comment" attributes. If the display attribute is present, it will show that instead of the actual count. If the comment attribute is present, it will show that in brackets. For the regular CRC and modified CRC, the Show Query Status box will show:
patient_count: 123 +/- 3
patient_count: 123 +/- 10% [sampled estimate]
We made this change for counts and breakdowns on the Show Query Status, Graph Results, and Query Report tabs.