improve rendering of multiple filters on value set
This commit is contained in:
parent
c7499882a0
commit
d63a8f7be3
|
@ -3747,15 +3747,26 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
}
|
||||
}
|
||||
}
|
||||
boolean first = true;
|
||||
for (ConceptSetFilterComponent f : inc.getFilter()) {
|
||||
if (first) {
|
||||
li.addText(type+" codes from ");
|
||||
first = false;
|
||||
} else
|
||||
li.tx(" and ");
|
||||
addCsRef(inc, li, e);
|
||||
li.tx(" where "+f.getProperty()+" "+describe(f.getOp())+" ");
|
||||
li.tx(" where ");
|
||||
for (int i = 0; i < inc.getFilter().size(); i++) {
|
||||
ConceptSetFilterComponent f = inc.getFilter().get(i);
|
||||
if (i > 0) {
|
||||
if (i == inc.getFilter().size()-1) {
|
||||
li.tx(" and ");
|
||||
} else {
|
||||
li.tx(", ");
|
||||
}
|
||||
}
|
||||
if (f.getOp() == FilterOperator.EXISTS) {
|
||||
if (f.getValue().equals("true")) {
|
||||
li.tx(f.getProperty()+" exists");
|
||||
} else {
|
||||
li.tx(f.getProperty()+" doesn't exist");
|
||||
}
|
||||
} else {
|
||||
li.tx(f.getProperty()+" "+describe(f.getOp())+" ");
|
||||
if (e != null && codeExistsInValueSet(e, f.getValue())) {
|
||||
String href = prefix+getCsRef(e);
|
||||
if (href.contains("#"))
|
||||
|
@ -3777,6 +3788,7 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
li.tx(" ("+disp+")");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (inc.hasValueSet()) {
|
||||
li.tx(", where the codes are contained in ");
|
||||
boolean first = true;
|
||||
|
|
Loading…
Reference in New Issue