fixed
This commit is contained in:
parent
5fcc1866cd
commit
1c29587015
|
@ -95,9 +95,11 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
||||||
if (cs.hasProperty()) {
|
if (cs.hasProperty()) {
|
||||||
boolean hasRendered = false;
|
boolean hasRendered = false;
|
||||||
boolean hasURI = false;
|
boolean hasURI = false;
|
||||||
|
boolean hasDescription = false;
|
||||||
for (PropertyComponent p : cs.getProperty()) {
|
for (PropertyComponent p : cs.getProperty()) {
|
||||||
hasRendered = hasRendered || !p.getCode().equals(ToolingExtensions.getPresentation(p, p.getCodeElement()));
|
hasRendered = hasRendered || !p.getCode().equals(ToolingExtensions.getPresentation(p, p.getCodeElement()));
|
||||||
hasURI = hasURI || p.hasUri();
|
hasURI = hasURI || p.hasUri();
|
||||||
|
hasDescription = hasDescription || p.hasDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
x.para().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Properties", getContext().getLang()));
|
x.para().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Properties", getContext().getLang()));
|
||||||
|
@ -111,7 +113,9 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
||||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "URL", getContext().getLang()));
|
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "URL", getContext().getLang()));
|
||||||
}
|
}
|
||||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Type", getContext().getLang()));
|
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Type", getContext().getLang()));
|
||||||
|
if (hasDescription) {
|
||||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Description", getContext().getLang()));
|
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Description", getContext().getLang()));
|
||||||
|
}
|
||||||
for (PropertyComponent p : cs.getProperty()) {
|
for (PropertyComponent p : cs.getProperty()) {
|
||||||
tr = tbl.tr();
|
tr = tbl.tr();
|
||||||
if (hasRendered) {
|
if (hasRendered) {
|
||||||
|
@ -122,21 +126,25 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
||||||
tr.td().tx(p.getUri());
|
tr.td().tx(p.getUri());
|
||||||
}
|
}
|
||||||
tr.td().tx(p.hasType() ? p.getType().toCode() : "");
|
tr.td().tx(p.hasType() ? p.getType().toCode() : "");
|
||||||
|
if (hasDescription) {
|
||||||
tr.td().tx(p.getDescription());
|
tr.td().tx(p.getDescription());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private boolean generateCodeSystemContent(XhtmlNode x, CodeSystem cs, boolean hasExtensions, List<UsedConceptMap> maps) throws FHIRFormatError, DefinitionException, IOException {
|
private boolean generateCodeSystemContent(XhtmlNode x, CodeSystem cs, boolean hasExtensions, List<UsedConceptMap> maps) throws FHIRFormatError, DefinitionException, IOException {
|
||||||
XhtmlNode p = x.para();
|
XhtmlNode p = x.para();
|
||||||
|
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), "This code system "));
|
||||||
|
p.code().tx(cs.getUrl());
|
||||||
if (cs.getContent() == CodeSystemContentMode.COMPLETE)
|
if (cs.getContent() == CodeSystemContentMode.COMPLETE)
|
||||||
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), "This code system %s defines the following codes", cs.getUrl())+":");
|
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), " defines the following codes")+":");
|
||||||
else if (cs.getContent() == CodeSystemContentMode.EXAMPLE)
|
else if (cs.getContent() == CodeSystemContentMode.EXAMPLE)
|
||||||
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), "This code system %s defines some example codes", cs.getUrl())+":");
|
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), " defines some example codes")+":");
|
||||||
else if (cs.getContent() == CodeSystemContentMode.FRAGMENT )
|
else if (cs.getContent() == CodeSystemContentMode.FRAGMENT )
|
||||||
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), "This code system %s defines many codes, of which the following are a subset", cs.getUrl())+":");
|
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), " defines many codes, of which the following are a subset")+":");
|
||||||
else if (cs.getContent() == CodeSystemContentMode.NOTPRESENT ) {
|
else if (cs.getContent() == CodeSystemContentMode.NOTPRESENT ) {
|
||||||
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), "This code system %s defines many codes, but they are not represented here", cs.getUrl()));
|
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), " defines many codes, but they are not represented here"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
XhtmlNode t = x.table( "codes");
|
XhtmlNode t = x.table( "codes");
|
||||||
|
@ -245,7 +253,7 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
||||||
if (cs == null) {
|
if (cs == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return CodeSystemUtilities.hasCode(cs, code);
|
return code == null ? false : CodeSystemUtilities.hasCode(cs, code);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,14 +135,16 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
||||||
|
|
||||||
private boolean generateCodeSystemContent(XhtmlNode x, CodeSystem cs, boolean hasExtensions, List<UsedConceptMap> maps) throws FHIRFormatError, DefinitionException, IOException {
|
private boolean generateCodeSystemContent(XhtmlNode x, CodeSystem cs, boolean hasExtensions, List<UsedConceptMap> maps) throws FHIRFormatError, DefinitionException, IOException {
|
||||||
XhtmlNode p = x.para();
|
XhtmlNode p = x.para();
|
||||||
|
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), "This code system "));
|
||||||
|
p.code().tx(cs.getUrl());
|
||||||
if (cs.getContent() == CodeSystemContentMode.COMPLETE)
|
if (cs.getContent() == CodeSystemContentMode.COMPLETE)
|
||||||
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), "This code system <code>%s</code> defines the following codes", cs.getUrl())+":");
|
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), " defines the following codes")+":");
|
||||||
else if (cs.getContent() == CodeSystemContentMode.EXAMPLE)
|
else if (cs.getContent() == CodeSystemContentMode.EXAMPLE)
|
||||||
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), "This code system <code>%s</code> defines some example codes", cs.getUrl())+":");
|
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), " defines some example codes")+":");
|
||||||
else if (cs.getContent() == CodeSystemContentMode.FRAGMENT )
|
else if (cs.getContent() == CodeSystemContentMode.FRAGMENT )
|
||||||
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), "This code system <code>%s</code> defines many codes, of which the following are a subset", cs.getUrl())+":");
|
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), " defines many codes, of which the following are a subset")+":");
|
||||||
else if (cs.getContent() == CodeSystemContentMode.NOTPRESENT ) {
|
else if (cs.getContent() == CodeSystemContentMode.NOTPRESENT ) {
|
||||||
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), "This code system <code>%s</code> defines many codes, but they are not represented here", cs.getUrl()));
|
p.tx(getContext().getWorker().translator().translateAndFormat("xhtml-gen-cs", getContext().getLang(), " defines many codes, but they are not represented here"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
XhtmlNode t = x.table( "codes");
|
XhtmlNode t = x.table( "codes");
|
||||||
|
|
Loading…
Reference in New Issue