[WEBCLIENT-306] Beth Israel contribution: commas in counts, query option infrastructure Created: 16/Sep/19  Updated: 03/May/22

Status: Reopened
Project: i2b2 Web Client
Component/s: None
Affects Version/s: None
Fix Version/s: 1.7.12, TBD, 1.7.14

Type: Improvement Priority: Minor
Reporter: Jeffrey Klann Assignee: Jeffrey Klann
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File issue with QueryReport.png     PNG File issue with ShowQuery Status.png    
Sprint: v1712.1
i2b2 Feature/s:
Queries
Affects Web Browser/s:
All Web Browsers
Participant/s:

 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.

 Comments   
Comment by Jeffrey Klann [ 16/Sep/19 ]
Will merge pull request from Griffin Weber and Nick Brown
Comment by Jeffrey Klann [ 16/Sep/19 ]
The only new feature to test is how counts appear in queries, graph results, and totalnums.
Comment by Reeta Metta [ 14/Nov/19 ]
seems to be fixed only for Graph Results view.
Show Query Status and Query Report views still show the old way, without commas in counts
Generated at Wed Apr 24 22:06:22 UTC 2024 using Jira 8.20.11#820011-sha1:0629dd8d260e3954ece49053e565d01dabe11609.