ldsec / glowing-bear-medco

Cohort-selection UI for MedCo. Fork of Glowing Bear :bear: (glowingbear.app).
https://medco.epfl.ch/documentation
Mozilla Public License 2.0
2 stars 4 forks source link

bug in concept-constraint textRepresentation method #231

Closed WiseIndian closed 2 years ago

WiseIndian commented 2 years ago

Each time the method is called a "not" is added to the front of the text representation of the concept. If the text representation is called 4 times for tnm classification its text representation will be: not ( not ( not ( not ( tnm classification) ) ) )

let currentRepresentation = super.textRepresentation;
this.textRepresentation = this.excluded ? 'not (' + currentRepresentation + ')' : currentRepresentation
return super.textRepresentation

I suggest to change it to

let currentRepresentation = super.textRepresentation;
return this.excluded ? 'not (' + currentRepresentation + ')' : currentRepresentation