Fix broken link rendering code systems

This commit is contained in:
Grahame Grieve 2022-06-24 11:41:54 +02:00
parent 38b0ed94ed
commit a81b5e2a9d
2 changed files with 4 additions and 3 deletions

View File

@ -916,7 +916,7 @@ public class DataRenderer extends Renderer {
CodeSystem cs = context.getWorker().fetchCodeSystem(system, version);
if (cs != null && cs.hasUserData("path")) {
if (!Utilities.noString(code)) {
return cs.getUserString("path")+"#"+Utilities.nmtokenize(code);
return cs.getUserString("path")+"#"+cs.getId()+"-"+Utilities.nmtokenize(code);
} else {
return cs.getUserString("path");
}
@ -932,8 +932,9 @@ public class DataRenderer extends Renderer {
if (Utilities.noString(s))
s = lookupCode(c.getSystem(), c.getVersion(), c.getCode());
CodeSystem cs = context.getWorker().fetchCodeSystem(c.getSystem());
String sn = describeSystem(c.getSystem());
String sn = cs != null ? cs.present() : describeSystem(c.getSystem());
String link = getLinkForCode(c.getSystem(), c.getVersion(), c.getCode());
if (link != null) {
x.ah(link).tx(sn);

View File

@ -680,7 +680,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
if (disp == null) {
disp = getDisplayForUrl(url);
}
if (disp != null && !designations.containsKey(url)) {
if (disp != null && !designations.containsKey(url) && url != null) {
designations.put(url, disp);
}
}