fix bugs in comparisons

This commit is contained in:
Grahame Grieve 2020-07-31 12:51:43 +10:00
parent 59b0f032cb
commit ebead8fd7c
3 changed files with 8 additions and 3 deletions

View File

@ -154,7 +154,7 @@ public class CodeSystemComparer extends CanonicalResourceComparer {
private void compareConcepts(List<ConceptDefinitionComponent> left, List<ConceptDefinitionComponent> right, StructuralMatch<ConceptDefinitionComponent> combined, private void compareConcepts(List<ConceptDefinitionComponent> left, List<ConceptDefinitionComponent> right, StructuralMatch<ConceptDefinitionComponent> combined,
List<ConceptDefinitionComponent> union, List<ConceptDefinitionComponent> intersection, CodeSystem csU, CodeSystem csI, CodeSystemComparison res, String path) { List<ConceptDefinitionComponent> union, List<ConceptDefinitionComponent> intersection, CodeSystem csU, CodeSystem csI, CodeSystemComparison res, String path) {
List<ConceptDefinitionComponent> matchR = new ArrayList<>(); List<ConceptDefinitionComponent> matchR = new ArrayList<>();
for (ConceptDefinitionComponent l : left) { for (ConceptDefinitionComponent l : left) {
ConceptDefinitionComponent r = findInList(right, l); ConceptDefinitionComponent r = findInList(right, l);

View File

@ -84,7 +84,12 @@ public class ComparisonRenderer implements IEvaluationContext {
first = false; first = false;
b.append("<tr><td colspan=4><b>"+name+"</b></td></tr>\r\n"); b.append("<tr><td colspan=4><b>"+name+"</b></td></tr>\r\n");
} }
renderComparison(id, comp); try {
renderComparison(id, comp);
} catch (Exception e) {
System.out.println("Exception rendering "+id+": "+e.getMessage());
e.printStackTrace();
}
b.append(comp.toTable()); b.append(comp.toTable());
//"<li><a href=\""+comp.getId()+".html\">"+Utilities.escapeXml(comp.summary())+"</a></li>\r\n" //"<li><a href=\""+comp.getId()+".html\">"+Utilities.escapeXml(comp.summary())+"</a></li>\r\n"
} }

View File

@ -210,7 +210,7 @@ public class ValueSetComparer extends CanonicalResourceComparer {
private int countMatchesBySystem(List<ConceptSetComponent> list, ConceptSetComponent item) { private int countMatchesBySystem(List<ConceptSetComponent> list, ConceptSetComponent item) {
int c = 0; int c = 0;
for (ConceptSetComponent t : list) { for (ConceptSetComponent t : list) {
if (t.getSystem().equals(item.getSystem())) { if (t.hasSystem() && t.getSystem().equals(item.getSystem())) {
c++; c++;
} }
} }