[WEBCLIENT-306] Beth Israel contribution: commas in counts, query option infrastructure Created: 16/Sep/19  Updated: 23/Feb/21

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

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:
Affects Web Browser/s:
All Web Browsers

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:


Our modified CRC cell (which isn't part of i2b2 1.7.12), when using sampling, returns something like:


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.

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 Thu Oct 21 02:31:35 UTC 2021 using JIRA 7.6.3#76005-sha1:8a4e38d34af948780dbf52044e7aafb13a7cae58.