rendering fixes

This commit is contained in:
Grahame Grieve 2023-02-13 20:29:56 +11:00
parent ccb5004766
commit 4ae0dfe8f4
2 changed files with 24 additions and 1 deletions

View File

@ -19,6 +19,7 @@ import org.hl7.fhir.r5.model.Extension;
import org.hl7.fhir.r5.model.PrimitiveType; import org.hl7.fhir.r5.model.PrimitiveType;
import org.hl7.fhir.r5.model.StructureDefinition; import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.model.UsageContext; import org.hl7.fhir.r5.model.UsageContext;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.renderers.CodeResolver; import org.hl7.fhir.r5.renderers.CodeResolver;
import org.hl7.fhir.r5.renderers.CodeResolver.CodeResolution; import org.hl7.fhir.r5.renderers.CodeResolver.CodeResolution;
import org.hl7.fhir.r5.renderers.DataRenderer; import org.hl7.fhir.r5.renderers.DataRenderer;
@ -47,6 +48,8 @@ public class AdditionalBindingsRenderer {
private boolean isUnchanged = false; private boolean isUnchanged = false;
private boolean matched = false; private boolean matched = false;
private boolean removed = false; private boolean removed = false;
private ValueSet vs;
private AdditionalBindingDetail compare; private AdditionalBindingDetail compare;
private int count = 1; private int count = 1;
private String getKey() { private String getKey() {
@ -419,4 +422,20 @@ public class AdditionalBindingsRenderer {
return c.getCode(); return c.getCode();
} }
public void seeAdditionalBinding(String purpose, String doco, ValueSet valueSet) {
AdditionalBindingDetail abr = new AdditionalBindingDetail();
abr.purpose = purpose;
abr.valueSet = valueSet.getUrl();
abr.vs = valueSet;
bindings.add(abr);
}
public void seeAdditionalBinding(String purpose, String doco, String ref) {
AdditionalBindingDetail abr = new AdditionalBindingDetail();
abr.purpose = purpose;
abr.valueSet = ref;
bindings.add(abr);
}
} }

View File

@ -371,7 +371,11 @@ public class CodeSystemRenderer extends TerminologyRenderer {
for (ConceptDefinitionDesignationComponent cd : c.getDesignation()) for (ConceptDefinitionDesignationComponent cd : c.getDesignation())
if (cd.getUse().is("http://terminology.hl7.org/CodeSystem/designation-usage", "definition") && cd.hasLanguage() && !c.getDefinition().equalsIgnoreCase(cd.getValue())) if (cd.getUse().is("http://terminology.hl7.org/CodeSystem/designation-usage", "definition") && cd.hasLanguage() && !c.getDefinition().equalsIgnoreCase(cd.getValue()))
sl = true; sl = true;
td.addText((sl ? cs.getLanguage("en")+": " : "")+c.getDefinition()); td.addText((sl ? cs.getLanguage("en")+": " : ""));
if (hasMarkdownInDefinitions(cs))
addMarkdown(td, c.getDefinition());
else
td.addText(c.getDefinition());
for (ConceptDefinitionDesignationComponent cd : c.getDesignation()) { for (ConceptDefinitionDesignationComponent cd : c.getDesignation()) {
if (cd.getUse().is("http://terminology.hl7.org/CodeSystem/designation-usage", "definition") && cd.hasLanguage() && !c.getDefinition().equalsIgnoreCase(cd.getValue())) { if (cd.getUse().is("http://terminology.hl7.org/CodeSystem/designation-usage", "definition") && cd.hasLanguage() && !c.getDefinition().equalsIgnoreCase(cd.getValue())) {
td.br(); td.br();