IG comparison + value set performance
This commit is contained in:
parent
49b87d0a56
commit
e31b2b07c7
|
@ -187,6 +187,10 @@ public class DefinitionNavigator {
|
|||
}
|
||||
return typeChildren;
|
||||
}
|
||||
|
||||
public StructureDefinition getStructure() {
|
||||
return structure;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1001,6 +1001,7 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
private boolean pretty;
|
||||
private boolean canonicalUrlsAsLinks;
|
||||
private TerminologyServiceOptions terminologyServiceOptions = new TerminologyServiceOptions();
|
||||
private boolean noSlowLookup;
|
||||
|
||||
public NarrativeGenerator(String prefix, String basePath, IWorkerContext context) {
|
||||
super();
|
||||
|
@ -3747,45 +3748,47 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
}
|
||||
}
|
||||
}
|
||||
li.addText(type+" codes from ");
|
||||
addCsRef(inc, li, e);
|
||||
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("#"))
|
||||
href = href + "-"+Utilities.nmtokenize(f.getValue());
|
||||
else
|
||||
href = href + "#"+e.getId()+"-"+Utilities.nmtokenize(f.getValue());
|
||||
li.ah(href).addText(f.getValue());
|
||||
} else if ("concept".equals(f.getProperty()) && inc.hasSystem()) {
|
||||
li.addText(f.getValue());
|
||||
ValidationResult vr = context.validateCode(terminologyServiceOptions, inc.getSystem(), f.getValue(), null);
|
||||
if (vr.isOk()) {
|
||||
li.tx(" ("+vr.getDisplay()+")");
|
||||
if (inc.getFilter().size() > 0) {
|
||||
li.addText(type+" codes from ");
|
||||
addCsRef(inc, li, e);
|
||||
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(", ");
|
||||
}
|
||||
}
|
||||
else
|
||||
li.addText(f.getValue());
|
||||
String disp = ToolingExtensions.getDisplayHint(f);
|
||||
if (disp != null)
|
||||
li.tx(" ("+disp+")");
|
||||
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("#"))
|
||||
href = href + "-"+Utilities.nmtokenize(f.getValue());
|
||||
else
|
||||
href = href + "#"+e.getId()+"-"+Utilities.nmtokenize(f.getValue());
|
||||
li.ah(href).addText(f.getValue());
|
||||
} else if ("concept".equals(f.getProperty()) && inc.hasSystem()) {
|
||||
li.addText(f.getValue());
|
||||
ValidationResult vr = context.validateCode(terminologyServiceOptions, inc.getSystem(), f.getValue(), null);
|
||||
if (vr.isOk()) {
|
||||
li.tx(" ("+vr.getDisplay()+")");
|
||||
}
|
||||
}
|
||||
else
|
||||
li.addText(f.getValue());
|
||||
String disp = ToolingExtensions.getDisplayHint(f);
|
||||
if (disp != null)
|
||||
li.tx(" ("+disp+")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3840,6 +3843,9 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
return v;
|
||||
}
|
||||
|
||||
if (noSlowLookup)
|
||||
return null;
|
||||
|
||||
if (!context.hasCache()) {
|
||||
ValueSetExpansionComponent vse;
|
||||
try {
|
||||
|
@ -4784,5 +4790,13 @@ public class NarrativeGenerator implements INarrativeGenerator {
|
|||
this.terminologyServiceOptions = terminologyServiceOptions;
|
||||
}
|
||||
|
||||
public boolean isNoSlowLookup() {
|
||||
return noSlowLookup;
|
||||
}
|
||||
|
||||
public void setNoSlowLookup(boolean noSlowLookup) {
|
||||
this.noSlowLookup = noSlowLookup;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue