Merge remote-tracking branch 'origin/master' into do-20240319-tx-test-reuse
This commit is contained in:
commit
e356bd7017
|
@ -124,7 +124,7 @@ public class ConceptMap30_50 {
|
|||
if (src.hasSource() || src.hasSourceVersion())
|
||||
tgt.setSourceElement(convertUriAndVersionToCanonical(src.getSourceElement(), src.getSourceVersionElement()));
|
||||
if (src.hasTarget() || src.hasTargetVersion())
|
||||
tgt.setSourceElement(convertUriAndVersionToCanonical(src.getTargetElement(), src.getTargetVersionElement()));
|
||||
tgt.setTargetElement(convertUriAndVersionToCanonical(src.getTargetElement(), src.getTargetVersionElement()));
|
||||
|
||||
for (org.hl7.fhir.dstu3.model.ConceptMap.SourceElementComponent t : src.getElement())
|
||||
tgt.addElement(convertSourceElementComponent(t, tgtMap));
|
||||
|
|
|
@ -70,6 +70,7 @@ import org.hl7.fhir.exceptions.DefinitionException;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -1281,7 +1282,7 @@ public class ProfileUtilities {
|
|||
public XhtmlNode generateExtensionTable(String defFile, StructureDefinition ed, String imageFolder,
|
||||
boolean inlineGraphics, boolean full, String corePath, Set<String> outputTracker)
|
||||
throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics);
|
||||
TableModel model = gen.initNormalTable(corePath, false, true, ed.getId(), false, TableGenerationMode.XML);
|
||||
|
||||
boolean deep = false;
|
||||
|
@ -1566,7 +1567,7 @@ public class ProfileUtilities {
|
|||
boolean inlineGraphics, String profileBaseFileName, boolean snapshot, String corePath, Set<String> outputTracker)
|
||||
throws IOException, FHIRException {
|
||||
assert (diff != snapshot);// check it's ok to get rid of one of these
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics);
|
||||
TableModel model = gen.initNormalTable(corePath, false, true, profile.getId() + (diff ? "d" : "s"), false,
|
||||
TableGenerationMode.XML);
|
||||
List<ElementDefinition> list = diff ? profile.getDifferential().getElement() : profile.getSnapshot().getElement();
|
||||
|
|
|
@ -71,6 +71,7 @@ import org.hl7.fhir.exceptions.DefinitionException;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -1283,7 +1284,7 @@ public class ProfileUtilities {
|
|||
public XhtmlNode generateExtensionTable(String defFile, StructureDefinition ed, String imageFolder,
|
||||
boolean inlineGraphics, boolean full, String corePath, Set<String> outputTracker)
|
||||
throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics);
|
||||
TableModel model = gen.initNormalTable(corePath, false, true, ed.getId(), false, TableGenerationMode.XML);
|
||||
|
||||
boolean deep = false;
|
||||
|
@ -1565,7 +1566,7 @@ public class ProfileUtilities {
|
|||
boolean inlineGraphics, String profileBaseFileName, boolean snapshot, String corePath, boolean logicalModel,
|
||||
Set<String> outputTracker) throws IOException, FHIRException {
|
||||
assert (diff != snapshot);// check it's ok to get rid of one of these
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics);
|
||||
TableModel model = gen.initNormalTable(corePath, false, true, profile.getId() + (diff ? "d" : "s"), false,
|
||||
TableGenerationMode.XML);
|
||||
List<ElementDefinition> list = diff ? profile.getDifferential().getElement() : profile.getSnapshot().getElement();
|
||||
|
|
|
@ -96,6 +96,7 @@ import org.hl7.fhir.exceptions.FHIRException;
|
|||
import org.hl7.fhir.exceptions.FHIRFormatError;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.Source;
|
||||
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator;
|
||||
|
@ -1620,8 +1621,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
}
|
||||
|
||||
public XhtmlNode generateExtensionTable(String defFile, StructureDefinition ed, String imageFolder, boolean inlineGraphics, boolean full, String corePath, String imagePath, Set<String> outputTracker) throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics);
|
||||
TableModel model = gen.initNormalTable(corePath, false, true, ed.getId(), false, TableGenerationMode.XML);
|
||||
|
||||
boolean deep = false;
|
||||
|
@ -1989,8 +1989,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
|
||||
public XhtmlNode generateTable(String defFile, StructureDefinition profile, boolean diff, String imageFolder, boolean inlineGraphics, String profileBaseFileName, boolean snapshot, String corePath, String imagePath, boolean logicalModel, boolean allInvariants, Set<String> outputTracker) throws IOException, FHIRException {
|
||||
assert(diff != snapshot);// check it's ok to get rid of one of these
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics);
|
||||
TableModel model = gen.initNormalTable(corePath, false, true, profile.getId()+(diff ? "d" : "s"), false, TableGenerationMode.XML);
|
||||
List<ElementDefinition> list = diff ? profile.getDifferential().getElement() : profile.getSnapshot().getElement();
|
||||
List<StructureDefinition> profiles = new ArrayList<StructureDefinition>();
|
||||
|
@ -2005,8 +2004,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
|
||||
|
||||
public XhtmlNode generateGrid(String defFile, StructureDefinition profile, String imageFolder, boolean inlineGraphics, String profileBaseFileName, String corePath, String imagePath, Set<String> outputTracker) throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics);
|
||||
TableModel model = gen.initGridTable(corePath, profile.getId());
|
||||
List<ElementDefinition> list = profile.getSnapshot().getElement();
|
||||
List<StructureDefinition> profiles = new ArrayList<StructureDefinition>();
|
||||
|
@ -3482,8 +3480,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
}
|
||||
|
||||
public XhtmlNode generateSpanningTable(StructureDefinition profile, String imageFolder, boolean onlyConstraints, String constraintPrefix, Set<String> outputTracker) throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, false);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, false);
|
||||
TableModel model = initSpanningTable(gen, "", false, profile.getId());
|
||||
Set<String> processed = new HashSet<String>();
|
||||
SpanEntry span = buildSpanningTable("(focus)", "", profile, processed, onlyConstraints, constraintPrefix);
|
||||
|
|
|
@ -103,6 +103,7 @@ import org.hl7.fhir.utilities.FhirPublication;
|
|||
import org.hl7.fhir.utilities.TerminologyServiceOptions;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.VersionUtilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.Source;
|
||||
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator;
|
||||
|
@ -2386,8 +2387,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
public XhtmlNode generateExtensionTable(String defFile, StructureDefinition ed, String imageFolder,
|
||||
boolean inlineGraphics, boolean full, String corePath, String imagePath, Set<String> outputTracker)
|
||||
throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics, true);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics, true);
|
||||
TableModel model = gen.initNormalTable(corePath, false, true, ed.getId(), false, TableGenerationMode.XML);
|
||||
|
||||
boolean deep = false;
|
||||
|
@ -2792,8 +2792,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
boolean inlineGraphics, String profileBaseFileName, boolean snapshot, String corePath, String imagePath,
|
||||
boolean logicalModel, boolean allInvariants, Set<String> outputTracker) throws IOException, FHIRException {
|
||||
assert (diff != snapshot);// check it's ok to get rid of one of these
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics, true);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics, true);
|
||||
TableModel model = gen.initNormalTable(corePath, false, true, profile.getId() + (diff ? "d" : "s"), false,
|
||||
TableGenerationMode.XML);
|
||||
List<ElementDefinition> list = diff ? profile.getDifferential().getElement() : profile.getSnapshot().getElement();
|
||||
|
@ -2817,8 +2816,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
public XhtmlNode generateGrid(String defFile, StructureDefinition profile, String imageFolder, boolean inlineGraphics,
|
||||
String profileBaseFileName, String corePath, String imagePath, Set<String> outputTracker)
|
||||
throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics, true);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics, true);
|
||||
TableModel model = gen.initGridTable(corePath, profile.getId());
|
||||
List<ElementDefinition> list = profile.getSnapshot().getElement();
|
||||
List<StructureDefinition> profiles = new ArrayList<StructureDefinition>();
|
||||
|
@ -4969,8 +4967,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
|
||||
public XhtmlNode generateSpanningTable(StructureDefinition profile, String imageFolder, boolean onlyConstraints,
|
||||
String constraintPrefix, Set<String> outputTracker) throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, false, true);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, false, true);
|
||||
TableModel model = initSpanningTable(gen, "", false, profile.getId());
|
||||
Set<String> processed = new HashSet<String>();
|
||||
SpanEntry span = buildSpanningTable("(focus)", "", profile, processed, onlyConstraints, constraintPrefix);
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.hl7.fhir.r4b.model.Coding;
|
|||
import org.hl7.fhir.r4b.model.PrimitiveType;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -291,7 +292,7 @@ public abstract class CanonicalResourceComparer extends ResourceComparer {
|
|||
public XhtmlNode renderMetadata(CanonicalResourceComparison<? extends CanonicalResource> comparison, String id,
|
||||
String prefix) throws FHIRException, IOException {
|
||||
// columns: code, display (left|right), properties (left|right)
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "compare"), false);
|
||||
TableModel model = gen.new TableModel(id, true);
|
||||
model.setAlternating(true);
|
||||
model.getTitles().add(gen.new Title(null, null, "Name", "Property Name", null, 100));
|
||||
|
|
|
@ -34,6 +34,7 @@ import org.hl7.fhir.r4b.model.PrimitiveType;
|
|||
import org.hl7.fhir.r4b.model.Resource;
|
||||
import org.hl7.fhir.r4b.model.StructureDefinition;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -867,7 +868,7 @@ public class CapabilityStatementComparer extends CanonicalResourceComparer {
|
|||
// comments
|
||||
public XhtmlNode renderStatements(CapabilityStatementComparison comparison, String id, String prefix)
|
||||
throws FHIRException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "compare"), false);
|
||||
TableModel model = gen.new TableModel(id, true);
|
||||
model.setAlternating(true);
|
||||
model.getTitles().add(gen.new Title(null, null, "Type", "The type of item", null, 100));
|
||||
|
|
|
@ -16,6 +16,7 @@ import org.hl7.fhir.r4b.model.CodeSystem.ConceptDefinitionDesignationComponent;
|
|||
import org.hl7.fhir.r4b.model.CodeSystem.ConceptPropertyComponent;
|
||||
import org.hl7.fhir.r4b.model.CodeSystem.PropertyComponent;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -348,7 +349,7 @@ public class CodeSystemComparer extends CanonicalResourceComparer {
|
|||
public XhtmlNode renderConcepts(CodeSystemComparison comparison, String id, String prefix)
|
||||
throws FHIRException, IOException {
|
||||
// columns: code, display (left|right), properties (left|right)
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "compare"), false);
|
||||
TableModel model = gen.new TableModel(id, true);
|
||||
model.setAlternating(true);
|
||||
model.getTitles().add(gen.new Title(null, null, "Code", "The code for the concept", null, 100));
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.hl7.fhir.r4b.model.ValueSet;
|
|||
import org.hl7.fhir.r4b.utils.DefinitionNavigator;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator;
|
||||
|
@ -1027,8 +1028,7 @@ public class ProfileComparer extends CanonicalResourceComparer {
|
|||
|
||||
public XhtmlNode renderStructure(ProfileComparison comp, String id, String prefix, String corePath)
|
||||
throws FHIRException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false, true);
|
||||
gen.setTranslator(session.getContextRight().translator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "compare"), false, true);
|
||||
TableModel model = gen.initComparisonTable(corePath, id);
|
||||
genElementComp(null /* oome back to this later */, gen, model.getRows(), comp.combined, corePath, prefix, null,
|
||||
true);
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.hl7.fhir.r4b.model.ValueSet.ValueSetComposeComponent;
|
|||
import org.hl7.fhir.r4b.model.ValueSet.ValueSetExpansionContainsComponent;
|
||||
import org.hl7.fhir.r4b.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -577,7 +578,7 @@ public class ValueSetComparer extends CanonicalResourceComparer {
|
|||
}
|
||||
|
||||
public XhtmlNode renderCompose(ValueSetComparison csc, String id, String prefix) throws FHIRException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "comparison"), false);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "comparison"), false);
|
||||
TableModel model = gen.new TableModel(id, true);
|
||||
model.setAlternating(true);
|
||||
model.getTitles().add(gen.new Title(null, null, "Item", "The type of item being compared", null, 100));
|
||||
|
@ -778,7 +779,7 @@ public class ValueSetComparer extends CanonicalResourceComparer {
|
|||
boolean hasAbstract = findAbstract(csc.getExpansion());
|
||||
boolean hasInactive = findInactive(csc.getExpansion());
|
||||
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "comparison"), false);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "comparison"), false);
|
||||
TableModel model = gen.new TableModel(id, true);
|
||||
model.setAlternating(true);
|
||||
if (hasSystem) {
|
||||
|
|
|
@ -121,6 +121,7 @@ import org.hl7.fhir.utilities.MarkDownProcessor;
|
|||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.VersionUtilities;
|
||||
import org.hl7.fhir.utilities.i18n.I18nConstants;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -3874,8 +3875,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
public XhtmlNode generateExtensionTable(String defFile, StructureDefinition ed, String imageFolder,
|
||||
boolean inlineGraphics, boolean full, String corePath, String imagePath, Set<String> outputTracker,
|
||||
RenderingContext rc) throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics, true);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics, true);
|
||||
TableModel model = gen.initNormalTable(corePath, false, true, ed.getId() + (full ? "f" : "n"), true,
|
||||
TableGenerationMode.XHTML);
|
||||
|
||||
|
@ -4443,8 +4443,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
boolean logicalModel, boolean allInvariants, Set<String> outputTracker, boolean active, boolean mustSupport,
|
||||
RenderingContext rc) throws IOException, FHIRException {
|
||||
assert (diff != snapshot);// check it's ok to get rid of one of these
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics, true);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics, true);
|
||||
TableModel model = gen.initNormalTable(corePath, false, true, profile.getId() + (diff ? "d" : "s"), active,
|
||||
active ? TableGenerationMode.XHTML : TableGenerationMode.XML);
|
||||
List<ElementDefinition> list = new ArrayList<>();
|
||||
|
@ -4545,8 +4544,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
public XhtmlNode generateGrid(String defFile, StructureDefinition profile, String imageFolder, boolean inlineGraphics,
|
||||
String profileBaseFileName, String corePath, String imagePath, Set<String> outputTracker)
|
||||
throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, inlineGraphics, true);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, inlineGraphics, true);
|
||||
TableModel model = gen.initGridTable(corePath, profile.getId());
|
||||
List<ElementDefinition> list = profile.getSnapshot().getElement();
|
||||
List<StructureDefinition> profiles = new ArrayList<StructureDefinition>();
|
||||
|
@ -7116,8 +7114,7 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
|
||||
public XhtmlNode generateSpanningTable(StructureDefinition profile, String imageFolder, boolean onlyConstraints,
|
||||
String constraintPrefix, Set<String> outputTracker) throws IOException, FHIRException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(imageFolder, false, true);
|
||||
gen.setTranslator(getTranslator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), imageFolder, false, true);
|
||||
TableModel model = initSpanningTable(gen, "", false, profile.getId());
|
||||
Set<String> processed = new HashSet<String>();
|
||||
SpanEntry span = buildSpanningTable("(focus)", "", profile, processed, onlyConstraints, constraintPrefix);
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.hl7.fhir.r4b.renderers.utils.RenderingContext;
|
|||
import org.hl7.fhir.r4b.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r4b.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator;
|
||||
import org.hl7.fhir.utilities.xhtml.NodeType;
|
||||
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Cell;
|
||||
|
@ -74,7 +75,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
if (doOpts) {
|
||||
x.b().tx("Structure");
|
||||
}
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDestDir(), context.isInlineGraphics(),
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), context.getDestDir(), context.isInlineGraphics(),
|
||||
true);
|
||||
TableModel model = gen.new TableModel("qtree=" + q.getId(), !forResource);
|
||||
model.setAlternating(true);
|
||||
|
@ -511,7 +512,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
}
|
||||
|
||||
private boolean renderLogic(XhtmlNode x, Questionnaire q) throws FHIRException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDestDir(), context.isInlineGraphics(),
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), context.getDestDir(), context.isInlineGraphics(),
|
||||
true);
|
||||
TableModel model = gen.new TableModel("qtree=" + q.getId(), true);
|
||||
model.setAlternating(true);
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.hl7.fhir.r4b.renderers.utils.RenderingContext;
|
|||
import org.hl7.fhir.r4b.terminologies.ValueSetExpander.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r4b.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator;
|
||||
import org.hl7.fhir.utilities.xhtml.NodeType;
|
||||
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator.Cell;
|
||||
|
@ -79,7 +80,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
public boolean renderTree(XhtmlNode x, ResourceWrapper qr) throws UnsupportedEncodingException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDestDir(), context.isInlineGraphics(),
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), context.getDestDir(), context.isInlineGraphics(),
|
||||
true);
|
||||
TableModel model = gen.new TableModel("qtree=" + qr.getId(), false);
|
||||
model.setAlternating(true);
|
||||
|
@ -107,7 +108,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
public boolean renderTree(XhtmlNode x, QuestionnaireResponse q) throws UnsupportedEncodingException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDestDir(), context.isInlineGraphics(),
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), context.getDestDir(), context.isInlineGraphics(),
|
||||
true);
|
||||
TableModel model = gen.new TableModel("qtree=" + q.getId(), true);
|
||||
model.setAlternating(true);
|
||||
|
|
|
@ -19,6 +19,7 @@ import org.hl7.fhir.r5.model.DataType;
|
|||
import org.hl7.fhir.r5.model.PrimitiveType;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -591,7 +592,7 @@ public abstract class CanonicalResourceComparer extends ResourceComparer {
|
|||
|
||||
public XhtmlNode renderMetadata(CanonicalResourceComparison<? extends CanonicalResource> comparison, String id, String prefix) throws FHIRException, IOException {
|
||||
// columns: code, display (left|right), properties (left|right)
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "compare"), false);
|
||||
TableModel model = gen.new TableModel(id, true);
|
||||
model.setAlternating(true);
|
||||
model.getTitles().add(gen.new Title(null, null, "Name", "Property Name", null, 100));
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.hl7.fhir.r5.model.Resource;
|
|||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -742,7 +743,7 @@ public class CapabilityStatementComparer extends CanonicalResourceComparer {
|
|||
|
||||
// 6 columns: path | left value | left doco | right value | right doco | comments
|
||||
public XhtmlNode renderStatements(CapabilityStatementComparison comparison, String id, String prefix) throws FHIRException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "compare"), false);
|
||||
TableModel model = gen.new TableModel(id, true);
|
||||
model.setAlternating(true);
|
||||
model.getTitles().add(gen.new Title(null, null, "Type", "The type of item", null, 100));
|
||||
|
|
|
@ -17,6 +17,7 @@ import org.hl7.fhir.r5.model.CodeSystem.ConceptDefinitionDesignationComponent;
|
|||
import org.hl7.fhir.r5.model.CodeSystem.ConceptPropertyComponent;
|
||||
import org.hl7.fhir.r5.model.CodeSystem.PropertyComponent;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -519,7 +520,7 @@ public class CodeSystemComparer extends CanonicalResourceComparer {
|
|||
|
||||
public XhtmlNode renderConcepts(CodeSystemComparison comparison, String id, String prefix) throws FHIRException, IOException {
|
||||
// columns: code, display (left|right), properties (left|right)
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "compare"), false);
|
||||
TableModel model = gen.new TableModel(id, true);
|
||||
model.setAlternating(true);
|
||||
model.getTitles().add(gen.new Title(null, null, "Code", "The code for the concept", null, 100));
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.hl7.fhir.r5.renderers.utils.RenderingContext.ResourceRendererMode;
|
|||
import org.hl7.fhir.r5.utils.DefinitionNavigator;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.xhtml.HierarchicalTableGenerator;
|
||||
|
@ -1251,8 +1252,7 @@ public class StructureDefinitionComparer extends CanonicalResourceComparer imple
|
|||
}
|
||||
|
||||
public XhtmlNode renderStructure(ProfileComparison comp, String id, String prefix, String corePath) throws FHIRException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "compare"), false, true);
|
||||
gen.setTranslator(session.getContextRight().translator());
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "compare"), false, true);
|
||||
TableModel model = gen.initComparisonTable(corePath, id);
|
||||
genElementComp(null /* come back to this later */, gen, model.getRows(), comp.combined, corePath, prefix, null, true);
|
||||
return gen.generate(model, prefix, 0, null);
|
||||
|
|
|
@ -18,6 +18,7 @@ import org.hl7.fhir.r5.model.ValueSet.ValueSetComposeComponent;
|
|||
import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent;
|
||||
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage.IssueType;
|
||||
|
@ -588,7 +589,7 @@ public class ValueSetComparer extends CanonicalResourceComparer {
|
|||
}
|
||||
|
||||
public XhtmlNode renderCompose(ValueSetComparison csc, String id, String prefix) throws FHIRException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "comparison"), false);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "comparison"), false);
|
||||
TableModel model = gen.new TableModel(id, true);
|
||||
model.setAlternating(true);
|
||||
model.getTitles().add(gen.new Title(null, null, "Item", "The type of item being compared", null, 100));
|
||||
|
@ -779,7 +780,7 @@ public class ValueSetComparer extends CanonicalResourceComparer {
|
|||
boolean hasAbstract = findAbstract(csc.getExpansion());
|
||||
boolean hasInactive = findInactive(csc.getExpansion());
|
||||
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(Utilities.path("[tmp]", "comparison"), false);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(new RenderingI18nContext(), Utilities.path("[tmp]", "comparison"), false);
|
||||
TableModel model = gen.new TableModel(id, true);
|
||||
model.setAlternating(true);
|
||||
if (hasSystem) {
|
||||
|
|
|
@ -171,6 +171,7 @@ public class ProfilePathProcessor {
|
|||
ElementDefinition currentBase = cursors.base.getElement().get(cursors.baseCursor);
|
||||
String currentBasePath = profileUtilities.fixedPathSource(getContextPathSource(), currentBase.getPath(), getRedirector());
|
||||
debugProcessPathsIteration(cursors, currentBasePath);
|
||||
checkDiffAssignedAndCursor(cursors);
|
||||
List<ElementDefinition> diffMatches = profileUtilities.getDiffMatches(getDifferential(), currentBasePath, cursors.diffCursor, getDiffLimit(), getProfileName()); // get a list of matching elements in scope
|
||||
|
||||
// in the simple case, source is not sliced.
|
||||
|
@ -195,6 +196,25 @@ public class ProfilePathProcessor {
|
|||
return res;
|
||||
}
|
||||
|
||||
private void checkDiffAssignedAndCursor(ProfilePathProcessorState cursors) {
|
||||
// int i = 0;
|
||||
// List<ElementDefinition> list = getDifferential().getElement();
|
||||
// for (ElementDefinition ed : list) {
|
||||
// boolean assigned = ed.hasUserData("derived.pointer");
|
||||
// if (i < cursors.diffCursor) {
|
||||
// if (!assigned) {
|
||||
// throw new Error("what?");
|
||||
// }
|
||||
// } else if (i > cursors.diffCursor) {
|
||||
// if (assigned) {
|
||||
// throw new Error("what!?");
|
||||
// }
|
||||
// }
|
||||
// i++;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
private void debugProcessPathsIteration(ProfilePathProcessorState cursors, String currentBasePath) {
|
||||
if (profileUtilities.isDebug()) {
|
||||
System.out.println(getDebugIndent() + " - " + currentBasePath + ": "+
|
||||
|
|
|
@ -99,7 +99,6 @@ import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionContainsComponent;
|
|||
import org.hl7.fhir.r5.terminologies.expansion.ValueSetExpansionOutcome;
|
||||
import org.hl7.fhir.r5.terminologies.utilities.ValidationResult;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.r5.utils.TranslatingUtilities;
|
||||
import org.hl7.fhir.r5.utils.XVerExtensionManager;
|
||||
import org.hl7.fhir.r5.utils.XVerExtensionManager.XVerExtensionStatus;
|
||||
import org.hl7.fhir.r5.utils.formats.CSVWriter;
|
||||
|
@ -136,7 +135,7 @@ import org.hl7.fhir.utilities.xml.SchematronWriter.Section;
|
|||
* @author Grahame
|
||||
*
|
||||
*/
|
||||
public class ProfileUtilities extends TranslatingUtilities {
|
||||
public class ProfileUtilities {
|
||||
|
||||
private static boolean suppressIgnorableExceptions;
|
||||
|
||||
|
|
|
@ -139,7 +139,6 @@ import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier;
|
|||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
import org.hl7.fhir.utilities.TimeTracker;
|
||||
import org.hl7.fhir.utilities.ToolingClientLogger;
|
||||
import org.hl7.fhir.utilities.TranslationServices;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.VersionUtilities;
|
||||
import org.hl7.fhir.utilities.i18n.I18nBase;
|
||||
|
@ -275,7 +274,6 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
|||
private int expandCodesLimit = 1000;
|
||||
protected ILoggingService logger = new SystemOutLoggingService();
|
||||
protected Parameters expParameters;
|
||||
private TranslationServices translator = new NullTranslator();
|
||||
private Map<String, PackageInformation> packages = new HashMap<>();
|
||||
|
||||
@Getter
|
||||
|
@ -310,7 +308,6 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
|||
protected void copy(BaseWorkerContext other) {
|
||||
synchronized (other.lock) { // tricky, because you need to lock this as well, but it's really not in use yet
|
||||
allResourcesById.putAll(other.allResourcesById);
|
||||
translator = other.translator;
|
||||
codeSystems.copy(other.codeSystems);
|
||||
valueSets.copy(other.valueSets);
|
||||
maps.copy(other.maps);
|
||||
|
@ -2640,55 +2637,6 @@ public abstract class BaseWorkerContext extends I18nBase implements IWorkerConte
|
|||
}
|
||||
}
|
||||
|
||||
public TranslationServices translator() {
|
||||
return translator;
|
||||
}
|
||||
|
||||
public void setTranslator(TranslationServices translator) {
|
||||
this.translator = translator;
|
||||
}
|
||||
|
||||
public class NullTranslator implements TranslationServices {
|
||||
|
||||
@Override
|
||||
public String translate(String context, String value, String targetLang) {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String translate(String context, String value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toStr(float value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toStr(Date value) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String translateAndFormat(String contest, String lang, String value, Object... args) {
|
||||
return String.format(value, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> translations(String value) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> listTranslations(String category) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void reportStatus(JsonObject json) {
|
||||
synchronized (lock) {
|
||||
json.addProperty("codeystem-count", codeSystems.size());
|
||||
|
|
|
@ -72,7 +72,6 @@ import org.hl7.fhir.r5.utils.validation.IResourceValidator;
|
|||
import org.hl7.fhir.r5.utils.validation.ValidationContextCarrier;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
import org.hl7.fhir.utilities.TimeTracker;
|
||||
import org.hl7.fhir.utilities.TranslationServices;
|
||||
import org.hl7.fhir.utilities.npm.BasePackageCacheManager;
|
||||
import org.hl7.fhir.utilities.npm.NpmPackage;
|
||||
import org.hl7.fhir.utilities.validation.ValidationMessage;
|
||||
|
@ -388,6 +387,8 @@ public interface IWorkerContext {
|
|||
|
||||
/**
|
||||
* Access to the contexts internationalised error messages
|
||||
*
|
||||
* For rendering internationalization, see RenderingContext
|
||||
*
|
||||
* @param theMessage
|
||||
* @param theMessageArguments
|
||||
|
@ -506,7 +507,6 @@ public interface IWorkerContext {
|
|||
|
||||
// todo: figure these out
|
||||
public Map<String, NamingSystem> getNSUrlMap();
|
||||
public TranslationServices translator();
|
||||
|
||||
public void setLogger(@Nonnull ILoggingService logger);
|
||||
public ILoggingService getLogger();
|
||||
|
|
|
@ -76,14 +76,13 @@ public class FmlParser extends ParserBase {
|
|||
if (lexer.hasComments()) {
|
||||
result.makeElement("description").markLocation(lexer.getCurrentLocation()).setValue(lexer.getAllComments());
|
||||
}
|
||||
} else {
|
||||
while (lexer.hasToken("///")) {
|
||||
lexer.next();
|
||||
String fid = lexer.takeDottedToken();
|
||||
Element e = result.makeElement(fid).markLocation(lexer.getCurrentLocation());
|
||||
lexer.token("=");
|
||||
e.setValue(lexer.readConstant("meta value"));
|
||||
}
|
||||
}
|
||||
while (lexer.hasToken("///")) {
|
||||
lexer.next();
|
||||
String fid = lexer.takeDottedToken();
|
||||
Element e = result.makeElement(fid).markLocation(lexer.getCurrentLocation());
|
||||
lexer.token("=");
|
||||
e.setValue(lexer.readConstant("meta value"));
|
||||
}
|
||||
lexer.setMetadataFormat(false);
|
||||
if (!result.hasChild("status")) {
|
||||
|
|
|
@ -16899,6 +16899,26 @@ public class ImplementationGuide extends CanonicalResource {
|
|||
*/
|
||||
public static final ca.uhn.fhir.model.api.Include INCLUDE_RESOURCE = new ca.uhn.fhir.model.api.Include("ImplementationGuide:resource").toLocked();
|
||||
|
||||
public ImplementationGuideDefinitionPageComponent getPageByName(String name) {
|
||||
if (!hasDefinition() || !getDefinition().hasPage()) {
|
||||
return null;
|
||||
}
|
||||
return getPageByName(getDefinition().getPage(), name);
|
||||
}
|
||||
|
||||
private ImplementationGuideDefinitionPageComponent getPageByName(ImplementationGuideDefinitionPageComponent page, String name) {
|
||||
if (name.equals(page.getName())) {
|
||||
return page;
|
||||
}
|
||||
for (ImplementationGuideDefinitionPageComponent t : page.getPage()) {
|
||||
ImplementationGuideDefinitionPageComponent r = getPageByName(t, name);
|
||||
if (r != null) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -33,13 +33,13 @@ public class ActorDefinitionRenderer extends ResourceRenderer {
|
|||
public boolean render(XhtmlNode x, ActorDefinition acd) throws FHIRFormatError, DefinitionException, IOException {
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx("Actor: "+acd.getName());
|
||||
tr.td().b().tx(/*!#*/"Actor: "+acd.getName());
|
||||
tr.td().tx(acd.getTitle());
|
||||
tr.td().tx("Type: " + acd.getType().toCode());
|
||||
tr.td().tx(/*!#*/"Type: " + acd.getType().toCode());
|
||||
XhtmlNode td = tbl.tr().td().colspan("3");
|
||||
addMarkdown(td, acd.getDocumentation());
|
||||
if (acd.hasReference()) {
|
||||
tbl.tr().td().tx("References:");
|
||||
tbl.tr().td().tx(/*!#*/"References:");
|
||||
td = tr.td().colspan("2");
|
||||
boolean first = true;
|
||||
for (UrlType t : acd.getReference()) {
|
||||
|
@ -48,7 +48,7 @@ public class ActorDefinitionRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (acd.hasCapabilities()) {
|
||||
tbl.tr().td().tx("Capabilities:");
|
||||
tbl.tr().td().tx(/*!#*/"Capabilities:");
|
||||
td = tr.td().colspan("2");
|
||||
CapabilityStatement cs = context.getWorker().fetchResource(CapabilityStatement.class, acd.getCapabilities(), acd);
|
||||
if (cs != null) {
|
||||
|
@ -58,7 +58,7 @@ public class ActorDefinitionRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (acd.hasDerivedFrom()) {
|
||||
tbl.tr().td().tx("Derived from:");
|
||||
tbl.tr().td().tx(/*!#*/"Derived from:");
|
||||
td = tr.td().colspan("2");
|
||||
boolean first = true;
|
||||
for (UrlType t : acd.getReference()) {
|
||||
|
|
|
@ -231,16 +231,16 @@ public class AdditionalBindingsRenderer {
|
|||
|
||||
XhtmlNode tr = new XhtmlNode(NodeType.Element, "tr");
|
||||
children.add(tr);
|
||||
tr.td().style("font-size: 11px").b().tx("Additional Bindings");
|
||||
tr.td().style("font-size: 11px").tx("Purpose");
|
||||
tr.td().style("font-size: 11px").b().tx(/*!#*/"Additional Bindings");
|
||||
tr.td().style("font-size: 11px").tx(/*!#*/"Purpose");
|
||||
if (usage) {
|
||||
tr.td().style("font-size: 11px").tx("Usage");
|
||||
tr.td().style("font-size: 11px").tx(/*!#*/"Usage");
|
||||
}
|
||||
if (any) {
|
||||
tr.td().style("font-size: 11px").tx("Any");
|
||||
tr.td().style("font-size: 11px").tx(/*!#*/"Any");
|
||||
}
|
||||
if (doco) {
|
||||
tr.td().style("font-size: 11px").tx("Documentation");
|
||||
tr.td().style("font-size: 11px").tx(/*!#*/"Documentation");
|
||||
}
|
||||
for (AdditionalBindingDetail binding : bindings) {
|
||||
tr = new XhtmlNode(NodeType.Element, "tr");
|
||||
|
@ -296,8 +296,8 @@ public class AdditionalBindingsRenderer {
|
|||
}
|
||||
}
|
||||
if (any) {
|
||||
String newRepeat = binding.any ? "Any repeats" : "All repeats";
|
||||
String oldRepeat = binding.compare!=null && binding.compare.any ? "Any repeats" : "All repeats";
|
||||
String newRepeat = binding.any ? /*!#*/"Any repeats" : /*!#*/"All repeats";
|
||||
String oldRepeat = binding.compare!=null && binding.compare.any ? /*!#*/"Any repeats" : /*!#*/"All repeats";
|
||||
compareString(tr.td().style("font-size: 11px"), newRepeat, oldRepeat);
|
||||
}
|
||||
if (doco) {
|
||||
|
@ -338,54 +338,54 @@ public class AdditionalBindingsRenderer {
|
|||
boolean r5 = context == null || context.getWorker() == null ? false : VersionUtilities.isR5Plus(context.getWorker().getVersion());
|
||||
switch (purpose) {
|
||||
case "maximum":
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-maximum" : corePath+"extension-elementdefinition-maxvalueset.html", "A required binding, for use when the binding strength is 'extensible' or 'preferred'").tx("Max Binding");
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-maximum" : corePath+"extension-elementdefinition-maxvalueset.html", /*!#*/"A required binding, for use when the binding strength is 'extensible' or 'preferred'").tx(/*!#*/"Max Binding");
|
||||
break;
|
||||
case "minimum":
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-minimum" : corePath+"extension-elementdefinition-minvalueset.html", "The minimum allowable value set - any conformant system SHALL support all these codes").tx("Min Binding");
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-minimum" : corePath+"extension-elementdefinition-minvalueset.html", /*!#*/"The minimum allowable value set - any conformant system SHALL support all these codes").tx(/*!#*/"Min Binding");
|
||||
break;
|
||||
case "required" :
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-required" : corePath+"terminologies.html#strength", "Validators will check this binding (strength = required)").tx("Required Binding");
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-required" : corePath+"terminologies.html#strength", /*!#*/"Validators will check this binding (strength = required)").tx(/*!#*/"Required Binding");
|
||||
break;
|
||||
case "extensible" :
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-extensible" : corePath+"terminologies.html#strength", "Validators will check this binding (strength = extensible)").tx("Extensible Binding");
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-extensible" : corePath+"terminologies.html#strength", /*!#*/"Validators will check this binding (strength = extensible)").tx(/*!#*/"Extensible Binding");
|
||||
break;
|
||||
case "current" :
|
||||
if (r5) {
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-current" : corePath+"terminologies.html#strength", "New records are required to use this value set, but legacy records may use other codes").tx("Current Binding");
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-current" : corePath+"terminologies.html#strength", /*!#*/"New records are required to use this value set, but legacy records may use other codes").tx(/*!#*/"Current Binding");
|
||||
} else {
|
||||
td.span(null, "New records are required to use this value set, but legacy records may use other codes").tx("Required");
|
||||
td.span(null, /*!#*/"New records are required to use this value set, but legacy records may use other codes").tx(/*!#*/"Required");
|
||||
}
|
||||
break;
|
||||
case "preferred" :
|
||||
if (r5) {
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-preferred" : corePath+"terminologies.html#strength", "This is the value set that is recommended (documentation should explain why)").tx("Preferred Binding");
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-preferred" : corePath+"terminologies.html#strength", /*!#*/"This is the value set that is recommended (documentation should explain why)").tx(/*!#*/"Preferred Binding");
|
||||
} else {
|
||||
td.span(null, "This is the value set that is recommended (documentation should explain why)").tx("Recommended");
|
||||
td.span(null, /*!#*/"This is the value set that is recommended (documentation should explain why)").tx(/*!#*/"Recommended");
|
||||
}
|
||||
break;
|
||||
case "ui" :
|
||||
if (r5) {
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-ui" : corePath+"terminologies.html#strength", "This value set is provided to user look up in a given context").tx("UI Binding");
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-ui" : corePath+"terminologies.html#strength", /*!#*/"This value set is provided to user look up in a given context").tx(/*!#*/"UI Binding");
|
||||
} else {
|
||||
td.span(null, "This value set is provided to user look up in a given context").tx("UI");
|
||||
td.span(null, /*!#*/"This value set is provided to user look up in a given context").tx(/*!#*/"UI");
|
||||
}
|
||||
break;
|
||||
case "starter" :
|
||||
if (r5) {
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-starter" : corePath+"terminologies.html#strength", "This value set is a good set of codes to start with when designing your system").tx("Starter Set");
|
||||
} else {
|
||||
td.span(null, "This value set is a good set of codes to start with when designing your system").tx("Starter");
|
||||
td.span(null, /*!#*/"This value set is a good set of codes to start with when designing your system").tx(/*!#*/"Starter");
|
||||
}
|
||||
break;
|
||||
case "component" :
|
||||
if (r5) {
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-component" : corePath+"terminologies.html#strength", "This value set is a component of the base value set").tx("Component");
|
||||
} else {
|
||||
td.span(null, "This value set is a component of the base value set").tx("Component");
|
||||
td.span(null, /*!#*/"This value set is a component of the base value set").tx(/*!#*/"Component");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
td.span(null, "Unknown code for purpose").tx(purpose);
|
||||
td.span(null, /*!#*/"Unknown code for purpose").tx(purpose);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -430,7 +430,7 @@ public class AdditionalBindingsRenderer {
|
|||
children.tx(" (");
|
||||
boolean ffirst = !b.getAny();
|
||||
if (b.getAny()) {
|
||||
children.tx("any repeat");
|
||||
children.tx(/*!#*/"any repeat");
|
||||
}
|
||||
for (UsageContext uc : b.getUsage()) {
|
||||
if (ffirst) ffirst = false; else children.tx(",");
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BinaryRenderer {
|
|||
public void render(XhtmlNode x, Binary bin) throws IOException {
|
||||
filenames.clear();
|
||||
if (!bin.hasContentType()) {
|
||||
error(x, "No Content Type");
|
||||
error(x, /*!#*/"No Content Type");
|
||||
} else if (bin.getContentType().startsWith("image/")) {
|
||||
image(x, bin);
|
||||
} else if (isXml(bin.getContentType())) {
|
||||
|
@ -75,7 +75,7 @@ public class BinaryRenderer {
|
|||
}
|
||||
|
||||
if (ext == null) {
|
||||
error(x, "The Image Type '"+bin.getContentType()+"' is not rendered in this context");
|
||||
error(x, /*!#*/"The Image Type '"+bin.getContentType()+"' is not rendered in this context");
|
||||
} else {
|
||||
String fn = "Binary-Native-"+bin.getId()+ext;
|
||||
TextFile.bytesToFile(bin.getContent(), Utilities.path(folder, fn));
|
||||
|
|
|
@ -40,6 +40,12 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
super(context);
|
||||
}
|
||||
|
||||
|
||||
public BundleRenderer setMultiLangMode(boolean multiLangMode) {
|
||||
this.multiLangMode = multiLangMode;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean render(XhtmlNode x, Resource r) throws FHIRFormatError, DefinitionException, IOException, FHIRException, EOperationOutcome {
|
||||
XhtmlNode n = render((Bundle) r);
|
||||
|
@ -62,13 +68,13 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
List<BaseWrapper> entries = b.children("entry");
|
||||
if ("document".equals(b.get("type").primitiveValue())) {
|
||||
if (entries.isEmpty() || (entries.get(0).has("resource") && !"Composition".equals(entries.get(0).get("resource").fhirType())))
|
||||
throw new FHIRException("Invalid document '"+b.getId()+"' - first entry is not a Composition ('"+entries.get(0).get("resource").fhirType()+"')");
|
||||
throw new FHIRException(/*!#*/"Invalid document '"+b.getId()+"' - first entry is not a Composition ('"+entries.get(0).get("resource").fhirType()+"')");
|
||||
return renderDocument(x, b, entries);
|
||||
} else if ("collection".equals(b.get("type").primitiveValue()) && allEntriesAreHistoryProvenance(entries)) {
|
||||
// nothing
|
||||
} else {
|
||||
XhtmlNode root = new XhtmlNode(NodeType.Element, "div");
|
||||
root.para().addText(formatMessage(RENDER_BUNDLE_HEADER_ROOT, b.getId(), b.get("type").primitiveValue()));
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ROOT, b.getId(), b.get("type").primitiveValue()));
|
||||
int i = 0;
|
||||
for (BaseWrapper be : entries) {
|
||||
i++;
|
||||
|
@ -85,9 +91,9 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
}
|
||||
root.hr();
|
||||
if (be.has("fullUrl")) {
|
||||
root.para().addText(formatMessage(RENDER_BUNDLE_HEADER_ENTRY_URL, Integer.toString(i), be.get("fullUrl").primitiveValue()));
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ENTRY_URL, Integer.toString(i), be.get("fullUrl").primitiveValue()));
|
||||
} else {
|
||||
root.para().addText(formatMessage(RENDER_BUNDLE_HEADER_ENTRY, Integer.toString(i)));
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ENTRY, Integer.toString(i)));
|
||||
}
|
||||
// if (be.hasRequest())
|
||||
// renderRequest(root, be.getRequest());
|
||||
|
@ -96,7 +102,7 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
// if (be.hasResponse())
|
||||
// renderResponse(root, be.getResponse());
|
||||
if (be.has("resource")) {
|
||||
root.para().addText(formatMessage(RENDER_BUNDLE_RESOURCE, be.get("resource").fhirType()));
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_RESOURCE, be.get("resource").fhirType()));
|
||||
ResourceWrapper rw = be.getChildByName("resource").getAsResource();
|
||||
XhtmlNode xn = rw.getNarrative();
|
||||
if (xn == null || xn.isEmpty()) {
|
||||
|
@ -106,7 +112,7 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
xn = rr.render(rw);
|
||||
} catch (Exception e) {
|
||||
xn = new XhtmlNode();
|
||||
xn.para().b().tx("Exception generating narrative: "+e.getMessage());
|
||||
xn.para().b().tx(/*!#*/"Exception generating narrative: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
root.blockquote().para().addChildren(xn);
|
||||
|
@ -280,15 +286,15 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
|
||||
if (b.getType() == BundleType.DOCUMENT) {
|
||||
if (!b.hasEntry() || !(b.getEntryFirstRep().hasResource() && b.getEntryFirstRep().getResource() instanceof Composition)) {
|
||||
throw new FHIRException("Invalid document - first entry is not a Composition");
|
||||
throw new FHIRException(/*!#*/"Invalid document - first entry is not a Composition");
|
||||
}
|
||||
renderDocument(x, b);
|
||||
start = 1;
|
||||
docMode = true;
|
||||
x.hr();
|
||||
x.h2().addText(formatMessage(RENDER_BUNDLE_DOCUMENT_CONTENT, b.getId(), b.getType().toCode()));
|
||||
x.h2().addText(formatMessage(RenderingContext.BUNDLE_DOCUMENT_CONTENT, b.getId(), b.getType().toCode()));
|
||||
} else {
|
||||
x.para().addText(formatMessage(RENDER_BUNDLE_HEADER_ROOT, b.getId(), b.getType().toCode()));
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ROOT, b.getId(), b.getType().toCode()));
|
||||
}
|
||||
int i = 0;
|
||||
for (BundleEntryComponent be : b.getEntry()) {
|
||||
|
@ -307,17 +313,17 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
x.hr();
|
||||
if (docMode) {
|
||||
if (be.hasFullUrl() && be.hasResource()) {
|
||||
x.para().addText(formatMessage(RENDER_BUNDLE_HEADER_DOC_ENTRY_URD, Integer.toString(i), be.getFullUrl(), be.getResource().fhirType(), be.getResource().getIdBase()));
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_DOC_ENTRY_URD, Integer.toString(i), be.getFullUrl(), be.getResource().fhirType(), be.getResource().getIdBase()));
|
||||
} else if (be.hasFullUrl()) {
|
||||
x.para().addText(formatMessage(RENDER_BUNDLE_HEADER_DOC_ENTRY_U, Integer.toString(i), be.getFullUrl()));
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_DOC_ENTRY_U, Integer.toString(i), be.getFullUrl()));
|
||||
} else if (be.hasResource()) {
|
||||
x.para().addText(formatMessage(RENDER_BUNDLE_HEADER_DOC_ENTRY_RD, Integer.toString(i), be.getResource().fhirType(), be.getResource().getIdBase()));
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_DOC_ENTRY_RD, Integer.toString(i), be.getResource().fhirType(), be.getResource().getIdBase()));
|
||||
}
|
||||
} else {
|
||||
if (be.hasFullUrl()) {
|
||||
x.para().addText(formatMessage(RENDER_BUNDLE_HEADER_ENTRY_URL, Integer.toString(i), be.getFullUrl()));
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ENTRY_URL, Integer.toString(i), be.getFullUrl()));
|
||||
} else {
|
||||
x.para().addText(formatMessage(RENDER_BUNDLE_HEADER_ENTRY, Integer.toString(i)));
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ENTRY, Integer.toString(i)));
|
||||
}
|
||||
if (be.hasRequest())
|
||||
renderRequest(x, be.getRequest());
|
||||
|
@ -328,7 +334,7 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (be.hasResource()) {
|
||||
if (!docMode) {
|
||||
x.para().addText(formatMessage(RENDER_BUNDLE_RESOURCE, be.getResource().fhirType()));
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_RESOURCE, be.getResource().fhirType()));
|
||||
}
|
||||
if (be.hasResource()) {
|
||||
XhtmlNode xn = null;
|
||||
|
@ -342,7 +348,7 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
rr.setRcontext(new ResourceContext(rcontext, be.getResource()));
|
||||
xn = rr.build(be.getResource());
|
||||
} catch (Exception e) {
|
||||
xn = makeExceptionXhtml(e, "generating narrative");
|
||||
xn = makeExceptionXhtml(e, /*!#*/"generating narrative");
|
||||
}
|
||||
}
|
||||
x.blockquote().para().getChildNodes().addAll(checkInternalLinks(b, xn.getChildNodes()));
|
||||
|
@ -401,42 +407,42 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
|
||||
private void renderSearch(XhtmlNode root, BundleEntrySearchComponent search) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(formatMessage(RENDER_BUNDLE_SEARCH));
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_SEARCH));
|
||||
if (search.hasMode())
|
||||
b.append(formatMessage(RENDER_BUNDLE_SEARCH_MODE, search.getMode().toCode()));
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_SEARCH_MODE, search.getMode().toCode()));
|
||||
if (search.hasScore()) {
|
||||
if (search.hasMode())
|
||||
b.append(",");
|
||||
b.append(formatMessage(RENDER_BUNDLE_SEARCH_SCORE, search.getScore()));
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_SEARCH_SCORE, search.getScore()));
|
||||
}
|
||||
root.para().addText(b.toString());
|
||||
}
|
||||
|
||||
private void renderResponse(XhtmlNode root, BundleEntryResponseComponent response) {
|
||||
root.para().addText(formatMessage(RENDER_BUNDLE_RESPONSE));
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_RESPONSE));
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(response.getStatus()+"\r\n");
|
||||
if (response.hasLocation())
|
||||
b.append(formatMessage(RENDER_BUNDLE_LOCATION, response.getLocation())+"\r\n");
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_LOCATION, response.getLocation())+"\r\n");
|
||||
if (response.hasEtag())
|
||||
b.append(formatMessage(RENDER_BUNDLE_ETAG, response.getEtag())+"\r\n");
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_ETAG, response.getEtag())+"\r\n");
|
||||
if (response.hasLastModified())
|
||||
b.append(formatMessage(RENDER_BUNDLE_LAST_MOD, response.getEtag())+"\r\n");
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_LAST_MOD, response.getEtag())+"\r\n");
|
||||
root.pre().addText(b.toString());
|
||||
}
|
||||
|
||||
private void renderRequest(XhtmlNode root, BundleEntryRequestComponent request) {
|
||||
root.para().addText(formatMessage(RENDER_BUNDLE_REQUEST));
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_REQUEST));
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(request.getMethod()+" "+request.getUrl()+"\r\n");
|
||||
if (request.hasIfNoneMatch())
|
||||
b.append(formatMessage(RENDER_BUNDLE_IF_NON_MATCH, request.getIfNoneMatch())+"\r\n");
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_IF_NON_MATCH, request.getIfNoneMatch())+"\r\n");
|
||||
if (request.hasIfModifiedSince())
|
||||
b.append(formatMessage(RENDER_BUNDLE_IF_MOD, request.getIfModifiedSince())+"\r\n");
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_IF_MOD, request.getIfModifiedSince())+"\r\n");
|
||||
if (request.hasIfMatch())
|
||||
b.append(formatMessage(RENDER_BUNDLE_IF_MATCH, request.getIfMatch())+"\r\n");
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_IF_MATCH, request.getIfMatch())+"\r\n");
|
||||
if (request.hasIfNoneExist())
|
||||
b.append(formatMessage(RENDER_BUNDLE_IF_NONE, request.getIfNoneExist())+"\r\n");
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_IF_NONE, request.getIfNoneExist())+"\r\n");
|
||||
root.pre().addText(b.toString());
|
||||
}
|
||||
|
||||
|
|
|
@ -289,18 +289,18 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
|
||||
x.h(2,"title").addText(conf.getTitle());
|
||||
XhtmlNode uList = x.ul();
|
||||
uList.li().addText("Implementation Guide Version: " + igVersion);
|
||||
uList.li().addText("FHIR Version: " + currentVersion.toCode());
|
||||
uList.li().addText(/*!#*/"Implementation Guide Version: " + igVersion);
|
||||
uList.li().addText(/*!#*/"FHIR Version: " + currentVersion.toCode());
|
||||
|
||||
addSupportedFormats(uList, conf);
|
||||
|
||||
uList.li().addText("Published on: " + conf.getDate());
|
||||
uList.li().addText("Published by: " + conf.getPublisherElement().asStringValue());
|
||||
uList.li().addText(/*!#*/"Published on: " + displayDateTime(conf.getDateElement()));
|
||||
uList.li().addText(/*!#*/"Published by: " + conf.getPublisherElement().asStringValue());
|
||||
|
||||
|
||||
XhtmlNode block = x.addTag("blockquote").attribute("class","impl-note");
|
||||
block.addTag("p").addTag("strong").addText("Note to Implementers: FHIR Capabilities");
|
||||
block.addTag("p").addText("Any FHIR capability may be 'allowed' by the system unless explicitly marked as \"SHALL NOT\". A few items are marked as MAY in the Implementation Guide to highlight their potential relevance to the use case.");
|
||||
block.addTag("p").addTag("strong").addText(/*!#*/"Note to Implementers: FHIR Capabilities");
|
||||
block.addTag("p").addText(/*!#*/"Any FHIR capability may be 'allowed' by the system unless explicitly marked as \"SHALL NOT\". A few items are marked as MAY in the Implementation Guide to highlight their potential relevance to the use case.");
|
||||
|
||||
|
||||
addSupportedIGs(x, conf);
|
||||
|
@ -308,11 +308,11 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
int restNum = conf.getRest().size();
|
||||
int nextLevel = 3;
|
||||
if (restNum > 0) {
|
||||
x.h(2,"rest").addText("FHIR RESTful Capabilities");
|
||||
x.h(2,"rest").addText(/*!#*/"FHIR RESTful Capabilities");
|
||||
int count=1;
|
||||
for (CapabilityStatementRestComponent rest : conf.getRest()) {
|
||||
if (restNum > 1) {
|
||||
x.h(3,"rest"+Integer.toString(count)).addText("REST Configuration " + Integer.toString(count));
|
||||
x.h(3,"rest"+Integer.toString(count)).addText(/*!#*/"REST Configuration " + Integer.toString(count));
|
||||
nextLevel = 4;
|
||||
}
|
||||
addRestConfigPanel(x, rest, nextLevel, count);
|
||||
|
@ -330,8 +330,8 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
hasUpdates = hasUpdates || hasOp(r, TypeRestfulInteraction.HISTORYINSTANCE);
|
||||
}
|
||||
if (rest.getResource().size() >0) {
|
||||
x.h(nextLevel,"resourcesCap" + Integer.toString(count)).addText("Capabilities by Resource/Profile");
|
||||
x.h(nextLevel+1,"resourcesSummary" + Integer.toString(count)).addText("Summary");
|
||||
x.h(nextLevel,"resourcesCap" + Integer.toString(count)).addText(/*!#*/"Capabilities by Resource/Profile");
|
||||
x.h(nextLevel+1,"resourcesSummary" + Integer.toString(count)).addText(/*!#*/"Summary");
|
||||
addSummaryIntro(x);
|
||||
addSummaryTable(x, rest, hasVRead, hasPatch, hasDelete, hasHistory, hasUpdates, count);
|
||||
x.addTag("hr");
|
||||
|
@ -442,7 +442,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
XhtmlNode ul = null;
|
||||
if (igShalls.size() > 0) {
|
||||
x.h(3,"shallIGs").addText("SHALL Support the Following Implementation Guides");
|
||||
x.h(3,"shallIGs").addText(/*!#*/"SHALL Support the Following Implementation Guides");
|
||||
ul = x.ul();
|
||||
for (String url : igShalls) {
|
||||
addResourceLink(ul.li(), url, url);
|
||||
|
@ -450,7 +450,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (igShoulds.size() > 0) {
|
||||
x.h(3,"shouldIGs").addText("SHOULD Support the Following Implementation Guides");
|
||||
x.h(3,"shouldIGs").addText(/*!#*/"SHOULD Support the Following Implementation Guides");
|
||||
ul = x.ul();
|
||||
for (String url : igShoulds) {
|
||||
addResourceLink(ul.li(), url, url);
|
||||
|
@ -458,7 +458,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (igMays.size() > 0) {
|
||||
x.h(3,"shouldIGs").addText("SHOULD Support the Following Implementation Guides");
|
||||
x.h(3,"shouldIGs").addText(/*!#*/"SHOULD Support the Following Implementation Guides");
|
||||
ul = x.ul();
|
||||
for (String url : igMays) {
|
||||
addResourceLink(ul.li(), url, url);
|
||||
|
@ -471,7 +471,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
|
||||
private void addSupportedFormats(XhtmlNode uList, CapabilityStatement conf) {
|
||||
XhtmlNode lItem = uList.li();
|
||||
lItem.addText("Supported Formats: ");
|
||||
lItem.addText(/*!#*/"Supported Formats: ");
|
||||
Boolean first = true;
|
||||
String capExpectation = null;
|
||||
for (CodeType c : conf.getFormat()) {
|
||||
|
@ -481,13 +481,13 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
capExpectation = getExtValueCode(c.getExtensionByUrl(EXPECTATION));
|
||||
if (!Utilities.noString(capExpectation)) {
|
||||
lItem.addTag("strong").addText(capExpectation);
|
||||
lItem.addText(" support ");
|
||||
lItem.addText(" "+/*!#*/"support ");
|
||||
}
|
||||
lItem.code().addText(c.getCode());
|
||||
first = false;
|
||||
}
|
||||
lItem = uList.li();
|
||||
lItem.addText("Supported Patch Formats: ");
|
||||
lItem.addText(/*!#*/"Supported Patch Formats: ");
|
||||
first=true;
|
||||
for (CodeType c : conf.getPatchFormat()) {
|
||||
if (!first) {
|
||||
|
@ -496,7 +496,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
capExpectation = getExtValueCode(c.getExtensionByUrl(EXPECTATION));
|
||||
if (!Utilities.noString(capExpectation)) {
|
||||
lItem.addTag("strong").addText(capExpectation);
|
||||
lItem.addText(" support ");
|
||||
lItem.addText(/*!#*/" support ");
|
||||
}
|
||||
lItem.code().addText(c.getCode());
|
||||
first = false;
|
||||
|
@ -533,16 +533,16 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
addMarkdown(body.blockquote(),mdText);
|
||||
}
|
||||
}
|
||||
body.div().attribute("class","lead").addTag("em").addText("Summary of System-wide Interactions");
|
||||
body.div().attribute("class","lead").addTag("em").addText(/*!#*/"Summary of System-wide Interactions");
|
||||
addSystemInteractions(body, rest.getInteraction());
|
||||
|
||||
}
|
||||
|
||||
private String getCorsText(boolean on) {
|
||||
if (on) {
|
||||
return "Enable CORS: yes";
|
||||
return /*!#*/"Enable CORS: yes";
|
||||
}
|
||||
return "Enable CORS: no";
|
||||
return /*!#*/"Enable CORS: no";
|
||||
}
|
||||
|
||||
private List<String> getSecServices(List<CodeableConcept> services)
|
||||
|
@ -613,20 +613,20 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
for (Map<String,String> interactionMap : interactions) {
|
||||
item = uList.li();
|
||||
if (Utilities.noString(verb)) {
|
||||
item.addText("Supports the ");
|
||||
item.addText(/*!#*/"Supports the ");
|
||||
}
|
||||
else {
|
||||
item.addTag("strong").addText(verb);
|
||||
item.addText(" support the ");
|
||||
item.addText(/*!#*/" support the ");
|
||||
}
|
||||
interaction = interactionMap.keySet().toArray()[0].toString();
|
||||
item.code(interaction);
|
||||
documentation = interactionMap.get(interaction);
|
||||
if (Utilities.noString(documentation)) {
|
||||
item.addText(" interaction.");
|
||||
item.addText(/*!#*/" interaction.");
|
||||
}
|
||||
else {
|
||||
item.addText(" interaction described as follows:");
|
||||
item.addText(/*!#*/" interaction described as follows:");
|
||||
try {
|
||||
addMarkdown(item, documentation);
|
||||
} catch (FHIRFormatError e) {
|
||||
|
@ -647,11 +647,11 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
if (interactions.size() == 0) return;
|
||||
XhtmlNode item = uList.li();
|
||||
if (Utilities.noString(verb)) {
|
||||
item.addText("Supports ");
|
||||
item.addText(/*!#*/"Supports ");
|
||||
}
|
||||
else {
|
||||
item.addTag("strong").addText(verb);
|
||||
item.addText(" support ");
|
||||
item.addText(/*!#*/" support ");
|
||||
}
|
||||
addSeparatedListOfCodes(item, interactions, ",");
|
||||
item.addText(".");
|
||||
|
@ -660,11 +660,11 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
private void addSummaryIntro(XhtmlNode x) {
|
||||
XhtmlNode uList = null;
|
||||
XhtmlNode lItem = null;
|
||||
x.para().addText("The summary table lists the resources that are part of this configuration, and for each resource it lists:");
|
||||
x.para().addText(/*!#*/"The summary table lists the resources that are part of this configuration, and for each resource it lists:");
|
||||
uList=x.ul();
|
||||
uList.li().addText("The relevant profiles (if any)");
|
||||
uList.li().addText(/*!#*/"The relevant profiles (if any)");
|
||||
lItem = uList.li();
|
||||
lItem.addText("The interactions supported by each resource (");
|
||||
lItem.addText(/*!#*/"The interactions supported by each resource (");
|
||||
lItem.b().addTag("span").attribute("class","bg-info").addText("R");
|
||||
lItem.addText("ead, ");
|
||||
lItem.b().addTag("span").attribute("class","bg-info").addText("S");
|
||||
|
@ -686,40 +686,40 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
lItem.b().addTag("span").attribute("class","bg-info").addText("H");
|
||||
lItem.addText("istory on ");
|
||||
lItem.b().addTag("span").attribute("class","bg-info").addText("T");
|
||||
lItem.addText("ype are only present if at least one of the resources has support for them.");
|
||||
uList.li().addTag("span").addText("The required, recommended, and some optional search parameters (if any). ");
|
||||
lItem.addText(/*!#*/"ype are only present if at least one of the resources has support for them.");
|
||||
uList.li().addTag("span").addText(/*!#*/"The required, recommended, and some optional search parameters (if any). ");
|
||||
lItem = uList.li();
|
||||
lItem.addText("The linked resources enabled for ");
|
||||
lItem.addText(/*!#*/"The linked resources enabled for ");
|
||||
lItem.code().addText("_include");
|
||||
lItem = uList.li();
|
||||
lItem.addText("The other resources enabled for ");
|
||||
lItem.addText(/*!#*/"The other resources enabled for ");
|
||||
lItem.code().addText("_revinclude");
|
||||
uList.li().addText("The operations on the resource (if any)");
|
||||
uList.li().addText(/*!#*/"The operations on the resource (if any)");
|
||||
}
|
||||
|
||||
private void addSummaryTable(XhtmlNode x, CapabilityStatement.CapabilityStatementRestComponent rest, boolean hasVRead, boolean hasPatch, boolean hasDelete, boolean hasHistory, boolean hasUpdates, int count) throws IOException {
|
||||
XhtmlNode t = x.div().attribute("class","table-responsive").table("table table-condensed table-hover");
|
||||
XhtmlNode tr = t.addTag("thead").tr();
|
||||
tr.th().b().tx("Resource Type");
|
||||
tr.th().b().tx("Profile");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", "GET a resource (read interaction)").tx("R");
|
||||
tr.th().b().tx(/*!#*/"Resource Type");
|
||||
tr.th().b().tx(/*!#*/"Profile");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", /*!#*/"GET a resource (read interaction)").tx("R");
|
||||
if (hasVRead)
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", "GET past versions of resources (vread interaction)").tx("V-R");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", "GET all set of resources of the type (search interaction)").tx("S");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", "PUT a new resource version (update interaction)").tx("U");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", /*!#*/"GET past versions of resources (vread interaction)").tx("V-R");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", /*!#*/"GET all set of resources of the type (search interaction)").tx("S");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", /*!#*/"PUT a new resource version (update interaction)").tx("U");
|
||||
if (hasPatch)
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", "PATCH a new resource version (patch interaction)").tx("P");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", "POST a new resource (create interaction)").tx("C");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", /*!#*/"PATCH a new resource version (patch interaction)").tx("P");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", /*!#*/"POST a new resource (create interaction)").tx("C");
|
||||
if (hasDelete)
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", "DELETE a resource (delete interaction)").tx("D");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", /*!#*/"DELETE a resource (delete interaction)").tx("D");
|
||||
if (hasUpdates)
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", "GET changes to a resource (history interaction on instance)").tx("H-I");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", /*!#*/"GET changes to a resource (history interaction on instance)").tx("H-I");
|
||||
if (hasHistory)
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", "GET changes for all resources of the type (history interaction on type)").tx("H-T");
|
||||
tr.th().b().attribute("title", "Required and recommended search parameters").tx("Searches");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", /*!#*/"GET changes for all resources of the type (history interaction on type)").tx("H-T");
|
||||
tr.th().b().attribute("title", /*!#*/"Required and recommended search parameters").tx(/*!#*/"Searches");
|
||||
tr.th().code().b().tx("_include");
|
||||
tr.th().code().b().tx("_revinclude");
|
||||
tr.th().b().tx("Operations");
|
||||
tr.th().b().tx(/*!#*/"Operations");
|
||||
|
||||
XhtmlNode tbody = t.addTag("tbody");
|
||||
XhtmlNode profCell = null;
|
||||
|
@ -744,12 +744,12 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
//profCell.ah(r.getProfile()).addText(r.getProfile());
|
||||
if (hasSupProf) {
|
||||
profCell.br();
|
||||
profCell.addTag("em").addText("Additional supported profiles:");
|
||||
profCell.addTag("em").addText(/*!#*/"Additional supported profiles:");
|
||||
renderSupportedProfiles(profCell, r);
|
||||
}
|
||||
}
|
||||
else { //Case of only supported profiles
|
||||
profCell.addText("Supported profiles:");
|
||||
profCell.addText(/*!#*/"Supported profiles:");
|
||||
renderSupportedProfiles(profCell, r);
|
||||
}
|
||||
//Show capabilities
|
||||
|
@ -809,17 +809,17 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (r.hasExtension(ToolingExtensions.EXT_PROFILE_MAPPING)) {
|
||||
profCell.br();
|
||||
profCell.b().tx("Profile Mapping");
|
||||
profCell.b().tx(/*!#*/"Profile Mapping");
|
||||
XhtmlNode tbl = profCell.table("grid");
|
||||
boolean doco = false;
|
||||
for (Extension ext : r.getExtensionsByUrl(ToolingExtensions.EXT_PROFILE_MAPPING)) {
|
||||
doco = doco || ext.hasExtension("documentation");
|
||||
}
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.th().tx("Criteria");
|
||||
tr.th().tx("Profile");
|
||||
tr.th().tx(/*!#*/"Criteria");
|
||||
tr.th().tx(/*!#*/"Profile");
|
||||
if (doco) {
|
||||
tr.th().tx("Criteria");
|
||||
tr.th().tx(/*!#*/"Criteria");
|
||||
}
|
||||
for (Extension ext : r.getExtensionsByUrl(ToolingExtensions.EXT_PROFILE_MAPPING)) {
|
||||
tr = tbl.tr();
|
||||
|
@ -936,7 +936,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
else {
|
||||
panelHead = panel.div().attribute("class", "panel-heading").h(nextLevel,r.getType() + countString).attribute("class", "panel-title");
|
||||
panelHead.span("float: right;","").addText("Resource Conformance: " + getResourceExpectation(r));
|
||||
panelHead.span("float: right;","").addText(/*!#*/"Resource Conformance: " + getResourceExpectation(r));
|
||||
panelHead.addText(r.getType());
|
||||
body = panel.div().attribute("class", "panel-body").div().attribute("class", "container");
|
||||
}
|
||||
|
@ -950,17 +950,17 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
String refPolicyWidth = "col-lg-3";
|
||||
if (!Utilities.noString(text)) {
|
||||
cell = row.div().attribute("class", "col-lg-6");
|
||||
addLead(cell,"Base System Profile");
|
||||
addLead(cell,/*!#*/"Base System Profile");
|
||||
cell.br();
|
||||
addResourceLink(cell, text, text);
|
||||
cell=row.div().attribute("class", "col-lg-3");
|
||||
addLead(cell, "Profile Conformance");
|
||||
addLead(cell, /*!#*/"Profile Conformance");
|
||||
cell.br();
|
||||
cell.b().addText(getProfileExpectation(r.getProfileElement()));
|
||||
}
|
||||
else { //No profile, use FHIR Core Resource
|
||||
cell = row.div().attribute("class", "col-lg-4");
|
||||
addLead(cell,"Core FHIR Resource");
|
||||
addLead(cell,/*!#*/"Core FHIR Resource");
|
||||
cell.br();
|
||||
cell.ah(currentFhirBase + r.getType().toLowerCase() + ".html").addText(r.getType());
|
||||
pullInteraction = true;
|
||||
|
@ -968,7 +968,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
cell = row.div().attribute("class", refPolicyWidth);
|
||||
addLead(cell,"Reference Policy");
|
||||
addLead(cell,/*!#*/"Reference Policy");
|
||||
cell.br();
|
||||
addSeparatedListOfCodes(cell, getReferencePolicyStrings(r.getReferencePolicy()) , ",");
|
||||
if (pullInteraction) {
|
||||
|
@ -979,7 +979,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
if (supportedProfiles.size() > 0) {
|
||||
row = body.div().attribute("class", "row");
|
||||
cell = row.div().attribute("class", "col-6");
|
||||
addLead(cell,"Supported Profiles");
|
||||
addLead(cell,/*!#*/"Supported Profiles");
|
||||
XhtmlNode para = cell.para();
|
||||
boolean first = true;
|
||||
for (CanonicalType c : supportedProfiles) {
|
||||
|
@ -1004,7 +1004,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
if (!Utilities.noString(mdText)) {
|
||||
row = body.div().attribute("class", "row");
|
||||
cell = row.div().attribute("class", "col-12");
|
||||
addLead(cell,"Documentation");
|
||||
addLead(cell,/*!#*/"Documentation");
|
||||
addMarkdown(cell.blockquote(), mdText);
|
||||
}
|
||||
|
||||
|
@ -1028,12 +1028,12 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
XhtmlNode tr;
|
||||
row = body.div().attribute("class", "row");
|
||||
cell = row.div().attribute("class", "col-12");
|
||||
addLead(cell,"Extended Operations");
|
||||
addLead(cell,/*!#*/"Extended Operations");
|
||||
table = cell.table("table table-condensed table-hover");
|
||||
tr = table.addTag("thead").tr();
|
||||
tr.th().addText("Conformance");
|
||||
tr.th().addText("Operation");
|
||||
tr.th().addText("Documentation");
|
||||
tr.th().addText(/*!#*/"Conformance");
|
||||
tr.th().addText(/*!#*/"Operation");
|
||||
tr.th().addText(/*!#*/"Documentation");
|
||||
tbody = table.addTag("tbody");
|
||||
addOps(tbody, map, "supported");
|
||||
addOps(tbody, map, "SHALL");
|
||||
|
@ -1089,7 +1089,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
XhtmlNode cell = row.div().attribute("class", widthString);
|
||||
addLead(cell, "Interaction summary");
|
||||
addLead(cell, /*!#*/"Interaction summary");
|
||||
cell.br();
|
||||
XhtmlNode ul = cell.ul();
|
||||
addInteractionSummaryList(ul, "SHALL", shalls);
|
||||
|
@ -1154,13 +1154,13 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
XhtmlNode tr;
|
||||
row = body.div().attribute("class", "row");
|
||||
cell = row.div().attribute("class", "col-lg-7");
|
||||
addLead(cell,"Search Parameters");
|
||||
addLead(cell,/*!#*/"Search Parameters");
|
||||
table = cell.table("table table-condensed table-hover");
|
||||
tr = table.addTag("thead").tr();
|
||||
tr.th().addText("Conformance");
|
||||
tr.th().addText("Parameter");
|
||||
tr.th().addText("Type");
|
||||
tr.th().addText("Documentation");
|
||||
tr.th().addText(/*!#*/"Conformance");
|
||||
tr.th().addText(/*!#*/"Parameter");
|
||||
tr.th().addText(/*!#*/"Type");
|
||||
tr.th().addText(/*!#*/"Documentation");
|
||||
tbody = table.addTag("tbody");
|
||||
Map<String,List<SingleParam>> map = sParams.getIndbyExp();
|
||||
addIndRows(tbody, map, "supported");
|
||||
|
@ -1170,12 +1170,12 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
addIndRows(tbody, map, "SHOULD-NOT");
|
||||
cell = row.div().attribute("class", "col-lg-5");
|
||||
if (!isCombinedEmpty(comboMap)) {
|
||||
addLead(cell,"Combined Search Parameters");
|
||||
addLead(cell,/*!#*/"Combined Search Parameters");
|
||||
table = cell.table("table table-condensed table-hover");
|
||||
tr = table.addTag("thead").tr();
|
||||
tr.th().addText("Conformance");
|
||||
tr.th().addText("Parameters");
|
||||
tr.th().addText("Types");
|
||||
tr.th().addText(/*!#*/"Conformance");
|
||||
tr.th().addText(/*!#*/"Parameters");
|
||||
tr.th().addText(/*!#*/"Types");
|
||||
tbody = table.addTag("tbody");
|
||||
addComboRows(tbody, comboMap, "supported");
|
||||
addComboRows(tbody, comboMap, "SHALL");
|
||||
|
|
|
@ -82,13 +82,13 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
|
||||
private void generateFilters(XhtmlNode x, CodeSystem cs) {
|
||||
if (cs.hasFilter()) {
|
||||
x.para().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Filters", getContext().getLang()));
|
||||
x.para().b().tx(formatMessage(RenderingContext.CODESYSTEM_FILTERS));
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Code", getContext().getLang()));
|
||||
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", "operator", getContext().getLang()));
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Value", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_FILTER_CODE));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_FILTER_DESC));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_FILTER_OP));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_FILTER_VALUE));
|
||||
for (CodeSystemFilterComponent f : cs.getFilter()) {
|
||||
tr = tbl.tr();
|
||||
renderStatus(f, tr.td()).tx(f.getCode());
|
||||
|
@ -112,20 +112,20 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
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", "This code system defines the following properties for its concepts", getContext().getLang()));
|
||||
x.para().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROPS));
|
||||
x.para().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROPS_DESC));
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
if (hasRendered) {
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Name", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROP_NAME));
|
||||
}
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Code", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROP_CODE));
|
||||
if (hasURI) {
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "URI", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROP_URI));
|
||||
}
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Type", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROP_TYPE));
|
||||
if (hasDescription) {
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Description", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROP_DESC));
|
||||
}
|
||||
for (PropertyComponent p : cs.getProperty()) {
|
||||
tr = tbl.tr();
|
||||
|
@ -149,32 +149,32 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
|
||||
private String sentenceForContent(CodeSystemContentMode mode, CodeSystem cs) {
|
||||
switch (mode) {
|
||||
case COMPLETE: return context.getContext().formatMessage(I18nConstants.RND_CS_CONTENT_COMPLETE);
|
||||
case EXAMPLE: return context.getContext().formatMessage(I18nConstants.RND_CS_CONTENT_EXAMPLE);
|
||||
case FRAGMENT: return context.getContext().formatMessage(I18nConstants.RND_CS_CONTENT_FRAGMENT);
|
||||
case NOTPRESENT: return context.getContext().formatMessage(I18nConstants.RND_CS_CONTENT_NOTPRESENT);
|
||||
case COMPLETE: return formatMessage(RenderingContext.CODESYSTEM_CONTENT_COMPLETE);
|
||||
case EXAMPLE: return formatMessage(RenderingContext.CODESYSTEM_CONTENT_EXAMPLE);
|
||||
case FRAGMENT: return formatMessage(RenderingContext.CODESYSTEM_CONTENT_FRAGMENT);
|
||||
case NOTPRESENT: return formatMessage(RenderingContext.CODESYSTEM_CONTENT_NOTPRESENT);
|
||||
case SUPPLEMENT:
|
||||
boolean properties = CodeSystemUtilities.hasProperties(cs);
|
||||
boolean designations = CodeSystemUtilities.hasDesignations(cs);
|
||||
String features;
|
||||
if (properties && designations) {
|
||||
features = "displays and properties";
|
||||
features = /*!#*/"displays and properties";
|
||||
} else if (properties) {
|
||||
features = "properties";
|
||||
features = /*!#*/"properties";
|
||||
} else if (designations) {
|
||||
features = "displays";
|
||||
features = /*!#*/"displays";
|
||||
} else {
|
||||
features = "features"; // ?
|
||||
features = /*!#*/"features"; // ?
|
||||
}
|
||||
return context.getContext().formatMessage(I18nConstants.RND_CS_CONTENT_SUPPLEMENT, features);
|
||||
return formatMessage(RenderingContext.CODESYSTEM_CONTENT_SUPPLEMENT, features);
|
||||
default:
|
||||
throw new FHIRException("Unknown CodeSystemContentMode mode");
|
||||
throw new FHIRException(/*!#*/"Unknown CodeSystemContentMode mode");
|
||||
}
|
||||
}
|
||||
|
||||
private boolean generateCodeSystemContent(XhtmlNode x, CodeSystem cs, boolean hasExtensions, List<UsedConceptMap> maps, boolean props) throws FHIRFormatError, DefinitionException, IOException {
|
||||
if (props) {
|
||||
x.para().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Concepts", getContext().getLang()));
|
||||
x.para().b().tx(formatMessage(RenderingContext.CODESYSTEM_CONCEPTS));
|
||||
}
|
||||
XhtmlNode p = x.para();
|
||||
renderStatus(cs.getUrlElement(), p.param("cs")).code().tx(cs.getUrl());
|
||||
|
@ -234,10 +234,10 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (langs.size() >= 2) {
|
||||
Collections.sort(langs);
|
||||
x.para().b().tx("Additional Language Displays");
|
||||
x.para().b().tx(/*!#*/"Additional Language Displays");
|
||||
t = x.table("codes");
|
||||
XhtmlNode tr = t.tr();
|
||||
tr.td().b().tx("Code");
|
||||
tr.td().b().tx(/*!#*/"Code");
|
||||
for (String lang : langs)
|
||||
tr.td().b().addText(describeLang(lang));
|
||||
for (ConceptDefinitionComponent c : cs.getConcept()) {
|
||||
|
@ -250,11 +250,11 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
private void makeHierarchyParam(XhtmlNode x, CodeSystem cs, Enumeration<CodeSystemHierarchyMeaning> hm) {
|
||||
if (hm.hasValue()) {
|
||||
String s = hm.getValue().getDisplay();
|
||||
renderStatus(hm, x).tx(" in a "+s+" heirarchy");
|
||||
renderStatus(hm, x).tx(" "+/*!#*/"in a "+s+" heirarchy");
|
||||
} else if (VersionComparisonAnnotation.hasDeleted(cs, "hierarchyMeaning")) {
|
||||
makeHierarchyParam(x, null, (Enumeration<CodeSystemHierarchyMeaning>) VersionComparisonAnnotation.getDeleted(cs, "hierarchyMeaning").get(0));
|
||||
} else if (CodeSystemUtilities.hasHierarchy(cs)) {
|
||||
x.tx(" in an undefined heirarchy");
|
||||
x.tx(" "+/*!#*/"in an undefined heirarchy");
|
||||
} else {
|
||||
x.tx("");
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
|
||||
private void addCopyColumn(XhtmlNode tr) {
|
||||
if (context.isCopyButton()) {
|
||||
tr.td().b().tx("Copy");
|
||||
tr.td().b().tx(/*!#*/"Copy");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -463,11 +463,11 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
td = tr.td();
|
||||
Boolean b = CodeSystemUtilities.isDeprecated(cs, c, false);
|
||||
if (b != null && b) {
|
||||
smartAddText(td, getContext().getWorker().translator().translate("xhtml-gen-cs", "Deprecated", getContext().getLang()));
|
||||
smartAddText(td, formatMessage(RenderingContext.CODESYSTEM_DEPRECATED));
|
||||
hasExtensions = true;
|
||||
if (ToolingExtensions.hasExtension(c, ToolingExtensions.EXT_REPLACED_BY)) {
|
||||
Coding cc = (Coding) ToolingExtensions.getExtension(c, ToolingExtensions.EXT_REPLACED_BY).getValue();
|
||||
td.tx(" (replaced by ");
|
||||
td.tx(" "+/*!#*/"(replaced by ");
|
||||
String url = getCodingReference(cc, system);
|
||||
if (url != null) {
|
||||
td.ah(url).addText(cc.getCode());
|
||||
|
@ -606,9 +606,9 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (context.isCopyButton()) {
|
||||
td = tr.td();
|
||||
clipboard(td, "icon_clipboard_x.png", "XML", "<system value=\""+Utilities.escapeXml(cs.getUrl())+"\">\n"+(cs.getVersionNeeded() ? "<version value=\""+Utilities.escapeXml(cs.getVersion())+"\">\n" : "")+"<code value=\""+Utilities.escapeXml(c.getCode())+"\">\n<display value=\""+Utilities.escapeXml(c.getDisplay())+"\">\n");
|
||||
clipboard(td, "icon_clipboard_x.png", /*!#*/"XML", "<system value=\""+Utilities.escapeXml(cs.getUrl())+"\">\n"+(cs.getVersionNeeded() ? "<version value=\""+Utilities.escapeXml(cs.getVersion())+"\">\n" : "")+"<code value=\""+Utilities.escapeXml(c.getCode())+"\">\n<display value=\""+Utilities.escapeXml(c.getDisplay())+"\">\n");
|
||||
td.nbsp();
|
||||
clipboard(td, "icon_clipboard_j.png", "JSON", "\"system\" : \""+Utilities.escapeXml(cs.getUrl())+"\",\n"+(cs.getVersionNeeded() ? "\"version\" : \""+Utilities.escapeXml(cs.getVersion())+"\",\n" : "")+"\"code\" : \""+Utilities.escapeXml(c.getCode())+"\",\n\"display\" : \""+Utilities.escapeXml(c.getDisplay())+"\"\n");
|
||||
clipboard(td, "icon_clipboard_j.png", /*!#*/"JSON", "\"system\" : \""+Utilities.escapeXml(cs.getUrl())+"\",\n"+(cs.getVersionNeeded() ? "\"version\" : \""+Utilities.escapeXml(cs.getVersion())+"\",\n" : "")+"\"code\" : \""+Utilities.escapeXml(c.getCode())+"\",\n\"display\" : \""+Utilities.escapeXml(c.getDisplay())+"\"\n");
|
||||
}
|
||||
return hasExtensions;
|
||||
}
|
||||
|
|
|
@ -294,23 +294,23 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
}
|
||||
|
||||
XhtmlNode p = x.para();
|
||||
p.tx("Mapping from ");
|
||||
p.tx(/*!#*/"Mapping from ");
|
||||
if (cm.hasSourceScope())
|
||||
AddVsRef(cm.getSourceScope().primitiveValue(), p, cm);
|
||||
else
|
||||
p.tx("(not specified)");
|
||||
p.tx(" to ");
|
||||
p.tx(/*!#*/"(not specified)");
|
||||
p.tx(" "+/*!#*/"to ");
|
||||
if (cm.hasTargetScope())
|
||||
AddVsRef(cm.getTargetScope().primitiveValue(), p, cm);
|
||||
else
|
||||
p.tx("(not specified)");
|
||||
p.tx(/*!#*/"(not specified)");
|
||||
|
||||
p = x.para();
|
||||
if (cm.getExperimental())
|
||||
p.addText(Utilities.capitalize(cm.getStatus().toString())+" (not intended for production usage). ");
|
||||
p.addText(Utilities.capitalize(cm.getStatus().toString())+" "+/*!#*/"(not intended for production usage). ");
|
||||
else
|
||||
p.addText(Utilities.capitalize(cm.getStatus().toString())+". ");
|
||||
p.tx("Published on "+(cm.hasDate() ? display(cm.getDateElement()) : "?ngen-10?")+" by "+cm.getPublisher());
|
||||
p.tx(/*!#*/"Published on "+(cm.hasDate() ? display(cm.getDateElement()) : "?ngen-10?")+" by "+cm.getPublisher());
|
||||
if (!cm.getContact().isEmpty()) {
|
||||
p.tx(" (");
|
||||
boolean firsti = true;
|
||||
|
@ -380,18 +380,18 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
x.hr();
|
||||
}
|
||||
XhtmlNode pp = x.para();
|
||||
pp.b().tx("Group "+gc);
|
||||
pp.tx("Mapping from ");
|
||||
pp.b().tx(/*!#*/"Group "+gc);
|
||||
pp.tx(/*!#*/"Mapping from ");
|
||||
if (grp.hasSource()) {
|
||||
renderCanonical(cm, pp, grp.getSource());
|
||||
} else {
|
||||
pp.code("unspecified code system");
|
||||
pp.code(/*!#*/"unspecified code system");
|
||||
}
|
||||
pp.tx(" to ");
|
||||
if (grp.hasTarget()) {
|
||||
renderCanonical(cm, pp, grp.getTarget());
|
||||
} else {
|
||||
pp.code("unspecified code system");
|
||||
pp.code(/*!#*/"unspecified code system");
|
||||
}
|
||||
|
||||
String display;
|
||||
|
@ -399,11 +399,11 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
// simple
|
||||
XhtmlNode tbl = x.table( "grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx("Source Code");
|
||||
tr.td().b().tx("Relationship");
|
||||
tr.td().b().tx("Target Code");
|
||||
tr.td().b().tx(/*!#*/"Source Code");
|
||||
tr.td().b().tx(/*!#*/"Relationship");
|
||||
tr.td().b().tx(/*!#*/"Target Code");
|
||||
if (comment)
|
||||
tr.td().b().tx("Comment");
|
||||
tr.td().b().tx(/*!#*/"Comment");
|
||||
for (SourceElementComponent ccl : grp.getElement()) {
|
||||
tr = tbl.tr();
|
||||
XhtmlNode td = tr.td();
|
||||
|
@ -450,21 +450,21 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
XhtmlNode tbl = x.table( "grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
XhtmlNode td;
|
||||
tr.td().colspan(Integer.toString(1+sources.size())).b().tx("Source Concept Details");
|
||||
tr.td().colspan(Integer.toString(1+sources.size())).b().tx(/*!#*/"Source Concept Details");
|
||||
if (hasRelationships) {
|
||||
tr.td().b().tx("Relationship");
|
||||
tr.td().b().tx(/*!#*/"Relationship");
|
||||
}
|
||||
tr.td().colspan(Integer.toString(1+targets.size())).b().tx("Target Concept Details");
|
||||
tr.td().colspan(Integer.toString(1+targets.size())).b().tx(/*!#*/"Target Concept Details");
|
||||
if (comment) {
|
||||
tr.td().b().tx("Comment");
|
||||
tr.td().b().tx(/*!#*/"Comment");
|
||||
}
|
||||
tr.td().colspan(Integer.toString(1+targets.size())).b().tx("Properties");
|
||||
tr.td().colspan(Integer.toString(1+targets.size())).b().tx(/*!#*/"Properties");
|
||||
tr = tbl.tr();
|
||||
if (sources.get("code").size() == 1) {
|
||||
String url = sources.get("code").iterator().next();
|
||||
renderCSDetailsLink(tr, url, true);
|
||||
} else
|
||||
tr.td().b().tx("Code");
|
||||
tr.td().b().tx(/*!#*/"Code");
|
||||
for (String s : sources.keySet()) {
|
||||
if (s != null && !s.equals("code")) {
|
||||
if (sources.get(s).size() == 1) {
|
||||
|
@ -481,7 +481,7 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
String url = targets.get("code").iterator().next();
|
||||
renderCSDetailsLink(tr, url, true);
|
||||
} else
|
||||
tr.td().b().tx("Code");
|
||||
tr.td().b().tx(/*!#*/"Code");
|
||||
for (String s : targets.keySet()) {
|
||||
if (s != null && !s.equals("code")) {
|
||||
if (targets.get(s).size() == 1) {
|
||||
|
@ -678,8 +678,8 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
if (span2) {
|
||||
td.colspan("2");
|
||||
}
|
||||
td.b().tx("Codes");
|
||||
td.tx(" from ");
|
||||
td.b().tx(/*!#*/"Codes");
|
||||
td.tx(" "+/*!#*/"from ");
|
||||
if (cs == null)
|
||||
td.tx(url);
|
||||
else
|
||||
|
|
|
@ -181,7 +181,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
url = p.getUserString("filename");
|
||||
}
|
||||
} else {
|
||||
throw new DefinitionException("Unable to resolve markdown link "+link);
|
||||
throw new DefinitionException(/*!#*/"Unable to resolve markdown link "+link);
|
||||
}
|
||||
|
||||
text = left+"["+link+"]("+url+(path == null ? "" : "#"+path)+")"+right;
|
||||
|
@ -216,18 +216,18 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
private static String month(String m) {
|
||||
switch (m) {
|
||||
case "1" : return "Jan";
|
||||
case "2" : return "Feb";
|
||||
case "3" : return "Mar";
|
||||
case "4" : return "Apr";
|
||||
case "5" : return "May";
|
||||
case "6" : return "Jun";
|
||||
case "7" : return "Jul";
|
||||
case "8" : return "Aug";
|
||||
case "9" : return "Sep";
|
||||
case "10" : return "Oct";
|
||||
case "11" : return "Nov";
|
||||
case "12" : return "Dec";
|
||||
case "1" : return /*!#*/"Jan";
|
||||
case "2" : return /*!#*/"Feb";
|
||||
case "3" : return /*!#*/"Mar";
|
||||
case "4" : return/*!#*/ "Apr";
|
||||
case "5" : return /*!#*/"May";
|
||||
case "6" : return /*!#*/"Jun";
|
||||
case "7" : return /*!#*/"Jul";
|
||||
case "8" : return /*!#*/"Aug";
|
||||
case "9" : return /*!#*/"Sep";
|
||||
case "10" : return /*!#*/"Oct";
|
||||
case "11" : return /*!#*/"Nov";
|
||||
case "12" : return /*!#*/"Dec";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
@ -247,16 +247,16 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
ed = p[p.length-1];
|
||||
}
|
||||
switch (ed) {
|
||||
case "900000000000207008": return "Intl"+dt;
|
||||
case "731000124108": return "US"+dt;
|
||||
case "32506021000036107": return "AU"+dt;
|
||||
case "449081005": return "ES"+dt;
|
||||
case "554471000005108": return "DK"+dt;
|
||||
case "11000146104": return "NL"+dt;
|
||||
case "45991000052106": return "SE"+dt;
|
||||
case "999000041000000102": return "UK"+dt;
|
||||
case "20611000087101": return "CA"+dt;
|
||||
case "11000172109": return "BE"+dt;
|
||||
case "900000000000207008": return /*!#*/"Intl"+dt;
|
||||
case "731000124108": return /*!#*/"US"+dt;
|
||||
case "32506021000036107": return /*!#*/"AU"+dt;
|
||||
case "449081005": return /*!#*/"ES"+dt;
|
||||
case "554471000005108": return /*!#*/"DK"+dt;
|
||||
case "11000146104": return /*!#*/"NL"+dt;
|
||||
case "45991000052106": return /*!#*/"SE"+dt;
|
||||
case "999000041000000102": return /*!#*/"UK"+dt;
|
||||
case "20611000087101": return /*!#*/"CA"+dt;
|
||||
case "11000172109": return /*!#*/"BE"+dt;
|
||||
default: return "??"+dt;
|
||||
}
|
||||
} else {
|
||||
|
@ -266,51 +266,62 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
public static String describeSystem(String system) {
|
||||
if (system == null)
|
||||
return "[not stated]";
|
||||
return /*!#*/"[not stated]";
|
||||
if (system.equals("http://loinc.org"))
|
||||
return "LOINC";
|
||||
return /*!#*/"LOINC";
|
||||
if (system.startsWith("http://snomed.info"))
|
||||
return "SNOMED CT";
|
||||
return /*!#*/"SNOMED CT";
|
||||
if (system.equals("http://www.nlm.nih.gov/research/umls/rxnorm"))
|
||||
return "RxNorm";
|
||||
return /*!#*/"RxNorm";
|
||||
if (system.equals("http://hl7.org/fhir/sid/icd-9"))
|
||||
return "ICD-9";
|
||||
return /*!#*/"ICD-9";
|
||||
if (system.equals("http://dicom.nema.org/resources/ontology/DCM"))
|
||||
return "DICOM";
|
||||
return /*!#*/"DICOM";
|
||||
if (system.equals("http://unitsofmeasure.org"))
|
||||
return "UCUM";
|
||||
return /*!#*/"UCUM";
|
||||
|
||||
return system;
|
||||
}
|
||||
|
||||
public String displaySystem(String system) {
|
||||
if (system == null)
|
||||
return "[not stated]";
|
||||
return /*!#*/"[not stated]";
|
||||
if (system.equals("http://loinc.org"))
|
||||
return "LOINC";
|
||||
return /*!#*/"LOINC";
|
||||
if (system.startsWith("http://snomed.info"))
|
||||
return "SNOMED CT";
|
||||
return /*!#*/"SNOMED CT";
|
||||
if (system.equals("http://www.nlm.nih.gov/research/umls/rxnorm"))
|
||||
return "RxNorm";
|
||||
return /*!#*/"RxNorm";
|
||||
if (system.equals("http://hl7.org/fhir/sid/icd-9"))
|
||||
return "ICD-9";
|
||||
return /*!#*/"ICD-9";
|
||||
if (system.equals("http://dicom.nema.org/resources/ontology/DCM"))
|
||||
return "DICOM";
|
||||
return /*!#*/"DICOM";
|
||||
if (system.equals("http://unitsofmeasure.org"))
|
||||
return "UCUM";
|
||||
return /*!#*/"UCUM";
|
||||
|
||||
CodeSystem cs = context.getContext().fetchCodeSystem(system);
|
||||
if (cs != null) {
|
||||
return cs.present();
|
||||
return crPresent(cs);
|
||||
}
|
||||
return tails(system);
|
||||
}
|
||||
|
||||
private String crPresent(CanonicalResource cr) {
|
||||
if (cr.hasUserData("presentation")) {
|
||||
return cr.getUserString("presentation");
|
||||
}
|
||||
if (cr.hasTitle())
|
||||
return context.getTranslated(cr.getTitleElement());
|
||||
if (cr.hasName())
|
||||
return context.getTranslated(cr.getNameElement());
|
||||
return cr.toString();
|
||||
}
|
||||
|
||||
private String tails(String system) {
|
||||
if (system.contains("/")) {
|
||||
return system.substring(system.lastIndexOf("/")+1);
|
||||
} else {
|
||||
return "unknown";
|
||||
return /*!#*/"unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -330,7 +341,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (JurisdictionUtilities.isJurisdiction(system)) {
|
||||
return JurisdictionUtilities.displayJurisdiction(system+"#"+code);
|
||||
}
|
||||
ValidationResult t = getContext().getWorker().validateCode(getContext().getTerminologyServiceOptions().withVersionFlexible(true), system, version, code, null);
|
||||
ValidationResult t = getContext().getWorker().validateCode(getContext().getTerminologyServiceOptions().withLanguage(context.getLang()).withVersionFlexible(true), system, version, code, null);
|
||||
|
||||
if (t != null && t.getDisplay() != null)
|
||||
return t.getDisplay();
|
||||
|
@ -341,7 +352,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
protected String describeLang(String lang) {
|
||||
// special cases:
|
||||
if ("fr-CA".equals(lang)) {
|
||||
return "French (Canadian)"; // this one was omitted from the value set
|
||||
return /*!#*/"French (Canadian)"; // this one was omitted from the value set
|
||||
}
|
||||
ValueSet v = getContext().getWorker().findTxResource(ValueSet.class, "http://hl7.org/fhir/ValueSet/languages");
|
||||
if (v != null) {
|
||||
|
@ -408,12 +419,8 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
// -- 4. Language support ------------------------------------------------------
|
||||
|
||||
protected String translate(String source, String content) {
|
||||
return content;
|
||||
}
|
||||
|
||||
public String gt(@SuppressWarnings("rawtypes") PrimitiveType value) {
|
||||
return value.primitiveValue();
|
||||
return context.getTranslated(value);
|
||||
}
|
||||
|
||||
// -- 6. General purpose extension rendering ----------------------------------------------
|
||||
|
@ -441,7 +448,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (sd != null && ext.hasValue() && ext.getValue().isPrimitive() && sd.hasSnapshot()) {
|
||||
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
|
||||
if (Utilities.existsInList(ed.getPath(), "Extension", "Extension.value[x]") && ed.hasLabel()) {
|
||||
return ed.getLabel();
|
||||
return context.getTranslated(ed.getLabelElement());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -476,7 +483,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
} else {
|
||||
// somehow have to do better than this
|
||||
XhtmlNode li = ul.li();
|
||||
li.b().tx("WARNING: Unrenderable Modifier Extension!");
|
||||
li.b().tx(/*!#*/"WARNING: Unrenderable Modifier Extension!");
|
||||
}
|
||||
}
|
||||
for (Extension ext : element.getExtension()) {
|
||||
|
@ -526,7 +533,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
render(div, ext.getValue());
|
||||
} else {
|
||||
// somehow have to do better than this
|
||||
div.b().tx("WARNING: Unrenderable Modifier Extension!");
|
||||
div.b().tx(/*!#*/"WARNING: Unrenderable Modifier Extension!");
|
||||
}
|
||||
}
|
||||
for (Extension ext : element.getExtension()) {
|
||||
|
@ -557,7 +564,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (b instanceof DataType) {
|
||||
return display((DataType) b);
|
||||
} else {
|
||||
return "No display for "+b.fhirType();
|
||||
return /*!#*/"No display for "+b.fhirType();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -591,13 +598,13 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
} else if (type.isDateTime()) {
|
||||
return displayDateTime((BaseDateTimeType) type);
|
||||
} else if (type.isPrimitive()) {
|
||||
return type.primitiveValue();
|
||||
return context.getTranslated((PrimitiveType<?>) type);
|
||||
} else {
|
||||
return "No display for "+type.fhirType();
|
||||
return /*!#*/"No display for "+type.fhirType();
|
||||
}
|
||||
}
|
||||
|
||||
private String displayDateTime(BaseDateTimeType type) {
|
||||
protected String displayDateTime(BaseDateTimeType type) {
|
||||
if (!type.hasPrimitiveValue()) {
|
||||
return "";
|
||||
}
|
||||
|
@ -675,7 +682,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
|
||||
public String display(BaseWrapper type) {
|
||||
return "to do";
|
||||
return /*!#*/"to do";
|
||||
}
|
||||
|
||||
public void render(XhtmlNode x, BaseWrapper type) throws FHIRFormatError, DefinitionException, IOException {
|
||||
|
@ -683,13 +690,13 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
try {
|
||||
base = type.getBase();
|
||||
} catch (FHIRException | IOException e) {
|
||||
x.tx("Error: " + e.getMessage()); // this shouldn't happen - it's an error in the library itself
|
||||
x.tx(/*!#*/"Error: " + e.getMessage()); // this shouldn't happen - it's an error in the library itself
|
||||
return;
|
||||
}
|
||||
if (base instanceof DataType) {
|
||||
render(x, (DataType) base);
|
||||
} else {
|
||||
x.tx("to do: "+base.fhirType());
|
||||
x.tx(/*!#*/"to do: "+base.fhirType());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -697,7 +704,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (b instanceof DataType) {
|
||||
render(x, (DataType) b);
|
||||
} else {
|
||||
x.tx("No display for "+b.fhirType());
|
||||
x.tx(/*!#*/"No display for "+b.fhirType());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -744,20 +751,20 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
renderReference(x, cr.getReference());
|
||||
}
|
||||
} else if (type instanceof MarkdownType) {
|
||||
addMarkdown(x, ((MarkdownType) type).asStringValue());
|
||||
addMarkdown(x, context.getTranslated((MarkdownType) type));
|
||||
} else if (type instanceof Base64BinaryType) {
|
||||
Base64BinaryType b64 = (Base64BinaryType) type;
|
||||
x.tx("(base64 data - "+(b64.getValue() == null ? "0" : b64.getValue().length)+" bytes)");
|
||||
x.tx(/*!#*/"(base64 data - "+(b64.getValue() == null ? "0" : b64.getValue().length)+" bytes)");
|
||||
} else if (type.isPrimitive()) {
|
||||
x.tx(type.primitiveValue());
|
||||
x.tx(context.getTranslated((PrimitiveType<?>) type));
|
||||
} else {
|
||||
x.tx("No display for "+type.fhirType());
|
||||
x.tx(/*!#*/"No display for "+type.fhirType());
|
||||
}
|
||||
}
|
||||
|
||||
protected void renderReference(XhtmlNode x, Reference ref) {
|
||||
if (ref.hasDisplay()) {
|
||||
x.tx(ref.getDisplay());
|
||||
x.tx(context.getTranslated(ref.getDisplayElement()));
|
||||
} else if (ref.hasReference()) {
|
||||
x.tx(ref.getReference());
|
||||
} else {
|
||||
|
@ -791,7 +798,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
Resource r = context.getContext().fetchResource(Resource.class, uri.getValue());
|
||||
if (r != null && r.getWebPath() != null) {
|
||||
if (r instanceof CanonicalResource) {
|
||||
x.ah(r.getWebPath()).addText(((CanonicalResource) r).present());
|
||||
x.ah(r.getWebPath()).addText(crPresent((CanonicalResource) r));
|
||||
} else {
|
||||
x.ah(r.getWebPath()).addText(uri.getValue());
|
||||
}
|
||||
|
@ -815,7 +822,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
} else {
|
||||
Resource target = context.getContext().fetchResource(Resource.class, uri.getValue(), src);
|
||||
if (target != null && target.hasWebPath()) {
|
||||
String title = target instanceof CanonicalResource ? ((CanonicalResource) target).present() : uri.getValue();
|
||||
String title = target instanceof CanonicalResource ? crPresent((CanonicalResource) target) : uri.getValue();
|
||||
x.ah(target.getWebPath()).addText(title);
|
||||
} else if (uri.getValue().contains("|")) {
|
||||
x.ah(uri.getValue().substring(0, uri.getValue().indexOf("|"))).addText(uri.getValue());
|
||||
|
@ -835,7 +842,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
protected void renderAnnotation(XhtmlNode x, Annotation a, boolean showCodeDetails) throws FHIRException {
|
||||
StringBuilder b = new StringBuilder();
|
||||
if (a.hasText()) {
|
||||
b.append(a.getText());
|
||||
b.append(context.getTranslated(a.getTextElement()));
|
||||
}
|
||||
|
||||
if (a.hasText() && (a.hasAuthor() || a.hasTimeElement())) {
|
||||
|
@ -843,11 +850,11 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
|
||||
if (a.hasAuthor()) {
|
||||
b.append("By ");
|
||||
b.append(/*!#*/"By ");
|
||||
if (a.hasAuthorReference()) {
|
||||
b.append(a.getAuthorReference().getReference());
|
||||
} else if (a.hasAuthorStringType()) {
|
||||
b.append(a.getAuthorStringType().getValue());
|
||||
b.append(context.getTranslated(a.getAuthorStringType()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -869,7 +876,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
public String displayCoding(Coding c) {
|
||||
String s = "";
|
||||
if (context.isTechnicalMode()) {
|
||||
s = c.getDisplay();
|
||||
s = context.getTranslated(c.getDisplayElement());
|
||||
if (Utilities.noString(s)) {
|
||||
s = lookupCode(c.getSystem(), c.getVersion(), c.getCode());
|
||||
}
|
||||
|
@ -882,7 +889,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
} else {
|
||||
if (c.hasDisplayElement())
|
||||
return c.getDisplay();
|
||||
return context.getTranslated(c.getDisplayElement());
|
||||
if (Utilities.noString(s))
|
||||
s = lookupCode(c.getSystem(), c.getVersion(), c.getCode());
|
||||
if (Utilities.noString(s))
|
||||
|
@ -940,7 +947,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
pieces.add(gen.new Piece(null, name, c.getSystem()+(c.hasVersion() ? "#"+c.getVersion() : "")));
|
||||
}
|
||||
pieces.add(gen.new Piece(null, "#"+c.getCode(), null));
|
||||
String s = c.getDisplay();
|
||||
String s = context.getTranslated(c.getDisplayElement());
|
||||
if (Utilities.noString(s)) {
|
||||
s = lookupCode(c.getSystem(), c.getVersion(), c.getCode());
|
||||
}
|
||||
|
@ -1019,7 +1026,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
String hint;
|
||||
|
||||
if (c.hasDisplayElement())
|
||||
display = c.getDisplay();
|
||||
display = context.getTranslated(c.getDisplayElement());
|
||||
if (Utilities.noString(display))
|
||||
display = lookupCode(c.getSystem(), c.getVersion(), c.getCode());
|
||||
if (Utilities.noString(display)) {
|
||||
|
@ -1028,10 +1035,10 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
CodeSystem cs = context.getWorker().fetchCodeSystem(c.getSystem());
|
||||
systemLink = cs != null ? cs.getWebPath() : null;
|
||||
systemName = cs != null ? cs.present() : describeSystem(c.getSystem());
|
||||
systemName = cs != null ? crPresent(cs) : describeSystem(c.getSystem());
|
||||
link = getLinkForCode(c.getSystem(), c.getVersion(), c.getCode());
|
||||
|
||||
hint = systemName+": "+display+(c.hasVersion() ? " (version = "+c.getVersion()+")" : "");
|
||||
hint = systemName+": "+display+(c.hasVersion() ? " "+/*!#*/"(version = "+c.getVersion()+")" : "");
|
||||
return new CodeResolution(systemName, systemLink, link, display, hint);
|
||||
}
|
||||
|
||||
|
@ -1045,13 +1052,13 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
protected void renderCodingWithDetails(XhtmlNode x, Coding c) {
|
||||
String s = "";
|
||||
if (c.hasDisplayElement())
|
||||
s = c.getDisplay();
|
||||
s = context.getTranslated(c.getDisplayElement());
|
||||
if (Utilities.noString(s))
|
||||
s = lookupCode(c.getSystem(), c.getVersion(), c.getCode());
|
||||
|
||||
CodeSystem cs = context.getWorker().fetchCodeSystem(c.getSystem());
|
||||
|
||||
String sn = cs != null ? cs.present() : describeSystem(c.getSystem());
|
||||
String sn = cs != null ? crPresent(cs) : describeSystem(c.getSystem());
|
||||
String link = getLinkForCode(c.getSystem(), c.getVersion(), c.getCode());
|
||||
if (link != null) {
|
||||
x.ah(link).tx(sn);
|
||||
|
@ -1066,14 +1073,14 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
x.tx(s);
|
||||
}
|
||||
if (c.hasVersion()) {
|
||||
x.tx(" (version = "+c.getVersion()+")");
|
||||
x.tx(" "+/*!#*/"(version = "+c.getVersion()+")");
|
||||
}
|
||||
}
|
||||
|
||||
protected void renderCoding(XhtmlNode x, Coding c, boolean showCodeDetails) {
|
||||
String s = "";
|
||||
if (c.hasDisplayElement())
|
||||
s = c.getDisplay();
|
||||
s = context.getTranslated(c.getDisplayElement());
|
||||
if (Utilities.noString(s))
|
||||
s = lookupCode(c.getSystem(), c.getVersion(), c.getCode());
|
||||
|
||||
|
@ -1081,17 +1088,17 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
s = c.getCode();
|
||||
|
||||
if (showCodeDetails) {
|
||||
x.addText(s+" (Details: "+TerminologyRenderer.describeSystem(c.getSystem())+" code "+c.getCode()+" = '"+lookupCode(c.getSystem(), c.getVersion(), c.getCode())+"', stated as '"+c.getDisplay()+"')");
|
||||
x.addText(s+" "+/*!#*/"(Details: "+TerminologyRenderer.describeSystem(c.getSystem())+" code "+c.getCode()+" = '"+lookupCode(c.getSystem(), c.getVersion(), c.getCode())+"', stated as '"+c.getDisplay()+"')");
|
||||
} else
|
||||
x.span(null, "{"+c.getSystem()+" "+c.getCode()+"}").addText(s);
|
||||
}
|
||||
|
||||
public String displayCodeableConcept(CodeableConcept cc) {
|
||||
String s = cc.getText();
|
||||
String s = context.getTranslated(cc.getTextElement());
|
||||
if (Utilities.noString(s)) {
|
||||
for (Coding c : cc.getCoding()) {
|
||||
if (c.hasDisplayElement()) {
|
||||
s = c.getDisplay();
|
||||
s = context.getTranslated(c.getDisplayElement());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1134,11 +1141,11 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
return;
|
||||
}
|
||||
|
||||
String s = cc.getText();
|
||||
String s = context.getTranslated(cc.getTextElement());
|
||||
if (Utilities.noString(s)) {
|
||||
for (Coding c : cc.getCoding()) {
|
||||
if (c.hasDisplayElement()) {
|
||||
s = c.getDisplay();
|
||||
s = context.getTranslated(c.getDisplayElement());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1182,7 +1189,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
sp.tx("#"+c.getCode());
|
||||
}
|
||||
if (c.hasDisplay() && !s.equals(c.getDisplay())) {
|
||||
sp.tx(" \""+c.getDisplay()+"\"");
|
||||
sp.tx(" \""+context.getTranslated(c.getDisplayElement())+"\"");
|
||||
}
|
||||
}
|
||||
if (hasRenderableExtensions(cc)) {
|
||||
|
@ -1201,7 +1208,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
}
|
||||
|
||||
x.span(null, "Codes: "+b.toString()).addText(s);
|
||||
x.span(null, /*!#*/"Codes: "+b.toString()).addText(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1214,13 +1221,13 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
} else {
|
||||
NamingSystem ns = context.getContext().getNSUrlMap().get(ii.getSystem());
|
||||
if (ns != null) {
|
||||
s = ns.present()+"#"+s;
|
||||
s = crPresent(ns)+"#"+s;
|
||||
}
|
||||
if (ii.hasType()) {
|
||||
if (ii.getType().hasText())
|
||||
s = ii.getType().getText()+":\u00A0"+s;
|
||||
s = context.getTranslated(ii.getType().getTextElement())+":\u00A0"+s;
|
||||
else if (ii.getType().hasCoding() && ii.getType().getCoding().get(0).hasDisplay())
|
||||
s = ii.getType().getCoding().get(0).getDisplay()+": "+s;
|
||||
s = context.getTranslated(ii.getType().getCoding().get(0).getDisplayElement())+": "+s;
|
||||
else if (ii.getType().hasCoding() && ii.getType().getCoding().get(0).hasCode())
|
||||
s = lookupCode(ii.getType().getCoding().get(0).getSystem(), ii.getType().getCoding().get(0).getVersion(), ii.getType().getCoding().get(0).getCode())+": "+s;
|
||||
} else if (ii.hasSystem()) {
|
||||
|
@ -1231,7 +1238,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (ii.hasUse() || ii.hasPeriod()) {
|
||||
s = s + "\u00A0(";
|
||||
if (ii.hasUse()) {
|
||||
s = s + "use:\u00A0"+ii.getUse().toString();
|
||||
s = s + "use:\u00A0"+ii.getUse().toCode();
|
||||
}
|
||||
if (ii.hasUse() && ii.hasPeriod()) {
|
||||
s = s + ",\u00A0";
|
||||
|
@ -1247,9 +1254,9 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
protected void renderIdentifier(XhtmlNode x, Identifier ii) {
|
||||
if (ii.hasType()) {
|
||||
if (ii.getType().hasText()) {
|
||||
x.tx(ii.getType().getText());
|
||||
x.tx(context.getTranslated(ii.getType().getTextElement()));
|
||||
} else if (ii.getType().hasCoding() && ii.getType().getCoding().get(0).hasDisplay()) {
|
||||
x.tx(ii.getType().getCoding().get(0).getDisplay());
|
||||
x.tx(context.getTranslated(ii.getType().getCoding().get(0).getDisplayElement()));
|
||||
} else if (ii.getType().hasCoding() && ii.getType().getCoding().get(0).hasCode()) {
|
||||
x.tx(lookupCode(ii.getType().getCoding().get(0).getSystem(), ii.getType().getCoding().get(0).getVersion(), ii.getType().getCoding().get(0).getCode()));
|
||||
}
|
||||
|
@ -1258,14 +1265,14 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
NamingSystem ns = context.getContext().getNSUrlMap().get(ii.getSystem());
|
||||
if (ns != null) {
|
||||
if (ns.hasWebPath()) {
|
||||
x.ah(ns.getWebPath(), ns.getDescription()).tx(ns.present());
|
||||
x.ah(ns.getWebPath(), ns.getDescription()).tx(crPresent(ns));
|
||||
} else {
|
||||
x.tx(ns.present());
|
||||
x.tx(crPresent(ns));
|
||||
}
|
||||
} else {
|
||||
switch (ii.getSystem()) {
|
||||
case "urn:oid:2.51.1.3":
|
||||
x.ah("https://www.gs1.org/standards/id-keys/gln", "Global Location Number").tx("GLN");
|
||||
x.ah("https://www.gs1.org/standards/id-keys/gln", /*!#*/"Global Location Number").tx("GLN");
|
||||
break;
|
||||
default:
|
||||
x.code(ii.getSystem());
|
||||
|
@ -1279,16 +1286,16 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
x.nbsp();
|
||||
x.tx("(");
|
||||
if (ii.hasUse()) {
|
||||
x.tx("use:");
|
||||
x.tx(/*!#*/"use:");
|
||||
x.nbsp();
|
||||
x.tx(ii.getUse().toString());
|
||||
x.tx(ii.getUse().toCode());
|
||||
}
|
||||
if (ii.hasUse() && ii.hasPeriod()) {
|
||||
x.tx(",");
|
||||
x.nbsp();
|
||||
}
|
||||
if (ii.hasPeriod()) {
|
||||
x.tx("period:");
|
||||
x.tx(/*!#*/"period:");
|
||||
x.nbsp();
|
||||
x.tx(displayPeriod(ii.getPeriod()));
|
||||
}
|
||||
|
@ -1317,39 +1324,55 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
|
||||
protected void renderHumanName(XhtmlNode x, HumanName name) {
|
||||
x.addText(displayHumanName(name));
|
||||
StringBuilder s = new StringBuilder();
|
||||
if (name.hasText())
|
||||
s.append(context.getTranslated(name.getTextElement()));
|
||||
else {
|
||||
for (StringType p : name.getGiven()) {
|
||||
s.append(context.getTranslated(p));
|
||||
s.append(" ");
|
||||
}
|
||||
if (name.hasFamily()) {
|
||||
s.append(context.getTranslated(name.getFamilyElement()));
|
||||
s.append(" ");
|
||||
}
|
||||
}
|
||||
if (name.hasUse() && name.getUse() != NameUse.USUAL)
|
||||
s.append("("+name.getUse().toCode()+")");
|
||||
|
||||
x.addText(s.toString());
|
||||
}
|
||||
|
||||
private String displayAddress(Address address) {
|
||||
StringBuilder s = new StringBuilder();
|
||||
if (address.hasText())
|
||||
s.append(address.getText());
|
||||
s.append(context.getTranslated(address.getTextElement()));
|
||||
else {
|
||||
for (StringType p : address.getLine()) {
|
||||
s.append(p.getValue());
|
||||
s.append(context.getTranslated(p));
|
||||
s.append(" ");
|
||||
}
|
||||
if (address.hasCity()) {
|
||||
s.append(address.getCity());
|
||||
s.append(context.getTranslated(address.getCityElement()));
|
||||
s.append(" ");
|
||||
}
|
||||
if (address.hasState()) {
|
||||
s.append(address.getState());
|
||||
s.append(context.getTranslated(address.getStateElement()));
|
||||
s.append(" ");
|
||||
}
|
||||
|
||||
if (address.hasPostalCode()) {
|
||||
s.append(address.getPostalCode());
|
||||
s.append(context.getTranslated(address.getPostalCodeElement()));
|
||||
s.append(" ");
|
||||
}
|
||||
|
||||
if (address.hasCountry()) {
|
||||
s.append(address.getCountry());
|
||||
s.append(context.getTranslated(address.getCountryElement()));
|
||||
s.append(" ");
|
||||
}
|
||||
}
|
||||
if (address.hasUse())
|
||||
s.append("("+address.getUse().toString()+")");
|
||||
s.append("("+address.getUse().toCode()+")");
|
||||
return s.toString();
|
||||
}
|
||||
|
||||
|
@ -1411,7 +1434,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
c.code().tx(expr.getExpression());
|
||||
} else if (expr.hasReference()) {
|
||||
p.ah(expr.getReference()).tx("source");
|
||||
p.ah(expr.getReference()).tx(/*!#*/"source");
|
||||
}
|
||||
if (expr.hasName() || expr.hasDescription()) {
|
||||
p.tx("(");
|
||||
|
@ -1420,7 +1443,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
if (expr.hasDescription()) {
|
||||
p.tx("\"");
|
||||
p.tx(expr.getDescription());
|
||||
p.tx(context.getTranslated(expr.getDescriptionElement()));
|
||||
p.tx("\"");
|
||||
}
|
||||
p.tx(")");
|
||||
|
@ -1472,9 +1495,9 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
protected void displayContactPoint(XhtmlNode p, ContactPoint c) {
|
||||
if (c != null) {
|
||||
if (c.getSystem() == ContactPointSystem.PHONE) {
|
||||
p.tx("Phone: "+c.getValue());
|
||||
p.tx(/*!#*/"Phone: "+c.getValue());
|
||||
} else if (c.getSystem() == ContactPointSystem.FAX) {
|
||||
p.tx("Fax: "+c.getValue());
|
||||
p.tx(/*!#*/"Fax: "+c.getValue());
|
||||
} else if (c.getSystem() == ContactPointSystem.EMAIL) {
|
||||
p.tx(c.getValue());
|
||||
} else if (c.getSystem() == ContactPointSystem.URL) {
|
||||
|
@ -1489,11 +1512,11 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
protected void addTelecom(XhtmlNode p, ContactPoint c) {
|
||||
if (c.getSystem() == ContactPointSystem.PHONE) {
|
||||
p.tx("Phone: "+c.getValue());
|
||||
p.tx(/*!#*/"Phone: "+c.getValue());
|
||||
} else if (c.getSystem() == ContactPointSystem.FAX) {
|
||||
p.tx("Fax: "+c.getValue());
|
||||
p.tx(/*!#*/"Fax: "+c.getValue());
|
||||
} else if (c.getSystem() == ContactPointSystem.EMAIL) {
|
||||
p.ah( "mailto:"+c.getValue()).addText(c.getValue());
|
||||
p.ah("mailto:"+c.getValue()).addText(c.getValue());
|
||||
} else if (c.getSystem() == ContactPointSystem.URL) {
|
||||
if (c.getValue().length() > 30)
|
||||
p.ah(c.getValue()).addText(c.getValue().substring(0, 30)+"...");
|
||||
|
@ -1505,8 +1528,8 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (system == null)
|
||||
return "";
|
||||
switch (system) {
|
||||
case PHONE: return "ph: ";
|
||||
case FAX: return "fax: ";
|
||||
case PHONE: return /*!#*/"ph: ";
|
||||
case FAX: return /*!#*/"fax: ";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
|
@ -1532,10 +1555,10 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (q.hasComparator())
|
||||
x.addText(q.getComparator().toCode());
|
||||
if (q.hasValue()) {
|
||||
x.addText(q.getValue().toString());
|
||||
x.addText(context.getTranslated(q.getValueElement()));
|
||||
}
|
||||
if (q.hasUnit())
|
||||
x.tx(" "+q.getUnit());
|
||||
x.tx(" "+context.getTranslated(q.getUnitElement()));
|
||||
else if (q.hasCode() && q.hasSystem()) {
|
||||
// if there's a code there *shall* be a system, so if we've got one and not the other, things are invalid and we won't bother trying to render
|
||||
if (q.hasSystem() && q.getSystem().equals("http://unitsofmeasure.org"))
|
||||
|
@ -1544,7 +1567,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
x.tx("(unit "+q.getCode()+" from "+q.getSystem()+")");
|
||||
}
|
||||
if (showCodeDetails && q.hasCode()) {
|
||||
x.span("background: LightGoldenRodYellow", null).tx(" (Details: "+TerminologyRenderer.describeSystem(q.getSystem())+" code "+q.getCode()+" = '"+lookupCode(q.getSystem(), null, q.getCode())+"')");
|
||||
x.span("background: LightGoldenRodYellow", null).tx(" "+/*!#*/"(Details: "+TerminologyRenderer.describeSystem(q.getSystem())+" code "+q.getCode()+" = '"+lookupCode(q.getSystem(), null, q.getCode())+"')");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1588,13 +1611,13 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
public String displayPeriod(Period p) {
|
||||
String s = !p.hasStart() ? "(?)" : displayDateTime(p.getStartElement());
|
||||
s = s + " --> ";
|
||||
return s + (!p.hasEnd() ? "(ongoing)" : displayDateTime(p.getEndElement()));
|
||||
return s + (!p.hasEnd() ? /*!#*/"(ongoing)" : displayDateTime(p.getEndElement()));
|
||||
}
|
||||
|
||||
public void renderPeriod(XhtmlNode x, Period p) {
|
||||
x.addText(!p.hasStart() ? "??" : displayDateTime(p.getStartElement()));
|
||||
x.tx(" --> ");
|
||||
x.addText(!p.hasEnd() ? "(ongoing)" : displayDateTime(p.getEndElement()));
|
||||
x.addText(!p.hasEnd() ? /*!#*/"(ongoing)" : displayDateTime(p.getEndElement()));
|
||||
}
|
||||
|
||||
public void renderUsageContext(XhtmlNode x, UsageContext u) throws FHIRFormatError, DefinitionException, IOException {
|
||||
|
@ -1606,31 +1629,31 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
public void renderTriggerDefinition(XhtmlNode x, TriggerDefinition td) throws FHIRFormatError, DefinitionException, IOException {
|
||||
if (x.isPara()) {
|
||||
x.b().tx("Type");
|
||||
x.b().tx(/*!#*/"Type");
|
||||
x.tx(": ");
|
||||
x.tx(td.getType().getDisplay());
|
||||
|
||||
if (td.hasName()) {
|
||||
x.tx(", ");
|
||||
x.b().tx("Name");
|
||||
x.b().tx(/*!#*/"Name");
|
||||
x.tx(": ");
|
||||
x.tx(td.getType().getDisplay());
|
||||
x.tx(context.getTranslated(td.getNameElement()));
|
||||
}
|
||||
if (td.hasCode()) {
|
||||
x.tx(", ");
|
||||
x.b().tx("Code");
|
||||
x.b().tx(/*!#*/"Code");
|
||||
x.tx(": ");
|
||||
renderCodeableConcept(x, td.getCode());
|
||||
}
|
||||
if (td.hasTiming()) {
|
||||
x.tx(", ");
|
||||
x.b().tx("Timing");
|
||||
x.b().tx(/*!#*/"Timing");
|
||||
x.tx(": ");
|
||||
render(x, td.getTiming());
|
||||
}
|
||||
if (td.hasCondition()) {
|
||||
x.tx(", ");
|
||||
x.b().tx("Condition");
|
||||
x.b().tx(/*!#*/"Condition");
|
||||
x.tx(": ");
|
||||
renderExpression(x, td.getCondition());
|
||||
}
|
||||
|
@ -1638,27 +1661,27 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
XhtmlNode tbl = x.table("grid");
|
||||
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx("Type");
|
||||
tr.td().b().tx(/*!#*/"Type");
|
||||
tr.td().tx(td.getType().getDisplay());
|
||||
|
||||
if (td.hasName()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Name");
|
||||
tr.td().tx(td.getType().getDisplay());
|
||||
tr.td().b().tx(/*!#*/"Name");
|
||||
tr.td().tx(context.getTranslated(td.getNameElement()));
|
||||
}
|
||||
if (td.hasCode()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Code");
|
||||
tr.td().b().tx(/*!#*/"Code");
|
||||
renderCodeableConcept(tr.td(), td.getCode());
|
||||
}
|
||||
if (td.hasTiming()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Timing");
|
||||
tr.td().b().tx(/*!#*/"Timing");
|
||||
render(tr.td(), td.getTiming());
|
||||
}
|
||||
if (td.hasCondition()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx("Condition");
|
||||
tr.td().b().tx(/*!#*/"Condition");
|
||||
renderExpression(tr.td(), td.getCondition());
|
||||
}
|
||||
}
|
||||
|
@ -1668,7 +1691,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
XhtmlNode tbl = x.table("grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
XhtmlNode td = tr.td().colspan("2");
|
||||
td.b().tx("Type");
|
||||
td.b().tx(/*!#*/"Type");
|
||||
td.tx(": ");
|
||||
StructureDefinition sd = context.getWorker().fetchTypeDefinition(dr.getType().toCode());
|
||||
if (sd != null && sd.hasWebPath()) {
|
||||
|
@ -1683,7 +1706,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (first) first = false; else td.tx(" | ");
|
||||
sd = context.getWorker().fetchResource(StructureDefinition.class, p.getValue());
|
||||
if (sd != null && sd.hasWebPath()) {
|
||||
td.ah(sd.getWebPath()).tx(sd.present());
|
||||
td.ah(sd.getWebPath()).tx(crPresent(sd));
|
||||
} else {
|
||||
td.tx(p.asStringValue());
|
||||
}
|
||||
|
@ -1693,7 +1716,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (dr.hasSubject()) {
|
||||
tr = tbl.tr();
|
||||
td = tr.td().colspan("2");
|
||||
td.b().tx("Subject");
|
||||
td.b().tx(/*!#*/"Subject");
|
||||
if (dr.hasSubjectReference()) {
|
||||
renderReference(td, dr.getSubjectReference());
|
||||
} else {
|
||||
|
@ -1702,24 +1725,24 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
if (dr.hasCodeFilter() || dr.hasDateFilter()) {
|
||||
tr = tbl.tr().backgroundColor("#efefef");
|
||||
tr.td().tx("Filter");
|
||||
tr.td().tx("Value");
|
||||
tr.td().tx(/*!#*/"Filter");
|
||||
tr.td().tx(/*!#*/"Value");
|
||||
}
|
||||
for (DataRequirementCodeFilterComponent cf : dr.getCodeFilter()) {
|
||||
tr = tbl.tr();
|
||||
if (cf.hasPath()) {
|
||||
tr.td().tx(cf.getPath());
|
||||
} else {
|
||||
tr.td().tx("Search on " +cf.getSearchParam());
|
||||
tr.td().tx(/*!#*/"Search on " +cf.getSearchParam());
|
||||
}
|
||||
if (cf.hasValueSet()) {
|
||||
td = tr.td();
|
||||
td.tx("In ValueSet ");
|
||||
td.tx(/*!#*/"In ValueSet ");
|
||||
render(td, cf.getValueSetElement());
|
||||
} else {
|
||||
boolean first = true;
|
||||
td = tr.td();
|
||||
td.tx("One of these codes: ");
|
||||
td.tx(/*!#*/"One of these codes: ");
|
||||
for (Coding c : cf.getCode()) {
|
||||
if (first) first = false; else td.tx(", ");
|
||||
render(td, c);
|
||||
|
@ -1731,7 +1754,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (cf.hasPath()) {
|
||||
tr.td().tx(cf.getPath());
|
||||
} else {
|
||||
tr.td().tx("Search on " +cf.getSearchParam());
|
||||
tr.td().tx(/*!#*/"Search on " +cf.getSearchParam());
|
||||
}
|
||||
render(tr.td(), cf.getValue());
|
||||
}
|
||||
|
@ -1739,7 +1762,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
tr = tbl.tr();
|
||||
td = tr.td().colspan("2");
|
||||
if (dr.hasLimit()) {
|
||||
td.b().tx("Limit");
|
||||
td.b().tx(/*!#*/"Limit");
|
||||
td.tx(": ");
|
||||
td.tx(dr.getLimit());
|
||||
if (dr.hasSort()) {
|
||||
|
@ -1747,7 +1770,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
}
|
||||
if (dr.hasSort()) {
|
||||
td.b().tx("Sort");
|
||||
td.b().tx(/*!#*/"Sort");
|
||||
td.tx(": ");
|
||||
boolean first = true;
|
||||
for (DataRequirementSortComponent p : dr.getSort()) {
|
||||
|
@ -1763,7 +1786,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
private String displayTiming(Timing s) throws FHIRException {
|
||||
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
|
||||
if (s.hasCode())
|
||||
b.append("Code: "+displayCodeableConcept(s.getCode()));
|
||||
b.append(/*!#*/"Code: "+displayCodeableConcept(s.getCode()));
|
||||
|
||||
if (s.getEvent().size() > 0) {
|
||||
CommaSeparatedStringBuilder c = new CommaSeparatedStringBuilder();
|
||||
|
@ -1774,17 +1797,17 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
c.append("??");
|
||||
}
|
||||
}
|
||||
b.append("Events: "+ c.toString());
|
||||
b.append(/*!#*/"Events: "+ c.toString());
|
||||
}
|
||||
|
||||
if (s.hasRepeat()) {
|
||||
TimingRepeatComponent rep = s.getRepeat();
|
||||
if (rep.hasBoundsPeriod() && rep.getBoundsPeriod().hasStart())
|
||||
b.append("Starting "+displayDateTime(rep.getBoundsPeriod().getStartElement()));
|
||||
b.append(/*!#*/"Starting "+displayDateTime(rep.getBoundsPeriod().getStartElement()));
|
||||
if (rep.hasCount())
|
||||
b.append("Count "+Integer.toString(rep.getCount())+" times");
|
||||
b.append(/*!#*/"Count "+Integer.toString(rep.getCount())+" times");
|
||||
if (rep.hasDuration())
|
||||
b.append("Duration "+rep.getDuration().toPlainString()+displayTimeUnits(rep.getPeriodUnit()));
|
||||
b.append(/*!#*/"Duration "+rep.getDuration().toPlainString()+displayTimeUnits(rep.getPeriodUnit()));
|
||||
|
||||
if (rep.hasWhen()) {
|
||||
String st = "";
|
||||
|
@ -1797,14 +1820,14 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
} else {
|
||||
String st = "";
|
||||
if (!rep.hasFrequency() || (!rep.hasFrequencyMax() && rep.getFrequency() == 1) )
|
||||
st = "Once";
|
||||
st = /*!#*/"Once";
|
||||
else {
|
||||
st = Integer.toString(rep.getFrequency());
|
||||
if (rep.hasFrequencyMax())
|
||||
st = st + "-"+Integer.toString(rep.getFrequency());
|
||||
}
|
||||
if (rep.hasPeriod()) {
|
||||
st = st + " per "+rep.getPeriod().toPlainString();
|
||||
st = st + " "+/*!#*/"per "+rep.getPeriod().toPlainString();
|
||||
if (rep.hasPeriodMax())
|
||||
st = st + "-"+rep.getPeriodMax().toPlainString();
|
||||
st = st + " "+displayTimeUnits(rep.getPeriodUnit());
|
||||
|
@ -1812,7 +1835,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
b.append(st);
|
||||
}
|
||||
if (rep.hasBoundsPeriod() && rep.getBoundsPeriod().hasEnd())
|
||||
b.append("Until "+displayDateTime(rep.getBoundsPeriod().getEndElement()));
|
||||
b.append(/*!#*/"Until "+displayDateTime(rep.getBoundsPeriod().getEndElement()));
|
||||
}
|
||||
return b.toString();
|
||||
}
|
||||
|
@ -1828,20 +1851,20 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
private String displayEventCode(EventTiming when) {
|
||||
switch (when) {
|
||||
case C: return "at meals";
|
||||
case CD: return "at lunch";
|
||||
case CM: return "at breakfast";
|
||||
case CV: return "at dinner";
|
||||
case AC: return "before meals";
|
||||
case ACD: return "before lunch";
|
||||
case ACM: return "before breakfast";
|
||||
case ACV: return "before dinner";
|
||||
case HS: return "before sleeping";
|
||||
case PC: return "after meals";
|
||||
case PCD: return "after lunch";
|
||||
case PCM: return "after breakfast";
|
||||
case PCV: return "after dinner";
|
||||
case WAKE: return "after waking";
|
||||
case C: return /*!#*/"at meals";
|
||||
case CD: return /*!#*/"at lunch";
|
||||
case CM: return /*!#*/"at breakfast";
|
||||
case CV: return /*!#*/"at dinner";
|
||||
case AC: return /*!#*/"before meals";
|
||||
case ACD: return /*!#*/"before lunch";
|
||||
case ACM: return /*!#*/"before breakfast";
|
||||
case ACV: return /*!#*/"before dinner";
|
||||
case HS: return /*!#*/"before sleeping";
|
||||
case PC: return /*!#*/"after meals";
|
||||
case PCD: return /*!#*/"after lunch";
|
||||
case PCM: return /*!#*/"after breakfast";
|
||||
case PCV: return /*!#*/"after dinner";
|
||||
case WAKE: return /*!#*/"after waking";
|
||||
default: return "?ngen-6?";
|
||||
}
|
||||
}
|
||||
|
@ -1869,29 +1892,29 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
private String displaySampledData(SampledData s) {
|
||||
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
|
||||
if (s.hasOrigin())
|
||||
b.append("Origin: "+displayQuantity(s.getOrigin()));
|
||||
b.append(/*!#*/"Origin: "+displayQuantity(s.getOrigin()));
|
||||
|
||||
if (s.hasInterval()) {
|
||||
b.append("Interval: "+s.getInterval().toString());
|
||||
b.append(/*!#*/"Interval: "+s.getInterval().toString());
|
||||
|
||||
if (s.hasIntervalUnit())
|
||||
b.append(s.getIntervalUnit().toString());
|
||||
}
|
||||
|
||||
if (s.hasFactor())
|
||||
b.append("Factor: "+s.getFactor().toString());
|
||||
b.append(/*!#*/"Factor: "+s.getFactor().toString());
|
||||
|
||||
if (s.hasLowerLimit())
|
||||
b.append("Lower: "+s.getLowerLimit().toString());
|
||||
b.append(/*!#*/"Lower: "+s.getLowerLimit().toString());
|
||||
|
||||
if (s.hasUpperLimit())
|
||||
b.append("Upper: "+s.getUpperLimit().toString());
|
||||
b.append(/*!#*/"Upper: "+s.getUpperLimit().toString());
|
||||
|
||||
if (s.hasDimensions())
|
||||
b.append("Dimensions: "+s.getDimensions());
|
||||
b.append(/*!#*/"Dimensions: "+s.getDimensions());
|
||||
|
||||
if (s.hasData())
|
||||
b.append("Data: "+s.getData());
|
||||
b.append(/*!#*/"Data: "+s.getData());
|
||||
|
||||
return b.toString();
|
||||
}
|
||||
|
@ -1909,7 +1932,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
XhtmlNode xn;
|
||||
xn = new XhtmlNode(NodeType.Element, "div");
|
||||
XhtmlNode p = xn.para();
|
||||
p.b().tx("Exception "+function+": "+e.getMessage());
|
||||
p.b().tx(/*!#*/"Exception "+function+": "+e.getMessage());
|
||||
p.addComment(getStackTrace(e));
|
||||
return xn;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
XhtmlNode tr;
|
||||
if (dr.has("subject")) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx("Subject");
|
||||
tr.td().tx(/*!#*/"Subject");
|
||||
populateSubjectSummary(tr.td(), getProperty(dr, "subject").value());
|
||||
}
|
||||
|
||||
|
@ -71,13 +71,13 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
|
||||
if (dr.has("effective[x]")) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx("When For");
|
||||
tr.td().tx(/*!#*/"When For");
|
||||
eff = (DataType) getProperty(dr, "effective[x]").value().getBase();
|
||||
render(tr.td(), eff);
|
||||
}
|
||||
if (dr.has("issued")) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx("Reported");
|
||||
tr.td().tx(/*!#*/"Reported");
|
||||
eff = (DataType) getProperty(dr, "issued").value().getBase();
|
||||
render(tr.td(), getProperty(dr, "issued").value());
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
pw = getProperty(dr, "perfomer");
|
||||
if (valued(pw)) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx(Utilities.pluralize("Performer", pw.getValues().size()));
|
||||
tr.td().tx(Utilities.pluralize(/*!#*/"Performer", pw.getValues().size()));
|
||||
XhtmlNode tdr = tr.td();
|
||||
for (BaseWrapper v : pw.getValues()) {
|
||||
tdr.tx(" ");
|
||||
|
@ -95,7 +95,7 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
pw = getProperty(dr, "identifier");
|
||||
if (valued(pw)) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx(Utilities.pluralize("Identifier", pw.getValues().size())+":");
|
||||
tr.td().tx(Utilities.pluralize(/*!#*/"Identifier", pw.getValues().size())+":");
|
||||
XhtmlNode tdr = tr.td();
|
||||
for (BaseWrapper v : pw.getValues()) {
|
||||
tdr.tx(" ");
|
||||
|
@ -105,7 +105,7 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
pw = getProperty(dr, "request");
|
||||
if (valued(pw)) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx(Utilities.pluralize("Request", pw.getValues().size())+":");
|
||||
tr.td().tx(Utilities.pluralize(/*!#*/"Request", pw.getValues().size())+":");
|
||||
XhtmlNode tdr = tr.td();
|
||||
for (BaseWrapper v : pw.getValues()) {
|
||||
tdr.tx(" ");
|
||||
|
@ -115,7 +115,7 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
|
||||
x.para().b().tx("Report Details");
|
||||
x.para().b().tx(/*!#*/"Report Details");
|
||||
|
||||
pw = getProperty(dr, "result");
|
||||
if (valued(pw)) {
|
||||
|
@ -138,7 +138,7 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (valued(pw)) {
|
||||
XhtmlNode p = x.para();
|
||||
p.b().tx("Coded Conclusions :");
|
||||
p.b().tx(/*!#*/"Coded Conclusions :");
|
||||
XhtmlNode ul = x.ul();
|
||||
for (BaseWrapper v : pw.getValues()) {
|
||||
render(ul.li(), v);
|
||||
|
@ -174,11 +174,11 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
private void populateSubjectSummary(XhtmlNode container, BaseWrapper subject) throws UnsupportedEncodingException, FHIRException, IOException, EOperationOutcome {
|
||||
ResourceWrapper r = fetchResource(subject);
|
||||
if (r == null)
|
||||
container.tx("Unable to get Patient Details");
|
||||
container.tx(/*!#*/"Unable to get Patient Details");
|
||||
else if (r.getName().equals("Patient"))
|
||||
generatePatientSummary(container, r);
|
||||
else
|
||||
container.tx("Not done yet");
|
||||
container.tx(/*!#*/"Not done yet");
|
||||
}
|
||||
|
||||
private void generatePatientSummary(XhtmlNode c, ResourceWrapper r) throws FHIRFormatError, DefinitionException, FHIRException, IOException, EOperationOutcome {
|
||||
|
@ -218,22 +218,22 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
if (issued) cs++;
|
||||
if (effectiveTime) cs++;
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx("Code");
|
||||
tr.td().b().tx("Value");
|
||||
tr.td().b().tx(/*!#*/"Code");
|
||||
tr.td().b().tx(/*!#*/"Value");
|
||||
if (refRange) {
|
||||
tr.td().b().tx("Reference Range");
|
||||
tr.td().b().tx(/*!#*/"Reference Range");
|
||||
}
|
||||
if (flags) {
|
||||
tr.td().b().tx("Flags");
|
||||
tr.td().b().tx(/*!#*/"Flags");
|
||||
}
|
||||
if (note) {
|
||||
tr.td().b().tx("Note");
|
||||
tr.td().b().tx(/*!#*/"Note");
|
||||
}
|
||||
if (effectiveTime) {
|
||||
tr.td().b().tx("When For");
|
||||
tr.td().b().tx(/*!#*/"When For");
|
||||
}
|
||||
if (issued) {
|
||||
tr.td().b().tx("Reported");
|
||||
tr.td().b().tx(/*!#*/"Reported");
|
||||
}
|
||||
for (ObservationNode o : observations) {
|
||||
addObservationToTable(tbl, o, 0, Integer.toString(cs), refRange, flags, note, effectiveTime, issued, eff, iss);
|
||||
|
@ -340,13 +340,13 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
XhtmlNode tr = tbl.tr();
|
||||
if (o.obs != null && o.obs.getReference() == null) {
|
||||
XhtmlNode td = tr.td().colspan(cs);
|
||||
td.i().tx("This Observation could not be resolved");
|
||||
td.i().tx(/*!#*/"This Observation could not be resolved");
|
||||
} else {
|
||||
if (o.obs != null && o.obs.getResource() != null) {
|
||||
addObservationToTable(tr, o.obs.getResource(), i, o.obs.getReference(), refRange, flags, note, effectiveTime, issued, eff, iss);
|
||||
} else {
|
||||
XhtmlNode td = tr.td().colspan(cs);
|
||||
td.i().tx("Observation");
|
||||
td.i().tx(/*!#*/"Observation");
|
||||
}
|
||||
if (o.contained != null) {
|
||||
for (ObservationNode c : o.contained) {
|
||||
|
@ -380,7 +380,7 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
pw = getProperty(obs, "dataAbsentReason");
|
||||
if (valued(pw)) {
|
||||
XhtmlNode span = td.span("color: maroon", "Error");
|
||||
span.tx("Error: ");
|
||||
span.tx(/*!#*/"Error: ");
|
||||
render(span.b(), pw.value());
|
||||
}
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
PropertyWrapper pwrA = getProperty(v, "age");
|
||||
if (valued(pwr) || valued(pwrA)) {
|
||||
boolean firstA = true;
|
||||
td.tx(" for ");
|
||||
td.tx(" "+/*!#*/"for ");
|
||||
if (valued(pwr)) {
|
||||
for (BaseWrapper va : pwr.getValues()) {
|
||||
if (firstA) firstA = false; else td.tx(", ");
|
||||
|
@ -430,7 +430,7 @@ public class DiagnosticReportRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (valued(pwrA)) {
|
||||
if (firstA) firstA = false; else td.tx(", ");
|
||||
td.tx("Age ");
|
||||
td.tx(/*!#*/"Age ");
|
||||
render(td, pwrA.value());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,11 +43,11 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
case PROCESSES:
|
||||
return renderProcesses(x, scen);
|
||||
default:
|
||||
throw new FHIRException("Unknown ExampleScenario Renderer Mode " + context.getScenarioMode());
|
||||
throw new FHIRException(/*!#*/"Unknown ExampleScenario Renderer Mode " + context.getScenarioMode());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new FHIRException("Error rendering ExampleScenario " + scen.getUrl(), e);
|
||||
throw new FHIRException(/*!#*/"Error rendering ExampleScenario " + scen.getUrl(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
for (ExampleScenarioProcessStepComponent step: process.getStep()) {
|
||||
plantUml += toPlantUml(step, stepPrefix(prefix, step, stepCount), scen, actorsActive, actorKeys);
|
||||
if (step.getPause())
|
||||
plantUml += "... time passes ...\n";
|
||||
plantUml += /*!#*/"... time passes ...\n";
|
||||
stepCount++;
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
XhtmlNode n = new XhtmlDocument();
|
||||
renderCanonical(scen, n, step.getWorkflow());
|
||||
XhtmlNode ref = n.getChildNodes().get(0);
|
||||
plantUml += noteOver(scen.getActor(), "Step " + trimPrefix(prefix) + " - See scenario\n" + creolLink(ref.getContent(), ref.getAttribute("href")));
|
||||
plantUml += noteOver(scen.getActor(), /*!#*/"Step " + trimPrefix(prefix) + " - See scenario\n" + creolLink(ref.getContent(), ref.getAttribute("href")));
|
||||
} else if (step.hasProcess())
|
||||
plantUml += toPlantUml(step.getProcess(), prefix, scen, actorKeys);
|
||||
else {
|
||||
|
@ -211,9 +211,9 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
public boolean renderActors(XhtmlNode x, ExampleScenario scen) throws IOException {
|
||||
XhtmlNode tbl = x.table("table-striped table-bordered");
|
||||
XhtmlNode thead = tbl.tr();
|
||||
thead.th().addText("Name");
|
||||
thead.th().addText("Type");
|
||||
thead.th().addText("Description");
|
||||
thead.th().addText(/*!#*/"Name");
|
||||
thead.th().addText(/*!#*/"Type");
|
||||
thead.th().addText(/*!#*/"Description");
|
||||
for (ExampleScenarioActorComponent actor : scen.getActor()) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
XhtmlNode nameCell = tr.td();
|
||||
|
@ -228,10 +228,10 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
public boolean renderInstances(XhtmlNode x, ExampleScenario scen) throws IOException {
|
||||
XhtmlNode tbl = x.table("table-striped table-bordered");
|
||||
XhtmlNode thead = tbl.tr();
|
||||
thead.th().addText("Name");
|
||||
thead.th().addText("Type");
|
||||
thead.th().addText("Content");
|
||||
thead.th().addText("Description");
|
||||
thead.th().addText(/*!#*/"Name");
|
||||
thead.th().addText(/*!#*/"Type");
|
||||
thead.th().addText(/*!#*/"Content");
|
||||
thead.th().addText(/*!#*/"Description");
|
||||
|
||||
Map<String, String> instanceNames = new HashMap<String, String>();
|
||||
for (ExampleScenarioInstanceComponent instance : scen.getInstance()) {
|
||||
|
@ -254,7 +254,7 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
|
||||
if (!instance.hasStructureVersion() || instance.getStructureType().getSystem().equals("")) {
|
||||
if (instance.hasStructureVersion())
|
||||
typeCell.tx("FHIR version " + instance.getStructureVersion() + " ");
|
||||
typeCell.tx(/*!#*/"FHIR version " + instance.getStructureVersion() + " ");
|
||||
if (instance.hasStructureProfile()) {
|
||||
renderCanonical(scen, typeCell, instance.getStructureProfile().toString());
|
||||
} else {
|
||||
|
@ -262,7 +262,7 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
}
|
||||
} else {
|
||||
render(typeCell, instance.getStructureVersionElement());
|
||||
typeCell.tx(" version " + instance.getStructureVersion());
|
||||
typeCell.tx(" "+/*!#*/"version " + instance.getStructureVersion());
|
||||
if (instance.hasStructureProfile()) {
|
||||
typeCell.tx(" ");
|
||||
renderCanonical(scen, typeCell, instance.getStructureProfile().toString());
|
||||
|
@ -280,7 +280,7 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
XhtmlNode descCell = row.td();
|
||||
addMarkdown(descCell, instance.getDescription());
|
||||
if (instance.hasContainedInstance()) {
|
||||
descCell.b().tx("Contains: ");
|
||||
descCell.b().tx(/*!#*/"Contains: ");
|
||||
int containedCount = 1;
|
||||
for (ExampleScenarioInstanceContainedInstanceComponent contained: instance.getContainedInstance()) {
|
||||
String key = "i_" + contained.getInstanceReference();
|
||||
|
@ -341,26 +341,26 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
public void renderProcess(XhtmlNode x, ExampleScenarioProcessComponent process, String prefix, Map<String, ExampleScenarioActorComponent> actors, Map<String, ExampleScenarioInstanceComponent> instances) throws IOException {
|
||||
XhtmlNode div = x.div();
|
||||
div.an("p_" + prefix);
|
||||
div.b().tx("Process: " + process.getTitle());
|
||||
div.b().tx(/*!#*/"Process: " + process.getTitle());
|
||||
if (process.hasDescription())
|
||||
addMarkdown(div, process.getDescription());
|
||||
if (process.hasPreConditions()) {
|
||||
div.para().b().i().tx("Pre-conditions:");
|
||||
div.para().b().i().tx(/*!#*/"Pre-conditions:");
|
||||
addMarkdown(div, process.getPreConditions());
|
||||
}
|
||||
if (process.hasPostConditions()) {
|
||||
div.para().b().i().tx("Post-conditions:");
|
||||
div.para().b().i().tx(/*!#*/"Post-conditions:");
|
||||
addMarkdown(div, process.getPostConditions());
|
||||
}
|
||||
XhtmlNode tbl = div.table("table-striped table-bordered").style("width:100%");
|
||||
XhtmlNode thead = tbl.tr();
|
||||
thead.th().addText("Step");
|
||||
thead.th().addText("Name");
|
||||
thead.th().addText("Description");
|
||||
thead.th().addText("Initator");
|
||||
thead.th().addText("Receiver");
|
||||
thead.th().addText("Request");
|
||||
thead.th().addText("Response");
|
||||
thead.th().addText(/*!#*/"Step");
|
||||
thead.th().addText(/*!#*/"Name");
|
||||
thead.th().addText(/*!#*/"Description");
|
||||
thead.th().addText(/*!#*/"Initator");
|
||||
thead.th().addText(/*!#*/"Receiver");
|
||||
thead.th().addText(/*!#*/"Request");
|
||||
thead.th().addText(/*!#*/"Response");
|
||||
int stepCount = 1;
|
||||
for (ExampleScenarioProcessStepComponent step: process.getStep()) {
|
||||
renderStep(tbl, step, stepPrefix(prefix, step, stepCount), actors, instances);
|
||||
|
@ -407,13 +407,13 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
prefixCell.tx(stepLabel.substring(stepLabel.indexOf(".") + 1));
|
||||
if (step.hasProcess()) {
|
||||
XhtmlNode n = row.td().colspan(6);
|
||||
n.tx("See subprocess" );
|
||||
n.tx(/*!#*/"See subprocess" );
|
||||
n.ah("#p_" + stepLabel, step.getProcess().getTitle());
|
||||
n.tx(" below");
|
||||
n.tx(" "+/*!#*/"below");
|
||||
|
||||
} else if (step.hasWorkflow()) {
|
||||
XhtmlNode n = row.td().colspan(6);
|
||||
n.tx("See other scenario ");
|
||||
n.tx(/*!#*/"See other scenario ");
|
||||
String link = new ContextUtilities(context.getWorker()).getLinkForUrl(context.getLink(KnownLinkType.SPEC), step.getWorkflow());
|
||||
n.ah(link, step.getProcess().getTitle());
|
||||
|
||||
|
@ -438,7 +438,7 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
int altNum = 1;
|
||||
for (ExampleScenarioProcessStepAlternativeComponent alt : step.getAlternative()) {
|
||||
XhtmlNode altHeading = tbl.tr().colspan(7).td();
|
||||
altHeading.para().i().tx("Alternative " + alt.getTitle());
|
||||
altHeading.para().i().tx(/*!#*/"Alternative " + alt.getTitle());
|
||||
if (alt.hasDescription())
|
||||
addMarkdown(altHeading, alt.getDescription());
|
||||
int stepCount = 1;
|
||||
|
@ -458,7 +458,7 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
return;
|
||||
ExampleScenarioActorComponent actor = actors.get(actorId);
|
||||
if (actor==null)
|
||||
throw new FHIRException("Unable to find referenced actor " + actorId);
|
||||
throw new FHIRException(/*!#*/"Unable to find referenced actor " + actorId);
|
||||
actorCell.ah("#a_" + actor.getKey(), actor.getDescription()).tx(actor.getTitle());
|
||||
}
|
||||
|
||||
|
@ -468,7 +468,7 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
return;
|
||||
ExampleScenarioInstanceComponent instance = instances.get(instanceRef.getInstanceReference());
|
||||
if (instance==null)
|
||||
throw new FHIRException("Unable to find referenced instance " + instanceRef.getInstanceReference());
|
||||
throw new FHIRException(/*!#*/"Unable to find referenced instance " + instanceRef.getInstanceReference());
|
||||
if (instanceRef.hasVersionReference()) {
|
||||
ExampleScenarioInstanceVersionComponent theVersion = null;
|
||||
for (ExampleScenarioInstanceVersionComponent version: instance.getVersion()) {
|
||||
|
@ -478,7 +478,7 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
}
|
||||
}
|
||||
if (theVersion==null)
|
||||
throw new FHIRException("Unable to find referenced version " + instanceRef.getVersionReference() + " within instance " + instanceRef.getInstanceReference());
|
||||
throw new FHIRException(/*!#*/"Unable to find referenced version " + instanceRef.getVersionReference() + " within instance " + instanceRef.getInstanceReference());
|
||||
instanceCell.ah("#i_" + instance.getKey() + "v_"+ theVersion.getKey() , theVersion.getDescription()).tx(theVersion.getTitle());
|
||||
|
||||
} else
|
||||
|
|
|
@ -28,7 +28,7 @@ public class ImplementationGuideRenderer extends ResourceRenderer {
|
|||
|
||||
public boolean render(XhtmlNode x, ImplementationGuide ig) throws FHIRFormatError, DefinitionException, IOException {
|
||||
x.h2().addText(ig.getName());
|
||||
x.para().tx("The official URL for this implementation guide is: ");
|
||||
x.para().tx(/*!#*/"The official URL for this implementation guide is: ");
|
||||
x.pre().tx(ig.getUrl());
|
||||
addMarkdown(x, ig.getDescription());
|
||||
return true;
|
||||
|
|
|
@ -49,32 +49,32 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
boolean email = hasCT(authors, "email") || hasCT(editors, "email") || hasCT(reviewers, "email") || hasCT(endorsers, "email");
|
||||
boolean phone = hasCT(authors, "phone") || hasCT(editors, "phone") || hasCT(reviewers, "phone") || hasCT(endorsers, "phone");
|
||||
boolean url = hasCT(authors, "url") || hasCT(editors, "url") || hasCT(reviewers, "url") || hasCT(endorsers, "url");
|
||||
x.h2().tx("Participants");
|
||||
x.h2().tx(/*!#*/"Participants");
|
||||
XhtmlNode t = x.table("grid");
|
||||
if (authors != null) {
|
||||
for (BaseWrapper cd : authors.getValues()) {
|
||||
participantRow(t, "Author", cd, email, phone, url);
|
||||
participantRow(t, /*!#*/"Author", cd, email, phone, url);
|
||||
}
|
||||
}
|
||||
if (authors != null) {
|
||||
for (BaseWrapper cd : editors.getValues()) {
|
||||
participantRow(t, "Editor", cd, email, phone, url);
|
||||
participantRow(t, /*!#*/"Editor", cd, email, phone, url);
|
||||
}
|
||||
}
|
||||
if (authors != null) {
|
||||
for (BaseWrapper cd : reviewers.getValues()) {
|
||||
participantRow(t, "Reviewer", cd, email, phone, url);
|
||||
participantRow(t, /*!#*/"Reviewer", cd, email, phone, url);
|
||||
}
|
||||
}
|
||||
if (authors != null) {
|
||||
for (BaseWrapper cd : endorsers.getValues()) {
|
||||
participantRow(t, "Endorser", cd, email, phone, url);
|
||||
participantRow(t, /*!#*/"Endorser", cd, email, phone, url);
|
||||
}
|
||||
}
|
||||
}
|
||||
PropertyWrapper artifacts = lib.getChildByName("relatedArtifact");
|
||||
if (artifacts != null && artifacts.hasValues()) {
|
||||
x.h2().tx("Related Artifacts");
|
||||
x.h2().tx(/*!#*/"Related Artifacts");
|
||||
XhtmlNode t = x.table("grid");
|
||||
boolean label = false;
|
||||
boolean display = false;
|
||||
|
@ -90,7 +90,7 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
}
|
||||
PropertyWrapper parameters = lib.getChildByName("parameter");
|
||||
if (parameters != null && parameters.hasValues()) {
|
||||
x.h2().tx("Parameters");
|
||||
x.h2().tx(/*!#*/"Parameters");
|
||||
XhtmlNode t = x.table("grid");
|
||||
boolean doco = false;
|
||||
for (BaseWrapper p : parameters.getValues()) {
|
||||
|
@ -102,14 +102,14 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
}
|
||||
PropertyWrapper dataRequirements = lib.getChildByName("dataRequirement");
|
||||
if (dataRequirements != null && dataRequirements.hasValues()) {
|
||||
x.h2().tx("Data Requirements");
|
||||
x.h2().tx(/*!#*/"Data Requirements");
|
||||
for (BaseWrapper p : dataRequirements.getValues()) {
|
||||
renderDataRequirement(x, (DataRequirement) p.getBase());
|
||||
}
|
||||
}
|
||||
PropertyWrapper contents = lib.getChildByName("content");
|
||||
if (contents != null) {
|
||||
x.h2().tx("Contents");
|
||||
x.h2().tx(/*!#*/"Contents");
|
||||
boolean isCql = false;
|
||||
int counter = 0;
|
||||
for (BaseWrapper p : contents.getValues()) {
|
||||
|
@ -151,23 +151,23 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
boolean email = hasCT(lib.getAuthor(), "email") || hasCT(lib.getEditor(), "email") || hasCT(lib.getReviewer(), "email") || hasCT(lib.getEndorser(), "email");
|
||||
boolean phone = hasCT(lib.getAuthor(), "phone") || hasCT(lib.getEditor(), "phone") || hasCT(lib.getReviewer(), "phone") || hasCT(lib.getEndorser(), "phone");
|
||||
boolean url = hasCT(lib.getAuthor(), "url") || hasCT(lib.getEditor(), "url") || hasCT(lib.getReviewer(), "url") || hasCT(lib.getEndorser(), "url");
|
||||
x.h2().tx("Participants");
|
||||
x.h2().tx(/*!#*/"Participants");
|
||||
XhtmlNode t = x.table("grid");
|
||||
for (ContactDetail cd : lib.getAuthor()) {
|
||||
participantRow(t, "Author", cd, email, phone, url);
|
||||
participantRow(t, /*!#*/"Author", cd, email, phone, url);
|
||||
}
|
||||
for (ContactDetail cd : lib.getEditor()) {
|
||||
participantRow(t, "Editor", cd, email, phone, url);
|
||||
participantRow(t, /*!#*/"Editor", cd, email, phone, url);
|
||||
}
|
||||
for (ContactDetail cd : lib.getReviewer()) {
|
||||
participantRow(t, "Reviewer", cd, email, phone, url);
|
||||
participantRow(t, /*!#*/"Reviewer", cd, email, phone, url);
|
||||
}
|
||||
for (ContactDetail cd : lib.getEndorser()) {
|
||||
participantRow(t, "Endorser", cd, email, phone, url);
|
||||
participantRow(t, /*!#*/"Endorser", cd, email, phone, url);
|
||||
}
|
||||
}
|
||||
if (lib.hasRelatedArtifact()) {
|
||||
x.h2().tx("Related Artifacts");
|
||||
x.h2().tx(/*!#*/"Related Artifacts");
|
||||
XhtmlNode t = x.table("grid");
|
||||
boolean label = false;
|
||||
boolean display = false;
|
||||
|
@ -182,7 +182,7 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (lib.hasParameter()) {
|
||||
x.h2().tx("Parameters");
|
||||
x.h2().tx(/*!#*/"Parameters");
|
||||
XhtmlNode t = x.table("grid");
|
||||
boolean doco = false;
|
||||
for (ParameterDefinition p : lib.getParameter()) {
|
||||
|
@ -193,13 +193,13 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (lib.hasDataRequirement()) {
|
||||
x.h2().tx("Data Requirements");
|
||||
x.h2().tx(/*!#*/"Data Requirements");
|
||||
for (DataRequirement p : lib.getDataRequirement()) {
|
||||
renderDataRequirement(x, p);
|
||||
}
|
||||
}
|
||||
if (lib.hasContent()) {
|
||||
x.h2().tx("Contents");
|
||||
x.h2().tx(/*!#*/"Contents");
|
||||
boolean isCql = false;
|
||||
int counter = 0;
|
||||
for (Attachment att : lib.getContent()) {
|
||||
|
@ -356,7 +356,7 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
p.tx(att.getTitle());
|
||||
p.tx(": ");
|
||||
}
|
||||
p.code().tx("No Content");
|
||||
p.code().tx(/*!#*/"No Content");
|
||||
p.tx(" (");
|
||||
p.code().tx(att.getContentType());
|
||||
p.tx(lang(att));
|
||||
|
@ -405,10 +405,10 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
p.tx(att.getTitle());
|
||||
p.tx(": ");
|
||||
}
|
||||
p.code().tx("Content not shown - (");
|
||||
p.code().tx(/*!#*/"Content not shown - (");
|
||||
p.code().tx(att.getContentType());
|
||||
p.tx(lang(att));
|
||||
p.tx(", size = "+Utilities.describeSize(att.getData().length)+")");
|
||||
p.tx(/*!#*/", size = "+Utilities.describeSize(att.getData().length)+")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,33 +40,33 @@ public class ListRenderer extends ResourceRenderer {
|
|||
XhtmlNode tr = t.tr();
|
||||
XhtmlNode td = tr.td();
|
||||
if (list.has("date")) {
|
||||
td.tx("Date: "+list.get("date").dateTimeValue().toHumanDisplay());
|
||||
}
|
||||
td.tx(/*!#*/"Date: "+displayDateTime(list.get("date").dateTimeValue()));
|
||||
}
|
||||
if (list.has("mode")) {
|
||||
td.tx("Mode: "+list.get("mode").primitiveValue());
|
||||
td.tx(/*!#*/"Mode: "+list.get("mode").primitiveValue());
|
||||
}
|
||||
if (list.has("status")) {
|
||||
td.tx("Status: "+list.get("status").primitiveValue());
|
||||
td.tx(/*!#*/"Status: "+list.get("status").primitiveValue());
|
||||
}
|
||||
if (list.has("code")) {
|
||||
td.tx("Code: "+displayBase(list.get("code")));
|
||||
td.tx(/*!#*/"Code: "+displayBase(list.get("code")));
|
||||
}
|
||||
tr = t.tr();
|
||||
td = tr.td();
|
||||
if (list.has("subject")) {
|
||||
td.tx("Subject: ");
|
||||
td.tx(/*!#*/"Subject: ");
|
||||
shortForRef(td, list.get("subject"));
|
||||
}
|
||||
if (list.has("encounter")) {
|
||||
td.tx("Encounter: ");
|
||||
td.tx(/*!#*/"Encounter: ");
|
||||
shortForRef(td, list.get("encounter"));
|
||||
}
|
||||
if (list.has("source")) {
|
||||
td.tx("Source: ");
|
||||
td.tx(/*!#*/"Source: ");
|
||||
shortForRef(td, list.get("encounter"));
|
||||
}
|
||||
if (list.has("orderedBy")) {
|
||||
td.tx("Order: "+displayBase(list.get("orderedBy")));
|
||||
td.tx(/*!#*/"Order: "+displayBase(list.get("orderedBy")));
|
||||
}
|
||||
// for (Annotation a : list.getNote()) {
|
||||
// renderAnnotation(a, x);
|
||||
|
@ -81,15 +81,15 @@ public class ListRenderer extends ResourceRenderer {
|
|||
}
|
||||
t = x.table("grid");
|
||||
tr = t.tr().style("backgound-color: #eeeeee");
|
||||
tr.td().b().tx("Items");
|
||||
tr.td().b().tx(/*!#*/"Items");
|
||||
if (date) {
|
||||
tr.td().tx("Date");
|
||||
tr.td().tx(/*!#*/"Date");
|
||||
}
|
||||
if (flag) {
|
||||
tr.td().tx("Flag");
|
||||
tr.td().tx(/*!#*/"Flag");
|
||||
}
|
||||
if (deleted) {
|
||||
tr.td().tx("Deleted");
|
||||
tr.td().tx(/*!#*/"Deleted");
|
||||
}
|
||||
for (BaseWrapper e : list.children("entry")) {
|
||||
tr = t.tr();
|
||||
|
@ -113,16 +113,16 @@ public class ListRenderer extends ResourceRenderer {
|
|||
XhtmlNode t = x.table("clstu");
|
||||
XhtmlNode tr = t.tr();
|
||||
if (list.hasDate()) {
|
||||
tr.td().tx("Date: "+list.getDate().toLocaleString());
|
||||
tr.td().tx(/*!#*/"Date: "+displayDateTime(list.getDateElement()));
|
||||
}
|
||||
if (list.hasMode()) {
|
||||
tr.td().tx("Mode: "+list.getMode().getDisplay());
|
||||
tr.td().tx(/*!#*/"Mode: "+list.getMode().getDisplay());
|
||||
}
|
||||
if (list.hasStatus()) {
|
||||
tr.td().tx("Status: "+list.getStatus().getDisplay());
|
||||
tr.td().tx(/*!#*/"Status: "+list.getStatus().getDisplay());
|
||||
}
|
||||
if (list.hasCode()) {
|
||||
tr.td().tx("Code: "+display(list.getCode()));
|
||||
tr.td().tx(/*!#*/"Code: "+display(list.getCode()));
|
||||
}
|
||||
tr = t.tr();
|
||||
if (list.hasSubject()) {
|
||||
|
@ -130,7 +130,7 @@ public class ListRenderer extends ResourceRenderer {
|
|||
shortForRef(tr.td().txN("Subject: "), list.getSubjectFirstRep());
|
||||
} else {
|
||||
XhtmlNode td = tr.td();
|
||||
td.txN("Subject: ");
|
||||
td.txN(/*!#*/"Subject: ");
|
||||
int i = 0;
|
||||
for (Reference subj : list.getSubject()) {
|
||||
if (i == list.getSubject().size() - 1) {
|
||||
|
@ -143,13 +143,13 @@ public class ListRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (list.hasEncounter()) {
|
||||
shortForRef(tr.td().txN("Encounter: "), list.getEncounter());
|
||||
shortForRef(tr.td().txN(/*!#*/"Encounter: "), list.getEncounter());
|
||||
}
|
||||
if (list.hasSource()) {
|
||||
shortForRef(tr.td().txN("Source: "), list.getEncounter());
|
||||
shortForRef(tr.td().txN(/*!#*/"Source: "), list.getEncounter());
|
||||
}
|
||||
if (list.hasOrderedBy()) {
|
||||
tr.td().tx("Order: "+display(list.getOrderedBy()));
|
||||
tr.td().tx(/*!#*/"Order: "+display(list.getOrderedBy()));
|
||||
}
|
||||
for (Annotation a : list.getNote()) {
|
||||
renderAnnotation(x, a);
|
||||
|
@ -164,15 +164,15 @@ public class ListRenderer extends ResourceRenderer {
|
|||
}
|
||||
t = x.table("grid");
|
||||
tr = t.tr().style("backgound-color: #eeeeee");
|
||||
tr.td().b().tx("Items");
|
||||
tr.td().b().tx(/*!#*/"Items");
|
||||
if (date) {
|
||||
tr.td().tx("Date");
|
||||
tr.td().tx(/*!#*/"Date");
|
||||
}
|
||||
if (flag) {
|
||||
tr.td().tx("Flag");
|
||||
tr.td().tx(/*!#*/"Flag");
|
||||
}
|
||||
if (deleted) {
|
||||
tr.td().tx("Deleted");
|
||||
tr.td().tx(/*!#*/"Deleted");
|
||||
}
|
||||
for (ListResourceEntryComponent e : list.getEntry()) {
|
||||
tr = t.tr();
|
||||
|
@ -212,8 +212,8 @@ public class ListRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
private void shortForRef(XhtmlNode x, Reference ref) throws UnsupportedEncodingException, IOException {
|
||||
ResourceWithReference r = context.getResolver().resolve(context, ref.getReference());
|
||||
if (r == null) {
|
||||
ResourceWithReference r = context.getResolver() == null ? null : context.getResolver().resolve(context, ref.getReference());
|
||||
if (r == null) {
|
||||
x.tx(display(ref));
|
||||
} else {
|
||||
RendererFactory.factory(r.getResource().getName(), context).renderReference(r.getResource(), x, ref);
|
||||
|
|
|
@ -30,33 +30,33 @@ public class NamingSystemRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
public boolean render(XhtmlNode x, NamingSystem ns) throws FHIRFormatError, DefinitionException, IOException {
|
||||
x.h3().tx("Summary");
|
||||
x.h3().tx(/*!#*/"Summary");
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
row(tbl, "Defining URL", ns.getUrl());
|
||||
row(tbl, /*!#*/"Defining URL", ns.getUrl());
|
||||
if (ns.hasVersion()) {
|
||||
row(tbl, "Version", ns.getVersion());
|
||||
row(tbl, /*!#*/"Version", ns.getVersion());
|
||||
}
|
||||
if (ns.hasName()) {
|
||||
row(tbl, "Name", gt(ns.getNameElement()));
|
||||
row(tbl, /*!#*/"Name", gt(ns.getNameElement()));
|
||||
}
|
||||
if (ns.hasTitle()) {
|
||||
row(tbl, "Title", gt(ns.getTitleElement()));
|
||||
row(tbl, /*!#*/"Title", gt(ns.getTitleElement()));
|
||||
}
|
||||
row(tbl, "Status", ns.getStatus().toCode());
|
||||
row(tbl, /*!#*/"Status", ns.getStatus().toCode());
|
||||
if (ns.hasDescription()) {
|
||||
addMarkdown(row(tbl, "Definition"), ns.getDescription());
|
||||
addMarkdown(row(tbl, /*!#*/"Definition"), ns.getDescription());
|
||||
}
|
||||
if (ns.hasPublisher()) {
|
||||
row(tbl, "Publisher", gt(ns.getPublisherElement()));
|
||||
row(tbl, /*!#*/"Publisher", gt(ns.getPublisherElement()));
|
||||
}
|
||||
if (ns.hasExtension(ToolingExtensions.EXT_WORKGROUP)) {
|
||||
renderCommitteeLink(row(tbl, "Committee"), ns);
|
||||
}
|
||||
if (CodeSystemUtilities.hasOID(ns)) {
|
||||
row(tbl, "OID", CodeSystemUtilities.getOID(ns)).tx("("+translate("ns.summary", "for OID based terminology systems")+")");
|
||||
row(tbl, /*!#*/"OID", CodeSystemUtilities.getOID(ns)).tx("("+(/*!#*/"for OID based terminology systems")+")");
|
||||
}
|
||||
if (ns.hasCopyright()) {
|
||||
addMarkdown(row(tbl, "Copyright"), ns.getCopyright());
|
||||
addMarkdown(row(tbl, /*!#*/"Copyright"), ns.getCopyright());
|
||||
}
|
||||
boolean hasPreferred = false;
|
||||
boolean hasPeriod = false;
|
||||
|
@ -66,19 +66,19 @@ public class NamingSystemRenderer extends ResourceRenderer {
|
|||
hasPeriod = hasPeriod || id.hasPeriod();
|
||||
hasComment = hasComment || id.hasComment();
|
||||
}
|
||||
x.h3().tx("Identifiers");
|
||||
x.h3().tx(/*!#*/"Identifiers");
|
||||
tbl = x.table("grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx(translate("ns.summary", "Type"));
|
||||
tr.td().b().tx(translate("ns.summary", "Value"));
|
||||
tr.td().b().tx((/*!#*/"Type"));
|
||||
tr.td().b().tx((/*!#*/"Value"));
|
||||
if (hasPreferred) {
|
||||
tr.td().b().tx(translate("ns.summary", "Preferred"));
|
||||
tr.td().b().tx((/*!#*/"Preferred"));
|
||||
}
|
||||
if (hasPeriod) {
|
||||
tr.td().b().tx(translate("ns.summary", "Period"));
|
||||
tr.td().b().tx((/*!#*/"Period"));
|
||||
}
|
||||
if (hasComment) {
|
||||
tr.td().b().tx(translate("ns.summary", "Comment"));
|
||||
tr.td().b().tx((/*!#*/"Comment"));
|
||||
}
|
||||
for (NamingSystemUniqueIdComponent id : ns.getUniqueId()) {
|
||||
tr = tbl.tr();
|
||||
|
@ -100,7 +100,7 @@ public class NamingSystemRenderer extends ResourceRenderer {
|
|||
private XhtmlNode row(XhtmlNode tbl, String name) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
XhtmlNode td = tr.td();
|
||||
td.tx(translate("ns.summary", name));
|
||||
td.tx((name));
|
||||
return tr.td();
|
||||
}
|
||||
private XhtmlNode row(XhtmlNode tbl, String name, String value) {
|
||||
|
|
|
@ -353,21 +353,21 @@ public class ObligationsRenderer {
|
|||
|
||||
XhtmlNode tr = new XhtmlNode(NodeType.Element, "tr");
|
||||
children.add(tr);
|
||||
tr.td().style("font-size: 11px").b().tx("Obligations");
|
||||
tr.td().style("font-size: 11px").b().tx(/*!#*/"Obligations");
|
||||
if (actor) {
|
||||
tr.td().style("font-size: 11px").tx("Actor");
|
||||
tr.td().style("font-size: 11px").tx(/*!#*/"Actor");
|
||||
}
|
||||
if (elementId) {
|
||||
tr.td().style("font-size: 11px").tx("Elements");
|
||||
tr.td().style("font-size: 11px").tx(/*!#*/"Elements");
|
||||
}
|
||||
if (usage) {
|
||||
tr.td().style("font-size: 11px").tx("Usage");
|
||||
tr.td().style("font-size: 11px").tx(/*!#*/"Usage");
|
||||
}
|
||||
if (doco) {
|
||||
tr.td().style("font-size: 11px").tx("Documentation");
|
||||
tr.td().style("font-size: 11px").tx(/*!#*/"Documentation");
|
||||
}
|
||||
if (filter) {
|
||||
tr.td().style("font-size: 11px").tx("Filter");
|
||||
tr.td().style("font-size: 11px").tx(/*!#*/"Filter");
|
||||
}
|
||||
for (ObligationDetail ob : obligations) {
|
||||
tr = new XhtmlNode(NodeType.Element, "tr");
|
||||
|
|
|
@ -44,22 +44,22 @@ public class OperationDefinitionRenderer extends TerminologyRenderer {
|
|||
if (context.isHeader()) {
|
||||
x.h2().addText(opd.getName());
|
||||
x.para().addText(Utilities.capitalize(opd.getKind().toString())+": "+opd.getName());
|
||||
x.para().tx("The official URL for this operation definition is: ");
|
||||
x.para().tx(/*!#*/"The official URL for this operation definition is: ");
|
||||
x.pre().tx(opd.getUrl());
|
||||
addMarkdown(x, opd.getDescription());}
|
||||
|
||||
if (opd.getSystem())
|
||||
x.para().tx("URL: [base]/$"+opd.getCode());
|
||||
x.para().tx(/*!#*/"URL: [base]/$"+opd.getCode());
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> c : opd.getResource()) {
|
||||
if (opd.getType())
|
||||
x.para().tx("URL: [base]/"+c.getCode()+"/$"+opd.getCode());
|
||||
x.para().tx(/*!#*/"URL: [base]/"+c.getCode()+"/$"+opd.getCode());
|
||||
if (opd.getInstance())
|
||||
x.para().tx("URL: [base]/"+c.getCode()+"/[id]/$"+opd.getCode());
|
||||
x.para().tx(/*!#*/"URL: [base]/"+c.getCode()+"/[id]/$"+opd.getCode());
|
||||
}
|
||||
|
||||
if (opd.hasInputProfile()) {
|
||||
XhtmlNode p = x.para();
|
||||
p.tx("Input parameters Profile: ");
|
||||
p.tx(/*!#*/"Input parameters Profile: ");
|
||||
StructureDefinition sd = context.getContext().fetchResource(StructureDefinition.class, opd.getInputProfile(), opd);
|
||||
if (sd == null) {
|
||||
p.pre().tx(opd.getInputProfile());
|
||||
|
@ -69,7 +69,7 @@ public class OperationDefinitionRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (opd.hasOutputProfile()) {
|
||||
XhtmlNode p = x.para();
|
||||
p.tx("Output parameters Profile: ");
|
||||
p.tx(/*!#*/"Output parameters Profile: ");
|
||||
StructureDefinition sd = context.getContext().fetchResource(StructureDefinition.class, opd.getOutputProfile(), opd);
|
||||
if (sd == null) {
|
||||
p.pre().tx(opd.getOutputProfile());
|
||||
|
@ -77,16 +77,16 @@ public class OperationDefinitionRenderer extends TerminologyRenderer {
|
|||
p.ah(sd.getWebPath()).tx(sd.present());
|
||||
}
|
||||
}
|
||||
x.para().tx("Parameters");
|
||||
x.para().tx(/*!#*/"Parameters");
|
||||
XhtmlNode tbl = x.table( "grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx("Use");
|
||||
tr.td().b().tx("Name");
|
||||
tr.td().b().tx("Scope");
|
||||
tr.td().b().tx("Cardinality");
|
||||
tr.td().b().tx("Type");
|
||||
tr.td().b().tx("Binding");
|
||||
tr.td().b().tx("Documentation");
|
||||
tr.td().b().tx(/*!#*/"Use");
|
||||
tr.td().b().tx(/*!#*/"Name");
|
||||
tr.td().b().tx(/*!#*/"Scope");
|
||||
tr.td().b().tx(/*!#*/"Cardinality");
|
||||
tr.td().b().tx(/*!#*/"Type");
|
||||
tr.td().b().tx(/*!#*/"Binding");
|
||||
tr.td().b().tx(/*!#*/"Documentation");
|
||||
for (OperationDefinitionParameterComponent p : opd.getParameter()) {
|
||||
genOpParam(tbl, "", p, opd);
|
||||
}
|
||||
|
|
|
@ -41,17 +41,17 @@ public class OperationOutcomeRenderer extends ResourceRenderer {
|
|||
hasSource = hasSource || ExtensionHelper.hasExtension(i, ToolingExtensions.EXT_ISSUE_SOURCE);
|
||||
}
|
||||
if (success)
|
||||
x.para().tx("All OK");
|
||||
x.para().tx(/*!#*/"All OK");
|
||||
if (op.getIssue().size() > 0) {
|
||||
XhtmlNode tbl = x.table("grid"); // on the basis that we'll most likely be rendered using the standard fhir css, but it doesn't really matter
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx("Severity");
|
||||
tr.td().b().tx("Location");
|
||||
tr.td().b().tx("Code");
|
||||
tr.td().b().tx("Details");
|
||||
tr.td().b().tx("Diagnostics");
|
||||
tr.td().b().tx(/*!#*/"Severity");
|
||||
tr.td().b().tx(/*!#*/"Location");
|
||||
tr.td().b().tx(/*!#*/"Code");
|
||||
tr.td().b().tx(/*!#*/"Details");
|
||||
tr.td().b().tx(/*!#*/"Diagnostics");
|
||||
if (hasSource)
|
||||
tr.td().b().tx("Source");
|
||||
tr.td().b().tx(/*!#*/"Source");
|
||||
for (OperationOutcomeIssueComponent i : op.getIssue()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().addText(i.getSeverity().toString());
|
||||
|
@ -82,12 +82,12 @@ public class OperationOutcomeRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
public String display(OperationOutcome oo) {
|
||||
return "todo";
|
||||
return /*!#*/"todo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String display(ResourceWrapper r) throws UnsupportedEncodingException, IOException {
|
||||
return "Not done yet";
|
||||
return /*!#*/"Not done yet";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,10 +28,16 @@ public class ParametersRenderer extends ResourceRenderer {
|
|||
public ParametersRenderer(RenderingContext context, ResourceContext rcontext) {
|
||||
super(context, rcontext);
|
||||
}
|
||||
|
||||
|
||||
public ParametersRenderer setMultiLangMode(boolean multiLangMode) {
|
||||
this.multiLangMode = multiLangMode;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean render(XhtmlNode x, Resource r) throws FHIRFormatError, DefinitionException, IOException, FHIRException, EOperationOutcome {
|
||||
x.h2().tx("Parameters");
|
||||
x.h2().tx(/*!#*/"Parameters");
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
params(tbl, ((Parameters) r).getParameter(), 0);
|
||||
return false;
|
||||
|
@ -49,7 +55,7 @@ public class ParametersRenderer extends ResourceRenderer {
|
|||
|
||||
@Override
|
||||
public boolean render(XhtmlNode x, ResourceWrapper params) throws FHIRFormatError, DefinitionException, IOException, FHIRException, EOperationOutcome {
|
||||
x.h2().tx("Parameters");
|
||||
x.h2().tx(/*!#*/"Parameters");
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
PropertyWrapper pw = getProperty(params, "parameter");
|
||||
if (valued(pw)) {
|
||||
|
@ -95,7 +101,7 @@ public class ParametersRenderer extends ResourceRenderer {
|
|||
|
||||
public XhtmlNode render(Parameters params) throws FHIRFormatError, DefinitionException, IOException, FHIRException, EOperationOutcome {
|
||||
XhtmlNode div = new XhtmlNode(NodeType.Element, "div");
|
||||
div.h2().tx("Parameters");
|
||||
div.h2().tx(/*!#*/"Parameters");
|
||||
XhtmlNode tbl = div.table("grid");
|
||||
params(tbl, params.getParameter(), 0);
|
||||
return div;
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.hl7.fhir.r5.model.Identifier;
|
|||
import org.hl7.fhir.r5.model.Identifier.IdentifierUse;
|
||||
import org.hl7.fhir.r5.model.Patient;
|
||||
import org.hl7.fhir.r5.model.Period;
|
||||
import org.hl7.fhir.r5.model.PrimitiveType;
|
||||
import org.hl7.fhir.r5.model.Reference;
|
||||
import org.hl7.fhir.r5.model.Resource;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
|
@ -185,7 +186,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
String gender = null;
|
||||
pw = getProperty(pat, "gender");
|
||||
if (valued(pw)) {
|
||||
pw.value().getBase().primitiveValue();
|
||||
gender = pw.value().getBase().primitiveValue();
|
||||
}
|
||||
DateType dt = null;
|
||||
pw = getProperty(pat, "birthDate");
|
||||
|
@ -209,7 +210,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
String gender = null;
|
||||
pw = getProperty(pat, "gender");
|
||||
if (valued(pw)) {
|
||||
gender = pw.value().getBase().primitiveValue();
|
||||
gender = context.getTranslated((PrimitiveType<?>) pw.value().getBase());
|
||||
}
|
||||
DateType dt = null;
|
||||
pw = getProperty(pat, "birthDate");
|
||||
|
@ -222,18 +223,22 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
|
||||
private String display(HumanName name, String gender, DateType dob, Identifier id) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(display(name));
|
||||
if (name == null) {
|
||||
b.append(display(name));
|
||||
} else {
|
||||
b.append(context.formatMessage(RenderingContext.PAT_NO_NAME));
|
||||
}
|
||||
b.append(" ");
|
||||
if (dob == null) {
|
||||
b.append("(no stated gender)");
|
||||
b.append(context.formatMessage(RenderingContext.PAT_NO_GENDER));
|
||||
} else {
|
||||
b.append(gender);
|
||||
}
|
||||
b.append(", ");
|
||||
if (dob == null) {
|
||||
b.append("DoB Unknown");
|
||||
b.append(context.formatMessage(RenderingContext.PAT_NO_DOB));
|
||||
} else {
|
||||
b.append("DoB: "+display(dob));
|
||||
b.append(context.formatMessage(RenderingContext.PAT_DOB, display(dob)));
|
||||
}
|
||||
if (id != null) {
|
||||
b.append(" ( ");
|
||||
|
@ -245,22 +250,21 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
|
||||
public void describe(XhtmlNode x, HumanName name, String gender, DateType dob, Identifier id) throws UnsupportedEncodingException, IOException {
|
||||
if (name == null) {
|
||||
x.b().tx("Anonymous Patient"); // todo: is this appropriate?
|
||||
x.b().tx(context.formatMessage(RenderingContext.PAT_NO_NAME)); // todo: is this appropriate?
|
||||
} else {
|
||||
render(x.b(), name);
|
||||
}
|
||||
x.tx(" ");
|
||||
if (gender == null) {
|
||||
x.tx("(no stated gender)");
|
||||
x.tx(context.formatMessage(RenderingContext.PAT_NO_GENDER));
|
||||
} else {
|
||||
x.tx(gender);
|
||||
}
|
||||
x.tx(", ");
|
||||
if (dob == null) {
|
||||
x.tx("DoB Unknown");
|
||||
x.tx(context.formatMessage(RenderingContext.PAT_NO_DOB));
|
||||
} else {
|
||||
x.tx("DoB: ");
|
||||
render(x, dob);
|
||||
x.tx(context.formatMessage(RenderingContext.PAT_DOB, display(dob)));
|
||||
}
|
||||
if (id != null) {
|
||||
x.tx(" ( ");
|
||||
|
@ -298,7 +302,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (r.has("contained") && context.isTechnicalMode()) {
|
||||
x.hr();
|
||||
x.para().b().tx("Contained Resources");
|
||||
x.para().b().tx(context.formatMessagePlural(r.getContained().size(), RenderingContext.PAT_CONTAINED));
|
||||
addContained(x, r.getContained());
|
||||
}
|
||||
return false;
|
||||
|
@ -390,20 +394,18 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
if (id != null) {
|
||||
ids.remove(id);
|
||||
};
|
||||
if (ids.size() == 1) {
|
||||
if (ids.size() > 0) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, "Other Id:", "Other Ids (see the one above)");
|
||||
nameCell(tr, context.formatMessagePlural(ids.size(), RenderingContext.PAT_OTHER_ID),context.formatMessagePlural(ids.size(), RenderingContext.PAT_OTHER_ID_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
render(r, td, ids.get(0));
|
||||
} else if (ids.size() > 1) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, "Other Ids:", "Other Ids (see the one above)");
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
XhtmlNode ul = td.ul();
|
||||
for (Identifier i : ids) {
|
||||
render(r, ul.li(), i);
|
||||
if (ids.size() == 1) {
|
||||
render(r, td, ids.get(0));
|
||||
} else {
|
||||
XhtmlNode ul = td.ul();
|
||||
for (Identifier i : ids) {
|
||||
render(r, ul.li(), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -423,44 +425,41 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (langs.size() == 1) {
|
||||
if (langs.size() > 0) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, "Language:", "Languages spoken");
|
||||
nameCell(tr, context.formatMessagePlural(langs.size(), RenderingContext.PAT_LANG), context.formatMessagePlural(langs.size(), RenderingContext.PAT_LANG_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
render(r, td, langs.get(0));
|
||||
if (prefLang != null) {
|
||||
td.tx(" (preferred)");
|
||||
}
|
||||
} else if (langs.size() > 1) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, "Languages:", "Languages spoken");
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
XhtmlNode ul = td.ul();
|
||||
for (CodeableConcept i : langs) {
|
||||
XhtmlNode li = ul.li();
|
||||
render(r, li, i);
|
||||
if (i == prefLang) {
|
||||
li.tx(" (preferred)");
|
||||
if (langs.size() == 1) {
|
||||
render(r, td, langs.get(0));
|
||||
if (prefLang != null) {
|
||||
td.tx(" "+context.formatMessage(RenderingContext.PAT_LANG_PREFERRED));
|
||||
}
|
||||
} else if (langs.size() > 1) {
|
||||
XhtmlNode ul = td.ul();
|
||||
for (CodeableConcept i : langs) {
|
||||
XhtmlNode li = ul.li();
|
||||
render(r, li, i);
|
||||
if (i == prefLang) {
|
||||
li.tx(" "+context.formatMessage(RenderingContext.PAT_LANG_PREFERRED));;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void addLinks(XhtmlNode tbl, ResourceWrapper r) throws UnsupportedEncodingException, FHIRException, IOException {
|
||||
List<NamedReferance> refs = new ArrayList<>();
|
||||
PropertyWrapper pw = getProperty(r, "generalPractitioner");
|
||||
if (pw != null) {
|
||||
for (BaseWrapper t : pw.getValues()) {
|
||||
refs.add(new NamedReferance("General Practitioner", (Reference) t.getBase(), t));
|
||||
refs.add(new NamedReferance(context.formatMessage(RenderingContext.PAT_GP), (Reference) t.getBase(), t));
|
||||
}
|
||||
}
|
||||
pw = getProperty(r, "managingOrganization");
|
||||
if (pw != null) {
|
||||
for (BaseWrapper t : pw.getValues()) {
|
||||
refs.add(new NamedReferance("Managing Organization", (Reference) t.getBase(), t));
|
||||
refs.add(new NamedReferance(context.formatMessage(RenderingContext.PAT_MO), (Reference) t.getBase(), t));
|
||||
}
|
||||
}
|
||||
pw = getProperty(r, "link");
|
||||
|
@ -484,7 +483,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
|
||||
if (refs.size() > 0) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, "Links:", "Patient Links");
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_LINKS), context.formatMessage(RenderingContext.PAT_LINKS_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
XhtmlNode ul = td.ul();
|
||||
|
@ -499,10 +498,10 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
|
||||
private String describeLinkedRecord(String type) {
|
||||
switch (type) {
|
||||
case "replaced-by" : return "This record replaced by";
|
||||
case "replaces": return "This record replaces";
|
||||
case "refer": return "Please refer to";
|
||||
case "seealso": return "Also see";
|
||||
case "replaced-by" : return context.formatMessage(RenderingContext.PAT_LINK_REPLBY);
|
||||
case "replaces": return context.formatMessage(RenderingContext.PAT_LINK_REPL);
|
||||
case "refer": return context.formatMessage(RenderingContext.PAT_LINK_REFER);
|
||||
case "seealso": return context.formatMessage(RenderingContext.PAT_LINK_SEE);
|
||||
}
|
||||
return "Unknown";
|
||||
}
|
||||
|
@ -564,9 +563,9 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
}
|
||||
XhtmlNode tr = tbl.tr();
|
||||
if (rels.size() == 1) {
|
||||
nameCell(tr, (rels.get(0).getCodingFirstRep().hasDisplay() ? rels.get(0).getCodingFirstRep().getDisplay() : display(rels.get(0)))+":", "Nominated Contact: "+display(rels.get(0)));
|
||||
nameCell(tr, (rels.get(0).getCodingFirstRep().hasDisplay() ? rels.get(0).getCodingFirstRep().getDisplay() : display(rels.get(0)))+":", context.formatMessage(RenderingContext.PAT_NOM_CONTACT)+" "+display(rels.get(0)));
|
||||
} else {
|
||||
nameCell(tr, "Contact", "Patient contact");
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_NOK_CONTACT), context.formatMessage(RenderingContext.PAT_NOK_CONTACT_HINT));
|
||||
}
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
|
@ -576,15 +575,15 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
li = ul.li();
|
||||
render(r, li, name);
|
||||
if (gender != null) {
|
||||
li.tx(" ("+gender+")");
|
||||
li.tx(" "+"("+gender+")");
|
||||
}
|
||||
} else if (gender != null) {
|
||||
li = ul.li();
|
||||
li.tx("Gender: "+gender);
|
||||
li.tx(context.formatMessage(RenderingContext.PAT_GENDER, gender));
|
||||
}
|
||||
if (rels.size() > 1) {
|
||||
li = ul.li();
|
||||
li.tx("Relationships: ");
|
||||
li.tx(context.formatMessage(RenderingContext.PAT_RELN));
|
||||
boolean first = true;
|
||||
for (CodeableConcept rel : rels) {
|
||||
if (first) first = false; else li.tx(", ");
|
||||
|
@ -599,12 +598,12 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (organization != null) {
|
||||
li = ul.li();
|
||||
li.tx("Organization: ");
|
||||
li.tx(context.formatMessage(RenderingContext.PAT_ORG));
|
||||
render(r, li, organization);
|
||||
}
|
||||
if (period != null) {
|
||||
li = ul.li();
|
||||
li.tx("Valid Period: ");
|
||||
li.tx(context.formatMessage(RenderingContext.PAT_PERIOD));
|
||||
render(r, li, period);
|
||||
}
|
||||
}
|
||||
|
@ -624,18 +623,16 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
};
|
||||
if (names.size() == 1) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, "Alt. Name:", "Alternate names (see the one above)");
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_ALT_NAME), context.formatMessage(RenderingContext.PAT_ALT_NAME_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
render(r, td, names.get(0));
|
||||
} else if (names.size() > 1) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, "Alt Names:", "Alternate names (see the one above)");
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
XhtmlNode ul = td.ul();
|
||||
for (HumanName n : names) {
|
||||
render(r, ul.li(), n);
|
||||
if (names.size() == 1) {
|
||||
render(r, td, names.get(0));
|
||||
} else {
|
||||
XhtmlNode ul = td.ul();
|
||||
for (HumanName n : names) {
|
||||
render(r, ul.li(), n);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -651,27 +648,25 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
for (BaseWrapper t : pw.getValues()) {
|
||||
adds.add((Address) t.getBase());
|
||||
}
|
||||
if (tels.size() + adds.size() == 1) {
|
||||
if (tels.size() + adds.size() > 0) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, "Contact Detail:", "Ways to contact the Patient");
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_CONTACT), context.formatMessage(RenderingContext.PAT_CONTACT_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
if (adds.isEmpty()) {
|
||||
render(r, td, tels.get(0));
|
||||
if (tels.size() + adds.size() == 1) {
|
||||
if (adds.isEmpty()) {
|
||||
render(r, td, tels.get(0));
|
||||
} else {
|
||||
render(r, td, adds.get(0));
|
||||
}
|
||||
} else {
|
||||
render(r, td, adds.get(0));
|
||||
}
|
||||
} else if (tels.size() + adds.size() > 1) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, "Contact Details:", "Ways to contact the Patient");
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
XhtmlNode ul = td.ul();
|
||||
for (ContactPoint n : tels) {
|
||||
render(r, ul.li(), n);
|
||||
}
|
||||
for (Address n : adds) {
|
||||
render(r, ul.li(), n);
|
||||
XhtmlNode ul = td.ul();
|
||||
for (ContactPoint n : tels) {
|
||||
render(r, ul.li(), n);
|
||||
}
|
||||
for (Address n : adds) {
|
||||
render(r, ul.li(), n);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -698,7 +693,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
PropertyWrapper a = r.getChildByName("active");
|
||||
if (a.hasValues()) {
|
||||
pos++;
|
||||
nameCell(tr, "Active:", "Record is active");
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_ACTIVE), context.formatMessage(RenderingContext.PAT_ACTIVE_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
if (pos == count) {
|
||||
td.colspan("3");
|
||||
|
@ -710,7 +705,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
PropertyWrapper a = r.getChildByName("deceased[x]");
|
||||
if (a.hasValues()) {
|
||||
pos++;
|
||||
nameCell(tr, "Deceased:", "Known status of Patient");
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_DECEASED), context.formatMessage(RenderingContext.PAT_DECEASED_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
if (pos == count) {
|
||||
td.colspan("3");
|
||||
|
@ -725,7 +720,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
if (pos == 3) {
|
||||
tr = tbl.tr();
|
||||
}
|
||||
nameCell(tr, "Marital Status:", "Known Marital status of Patient");
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_MARITAL), context.formatMessage(RenderingContext.PAT_MARITAL_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
if (pos == count) {
|
||||
td.colspan("3");
|
||||
|
@ -740,7 +735,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
if (pos == 3) {
|
||||
tr = tbl.tr();
|
||||
}
|
||||
nameCell(tr, "Multiple Birth:", "Known multipleBirth status of Patient");
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_MUL_BIRTH), context.formatMessage(RenderingContext.PAT_MUL_BIRTH_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
if (pos == count) {
|
||||
td.colspan("3");
|
||||
|
@ -783,7 +778,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
String n = UUID.randomUUID().toString().toLowerCase()+ext;
|
||||
TextFile.bytesToFile(att.getData(), new File(Utilities.path(context.getDestDir(), n)));
|
||||
context.registerFile(n);
|
||||
td.img(n, "patient photo");
|
||||
td.img(n, context.formatMessage(RenderingContext.PAT_PHOTO));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
|
|||
boolean idDone = false;
|
||||
XhtmlNode p = x.para();
|
||||
if (context.isAddGeneratedNarrativeHeader()) {
|
||||
p.b().tx("Generated Narrative: "+r.fhirType()+(context.isContained() ? " #"+r.getId() : ""));
|
||||
p.b().tx(/*!#*/"Generated Narrative: "+r.fhirType()+(context.isContained() ? " #"+r.getId() : ""));
|
||||
if (!Utilities.noString(r.getId())) {
|
||||
p.an(r.getId());
|
||||
p.an("hc"+r.getId());
|
||||
|
@ -125,7 +125,7 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
|
|||
try {
|
||||
StructureDefinition sd = r.getDefinition();
|
||||
if (sd == null) {
|
||||
throw new FHIRException("Cannot find definition for "+r.fhirType());
|
||||
throw new FHIRException(/*!#*/"Cannot find definition for "+r.fhirType());
|
||||
} else {
|
||||
ElementDefinition ed = sd.getSnapshot().getElement().get(0);
|
||||
containedIds.clear();
|
||||
|
@ -133,9 +133,9 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
|
|||
generateByProfile(r, sd, r.root(), sd.getSnapshot().getElement(), ed, context.getProfileUtilities().getChildList(sd, ed), x, r.fhirType(), context.isTechnicalMode(), 0);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("Error Generating Narrative for "+r.fhirType()+"/"+r.getId()+": "+e.getMessage());
|
||||
System.out.println(/*!#*/"Error Generating Narrative for "+r.fhirType()+"/"+r.getId()+": "+e.getMessage());
|
||||
e.printStackTrace();
|
||||
x.para().b().style("color: maroon").tx("Exception generating Narrative: "+e.getMessage());
|
||||
x.para().b().style("color: maroon").tx(/*!#*/"Exception generating Narrative: "+e.getMessage());
|
||||
}
|
||||
return hasExtensions;
|
||||
}
|
||||
|
|
|
@ -29,10 +29,10 @@ public class ProvenanceRenderer extends ResourceRenderer {
|
|||
if (!prv.getTarget().isEmpty()) {
|
||||
if (prv.getTarget().size() == 1) {
|
||||
XhtmlNode p = x.para();
|
||||
p.tx("Provenance for ");
|
||||
p.tx(/*!#*/"Provenance for ");
|
||||
renderReference(prv, p, prv.getTargetFirstRep());
|
||||
} else {
|
||||
x.para().tx("Provenance for:");
|
||||
x.para().tx(/*!#*/"Provenance for:");
|
||||
XhtmlNode ul = x.ul();
|
||||
for (Reference ref : prv.getTarget()) {
|
||||
renderReference(prv, ul.li(), ref);
|
||||
|
@ -40,12 +40,12 @@ public class ProvenanceRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
// summary table
|
||||
x.para().tx("Summary");
|
||||
x.para().tx(/*!#*/"Summary");
|
||||
XhtmlNode t = x.table("grid");
|
||||
XhtmlNode tr;
|
||||
if (prv.hasOccurred()) {
|
||||
tr = t.tr();
|
||||
tr.td().tx("Occurrence");
|
||||
tr.td().tx(/*!#*/"Occurrence");
|
||||
if (prv.hasOccurredPeriod()) {
|
||||
renderPeriod(tr.td(), prv.getOccurredPeriod());
|
||||
} else {
|
||||
|
@ -54,12 +54,12 @@ public class ProvenanceRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (prv.hasRecorded()) {
|
||||
tr = t.tr();
|
||||
tr.td().tx("Recorded");
|
||||
tr.td().addText(prv.getRecordedElement().toHumanDisplay());
|
||||
tr.td().tx(/*!#*/"Recorded");
|
||||
tr.td().addText(displayDateTime(prv.getRecordedElement()));
|
||||
}
|
||||
if (prv.hasPolicy()) {
|
||||
tr = t.tr();
|
||||
tr.td().tx("Policy");
|
||||
tr.td().tx(/*!#*/"Policy");
|
||||
if (prv.getPolicy().size() == 1) {
|
||||
renderUri(tr.td(), prv.getPolicy().get(0));
|
||||
} else {
|
||||
|
@ -71,12 +71,12 @@ public class ProvenanceRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (prv.hasLocation()) {
|
||||
tr = t.tr();
|
||||
tr.td().tx("Location");
|
||||
tr.td().tx(/*!#*/"Location");
|
||||
renderReference(prv, tr.td(), prv.getLocation());
|
||||
}
|
||||
if (prv.hasActivity()) {
|
||||
tr = t.tr();
|
||||
tr.td().tx("Activity");
|
||||
tr.td().tx(/*!#*/"Activity");
|
||||
renderCodeableConcept(tr.td(), prv.getActivity(), false);
|
||||
}
|
||||
|
||||
|
@ -88,18 +88,18 @@ public class ProvenanceRenderer extends ResourceRenderer {
|
|||
hasRole = hasRole || a.hasRole();
|
||||
hasOnBehalfOf = hasOnBehalfOf || a.hasOnBehalfOf();
|
||||
}
|
||||
x.para().b().tx("Agents");
|
||||
x.para().b().tx(/*!#*/"Agents");
|
||||
t = x.table("grid");
|
||||
tr = t.tr();
|
||||
if (hasType) {
|
||||
tr.td().b().tx("Type");
|
||||
tr.td().b().tx(/*!#*/"Type");
|
||||
}
|
||||
if (hasRole) {
|
||||
tr.td().b().tx("Role");
|
||||
tr.td().b().tx(/*!#*/"Role");
|
||||
}
|
||||
tr.td().b().tx("who");
|
||||
tr.td().b().tx(/*!#*/"who");
|
||||
if (hasOnBehalfOf) {
|
||||
tr.td().b().tx("On Behalf Of");
|
||||
tr.td().b().tx(/*!#*/"On Behalf Of");
|
||||
}
|
||||
for (ProvenanceAgentComponent a : prv.getAgent()) {
|
||||
tr = t.tr();
|
||||
|
@ -147,12 +147,12 @@ public class ProvenanceRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
public String display(Provenance prv) throws UnsupportedEncodingException, IOException {
|
||||
return "Provenance for "+displayReference(prv, prv.getTargetFirstRep());
|
||||
return /*!#*/"Provenance for "+displayReference(prv, prv.getTargetFirstRep());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String display(ResourceWrapper r) throws UnsupportedEncodingException, IOException {
|
||||
return "Not done yet";
|
||||
return /*!#*/"Not done yet";
|
||||
}
|
||||
|
||||
}
|
|
@ -68,9 +68,9 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
boolean doOpts = context.getDefinitionsTarget() == null && hasAnyOptions(q.getItem());
|
||||
|
||||
if (doOpts) {
|
||||
x.b().tx("Structure");
|
||||
x.b().tx(/*!#*/"Structure");
|
||||
}
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDestDir(), context.isInlineGraphics(), true);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context, context.getDestDir(), context.isInlineGraphics(), true);
|
||||
TableModel model = gen.new TableModel("qtree="+q.getId(), context.getRules() == GenerationRules.IG_PUBLISHER);
|
||||
model.setAlternating(true);
|
||||
if (context.getRules() == GenerationRules.VALID_RESOURCE || context.isInlineGraphics()) {
|
||||
|
@ -79,14 +79,14 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
model.setDocoImg(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "help16.png"));
|
||||
}
|
||||
model.setDocoRef(context.getLink(KnownLinkType.SPEC)+"formats.html#table");
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "LinkId"), translate("sd.hint", "The linkId for the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Text"), translate("sd.hint", "Text for the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Cardinality"), translate("sd.hint", "Minimum and Maximum # of times the the itemcan appear in the instance"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Type"), translate("sd.hint", "The type of the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"LinkId", /*!#*/"The linkId for the item", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Text", /*!#*/"Text for the item", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Cardinality", /*!#*/"Minimum and Maximum # of times the the itemcan appear in the instance", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Type", /*!#*/"The type of the item", null, 0));
|
||||
if (hasFlags) {
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Flags"), translate("sd.hint", "Other attributes of the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Flags", /*!#*/"Other attributes of the item", null, 0));
|
||||
}
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Description & Constraints"), translate("sd.hint", "Additional information about the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Description & Constraints", /*!#*/"Additional information about the item", null, 0));
|
||||
|
||||
boolean hasExt = false;
|
||||
// first we add a root for the questionaire itself
|
||||
|
@ -105,7 +105,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
private void renderOptions(Questionnaire q, XhtmlNode x) {
|
||||
if (hasAnyOptions(q.getItem())) {
|
||||
x.hr();
|
||||
x.para().b().tx("Option Sets");
|
||||
x.para().b().tx(/*!#*/"Option Sets");
|
||||
renderOptions(q.getItem(), x);
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
useSelect = useSelect || opt.getInitialSelected();
|
||||
}
|
||||
x.an("opt-item."+i.getLinkId());
|
||||
x.para().b().tx("Answer options for "+i.getLinkId());
|
||||
x.para().b().tx(/*!#*/"Answer options for "+i.getLinkId());
|
||||
XhtmlNode ul = x.ul();
|
||||
for (QuestionnaireItemAnswerOptionComponent opt : i.getAnswerOption()) {
|
||||
XhtmlNode li = ul.li();
|
||||
|
@ -209,11 +209,11 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
Row r = gen.new Row();
|
||||
rows.add(r);
|
||||
|
||||
r.setIcon("icon_q_root.gif", "QuestionnaireRoot");
|
||||
r.setIcon("icon_q_root.gif", /*!#*/"QuestionnaireRoot");
|
||||
r.getCells().add(gen.new Cell(null, null, q.getName(), null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, q.getDescription(), null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, "", null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, "Questionnaire", null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, /*!#*/"Questionnaire", null, null));
|
||||
if (hasFlags) {
|
||||
r.getCells().add(gen.new Cell(null, null, "", null, null));
|
||||
}
|
||||
|
@ -263,45 +263,45 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
Cell flags = gen.new Cell();
|
||||
r.getCells().add(flags);
|
||||
if (i.getReadOnly()) {
|
||||
flags.addPiece(gen.new Piece(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "questionnaire-definitions.html#Questionnaire.item.readOnly"), null, "Is Readonly").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-readonly.png"))));
|
||||
flags.addPiece(gen.new Piece(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "questionnaire-definitions.html#Questionnaire.item.readOnly"), null, /*!#*/"Is Readonly").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-readonly.png"))));
|
||||
}
|
||||
if (ToolingExtensions.readBoolExtension(i, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject")) {
|
||||
flags.addPiece(gen.new Piece(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject", "StructureDefinition-sdc-questionnaire-isSubject.html"), null, "Can change the subject of the questionnaire").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-subject.png"))));
|
||||
flags.addPiece(gen.new Piece(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject", "StructureDefinition-sdc-questionnaire-isSubject.html"), null, /*!#*/"Can change the subject of the questionnaire").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-subject.png"))));
|
||||
}
|
||||
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_HIDDEN)) {
|
||||
flags.addPiece(gen.new Piece(getSpecLink("extension-questionnaire-hidden.html"), null, "Is a hidden item").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-hidden.png"))));
|
||||
flags.addPiece(gen.new Piece(getSpecLink("extension-questionnaire-hidden.html"), null, /*!#*/"Is a hidden item").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-hidden.png"))));
|
||||
}
|
||||
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_OTP_DISP)) {
|
||||
flags.addPiece(gen.new Piece(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay", "StructureDefinition-sdc-questionnaire-optionalDisplay.html"), null, "Is optional to display").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-optional.png"))));
|
||||
flags.addPiece(gen.new Piece(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay", "StructureDefinition-sdc-questionnaire-optionalDisplay.html"), null, /*!#*/"Is optional to display").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-optional.png"))));
|
||||
}
|
||||
if (i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod")) {
|
||||
flags.addPiece(gen.new Piece(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", "StructureDefinition-sdc-questionnaire-observationLinkPeriod.html"), null, "Is linked to an observation").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-observation.png"))));
|
||||
flags.addPiece(gen.new Piece(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", "StructureDefinition-sdc-questionnaire-observationLinkPeriod.html"), null, /*!#*/"Is linked to an observation").addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-observation.png"))));
|
||||
}
|
||||
if (i.hasExtension(ToolingExtensions.EXT_Q_CHOICE_ORIENT)) {
|
||||
String code = ToolingExtensions.readStringExtension(i, ToolingExtensions.EXT_Q_CHOICE_ORIENT);
|
||||
flags.addPiece(gen.new Piece(getSpecLink("extension-questionnaire-choiceorientation.html"), null, "Orientation: "+code).addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-" + code + ".png"))));
|
||||
flags.addPiece(gen.new Piece(getSpecLink("extension-questionnaire-choiceorientation.html"), null, /*!#*/"Orientation: "+code).addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-" + code + ".png"))));
|
||||
}
|
||||
if (i.hasExtension(ToolingExtensions.EXT_Q_DISPLAY_CAT)) {
|
||||
CodeableConcept cc = i.getExtensionByUrl(ToolingExtensions.EXT_Q_DISPLAY_CAT).getValueCodeableConcept();
|
||||
String code = cc.getCode("http://hl7.org/fhir/questionnaire-display-category");
|
||||
flags.addPiece(gen.new Piece("https://hl7.org/fhir/R4/extension-questionnaire-displayCategory.html", null, "Category: "+code).addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-" + code + ".png"))));
|
||||
flags.addPiece(gen.new Piece("https://hl7.org/fhir/R4/extension-questionnaire-displayCategory.html", null, /*!#*/"Category: "+code).addHtml(new XhtmlNode(NodeType.Element, "img").attribute("alt", "icon").attribute("src", getImgPath("icon-qi-" + code + ".png"))));
|
||||
}
|
||||
}
|
||||
Cell defn = gen.new Cell();
|
||||
r.getCells().add(defn);
|
||||
|
||||
if (i.hasMaxLength()) {
|
||||
defn.getPieces().add(gen.new Piece(null, "Max Length: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Max Length: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, Integer.toString(i.getMaxLength()), null));
|
||||
}
|
||||
if (i.hasDefinition()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Definition: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Definition: ", null));
|
||||
genDefinitionLink(gen, i, defn, q);
|
||||
}
|
||||
if (i.hasEnableWhen()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
Piece p = gen.new Piece(null, "Enable When: ", null);
|
||||
Piece p = gen.new Piece(null, /*!#*/"Enable When: ", null);
|
||||
defn.getPieces().add(p);
|
||||
if (i.getEnableWhen().size() == 1) {
|
||||
XhtmlNode x = new XhtmlNode(NodeType.Element, "span");
|
||||
|
@ -317,7 +317,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (i.hasAnswerValueSet()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Value Set: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Value Set: ", null));
|
||||
if (!Utilities.noString(i.getAnswerValueSet()) && i.getAnswerValueSet().startsWith("#")) {
|
||||
ValueSet vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
||||
if (vs == null) {
|
||||
|
@ -336,7 +336,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (i.hasAnswerOption()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Options: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Options: ", null));
|
||||
if (context.getDefinitionsTarget() == null) {
|
||||
// if we don't have a definitions target, we'll add them below.
|
||||
defn.getPieces().add(gen.new Piece("#opt-item."+i.getLinkId(), Integer.toString(i.getAnswerOption().size())+" "+Utilities.pluralize("option", i.getAnswerOption().size()), null));
|
||||
|
@ -347,7 +347,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
if (i.hasInitial()) {
|
||||
for (QuestionnaireItemInitialComponent v : i.getInitial()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Initial Value: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Initial Value: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, v.getValue().fhirType(), null));
|
||||
defn.getPieces().add(gen.new Piece(null, " = ", null));
|
||||
if (v.getValue().isPrimitive()) {
|
||||
|
@ -375,26 +375,26 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
|
||||
if (i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression") || i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemContext") || i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression") || i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-contextExpression") || i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression") || i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression")) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Expressions: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Expressions: ", null));
|
||||
Piece p = gen.new Piece("ul");
|
||||
defn.getPieces().add(p);
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression")) {
|
||||
addExpression(p, e.getValueExpression(), "Initial Value", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Initial Value", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression");
|
||||
}
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-contextExpression")) {
|
||||
addExpression(p, e.getValueExpression(), "Context", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-contextExpression");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Context", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-contextExpression");
|
||||
}
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemContext")) {
|
||||
addExpression(p, e.getValueExpression(), "Item Context", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemContext");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Item Context", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemContext");
|
||||
}
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression")) {
|
||||
addExpression(p, e.getValueExpression(), "Enable When", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Enable When", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression");
|
||||
}
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression")) {
|
||||
addExpression(p, e.getValueExpression(), "Calculated Value", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Calculated Value", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression");
|
||||
}
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression")) {
|
||||
addExpression(p, e.getValueExpression(), "Candidates", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Candidates", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -460,7 +460,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
}
|
||||
|
||||
private boolean renderLogic(XhtmlNode x, Questionnaire q) throws FHIRException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDestDir(), context.isInlineGraphics(), true);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context, context.getDestDir(), context.isInlineGraphics(), true);
|
||||
TableModel model = gen.new TableModel("qtree="+q.getId(), true);
|
||||
model.setAlternating(true);
|
||||
if (context.getRules() == GenerationRules.VALID_RESOURCE || context.isInlineGraphics()) {
|
||||
|
@ -469,8 +469,8 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
model.setDocoImg(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "help16.png"));
|
||||
}
|
||||
model.setDocoRef(context.getLink(KnownLinkType.SPEC)+"formats.html#table");
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "LinkId"), translate("sd.hint", "The linkId for the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Description & Constraints"), translate("sd.hint", "Additional information about the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"LinkId", /*!#*/"The linkId for the item", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Description & Constraints", /*!#*/"Additional information about the item", null, 0));
|
||||
|
||||
boolean hasExt = false;
|
||||
if (!q.hasItem()) {
|
||||
|
@ -496,22 +496,22 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
r.getCells().add(defn);
|
||||
|
||||
if (i.hasMaxLength()) {
|
||||
defn.getPieces().add(gen.new Piece(null, "Max Length: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Max Length: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, Integer.toString(i.getMaxLength()), null));
|
||||
}
|
||||
if (i.hasDefinition()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Definition: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Definition: ", null));
|
||||
genDefinitionLink(gen, i, defn, q);
|
||||
}
|
||||
if (i.hasEnableWhen()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Enable When: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, "todo", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Enable When: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"todo", null));
|
||||
}
|
||||
if (i.hasAnswerValueSet()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Value Set: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Value Set: ", null));
|
||||
if (Utilities.noString(i.getAnswerValueSet()) && i.getAnswerValueSet().startsWith("#")) {
|
||||
ValueSet vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
||||
if (vs == null) {
|
||||
|
@ -530,13 +530,13 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (i.hasAnswerOption()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Options: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Options: ", null));
|
||||
defn.getPieces().add(gen.new Piece(context.getDefinitionsTarget()+"#item."+i.getLinkId(), Integer.toString(i.getAnswerOption().size())+" "+Utilities.pluralize("option", i.getAnswerOption().size()), null));
|
||||
}
|
||||
if (i.hasInitial()) {
|
||||
for (QuestionnaireItemInitialComponent v : i.getInitial()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Initial Value: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Initial Value: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, v.getValue().fhirType(), null));
|
||||
defn.getPieces().add(gen.new Piece(null, " = ", null));
|
||||
if (v.getValue().isPrimitive()) {
|
||||
|
@ -564,26 +564,26 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
|
||||
if (i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression") || i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemContext") || i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression") || i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-contextExpression") || i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression") || i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression")) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, "Expressions: ", null));
|
||||
defn.getPieces().add(gen.new Piece(null, /*!#*/"Expressions: ", null));
|
||||
Piece p = gen.new Piece("ul");
|
||||
defn.getPieces().add(p);
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression")) {
|
||||
addExpression(p, e.getValueExpression(), "Initial Value", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Initial Value", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression");
|
||||
}
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-contextExpression")) {
|
||||
addExpression(p, e.getValueExpression(), "Context", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-contextExpression");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Context", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-contextExpression");
|
||||
}
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemContext")) {
|
||||
addExpression(p, e.getValueExpression(), "Item Context", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemContext");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Item Context", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemContext");
|
||||
}
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression")) {
|
||||
addExpression(p, e.getValueExpression(), "Enable When", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Enable When", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression");
|
||||
}
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression")) {
|
||||
addExpression(p, e.getValueExpression(), "Calculated Value", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Calculated Value", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression");
|
||||
}
|
||||
for (Extension e : i.getExtensionsByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression")) {
|
||||
addExpression(p, e.getValueExpression(), "Candidates", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression");
|
||||
addExpression(p, e.getValueExpression(), /*!#*/"Candidates", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -640,7 +640,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
}
|
||||
p.span(null, "linkId: "+i.getLinkId()).tx(i.getText());
|
||||
if (i.getRequired()) {
|
||||
p.span("color: red", "Mandatory").tx("*");
|
||||
p.span("color: red", /*!#*/"Mandatory").tx("*");
|
||||
}
|
||||
|
||||
XhtmlNode input = null;
|
||||
|
@ -719,39 +719,39 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
|
||||
if (ToolingExtensions.readBoolExtension(i, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject")) {
|
||||
hasFlag = true;
|
||||
flags.ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject", "StructureDefinition-sdc-questionnaire-isSubject.html"), "Can change the subject of the questionnaire").img(getImgPath("icon-qi-subject.png"), "icon");
|
||||
flags.ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject", "StructureDefinition-sdc-questionnaire-isSubject.html"), /*!#*/"Can change the subject of the questionnaire").img(getImgPath("icon-qi-subject.png"), "icon");
|
||||
}
|
||||
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_HIDDEN)) {
|
||||
hasFlag = true;
|
||||
flags.ah(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "extension-questionnaire-hidden.html"), "Is a hidden item").img(getImgPath("icon-qi-hidden.png"), "icon");
|
||||
flags.ah(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "extension-questionnaire-hidden.html"), /*!#*/"Is a hidden item").img(getImgPath("icon-qi-hidden.png"), "icon");
|
||||
d.style("background-color: #eeeeee");
|
||||
}
|
||||
if (ToolingExtensions.readBoolExtension(i, ToolingExtensions.EXT_Q_OTP_DISP)) {
|
||||
hasFlag = true;
|
||||
flags.ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay", "StructureDefinition-sdc-questionnaire-optionalDisplay.html"), "Is optional to display").img(getImgPath("icon-qi-optional.png"), "icon");
|
||||
flags.ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-optionalDisplay", "StructureDefinition-sdc-questionnaire-optionalDisplay.html"), /*!#*/"Is optional to display").img(getImgPath("icon-qi-optional.png"), "icon");
|
||||
}
|
||||
if (i.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod")) {
|
||||
hasFlag = true;
|
||||
flags.ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", "StructureDefinition-sdc-questionnaire-observationLinkPeriod.html"), "Is linked to an observation").img(getImgPath("icon-qi-observation.png"), "icon");
|
||||
flags.ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod", "StructureDefinition-sdc-questionnaire-observationLinkPeriod.html"), /*!#*/"Is linked to an observation").img(getImgPath("icon-qi-observation.png"), "icon");
|
||||
}
|
||||
if (i.hasExtension(ToolingExtensions.EXT_Q_DISPLAY_CAT)) {
|
||||
CodeableConcept cc = i.getExtensionByUrl(ToolingExtensions.EXT_Q_DISPLAY_CAT).getValueCodeableConcept();
|
||||
String code = cc.getCode("http://hl7.org/fhir/questionnaire-display-category");
|
||||
hasFlag = true;
|
||||
flags.ah("https://hl7.org/fhir/R4/extension-questionnaire-displayCategory.html", "Category: "+code).img(getImgPath("icon-qi-" + code + ".png"), "icon");
|
||||
flags.ah("https://hl7.org/fhir/R4/extension-questionnaire-displayCategory.html", /*!#*/"Category: "+code).img(getImgPath("icon-qi-" + code + ".png"), "icon");
|
||||
}
|
||||
|
||||
if (i.hasMaxLength()) {
|
||||
item(ul, "Max Length", Integer.toString(i.getMaxLength()));
|
||||
item(ul, /*!#*/"Max Length", Integer.toString(i.getMaxLength()));
|
||||
}
|
||||
if (i.hasDefinition()) {
|
||||
genDefinitionLink(item(ul, "Definition"), i, q);
|
||||
genDefinitionLink(item(ul, /*!#*/"Definition"), i, q);
|
||||
}
|
||||
if (i.hasEnableWhen()) {
|
||||
item(ul, "Enable When", "todo");
|
||||
item(ul, /*!#*/"Enable When", "todo");
|
||||
}
|
||||
if (i.hasAnswerValueSet()) {
|
||||
XhtmlNode ans = item(ul, "Answers");
|
||||
XhtmlNode ans = item(ul, /*!#*/"Answers");
|
||||
if (!Utilities.noString(i.getAnswerValueSet()) && i.getAnswerValueSet().startsWith("#")) {
|
||||
ValueSet vs = (ValueSet) q.getContained(i.getAnswerValueSet().substring(1));
|
||||
if (vs == null || !vs.hasWebPath()) {
|
||||
|
@ -769,10 +769,10 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
}
|
||||
}
|
||||
if (i.hasAnswerOption()) {
|
||||
item(ul, "Answers", Integer.toString(i.getAnswerOption().size())+" "+Utilities.pluralize("option", i.getAnswerOption().size()), context.getDefinitionsTarget()+"#item."+i.getLinkId());
|
||||
item(ul, /*!#*/"Answers", Integer.toString(i.getAnswerOption().size())+" "+Utilities.pluralize("option", i.getAnswerOption().size()), context.getDefinitionsTarget()+"#item."+i.getLinkId());
|
||||
}
|
||||
if (i.hasInitial()) {
|
||||
XhtmlNode vi = item(ul, "Initial Values");
|
||||
XhtmlNode vi = item(ul, /*!#*/"Initial Values");
|
||||
boolean first = true;
|
||||
for (QuestionnaireItemInitialComponent v : i.getInitial()) {
|
||||
if (first) first = false; else vi.tx(", ");
|
||||
|
@ -883,13 +883,13 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
}
|
||||
|
||||
public String display(Questionnaire q) throws UnsupportedEncodingException, IOException {
|
||||
return "Questionnaire "+q.present();
|
||||
return /*!#*/"Questionnaire "+q.present();
|
||||
}
|
||||
|
||||
private boolean renderLinks(XhtmlNode x, Questionnaire q) {
|
||||
x.para().tx("Try this questionnaire out:");
|
||||
x.para().tx(/*!#*/"Try this questionnaire out:");
|
||||
XhtmlNode ul = x.ul();
|
||||
ul.li().ah("http://todo.nlm.gov/path?mode=ig&src="+Utilities.pathURL(context.getLink(KnownLinkType.SELF), "package.tgz")+"&q="+q.getId()+".json").tx("NLM Forms Library");
|
||||
ul.li().ah("http://todo.nlm.gov/path?mode=ig&src="+Utilities.pathURL(context.getLink(KnownLinkType.SELF), "package.tgz")+"&q="+q.getId()+".json").tx(/*!#*/"NLM Forms Library");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -908,42 +908,42 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
XhtmlNode td = tbl.tr().td("structure").colspan("2").span(null, null).attribute("class", "self-link-parent");
|
||||
td.an(q.getId());
|
||||
td.img(getImgPath("icon_q_root.gif"), "icon");
|
||||
td.tx(" Questionnaire ");
|
||||
td.tx(" "+/*!#*/"Questionnaire ");
|
||||
td.b().tx(q.getId());
|
||||
|
||||
// general information
|
||||
defn(tbl, "URL", q.getUrl());
|
||||
defn(tbl, "Version", q.getVersion());
|
||||
defn(tbl, "Name", q.getName());
|
||||
defn(tbl, "Title", q.getTitle());
|
||||
defn(tbl, /*!#*/"URL", q.getUrl());
|
||||
defn(tbl, /*!#*/"Version", q.getVersion());
|
||||
defn(tbl, /*!#*/"Name", q.getName());
|
||||
defn(tbl, /*!#*/"Title", q.getTitle());
|
||||
if (q.hasDerivedFrom()) {
|
||||
td = defn(tbl, "Derived From");
|
||||
td = defn(tbl, /*!#*/"Derived From");
|
||||
boolean first = true;
|
||||
for (CanonicalType c : q.getDerivedFrom()) {
|
||||
if (first) first = false; else td.tx(", ");
|
||||
td.tx(c.asStringValue()); // todo: make these a reference
|
||||
}
|
||||
}
|
||||
defn(tbl, "Status", q.getStatus().getDisplay());
|
||||
defn(tbl, "Experimental", q.getExperimental());
|
||||
defn(tbl, "Publication Date", q.getDateElement().primitiveValue());
|
||||
defn(tbl, "Approval Date", q.getApprovalDateElement().primitiveValue());
|
||||
defn(tbl, "Last Review Date", q.getLastReviewDateElement().primitiveValue());
|
||||
defn(tbl, /*!#*/"Status", q.getStatus().getDisplay());
|
||||
defn(tbl, /*!#*/"Experimental", q.getExperimental());
|
||||
defn(tbl, /*!#*/"Publication Date", q.getDateElement().primitiveValue());
|
||||
defn(tbl, /*!#*/"Approval Date", q.getApprovalDateElement().primitiveValue());
|
||||
defn(tbl, /*!#*/"Last Review Date", q.getLastReviewDateElement().primitiveValue());
|
||||
if (q.hasEffectivePeriod()) {
|
||||
renderPeriod(defn(tbl, "Effective Period"), q.getEffectivePeriod());
|
||||
renderPeriod(defn(tbl, /*!#*/"Effective Period"), q.getEffectivePeriod());
|
||||
}
|
||||
|
||||
if (q.hasSubjectType()) {
|
||||
td = defn(tbl, "Subject Type");
|
||||
td = defn(tbl, /*!#*/"Subject Type");
|
||||
boolean first = true;
|
||||
for (CodeType c : q.getSubjectType()) {
|
||||
if (first) first = false; else td.tx(", ");
|
||||
td.tx(c.asStringValue());
|
||||
}
|
||||
}
|
||||
defn(tbl, "Description", q.getDescription());
|
||||
defn(tbl, "Purpose", q.getPurpose());
|
||||
defn(tbl, "Copyright", q.getCopyright());
|
||||
defn(tbl, /*!#*/"Description", q.getDescription());
|
||||
defn(tbl, /*!#*/"Purpose", q.getPurpose());
|
||||
defn(tbl, /*!#*/"Copyright", q.getCopyright());
|
||||
if (q.hasCode()) {
|
||||
td = defn(tbl, Utilities.pluralize("Code", q.getCode().size()));
|
||||
boolean first = true;
|
||||
|
@ -968,37 +968,37 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
td.b().tx(qi.getLinkId());
|
||||
|
||||
// general information
|
||||
defn(tbl, "Link Id", qi.getLinkId());
|
||||
defn(tbl, "Prefix", qi.getPrefix());
|
||||
defn(tbl, "Text", qi.getText());
|
||||
defn(tbl, "Type", qi.getType().getDisplay());
|
||||
defn(tbl, "Required", qi.getRequired(), true);
|
||||
defn(tbl, "Repeats", qi.getRepeats(), true);
|
||||
defn(tbl, "Read Only", qi.getReadOnly(), false);
|
||||
defn(tbl, /*!#*/"Link Id", qi.getLinkId());
|
||||
defn(tbl, /*!#*/"Prefix", qi.getPrefix());
|
||||
defn(tbl, /*!#*/"Text", qi.getText());
|
||||
defn(tbl, /*!#*/"Type", qi.getType().getDisplay());
|
||||
defn(tbl, /*!#*/"Required", qi.getRequired(), true);
|
||||
defn(tbl, /*!#*/"Repeats", qi.getRepeats(), true);
|
||||
defn(tbl, /*!#*/"Read Only", qi.getReadOnly(), false);
|
||||
if (ToolingExtensions.readBoolExtension(qi, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject")) {
|
||||
defn(tbl, "Subject", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject", "This element changes who the subject of the question is", null);
|
||||
defn(tbl, /*!#*/"Subject", "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject", "This element changes who the subject of the question is", null);
|
||||
}
|
||||
|
||||
// content control
|
||||
defn(tbl, "Max Length", qi.getMaxLength());
|
||||
defn(tbl, /*!#*/"Max Length", qi.getMaxLength());
|
||||
if (qi.hasAnswerValueSet()) {
|
||||
defn(tbl, "Value Set", qi.getDefinition(), context.getWorker().findTxResource(ValueSet.class, qi.getAnswerValueSet(), q));
|
||||
defn(tbl, /*!#*/"Value Set", qi.getDefinition(), context.getWorker().findTxResource(ValueSet.class, qi.getAnswerValueSet(), q));
|
||||
}
|
||||
if (qi.hasAnswerOption()) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().tx("Allowed Answers");
|
||||
tr.td().tx(/*!#*/"Allowed Answers");
|
||||
XhtmlNode ul = tr.td().ul();
|
||||
for (QuestionnaireItemAnswerOptionComponent ans : qi.getAnswerOption()) {
|
||||
XhtmlNode li = ul.li();
|
||||
render(li, ans.getValue());
|
||||
if (ans.getInitialSelected()) {
|
||||
li.tx(" (initially selected)");
|
||||
li.tx(" "+/*!#*/"(initially selected)");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (qi.hasInitial()) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().tx(Utilities.pluralize("Initial Answer", qi.getInitial().size()));
|
||||
tr.td().tx(Utilities.pluralize(/*!#*/"Initial Answer", qi.getInitial().size()));
|
||||
if (qi.getInitial().size() == 1) {
|
||||
render(tr.td(), qi.getInitialFirstRep().getValue());
|
||||
} else {
|
||||
|
@ -1017,20 +1017,20 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
render(tr.td(), qi.getExtensionByUrl(ToolingExtensions.EXT_Q_DISPLAY_CAT).getValue());
|
||||
}
|
||||
if (ToolingExtensions.readBoolExtension(qi, ToolingExtensions.EXT_Q_HIDDEN)) {
|
||||
defn(tbl, "Hidden Item", ToolingExtensions.EXT_Q_DISPLAY_CAT, "This item is a hidden question", null);
|
||||
defn(tbl, /*!#*/"Hidden Item", ToolingExtensions.EXT_Q_DISPLAY_CAT, "This item is a hidden question", null);
|
||||
}
|
||||
if (ToolingExtensions.readBoolExtension(qi, ToolingExtensions.EXT_Q_OTP_DISP)) {
|
||||
defn(tbl, "Hidden Item", ToolingExtensions.EXT_Q_OTP_DISP, "This item is optional to display", null);
|
||||
defn(tbl, /*!#*/"Hidden Item", ToolingExtensions.EXT_Q_OTP_DISP, "This item is optional to display", null);
|
||||
}
|
||||
|
||||
// formal definitions
|
||||
if (qi.hasDefinition()) {
|
||||
genDefinitionLink(defn(tbl, "Definition"), qi, q);
|
||||
genDefinitionLink(defn(tbl, /*!#*/"Definition"), qi, q);
|
||||
}
|
||||
|
||||
if (qi.hasCode()) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().tx(Utilities.pluralize("Code", qi.getCode().size()));
|
||||
tr.td().tx(Utilities.pluralize(/*!#*/"Code", qi.getCode().size()));
|
||||
XhtmlNode ul = tr.td().ul();
|
||||
for (Coding c : qi.getCode()) {
|
||||
renderCodingWithDetails(ul.li(), c);
|
||||
|
@ -1040,9 +1040,9 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
XhtmlNode tr = tbl.tr();
|
||||
StructureDefinition sd = context.getContext().fetchResource(StructureDefinition.class, ToolingExtensions.EXT_O_LINK_PERIOD);
|
||||
if (sd != null && sd.hasWebPath()) {
|
||||
tr.td().ah(sd.getWebPath()).tx("Observation Link Period");
|
||||
tr.td().ah(sd.getWebPath()).tx(/*!#*/"Observation Link Period");
|
||||
} else {
|
||||
tr.td().ah("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod").tx("Observation Link Period");
|
||||
tr.td().ah("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod").tx(/*!#*/"Observation Link Period");
|
||||
}
|
||||
render(tr.td(), qi.getExtensionByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod").getValue());
|
||||
}
|
||||
|
@ -1050,15 +1050,15 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
// dynamic management
|
||||
if (qi.hasEnableWhen()) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().tx("Enable When");
|
||||
tr.td().tx(/*!#*/"Enable When");
|
||||
td = tr.td();
|
||||
if (qi.getEnableWhen().size() == 1) {
|
||||
renderEnableWhen(td, qi.getEnableWhen().get(0));
|
||||
} else {
|
||||
if (qi.hasEnableBehavior()) {
|
||||
td.tx(qi.getEnableBehavior().getDisplay()+" are true:");
|
||||
td.tx(qi.getEnableBehavior().getDisplay()+" "+/*!#*/"are true:");
|
||||
} else {
|
||||
td.tx("?? are true:");
|
||||
td.tx(/*!#*/"?? are true:");
|
||||
}
|
||||
XhtmlNode ul = td.ul();
|
||||
for (QuestionnaireItemEnableWhenComponent ew : qi.getEnableWhen()) {
|
||||
|
@ -1083,11 +1083,11 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
|
||||
private void defn(XhtmlNode tbl, String name, String url, Resource res) throws UnsupportedEncodingException, IOException {
|
||||
if (res != null && res.hasWebPath()) {
|
||||
defn(tbl, "Definition", RendererFactory.factory(res, context).display(res), res.getWebPath());
|
||||
defn(tbl, /*!#*/"Definition", RendererFactory.factory(res, context).display(res), res.getWebPath());
|
||||
} else if (Utilities.isAbsoluteUrlLinkable(url)) {
|
||||
defn(tbl, "Definition", url, url);
|
||||
defn(tbl, /*!#*/"Definition", url, url);
|
||||
} {
|
||||
defn(tbl, "Definition", url);
|
||||
defn(tbl, /*!#*/"Definition", url);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
// case DEFNS: return renderDefns(x, q);
|
||||
case TREE: return renderTree(x, q);
|
||||
default:
|
||||
throw new Error("Unknown QuestionnaireResponse Renderer Mode");
|
||||
throw new Error(/*!#*/"Unknown QuestionnaireResponse Renderer Mode");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,12 +57,12 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
// case DEFNS: return renderDefns(x, q);
|
||||
case TREE: return renderTree(x, qr);
|
||||
default:
|
||||
throw new Error("Unknown QuestionnaireResponse Renderer Mode");
|
||||
throw new Error(/*!#*/"Unknown QuestionnaireResponse Renderer Mode");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean renderTree(XhtmlNode x, ResourceWrapper qr) throws UnsupportedEncodingException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDestDir(), context.isInlineGraphics(), true);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context, context.getDestDir(), context.isInlineGraphics(), true);
|
||||
TableModel model = gen.new TableModel("qtree="+qr.getId(), false);
|
||||
model.setAlternating(true);
|
||||
if (context.getRules() == GenerationRules.VALID_RESOURCE || context.isInlineGraphics()) {
|
||||
|
@ -71,10 +71,10 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
model.setDocoImg(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "help16.png"));
|
||||
}
|
||||
model.setDocoRef(context.getLink(KnownLinkType.SPEC)+"formats.html#table");
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "LinkId"), translate("sd.hint", "The linkId for the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Text"), translate("sd.hint", "Text for the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Definition"), translate("sd.hint", "Minimum and Maximum # of times the the itemcan appear in the instance"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Answer"), translate("sd.hint", "The type of the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"LinkId", /*!#*/"The linkId for the item", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Text", /*!#*/"Text for the item", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Definition", /*!#*/"Minimum and Maximum # of times the the itemcan appear in the instance", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Answer", /*!#*/"The type of the item", null, 0));
|
||||
|
||||
boolean hasExt = false;
|
||||
// first we add a root for the questionaire itself
|
||||
|
@ -89,7 +89,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
public boolean renderTree(XhtmlNode x, QuestionnaireResponse q) throws UnsupportedEncodingException, IOException {
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDestDir(), context.isInlineGraphics(), true);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context, context.getDestDir(), context.isInlineGraphics(), true);
|
||||
TableModel model = gen.new TableModel("qtree="+q.getId(), true);
|
||||
model.setAlternating(true);
|
||||
if (context.getRules() == GenerationRules.VALID_RESOURCE || context.isInlineGraphics()) {
|
||||
|
@ -98,10 +98,10 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
model.setDocoImg(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "help16.png"));
|
||||
}
|
||||
model.setDocoRef(context.getLink(KnownLinkType.SPEC)+"formats.html#table");
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "LinkId"), translate("sd.hint", "The linkId for the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Text"), translate("sd.hint", "Text for the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Definition"), translate("sd.hint", "Minimum and Maximum # of times the the itemcan appear in the instance"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("sd.head", "Answer"), translate("sd.hint", "The type of the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"LinkId", /*!#*/"The linkId for the item", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Text", /*!#*/"Text for the item", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Definition", /*!#*/"Minimum and Maximum # of times the the itemcan appear in the instance", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Answer", /*!#*/"The type of the item", null, 0));
|
||||
|
||||
boolean hasExt = false;
|
||||
// first we add a root for the questionaire itself
|
||||
|
@ -120,10 +120,10 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
Row r = gen.new Row();
|
||||
rows.add(r);
|
||||
|
||||
r.setIcon("icon_q_root.gif", "QuestionnaireResponseRoot");
|
||||
r.setIcon("icon_q_root.gif", /*!#*/"QuestionnaireResponseRoot");
|
||||
r.getCells().add(gen.new Cell(null, null, q.getId(), null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, "", null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, "QuestionnaireResponse", null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, /*!#*/"QuestionnaireResponse", null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, "", null, null));
|
||||
return r;
|
||||
}
|
||||
|
@ -136,18 +136,18 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
String ref = b == null ? null : b.primitiveValue();
|
||||
Questionnaire q = context.getContext().fetchResource(Questionnaire.class, ref);
|
||||
|
||||
r.setIcon("icon_q_root.gif", "QuestionnaireResponseRoot");
|
||||
r.setIcon("icon_q_root.gif", /*!#*/"QuestionnaireResponseRoot");
|
||||
r.getCells().add(gen.new Cell(null, null, qr.getId(), null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, "", null, null));
|
||||
if (ref == null ) {
|
||||
r.getCells().add(gen.new Cell(null, null, "", null, null));
|
||||
r.getCells().add(gen.new Cell("Questionnaire:", null, "None specified", null, null));
|
||||
r.getCells().add(gen.new Cell(/*!#*/"Questionnaire:", null, /*!#*/"None specified", null, null));
|
||||
} else if (q == null || !q.hasWebPath()) {
|
||||
r.getCells().add(gen.new Cell(null, null, "", null, null));
|
||||
r.getCells().add(gen.new Cell("Questionnaire:", null, ref, null, null));
|
||||
r.getCells().add(gen.new Cell(/*!#*/"Questionnaire:", null, ref, null, null));
|
||||
} else{
|
||||
r.getCells().add(gen.new Cell(null, null, "", null, null));
|
||||
r.getCells().add(gen.new Cell("Questionnaire:", q.getWebPath(), q.present(), null, null));
|
||||
r.getCells().add(gen.new Cell(/*!#*/"Questionnaire:", q.getWebPath(), q.present(), null, null));
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
@ -168,9 +168,9 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (hasItem) {
|
||||
r.setIcon("icon-q-group.png", "Group");
|
||||
r.setIcon("icon-q-group.png", /*!#*/"Group");
|
||||
} else {
|
||||
r.setIcon("icon-q-string.png", "Item");
|
||||
r.setIcon("icon-q-string.png", /*!#*/"Item");
|
||||
}
|
||||
String linkId = i.has("linkId") ? i.get("linkId").primitiveValue() : "??";
|
||||
String text = i.has("text") ? i.get("text").primitiveValue() : "";
|
||||
|
@ -235,9 +235,9 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
hasItem = a.hasItem();
|
||||
}
|
||||
if (hasItem) {
|
||||
r.setIcon("icon-q-group.png", "Group");
|
||||
r.setIcon("icon-q-group.png", /*!#*/"Group");
|
||||
} else {
|
||||
r.setIcon("icon-q-string.png", "Item");
|
||||
r.setIcon("icon-q-string.png", /*!#*/"Item");
|
||||
}
|
||||
r.getCells().add(gen.new Cell(null, context.getDefinitionsTarget() == null ? "" : context.getDefinitionsTarget()+"#item."+i.getLinkId(), i.getLinkId(), null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, i.getText(), null, null));
|
||||
|
@ -327,7 +327,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
public boolean renderForm(XhtmlNode x, ResourceWrapper q) throws UnsupportedEncodingException, IOException {
|
||||
boolean hasExt = false;
|
||||
XhtmlNode d = x.div();
|
||||
d.tx("todo");
|
||||
d.tx(/*!#*/"todo");
|
||||
// boolean hasPrefix = false;
|
||||
// for (QuestionnaireItemComponent c : q.getItem()) {
|
||||
// hasPrefix = hasPrefix || doesItemHavePrefix(c);
|
||||
|
@ -370,7 +370,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
// }
|
||||
// p.span(null, "linkId: "+i.getLinkId()).tx(i.getText());
|
||||
// if (i.getRequired()) {
|
||||
// p.span("color: red", "Mandatory").tx("*");
|
||||
// p.span("color: red", /*!#*/"Mandatory").tx("*");
|
||||
// }
|
||||
//
|
||||
// XhtmlNode input = null;
|
||||
|
@ -605,16 +605,16 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
// }
|
||||
//
|
||||
private boolean renderLinks(XhtmlNode x, QuestionnaireResponse q) {
|
||||
x.para().tx("Try this QuestionnaireResponse out:");
|
||||
x.para().tx(/*!#*/"Try this QuestionnaireResponse out:");
|
||||
XhtmlNode ul = x.ul();
|
||||
ul.li().ah("http://todo.nlm.gov/path?mode=ig&src="+Utilities.pathURL(context.getLink(KnownLinkType.SELF), "package.tgz")+"&q="+q.getId()+".json").tx("NLM Forms Library");
|
||||
ul.li().ah("http://todo.nlm.gov/path?mode=ig&src="+Utilities.pathURL(context.getLink(KnownLinkType.SELF), "package.tgz")+"&q="+q.getId()+".json").tx(/*!#*/"NLM Forms Library");
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean renderLinks(XhtmlNode x, ResourceWrapper q) {
|
||||
x.para().tx("Try this QuestionnaireResponse out:");
|
||||
x.para().tx(/*!#*/"Try this QuestionnaireResponse out:");
|
||||
XhtmlNode ul = x.ul();
|
||||
ul.li().ah("http://todo.nlm.gov/path?mode=ig&src="+Utilities.pathURL(context.getLink(KnownLinkType.SELF), "package.tgz")+"&q="+q.getId()+".json").tx("NLM Forms Library");
|
||||
ul.li().ah("http://todo.nlm.gov/path?mode=ig&src="+Utilities.pathURL(context.getLink(KnownLinkType.SELF), "package.tgz")+"&q="+q.getId()+".json").tx(/*!#*/"NLM Forms Library");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -711,13 +711,13 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
// }
|
||||
// if (qi.hasAnswerOption()) {
|
||||
// XhtmlNode tr = tbl.tr();
|
||||
// tr.td().tx("Allowed Answers");
|
||||
// tr.td().tx(/*!#*/"Allowed Answers");
|
||||
// XhtmlNode ul = tr.td().ul();
|
||||
// for (QuestionnaireItemAnswerOptionComponent ans : qi.getAnswerOption()) {
|
||||
// XhtmlNode li = ul.li();
|
||||
// render(li, ans.getValue());
|
||||
// if (ans.getInitialSelected()) {
|
||||
// li.tx(" (initially selected)");
|
||||
// li.tx(/*!#*/" (initially selected)");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
@ -738,7 +738,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
// // appearance
|
||||
// if (qi.hasExtension(" http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory")) {
|
||||
// XhtmlNode tr = tbl.tr();
|
||||
// tr.td().ah("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory").tx("Display Category");
|
||||
// tr.td().ah("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory").tx(/*!#*/"Display Category");
|
||||
// render(tr.td(), qi.getExtensionByUrl("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory").getValue());
|
||||
// }
|
||||
// if (ToolingExtensions.readBoolExtension(qi, "http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-hidden")) {
|
||||
|
@ -763,14 +763,14 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
// }
|
||||
// if (qi.hasExtension("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-QuestionnaireResponse-observationLinkPeriod")) {
|
||||
// XhtmlNode tr = tbl.tr();
|
||||
// tr.td().ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-QuestionnaireResponse-observationLinkPeriod").tx("Observation Link Period");
|
||||
// tr.td().ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-QuestionnaireResponse-observationLinkPeriod").tx(/*!#*/"Observation Link Period");
|
||||
// render(tr.td(), qi.getExtensionByUrl("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-QuestionnaireResponse-observationLinkPeriod").getValue());
|
||||
// }
|
||||
//
|
||||
// // dynamic management
|
||||
// if (qi.hasEnableWhen()) {
|
||||
// XhtmlNode tr = tbl.tr();
|
||||
// tr.td().tx("Enable When");
|
||||
// tr.td().tx(/*!#*/"Enable When");
|
||||
// td = tr.td();
|
||||
// if (qi.getEnableWhen().size() == 1) {
|
||||
// renderEnableWhen(td, qi.getEnableWhen().get(0));
|
||||
|
@ -876,12 +876,12 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
|
||||
@Override
|
||||
public String display(Resource r) throws UnsupportedEncodingException, IOException {
|
||||
return "todo";
|
||||
return /*!#*/"todo";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String display(ResourceWrapper r) throws UnsupportedEncodingException, IOException {
|
||||
return "Not done yet";
|
||||
return /*!#*/"Not done yet";
|
||||
}
|
||||
|
||||
}
|
|
@ -1,13 +1,15 @@
|
|||
package org.hl7.fhir.r5.renderers;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.hl7.fhir.r5.comparison.VersionComparisonAnnotation;
|
||||
import org.hl7.fhir.r5.context.IWorkerContext;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.GenerationRules;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.KnownLinkType;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext.ResourceRendererMode;
|
||||
import org.hl7.fhir.r5.utils.TranslatingUtilities;
|
||||
import org.hl7.fhir.utilities.MarkDownProcessor;
|
||||
import org.hl7.fhir.utilities.StandardsStatus;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
@ -33,7 +35,7 @@ import org.hl7.fhir.utilities.xhtml.XhtmlNode;
|
|||
* @author graha
|
||||
*
|
||||
*/
|
||||
public class Renderer extends TranslatingUtilities {
|
||||
public class Renderer {
|
||||
|
||||
protected RenderingContext context;
|
||||
|
||||
|
@ -46,42 +48,14 @@ public class Renderer extends TranslatingUtilities {
|
|||
}
|
||||
|
||||
|
||||
protected static final String RENDER_BUNDLE_HEADER_ROOT = "RENDER_BUNDLE_HEADER_ROOT";
|
||||
protected static final String RENDER_BUNDLE_HEADER_ENTRY = "RENDER_BUNDLE_HEADER_ENTRY";
|
||||
protected static final String RENDER_BUNDLE_HEADER_ENTRY_URL = "RENDER_BUNDLE_HEADER_ENTRY_URL";
|
||||
protected static final String RENDER_BUNDLE_RESOURCE = "RENDER_BUNDLE_RESOURCE";
|
||||
protected static final String RENDER_BUNDLE_SEARCH = "RENDER_BUNDLE_SEARCH";
|
||||
protected static final String RENDER_BUNDLE_SEARCH_MODE = "RENDER_BUNDLE_SEARCH_MODE";
|
||||
protected static final String RENDER_BUNDLE_SEARCH_SCORE = "RENDER_BUNDLE_SEARCH_SCORE";
|
||||
protected static final String RENDER_BUNDLE_RESPONSE = "RENDER_BUNDLE_RESPONSE";
|
||||
protected static final String RENDER_BUNDLE_LOCATION = "RENDER_BUNDLE_LOCATION";
|
||||
protected static final String RENDER_BUNDLE_ETAG = "RENDER_BUNDLE_ETAG";
|
||||
protected static final String RENDER_BUNDLE_LAST_MOD = "RENDER_BUNDLE_LAST_MOD";
|
||||
protected static final String RENDER_BUNDLE_REQUEST = "RENDER_BUNDLE_REQUEST";
|
||||
protected static final String RENDER_BUNDLE_IF_NON_MATCH = "RENDER_BUNDLE_IF_NON_MATCH";
|
||||
protected static final String RENDER_BUNDLE_IF_MOD = "RENDER_BUNDLE_IF_MOD";
|
||||
protected static final String RENDER_BUNDLE_IF_MATCH = "RENDER_BUNDLE_IF_MATCH";
|
||||
protected static final String RENDER_BUNDLE_IF_NONE = "RENDER_BUNDLE_IF_NONE";
|
||||
protected static final String RENDER_BUNDLE_DOCUMENT_CONTENT = "RENDER_BUNDLE_DOCUMENT_CONTENT";
|
||||
protected static final String RENDER_BUNDLE_HEADER_DOC_ENTRY_URD = "RENDER_BUNDLE_HEADER_DOC_ENTRY_URD";
|
||||
protected static final String RENDER_BUNDLE_HEADER_DOC_ENTRY_U = "RENDER_BUNDLE_HEADER_DOC_ENTRY_U";
|
||||
protected static final String RENDER_BUNDLE_HEADER_DOC_ENTRY_RD = "RENDER_BUNDLE_HEADER_DOC_ENTRY_RD";
|
||||
|
||||
/** the plan here is to make this have it's own implementation of messages, rather than using the
|
||||
* validator messages, for better alignment with publisher I18n strategy
|
||||
*
|
||||
* @param theMessage
|
||||
* @param theMessageArguments
|
||||
* @return
|
||||
*/
|
||||
protected String formatMessage(String theMessage, Object... theMessageArguments) {
|
||||
return context.getWorker().formatMessage(theMessage, theMessageArguments);
|
||||
return context.formatMessage(theMessage, theMessageArguments);
|
||||
}
|
||||
|
||||
public void genStandardsStatus(XhtmlNode td, StandardsStatus ss) {
|
||||
if (ss != null) {
|
||||
td.tx(" ");
|
||||
XhtmlNode a = td.ah(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "versions.html#std-process"), "Standards Status = "+ss.toDisplay());
|
||||
XhtmlNode a = td.ah(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "versions.html#std-process"), /*!#*/"Standards Status = "+ss.toDisplay());
|
||||
a.style("padding-left: 3px; padding-right: 3px; border: 1px grey solid; font-weight: bold; color: black; background-color: "+ss.getColor());
|
||||
a.tx(ss.getAbbrev());
|
||||
}
|
||||
|
@ -98,21 +72,21 @@ public class Renderer extends TranslatingUtilities {
|
|||
switch (vca.getType()) {
|
||||
case Added:
|
||||
XhtmlNode spanOuter = x.span("border: solid 1px #dddddd; margin: 2px; padding: 2px", null);
|
||||
XhtmlNode spanInner = spanOuter.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This content has been added since "+context.getChangeVersion());
|
||||
XhtmlNode spanInner = spanOuter.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This content has been added since "+context.getChangeVersion());
|
||||
spanInner.img("icon-change-add.png", "icon");
|
||||
spanInner.tx(" Added:");
|
||||
spanInner.tx(" "+/*!#*/"Added:");
|
||||
return spanOuter;
|
||||
case Changed:
|
||||
spanOuter = x.span("border: solid 1px #dddddd; margin: 2px; padding: 2px", null);
|
||||
spanInner = spanOuter.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This content has been changed since "+context.getChangeVersion()+(vca.getOriginal() != null ? " (was '"+vca.getOriginal()+"')" : ""));
|
||||
spanInner = spanOuter.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This content has been changed since "+context.getChangeVersion()+(vca.getOriginal() != null ? " (was '"+vca.getOriginal()+"')" : ""));
|
||||
spanInner.img("icon-change-edit.png", "icon");
|
||||
spanInner.tx(" Changed:");
|
||||
spanInner.tx(" "+/*!#*/"Changed:");
|
||||
return spanOuter;
|
||||
case Deleted:
|
||||
spanOuter = x.span("border: solid 1px #dddddd; margin: 2px; padding: 2px", null);
|
||||
spanInner = spanOuter.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This content has been removed since "+context.getChangeVersion());
|
||||
spanInner = spanOuter.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This content has been removed since "+context.getChangeVersion());
|
||||
spanInner.img("icon-change-remove.png", "icon");
|
||||
spanInner.tx(" Removed:");
|
||||
spanInner.tx(" "+/*!#*/"Removed:");
|
||||
return spanOuter.strikethrough();
|
||||
default:
|
||||
return x;
|
||||
|
@ -130,21 +104,21 @@ public class Renderer extends TranslatingUtilities {
|
|||
switch (vca.getType()) {
|
||||
case Added:
|
||||
XhtmlNode divOuter = x.div("border: solid 1px #dddddd; margin: 2px; padding: 2px");
|
||||
XhtmlNode spanInner = divOuter.para().style("margin: 0").span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This content has been added since "+context.getChangeVersion());
|
||||
XhtmlNode spanInner = divOuter.para().style("margin: 0").span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This content has been added since "+context.getChangeVersion());
|
||||
spanInner.img("icon-change-add.png", "icon");
|
||||
spanInner.tx(" Added:");
|
||||
spanInner.tx(" "+/*!#*/"Added:");
|
||||
return divOuter;
|
||||
case Changed:
|
||||
divOuter = x.div("border: solid 1px #dddddd; margin: 2px; padding: 2px");
|
||||
spanInner = divOuter.para().style("margin: 0").span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This content has been changed since "+context.getChangeVersion()+(vca.getOriginal() != null ? " (was '"+(vca.getOriginal())+"')" : ""));
|
||||
spanInner = divOuter.para().style("margin: 0").span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This content has been changed since "+context.getChangeVersion()+(vca.getOriginal() != null ? " (was '"+(vca.getOriginal())+"')" : ""));
|
||||
spanInner.img("icon-change-edit.png", "icon");
|
||||
spanInner.tx(" Changed:");
|
||||
spanInner.tx(" "+/*!#*/"Changed:");
|
||||
return divOuter;
|
||||
case Deleted:
|
||||
divOuter = x.div("border: solid 1px #dddddd; margin: 2px; padding: 2px");
|
||||
spanInner = divOuter.para().style("margin: 0").span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This content has been removed since "+context.getChangeVersion());
|
||||
spanInner = divOuter.para().style("margin: 0").span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This content has been removed since "+context.getChangeVersion());
|
||||
spanInner.img("icon-change-remove.png", "icon");
|
||||
spanInner.tx(" Removed:");
|
||||
spanInner.tx(" "+/*!#*/"Removed:");
|
||||
return divOuter.strikethrough();
|
||||
default:
|
||||
return x;
|
||||
|
@ -166,27 +140,27 @@ public class Renderer extends TranslatingUtilities {
|
|||
tr.style("border: solid 1px #dddddd; margin: 2px; padding: 2px");
|
||||
}
|
||||
XhtmlNode td = tr.td();
|
||||
XhtmlNode span = td.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This row of content has been added since "+context.getChangeVersion());
|
||||
XhtmlNode span = td.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px",/*!#*/"This row of content has been added since "+context.getChangeVersion());
|
||||
span.img("icon-change-add.png", "icon");
|
||||
span.tx(" Added:");
|
||||
span.tx(" "+/*!#*/"Added:");
|
||||
XhtmlNode x = new XhtmlNode(NodeType.Element, "holder");
|
||||
x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This row of content has been added since "+context.getChangeVersion()).tx(" ");
|
||||
x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This row of content has been added since "+context.getChangeVersion()).tx(" ");
|
||||
tr.styleCells(x);
|
||||
return td;
|
||||
case Changed:
|
||||
td = tr.td();
|
||||
span = td.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This row of content has been changed since"+context.getChangeVersion()+(vca.getOriginal() != null ? " (was '"+vca.getOriginal()+"')" : ""));
|
||||
span = td.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This row of content has been changed since"+context.getChangeVersion()+(vca.getOriginal() != null ? " (was '"+vca.getOriginal()+"')" : ""));
|
||||
span.img("icon-change-edit.png", "icon");
|
||||
span.tx(" Changed:");
|
||||
span.tx(" "+/*!#*/"Changed:");
|
||||
return td;
|
||||
case Deleted:
|
||||
tr.style("text-decoration: line-through");
|
||||
td = tr.td();
|
||||
span = td.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This content has been removed since "+context.getChangeVersion());
|
||||
span = td.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This content has been removed since "+context.getChangeVersion());
|
||||
span.img("icon-change-remove.png", "icon");
|
||||
span.tx(" Removed:");
|
||||
span.tx(" "+/*!#*/"Removed:");
|
||||
x = new XhtmlNode(NodeType.Element, "holder");
|
||||
x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px; text-decoration: none", "This row of content has been added since "+context.getChangeVersion()).tx(" ");
|
||||
x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px; text-decoration: none", /*!#*/"This row of content has been added since "+context.getChangeVersion()).tx(" ");
|
||||
tr.styleCells(x);
|
||||
return td;
|
||||
default:
|
||||
|
@ -199,24 +173,24 @@ public class Renderer extends TranslatingUtilities {
|
|||
VersionComparisonAnnotation self = (VersionComparisonAnnotation) base.getUserData(VersionComparisonAnnotation.USER_DATA_NAME);
|
||||
switch (self.getType()) {
|
||||
case Added:
|
||||
XhtmlNode spanInner = x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This content has been added since "+version);
|
||||
XhtmlNode spanInner = x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This content has been added since "+version);
|
||||
spanInner.img("icon-change-add.png", "icon");
|
||||
spanInner.tx(" Added");
|
||||
spanInner.tx(" "+/*!#*/"Added");
|
||||
return;
|
||||
case Changed:
|
||||
if (self.getComp().noChangeOtherThanMetadata(metadataFields)) {
|
||||
x.span("color: #eeeeee").tx("n/c");
|
||||
return;
|
||||
} else {
|
||||
spanInner = x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This content has been changed since "+version+(self.getOriginal() != null ? " (was '"+(self.getOriginal())+"')" : ""));
|
||||
spanInner = x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This content has been changed since "+version+(self.getOriginal() != null ? " (was '"+(self.getOriginal())+"')" : ""));
|
||||
spanInner.img("icon-change-edit.png", "icon");
|
||||
spanInner.tx(" Changed");
|
||||
spanInner.tx(" "+/*!#*/"Changed");
|
||||
}
|
||||
return;
|
||||
case Deleted:
|
||||
spanInner = x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", "This content has been added since "+version);
|
||||
spanInner = x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", /*!#*/"This content has been added since "+version);
|
||||
spanInner.img("icon-change-remove.png", "icon");
|
||||
spanInner.tx(" Removed");
|
||||
spanInner.tx(" "+/*!#*/"Removed");
|
||||
return;
|
||||
default:
|
||||
x.span("color: #eeeeee").tx("n/c");
|
||||
|
@ -227,4 +201,20 @@ public class Renderer extends TranslatingUtilities {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public String egt(@SuppressWarnings("rawtypes") Enumeration<? extends Enum> value) {
|
||||
if (value == null || !value.hasPrimitiveValue()) {
|
||||
return null;
|
||||
} else {
|
||||
return (value == null || !value.hasPrimitiveValue()) ? null : value.asStringValue();
|
||||
}
|
||||
}
|
||||
|
||||
public String toStr(int value) {
|
||||
return Integer.toString(value);
|
||||
}
|
||||
|
||||
public String toStr(Date value) {
|
||||
return value.toString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,14 +43,14 @@ public class RequirementsRenderer extends ResourceRenderer {
|
|||
if (req.getActor().size() == 1) {
|
||||
ActorDefinition acd = context.getWorker().fetchResource(ActorDefinition.class, req.getActor().get(0).getValue(), req);
|
||||
XhtmlNode p = x.para();
|
||||
p.tx("These requirements apply to the actor ");
|
||||
p.tx(/*!#*/"These requirements apply to the actor ");
|
||||
if (acd == null) {
|
||||
p.code(req.getActor().get(0).getValue());
|
||||
} else {
|
||||
p.ah(acd.getWebPath()).tx(acd.present());
|
||||
}
|
||||
} else {
|
||||
x.para().tx("These requirements apply to the following actors:");
|
||||
x.para().tx(/*!#*/"These requirements apply to the following actors:");
|
||||
XhtmlNode ul = x.ul();
|
||||
for (CanonicalType a : req.getActor()) {
|
||||
ActorDefinition acd = context.getWorker().fetchResource(ActorDefinition.class, a.getValue(), req);
|
||||
|
@ -66,14 +66,14 @@ public class RequirementsRenderer extends ResourceRenderer {
|
|||
if (req.getDerivedFrom().size() == 1) {
|
||||
Requirements reqd = context.getWorker().fetchResource(Requirements.class, req.getDerivedFrom().get(0).getValue(), req);
|
||||
XhtmlNode p = x.para();
|
||||
p.tx("These requirements derive from ");
|
||||
p.tx(/*!#*/"These requirements derive from ");
|
||||
if (reqd == null) {
|
||||
p.code(req.getDerivedFrom().get(0).getValue());
|
||||
} else {
|
||||
p.ah(reqd.getWebPath()).tx(reqd.present());
|
||||
}
|
||||
} else {
|
||||
x.para().tx("These requirements are derived from the following requirements:");
|
||||
x.para().tx(/*!#*/"These requirements are derived from the following requirements:");
|
||||
XhtmlNode ul = x.ul();
|
||||
for (CanonicalType a : req.getDerivedFrom()) {
|
||||
Requirements reqd = context.getWorker().fetchResource(Requirements.class, a.getValue(), req);
|
||||
|
@ -87,7 +87,7 @@ public class RequirementsRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (req.hasReference()) {
|
||||
XhtmlNode p = x.para();
|
||||
p.tx("References: ");
|
||||
p.tx(/*!#*/"References: ");
|
||||
int i = 0;
|
||||
for (UrlType c : req.getReference()) {
|
||||
i++;
|
||||
|
@ -121,11 +121,11 @@ public class RequirementsRenderer extends ResourceRenderer {
|
|||
td = tr.td();
|
||||
addMarkdown(td, stmt.getRequirement());
|
||||
if (stmt.hasDerivedFrom() || stmt.hasSatisfiedBy() || stmt.hasReference() || stmt.hasSource()) {
|
||||
td.para().tx("Links:");
|
||||
td.para().tx(/*!#*/"Links:");
|
||||
XhtmlNode ul = td.ul();
|
||||
if (stmt.hasDerivedFrom()) {
|
||||
XhtmlNode li = ul.li();
|
||||
li.tx("Derived From: ");
|
||||
li.tx(/*!#*/"Derived From: ");
|
||||
String url = stmt.getDerivedFrom();
|
||||
String key = url.contains("#") ? url.substring(url.indexOf("#")+1) : "";
|
||||
if (url.contains("#")) { url = url.substring(0, url.indexOf("#")); };
|
||||
|
@ -143,7 +143,7 @@ public class RequirementsRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (stmt.hasSatisfiedBy()) {
|
||||
XhtmlNode li = ul.li();
|
||||
li.tx("Satisfied By: ");
|
||||
li.tx(/*!#*/"Satisfied By: ");
|
||||
first = true;
|
||||
for (UrlType c : stmt.getSatisfiedBy()) {
|
||||
if (first) first = false; else li.tx(", ");
|
||||
|
@ -162,7 +162,7 @@ public class RequirementsRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (stmt.hasReference()) {
|
||||
XhtmlNode li = ul.li();
|
||||
li.tx("References: ");
|
||||
li.tx(/*!#*/"References: ");
|
||||
int i = 0;
|
||||
for (UrlType c : stmt.getReference()) {
|
||||
i++;
|
||||
|
@ -176,7 +176,7 @@ public class RequirementsRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (stmt.hasSource()) {
|
||||
XhtmlNode li = ul.li();
|
||||
li.tx("Source: ");
|
||||
li.tx(/*!#*/"Source: ");
|
||||
first = true;
|
||||
for (Reference c : stmt.getSource()) {
|
||||
if (first) first = false; else li.tx(", ");
|
||||
|
|
|
@ -53,6 +53,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
|
||||
protected ResourceContext rcontext;
|
||||
protected XVerExtensionManager xverManager;
|
||||
protected boolean multiLangMode;
|
||||
|
||||
|
||||
public ResourceRenderer(RenderingContext context) {
|
||||
|
@ -73,6 +74,16 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
public boolean isMultiLangMode() {
|
||||
return multiLangMode;
|
||||
}
|
||||
|
||||
public ResourceRenderer setMultiLangMode(boolean multiLangMode) {
|
||||
this.multiLangMode = multiLangMode;
|
||||
return this;
|
||||
}
|
||||
|
||||
public XhtmlNode build(Resource dr) throws FHIRFormatError, DefinitionException, FHIRException, IOException, EOperationOutcome {
|
||||
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
|
||||
render(x, dr);
|
||||
|
@ -113,7 +124,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
}
|
||||
}
|
||||
if (r.hasNarrative()) {
|
||||
r.injectNarrative(x, hasExtensions ? NarrativeStatus.EXTENSIONS : NarrativeStatus.GENERATED);
|
||||
r.injectNarrative(this, x, hasExtensions ? NarrativeStatus.EXTENSIONS : NarrativeStatus.GENERATED);
|
||||
}
|
||||
return x;
|
||||
}
|
||||
|
@ -170,23 +181,31 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
public abstract String display(Resource r) throws UnsupportedEncodingException, IOException;
|
||||
public abstract String display(ResourceWrapper r) throws UnsupportedEncodingException, IOException;
|
||||
|
||||
public static void inject(DomainResource r, XhtmlNode x, NarrativeStatus status) {
|
||||
if (!x.hasAttribute("xmlns"))
|
||||
x.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
||||
if (r.hasLanguage()) {
|
||||
// use both - see https://www.w3.org/TR/i18n-html-tech-lang/#langvalues
|
||||
x.setAttribute("lang", r.getLanguage());
|
||||
x.setAttribute("xml:lang", r.getLanguage());
|
||||
}
|
||||
public void inject(DomainResource r, XhtmlNode x, NarrativeStatus status) {
|
||||
r.getText().setUserData("renderer.generated", true);
|
||||
if (!r.hasText() || !r.getText().hasDiv() || r.getText().getDiv().getChildNodes().isEmpty()) {
|
||||
if (!r.hasText() || !r.getText().hasDiv()) {
|
||||
r.setText(new Narrative());
|
||||
r.getText().setDiv(x);
|
||||
r.getText().setStatus(status);
|
||||
r.getText().setStatus(status);
|
||||
}
|
||||
if (multiLangMode) {
|
||||
if (!r.getText().hasDiv()) {
|
||||
XhtmlNode div = new XhtmlNode(NodeType.Element, "div");
|
||||
div.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
||||
r.getText().setDiv(div);
|
||||
} else {
|
||||
r.getText().getDiv().getChildNodes().removeIf(c -> !"div".equals(c.getName()) || !c.hasAttribute("xml:lang"));
|
||||
}
|
||||
markLanguage(x);
|
||||
r.getText().getDiv().getChildNodes().add(x);
|
||||
} else {
|
||||
XhtmlNode n = r.getText().getDiv();
|
||||
n.clear();
|
||||
n.getChildNodes().addAll(x.getChildNodes());
|
||||
if (!x.hasAttribute("xmlns"))
|
||||
x.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
||||
if (r.hasLanguage()) {
|
||||
// use both - see https://www.w3.org/TR/i18n-html-tech-lang/#langvalues
|
||||
x.setAttribute("lang", r.getLanguage());
|
||||
x.setAttribute("xml:lang", r.getLanguage());
|
||||
}
|
||||
r.getText().setDiv(x);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -210,11 +229,11 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
CanonicalResource cr = (CanonicalResource) target;
|
||||
if (url.contains("|")) {
|
||||
if (target.hasWebPath()) {
|
||||
x.ah(target.getWebPath()).tx(cr.present()+" (version "+cr.getVersion()+")");
|
||||
x.ah(target.getWebPath()).tx(cr.present()+/*!#*/" (version "+cr.getVersion()+")");
|
||||
} else {
|
||||
url = url.substring(0, url.indexOf("|"));
|
||||
x.code().tx(url);
|
||||
x.tx(": "+cr.present()+" (version "+cr.getVersion()+")");
|
||||
x.tx(": "+cr.present()+/*!#*/" (version "+cr.getVersion()+")");
|
||||
}
|
||||
} else {
|
||||
if (target.hasWebPath()) {
|
||||
|
@ -282,14 +301,14 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
if (tr != null && tr.getReference() != null) {
|
||||
link = tr.getReference();
|
||||
} else if (r.getReference().contains("?")) {
|
||||
text.append("Conditional Reference: ");
|
||||
text.append(/*!#*/"Conditional Reference: ");
|
||||
} else {
|
||||
link = r.getReference();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tr != null && tr.getReference() != null && tr.getReference().startsWith("#")) {
|
||||
text.append("See above (");
|
||||
text.append(/*!#*/"See above (");
|
||||
}
|
||||
// what to display: if text is provided, then that. if the reference was resolved, then show the name, or the generated narrative
|
||||
String display = r.hasDisplayElement() ? r.getDisplay() : null;
|
||||
|
@ -333,7 +352,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
} else if (name != null) {
|
||||
text.append(name);
|
||||
} else {
|
||||
text.append(". Description: (todo)");
|
||||
text.append(/*!#*/". Description: (todo)");
|
||||
}
|
||||
}
|
||||
if (tr != null && tr.getReference() != null && tr.getReference().startsWith("#")) {
|
||||
|
@ -356,7 +375,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
if (tr != null && tr.getReference() != null) {
|
||||
c = x.ah(tr.getReference());
|
||||
} else if (r.getReference().contains("?")) {
|
||||
x.tx("Conditional Reference: ");
|
||||
x.tx(/*!#*/"Conditional Reference: ");
|
||||
c = x.code("");
|
||||
} else {
|
||||
c = x.ah(r.getReference());
|
||||
|
@ -370,7 +389,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
c = x.span(null, null);
|
||||
}
|
||||
if (tr != null && tr.getReference() != null && tr.getReference().startsWith("#")) {
|
||||
c.tx("See above (");
|
||||
c.tx(/*!#*/"See above (");
|
||||
}
|
||||
// what to display: if text is provided, then that. if the reference was resolved, then show the name, or the generated narrative
|
||||
String display = r.hasDisplayElement() ? r.getDisplay() : null;
|
||||
|
@ -414,7 +433,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
} else if (name != null) {
|
||||
c.addText(name);
|
||||
} else {
|
||||
c.tx(". Generated Summary: ");
|
||||
c.tx(/*!#*/". Generated Summary: ");
|
||||
if (tr != null) {
|
||||
new ProfileDrivenRenderer(context).generateResourceSummary(c, tr.getResource(), true, r.getReference().startsWith("#"), true);
|
||||
}
|
||||
|
@ -446,7 +465,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
if (r.has("display")) {
|
||||
c.addText(r.get("display").primitiveValue());
|
||||
if (tr != null && tr.getResource() != null) {
|
||||
c.tx(". Generated Summary: ");
|
||||
c.tx(/*!#*/". Generated Summary: ");
|
||||
new ProfileDrivenRenderer(context).generateResourceSummary(c, tr.getResource(), true, v.startsWith("#"), false);
|
||||
}
|
||||
} else if (tr != null && tr.getResource() != null) {
|
||||
|
@ -525,12 +544,12 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
|
||||
protected void generateCopyright(XhtmlNode x, CanonicalResource cs) {
|
||||
XhtmlNode p = x.para();
|
||||
p.b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Copyright Statement:", context.getLang()));
|
||||
p.b().tx(getContext().formatMessage(RenderingContext.RESOURCE_COPYRIGHT));
|
||||
smartAddText(p, " " + cs.getCopyright());
|
||||
}
|
||||
|
||||
public String displayReference(Resource res, Reference r) throws UnsupportedEncodingException, IOException {
|
||||
return "todo";
|
||||
return /*!#*/"todo";
|
||||
}
|
||||
|
||||
|
||||
|
@ -575,10 +594,10 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
|
||||
protected String describeStatus(PublicationStatus status, boolean experimental) {
|
||||
switch (status) {
|
||||
case ACTIVE: return experimental ? "Experimental" : "Active";
|
||||
case DRAFT: return "draft";
|
||||
case RETIRED: return "retired";
|
||||
default: return "Unknown";
|
||||
case ACTIVE: return experimental ? /*!#*/"Experimental" : /*!#*/"Active";
|
||||
case DRAFT: return /*!#*/"draft";
|
||||
case RETIRED: return /*!#*/"retired";
|
||||
default: return /*!#*/"Unknown";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -624,35 +643,35 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
|
||||
if (id != null || lang != null || versionId != null || lastUpdated != null) {
|
||||
XhtmlNode p = plateStyle(div.para());
|
||||
p.tx("Resource ");
|
||||
p.tx(/*!#*/"Resource ");
|
||||
p.tx(r.fhirType());
|
||||
p.tx(" ");
|
||||
if (id != null) {
|
||||
p.tx("\""+id+"\" ");
|
||||
}
|
||||
if (versionId != null) {
|
||||
p.tx("Version \""+versionId+"\" ");
|
||||
p.tx(/*!#*/"Version \""+versionId+"\" ");
|
||||
}
|
||||
if (lastUpdated != null) {
|
||||
p.tx("Updated \"");
|
||||
p.tx(/*!#*/"Updated \"");
|
||||
renderDateTime(p, lastUpdated);
|
||||
p.tx("\" ");
|
||||
}
|
||||
if (lang != null) {
|
||||
p.tx(" (Language \""+lang+"\") ");
|
||||
p.tx(/*!#*/" (Language \""+lang+"\") ");
|
||||
}
|
||||
}
|
||||
if (ir != null) {
|
||||
plateStyle(div.para()).b().tx("Special rules apply: "+ir+"!");
|
||||
plateStyle(div.para()).b().tx(/*!#*/"Special rules apply: "+ir+"!");
|
||||
}
|
||||
if (source != null) {
|
||||
plateStyle(div.para()).tx("Information Source: "+source+"!");
|
||||
plateStyle(div.para()).tx(/*!#*/"Information Source: "+source+"!");
|
||||
}
|
||||
if (meta != null) {
|
||||
PropertyWrapper pl = meta.getChildByName("profile");
|
||||
if (pl.hasValues()) {
|
||||
XhtmlNode p = plateStyle(div.para());
|
||||
p.tx(Utilities.pluralize("Profile", pl.getValues().size())+": ");
|
||||
p.tx(Utilities.pluralize(/*!#*/"Profile", pl.getValues().size())+": ");
|
||||
boolean first = true;
|
||||
for (BaseWrapper bw : pl.getValues()) {
|
||||
if (first) first = false; else p.tx(", ");
|
||||
|
@ -662,7 +681,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
PropertyWrapper tl = meta.getChildByName("tag");
|
||||
if (tl.hasValues()) {
|
||||
XhtmlNode p = plateStyle(div.para());
|
||||
p.tx(Utilities.pluralize("Tag", tl.getValues().size())+": ");
|
||||
p.tx(Utilities.pluralize(/*!#*/"Tag", tl.getValues().size())+": ");
|
||||
boolean first = true;
|
||||
for (BaseWrapper bw : tl.getValues()) {
|
||||
if (first) first = false; else p.tx(", ");
|
||||
|
@ -676,7 +695,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
PropertyWrapper sl = meta.getChildByName("security");
|
||||
if (sl.hasValues()) {
|
||||
XhtmlNode p = plateStyle(div.para());
|
||||
p.tx(Utilities.pluralize("Security Label", tl.getValues().size())+": ");
|
||||
p.tx(Utilities.pluralize(/*!#*/"Security Label", tl.getValues().size())+": ");
|
||||
boolean first = true;
|
||||
for (BaseWrapper bw : sl.getValues()) {
|
||||
if (first) first = false; else p.tx(", ");
|
||||
|
@ -708,7 +727,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
render(dr);
|
||||
} catch (Exception e) {
|
||||
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
|
||||
x.para().tx("Error rendering: "+e.getMessage());
|
||||
x.para().tx(/*!#*/"Error rendering: "+e.getMessage());
|
||||
dr.setText(null);
|
||||
inject(dr, x, NarrativeStatus.GENERATED);
|
||||
}
|
||||
|
@ -809,4 +828,12 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void markLanguage(XhtmlNode x) {
|
||||
x.setAttribute("lang", context.getLang());
|
||||
x.setAttribute("xml:lang", context.getLang());
|
||||
x.addTag(0, "hr");
|
||||
x.addTag(0, "p").b().tx(context.getLocale().getDisplayName());
|
||||
x.addTag(0, "hr");
|
||||
}
|
||||
}
|
|
@ -47,7 +47,7 @@ public class SearchParameterRenderer extends TerminologyRenderer {
|
|||
genStandardsStatus(h2, ss);
|
||||
}
|
||||
XhtmlNode p = x.para();
|
||||
p.tx("Parameter ");
|
||||
p.tx(/*!#*/"Parameter ");
|
||||
p.code().tx(spd.getCode());
|
||||
p.tx(":");
|
||||
p.code().tx(spd.getType().toCode());
|
||||
|
@ -55,7 +55,7 @@ public class SearchParameterRenderer extends TerminologyRenderer {
|
|||
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().tx(Utilities.pluralize("Resource", spd.getBase().size()));
|
||||
tr.td().tx(Utilities.pluralize(/*!#*/"Resource", spd.getBase().size()));
|
||||
XhtmlNode td = tr.td();
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : spd.getBase()) {
|
||||
StructureDefinition sd = context.getWorker().fetchTypeDefinition(t.getCode());
|
||||
|
@ -68,23 +68,23 @@ public class SearchParameterRenderer extends TerminologyRenderer {
|
|||
}
|
||||
}
|
||||
tr = tbl.tr();
|
||||
tr.td().tx("Expression");
|
||||
tr.td().tx(/*!#*/"Expression");
|
||||
if (spd.hasExpression()) {
|
||||
tr.td().code().tx(spd.getExpression());
|
||||
} else {
|
||||
tr.td().tx("(none)");
|
||||
tr.td().tx(/*!#*/"(none)");
|
||||
}
|
||||
if (spd.hasProcessingMode()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx("Processing Mode");
|
||||
tr.td().tx(/*!#*/"Processing Mode");
|
||||
tr.td().tx(spd.getProcessingMode().getDisplay());
|
||||
}
|
||||
if (spd.hasTarget()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx(Utilities.pluralize("Target Resources", spd.getTarget().size()));
|
||||
tr.td().tx(Utilities.pluralize(/*!#*/"Target Resources", spd.getTarget().size()));
|
||||
td = tr.td();
|
||||
if (isAllConcreteResources(spd.getTarget())) {
|
||||
td.ah(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "resourcelist.html")).tx("All Resources");
|
||||
td.ah(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "resourcelist.html")).tx(/*!#*/"All Resources");
|
||||
} else {
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> t : spd.getTarget()) {
|
||||
StructureDefinition sd = context.getWorker().fetchTypeDefinition(t.getCode());
|
||||
|
@ -99,28 +99,28 @@ public class SearchParameterRenderer extends TerminologyRenderer {
|
|||
}
|
||||
}
|
||||
tr = tbl.tr();
|
||||
tr.td().tx("Multiples");
|
||||
tr.td().tx(/*!#*/"Multiples");
|
||||
XhtmlNode ul = tr.td().ul();
|
||||
if (!spd.hasMultipleAnd()) {
|
||||
ul.li().tx("multipleAnd: It's up to the server whether the parameter may repeat in order to specify multiple values that must all be true");
|
||||
ul.li().tx(/*!#*/"multipleAnd: It's up to the server whether the parameter may repeat in order to specify multiple values that must all be true");
|
||||
} else if (spd.getMultipleAnd()) {
|
||||
ul.li().tx("multipleAnd: The parameter may repeat in order to specify multiple values that must all be true");
|
||||
ul.li().tx(/*!#*/"multipleAnd: The parameter may repeat in order to specify multiple values that must all be true");
|
||||
} else {
|
||||
ul.li().tx("multipleAnd: The parameter may only appear once");
|
||||
ul.li().tx(/*!#*/"multipleAnd: The parameter may only appear once");
|
||||
}
|
||||
if (!spd.hasMultipleOr()) {
|
||||
ul.li().tx("multipleOr: It's up to the server whether the parameter can have multiple values (separated by comma) where at least one must be true");
|
||||
ul.li().tx(/*!#*/"multipleOr: It's up to the server whether the parameter can have multiple values (separated by comma) where at least one must be true");
|
||||
} else if (spd.getMultipleOr()) {
|
||||
ul.li().tx("multipleOr: The parameter may have multiple values (separated by comma) where at least one must be true");
|
||||
ul.li().tx(/*!#*/"multipleOr: The parameter may have multiple values (separated by comma) where at least one must be true");
|
||||
} else {
|
||||
ul.li().tx("multipleOr: The parameter may only have one value (no comma separators)");
|
||||
ul.li().tx(/*!#*/"multipleOr: The parameter may only have one value (no comma separators)");
|
||||
}
|
||||
|
||||
if (spd.hasComparator()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx("Comparators");
|
||||
tr.td().tx(/*!#*/"Comparators");
|
||||
td = tr.td();
|
||||
td.tx("Allowed: ");
|
||||
td.tx(/*!#*/"Allowed: ");
|
||||
for (Enumeration<SearchComparator> t : spd.getComparator()) {
|
||||
td.sep(", ");
|
||||
td.tx(t.asStringValue());
|
||||
|
@ -128,9 +128,9 @@ public class SearchParameterRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (spd.hasModifier()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx("Modifiers");
|
||||
tr.td().tx(/*!#*/"Modifiers");
|
||||
td = tr.td();
|
||||
td.tx("Allowed: ");
|
||||
td.tx(/*!#*/"Allowed: ");
|
||||
for (Enumeration<SearchModifierCode> t : spd.getModifier()) {
|
||||
td.sep(", ");
|
||||
td.tx(t.asStringValue());
|
||||
|
@ -138,9 +138,9 @@ public class SearchParameterRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (spd.hasChain()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx("Chains");
|
||||
tr.td().tx(/*!#*/"Chains");
|
||||
td = tr.td();
|
||||
td.tx("Allowed: ");
|
||||
td.tx(/*!#*/"Allowed: ");
|
||||
for (StringType t : spd.getChain()) {
|
||||
td.sep(", ");
|
||||
td.tx(t.asStringValue());
|
||||
|
@ -148,7 +148,7 @@ public class SearchParameterRenderer extends TerminologyRenderer {
|
|||
}
|
||||
|
||||
if (spd.hasComponent()) {
|
||||
x.para().b().tx("Components");
|
||||
x.para().b().tx(/*!#*/"Components");
|
||||
tbl = x.table("grid");
|
||||
for (SearchParameterComponentComponent t : spd.getComponent()) {
|
||||
tr = tbl.tr();
|
||||
|
@ -167,7 +167,7 @@ public class SearchParameterRenderer extends TerminologyRenderer {
|
|||
private boolean isAllConcreteResources(List<Enumeration<VersionIndependentResourceTypesAll>> list) {
|
||||
for (String s : context.getWorker().getResourceNames()) {
|
||||
StructureDefinition sd = context.getWorker().fetchTypeDefinition(s);
|
||||
if (!sd.getAbstract() && !Utilities.existsInList(sd.getType(), "Parameters")) {
|
||||
if (!sd.getAbstract() && !Utilities.existsInList(sd.getType(), /*!#*/"Parameters")) {
|
||||
boolean found = false;
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> c : list) {
|
||||
found = found || sd.getName().equals(c.getCode());
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -59,9 +59,9 @@ public class StructureMapRenderer extends TerminologyRenderer {
|
|||
private static final String COLOR_CONST = "blue";
|
||||
private static final String COLOR_VARIABLE = "maroon";
|
||||
private static final String COLOR_SYNTAX = "navy";
|
||||
private static final boolean RENDER_MULTIPLE_TARGETS_ONELINE = true;
|
||||
private static final boolean MULTIPLE_TARGETS_ONELINE = true;
|
||||
private static final String COLOR_SPECIAL = "#b36b00";
|
||||
private static final String DEFAULT_COMMENT = "This element was not defined prior to R5";
|
||||
private static final String DEFAULT_COMMENT = /*!#*/"This element was not defined prior to R5";
|
||||
|
||||
private String clauseComment = DEFAULT_COMMENT;
|
||||
|
||||
|
@ -382,7 +382,7 @@ public class StructureMapRenderer extends TerminologyRenderer {
|
|||
first = false;
|
||||
else
|
||||
x.color(COLOR_SYNTAX).tx(", ");
|
||||
if (RENDER_MULTIPLE_TARGETS_ONELINE)
|
||||
if (MULTIPLE_TARGETS_ONELINE)
|
||||
x.tx(" ");
|
||||
else {
|
||||
x.tx("\r\n");
|
||||
|
|
|
@ -49,39 +49,39 @@ public class SubscriptionTopicRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
if (st.hasResourceTrigger()) {
|
||||
TableData td = new TableData("Resource Triggers");
|
||||
TableData td = new TableData(/*!#*/"Resource Triggers");
|
||||
for (SubscriptionTopicResourceTriggerComponent rt : st.getResourceTrigger()) {
|
||||
TableRowData tr = td.addRow();
|
||||
if (rt.hasResource()) {
|
||||
tr.value("Resource", rt.getResourceElement());
|
||||
tr.value(/*!#*/"Resource", rt.getResourceElement());
|
||||
}
|
||||
for (Enumeration<InteractionTrigger> t : rt.getSupportedInteraction()) {
|
||||
tr.value("Interactions", t);
|
||||
tr.value(/*!#*/"Interactions", t);
|
||||
}
|
||||
if (rt.hasQueryCriteria()) {
|
||||
StringBuilder md = new StringBuilder();
|
||||
if (rt.getQueryCriteria().hasPrevious()) {
|
||||
md.append("* previous = "+rt.getQueryCriteria().getPrevious()+"\r\n");
|
||||
md.append(/*!#*/"* previous = "+rt.getQueryCriteria().getPrevious()+"\r\n");
|
||||
}
|
||||
if (rt.getQueryCriteria().hasResultForCreate()) {
|
||||
md.append("* create result = "+rt.getQueryCriteria().getResultForCreate()+"\r\n");
|
||||
md.append(/*!#*/"* create result = "+rt.getQueryCriteria().getResultForCreate()+"\r\n");
|
||||
}
|
||||
if (rt.getQueryCriteria().hasCurrent()) {
|
||||
md.append("* create result = "+rt.getQueryCriteria().getCurrent()+"\r\n");
|
||||
md.append(/*!#*/"* create result = "+rt.getQueryCriteria().getCurrent()+"\r\n");
|
||||
}
|
||||
if (rt.getQueryCriteria().hasPrevious()) {
|
||||
md.append("* delete result = "+rt.getQueryCriteria().getResultForDelete()+"\r\n");
|
||||
md.append(/*!#*/"* delete result = "+rt.getQueryCriteria().getResultForDelete()+"\r\n");
|
||||
}
|
||||
if (rt.getQueryCriteria().hasRequireBoth()) {
|
||||
md.append("* require both = "+rt.getQueryCriteria().getRequireBoth()+"\r\n");
|
||||
md.append(/*!#*/"* require both = "+rt.getQueryCriteria().getRequireBoth()+"\r\n");
|
||||
}
|
||||
tr.value("Criteria", new MarkdownType(md.toString()));
|
||||
tr.value(/*!#*/"Criteria", new MarkdownType(md.toString()));
|
||||
}
|
||||
if (rt.hasFhirPathCriteriaElement()) {
|
||||
tr.value("FHIR Path", rt.getFhirPathCriteriaElement());
|
||||
tr.value(/*!#*/"FHIR Path", rt.getFhirPathCriteriaElement());
|
||||
}
|
||||
if (rt.hasDescription()) {
|
||||
tr.value("Description", rt.getDescriptionElement());
|
||||
tr.value(/*!#*/"Description", rt.getDescriptionElement());
|
||||
}
|
||||
}
|
||||
renderTable(td, x);
|
||||
|
@ -92,13 +92,13 @@ public class SubscriptionTopicRenderer extends ResourceRenderer {
|
|||
for (SubscriptionTopicEventTriggerComponent rt : st.getEventTrigger()) {
|
||||
TableRowData tr = td.addRow();
|
||||
if (rt.hasResource()) {
|
||||
tr.value("Resource", rt.getResourceElement());
|
||||
tr.value(/*!#*/"Resource", rt.getResourceElement());
|
||||
}
|
||||
if (rt.hasEvent()) {
|
||||
tr.value("Event", rt.getEvent());
|
||||
tr.value(/*!#*/"Event", rt.getEvent());
|
||||
}
|
||||
if (rt.hasDescription()) {
|
||||
tr.value("Description", rt.getDescriptionElement());
|
||||
tr.value(/*!#*/"Description", rt.getDescriptionElement());
|
||||
}
|
||||
}
|
||||
renderTable(td, x);
|
||||
|
@ -109,19 +109,19 @@ public class SubscriptionTopicRenderer extends ResourceRenderer {
|
|||
for (SubscriptionTopicCanFilterByComponent rt : st.getCanFilterBy()) {
|
||||
TableRowData tr = td.addRow();
|
||||
if (rt.hasResource()) {
|
||||
tr.value("Resource", rt.getResourceElement());
|
||||
tr.value(/*!#*/"Resource", rt.getResourceElement());
|
||||
}
|
||||
if (rt.hasFilterParameter()) {
|
||||
tr.value("Filter Parameter", rt.getFilterParameterElement());
|
||||
tr.value(/*!#*/"Filter Parameter", rt.getFilterParameterElement());
|
||||
}
|
||||
if (rt.hasFilterDefinition()) {
|
||||
tr.value("Filter Definition", rt.getFilterDefinitionElement());
|
||||
tr.value(/*!#*/"Filter Definition", rt.getFilterDefinitionElement());
|
||||
}
|
||||
for (Enumeration<SearchComparator> t : rt.getComparator()) {
|
||||
tr.value("Comparators", t);
|
||||
tr.value(/*!#*/"Comparators", t);
|
||||
}
|
||||
for (Enumeration<SearchModifierCode> t : rt.getModifier()) {
|
||||
tr.value("Modifiers", t);
|
||||
tr.value(/*!#*/"Modifiers", t);
|
||||
}
|
||||
}
|
||||
renderTable(td, x);
|
||||
|
@ -132,13 +132,13 @@ public class SubscriptionTopicRenderer extends ResourceRenderer {
|
|||
for (SubscriptionTopicNotificationShapeComponent rt : st.getNotificationShape()) {
|
||||
TableRowData tr = td.addRow();
|
||||
if (rt.hasResource()) {
|
||||
tr.value("Resource", rt.getResourceElement());
|
||||
tr.value(/*!#*/"Resource", rt.getResourceElement());
|
||||
}
|
||||
for (StringType t : rt.getInclude()) {
|
||||
tr.value("Includes", t);
|
||||
tr.value(/*!#*/"Includes", t);
|
||||
}
|
||||
for (StringType t : rt.getRevInclude()) {
|
||||
tr.value("Reverse Includes", t);
|
||||
tr.value(/*!#*/"Reverse Includes", t);
|
||||
}
|
||||
}
|
||||
renderTable(td, x);
|
||||
|
|
|
@ -209,23 +209,23 @@ public abstract class TerminologyRenderer extends ResourceRenderer {
|
|||
protected XhtmlNode addTableHeaderRowStandard(XhtmlNode t, boolean hasHierarchy, boolean hasDisplay, boolean definitions, boolean comments, boolean version, boolean deprecated, List<PropertyComponent> properties, List<String> langs, Map<String, String> designations, boolean doDesignations) {
|
||||
XhtmlNode tr = t.tr();
|
||||
if (hasHierarchy) {
|
||||
tr.td().b().tx("Lvl");
|
||||
tr.td().b().tx(/*!#*/"Lvl");
|
||||
}
|
||||
tr.td().attribute("style", "white-space:nowrap").b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Code", getContext().getLang()));
|
||||
tr.td().attribute("style", "white-space:nowrap").b().tx(formatMessage(RenderingContext.TX_CODE));
|
||||
if (hasDisplay) {
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Display", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.TX_DISPLAY));
|
||||
}
|
||||
if (definitions) {
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Definition", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.TX_DEFINITION));
|
||||
}
|
||||
if (deprecated) {
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Deprecated", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.TX_DEPRECATED));
|
||||
}
|
||||
if (comments) {
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Comments", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.TX_COMMENTS));
|
||||
}
|
||||
if (version) {
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", "Version", getContext().getLang()));
|
||||
tr.td().b().tx(formatMessage(RenderingContext.TX_VERSION));
|
||||
}
|
||||
if (properties != null) {
|
||||
for (PropertyComponent pc : properties) {
|
||||
|
@ -236,7 +236,7 @@ public abstract class TerminologyRenderer extends ResourceRenderer {
|
|||
display = pc.getCode();
|
||||
}
|
||||
}
|
||||
tr.td().b().tx(getContext().getWorker().translator().translate("xhtml-gen-cs", display, getContext().getLang()));
|
||||
tr.td().b().tx(display);
|
||||
}
|
||||
}
|
||||
if (doDesignations) {
|
||||
|
@ -307,7 +307,7 @@ public abstract class TerminologyRenderer extends ResourceRenderer {
|
|||
a.addText(value);
|
||||
} else if (value.equals("http://snomed.info/sct") || value.equals("http://snomed.info/id")) {
|
||||
XhtmlNode a = li.ah(value);
|
||||
a.tx("SNOMED-CT");
|
||||
a.tx(/*!#*/"SNOMED-CT");
|
||||
}
|
||||
else {
|
||||
if (value.startsWith("http://hl7.org") && !Utilities.existsInList(value, "http://hl7.org/fhir/sid/icd-10-us")) {
|
||||
|
@ -329,7 +329,7 @@ public abstract class TerminologyRenderer extends ResourceRenderer {
|
|||
|
||||
|
||||
protected void clipboard(XhtmlNode x, String img, String title, String source) {
|
||||
XhtmlNode span = x.span("cursor: pointer", "Copy "+title+" Format to clipboard");
|
||||
XhtmlNode span = x.span("cursor: pointer", /*!#*/"Copy "+title+" Format to clipboard");
|
||||
span.attribute("onClick", "navigator.clipboard.writeText('"+Utilities.escapeJson(source)+"');");
|
||||
span.img(img, "btn").setAttribute("width", "24px").setAttribute("height", "16px");
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
XhtmlNode p = null;
|
||||
if (!tp.getContact().isEmpty()) {
|
||||
p = x.para();
|
||||
p.b().tx("Contact:");
|
||||
p.b().tx(/*!#*/"Contact:");
|
||||
p.tx(" (");
|
||||
boolean firsti = true;
|
||||
for (ContactDetail ci : tp.getContact()) {
|
||||
|
@ -69,7 +69,7 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
|
||||
if (tp.hasCategory()) {
|
||||
p = x.para();
|
||||
p.b().tx("Category: ");
|
||||
p.b().tx(/*!#*/"Category: ");
|
||||
boolean first = true;
|
||||
for (CodeableConcept cc : tp.getCategory()) {
|
||||
if (first)
|
||||
|
@ -83,10 +83,10 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
if (tp.hasScope()) {
|
||||
if (tp.getScope().size() == 1) {
|
||||
p = x.para();
|
||||
p.b().tx("Test Plan Scope: ");
|
||||
p.b().tx(/*!#*/"Test Plan Scope: ");
|
||||
renderReference(tp, p, tp.getScopeFirstRep());
|
||||
} else {
|
||||
x.para().b().tx("Test Plan Scopes:");
|
||||
x.para().b().tx(/*!#*/"Test Plan Scopes:");
|
||||
XhtmlNode ul = x.ul();
|
||||
for (Reference ref : tp.getScope()) {
|
||||
renderReference(tp, ul.li(), ref);
|
||||
|
@ -97,7 +97,7 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
if (tp.hasDependency()) {
|
||||
if (tp.getDependency().size() == 1) {
|
||||
p = x.para();
|
||||
p.b().tx("Test Plan Dependency: ");
|
||||
p.b().tx(/*!#*/"Test Plan Dependency: ");
|
||||
XhtmlNode t = x.table("grid");
|
||||
XhtmlNode tr = t.tr();
|
||||
if (!Utilities.noString(tp.getDependencyFirstRep().getDescription())) {
|
||||
|
@ -106,7 +106,7 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
tr = t.tr();
|
||||
renderReference(tp, tr.td(), tp.getDependencyFirstRep().getPredecessor());
|
||||
} else {
|
||||
x.para().b().tx("Test Plan Dependencies:");
|
||||
x.para().b().tx(/*!#*/"Test Plan Dependencies:");
|
||||
XhtmlNode ul = x.ul();
|
||||
XhtmlNode li = null;
|
||||
for (TestPlanDependencyComponent d : tp.getDependency()) {
|
||||
|
@ -115,7 +115,7 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
addMarkdown(li, d.getDescription());
|
||||
}
|
||||
else {
|
||||
li.addText("Dependency - no description");
|
||||
li.addText(/*!#*/"Dependency - no description");
|
||||
}
|
||||
if (d.hasPredecessor()) {
|
||||
XhtmlNode liul = li.ul();
|
||||
|
@ -132,15 +132,15 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
|
||||
if (tp.hasTestCase()) {
|
||||
for (TestPlanTestCaseComponent tc : tp.getTestCase()) {
|
||||
x.h2().addText("Test Case" + (tc.hasSequence() ? " - Sequence" + tc.getSequence() : ""));
|
||||
x.h2().addText(/*!#*/"Test Case" + (tc.hasSequence() ? " - Sequence" + tc.getSequence() : ""));
|
||||
|
||||
if (tc.hasScope()) {
|
||||
if (tc.getScope().size() == 1) {
|
||||
p = x.para();
|
||||
p.b().tx("Test Case Scope: ");
|
||||
p.b().tx(/*!#*/"Test Case Scope: ");
|
||||
renderReference(tp, p, tc.getScopeFirstRep());
|
||||
} else {
|
||||
x.para().b().tx("Test Case Scopes:");
|
||||
x.para().b().tx(/*!#*/"Test Case Scopes:");
|
||||
XhtmlNode ul = x.ul();
|
||||
for (Reference ref : tc.getScope()) {
|
||||
renderReference(tp, ul.li(), ref);
|
||||
|
@ -150,7 +150,7 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
|
||||
if (tc.hasDependency()) {
|
||||
if (tc.getDependency().size() == 1) {
|
||||
x.h3().addText("Test Case Dependency");
|
||||
x.h3().addText(/*!#*/"Test Case Dependency");
|
||||
XhtmlNode t = x.table("grid");
|
||||
XhtmlNode tr = t.tr();
|
||||
if (!Utilities.noString(tc.getDependencyFirstRep().getDescription())) {
|
||||
|
@ -159,7 +159,7 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
tr = t.tr();
|
||||
renderReference(tp, tr.td(), tc.getDependencyFirstRep().getPredecessor());
|
||||
} else {
|
||||
x.h3().addText("Test Case Dependencies");
|
||||
x.h3().addText(/*!#*/"Test Case Dependencies");
|
||||
XhtmlNode ul = x.ul();
|
||||
XhtmlNode li = null;
|
||||
for (TestCaseDependencyComponent d : tc.getDependency()) {
|
||||
|
@ -168,7 +168,7 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
addMarkdown(li, d.getDescription());
|
||||
}
|
||||
else {
|
||||
li.addText("Dependency - no description");
|
||||
li.addText(/*!#*/"Dependency - no description");
|
||||
}
|
||||
if (d.hasPredecessor()) {
|
||||
XhtmlNode liul = li.ul();
|
||||
|
@ -181,14 +181,14 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
|
||||
if (tc.hasTestRun()) {
|
||||
if (tc.getTestRun().size() == 1) {
|
||||
x.h3().addText("Test Run");
|
||||
x.h3().addText(/*!#*/"Test Run");
|
||||
renderTestRun(x, tp, tc.getTestRunFirstRep());
|
||||
}
|
||||
else {
|
||||
int count = 0;
|
||||
for (TestPlanTestCaseTestRunComponent trun : tc.getTestRun()) {
|
||||
count++;
|
||||
x.h3().addText("Test Run " + count);
|
||||
x.h3().addText(/*!#*/"Test Run " + count);
|
||||
renderTestRun(x, tp, trun);
|
||||
}
|
||||
}
|
||||
|
@ -196,14 +196,14 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
|
||||
if (tc.hasTestData()) {
|
||||
if (tc.getTestData().size() == 1) {
|
||||
x.h3().addText("Test Data");
|
||||
x.h3().addText(/*!#*/"Test Data");
|
||||
renderTestData(x, tp, tc.getTestDataFirstRep());
|
||||
}
|
||||
else {
|
||||
int count = 0;
|
||||
for (TestPlanTestCaseTestDataComponent tdata : tc.getTestData()) {
|
||||
count++;
|
||||
x.h3().addText("Test Data " + count);
|
||||
x.h3().addText(/*!#*/"Test Data " + count);
|
||||
renderTestData(x, tp, tdata);
|
||||
}
|
||||
}
|
||||
|
@ -211,14 +211,14 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
|
||||
if (tc.hasAssertion()) {
|
||||
if (tc.getAssertion().size() == 1) {
|
||||
x.h3().addText("Assertion");
|
||||
x.h3().addText(/*!#*/"Assertion");
|
||||
renderAssertion(x, tp, tc.getAssertionFirstRep());
|
||||
}
|
||||
else {
|
||||
int count = 0;
|
||||
for (TestPlanTestCaseAssertionComponent as : tc.getAssertion()) {
|
||||
count++;
|
||||
x.h3().addText("Assertion " + count);
|
||||
x.h3().addText(/*!#*/"Assertion " + count);
|
||||
renderAssertion(x, tp, as);
|
||||
}
|
||||
}
|
||||
|
@ -237,8 +237,8 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
if (trun.hasScript()) {
|
||||
XhtmlNode t = x.table("grid");
|
||||
XhtmlNode tr = t.tr();
|
||||
tr.td().b().addText("Language");
|
||||
tr.td().b().addText("Source[x]");
|
||||
tr.td().b().addText(/*!#*/"Language");
|
||||
tr.td().b().addText(/*!#*/"Source[x]");
|
||||
tr = t.tr();
|
||||
if (trun.getScript().hasLanguage()) {
|
||||
renderCodeableConcept(tr.td(), trun.getScript().getLanguage(), false);
|
||||
|
@ -261,9 +261,9 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
private void renderTestData(XhtmlNode x, TestPlan tp, TestPlanTestCaseTestDataComponent tdata) throws FHIRFormatError, DefinitionException, IOException, FHIRException, EOperationOutcome {
|
||||
XhtmlNode t = x.table("grid");
|
||||
XhtmlNode tr = t.tr();
|
||||
tr.td().b().addText("Type");
|
||||
tr.td().b().addText("Content");
|
||||
tr.td().b().addText("Source[x]");
|
||||
tr.td().b().addText(/*!#*/"Type");
|
||||
tr.td().b().addText(/*!#*/"Content");
|
||||
tr.td().b().addText(/*!#*/"Source[x]");
|
||||
tr = t.tr();
|
||||
if (tdata.hasType()) {
|
||||
renderCoding(tr.td(), tdata.getType());
|
||||
|
@ -291,9 +291,9 @@ public class TestPlanRenderer extends ResourceRenderer {
|
|||
private void renderAssertion(XhtmlNode x, TestPlan tp, TestPlanTestCaseAssertionComponent as) throws FHIRFormatError, DefinitionException, IOException, FHIRException, EOperationOutcome {
|
||||
XhtmlNode t = x.table("grid");
|
||||
XhtmlNode tr = t.tr();
|
||||
tr.td().b().addText("Type");
|
||||
tr.td().b().addText("Content");
|
||||
tr.td().b().addText("Result");
|
||||
tr.td().b().addText(/*!#*/"Type");
|
||||
tr.td().b().addText(/*!#*/"Content");
|
||||
tr.td().b().addText(/*!#*/"Result");
|
||||
tr = t.tr();
|
||||
if (as.hasType()) {
|
||||
XhtmlNode td = tr.td();
|
||||
|
|
|
@ -78,7 +78,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
super(context, rcontext);
|
||||
}
|
||||
|
||||
private static final String ABSTRACT_CODE_HINT = "This code is not selectable ('Abstract')";
|
||||
private static final String ABSTRACT_CODE_HINT = /*!#*/"This code is not selectable ('Abstract')";
|
||||
|
||||
private static final int MAX_DESIGNATIONS_IN_LINE = 5;
|
||||
|
||||
|
@ -185,7 +185,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
|
||||
if (header) {
|
||||
XhtmlNode h = x.addTag(getHeader());
|
||||
h.tx("Value Set Contents");
|
||||
h.tx(/*!#*/"Value Set Contents");
|
||||
if (IsNotFixedExpansion(vs))
|
||||
addMarkdown(x, vs.getDescription());
|
||||
if (vs.hasCopyright())
|
||||
|
@ -207,9 +207,9 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
// }
|
||||
String msg = null;
|
||||
if (vs.getExpansion().getContains().isEmpty()) {
|
||||
msg = "This value set cannot be expanded because of the way it is defined - it has an infinite number of members."; // not sure that's true?
|
||||
msg = /*!#*/"This value set cannot be expanded because of the way it is defined - it has an infinite number of members."; // not sure that's true?
|
||||
} else {
|
||||
msg = "This value set cannot be fully expanded, but a selection ("+countMembership(vs)+" codes) of the whole set of codes is shown here.";
|
||||
msg = /*!#*/"This value set cannot be fully expanded, but a selection ("+countMembership(vs)+" codes) of the whole set of codes is shown here.";
|
||||
}
|
||||
x.para().style("border: maroon 1px solid; background-color: #FFCCCC; font-weight: bold; padding: 8px").addText(msg);
|
||||
} else {
|
||||
|
@ -217,17 +217,17 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (vs.getExpansion().hasTotal()) {
|
||||
if (count != vs.getExpansion().getTotal()) {
|
||||
x.para().style("border: maroon 1px solid; background-color: #FFCCCC; font-weight: bold; padding: 8px")
|
||||
.addText("This value set has "+(hasFragment ? "at least " : "")+vs.getExpansion().getTotal()+" codes in it. In order to keep the publication size manageable, only a selection ("+count+" codes) of the whole set of codes is shown.");
|
||||
.addText(/*!#*/"This value set has "+(hasFragment ? "at least " : "")+vs.getExpansion().getTotal()+" codes in it. In order to keep the publication size manageable, only a selection ("+count+" codes) of the whole set of codes is shown.");
|
||||
} else {
|
||||
x.para().tx("This value set contains "+(hasFragment ? "at least " : "")+vs.getExpansion().getTotal()+" concepts.");
|
||||
x.para().tx(/*!#*/"This value set contains "+(hasFragment ? "at least " : "")+vs.getExpansion().getTotal()+" concepts.");
|
||||
}
|
||||
} else if (count == 1000) {
|
||||
// it's possible that there's exactly 1000 codes, in which case wht we're about to do is wrong
|
||||
// work in progress to tighten up the terminology system to always return a total...
|
||||
String msg = "This value set has >1000 codes in it. In order to keep the publication size manageable, only a selection (1000 codes) of the whole set of codes is shown";
|
||||
String msg = /*!#*/"This value set has >1000 codes in it. In order to keep the publication size manageable, only a selection (1000 codes) of the whole set of codes is shown";
|
||||
x.para().style("border: maroon 1px solid; background-color: #FFCCCC; font-weight: bold; padding: 8px").addText(msg);
|
||||
} else {
|
||||
x.para().tx("This value set expansion contains "+count+" concepts.");
|
||||
x.para().tx(/*!#*/"This value set expansion contains "+count+" concepts.");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -245,21 +245,21 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
XhtmlNode t = x.table( "codes");
|
||||
XhtmlNode tr = t.tr();
|
||||
if (doLevel)
|
||||
tr.td().b().tx("Level");
|
||||
tr.td().attribute("style", "white-space:nowrap").b().tx("Code");
|
||||
tr.td().b().tx("System");
|
||||
tr.td().b().tx(/*!#*/"Level");
|
||||
tr.td().attribute("style", "white-space:nowrap").b().tx(/*!#*/"Code");
|
||||
tr.td().b().tx(/*!#*/"System");
|
||||
XhtmlNode tdDisp = tr.td();
|
||||
tdDisp.b().tx("Display");
|
||||
tdDisp.b().tx(/*!#*/"Display");
|
||||
boolean doDesignations = false;
|
||||
for (ValueSetExpansionContainsComponent c : vs.getExpansion().getContains()) {
|
||||
scanForDesignations(c, langs, designations);
|
||||
}
|
||||
scanForProperties(vs.getExpansion(), langs, properties);
|
||||
if (doInactive) {
|
||||
tr.td().b().tx("Inactive");
|
||||
tr.td().b().tx(/*!#*/"Inactive");
|
||||
}
|
||||
if (doDefinition) {
|
||||
tr.td().b().tx("Definition");
|
||||
tr.td().b().tx(/*!#*/"Definition");
|
||||
doDesignations = false;
|
||||
for (String n : Utilities.sorted(properties.keySet())) {
|
||||
tr.td().b().ah(properties.get(n)).addText(n);
|
||||
|
@ -295,15 +295,15 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (!doDesignations && langs.size() + designations.size() > 0) {
|
||||
Collections.sort(langs);
|
||||
if (designations.size() == 0) {
|
||||
x.para().b().tx("Additional Language Displays");
|
||||
x.para().b().tx(/*!#*/"Additional Language Displays");
|
||||
} else if (langs.size() == 0) {
|
||||
x.para().b().tx("Additional Designations");
|
||||
x.para().b().tx(/*!#*/"Additional Designations");
|
||||
} else {
|
||||
x.para().b().tx("Additional Designations and Language Displays");
|
||||
x.para().b().tx(/*!#*/"Additional Designations and Language Displays");
|
||||
}
|
||||
t = x.table("codes");
|
||||
tr = t.tr();
|
||||
tr.td().b().tx("Code");
|
||||
tr.td().b().tx(/*!#*/"Code");
|
||||
for (String url : designations.keySet()) {
|
||||
tr.td().b().addText(designations.get(url));
|
||||
}
|
||||
|
@ -343,8 +343,8 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
|
||||
private boolean generateContentModeNotices(XhtmlNode x, ValueSetExpansionComponent expansion, Resource vs) {
|
||||
generateContentModeNotice(x, expansion, "example", "Expansion based on example code system", vs);
|
||||
return generateContentModeNotice(x, expansion, "fragment", "Expansion based on code system fragment", vs);
|
||||
generateContentModeNotice(x, expansion, "example", /*!#*/"Expansion based on example code system", vs);
|
||||
return generateContentModeNotice(x, expansion, "fragment", /*!#*/"Expansion based on code system fragment", vs);
|
||||
}
|
||||
|
||||
private boolean generateContentModeNotice(XhtmlNode x, ValueSetExpansionComponent expansion, String mode, String text, Resource vs) {
|
||||
|
@ -487,14 +487,14 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (versions.size() == 1 && versions.get(s).size() == 1) {
|
||||
for (String v : versions.get(s)) { // though there'll only be one
|
||||
XhtmlNode p = x.para().style("border: black 1px dotted; background-color: #EEEEEE; padding: 8px; margin-bottom: 8px");
|
||||
p.tx("Expansion based on ");
|
||||
p.tx(/*!#*/"Expansion based on ");
|
||||
expRef(p, s, v, vs);
|
||||
}
|
||||
} else {
|
||||
for (String v : versions.get(s)) {
|
||||
if (first) {
|
||||
div = x.div().style("border: black 1px dotted; background-color: #EEEEEE; padding: 8px; margin-bottom: 8px");
|
||||
div.para().tx("Expansion based on: ");
|
||||
div.para().tx(/*!#*/"Expansion based on: ");
|
||||
ul = div.ul();
|
||||
first = false;
|
||||
}
|
||||
|
@ -514,30 +514,30 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (parts.length >= 5) {
|
||||
String m = describeModule(parts[4]);
|
||||
if (parts.length == 7) {
|
||||
x.tx("SNOMED CT "+m+" edition "+formatSCTDate(parts[6]));
|
||||
x.tx(/*!#*/"SNOMED CT "+m+" edition "+formatSCTDate(parts[6]));
|
||||
} else {
|
||||
x.tx("SNOMED CT "+m+" edition");
|
||||
x.tx(/*!#*/"SNOMED CT "+m+" edition");
|
||||
}
|
||||
} else {
|
||||
x.tx(describeSystem(u)+" version "+v);
|
||||
x.tx(describeSystem(u)+" "+/*!#*/"version "+v);
|
||||
}
|
||||
} else if (u.equals("http://loinc.org")) {
|
||||
String vd = describeLoincVer(v);
|
||||
if (vd != null) {
|
||||
x.tx("Loinc v"+v+" ("+vd+")");
|
||||
x.tx(/*!#*/"Loinc v"+v+" ("+vd+")");
|
||||
} else {
|
||||
x.tx("Loinc v"+v);
|
||||
x.tx(/*!#*/"Loinc v"+v);
|
||||
}
|
||||
} else if (Utilities.noString(v)) {
|
||||
CanonicalResource cr = (CanonicalResource) getContext().getWorker().fetchResource(Resource.class, u, source);
|
||||
if (cr != null) {
|
||||
if (cr.hasWebPath()) {
|
||||
x.ah(cr.getWebPath()).tx(t+" "+cr.present()+" (no version) ("+cr.fhirType()+")");
|
||||
x.ah(cr.getWebPath()).tx(t+" "+cr.present()+" "+/*!#*/"(no version) ("+cr.fhirType()+")");
|
||||
} else {
|
||||
x.tx(t+" "+describeSystem(u)+" (no version) ("+cr.fhirType()+")");
|
||||
x.tx(t+" "+describeSystem(u)+" "+/*!#*/"(no version) ("+cr.fhirType()+")");
|
||||
}
|
||||
} else {
|
||||
x.tx(t+" "+describeSystem(u)+" (no version)");
|
||||
x.tx(t+" "+describeSystem(u)+" "+/*!#*/"(no version)");
|
||||
}
|
||||
} else {
|
||||
CanonicalResource cr = (CanonicalResource) getContext().getWorker().fetchResource(Resource.class, u+"|"+v, source);
|
||||
|
@ -548,7 +548,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
x.tx(t+" "+describeSystem(u)+" v"+v+" ("+cr.fhirType()+")");
|
||||
}
|
||||
} else {
|
||||
x.tx(t+" "+describeSystem(u)+" version "+v);
|
||||
x.tx(t+" "+describeSystem(u)+" "+/*!#*/"version "+v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -620,21 +620,21 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
|
||||
private String describeModule(String module) {
|
||||
if ("900000000000207008".equals(module))
|
||||
return "International";
|
||||
return /*!#*/"International";
|
||||
if ("731000124108".equals(module))
|
||||
return "United States";
|
||||
return /*!#*/"United States";
|
||||
if ("32506021000036107".equals(module))
|
||||
return "Australian";
|
||||
return /*!#*/"Australian";
|
||||
if ("449081005".equals(module))
|
||||
return "Spanish";
|
||||
return /*!#*/"Spanish";
|
||||
if ("554471000005108".equals(module))
|
||||
return "Danish";
|
||||
return /*!#*/"Danish";
|
||||
if ("11000146104".equals(module))
|
||||
return "Dutch";
|
||||
return /*!#*/"Dutch";
|
||||
if ("45991000052106".equals(module))
|
||||
return "Swedish";
|
||||
return /*!#*/"Swedish";
|
||||
if ("999000041000000102".equals(module))
|
||||
return "United Kingdon";
|
||||
return /*!#*/"United Kingdon";
|
||||
return module;
|
||||
}
|
||||
|
||||
|
@ -828,7 +828,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (doInactive) {
|
||||
td = tr.td();
|
||||
if (c.getInactive()) {
|
||||
td.tx("inactive");
|
||||
td.tx(/*!#*/"inactive");
|
||||
}
|
||||
}
|
||||
if (doDefinition) {
|
||||
|
@ -960,26 +960,26 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
hasExtensions = genInclude(x.ul(), vs.getCompose().getInclude().get(0), "Include", langs, doDesignations, maps, designations, index, vs) || hasExtensions;
|
||||
} else {
|
||||
XhtmlNode p = x.para();
|
||||
p.tx("This value set includes codes based on the following rules:");
|
||||
p.tx(/*!#*/"This value set includes codes based on the following rules:");
|
||||
XhtmlNode ul = x.ul();
|
||||
for (ConceptSetComponent inc : vs.getCompose().getInclude()) {
|
||||
hasExtensions = genInclude(ul, inc, "Include", langs, doDesignations, maps, designations, index, vs) || hasExtensions;
|
||||
hasExtensions = genInclude(ul, inc, /*!#*/"Include", langs, doDesignations, maps, designations, index, vs) || hasExtensions;
|
||||
index++;
|
||||
}
|
||||
for (Base inc : VersionComparisonAnnotation.getDeleted(vs.getCompose(), "include")) {
|
||||
genInclude(ul, (ConceptSetComponent) inc, "Include", langs, doDesignations, maps, designations, index, vs);
|
||||
genInclude(ul, (ConceptSetComponent) inc, /*!#*/"Include", langs, doDesignations, maps, designations, index, vs);
|
||||
index++;
|
||||
}
|
||||
if (vs.getCompose().hasExclude() || VersionComparisonAnnotation.hasDeleted(vs.getCompose(), "exclude")) {
|
||||
p = x.para();
|
||||
p.tx("This value set excludes codes based on the following rules:");
|
||||
p.tx(/*!#*/"This value set excludes codes based on the following rules:");
|
||||
ul = x.ul();
|
||||
for (ConceptSetComponent exc : vs.getCompose().getExclude()) {
|
||||
hasExtensions = genInclude(ul, exc, "Exclude", langs, doDesignations, maps, designations, index, vs) || hasExtensions;
|
||||
hasExtensions = genInclude(ul, exc, /*!#*/"Exclude", langs, doDesignations, maps, designations, index, vs) || hasExtensions;
|
||||
index++;
|
||||
}
|
||||
for (Base inc : VersionComparisonAnnotation.getDeleted(vs.getCompose(), "exclude")) {
|
||||
genInclude(ul, (ConceptSetComponent) inc, "Exclude", langs, doDesignations, maps, designations, index, vs);
|
||||
genInclude(ul, (ConceptSetComponent) inc, /*!#*/"Exclude", langs, doDesignations, maps, designations, index, vs);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
@ -990,15 +990,15 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (!doDesignations && langs.size() + designations.size() > 0) {
|
||||
Collections.sort(langs);
|
||||
if (designations.size() == 0) {
|
||||
x.para().b().tx("Additional Language Displays");
|
||||
x.para().b().tx(/*!#*/"Additional Language Displays");
|
||||
} else if (langs.size() == 0) {
|
||||
x.para().b().tx("Additional Designations");
|
||||
x.para().b().tx(/*!#*/"Additional Designations");
|
||||
} else {
|
||||
x.para().b().tx("Additional Designations and Language Displays");
|
||||
x.para().b().tx(/*!#*/"Additional Designations and Language Displays");
|
||||
}
|
||||
XhtmlNode t = x.table("codes");
|
||||
XhtmlNode tr = t.tr();
|
||||
tr.td().b().tx("Code");
|
||||
tr.td().b().tx(/*!#*/"Code");
|
||||
for (String url : designations.keySet()) {
|
||||
tr.td().b().addText(designations.get(url));
|
||||
}
|
||||
|
@ -1017,24 +1017,24 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
|
||||
private void renderExpansionRules(XhtmlNode x, ConceptSetComponent inc, int index, Map<String, ConceptDefinitionComponent> definitions) throws FHIRException, IOException {
|
||||
String s = "This include specifies a heirarchy for when value sets are generated for use in a User Interface, but the rules are not properly defined";
|
||||
String s = /*!#*/"This include specifies a heirarchy for when value sets are generated for use in a User Interface, but the rules are not properly defined";
|
||||
if (inc.hasExtension(ToolingExtensions.EXT_EXPAND_RULES)) {
|
||||
String rule = inc.getExtensionString(ToolingExtensions.EXT_EXPAND_RULES);
|
||||
if (rule != null) {
|
||||
switch (rule) {
|
||||
case "all-codes": s = "This include specifies a heirarchy for when value sets are generated for use in a User Interface. The expansion contains all the codes, and also this structure:";
|
||||
case "ungrouped": s = "This include specifies a heirarchy for when value sets are generated for use in a User Interface. The expansion contains this structure, and any codes not found in the structure:";
|
||||
case "groups-only": s = "This include specifies a heirarchy for when value sets are generated for use in a User Interface. The expansion contains this structure:";
|
||||
case "all-codes": s = /*!#*/"This include specifies a heirarchy for when value sets are generated for use in a User Interface. The expansion contains all the codes, and also this structure:";
|
||||
case "ungrouped": s = /*!#*/"This include specifies a heirarchy for when value sets are generated for use in a User Interface. The expansion contains this structure, and any codes not found in the structure:";
|
||||
case "groups-only": s = /*!#*/"This include specifies a heirarchy for when value sets are generated for use in a User Interface. The expansion contains this structure:";
|
||||
}
|
||||
}
|
||||
}
|
||||
x.br();
|
||||
x.tx(s);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context.getDestDir(), context.isInlineGraphics(), true);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context, context.getDestDir(), context.isInlineGraphics(), true);
|
||||
TableModel model = gen.new TableModel("exp.h="+index, context.getRules() == GenerationRules.IG_PUBLISHER);
|
||||
model.setAlternating(true);
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("vs.exp.header", "Code"), translate("vs.exp.hint", "The code for the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), translate("vs.exp.header", "Display"), translate("vs.exp.hint", "The display for the item"), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Code", /*!#*/"The code for the item", null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), /*!#*/"Display", /*!#*/"The display for the item", null, 0));
|
||||
|
||||
for (Extension ext : inc.getExtensionsByUrl(ToolingExtensions.EXT_EXPAND_GROUP)) {
|
||||
renderExpandGroup(gen, model, ext, inc, definitions);
|
||||
|
@ -1142,9 +1142,9 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
switch (url) {
|
||||
case "http://snomed.info/sct#900000000000003001":
|
||||
return "Fully specified name";
|
||||
return /*!#*/"Fully specified name";
|
||||
case "http://snomed.info/sct#900000000000013009":
|
||||
return "Synonym";
|
||||
return /*!#*/"Synonym";
|
||||
default:
|
||||
// As specified in http://www.hl7.org/fhir/valueset-definitions.html#ValueSet.compose.include.concept.designation.use and in http://www.hl7.org/fhir/codesystem-definitions.html#CodeSystem.concept.designation.use the terminology binding is extensible.
|
||||
return url;
|
||||
|
@ -1178,14 +1178,14 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (inc.hasSystem()) {
|
||||
CodeSystem e = getContext().getWorker().fetchCodeSystem(inc.getSystem());
|
||||
if (inc.getConcept().size() == 0 && inc.getFilter().size() == 0) {
|
||||
li.addText(type+" all codes defined in ");
|
||||
li.addText(type+" "+/*!#*/"all codes defined in ");
|
||||
addCsRef(inc, li, e);
|
||||
} else {
|
||||
if (inc.getConcept().size() > 0) {
|
||||
li.addText(type+" these codes as defined in ");
|
||||
li.addText(type+" "+/*!#*/"these codes as defined in ");
|
||||
addCsRef(inc, li, e);
|
||||
if (inc.hasVersion()) {
|
||||
li.addText(" version ");
|
||||
li.addText(" "+/*!#*/"version ");
|
||||
li.code(inc.getVersion());
|
||||
}
|
||||
|
||||
|
@ -1212,24 +1212,24 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
}
|
||||
if (inc.getFilter().size() > 0) {
|
||||
li.addText(type+" codes from ");
|
||||
li.addText(type+" "+/*!#*/"codes from ");
|
||||
addCsRef(inc, li, e);
|
||||
li.tx(" where ");
|
||||
li.tx(" "+/*!#*/"where ");
|
||||
for (int i = 0; i < inc.getFilter().size(); i++) {
|
||||
ConceptSetFilterComponent f = inc.getFilter().get(i);
|
||||
if (i > 0) {
|
||||
if (i == inc.getFilter().size()-1) {
|
||||
li.tx(" and ");
|
||||
li.tx(" "+/*!#*/"and ");
|
||||
} else {
|
||||
li.tx(", ");
|
||||
li.tx(/*!#*/", ");
|
||||
}
|
||||
}
|
||||
XhtmlNode wli = renderStatus(f, li);
|
||||
if (f.getOp() == FilterOperator.EXISTS) {
|
||||
if (f.getValue().equals("true")) {
|
||||
wli.tx(f.getProperty()+" exists");
|
||||
wli.tx(f.getProperty()+" "+/*!#*/"exists");
|
||||
} else {
|
||||
wli.tx(f.getProperty()+" doesn't exist");
|
||||
wli.tx(f.getProperty()+" "+/*!#*/"doesn't exist");
|
||||
}
|
||||
} else {
|
||||
wli.tx(f.getProperty()+" "+describe(f.getOp())+" ");
|
||||
|
@ -1257,7 +1257,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
}
|
||||
if (inc.hasValueSet()) {
|
||||
li.tx(", where the codes are contained in ");
|
||||
li.tx(/*!#*/", where the codes are contained in ");
|
||||
boolean first = true;
|
||||
for (UriType vs : inc.getValueSet()) {
|
||||
if (first)
|
||||
|
@ -1273,7 +1273,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
renderExpansionRules(li, inc, index, definitions);
|
||||
}
|
||||
} else {
|
||||
li.tx("Import all the codes that are contained in ");
|
||||
li.tx(/*!#*/"Import all the codes that are contained in ");
|
||||
if (inc.getValueSet().size() < 4) {
|
||||
boolean first = true;
|
||||
for (UriType vs : inc.getValueSet()) {
|
||||
|
@ -1324,7 +1324,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (hasComments) {
|
||||
td = tr.td();
|
||||
if (ExtensionHelper.hasExtension(c, ToolingExtensions.EXT_VS_COMMENT)) {
|
||||
smartAddText(td, "Note: "+ToolingExtensions.readStringExtension(c, ToolingExtensions.EXT_VS_COMMENT));
|
||||
smartAddText(td, /*!#*/"Note: "+ToolingExtensions.readStringExtension(c, ToolingExtensions.EXT_VS_COMMENT));
|
||||
}
|
||||
}
|
||||
if (doDesignations) {
|
||||
|
@ -1405,7 +1405,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
ValueSetExpansionOutcome vso = getContext().getWorker().expandVS(vs, true, false);
|
||||
ValueSet valueset = vso.getValueset();
|
||||
if (valueset == null)
|
||||
throw new TerminologyServiceException("Error Expanding ValueSet: "+vso.getError());
|
||||
throw new TerminologyServiceException(/*!#*/"Error Expanding ValueSet: "+vso.getError());
|
||||
vse = valueset.getExpansion();
|
||||
|
||||
} catch (Exception e1) {
|
||||
|
@ -1502,18 +1502,18 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
|
||||
private String describe(FilterOperator op) {
|
||||
if (op == null)
|
||||
return " null ";
|
||||
return " "+/*!#*/"null ";
|
||||
switch (op) {
|
||||
case EQUAL: return " = ";
|
||||
case ISA: return " is-a ";
|
||||
case ISNOTA: return " is-not-a ";
|
||||
case REGEX: return " matches (by regex) ";
|
||||
case NULL: return " ?ngen-13? ";
|
||||
case IN: return " in ";
|
||||
case NOTIN: return " not in ";
|
||||
case DESCENDENTOF: return " descends from ";
|
||||
case EXISTS: return " exists ";
|
||||
case GENERALIZES: return " generalizes ";
|
||||
case EQUAL: return " "+/*!#*/"= ";
|
||||
case ISA: return " "+/*!#*/"is-a ";
|
||||
case ISNOTA: return " "+/*!#*/"is-not-a ";
|
||||
case REGEX: return " "+/*!#*/"matches (by regex) ";
|
||||
case NULL: return " "+/*!#*/"?ngen-13? ";
|
||||
case IN: return " "+/*!#*/"in ";
|
||||
case NOTIN: return " "+/*!#*/"not in ";
|
||||
case DESCENDENTOF: return " "+/*!#*/"descends from ";
|
||||
case EXISTS: return " "+/*!#*/"exists ";
|
||||
case GENERALIZES: return " "+/*!#*/"generalizes ";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class BaseWrappers {
|
|||
public Base getBase();
|
||||
public String getName();
|
||||
public void describe(XhtmlNode x) throws UnsupportedEncodingException, IOException;
|
||||
public void injectNarrative(XhtmlNode x, NarrativeStatus status) throws IOException;
|
||||
public void injectNarrative(ResourceRenderer renderer, XhtmlNode x, NarrativeStatus status) throws IOException;
|
||||
public BaseWrapper root();
|
||||
public PropertyWrapper getChildByName(String tail);
|
||||
public StructureDefinition getDefinition();
|
||||
|
|
|
@ -336,7 +336,7 @@ public class DOMWrappers {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void injectNarrative(XhtmlNode x, NarrativeStatus status) {
|
||||
public void injectNarrative(ResourceRenderer renderer, XhtmlNode x, NarrativeStatus status) {
|
||||
if (!x.hasAttribute("xmlns"))
|
||||
x.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
||||
Element le = XMLUtil.getNamedChild(wrapped, "language");
|
||||
|
|
|
@ -280,8 +280,8 @@ public class DirectWrappers {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void injectNarrative(XhtmlNode x, NarrativeStatus status) {
|
||||
ResourceRenderer.inject((DomainResource) wrapped, x, status);
|
||||
public void injectNarrative(ResourceRenderer renderer, XhtmlNode x, NarrativeStatus status) {
|
||||
renderer.inject((DomainResource) wrapped, x, status);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -19,12 +19,14 @@ import org.hl7.fhir.r5.model.Resource;
|
|||
import org.hl7.fhir.r5.model.Narrative.NarrativeStatus;
|
||||
import org.hl7.fhir.r5.model.StringType;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.renderers.ResourceRenderer;
|
||||
import org.hl7.fhir.r5.renderers.utils.BaseWrappers.BaseWrapper;
|
||||
import org.hl7.fhir.r5.renderers.utils.BaseWrappers.PropertyWrapper;
|
||||
import org.hl7.fhir.r5.renderers.utils.BaseWrappers.RendererWrapperImpl;
|
||||
import org.hl7.fhir.r5.renderers.utils.BaseWrappers.ResourceWrapper;
|
||||
import org.hl7.fhir.r5.renderers.utils.BaseWrappers.WrapperBaseImpl;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.xhtml.NodeType;
|
||||
import org.hl7.fhir.utilities.xhtml.XhtmlComposer;
|
||||
import org.hl7.fhir.utilities.xhtml.XhtmlNode;
|
||||
|
||||
|
@ -212,21 +214,14 @@ public class ElementWrappers {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void injectNarrative(XhtmlNode x, NarrativeStatus status) throws IOException {
|
||||
if (!x.hasAttribute("xmlns"))
|
||||
x.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
||||
String l = wrapped.getChildValue("language");
|
||||
if (!Utilities.noString(l)) {
|
||||
// use both - see https://www.w3.org/TR/i18n-html-tech-lang/#langvalues
|
||||
x.setAttribute("lang", l);
|
||||
x.setAttribute("xml:lang", l);
|
||||
}
|
||||
public void injectNarrative(ResourceRenderer renderer, XhtmlNode x, NarrativeStatus status) throws IOException {
|
||||
org.hl7.fhir.r5.elementmodel.Element txt = wrapped.getNamedChild("text");
|
||||
if (txt == null) {
|
||||
txt = new org.hl7.fhir.r5.elementmodel.Element("text", wrapped.getProperty().getChild(null, "text"));
|
||||
int i = 0;
|
||||
while (i < wrapped.getChildren().size() && (wrapped.getChildren().get(i).getName().equals("id") || wrapped.getChildren().get(i).getName().equals("meta") || wrapped.getChildren().get(i).getName().equals("implicitRules") || wrapped.getChildren().get(i).getName().equals("language")))
|
||||
while (i < wrapped.getChildren().size() && (wrapped.getChildren().get(i).getName().equals("id") || wrapped.getChildren().get(i).getName().equals("meta") || wrapped.getChildren().get(i).getName().equals("implicitRules") || wrapped.getChildren().get(i).getName().equals("language"))) {
|
||||
i++;
|
||||
}
|
||||
if (i >= wrapped.getChildren().size())
|
||||
wrapped.getChildren().add(txt);
|
||||
else
|
||||
|
@ -243,8 +238,31 @@ public class ElementWrappers {
|
|||
div = new org.hl7.fhir.r5.elementmodel.Element("div", txt.getProperty().getChild(null, "div"));
|
||||
txt.getChildren().add(div);
|
||||
}
|
||||
div.setValue(new XhtmlComposer(XhtmlComposer.XML, context.isPretty()).compose(x));
|
||||
div.setXhtml(x);
|
||||
// now process the xhtml
|
||||
if (renderer.isMultiLangMode()) {
|
||||
XhtmlNode xd = div.getXhtml();
|
||||
if (xd == null) {
|
||||
xd = new XhtmlNode(NodeType.Element, "div");
|
||||
xd.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
||||
div.setXhtml(xd);
|
||||
} else {
|
||||
xd.getChildNodes().removeIf(c -> !"div".equals(c.getName()) || !c.hasAttribute("xml:lang"));
|
||||
}
|
||||
renderer.markLanguage(x);
|
||||
xd.getChildNodes().add(x);
|
||||
} else {
|
||||
if (!x.hasAttribute("xmlns")) {
|
||||
x.setAttribute("xmlns", "http://www.w3.org/1999/xhtml");
|
||||
}
|
||||
String l = wrapped.getChildValue("language");
|
||||
if (!Utilities.noString(l)) {
|
||||
// use both - see https://www.w3.org/TR/i18n-html-tech-lang/#langvalues
|
||||
x.setAttribute("lang", l);
|
||||
x.setAttribute("xml:lang", l);
|
||||
}
|
||||
div.setXhtml(x);
|
||||
}
|
||||
div.setValue(new XhtmlComposer(XhtmlComposer.XML, context.isPretty()).compose(div.getXhtml()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package org.hl7.fhir.r5.renderers.utils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.NumberFormat;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
|
@ -17,16 +18,23 @@ import org.hl7.fhir.r5.context.IWorkerContext;
|
|||
import org.hl7.fhir.r5.elementmodel.Element;
|
||||
import org.hl7.fhir.r5.fhirpath.FHIRPathEngine.IEvaluationContext;
|
||||
import org.hl7.fhir.r5.model.Base;
|
||||
import org.hl7.fhir.r5.model.BaseDateTimeType;
|
||||
import org.hl7.fhir.r5.model.DateTimeType;
|
||||
import org.hl7.fhir.r5.model.DomainResource;
|
||||
import org.hl7.fhir.r5.model.Extension;
|
||||
import org.hl7.fhir.r5.model.PrimitiveType;
|
||||
import org.hl7.fhir.r5.model.StringType;
|
||||
import org.hl7.fhir.r5.renderers.utils.Resolver.IReferenceResolver;
|
||||
import org.hl7.fhir.r5.utils.ToolingExtensions;
|
||||
import org.hl7.fhir.utilities.FhirPublication;
|
||||
import org.hl7.fhir.utilities.MarkDownProcessor;
|
||||
import org.hl7.fhir.utilities.MarkDownProcessor.Dialect;
|
||||
import org.hl7.fhir.utilities.StandardsStatus;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.validation.ValidationOptions;
|
||||
|
||||
public class RenderingContext {
|
||||
public class RenderingContext extends RenderingI18nContext {
|
||||
|
||||
// provides liquid templates, if they are available for the content
|
||||
public interface ILiquidTemplateProvider {
|
||||
|
@ -165,7 +173,7 @@ public class RenderingContext {
|
|||
return this == XML_ALL || this == XML;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private IWorkerContext worker;
|
||||
private MarkDownProcessor markdown;
|
||||
private ResourceRendererMode mode;
|
||||
|
@ -202,7 +210,6 @@ public class RenderingContext {
|
|||
private boolean showComments = false;
|
||||
|
||||
private FhirPublication targetVersion;
|
||||
private Locale locale;
|
||||
private ZoneId timeZoneId;
|
||||
private DateTimeFormatter dateTimeFormat;
|
||||
private DateTimeFormatter dateFormat;
|
||||
|
@ -274,7 +281,6 @@ public class RenderingContext {
|
|||
res.dateYearFormat = dateYearFormat;
|
||||
res.dateYearMonthFormat = dateYearMonthFormat;
|
||||
res.targetVersion = targetVersion;
|
||||
res.locale = locale;
|
||||
res.showComments = showComments;
|
||||
res.copyButton = copyButton;
|
||||
res.pkp = pkp;
|
||||
|
@ -496,6 +502,9 @@ public class RenderingContext {
|
|||
|
||||
public RenderingContext setLang(String lang) {
|
||||
this.lang = lang;
|
||||
if (lang != null) {
|
||||
setLocale(new Locale(lang));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -526,24 +535,6 @@ public class RenderingContext {
|
|||
return mode == ResourceRendererMode.TECHNICAL;
|
||||
}
|
||||
|
||||
public boolean hasLocale() {
|
||||
return locale != null;
|
||||
}
|
||||
|
||||
public Locale getLocale() {
|
||||
if (locale == null) {
|
||||
return Locale.getDefault();
|
||||
} else {
|
||||
return locale;
|
||||
}
|
||||
}
|
||||
|
||||
public RenderingContext setLocale(Locale locale) {
|
||||
this.locale = locale;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* if the timezone is null, the rendering will default to the source timezone
|
||||
* in the resource
|
||||
|
@ -745,5 +736,20 @@ public class RenderingContext {
|
|||
return typeMap;
|
||||
}
|
||||
|
||||
public String getTranslated(PrimitiveType<?> t) {
|
||||
if (lang != null) {
|
||||
String v = ToolingExtensions.getLanguageTranslation(t, lang);
|
||||
if (v != null) {
|
||||
return v;
|
||||
}
|
||||
}
|
||||
return t.asStringValue();
|
||||
}
|
||||
|
||||
public String toStr(int v) {
|
||||
NumberFormat nf = NumberFormat.getInstance(locale);
|
||||
return nf.format(v);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -32,15 +32,17 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
private static final boolean SHOW_DIFF = false;
|
||||
private JsonObject externals;
|
||||
|
||||
public String createNotEqualMessage(final String message, final String expected, final String actual) {
|
||||
public String createNotEqualMessage(String id, final String message, final String expected, final String actual) {
|
||||
return new StringBuilder()
|
||||
.append(message).append('\n')
|
||||
.append("Expected :").append(presentExpected(expected)).append('\n')
|
||||
.append("Expected:").append(presentExpected(expected)).append(" for "+id).append('\n')
|
||||
.append("Actual :").append("\""+actual+"\"").toString();
|
||||
}
|
||||
|
||||
private String presentExpected(String expected) {
|
||||
if (expected.startsWith("$") && expected.endsWith("$")) {
|
||||
if (expected == null) {
|
||||
return "null";
|
||||
} else if (expected.startsWith("$") && expected.endsWith("$")) {
|
||||
if (expected.startsWith("$choice:")) {
|
||||
return "Contains one of "+readChoices(expected.substring(8, expected.length()-1)).toString();
|
||||
} else if (expected.startsWith("$fragments:")) {
|
||||
|
@ -68,15 +70,15 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
}
|
||||
}
|
||||
|
||||
public static String checkXMLIsSame(InputStream expected, InputStream actual) throws Exception {
|
||||
public static String checkXMLIsSame(String id, InputStream expected, InputStream actual) throws Exception {
|
||||
CompareUtilities self = new CompareUtilities();
|
||||
String result = self.compareXml(expected, actual);
|
||||
String result = self.compareXml(id, expected, actual);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static String checkXMLIsSame(String expected, String actual) throws Exception {
|
||||
public static String checkXMLIsSame(String id, String expected, String actual) throws Exception {
|
||||
CompareUtilities self = new CompareUtilities();
|
||||
String result = self.compareXml(expected, actual);
|
||||
String result = self.compareXml(id, expected, actual);
|
||||
if (result != null && SHOW_DIFF) {
|
||||
String diff = getDiffTool();
|
||||
if (diff != null && new File(diff).exists() || Utilities.isToken(diff)) {
|
||||
|
@ -96,24 +98,24 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
}
|
||||
}
|
||||
|
||||
private String compareXml(InputStream expected, InputStream actual) throws Exception {
|
||||
return compareElements("", loadXml(expected).getDocumentElement(), loadXml(actual).getDocumentElement());
|
||||
private String compareXml(String id, InputStream expected, InputStream actual) throws Exception {
|
||||
return compareElements(id, "", loadXml(expected).getDocumentElement(), loadXml(actual).getDocumentElement());
|
||||
}
|
||||
|
||||
private String compareXml(String expected, String actual) throws Exception {
|
||||
return compareElements("", loadXml(expected).getDocumentElement(), loadXml(actual).getDocumentElement());
|
||||
private String compareXml(String id, String expected, String actual) throws Exception {
|
||||
return compareElements(id, "", loadXml(expected).getDocumentElement(), loadXml(actual).getDocumentElement());
|
||||
}
|
||||
|
||||
private String compareElements(String path, Element expectedElement, Element actualElement) {
|
||||
private String compareElements(String id, String path, Element expectedElement, Element actualElement) {
|
||||
if (!namespacesMatch(expectedElement.getNamespaceURI(), actualElement.getNamespaceURI()))
|
||||
return createNotEqualMessage("Namespaces differ at " + path, expectedElement.getNamespaceURI(), actualElement.getNamespaceURI());
|
||||
return createNotEqualMessage(id, "Namespaces differ at " + path, expectedElement.getNamespaceURI(), actualElement.getNamespaceURI());
|
||||
if (!expectedElement.getLocalName().equals(actualElement.getLocalName()))
|
||||
return createNotEqualMessage("Names differ at " + path , expectedElement.getLocalName(), actualElement.getLocalName());
|
||||
return createNotEqualMessage(id, "Names differ at " + path , expectedElement.getLocalName(), actualElement.getLocalName());
|
||||
path = path + "/" + expectedElement.getLocalName();
|
||||
String s = compareAttributes(path, expectedElement.getAttributes(), actualElement.getAttributes());
|
||||
String s = compareAttributes(id, path, expectedElement.getAttributes(), actualElement.getAttributes());
|
||||
if (!Utilities.noString(s))
|
||||
return s;
|
||||
s = compareAttributes(path, expectedElement.getAttributes(), actualElement.getAttributes());
|
||||
s = compareAttributes(id, path, expectedElement.getAttributes(), actualElement.getAttributes());
|
||||
if (!Utilities.noString(s))
|
||||
return s;
|
||||
|
||||
|
@ -123,12 +125,12 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
actualChild = skipBlankText(actualChild);
|
||||
while (expectedChild != null && actualChild != null) {
|
||||
if (expectedChild.getNodeType() != actualChild.getNodeType())
|
||||
return createNotEqualMessage("node type mismatch in children of " + path, Short.toString(expectedElement.getNodeType()), Short.toString(actualElement.getNodeType()));
|
||||
return createNotEqualMessage(id, "node type mismatch in children of " + path, Short.toString(expectedElement.getNodeType()), Short.toString(actualElement.getNodeType()));
|
||||
if (expectedChild.getNodeType() == Node.TEXT_NODE) {
|
||||
if (!normalise(expectedChild.getTextContent()).equals(normalise(actualChild.getTextContent())))
|
||||
return createNotEqualMessage("Text differs at " + path, normalise(expectedChild.getTextContent()).toString(), normalise(actualChild.getTextContent()).toString());
|
||||
return createNotEqualMessage(id, "Text differs at " + path, normalise(expectedChild.getTextContent()).toString(), normalise(actualChild.getTextContent()).toString());
|
||||
} else if (expectedChild.getNodeType() == Node.ELEMENT_NODE) {
|
||||
s = compareElements(path, (Element) expectedChild, (Element) actualChild);
|
||||
s = compareElements(id, path, (Element) expectedChild, (Element) actualChild);
|
||||
if (!Utilities.noString(s))
|
||||
return s;
|
||||
}
|
||||
|
@ -154,7 +156,7 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
return result;
|
||||
}
|
||||
|
||||
private String compareAttributes(String path, NamedNodeMap expected, NamedNodeMap actual) {
|
||||
private String compareAttributes(String id, String path, NamedNodeMap expected, NamedNodeMap actual) {
|
||||
for (int i = 0; i < expected.getLength(); i++) {
|
||||
|
||||
Node expectedNode = expected.item(i);
|
||||
|
@ -167,7 +169,7 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
byte[] b1 = unBase64(expectedNode.getTextContent());
|
||||
byte[] b2 = unBase64(actualNode.getTextContent());
|
||||
if (!sameBytes(b1, b2))
|
||||
return createNotEqualMessage("Attributes differ at " + path, normalise(expectedNode.getTextContent()).toString(), normalise(actualNode.getTextContent()).toString()) ;
|
||||
return createNotEqualMessage(id, "Attributes differ at " + path, normalise(expectedNode.getTextContent()).toString(), normalise(actualNode.getTextContent()).toString()) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -213,14 +215,14 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
return builder.parse(fn);
|
||||
}
|
||||
|
||||
public static String checkJsonSrcIsSame(String expected, String actual, JsonObject externals) throws FileNotFoundException, IOException {
|
||||
return checkJsonSrcIsSame(expected, actual, true, externals);
|
||||
public static String checkJsonSrcIsSame(String id, String expected, String actual, JsonObject externals) throws FileNotFoundException, IOException {
|
||||
return checkJsonSrcIsSame(id, expected, actual, true, externals);
|
||||
}
|
||||
|
||||
public static String checkJsonSrcIsSame(String expectedString, String actualString, boolean showDiff, JsonObject externals) throws FileNotFoundException, IOException {
|
||||
public static String checkJsonSrcIsSame(String id, String expectedString, String actualString, boolean showDiff, JsonObject externals) throws FileNotFoundException, IOException {
|
||||
CompareUtilities self = new CompareUtilities();
|
||||
self.externals = externals;
|
||||
String result = self.compareJsonSrc(expectedString, actualString);
|
||||
String result = self.compareJsonSrc(id, expectedString, actualString);
|
||||
if (result != null && SHOW_DIFF && showDiff) {
|
||||
String diff = null;
|
||||
if (System.getProperty("os.name").contains("Linux"))
|
||||
|
@ -253,9 +255,9 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
return result;
|
||||
}
|
||||
|
||||
public static String checkJsonIsSame(String expected, String actual) throws FileNotFoundException, IOException {
|
||||
public static String checkJsonIsSame(String id, String expected, String actual) throws FileNotFoundException, IOException {
|
||||
CompareUtilities self = new CompareUtilities();
|
||||
String result = self.compareJson(expected, actual);
|
||||
String result = self.compareJson(id, expected, actual);
|
||||
if (result != null && SHOW_DIFF) {
|
||||
String diff = Utilities.path(System.getenv("ProgramFiles(X86)"), "WinMerge", "WinMergeU.exe");
|
||||
List<String> command = new ArrayList<String>();
|
||||
|
@ -269,26 +271,26 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
return result;
|
||||
}
|
||||
|
||||
private String compareJsonSrc(String expected, String actual) throws FileNotFoundException, IOException {
|
||||
private String compareJsonSrc(String id, String expected, String actual) throws FileNotFoundException, IOException {
|
||||
JsonObject actualJsonObject = JsonParser.parseObject(actual);
|
||||
JsonObject expectedJsonObject = JsonParser.parseObject(expected);
|
||||
return compareObjects("", expectedJsonObject, actualJsonObject);
|
||||
return compareObjects(id, "", expectedJsonObject, actualJsonObject);
|
||||
}
|
||||
|
||||
private String compareJson(String expected, String actual) throws FileNotFoundException, IOException {
|
||||
private String compareJson(String id, String expected, String actual) throws FileNotFoundException, IOException {
|
||||
JsonObject actualJsonObject = JsonParser.parseObject(TextFile.fileToString(actual));
|
||||
JsonObject expectedJsonObject = JsonParser.parseObject(TextFile.fileToString(expected));
|
||||
return compareObjects("", expectedJsonObject, actualJsonObject);
|
||||
return compareObjects(id, "", expectedJsonObject, actualJsonObject);
|
||||
}
|
||||
|
||||
private String compareObjects(String path, JsonObject expectedJsonObject, JsonObject actualJsonObject) {
|
||||
private String compareObjects(String id, String path, JsonObject expectedJsonObject, JsonObject actualJsonObject) {
|
||||
List<String> optionals = listOptionals(expectedJsonObject);
|
||||
List<String> countOnlys = listCountOnlys(expectedJsonObject);
|
||||
for (JsonProperty en : actualJsonObject.getProperties()) {
|
||||
String n = en.getName();
|
||||
if (!n.equals("fhir_comments")) {
|
||||
if (expectedJsonObject.has(n)) {
|
||||
String s = compareNodes(path + '.' + n, expectedJsonObject.get(n), en.getValue(), countOnlys.contains(n));
|
||||
String s = compareNodes(id, path + '.' + n, expectedJsonObject.get(n), en.getValue(), countOnlys.contains(n));
|
||||
if (!Utilities.noString(s))
|
||||
return s;
|
||||
} else
|
||||
|
@ -327,10 +329,10 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
return res;
|
||||
}
|
||||
|
||||
private String compareNodes(String path, JsonElement expectedJsonElement, JsonElement actualJsonElement, boolean countOnly) {
|
||||
private String compareNodes(String id, String path, JsonElement expectedJsonElement, JsonElement actualJsonElement, boolean countOnly) {
|
||||
if (!(expectedJsonElement instanceof JsonPrimitive && actualJsonElement instanceof JsonPrimitive)) {
|
||||
if (actualJsonElement.getClass() != expectedJsonElement.getClass()) {
|
||||
return createNotEqualMessage("properties differ at " + path, expectedJsonElement.getClass().getName(), actualJsonElement.getClass().getName());
|
||||
return createNotEqualMessage(id, "properties differ at " + path, expectedJsonElement.getClass().getName(), actualJsonElement.getClass().getName());
|
||||
}
|
||||
}
|
||||
if (actualJsonElement instanceof JsonPrimitive) {
|
||||
|
@ -338,24 +340,24 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
JsonPrimitive expectedJsonPrimitive = (JsonPrimitive) expectedJsonElement;
|
||||
if (actualJsonPrimitive.isJsonBoolean() && expectedJsonPrimitive.isJsonBoolean()) {
|
||||
if (actualJsonPrimitive.asBoolean() != expectedJsonPrimitive.asBoolean())
|
||||
return createNotEqualMessage("boolean property values differ at " + path , expectedJsonPrimitive.asString(), actualJsonPrimitive.asString());
|
||||
return createNotEqualMessage(id, "boolean property values differ at " + path , expectedJsonPrimitive.asString(), actualJsonPrimitive.asString());
|
||||
} else if (actualJsonPrimitive.isJsonString() && expectedJsonPrimitive.isJsonString()) {
|
||||
String actualJsonString = actualJsonPrimitive.asString();
|
||||
String expectedJsonString = expectedJsonPrimitive.asString();
|
||||
if (!(actualJsonString.contains("<div") && expectedJsonString.contains("<div")))
|
||||
if (!matches(actualJsonString, expectedJsonString))
|
||||
if (!sameBytes(unBase64(actualJsonString), unBase64(expectedJsonString)))
|
||||
return createNotEqualMessage("string property values differ at " + path, expectedJsonString, actualJsonString);
|
||||
return createNotEqualMessage(id, "string property values differ at " + path, expectedJsonString, actualJsonString);
|
||||
} else if (actualJsonPrimitive.isJsonNumber() && expectedJsonPrimitive.isJsonNumber()) {
|
||||
if (!actualJsonPrimitive.asString().equals(expectedJsonPrimitive.asString()))
|
||||
return createNotEqualMessage("number property values differ at " + path, expectedJsonPrimitive.asString(), actualJsonPrimitive.asString());
|
||||
return createNotEqualMessage(id, "number property values differ at " + path, expectedJsonPrimitive.asString(), actualJsonPrimitive.asString());
|
||||
} else if (expectedJsonElement instanceof JsonNull) {
|
||||
return actualJsonPrimitive instanceof JsonNull ? null : createNotEqualMessage("null Properties differ at " + path, "null", actualJsonPrimitive.asString());
|
||||
return actualJsonPrimitive instanceof JsonNull ? null : createNotEqualMessage(id, "null Properties differ at " + path, "null", actualJsonPrimitive.asString());
|
||||
} else {
|
||||
return createNotEqualMessage("property types differ at " + path, expectedJsonPrimitive.asString(), actualJsonPrimitive.asString());
|
||||
return createNotEqualMessage(id, "property types differ at " + path, expectedJsonPrimitive.asString(), actualJsonPrimitive.asString());
|
||||
}
|
||||
} else if (actualJsonElement instanceof JsonObject) {
|
||||
String s = compareObjects(path, (JsonObject) expectedJsonElement, (JsonObject) actualJsonElement);
|
||||
String s = compareObjects(id, path, (JsonObject) expectedJsonElement, (JsonObject) actualJsonElement);
|
||||
if (!Utilities.noString(s))
|
||||
return s;
|
||||
} else if (actualJsonElement instanceof JsonArray) {
|
||||
|
@ -366,14 +368,14 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
int es = expectedArray.size();
|
||||
if (countOnly) {
|
||||
if (as != es) {
|
||||
return createNotEqualMessage("array item count differs at " + path, Integer.toString(es), Integer.toString(as));
|
||||
return createNotEqualMessage(id, "array item count differs at " + path, Integer.toString(es), Integer.toString(as));
|
||||
}
|
||||
} else {
|
||||
int expectedMin = countExpectedMin(expectedArray);
|
||||
int oc = optionalCount(expectedArray);
|
||||
|
||||
if (as > es || as < expectedMin)
|
||||
return createNotEqualMessage("array item count differs at " + path, Integer.toString(es), Integer.toString(as));
|
||||
return createNotEqualMessage(id, "array item count differs at " + path, Integer.toString(es), Integer.toString(as));
|
||||
int c = 0;
|
||||
for (int i = 0; i < es; i++) {
|
||||
if (c >= as) {
|
||||
|
@ -383,7 +385,7 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
return "One or more array items did not match at "+path+" starting at index "+i;
|
||||
}
|
||||
}
|
||||
String s = compareNodes(path + "[" + Integer.toString(i) + "]", expectedArray.get(i), actualArray.get(c), false);
|
||||
String s = compareNodes(id, path + "[" + Integer.toString(i) + "]", expectedArray.get(i), actualArray.get(c), false);
|
||||
if (!Utilities.noString(s) && !isOptional(expectedArray.get(i))) {
|
||||
return s;
|
||||
}
|
||||
|
@ -478,13 +480,13 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
return list;
|
||||
}
|
||||
|
||||
public static String checkTextIsSame(String expected, String actual) throws FileNotFoundException, IOException {
|
||||
return checkTextIsSame(expected, actual, true);
|
||||
public static String checkTextIsSame(String id, String expected, String actual) throws FileNotFoundException, IOException {
|
||||
return checkTextIsSame(id, expected, actual, true);
|
||||
}
|
||||
|
||||
public static String checkTextIsSame(String expectedString, String actualString, boolean showDiff) throws FileNotFoundException, IOException {
|
||||
public static String checkTextIsSame(String id, String expectedString, String actualString, boolean showDiff) throws FileNotFoundException, IOException {
|
||||
CompareUtilities self = new CompareUtilities();
|
||||
String result = self.compareText(expectedString, actualString);
|
||||
String result = self.compareText(id, expectedString, actualString);
|
||||
if (result != null && SHOW_DIFF && showDiff) {
|
||||
String diff = null;
|
||||
if (System.getProperty("os.name").contains("Linux"))
|
||||
|
@ -518,13 +520,13 @@ public class CompareUtilities extends BaseTestingUtilities {
|
|||
}
|
||||
|
||||
|
||||
private String compareText(String expectedString, String actualString) {
|
||||
private String compareText(String id, String expectedString, String actualString) {
|
||||
for (int i = 0; i < Integer.min(expectedString.length(), actualString.length()); i++) {
|
||||
if (expectedString.charAt(i) != actualString.charAt(i))
|
||||
return createNotEqualMessage("Strings differ at character " + Integer.toString(i), charWithContext(expectedString, i), charWithContext(actualString, i));
|
||||
return createNotEqualMessage(id, "Strings differ at character " + Integer.toString(i), charWithContext(expectedString, i), charWithContext(actualString, i));
|
||||
}
|
||||
if (expectedString.length() != actualString.length())
|
||||
return createNotEqualMessage("Strings differ in length but match to the end of the shortest.", Integer.toString(expectedString.length()), Integer.toString(actualString.length()));
|
||||
return createNotEqualMessage(id, "Strings differ in length but match to the end of the shortest.", Integer.toString(expectedString.length()), Integer.toString(actualString.length()));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -793,9 +793,9 @@ public class ToolingExtensions {
|
|||
if (e.getUrl().equals(EXT_TRANSLATION)) {
|
||||
Extension e1 = ExtensionHelper.getExtension(e, "lang");
|
||||
|
||||
if (e1 != null && e1.getValue() instanceof CodeType && ((CodeType) e.getValue()).getValue().equals(lang)) {
|
||||
if (e1 != null && e1.getValue() != null && e1.getValue() instanceof CodeType && ((CodeType) e1.getValue()).getValue().equals(lang)) {
|
||||
e1 = ExtensionHelper.getExtension(e, "content");
|
||||
return ((StringType) e.getValue()).getValue();
|
||||
return ((StringType) e1.getValue()).getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
package org.hl7.fhir.r5.utils;
|
||||
|
||||
/*
|
||||
Copyright (c) 2011+, HL7, Inc.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of HL7 nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific
|
||||
prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
import org.hl7.fhir.r5.model.Enumeration;
|
||||
import org.hl7.fhir.r5.model.PrimitiveType;
|
||||
|
||||
public class TranslatingUtilities extends org.hl7.fhir.utilities.TranslatingUtilities {
|
||||
|
||||
public interface TranslationServices extends org.hl7.fhir.utilities.TranslationServices {
|
||||
String gt(@SuppressWarnings("rawtypes") PrimitiveType value);
|
||||
String egt(@SuppressWarnings("rawtypes") Enumeration<? extends Enum> value);
|
||||
}
|
||||
|
||||
public String gt(@SuppressWarnings("rawtypes") PrimitiveType value) {
|
||||
if (value == null || !value.hasPrimitiveValue()) {
|
||||
return null;
|
||||
} else {
|
||||
return hasTranslator() ? ((TranslationServices) getTranslator()).gt(value) : value.asStringValue();
|
||||
}
|
||||
}
|
||||
|
||||
public String egt(@SuppressWarnings("rawtypes") Enumeration<? extends Enum> value) {
|
||||
if (value == null || !value.hasPrimitiveValue()) {
|
||||
return null;
|
||||
} else {
|
||||
return (value == null || !value.hasPrimitiveValue()) ? null : hasTranslator() ? ((TranslationServices) getTranslator()).egt(value) : value.asStringValue();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -99,7 +99,7 @@ public class StructureMapUtilities {
|
|||
public static final String MAP_WHERE_EXPRESSION = "map.where.expression";
|
||||
public static final String MAP_SEARCH_EXPRESSION = "map.search.expression";
|
||||
public static final String MAP_EXPRESSION = "map.transform.expression";
|
||||
private static final boolean RENDER_MULTIPLE_TARGETS_ONELINE = true;
|
||||
private static final boolean MULTIPLE_TARGETS_ONELINE = true;
|
||||
public static final String AUTO_VAR_NAME = "vvv";
|
||||
public static final String DEF_GROUP_NAME = "DefaultMappingGroupAnonymousAlias";
|
||||
|
||||
|
@ -364,7 +364,7 @@ public class StructureMapUtilities {
|
|||
first = false;
|
||||
else
|
||||
b.append(", ");
|
||||
if (RENDER_MULTIPLE_TARGETS_ONELINE)
|
||||
if (MULTIPLE_TARGETS_ONELINE)
|
||||
b.append(' ');
|
||||
else {
|
||||
b.append("\r\n");
|
||||
|
@ -640,31 +640,30 @@ public class StructureMapUtilities {
|
|||
result.setName(lexer.readConstant("name"));
|
||||
result.setDescription(lexer.getAllComments());
|
||||
result.setStatus(PublicationStatus.DRAFT);
|
||||
} else {
|
||||
while (lexer.hasToken("///")) {
|
||||
lexer.next();
|
||||
String fid = lexer.takeDottedToken();
|
||||
lexer.token("=");
|
||||
switch (fid) {
|
||||
case "url" :
|
||||
result.setUrl(lexer.readConstant("url"));
|
||||
break;
|
||||
case "name" :
|
||||
result.setName(lexer.readConstant("name"));
|
||||
break;
|
||||
case "title" :
|
||||
result.setTitle(lexer.readConstant("title"));
|
||||
break;
|
||||
case "description" :
|
||||
result.setTitle(lexer.readConstant("description"));
|
||||
break;
|
||||
case "status" :
|
||||
result.setStatus(PublicationStatus.fromCode(lexer.readConstant("status")));
|
||||
break;
|
||||
default:
|
||||
lexer.readConstant("nothing");
|
||||
// nothing
|
||||
}
|
||||
}
|
||||
while (lexer.hasToken("///")) {
|
||||
lexer.next();
|
||||
String fid = lexer.takeDottedToken();
|
||||
lexer.token("=");
|
||||
switch (fid) {
|
||||
case "url" :
|
||||
result.setUrl(lexer.readConstant("url"));
|
||||
break;
|
||||
case "name" :
|
||||
result.setName(lexer.readConstant("name"));
|
||||
break;
|
||||
case "title" :
|
||||
result.setTitle(lexer.readConstant("title"));
|
||||
break;
|
||||
case "description" :
|
||||
result.setTitle(lexer.readConstant("description"));
|
||||
break;
|
||||
case "status" :
|
||||
result.setStatus(PublicationStatus.fromCode(lexer.readConstant("status")));
|
||||
break;
|
||||
default:
|
||||
lexer.readConstant("nothing");
|
||||
// nothing
|
||||
}
|
||||
}
|
||||
if (!result.hasId() && result.hasName()) {
|
||||
|
|
|
@ -67,7 +67,7 @@ public class GeneratedPEModelTest {
|
|||
Observation tgt = tp.build(ctxt);
|
||||
new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(Utilities.path("[tmp]", "pe-instance-gen.xml")), tgt);
|
||||
|
||||
String msg = CompareUtilities.checkXMLIsSame(TestingUtilities.loadTestResourceStream("r5", "profiles", "pe-instance.xml"), new FileInputStream(Utilities.path("[tmp]", "pe-instance-gen.xml")));
|
||||
String msg = CompareUtilities.checkXMLIsSame("PEGEN", TestingUtilities.loadTestResourceStream("r5", "profiles", "pe-instance.xml"), new FileInputStream(Utilities.path("[tmp]", "pe-instance-gen.xml")));
|
||||
Assertions.assertNull(msg, msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -417,7 +417,7 @@ public class PETests {
|
|||
private void checkGeneratedJava(String name) throws FileNotFoundException, IOException {
|
||||
String actual = Utilities.normalize(TextFile.fileToString(Utilities.path("[tmp]", name+".java")));
|
||||
String expected = Utilities.normalize(TestingUtilities.loadTestResource("r5", "profiles", name+".java"));
|
||||
String msg = CompareUtilities.checkTextIsSame(expected, actual);
|
||||
String msg = CompareUtilities.checkTextIsSame(name, expected, actual);
|
||||
if (msg != null) {
|
||||
Assertions.fail("Generated code for "+name+" is different: "+msg);
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ public class SQLOnFhirTests {
|
|||
sortResults(rows);
|
||||
String expS = JsonParser.compose(exp, true);
|
||||
String rowS = JsonParser.compose(rows, true);
|
||||
String c = CompareUtilities.checkJsonSrcIsSame(expS, rowS, null);
|
||||
String c = CompareUtilities.checkJsonSrcIsSame(name, expS, rowS, null);
|
||||
Assertions.assertNull(c, c);
|
||||
} else if (test.testCase.has("expectCount")) {
|
||||
Assertions.assertEquals(test.testCase.asInteger("expectCount"), results.size());
|
||||
|
|
|
@ -67,10 +67,10 @@ public class GraphQLEngineTests implements IGraphQLStorageServices {
|
|||
|
||||
Resource parsedResource = stream != null ? new XmlParser().parse(stream) : null;
|
||||
|
||||
testResource(parsedResource, output, source, operation);
|
||||
testResource(name, parsedResource, output, source, operation);
|
||||
}
|
||||
|
||||
private void testResource(Resource resource, String output, String source, String operation) throws IOException, EGraphEngine, EGraphQLException {
|
||||
private void testResource(String id, Resource resource, String output, String source, String operation) throws IOException, EGraphEngine, EGraphQLException {
|
||||
GraphQLEngine gql = new GraphQLEngine(TestingUtilities.getSharedWorkerContext());
|
||||
gql.setServices(this);
|
||||
if (resource != null)
|
||||
|
@ -97,7 +97,7 @@ public class GraphQLEngineTests implements IGraphQLStorageServices {
|
|||
IOUtils.copy(CompareUtilities.loadTestResourceStream("r5", "graphql", source), new FileOutputStream(CompareUtilities.tempFile("graphql", source)));
|
||||
IOUtils.copy(CompareUtilities.loadTestResourceStream("r5", "graphql", output), new FileOutputStream(CompareUtilities.tempFile("graphql", output)));
|
||||
TextFile.stringToFile(str.toString(), CompareUtilities.tempFile("graphql", output+".out"));
|
||||
msg = CompareUtilities.checkJsonIsSame(CompareUtilities.tempFile("graphql", output), CompareUtilities.tempFile("graphql", output+".out"));
|
||||
msg = CompareUtilities.checkJsonIsSame(id, CompareUtilities.tempFile("graphql", output), CompareUtilities.tempFile("graphql", output+".out"));
|
||||
Assertions.assertTrue(Utilities.noString(msg), msg);
|
||||
}
|
||||
else
|
||||
|
@ -119,7 +119,7 @@ public class GraphQLEngineTests implements IGraphQLStorageServices {
|
|||
//Rather than duplicate the entire resource we modify the ID with a _history path
|
||||
parsedResource.setId("example/_history/1");
|
||||
|
||||
testResource(parsedResource, output, source, null);
|
||||
testResource("testReferenceReverseHistory", parsedResource, output, source, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -263,7 +263,7 @@ public class NarrativeGenerationTests {
|
|||
String actualFileName = CompareUtilities.tempFile("narrative", test.getId() + ".actual.html");
|
||||
TextFile.stringToFile(expected, expectedFileName);
|
||||
TextFile.stringToFile(actual, actualFileName);
|
||||
String msg = CompareUtilities.checkXMLIsSame(expectedFileName, actualFileName);
|
||||
String msg = CompareUtilities.checkXMLIsSame(id, expectedFileName, actualFileName);
|
||||
Assertions.assertTrue(msg == null, "Output does not match expected: "+msg);
|
||||
|
||||
if (test.isMeta()) {
|
||||
|
@ -274,7 +274,7 @@ public class NarrativeGenerationTests {
|
|||
actual = HEADER+new XhtmlComposer(true, true).compose(x)+FOOTER;
|
||||
actualFileName = CompareUtilities.tempFile("narrative", test.getId() + "-meta.actual.html");
|
||||
TextFile.stringToFile(actual, actualFileName);
|
||||
msg = CompareUtilities.checkXMLIsSame(expectedFileName, actualFileName);
|
||||
msg = CompareUtilities.checkXMLIsSame(id, expectedFileName, actualFileName);
|
||||
Assertions.assertTrue(msg == null, "Meta output does not match expected: "+msg);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public class ParsingTests {
|
|||
r = new XmlParser().parse(b);
|
||||
b = new JsonParser().setOutputStyle(OutputStyle.PRETTY).composeBytes(r);
|
||||
String output = new String(b);
|
||||
String msg = CompareUtilities.checkJsonSrcIsSame(src, output, null);
|
||||
String msg = CompareUtilities.checkJsonSrcIsSame(name, src, output, null);
|
||||
Assertions.assertTrue(msg == null, msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class ResourceToElementTest {
|
|||
Element e = p.parse(res);
|
||||
new org.hl7.fhir.r5.elementmodel.XmlParser(ctxt).compose(e, new FileOutputStream(src), OutputStyle.PRETTY, null);
|
||||
new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(dst), res);
|
||||
String msg = CompareUtilities.checkXMLIsSame(src, dst);
|
||||
String msg = CompareUtilities.checkXMLIsSame(filename, src, dst);
|
||||
Assertions.assertNull(msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ public class VocabTests {
|
|||
String actualFileName = CompareUtilities.tempFile("vocab", test.getId() + ".actual.html");
|
||||
TextFile.stringToFile(expected, expectedFileName);
|
||||
TextFile.stringToFile(actual, actualFileName);
|
||||
String msg = CompareUtilities.checkXMLIsSame(expectedFileName, actualFileName);
|
||||
String msg = CompareUtilities.checkXMLIsSame(test.id, expectedFileName, actualFileName);
|
||||
Assertions.assertTrue(msg == null, "Output does not match expected: "+msg);
|
||||
} else {
|
||||
Assertions.fail("Expansion Failed: "+outcome.getError());
|
||||
|
|
|
@ -59,7 +59,7 @@ public class CompareUtilitiesTests implements ResourceLoaderTests {
|
|||
InputStream expectedXMLStream = classLoader.getResourceAsStream(expectedXMLPath);
|
||||
InputStream actualXMLStream = classLoader.getResourceAsStream(actualXMLPath);
|
||||
|
||||
final String actualOutput = CompareUtilities.checkXMLIsSame(expectedXMLStream, actualXMLStream);
|
||||
final String actualOutput = CompareUtilities.checkXMLIsSame(expectedFileName, expectedXMLStream, actualXMLStream);
|
||||
|
||||
if (expectedOutputFileName == null) {
|
||||
assertNull(actualOutput);
|
||||
|
@ -91,7 +91,7 @@ public class CompareUtilitiesTests implements ResourceLoaderTests {
|
|||
final String expectedJSONPath = ROOT_JSON_TEST_PATH.resolve(expectedFileName).toString();
|
||||
final String actualJSONPath = ROOT_JSON_TEST_PATH.resolve(actualFileName).toString();
|
||||
|
||||
final String actualOutput = CompareUtilities.checkJsonSrcIsSame(getResourceAsString(expectedJSONPath), getResourceAsString(actualJSONPath), false, null);
|
||||
final String actualOutput = CompareUtilities.checkJsonSrcIsSame(expectedFileName, getResourceAsString(expectedJSONPath), getResourceAsString(actualJSONPath), false, null);
|
||||
if (expectedOutputFileName == null) {
|
||||
assertNull(actualOutput);
|
||||
} else {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
string property values differ at .expectedArray[0]
|
||||
Expected :"expectedValue 1"
|
||||
Expected:"expectedValue 1" for expected.json
|
||||
Actual :"unexpectedValue 1"
|
|
@ -1,3 +1,3 @@
|
|||
array item count differs at .expectedArray
|
||||
Expected :"2"
|
||||
Expected:"2" for expected.json
|
||||
Actual :"1"
|
|
@ -1,3 +1,3 @@
|
|||
boolean property values differ at .expectedBoolean
|
||||
Expected :"true"
|
||||
Expected:"true" for expected.json
|
||||
Actual :"false"
|
|
@ -1,3 +1,3 @@
|
|||
number property values differ at .expectedNumber
|
||||
Expected :"123"
|
||||
Expected:"123" for expected.json
|
||||
Actual :"789"
|
|
@ -1,3 +1,3 @@
|
|||
property types differ at .expectedString
|
||||
Expected :"expected value"
|
||||
Expected:"expected value" for expected.json
|
||||
Actual :"1"
|
|
@ -1,3 +1,3 @@
|
|||
string property values differ at .expectedString
|
||||
Expected :"expected value"
|
||||
Expected:"expected value" for expected.json
|
||||
Actual :"unexpected value"
|
|
@ -1,3 +1,3 @@
|
|||
Attributes differ at /root/blah
|
||||
Expected :"dummyAtt"
|
||||
Expected:"dummyAtt" for expected.xml
|
||||
Actual :"wrongwrongwrong"
|
|
@ -1,3 +1,3 @@
|
|||
Names differ at /root
|
||||
Expected :"nameSpacedNode"
|
||||
Expected:"nameSpacedNode" for expected.xml
|
||||
Actual :"wrongNameSpacedNode"
|
|
@ -1,3 +1,3 @@
|
|||
Namespaces differ at /root
|
||||
Expected :"http://www.example.com/FOO"
|
||||
Expected:"http://www.example.com/FOO" for expected.xml
|
||||
Actual :"http://www.example.com/BAR"
|
|
@ -1,3 +1,3 @@
|
|||
node type mismatch in children of /root/blah
|
||||
Expected :"1"
|
||||
Expected:"1" for expected.xml
|
||||
Actual :"1"
|
|
@ -1,3 +1,3 @@
|
|||
Text differs at /root/blah
|
||||
Expected :"expected"
|
||||
Expected:"expected" for expected.xml
|
||||
Actual :"different"
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"http://example.org/fhir/example2" : null,
|
||||
"http://example.org/fhir/example1" : null,
|
||||
"http://somewhere/something-else" : null,
|
||||
"http://loinc.org/vs/LL715-4" : null,
|
||||
"http://hl7.org/fhir/us/vrdr/ValueSet/vrdr-PlaceOfDeath" : null,
|
||||
|
|
|
@ -690,8 +690,9 @@ public class VersionUtilities {
|
|||
}
|
||||
|
||||
switch (getMajMin(v)) {
|
||||
case "1.0" : return "http://hl7.org/fhir/DSTU1";
|
||||
case "1.4" : return "http://hl7.org/fhir/DSTU2";
|
||||
case "0.0" : return "http://hl7.org/fhir/DSTU1";
|
||||
case "1.0" : return "http://hl7.org/fhir/DSTU2";
|
||||
case "1.4" : return "http://hl7.org/fhir/2016May";
|
||||
case "3.0" : return "http://hl7.org/fhir/STU3";
|
||||
case "4.0" : return "http://hl7.org/fhir/R4";
|
||||
case "4.3" : return "http://hl7.org/fhir/R4B";
|
||||
|
|
|
@ -20,8 +20,8 @@ public abstract class I18nBase {
|
|||
|
||||
public static final String PLURAL_SUFFIX = "PLURAL";
|
||||
public static final String KEY_DELIMITER = "_";
|
||||
private Locale locale;
|
||||
private ResourceBundle i18nMessages;
|
||||
protected Locale locale;
|
||||
private ResourceBundle messages;
|
||||
private PluralRules pluralRules;
|
||||
private boolean warnAboutMissingMessages = true;
|
||||
|
||||
|
@ -42,7 +42,7 @@ public abstract class I18nBase {
|
|||
* Verifies if a {@link ResourceBundle} has been loaded for the current {@link Locale}. If not, it triggers a load.
|
||||
*/
|
||||
private void checkResourceBundleIsLoaded() {
|
||||
if (i18nMessages == null) {
|
||||
if (messages == null) {
|
||||
setValidationMessageLanguage(getLocale());
|
||||
}
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ public abstract class I18nBase {
|
|||
}
|
||||
|
||||
protected boolean messageKeyExistsForLocale(String message) {
|
||||
return i18nMessages.containsKey(message);
|
||||
return messages.containsKey(message);
|
||||
}
|
||||
|
||||
|
||||
|
@ -113,9 +113,9 @@ public abstract class I18nBase {
|
|||
String message = theMessage;
|
||||
if (messageExistsForLocale(theMessage, (theMessageArguments != null && theMessageArguments.length > 0))) {
|
||||
if (Objects.nonNull(theMessageArguments) && theMessageArguments.length > 0) {
|
||||
message = MessageFormat.format(i18nMessages.getString(theMessage).trim(), theMessageArguments);
|
||||
message = MessageFormat.format(messages.getString(theMessage).trim(), theMessageArguments);
|
||||
} else {
|
||||
message = i18nMessages.getString(theMessage).trim();
|
||||
message = messages.getString(theMessage).trim();
|
||||
}
|
||||
}
|
||||
return message;
|
||||
|
@ -152,7 +152,11 @@ public abstract class I18nBase {
|
|||
* @param locale {@link Locale} to load resources for.
|
||||
*/
|
||||
public void setValidationMessageLanguage(Locale locale) {
|
||||
i18nMessages = ResourceBundle.getBundle("Messages", locale);
|
||||
messages = ResourceBundle.getBundle(getMessagesSourceFileName(), locale);
|
||||
}
|
||||
|
||||
protected String getMessagesSourceFileName() {
|
||||
return "Messages";
|
||||
}
|
||||
|
||||
public void setPluralRules(Locale locale) {
|
||||
|
|
|
@ -874,7 +874,9 @@ public class I18nConstants {
|
|||
public static final String CONCEPTMAP_GROUP_TARGET_PROPERTY_TYPE_UNKNOWN_SYSTEM = "CONCEPTMAP_GROUP_TARGET_PROPERTY_TYPE_UNKNOWN_SYSTEM";
|
||||
public static final String SM_GROUP_NAME_DUPLICATE = "SM_GROUP_NAME_DUPLICATE";
|
||||
public static final String CONCEPTMAP_GROUP_SOURCE_INCOMPLETE = "CONCEPTMAP_GROUP_SOURCE_INCOMPLETE";
|
||||
public static final String CONCEPTMAP_GROUP_SOURCE_SERVER_SIDE = "CONCEPTMAP_GROUP_SOURCE_SERVER_SIDE";
|
||||
public static final String CONCEPTMAP_GROUP_TARGET_INCOMPLETE = "CONCEPTMAP_GROUP_TARGET_INCOMPLETE";
|
||||
public static final String CONCEPTMAP_GROUP_TARGET_SERVER_SIDE = "CONCEPTMAP_GROUP_TARGET_SERVER_SIDE";
|
||||
public static final String UNABLE_TO_RESOLVE_SYSTEM_SYSTEM_IS_INDETERMINATE = "UNABLE_TO_RESOLVE_SYSTEM_SYSTEM_IS_INDETERMINATE";
|
||||
public static final String SD_NO_TYPE_CODE_ON_CODE = "SD_NO_TYPE_CODE_ON_CODE";
|
||||
public static final String UNKNOWN_CODESYSTEM = "UNKNOWN_CODESYSTEM";
|
||||
|
@ -906,11 +908,6 @@ public class I18nConstants {
|
|||
public static final String SD_OBGLIGATION_INHERITS_PROFILE_NOT_RIGHT_TYPE = "SD_OBGLIGATION_INHERITS_PROFILE_NOT_RIGHT_TYPE";
|
||||
public static final String SD_OBGLIGATION_INHERITS_PROFILE_NOT_RIGHT_BASE = "SD_OBGLIGATION_INHERITS_PROFILE_NOT_RIGHT_BASE";
|
||||
|
||||
public static final String RND_CS_CONTENT_COMPLETE = "RND_CS_CONTENT_COMPLETE";
|
||||
public static final String RND_CS_CONTENT_EXAMPLE = "RND_CS_CONTENT_EXAMPLE";
|
||||
public static final String RND_CS_CONTENT_FRAGMENT = "RND_CS_CONTENT_FRAGMENT";
|
||||
public static final String RND_CS_CONTENT_NOTPRESENT = "RND_CS_CONTENT_NOTPRESENT";
|
||||
public static final String RND_CS_CONTENT_SUPPLEMENT = "RND_CS_CONTENT_SUPPLEMENT";
|
||||
public static final String QUESTIONNAIRE_Q_UNKNOWN_DERIVATION = "QUESTIONNAIRE_Q_UNKNOWN_DERIVATION";
|
||||
public static final String QUESTIONNAIRE_Q_NO_DERIVATION_TYPE = "QUESTIONNAIRE_Q_NO_DERIVATION_TYPE";
|
||||
public static final String QUESTIONNAIRE_Q_NO_DERIVATION_TYPE_VALUE = "QUESTIONNAIRE_Q_NO_DERIVATION_TYPE_VALUE";
|
||||
|
@ -1102,6 +1099,9 @@ public class I18nConstants {
|
|||
public static final String VALUESET_BAD_FILTER_VALUE_VALID_REGEX = "VALUESET_BAD_FILTER_VALUE_VALID_REGEX";
|
||||
public static final String VALUESET_BAD_PROPERTY_NO_REGEX = "VALUESET_BAD_PROPERTY_NO_REGEX";
|
||||
public static final String CODESYSTEM_PROPERTY_CODE_WARNING = "CODESYSTEM_PROPERTY_CODE_WARNING";
|
||||
public static final String SD_ELEMENT_FIXED_WRONG_TYPE = "SD_ELEMENT_FIXED_WRONG_TYPE";
|
||||
public static final String SD_ELEMENT_REASON_DERIVED = "SD_ELEMENT_REASON_DERIVED";
|
||||
public static final String SD_ELEMENT_PATTERN_WRONG_TYPE = "SD_ELEMENT_PATTERN_WRONG_TYPE";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
package org.hl7.fhir.utilities.i18n;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.hl7.fhir.utilities.TextFile;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
|
||||
public class POGenerator {
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
// if (true) {
|
||||
// throw new Error("This needs to be rewritten for using existing .po files");
|
||||
// }
|
||||
new POGenerator().execute(args[0], args[1], args[2], args[3], args.length == 5 ? args[4] : null);
|
||||
}
|
||||
|
||||
private void execute(String lang, String dest, String source, String current, String altVersion) throws IOException {
|
||||
File dst = new File(dest);
|
||||
if (dst.exists()) {
|
||||
dst.delete();
|
||||
}
|
||||
Map<String, String> props = loadProperties(source);
|
||||
Map<String, String> curr = loadProperties(current);
|
||||
Map<String, String> past = loadProperties(altVersion);
|
||||
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append("en -> "+lang+"\r\n");
|
||||
|
||||
for (String n : Utilities.sorted(curr.keySet())) {
|
||||
b.append("\r\n");
|
||||
String v = curr.get(n);
|
||||
String l = props.get(n);
|
||||
if (l != null && past != null) {
|
||||
String p = past.get(n);
|
||||
if (p != null && !p.equals(v)) {
|
||||
// it's changed
|
||||
l = "!!"+l;
|
||||
}
|
||||
}
|
||||
b.append("#: "+n+"\r\n");
|
||||
b.append("msgid \""+v+"\"\r\n");
|
||||
b.append("msgid \""+(l == null ? "" : l)+"\"\r\n");
|
||||
}
|
||||
TextFile.stringToFile(b.toString(), dst);
|
||||
}
|
||||
|
||||
private Map<String, String> loadProperties(String source) throws IOException {
|
||||
if (source == null) {
|
||||
return null;
|
||||
}
|
||||
Map<String, String> res = new HashMap<>();
|
||||
File src = new File(source);
|
||||
List<String> lines = Files.readAllLines(src.toPath());
|
||||
for (String line : lines) {
|
||||
if (!line.startsWith("#") && line.contains("=")) {
|
||||
String n = line.substring(0, line.indexOf("=")).trim();
|
||||
String v = line.substring(line.indexOf("=")+1).trim();
|
||||
res.put(n, v);
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,147 @@
|
|||
package org.hl7.fhir.utilities.i18n;
|
||||
|
||||
public class RenderingI18nContext extends I18nBase {
|
||||
public static final String BUNDLE_DOCUMENT_CONTENT = "BUNDLE_DOCUMENT_CONTENT";
|
||||
public static final String BUNDLE_ETAG = "BUNDLE_ETAG";
|
||||
public static final String BUNDLE_HEADER_DOC_ENTRY_RD = "BUNDLE_HEADER_DOC_ENTRY_RD";
|
||||
public static final String BUNDLE_HEADER_DOC_ENTRY_U = "BUNDLE_HEADER_DOC_ENTRY_U";
|
||||
public static final String BUNDLE_HEADER_DOC_ENTRY_URD = "BUNDLE_HEADER_DOC_ENTRY_URD";
|
||||
public static final String BUNDLE_HEADER_ENTRY = "BUNDLE_HEADER_ENTRY";
|
||||
public static final String BUNDLE_HEADER_ENTRY_URL = "BUNDLE_HEADER_ENTRY_URL";
|
||||
public static final String BUNDLE_HEADER_ROOT = "BUNDLE_HEADER_ROOT";
|
||||
public static final String BUNDLE_IF_MATCH = "BUNDLE_IF_MATCH";
|
||||
public static final String BUNDLE_IF_MOD = "BUNDLE_IF_MOD";
|
||||
public static final String BUNDLE_IF_NONE = "BUNDLE_IF_NONE";
|
||||
public static final String BUNDLE_IF_NON_MATCH = "BUNDLE_IF_NON_MATCH";
|
||||
public static final String BUNDLE_LAST_MOD = "BUNDLE_LAST_MOD";
|
||||
public static final String BUNDLE_LOCATION = "BUNDLE_LOCATION";
|
||||
public static final String BUNDLE_REQUEST = "BUNDLE_REQUEST";
|
||||
public static final String BUNDLE_RESOURCE = "BUNDLE_RESOURCE";
|
||||
public static final String BUNDLE_RESPONSE = "BUNDLE_RESPONSE";
|
||||
public static final String BUNDLE_SEARCH = "BUNDLE_SEARCH";
|
||||
public static final String BUNDLE_SEARCH_MODE = "BUNDLE_SEARCH_MODE";
|
||||
public static final String BUNDLE_SEARCH_SCORE = "BUNDLE_SEARCH_SCORE";
|
||||
public static final String CODESYSTEM_CONCEPTS = "CODESYSTEM_CONCEPTS";
|
||||
public static final String CODESYSTEM_DEPRECATED = "CODESYSTEM_DEPRECATED";
|
||||
public static final String CODESYSTEM_FILTERS = "CODESYSTEM_FILTERS";
|
||||
public static final String CODESYSTEM_FILTER_CODE = "CODESYSTEM_FILTER_CODE";
|
||||
public static final String CODESYSTEM_FILTER_DESC = "CODESYSTEM_FILTER_DESC";
|
||||
public static final String CODESYSTEM_FILTER_OP = "CODESYSTEM_FILTER_OP";
|
||||
public static final String CODESYSTEM_FILTER_VALUE = "CODESYSTEM_FILTER_VALUE";
|
||||
public static final String CODESYSTEM_PROPS = "CODESYSTEM_PROPS";
|
||||
public static final String CODESYSTEM_PROPS_DESC = "CODESYSTEM_PROPS_DESC";
|
||||
public static final String CODESYSTEM_PROP_CODE = "CODESYSTEM_PROP_CODE";
|
||||
public static final String CODESYSTEM_PROP_DESC = "CODESYSTEM_PROP_DESC";
|
||||
public static final String CODESYSTEM_PROP_NAME = "CODESYSTEM_PROP_NAME";
|
||||
public static final String CODESYSTEM_PROP_TYPE = "CODESYSTEM_PROP_TYPE";
|
||||
public static final String CODESYSTEM_PROP_URI = "CODESYSTEM_PROP_URI";
|
||||
public static final String CODESYSTEM_CONTENT_COMPLETE = "CODESYSTEM_CONTENT_COMPLETE";
|
||||
public static final String CODESYSTEM_CONTENT_EXAMPLE = "CODESYSTEM_CONTENT_EXAMPLE";
|
||||
public static final String CODESYSTEM_CONTENT_FRAGMENT = "CODESYSTEM_CONTENT_FRAGMENT";
|
||||
public static final String CODESYSTEM_CONTENT_NOTPRESENT = "CODESYSTEM_CONTENT_NOTPRESENT";
|
||||
public static final String CODESYSTEM_CONTENT_SUPPLEMENT = "CODESYSTEM_CONTENT_SUPPLEMENT";
|
||||
public static final String RESOURCE_COPYRIGHT = "RESOURCE_COPYRIGHT";
|
||||
public static final String SD_COMP_HEAD_CARD_L = "SD_COMP_HEAD_CARD_L";
|
||||
public static final String SD_COMP_HEAD_CARD_L_DESC ="SD_COMP_HEAD_CARD_L_DESC";
|
||||
public static final String SD_COMP_HEAD_CARD_R = "SD_COMP_HEAD_CARD_R";
|
||||
public static final String SD_COMP_HEAD_CARD_R_DESC ="SD_COMP_HEAD_CARD_R_DESC";
|
||||
public static final String SD_COMP_HEAD_COMP = "SD_COMP_HEAD_COMP";
|
||||
public static final String SD_COMP_HEAD_COMP_DESC = "SD_COMP_HEAD_COMP_DESC";
|
||||
public static final String SD_COMP_HEAD_DESC_L = "SD_COMP_HEAD_DESC_L";
|
||||
public static final String SD_COMP_HEAD_DESC_L_DESC ="SD_COMP_HEAD_DESC_L_DESC";
|
||||
public static final String SD_COMP_HEAD_DESC_R = "SD_COMP_HEAD_DESC_R";
|
||||
public static final String SD_COMP_HEAD_DESC_R_DESC ="SD_COMP_HEAD_DESC_R_DESC";
|
||||
public static final String SD_COMP_HEAD_FLAGS_L = "SD_COMP_HEAD_FLAGS_L";
|
||||
public static final String SD_COMP_HEAD_FLAGS_L_DESC ="SD_COMP_HEAD_FLAGS_L_DESC";
|
||||
public static final String SD_COMP_HEAD_FLAGS_R = "SD_COMP_HEAD_FLAGS_R";
|
||||
public static final String SD_COMP_HEAD_FLAGS_R_DESC ="SD_COMP_HEAD_FLAGS_R_DESC";
|
||||
public static final String SD_COMP_HEAD_NAME = "SD_COMP_HEAD_NAME";
|
||||
public static final String SD_COMP_HEAD_NAME_DESC = "SD_COMP_HEAD_NAME_DESC";
|
||||
public static final String SD_COMP_HEAD_TYPE_L = "SD_COMP_HEAD_TYPE_L";
|
||||
public static final String SD_COMP_HEAD_TYPE_L_DESC ="SD_COMP_HEAD_TYPE_L_DESC";
|
||||
public static final String SD_COMP_HEAD_TYPE_R = "SD_COMP_HEAD_TYPE_R";
|
||||
public static final String SD_COMP_HEAD_TYPE_R_DESC ="SD_COMP_HEAD_TYPE_R_DESC";
|
||||
public static final String SD_DOCO = "SD_DOCO";
|
||||
public static final String SD_GRID_HEAD_CARD = "SD_GRID_HEAD_CARD";
|
||||
public static final String SD_GRID_HEAD_CARD_DESC = "SD_GRID_HEAD_CARD_DESC";
|
||||
public static final String SD_GRID_HEAD_DESC = "SD_GRID_HEAD_DESC";
|
||||
public static final String SD_GRID_HEAD_DESC_DESC = "SD_GRID_HEAD_DESC_DESC";
|
||||
public static final String SD_GRID_HEAD_NAME = "SD_GRID_HEAD_NAME";
|
||||
public static final String SD_GRID_HEAD_NAME_DESC = "SD_GRID_HEAD_NAME_DESC";
|
||||
public static final String SD_GRID_HEAD_TYPE = "SD_GRID_HEAD_TYPE";
|
||||
public static final String SD_GRID_HEAD_TYPE_DESC = "SD_GRID_HEAD_TYPE_DESC";
|
||||
public static final String SD_HEAD_CARD = "SD_HEAD_CARD";
|
||||
public static final String SD_HEAD_CARD_DESC = "SD_HEAD_CARD_DESC";
|
||||
public static final String SD_HEAD_DESC = "SD_HEAD_DESC";
|
||||
public static final String SD_HEAD_DESC_DESC = "SD_HEAD_DESC_DESC";
|
||||
public static final String SD_HEAD_FLAGS = "SD_HEAD_FLAGS";
|
||||
public static final String SD_HEAD_FLAGS_DESC = "SD_HEAD_FLAGS_DESC";
|
||||
public static final String SD_HEAD_NAME = "SD_HEAD_NAME";
|
||||
public static final String SD_HEAD_NAME_DESC = "SD_HEAD_NAME_DESC";
|
||||
public static final String SD_HEAD_TYPE = "SD_HEAD_TYPE";
|
||||
public static final String SD_HEAD_TYPE_DESC = "SD_HEAD_TYPE_DESC";
|
||||
public static final String SD_LEGEND = "SD_LEGEND";
|
||||
public static final String SD_SLICING_INFO = "SD_SLICING_INFO";
|
||||
public static final String SD_SUMMARY_MAPPINGS = "SD_SUMMARY_MAPPINGS";
|
||||
public static final String SD_SUMMARY_MISSING_EXTENSION = "SD_SUMMARY_MISSING_EXTENSION";
|
||||
public static final String SD_SUMMARY_MISSING_PROFILE = "SD_SUMMARY_MISSING_PROFILE";
|
||||
public static final String SD_SUMMARY_PUBLICATION = "SD_SUMMARY_PUBLICATION";
|
||||
public static final String SD_SUMMARY_SLICES = "SD_SUMMARY_SLICES";
|
||||
public static final String SD_SUMMARY_SLICE = "SD_SUMMARY_SLICE";
|
||||
public static final String SD_SUMMARY_SLICE_NONE = "SD_SUMMARY_SLICE_NONE";
|
||||
public static final String SD_SUMMARY_MANDATORY = "SD_SUMMARY_MANDATORY";
|
||||
public static final String SD_SUMMARY_MUST_SUPPORT = "SD_SUMMARY_MUST_SUPPORT";
|
||||
public static final String SD_SUMMARY_FIXED = "SD_SUMMARY_FIXED";
|
||||
public static final String SD_SUMMARY_INFO = "SD_SUMMARY_INFO";
|
||||
public static final String SD_SUMMARY_PROHIBITED = "SD_SUMMARY_PROHIBITED";
|
||||
public static final String SD_SUMMARY_NESTED_MANDATORY = "SD_SUMMARY_NESTED_MANDATORY";
|
||||
public static final String TX_CODE = "TX_CODE";
|
||||
public static final String TX_COMMENTS = "TX_COMMENTS";
|
||||
public static final String TX_DEFINITION = "TX_DEFINITION";
|
||||
public static final String TX_DEPRECATED = "TX_DEPRECATED";
|
||||
public static final String TX_DISPLAY = "TX_DISPLAY";
|
||||
public static final String TX_VERSION = "TX_VERSION";
|
||||
public static final String PAT_GENDER = "PAT_GENDER";
|
||||
public static final String PAT_NO_GENDER = "PAT_NO_GENDER";
|
||||
public static final String PAT_NO_DOB = "PAT_NO_DOB";
|
||||
public static final String PAT_DOB = "PAT_DOB";
|
||||
public static final String PAT_NO_NAME = "PAT_NO_NAME";
|
||||
public static final String PAT_CONTAINED = "PAT_CONTAINED";
|
||||
public static final String PAT_OTHER_ID = "PAT_OTHER_ID";
|
||||
public static final String PAT_OTHER_ID_HINT = "PAT_OTHER_ID_HINT";
|
||||
public static final String PAT_LANG = "PAT_LANG";
|
||||
public static final String PAT_LANG_HINT = "PAT_LANG_HINT";
|
||||
public static final String PAT_LANG_PREFERRED = "PAT_LANG_PREFERRED";
|
||||
public static final String PAT_GP = "PAT_GP";
|
||||
public static final String PAT_MO = "PAT_MO";
|
||||
public static final String PAT_LINKS = "PAT_LINKS";
|
||||
public static final String PAT_LINKS_HINT = "PAT_LINKS_HINT";
|
||||
public static final String PAT_LINK_REPLBY = "PAT_LINK_REPLBY";
|
||||
public static final String PAT_LINK_REPL = "PAT_LINK_REPL";
|
||||
public static final String PAT_LINK_REFER = "PAT_LINK_REFER";
|
||||
public static final String PAT_LINK_SEE = "PAT_LINK_SEE";
|
||||
public static final String PAT_NOM_CONTACT = "PAT_NOM_CONTACT";
|
||||
public static final String PAT_NOK_CONTACT = "PAT_NOK_CONTACT";
|
||||
public static final String PAT_NOK_CONTACT_HINT = "PAT_NOK_CONTACT_HINT";
|
||||
public static final String PAT_RELN = "PAT_RELN";
|
||||
public static final String PAT_ORG = "PAT_ORG";
|
||||
public static final String PAT_PERIOD = "PAT_PERIOD";
|
||||
public static final String PAT_ALT_NAME = "PAT_ALT_NAME";
|
||||
public static final String PAT_ALT_NAME_HINT = "PAT_ALT_NAME_HINT";
|
||||
public static final String PAT_CONTACT = "PAT_CONTACT";
|
||||
public static final String PAT_CONTACT_HINT = "PAT_CONTACT_HINT";
|
||||
public static final String PAT_ACTIVE = "PAT_ACTIVE";
|
||||
public static final String PAT_ACTIVE_HINT = "PAT_ACTIVE_HINT";
|
||||
public static final String PAT_DECEASED = "PAT_DECEASED";
|
||||
public static final String PAT_DECEASED_HINT = "PAT_DECEASED_HINT";
|
||||
public static final String PAT_MARITAL = "PAT_MARITAL";
|
||||
public static final String PAT_MARITAL_HINT = "PAT_MARITAL_HINT";
|
||||
public static final String PAT_MUL_BIRTH = "PAT_MUL_BIRTH";
|
||||
public static final String PAT_MUL_BIRTH_HINT = "PAT_MUL_BIRTH_HINT";
|
||||
public static final String PAT_PHOTO = "PAT_PHOTO";
|
||||
|
||||
|
||||
protected String getMessagesSourceFileName() {
|
||||
return "rendering-phrases";
|
||||
}
|
||||
}
|
|
@ -85,31 +85,31 @@ import org.commonmark.renderer.html.HtmlRenderer;
|
|||
import org.hl7.fhir.exceptions.FHIRException;
|
||||
import org.hl7.fhir.utilities.CommaSeparatedStringBuilder;
|
||||
import org.hl7.fhir.utilities.TextFile;
|
||||
import org.hl7.fhir.utilities.TranslatingUtilities;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
|
||||
|
||||
public class HierarchicalTableGenerator extends TranslatingUtilities {
|
||||
public class HierarchicalTableGenerator {
|
||||
public enum TableGenerationMode {
|
||||
XML, XHTML
|
||||
}
|
||||
|
||||
public static final String TEXT_ICON_REFERENCE = "Reference to another Resource";
|
||||
public static final String TEXT_ICON_PRIMITIVE = "Primitive Data Type";
|
||||
public static final String TEXT_ICON_KEY = "JSON Key Value";
|
||||
public static final String TEXT_ICON_DATATYPE = "Data Type";
|
||||
public static final String TEXT_ICON_RESOURCE = "Resource";
|
||||
public static final String TEXT_ICON_ELEMENT = "Element";
|
||||
public static final String TEXT_ICON_OBJECT_BOX = "Object";
|
||||
public static final String TEXT_ICON_REUSE = "Reference to another Element";
|
||||
public static final String TEXT_ICON_EXTENSION = "Extension";
|
||||
public static final String TEXT_ICON_CHOICE = "Choice of Types";
|
||||
public static final String TEXT_ICON_SLICE = "Slice Definition";
|
||||
public static final String TEXT_ICON_SLICE_ITEM = "Slice Item";
|
||||
public static final String TEXT_ICON_FIXED = "Fixed Value";
|
||||
public static final String TEXT_ICON_EXTENSION_SIMPLE = "Simple Extension";
|
||||
public static final String TEXT_ICON_PROFILE = "Profile";
|
||||
public static final String TEXT_ICON_EXTENSION_COMPLEX = "Complex Extension";
|
||||
/*!#*/public static final String TEXT_ICON_REFERENCE = "Reference to another Resource";
|
||||
/*!#*/public static final String TEXT_ICON_PRIMITIVE = "Primitive Data Type";
|
||||
/*!#*/public static final String TEXT_ICON_KEY = "JSON Key Value";
|
||||
/*!#*/public static final String TEXT_ICON_DATATYPE = "Data Type";
|
||||
/*!#*/public static final String TEXT_ICON_RESOURCE = "Resource";
|
||||
/*!#*/public static final String TEXT_ICON_ELEMENT = "Element";
|
||||
/*!#*/public static final String TEXT_ICON_OBJECT_BOX = "Object";
|
||||
/*!#*/public static final String TEXT_ICON_REUSE = "Reference to another Element";
|
||||
/*!#*/public static final String TEXT_ICON_EXTENSION = "Extension";
|
||||
/*!#*/public static final String TEXT_ICON_CHOICE = "Choice of Types";
|
||||
/*!#*/public static final String TEXT_ICON_SLICE = "Slice Definition";
|
||||
/*!#*/public static final String TEXT_ICON_SLICE_ITEM = "Slice Item";
|
||||
/*!#*/public static final String TEXT_ICON_FIXED = "Fixed Value";
|
||||
/*!#*/public static final String TEXT_ICON_EXTENSION_SIMPLE = "Simple Extension";
|
||||
/*!#*/public static final String TEXT_ICON_PROFILE = "Profile";
|
||||
/*!#*/public static final String TEXT_ICON_EXTENSION_COMPLEX = "Complex Extension";
|
||||
|
||||
public static final int NEW_REGULAR = 0;
|
||||
public static final int CONTINUE_REGULAR = 1;
|
||||
|
@ -626,13 +626,16 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
|
|||
private boolean inLineGraphics;
|
||||
|
||||
private TableGenerationMode mode;
|
||||
private RenderingI18nContext i18n;
|
||||
|
||||
public HierarchicalTableGenerator() {
|
||||
public HierarchicalTableGenerator(RenderingI18nContext i18n) {
|
||||
super();
|
||||
this.i18n = i18n;
|
||||
}
|
||||
|
||||
public HierarchicalTableGenerator(String dest, boolean inlineGraphics) {
|
||||
public HierarchicalTableGenerator(RenderingI18nContext i18n, String dest, boolean inlineGraphics) {
|
||||
super();
|
||||
this.i18n = i18n;
|
||||
this.dest = dest;
|
||||
this.inLineGraphics = inlineGraphics;
|
||||
this.makeTargets = true;
|
||||
|
@ -646,8 +649,9 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
|
|||
|
||||
}
|
||||
|
||||
public HierarchicalTableGenerator(String dest, boolean inlineGraphics, boolean makeTargets) {
|
||||
public HierarchicalTableGenerator(RenderingI18nContext i18n, String dest, boolean inlineGraphics, boolean makeTargets) {
|
||||
super();
|
||||
this.i18n = i18n;
|
||||
this.dest = dest;
|
||||
this.inLineGraphics = inlineGraphics;
|
||||
this.makeTargets = makeTargets;
|
||||
|
@ -666,11 +670,11 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
|
|||
model.setDocoImg(Utilities.pathURL(prefix, "help16.png"));
|
||||
}
|
||||
model.setDocoRef(Utilities.pathURL("https://build.fhir.org/ig/FHIR/ig-guidance", "readingIgs.html#table-views"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Name"), translate("sd.hint", "The logical name of the element"), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Flags"), translate("sd.hint", "Information about the use of the element"), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Card."), translate("sd.hint", "Minimum and Maximum # of times the the element can appear in the instance"), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Type"), translate("sd.hint", "Reference to the type of the element"), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Description & Constraints"), translate("sd.hint", "Additional information about the element"), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_HEAD_NAME), i18n.formatMessage(RenderingI18nContext.SD_HEAD_NAME_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_HEAD_FLAGS), i18n.formatMessage(RenderingI18nContext.SD_HEAD_FLAGS_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_HEAD_CARD), i18n.formatMessage(RenderingI18nContext.SD_HEAD_CARD_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_HEAD_TYPE), i18n.formatMessage(RenderingI18nContext.SD_HEAD_TYPE_DESC), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_HEAD_DESC), i18n.formatMessage(RenderingI18nContext.SD_HEAD_DESC_DESC), null, 0));
|
||||
if (isLogical) {
|
||||
model.getTitles().add(new Title(null, prefix+"structuredefinition.html#logical", "Implemented As", "How this logical data item is implemented in a concrete resource", null, 0));
|
||||
}
|
||||
|
@ -687,16 +691,16 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
|
|||
model.setDocoImg(Utilities.pathURL(prefix, "help16.png"));
|
||||
}
|
||||
model.setDocoRef(Utilities.pathURL(prefix, "formats.html#table"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Name"), translate("sd.hint", "The logical name of the element"), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "L Flags"), translate("sd.hint", "Information about the use of the element - Left Structure"), null, 0).setStyle("border-left: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "L Card."), translate("sd.hint", "Minimum and Maximum # of times the the element can appear in the instance - Left Structure"), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "L Type"), translate("sd.hint", "Reference to the type of the element - Left Structure"), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "L Description & Constraints"), translate("sd.hint", "Additional information about the element - Left Structure"), null, 0).setStyle("border-right: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "R Flags"), translate("sd.hint", "Information about the use of the element - Left Structure"), null, 0).setStyle("border-left: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "R Card."), translate("sd.hint", "Minimum and Maximum # of times the the element can appear in the instance - Left Structure"), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "L Type"), translate("sd.hint", "Reference to the type of the element - Left Structure"), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "L Description & Constraints"), translate("sd.hint", "Additional information about the element - Left Structure"), null, 0).setStyle("border-right: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Comments"), translate("sd.hint", "Comments about the comparison"), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_NAME), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_NAME_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_FLAGS_L), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_FLAGS_L_DESC), null, 0).setStyle("border-left: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_CARD_L), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_CARD_L_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_TYPE_L), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_TYPE_L_DESC), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_DESC_L), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_DESC_L_DESC), null, 0).setStyle("border-right: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_FLAGS_R), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_FLAGS_R_DESC), null, 0).setStyle("border-left: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_CARD_R), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_CARD_R_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_TYPE_R), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_TYPE_R_DESC), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_DESC_R), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_DESC_R_DESC), null, 0).setStyle("border-right: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_COMP), i18n.formatMessage(RenderingI18nContext.SD_COMP_HEAD_COMP_DESC), null, 0));
|
||||
return model;
|
||||
}
|
||||
|
||||
|
@ -704,11 +708,11 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
|
|||
|
||||
public TableModel initGridTable(String prefix, String id) {
|
||||
TableModel model = new TableModel(id, false);
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_GRID_HEAD_NAME), i18n.formatMessage(RenderingI18nContext.SD_GRID_HEAD_NAME_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_GRID_HEAD_CARD), i18n.formatMessage(RenderingI18nContext.SD_GRID_HEAD_CARD_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_GRID_HEAD_TYPE), i18n.formatMessage(RenderingI18nContext.SD_GRID_HEAD_TYPE_DESC), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatMessage(RenderingI18nContext.SD_GRID_HEAD_DESC), i18n.formatMessage(RenderingI18nContext.SD_GRID_HEAD_DESC_DESC), null, 0));
|
||||
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Name"), translate("sd.hint", "The name of the element (Slice name in brackets). Mouse-over provides definition"), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Card."), translate("sd.hint", "Minimum and Maximum # of times the the element can appear in the instance. Super-scripts indicate additional constraints on appearance"), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Type"), translate("sd.hint", "Reference to the type of the element"), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), translate("sd.head", "Constraints and Usage"), translate("sd.hint", "Fixed values, length limits, vocabulary bindings and other usage notes"), null, 0));
|
||||
return model;
|
||||
}
|
||||
|
||||
|
@ -750,10 +754,10 @@ public class HierarchicalTableGenerator extends TranslatingUtilities {
|
|||
tc.setAttribute("class", "hierarchy");
|
||||
tc.setAttribute("colspan", Integer.toString(model.getTitles().size()));
|
||||
tc.addTag("br");
|
||||
XhtmlNode a = tc.addTag("a").setAttribute("title", translate("sd.doco", "Legend for this format")).setAttribute("href", model.getDocoRef());
|
||||
XhtmlNode a = tc.addTag("a").setAttribute("title", i18n.formatMessage(RenderingI18nContext.SD_LEGEND)).setAttribute("href", model.getDocoRef());
|
||||
if (model.getDocoImg() != null)
|
||||
a.addTag("img").setAttribute("alt", "doco").setAttribute("style", "background-color: inherit").setAttribute("src", model.getDocoImg());
|
||||
a.addText(" "+translate("sd.doco", "Documentation for this format"));
|
||||
a.addText(" "+i18n.formatMessage(RenderingI18nContext.SD_DOCO));
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
|
|
@ -1043,4 +1043,51 @@ public class XhtmlNode extends XhtmlFluent implements IBaseXhtml {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public int compareTo(XhtmlNode other) {
|
||||
return compare(this, other);
|
||||
}
|
||||
|
||||
private static int compare(XhtmlNode base, XhtmlNode other) {
|
||||
if (base == null || other == null) {
|
||||
return 0;
|
||||
} else if (base.getNodeType() != other.getNodeType()) {
|
||||
return base.getNodeType().ordinal() - other.getNodeType().ordinal();
|
||||
} else switch (base.getNodeType()) {
|
||||
case Comment: return base.getContent().compareTo(other.getContent());
|
||||
case DocType: return 0;
|
||||
case Element:
|
||||
int r = base.getName().compareTo(other.getName());
|
||||
if (r != 0) {
|
||||
return r;
|
||||
}
|
||||
case Document:
|
||||
if (base.getAttributes().size() != other.getAttributes().size()) {
|
||||
return base.getAttributes().size() - other.getAttributes().size();
|
||||
} else {
|
||||
for (String n : base.getAttributes().keySet()) {
|
||||
String vb = base.getAttributes().get(n);
|
||||
String vo = other.getAttributes().get(n);
|
||||
r = vo == null ? -1 : vb.compareTo(vo);
|
||||
if (r != 0) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (base.getChildNodes().size() != other.getChildNodes().size()) {
|
||||
return base.getChildNodes().size() - other.getChildNodes().size();
|
||||
} else {
|
||||
for (int i = 0; i < base.getChildNodes().size(); i++) {
|
||||
r = compare(base, other);
|
||||
if (r != 0) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
case Instruction: return 0;
|
||||
case Text: return base.getContent().compareTo(other.getContent());
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -271,7 +271,7 @@ XHTML_XHTML_Entity_Illegal = Invalid entity in the XHTML (''{0}'')
|
|||
XHTML_XHTML_Image_Reference_Illegal = Invalid Image Reference in the XHTML (''{0}'')
|
||||
XHTML_XHTML_NS_InValid = Wrong namespace on the XHTML (''{0}'', should be ''{1}'')
|
||||
XHTML_XHTML_Name_Invalid = Wrong name on the XHTML (''{0}'') - must start with div
|
||||
_DT_Fixed_Wrong = Value is ''{0}'' but must be ''{1}''
|
||||
_DT_Fixed_Wrong = Value is ''{0}'' but must be ''{1}''{2}
|
||||
All_observations_should_have_an_effectiveDateTime_or_an_effectivePeriod = Best Practice Recommendation: In general, all observations should have an effective[x] ({0})
|
||||
All_observations_should_have_a_performer = Best Practice Recommendation: In general, all observations should have a performer
|
||||
All_observations_should_have_a_subject = Best Practice Recommendation: In general, all observations should have a subject
|
||||
|
@ -663,30 +663,10 @@ SD_MUST_HAVE_DERIVATION = StructureDefinition {0} must have a derivation, since
|
|||
VALIDATION_VAL_PROFILE_OTHER_VERSION = Profile is for a different version of FHIR ({0}) so has been ignored
|
||||
VALIDATION_VAL_PROFILE_THIS_VERSION_OK = Profile for this version of FHIR - all OK
|
||||
VALIDATION_VAL_PROFILE_THIS_VERSION_OTHER = Profile is for this version of FHIR, but is an invalid type {0}
|
||||
RENDER_BUNDLE_HEADER_ROOT = Bundle {0} of type {1}
|
||||
RENDER_BUNDLE_HEADER_ENTRY = Entry {0}
|
||||
RENDER_BUNDLE_HEADER_ENTRY_URL = Entry {0} - fullUrl = {1}
|
||||
RENDER_BUNDLE_RESOURCE = Resource {0}:
|
||||
RENDER_BUNDLE_SEARCH = Search:
|
||||
RENDER_BUNDLE_SEARCH_MODE = Mode = {0}
|
||||
RENDER_BUNDLE_SEARCH_SCORE = Score = {0}
|
||||
RENDER_BUNDLE_RESPONSE = Response:
|
||||
RENDER_BUNDLE_LOCATION = Location = {0}
|
||||
RENDER_BUNDLE_ETAG = ETag = {0}
|
||||
RENDER_BUNDLE_LAST_MOD = LastModified = {0}
|
||||
RENDER_BUNDLE_REQUEST = Request:
|
||||
RENDER_BUNDLE_IF_NON_MATCH = If-None-Match = {0}
|
||||
RENDER_BUNDLE_IF_MOD = If-Modified-Since = {0}
|
||||
RENDER_BUNDLE_IF_MATCH = If-Match = {0}
|
||||
RENDER_BUNDLE_IF_NONE = If-None-Exist = {0}
|
||||
BUNDLE_RULE_NONE = No Rule
|
||||
BUNDLE_RULE_UNKNOWN = Bundle Rule refers to invalid resource {0}
|
||||
BUNDLE_RULE_INVALID_INDEX = Bundle Rules index is invalid ({0})
|
||||
BUNDLE_RULE_PROFILE_UNKNOWN = Bundle Rules profile {1} is unknown for {0}
|
||||
RENDER_BUNDLE_DOCUMENT_CONTENT = Additional Document Content
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_URD = {0}. {1} ({2}/{3})
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_U = {0}. {1}
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_RD = {0}. {2}/{3}
|
||||
UNABLE_TO_CHECK_IF_THE_PROVIDED_CODES_ARE_IN_THE_VALUE_SET_CS = Unable to check whether the code is in the value set ''{0}'' because the code system {1} was not found
|
||||
UNABLE_TO_CHECK_IF_THE_PROVIDED_CODES_ARE_IN_THE_VALUE_SET_VS = Unable to check whether the code is in the value set ''{0}'' because the value set {1} was not found
|
||||
UNABLE_TO_CHECK_IF_THE_PROVIDED_CODES_ARE_IN_THE_VALUE_SET = Unable to check whether the code is in the value set ''{0}''
|
||||
|
@ -931,6 +911,8 @@ CONCEPTMAP_GROUP_TARGET_PROPERTY_TYPE_UNKNOWN_SYSTEM = The code system {0} could
|
|||
SM_DEPENDENT_PARAM_TYPE_MISMATCH_DUPLICATE = The group {0} has already been used with different parameters, so the type checking may be incorrect (other = [{1}]; this = [{2}])
|
||||
CONCEPTMAP_GROUP_SOURCE_INCOMPLETE = Source Code System {0} doesn''t have all content (content = {1}), so the source codes cannot be checked
|
||||
CONCEPTMAP_GROUP_TARGET_INCOMPLETE = Target Code System {0} doesn''t have all content (content = {1}), so the target codes cannot be checked
|
||||
CONCEPTMAP_GROUP_SOURCE_SERVER_SIDE = Source Code System {0} is only supported on the terminology server, so the source codes are not validated for performance reasons
|
||||
CONCEPTMAP_GROUP_TARGET_SERVER_SIDE = Target Code System {0} is only supported on the terminology server, so the target codes are not validated for performance reasons
|
||||
SD_NO_TYPE_CODE_ON_CODE = Snapshot for {1} element {0} has type.code without a value
|
||||
UNKNOWN_CODESYSTEM = A definition for CodeSystem ''{0}'' could not be found, so the code cannot be validated
|
||||
UNKNOWN_CODESYSTEM_VERSION = A definition for CodeSystem ''{0}'' version ''{1}'' could not be found, so the code cannot be validated. Valid versions: {2}
|
||||
|
@ -961,11 +943,6 @@ SD_OBGLIGATION_INHERITS_PROFILE_NO_TARGET = Unable to read a value from this ext
|
|||
SD_OBGLIGATION_INHERITS_PROFILE_TARGET_NOT_FOUND = The profile ''{0}'' could not be found
|
||||
SD_OBGLIGATION_INHERITS_PROFILE_NOT_RIGHT_TYPE = The profile ''{0}'' is not marked as an obligation profile
|
||||
SD_OBGLIGATION_INHERITS_PROFILE_NOT_RIGHT_BASE = The profile ''{0}'' has a different base ''{1}'' from that expected ''{2}''
|
||||
RND_CS_CONTENT_COMPLETE = This <param name="cased"/> code system <param name="cs"/> defines the following code<if test="code-count != 1">s</if><param name="h"/>:
|
||||
RND_CS_CONTENT_EXAMPLE = This <param name="cased"/> code system <param name="cs"/> provides some code<if test="code-count != 1">s</if><param name="h"/> <b>that are example only</b>:
|
||||
RND_CS_CONTENT_FRAGMENT = This <param name="cased"/> code system <param name="cs"/> provides <b>a fragment</b> that includes following code<if test="code-count != 1">s</if><param name="h"/>:
|
||||
RND_CS_CONTENT_NOTPRESENT = This <param name="cased"/> code system <param name="cs"/> defines codes<param name="h"/>, but no codes are represented here
|
||||
RND_CS_CONTENT_SUPPLEMENT = This code system <param name="cs"/> defines {0} on the following code<if test="code-count != 1">s</if>:
|
||||
QUESTIONNAIRE_Q_UNKNOWN_DERIVATION = The questionnaire ''{0}'' referred to in the derivation could not be found
|
||||
QUESTIONNAIRE_Q_NO_DERIVATION_TYPE = The questionnaire ''{0}'' has no derivation type specified using the ''http://hl7.org/fhir/StructureDefinition/questionnaire-derivationType'' extension, so derivation has not been checked
|
||||
QUESTIONNAIRE_Q_NO_DERIVATION_TYPE_VALUE = The derivation extension has no value
|
||||
|
@ -1160,4 +1137,7 @@ VALUESET_BAD_FILTER_VALUE_HAS_COMMA = The filter value has a comma, but the oper
|
|||
VALUESET_BAD_FILTER_VALUE_VALID_REGEX = The value for a filter based on property ''{0}'' should be a valid regex, not ''{1}'' (err = ''{2}'')
|
||||
VALUESET_BAD_PROPERTY_NO_REGEX = Cannot apply a regex filter to the property ''{0}'' (usually regex filters are applied to the codes, or a named property of the code system)
|
||||
CODESYSTEM_PROPERTY_CODE_WARNING = If the type is ''code'', then the valueSet property should be provided to clarify what kind of code will be found in the element
|
||||
SD_ELEMENT_FIXED_WRONG_TYPE = The base element has a fixed type of ''{0}'', so this element must have a fixed value of the same type, not ''{1}''
|
||||
SD_ELEMENT_REASON_DERIVED = , because the value must match the fixed value define in ''{0}''
|
||||
SD_ELEMENT_PATTERN_WRONG_TYPE = The base element has a pattern type of ''{0}'', so this element must have a pattern value of the same type, not ''{1}''
|
||||
|
||||
|
|
|
@ -702,30 +702,10 @@ SD_MUST_HAVE_DERIVATION=StructureDefinition {0} muss eine Ableitung haben, da si
|
|||
VALIDATION_VAL_PROFILE_OTHER_VERSION=Profil ist f\u00fcr eine andere Version von FHIR ({0}) und wurde daher ignoriert
|
||||
VALIDATION_VAL_PROFILE_THIS_VERSION_OK=Profil f\u00fcr diese Version von FHIR - alles OK
|
||||
VALIDATION_VAL_PROFILE_THIS_VERSION_OTHER=Profil ist f\u00fcr diese Version von FHIR, aber ist ein ung\u00fcltiger Typ {0}
|
||||
RENDER_BUNDLE_HEADER_ROOT=Bundle {0} vom Typ {1}
|
||||
RENDER_BUNDLE_HEADER_ENTRY=Entry {0}
|
||||
RENDER_BUNDLE_HEADER_ENTRY_URL=Entry {0} - fullUrl = {1}
|
||||
RENDER_BUNDLE_RESOURCE=Ressource {0}:
|
||||
RENDER_BUNDLE_SEARCH=Suche:
|
||||
RENDER_BUNDLE_SEARCH_MODE=Mode = {0}
|
||||
RENDER_BUNDLE_SEARCH_SCORE=Score = {0}
|
||||
RENDER_BUNDLE_RESPONSE=Response:
|
||||
RENDER_BUNDLE_LOCATION=Location = {0}
|
||||
RENDER_BUNDLE_ETAG=ETag = {0}
|
||||
RENDER_BUNDLE_LAST_MOD=LastModified = {0}
|
||||
RENDER_BUNDLE_REQUEST=Request:
|
||||
RENDER_BUNDLE_IF_NON_MATCH=If-None-Match = {0}
|
||||
RENDER_BUNDLE_IF_MOD=If-Modified-Since = {0}
|
||||
RENDER_BUNDLE_IF_MATCH=If-Match = {0}
|
||||
RENDER_BUNDLE_IF_NONE=If-None-Exist = {0}
|
||||
BUNDLE_RULE_NONE=Keine Regel
|
||||
BUNDLE_RULE_UNKNOWN=Bundle Rule verweist auf ung\u00fcltige Ressource {0}
|
||||
BUNDLE_RULE_INVALID_INDEX=Bundle Rules Index ist ung\u00fcltig ({0})
|
||||
BUNDLE_RULE_PROFILE_UNKNOWN=Bundle Rules Profil {1} ist unbekannt f\u00fcr {0}
|
||||
RENDER_BUNDLE_DOCUMENT_CONTENT=Zus\u00e4tzlicher Dokumenteninhalt
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_URD={0}. {1} ({2}/{3})
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_U={0}. {1}
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_RD={0}. {2}/{3}
|
||||
UNABLE_TO_CHECK_IF_THE_PROVIDED_CODES_ARE_IN_THE_VALUE_SET_=Es kann nicht festgestellt werden, ob die angegebenen Codes {1} im ValueSet {0} enthalten sind, da das ValueSet oder ein davon abh\u00e4ngiges Codesystem dem Validator nicht bekannt sind
|
||||
TERMINOLOGY_TX_SYSTEM_WRONG_HTML=Die Code-System-Referenz {0} ist falsch - die Code-System-Referenz kann nicht auf eine HTML-Seite verweisen. Dies k\u00f6nnte die richtige Referenz sein: {1}
|
||||
TERMINOLOGY_TX_SYSTEM_WRONG_BUILD=Die Code-System-Referenz {0} ist falsch - die Code-System-Referenz kann keine Referenz auf build.fhir.org sein. Dies k\u00f6nnte die richtige Referenz sein: {1}
|
||||
|
|
|
@ -654,30 +654,10 @@ SD_MUST_HAVE_DERIVATION = El recurso StructureDefinition {0} debe tener una deri
|
|||
VALIDATION_VAL_PROFILE_OTHER_VERSION = El perfil es para una versión diferente de FHIR ({0}) así que fue ignorado
|
||||
VALIDATION_VAL_PROFILE_THIS_VERSION_OK = El perfil es para esta versión de FHIR- Todo OK
|
||||
VALIDATION_VAL_PROFILE_THIS_VERSION_OTHER = El perfil es para esta versión de FHIR, pero es de tipo inválido {0}
|
||||
RENDER_BUNDLE_HEADER_ROOT = Bundle {0} De tipo {1}
|
||||
RENDER_BUNDLE_HEADER_ENTRY = Entry {0}
|
||||
RENDER_BUNDLE_HEADER_ENTRY_URL = Entry {0} - FullURL = {1}
|
||||
RENDER_BUNDLE_RESOURCE = Recurso {0}:
|
||||
RENDER_BUNDLE_SEARCH = Búsqueda:
|
||||
RENDER_BUNDLE_SEARCH_MODE = mode = {0}
|
||||
RENDER_BUNDLE_SEARCH_SCORE = score = {0}
|
||||
RENDER_BUNDLE_RESPONSE = Respuesta:
|
||||
RENDER_BUNDLE_LOCATION = Location = {0}
|
||||
RENDER_BUNDLE_ETAG = ETag = {0}
|
||||
RENDER_BUNDLE_LAST_MOD = LastModified = {0}
|
||||
RENDER_BUNDLE_REQUEST = Request:
|
||||
RENDER_BUNDLE_IF_NON_MATCH = If-None-Match = {0}
|
||||
RENDER_BUNDLE_IF_MOD = If-Modified-Since = {0}
|
||||
RENDER_BUNDLE_IF_MATCH = If-Match = {0}
|
||||
RENDER_BUNDLE_IF_NONE = If-None-Exist = {0}
|
||||
BUNDLE_RULE_NONE = Sin reglas
|
||||
BUNDLE_RULE_UNKNOWN = LA regla del Bundle refiere a un recurso inválido {0}
|
||||
BUNDLE_RULE_INVALID_INDEX = El indice de la regla de Bundle no es válido ({0})
|
||||
BUNDLE_RULE_PROFILE_UNKNOWN = El perfil de reglas del Bundle {1} es desconocido para {0}
|
||||
RENDER_BUNDLE_DOCUMENT_CONTENT = Contenido adicional del documento
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_URD = {0}. {1} ({2}/{3})
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_U = {0}. {1}
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_RD = {0}. {2}/{3}
|
||||
UNABLE_TO_CHECK_IF_THE_PROVIDED_CODES_ARE_IN_THE_VALUE_SET_ = Imposible determinar si los códigos provistos están en el conjunto de valores {0} porque el conjunto de valores o un sistema de codificación del que depende es desconocido por el validador
|
||||
TERMINOLOGY_TX_SYSTEM_WRONG_HTML = La referencia al sistema de codificación {0} es errónea - no puede apuntar a una página HTML. Esta puede ser la referencia correcta: {1}
|
||||
TERMINOLOGY_TX_SYSTEM_WRONG_BUILD = La referencia al sistema de codificación {0} es errónea - no puede apuntar a build.fhir.org. Esta puede ser la referencia correcta: {1}
|
||||
|
|
|
@ -644,30 +644,10 @@ VALIDATION_VAL_PROFILE_THIS_VERSION_OK = このバージョンのFHIRのプロ
|
|||
VALIDATION_VAL_PROFILE_THIS_VERSION_OTHER = プロファイルはこのバージョンのFHIRのためのものですが、無効な型{0}です
|
||||
BUNDLE_BUNDLE_ENTRY_MULTIPLE_PROFILES_one =
|
||||
BUNDLE_BUNDLE_ENTRY_MULTIPLE_PROFILES_other = {0}個のプロファイルが{1}リソースに対して見つかりました。現時点では一つ以上はサポートされていません。(タイプ{2}: {3})
|
||||
RENDER_BUNDLE_HEADER_ROOT = タイプ {1} のバンドル {0}
|
||||
RENDER_BUNDLE_HEADER_ENTRY = エントリ {0}
|
||||
RENDER_BUNDLE_HEADER_ENTRY_URL = エントリ {0} - fullUrl = {1}
|
||||
RENDER_BUNDLE_RESOURCE = Resource {0}:
|
||||
RENDER_BUNDLE_SEARCH = Search:
|
||||
RENDER_BUNDLE_SEARCH_MODE = Mode = {0}
|
||||
RENDER_BUNDLE_SEARCH_SCORE = Score = {0}
|
||||
RENDER_BUNDLE_RESPONSE = Response:
|
||||
RENDER_BUNDLE_LOCATION = Location = {0}
|
||||
RENDER_BUNDLE_ETAG = ETag = {0}
|
||||
RENDER_BUNDLE_LAST_MOD = LastModified = {0}
|
||||
RENDER_BUNDLE_REQUEST = Request:
|
||||
RENDER_BUNDLE_IF_NON_MATCH = If-None-Match = {0}
|
||||
RENDER_BUNDLE_IF_MOD = If-Modified-Since = {0}
|
||||
RENDER_BUNDLE_IF_MATCH = If-Match = {0}
|
||||
RENDER_BUNDLE_IF_NONE = If-None-Exist = {0}
|
||||
BUNDLE_RULE_NONE = No Rule
|
||||
BUNDLE_RULE_UNKNOWN = Bundle Ruleは無効なリソース {0} を参照しています
|
||||
BUNDLE_RULE_INVALID_INDEX = Bundle Rulesのインデックスが無効です ({0})
|
||||
BUNDLE_RULE_PROFILE_UNKNOWN = Bundle Rulesのプロファイル {1} は {0} に対して不明です
|
||||
RENDER_BUNDLE_DOCUMENT_CONTENT = 追加のドキュメント内容
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_URD = {0}. {1} ({2}/{3})
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_U = {0}. {1}
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_RD = {0}. {2}/{3}
|
||||
UNABLE_TO_CHECK_IF_THE_PROVIDED_CODES_ARE_IN_THE_VALUE_SET_ = ValueSet {0} 内のコードをチェックできません
|
||||
TERMINOLOGY_TX_SYSTEM_WRONG_HTML = コードシステム参照{0}が間違っています - コードシステム参照はHTMLページにすることはできません。これが正しい参照である可能性があります:{1}
|
||||
TERMINOLOGY_TX_SYSTEM_WRONG_BUILD = コードシステム参照{0}が間違っています - コードシステム参照はbuild.fhir.orgへの参照にすることはできません。これが正しい参照である可能性があります:{1}
|
||||
|
@ -936,11 +916,6 @@ SD_OBGLIGATION_INHERITS_PROFILE_NO_TARGET = このextensionから値を読み
|
|||
SD_OBGLIGATION_INHERITS_PROFILE_TARGET_NOT_FOUND = プロファイル ''{0}'' が見つかりませんでした
|
||||
SD_OBGLIGATION_INHERITS_PROFILE_NOT_RIGHT_TYPE = プロファイル ''{0}'' はobligationプロファイルとしてマークされていません
|
||||
SD_OBGLIGATION_INHERITS_PROFILE_NOT_RIGHT_BASE = プロファイル ''{0}'' は予期された ''{2}'' ではなく、異なるベース''{1}'' を持っています
|
||||
RND_CS_CONTENT_COMPLETE = この<param name="cased"/>コードシステム <param name="cs"/> は次のコード<if test="code-count != 1">たち</if><param name="h"/>を定義します:
|
||||
RND_CS_CONTENT_EXAMPLE = この<param name="cased"/>コードシステム <param name="cs"/> はいくつかの例コード<if test="code-count != 1">たち</if><param name="h"/>を提供します:
|
||||
RND_CS_CONTENT_FRAGMENT = この<param name="cased"/>コードシステム <param name="cs"/> は以下のコード<param name="h"/>を含むフラグメントを提供します:
|
||||
RND_CS_CONTENT_NOTPRESENT = このコードシステム <param name="cs"/> はコード<param name="h"/>を定義しますが、ここではコードは表現されていません
|
||||
RND_CS_CONTENT_SUPPLEMENT = このコードシステム <param name="cs"/> は次のコードに {0} を定義します:
|
||||
QUESTIONNAIRE_Q_UNKNOWN_DERIVATION = 派生に参照されるQuestionnaire ''{0}'' が見つかりませんでした
|
||||
QUESTIONNAIRE_Q_NO_DERIVATION_TYPE = Questionnaire ''{0}'' は ''http://hl7.org/fhir/StructureDefinition/questionnaire-derivationType'' 拡張を使用して派生タイプが指定されていないため、派生がチェックされていません
|
||||
QUESTIONNAIRE_Q_NO_DERIVATION_TYPE_VALUE = 派生extensionには値がありません
|
||||
|
|
|
@ -644,30 +644,10 @@ SD_MUST_HAVE_DERIVATION = StructureDefinition {0} moet een derivation bevatten,
|
|||
VALIDATION_VAL_PROFILE_OTHER_VERSION = Profiel is voor een andere versie van FHIR ({0}) dus wordt genegeerd
|
||||
VALIDATION_VAL_PROFILE_THIS_VERSION_OK = Profiel voor deze versie van FHIR - alles in orde
|
||||
VALIDATION_VAL_PROFILE_THIS_VERSION_OTHER = Profiel is voor deze versie van FHIR, maar heeft een onjuist type {0}
|
||||
RENDER_BUNDLE_HEADER_ROOT = Bundle {0} van type {1}
|
||||
RENDER_BUNDLE_HEADER_ENTRY = Entry {0}
|
||||
RENDER_BUNDLE_HEADER_ENTRY_URL = Entry {0} - Full URL = {1}
|
||||
RENDER_BUNDLE_RESOURCE = Resource {0}:
|
||||
RENDER_BUNDLE_SEARCH = Zoeken:
|
||||
RENDER_BUNDLE_SEARCH_MODE = mode = {0}
|
||||
RENDER_BUNDLE_SEARCH_SCORE = score = {0}
|
||||
RENDER_BUNDLE_RESPONSE = Response:
|
||||
RENDER_BUNDLE_LOCATION = Location = {0}
|
||||
RENDER_BUNDLE_ETAG = ETag = {0}
|
||||
RENDER_BUNDLE_LAST_MOD = LastModified = {0}
|
||||
RENDER_BUNDLE_REQUEST = Request:
|
||||
RENDER_BUNDLE_IF_NON_MATCH = If-None-Match = {0}
|
||||
RENDER_BUNDLE_IF_MOD = If-Modified-Since = {0}
|
||||
RENDER_BUNDLE_IF_MATCH = If-Match = {0}
|
||||
RENDER_BUNDLE_IF_NONE = If-None-Exist = {0}
|
||||
BUNDLE_RULE_NONE = Geen regel
|
||||
BUNDLE_RULE_UNKNOWN = Bundle-regel wijst naar ongeldige resource {0}
|
||||
BUNDLE_RULE_INVALID_INDEX = Index van Bundle-regels is ongeldig ({0})
|
||||
BUNDLE_RULE_PROFILE_UNKNOWN = Bundle-regels profiel {1} is onbekend voor {0}
|
||||
RENDER_BUNDLE_DOCUMENT_CONTENT = Additional Document Content
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_URD = {0}. {1} ({2}/{3})
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_U = {0}. {1}
|
||||
RENDER_BUNDLE_HEADER_DOC_ENTRY_RD = {0}. {2}/{3}
|
||||
UNABLE_TO_CHECK_IF_THE_PROVIDED_CODES_ARE_IN_THE_VALUE_SET_ = Kan niet bepalen of de gevonden codes {1} bestaan in de waardelijst {0} omdat de waardelijst of het codesysteem waarop deze is gebaseerd onbekend zijn voor de validator
|
||||
TERMINOLOGY_TX_SYSTEM_WRONG_HTML = De codesysteemverwijzing {0} is incorrect - de codesysteemverwijzing kan niet naar een HTML-pagina leiden. Mogelijk is dit de juiste verwijzing: {1}
|
||||
TERMINOLOGY_TX_SYSTEM_WRONG_BUILD = De codesysteemverwijzing {0} is incorrect - de codesysteemverwijzing kan niet naar build.fhir.org leiden. Mogelijk is dit de juiste verwijzing: {1}
|
||||
|
|
|
@ -0,0 +1,149 @@
|
|||
# Rendering
|
||||
BUNDLE_HEADER_ROOT = Bundle {0} of type {1}
|
||||
BUNDLE_HEADER_ENTRY = Entry {0}
|
||||
BUNDLE_HEADER_ENTRY_URL = Entry {0} - fullUrl = {1}
|
||||
BUNDLE_RESOURCE = Resource {0}:
|
||||
BUNDLE_SEARCH = Search:
|
||||
BUNDLE_SEARCH_MODE = Mode = {0}
|
||||
BUNDLE_SEARCH_SCORE = Score = {0}
|
||||
BUNDLE_RESPONSE = Response:
|
||||
BUNDLE_LOCATION = Location = {0}
|
||||
BUNDLE_ETAG = ETag = {0}
|
||||
BUNDLE_LAST_MOD = LastModified = {0}
|
||||
BUNDLE_REQUEST = Request:
|
||||
BUNDLE_IF_NON_MATCH = If-None-Match = {0}
|
||||
BUNDLE_IF_MOD = If-Modified-Since = {0}
|
||||
BUNDLE_IF_MATCH = If-Match = {0}
|
||||
BUNDLE_IF_NONE = If-None-Exist = {0}
|
||||
CODEPROP_CODE = Code
|
||||
CODESYSTEM_PROPS = Properties
|
||||
CODESYSTEM_CONCEPTS = Concepts
|
||||
CODESYSTEM_DEPRECATED = Deprecated
|
||||
CODESYSTEM_DESC = Description
|
||||
CODESYSTEM_FILTERS = Filters
|
||||
CODESYSTEM_FILTER_CODE = Code
|
||||
CODESYSTEM_FILTER_OP = Op
|
||||
CODESYSTEM_FILTER_VALUE = Value
|
||||
CODESYSTEM_PROP_CODE = Code
|
||||
CODESYSTEM_PROP_NAME = Name
|
||||
CODESYSTEM_PROP_URI = URI
|
||||
CODESYSTEM_PROP_DESC = Description
|
||||
CODESYSTEM_PROP_TYPE = Type
|
||||
CODESYSTEM_PROPS_DESC = This code system defines the following properties for its concepts
|
||||
CODESYSTEM_CONTENT_COMPLETE This <param name="cased"/> code system <param name="cs"/> defines the following code<if test="code-count != 1">s</if><param name="h"/>:
|
||||
CODESYSTEM_CONTENT_EXAMPLE = This <param name="cased"/> code system <param name="cs"/> provides some code<if test="code-count != 1">s</if><param name="h"/> <b>that are example only</b>:
|
||||
CODESYSTEM_CONTENT_FRAGMENT = This <param name="cased"/> code system <param name="cs"/> provides <b>a fragment</b> that includes following code<if test="code-count != 1">s</if><param name="h"/>:
|
||||
CODESYSTEM_CONTENT_NOTPRESENT = This <param name="cased"/> code system <param name="cs"/> defines codes<param name="h"/>, but no codes are represented here
|
||||
CODESYSTEM_CONTENT_SUPPLEMENT = This code system <param name="cs"/> defines {0} on the following code<if test="code-count != 1">s</if>:
|
||||
RESOURCE_COPYRIGHT = Copyright Statement:
|
||||
SD_COMP_HEAD_CARD_L = L Card.
|
||||
SD_COMP_HEAD_CARD_L_DESC = Minimum and Maximum # of times the the element can appear in the instance - Left Structure
|
||||
SD_COMP_HEAD_CARD_R = R Card.
|
||||
SD_COMP_HEAD_CARD_R_DESC = Minimum and Maximum # of times the the element can appear in the instance - Right Structure
|
||||
SD_COMP_HEAD_COMP = Comments
|
||||
SD_COMP_HEAD_COMP_DESC = Comments about the comparison
|
||||
SD_COMP_HEAD_DESC_L = L Description & Constraints
|
||||
SD_COMP_HEAD_DESC_L_DESC = Additional information about the element - Left Structure
|
||||
SD_COMP_HEAD_DESC_R = R Description & Constraints
|
||||
SD_COMP_HEAD_DESC_R_DESC = Additional information about the element - Right Structure
|
||||
SD_COMP_HEAD_FLAGS_L = L Flags
|
||||
SD_COMP_HEAD_FLAGS_L_DESC = Information about the use of the element - Left Structure
|
||||
SD_COMP_HEAD_FLAGS_R = R Flags
|
||||
SD_COMP_HEAD_FLAGS_R_DESC = Information about the use of the element - Right Structure
|
||||
SD_COMP_HEAD_NAME = Name
|
||||
SD_COMP_HEAD_NAME_DESC = The logical name of the element
|
||||
SD_COMP_HEAD_TYPE_L = L Type
|
||||
SD_COMP_HEAD_TYPE_L_DESC = Reference to the type of the element - Left Structure
|
||||
SD_COMP_HEAD_TYPE_R = R Type
|
||||
SD_COMP_HEAD_TYPE_R_DESC = Reference to the type of the element - Right Structure
|
||||
SD_DOCO = Documentation for this format
|
||||
SD_GRID_HEAD_CARD = Card.
|
||||
SD_GRID_HEAD_CARD_DESC = Minimum and Maximum # of times the the element can appear in the instance. Super-scripts indicate additional constraints on appearance
|
||||
SD_GRID_HEAD_DESC = Constraints and Usage
|
||||
SD_GRID_HEAD_DESC_DESC = Fixed values, length limits, vocabulary bindings and other usage notes
|
||||
SD_GRID_HEAD_NAME = Name
|
||||
SD_GRID_HEAD_NAME_DESC = The name of the element (Slice name in brackets). Mouse-over provides definition
|
||||
SD_GRID_HEAD_TYPE = Type
|
||||
SD_GRID_HEAD_TYPE_DESC = Reference to the type of the element
|
||||
SD_HEAD_CARD = Card.
|
||||
SD_HEAD_CARD_DESC = Minimum and Maximum # of times the the element can appear in the instance
|
||||
SD_HEAD_DESC = Description & Constraints
|
||||
SD_HEAD_DESC_DESC = Additional information about the element
|
||||
SD_HEAD_FLAGS_DESC = Information about the use of the element
|
||||
SD_HEAD_NAME = Name
|
||||
SD_HEAD_SC = The logical name of the elemHEAD_FLAGS = Flags
|
||||
SD_HEAD_TYPE = Type
|
||||
SD_HEAD_TYPE_DESC = Reference to the type of the element
|
||||
SD_LEGEND = Legend for this format
|
||||
SD_SUMMARY = Fixed Value: {0} {1}
|
||||
SD_SUMMARY_MAPPINGS = Mappings for {0} ({2}{1}{3})
|
||||
SD_SUMMARY_MISSING_EXTENSION = Unable to summarise extension {0} (no extension found)
|
||||
SD_SUMMARY_MISSING_PROFILE = Unable to summarise profile {0} (no profile found)
|
||||
SD_SUMMARY_PUBLICATION = This profile was published on {0} as a {1} by {2}
|
||||
SD_SUMMARY_SLICES = This structure defines the following {0}Slices{1}
|
||||
SD_SUMMARY_SLICE_NONE = There is a slice with no discriminator at {0}
|
||||
SD_SUMMARY_SLICE_one = The element {0} is sliced based on the value of {1}
|
||||
SD_SUMMARY_SLICE_other = The element {0} is sliced based on the values of {1}
|
||||
SD_SUMMARY_MANDATORY = Mandatory: {0} {1}
|
||||
SD_SUMMARY_MUST_SUPPORT = Must-Support: {0} {1}
|
||||
SD_SUMMARY_FIXED = Fixed: {0} {1}
|
||||
SD_SUMMARY_INFO = {0}, {1} by {2}
|
||||
SD_SUMMARY_PROHIBITED = Prohibited: {0} {1}
|
||||
SD_SUMMARY_NESTED_MANDATORY = ({0} nested mandatory {1})
|
||||
TX_CODE = Code
|
||||
TX_COMMENTS = Comments
|
||||
TX_DEFINITION = Definition
|
||||
TX_DEPRECATED = Deprecated
|
||||
TX_DISPLAY = Display
|
||||
TX_VERSION = Version
|
||||
PAT_NO_GENDER = (no stated gender)
|
||||
PAT_GENDER = Gender: {0}
|
||||
PAT_NO_DOB = DoB Unknown
|
||||
PAT_DOB = DoB: {0}
|
||||
PAT_NO_NAME = Anonymous Patient
|
||||
PAT_CONTAINED_one = Contained Resource
|
||||
PAT_CONTAINED_other = Contained Resources
|
||||
PAT_OTHER_ID_one = Other Id:
|
||||
PAT_OTHER_ID_other = Other Ids:
|
||||
PAT_OTHER_ID_HINT_one = Other Id (see the one above)
|
||||
PAT_OTHER_ID_HINT_other = Other Ids (see the one above)
|
||||
PAT_LANG_one = Language:
|
||||
PAT_LANG_other = Languages:
|
||||
PAT_LANG_HINT_one = Language spoken
|
||||
PAT_LANG_HINT_other = Languages spoken
|
||||
PAT_LANG_PREFERRED = (preferred)
|
||||
PAT_GP = General Practitioner
|
||||
PAT_MO = Managing Organization
|
||||
PAT_LINKS = Links:
|
||||
PAT_LINKS_HINT = Patient Links
|
||||
PAT_LINK_REPLBY = This record replaced by
|
||||
PAT_LINK_REPL = This record replaces
|
||||
PAT_LINK_REFER = Please refer to
|
||||
PAT_LINK_SEE = Also see
|
||||
PAT_NOM_CONTACT = Nominated Contact:
|
||||
PAT_NOK_CONTACT = Contact:
|
||||
PAT_NOK_CONTACT_HINT = Patient contact
|
||||
PAT_RELN = Relationships:
|
||||
PAT_ORG = Organization:
|
||||
PAT_PERIOD = Valid Period:
|
||||
PAT_ALT_NAME = Alt. Name:
|
||||
PAT_ALT_NAME_HINT = Alternate names (see the one above)
|
||||
PAT_CONTACT = Contact Detail
|
||||
PAT_CONTACT_HINT = Ways to contact the Patient
|
||||
PAT_ACTIVE = Active:
|
||||
PAT_ACTIVE_HINT = Record is active
|
||||
PAT_DECEASED = Deceased:
|
||||
PAT_DECEASED_HINT = Known status of Patient
|
||||
PAT_MARITAL = Marital Status:
|
||||
PAT_MARITAL_HINT = Known Marital status of Patient
|
||||
PAT_MUL_BIRTH = Multiple Birth:
|
||||
PAT_MUL_BIRTH_HINT = Known multipleBirth status of Patient
|
||||
PAT_PHOTO = Patient Photo
|
||||
SD_HEAD_NAME_DESC = The logical name of the element
|
||||
SD_HEAD_FLAGS = Flags
|
||||
SD_SLICING_INFO = {0}, {1} by {2}
|
||||
BUNDLE_DOCUMENT_CONTENT = Additional Document Content
|
||||
BUNDLE_HEADER_DOC_ENTRY_URD = {0}. {1} ({2}/{3})
|
||||
BUNDLE_HEADER_DOC_ENTRY_U = {0}. {1}
|
||||
BUNDLE_HEADER_DOC_ENTRY_RD = {0}. {2}/{3}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue