rendering fixes for pattern values

This commit is contained in:
Grahame Grieve 2019-09-03 13:04:56 +10:00
parent 1a14bfc9e8
commit 94b8a419de
1 changed files with 42 additions and 16 deletions

View File

@ -2258,19 +2258,21 @@ public class ProfileUtilities extends TranslatingUtilities {
tt.setUserData(DERIVATION_EQUALS, true);
types.add(tt);
}
} else
} else {
return c;
}
}
}
boolean first = true;
TypeRefComponent tl = null;
for (TypeRefComponent t : types) {
if (first)
if (first) {
first = false;
else
} else {
c.addPiece(checkForNoChange(tl, gen.new Piece(null,", ", null)));
}
tl = t;
if (t.hasTarget()) {
c.getPieces().add(gen.new Piece(corePath+"references.html", t.getWorkingCode(), null));
@ -2677,7 +2679,7 @@ public class ProfileUtilities extends TranslatingUtilities {
hrow.setColor(getRowColor(element, isConstraintMode));
hrow.setLineColor(1);
hrow.setIcon("icon_element.gif", HierarchicalTableGenerator.TEXT_ICON_ELEMENT);
hrow.getCells().add(gen.new Cell(null, null, "(All Slices)", "", null));
hrow.getCells().add(gen.new Cell(null, null, s+":All Slices", "", null));
hrow.getCells().add(gen.new Cell());
hrow.getCells().add(gen.new Cell());
hrow.getCells().add(gen.new Cell());
@ -2692,7 +2694,7 @@ public class ProfileUtilities extends TranslatingUtilities {
hrow.setColor(getRowColor(element, isConstraintMode));
hrow.setLineColor(1);
hrow.setIcon("icon_element.gif", HierarchicalTableGenerator.TEXT_ICON_ELEMENT);
hrow.getCells().add(gen.new Cell(null, null, "(All Types)", "", null));
hrow.getCells().add(gen.new Cell(null, null, s+":All Types", "", null));
hrow.getCells().add(gen.new Cell());
hrow.getCells().add(gen.new Cell());
hrow.getCells().add(gen.new Cell());
@ -3151,7 +3153,19 @@ public class ProfileUtilities extends TranslatingUtilities {
}
c = gen.new Cell();
row.getCells().add(c);
if (t.getTypeCode().contains("(")) {
String tc = t.getTypeCode();
String tn = tc.substring(0, tc.indexOf("("));
c.addPiece(gen.new Piece(pkp.getLinkFor(corePath, tn), tn, null));
c.addPiece(gen.new Piece(null, "(", null));
String[] p = tc.substring(tc.indexOf("(")+1, tc.indexOf(")")).split("\\|");
for (String s : p) {
c.addPiece(gen.new Piece(pkp.getLinkFor(corePath, s), s, null));
}
c.addPiece(gen.new Piece(null, ")", null));
} else {
c.addPiece(gen.new Piece(pkp.getLinkFor(corePath, t.getTypeCode()), t.getTypeCode(), null));
}
c = gen.new Cell();
c.addPiece(gen.new Piece(null, ed.getShort(), null));
row.getCells().add(c);
@ -3178,7 +3192,19 @@ public class ProfileUtilities extends TranslatingUtilities {
c = gen.new Cell();
row.getCells().add(c);
if (b.fhirType().contains("(")) {
String tc = b.fhirType();
String tn = tc.substring(0, tc.indexOf("("));
c.addPiece(gen.new Piece(pkp.getLinkFor(corePath, tn), tn, null));
c.addPiece(gen.new Piece(null, "(", null));
String[] p = tc.substring(tc.indexOf("(")+1, tc.indexOf(")")).split("\\|");
for (String s : p) {
c.addPiece(gen.new Piece(pkp.getLinkFor(corePath, s), s, null));
}
c.addPiece(gen.new Piece(null, ")", null));
} else {
c.addPiece(gen.new Piece(pkp.getLinkFor(corePath, b.fhirType()), b.fhirType(), null));
}
if (b.isPrimitive()) {
c = gen.new Cell();