Don't produce 2 columns for status for deprecated codes
This commit is contained in:
parent
bde55f1872
commit
4b5470f825
|
@ -138,6 +138,7 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
boolean display = false;
|
||||
boolean hierarchy = false;
|
||||
boolean version = false;
|
||||
boolean ignoreStatus = false;
|
||||
List<PropertyComponent> properties = new ArrayList<>();
|
||||
for (PropertyComponent cp : cs.getProperty()) {
|
||||
if (showPropertyInTable(cp)) {
|
||||
|
@ -147,12 +148,15 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (exists) {
|
||||
properties.add(cp);
|
||||
if ("status".equals(cp.getCode())) {
|
||||
ignoreStatus = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (ConceptDefinitionComponent c : cs.getConcept()) {
|
||||
commentS = commentS || conceptsHaveComments(c);
|
||||
deprecated = deprecated || conceptsHaveDeprecated(cs, c);
|
||||
deprecated = deprecated || conceptsHaveDeprecated(cs, c, ignoreStatus);
|
||||
display = display || conceptsHaveDisplay(c);
|
||||
version = version || conceptsHaveVersion(c);
|
||||
hierarchy = hierarchy || c.hasConcept();
|
||||
|
@ -255,11 +259,11 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
return false;
|
||||
}
|
||||
|
||||
private boolean conceptsHaveDeprecated(CodeSystem cs, ConceptDefinitionComponent c) {
|
||||
if (CodeSystemUtilities.isDeprecated(cs, c))
|
||||
private boolean conceptsHaveDeprecated(CodeSystem cs, ConceptDefinitionComponent c, boolean ignoreStatus) {
|
||||
if (CodeSystemUtilities.isDeprecated(cs, c, ignoreStatus))
|
||||
return true;
|
||||
for (ConceptDefinitionComponent g : c.getConcept())
|
||||
if (conceptsHaveDeprecated(cs, g))
|
||||
if (conceptsHaveDeprecated(cs, g, ignoreStatus))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -325,7 +329,7 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (deprecated) {
|
||||
td = tr.td();
|
||||
Boolean b = CodeSystemUtilities.isDeprecated(cs, c);
|
||||
Boolean b = CodeSystemUtilities.isDeprecated(cs, c, false);
|
||||
if (b != null && b) {
|
||||
smartAddText(td, getContext().getWorker().translator().translate("xhtml-gen-cs", "Deprecated", getContext().getLang()));
|
||||
hasExtensions = true;
|
||||
|
|
Loading…
Reference in New Issue