Open JLRaisaro opened 2 years ago
going back and forth between the two tabs fixes the problem. The "None" appears only when you click on the "Run" button the first time and the active tab switches to "Reference Interval Estimation"
I am not able to reproduce the bug
Ok I produced a similar one by constructing a cohort/filter. I checked the panels definition in the HTTP query and the fields correspond to the panel definition before I clicked the Run button. The problem is happening after the queries are sent to the servers.
getConceptFromTreeNode
throws an error as its treeNode argument is undefined when it is called in the Reference Interval Estimation, in the situation @JLRaisaro describes. At the cohort definition, this is working fine.
The treeNode passed as an argument in generateConstraintFromTreeNode
before clicking Run has an appliedConcept attribute, this is not the case when the error occurs
Ok it is normal as the modified is passed to getConceptFromTreeNode
before its modifier , the problem is that modified one has node type MODIFIER_FOLDER
and it seems to lack modifierConcept attribute.
The lines who trigger the possibly wrong modifier mechanics are
this.refreshConstraint(this.constraintService.generateConstraint()).subscribe(refreshed => {
/* There are problems with the current version of the code. Hence it is necessary to use
* the hackish method refreshConstraint so that the summary of the used constraints is up to date.
* If a user replaces a concept with another by dropping the selected concept on the
* previously selected concept in the explore statistics form, the newer concept wont be displayed
* in the summary of the query. The newer concept will still be sent to the backend because
* mapConstraint will returned the latest up to date i2b2 tree.
*/
this.rootConstraint.next(refreshed)
})