[WEBCLIENT-43] ontology cell concept navigation "Show Synonymous Terms" checkbox inconsistency Created: 11/Mar/13  Updated: 01/Jul/14  Resolved: 09/Jun/14

Status: Closed
Project: i2b2 Web Client
Component/s: Ontology Cell, Web Client
Affects Version/s: 1.6.06
Fix Version/s: 1.7.02

Type: Bug Priority: Major
Reporter: Keith Wanta Assignee: Janice Donahoe
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.25h
Original Estimate: Not Specified

Affects View/s:
Find Terms, Navigate Terms
Testing Notes: Tested and verified it is now working correctly. This was fixed in an earlier version of 1.7.
Participant/s:
Build Number (Fixed): 1.7.02.0005

 Description   
The source code for i2b2 is not consistent in the way in which it loads concept synonyms in the Ontology cell. It also has an issue with keeping a persistent value for the option which allows you to toggle whether it shows synonyms or not. When i2b2 is launched, it doesn't seem logical to show concept synonyms by default in the ontology cell, but rather give the option to show synonyms if the user prefers, or allow the ability to search for synonyms. Typically the preferred term should be displayed in a SKOS terminology model, and that's essentially what the i2b2 terminology is.

1.) In the Ontology Cell Navigation Options form, the check box for "Show Synonymous Terms" is turned off.

FILE: \webclient\default.htm

SOURCE CODE:

<div style="margin-left:50px"><input type="checkbox" id="ONTNAVshowSynonyms" /> Show Synonymous Terms</div>

If it was turned on, it would have the checked property set:

<div style="margin-left:50px"><input type="checkbox" id="ONTNAVshowSynonyms" checked /> Show Synonymous Terms</div>

2.) However, this is inconsistent with the way the web client loads i2b2 concept synonyms. In order to make this form and the initial load consistent with each other, this "defaultValue" setting should be set to false, not true. If you download the source code from the i2b2.org site, the value is set to false.

FILE: \webclient\cell_config_data.js

SOURCE CODE:

{xmlName:'OntSynonyms', thinClientName:'synonyms', defaultValue:true}

should be:

{xmlName:'OntSynonyms', thinClientName:'synonyms', defaultValue:false}

3.) This takes the value of the params.synonyms from cell_config_data.js and applies the value to what the form should set as checked. Currently, it's taking the opposite of it's value, which seems strange.

FILE: \webclient\js-i2b22\cells\ONT\ONT_view_Nav.js

SOURCE CODE:

$('ONTNAVshowSynonyms').checked = parseBoolean(!this.params.synonyms);

should be (without the !)

$('ONTNAVshowSynonyms').checked = parseBoolean(this.params.synonyms);

4.) And in order to make the code explicit, this code should be using the not (!) operator, rather than commenting out the code completely. Without this, the value displayed in the form never persists. It always shows as false. This code is probably okay, but it's better to be explicit.

FILE: \webclient\js-i2b22\cells\ONT\ONT_view_Find.js

SOURCE CODE:

//$('ONTFINDshowSynonyms').checked = parseBoolean(this.params.synonyms);

should be:

$('ONTFINDshowSynonyms').checked = parseBoolean(!this.params.synonyms);


==================
CONCLUSION:

So in order to be consistent, #1 should be unchecked (no checked property) and #2 should be set to false. #3 should have the not operator removed and #4 should have the not operator applied rather than being uncommented out.

And if you want synonyms to show in the navigation pane by default, then #1 should be checked, #2 should be set to true, and #3 and #4 should also be fixed in the same way.
==================





 Comments   
Comment by Keith Wanta [ 11/Mar/13 ]
mean to say "true", not "false" here:

If you download the source code from the i2b2.org site, the value is set to false.
Generated at Thu Apr 25 16:58:12 UTC 2024 using Jira 8.20.11#820011-sha1:0629dd8d260e3954ece49053e565d01dabe11609.