FIx up issues with calling translation on the wrong set of properties (#1592)
This commit is contained in:
parent
2d226fdf51
commit
a86fe5a2d2
|
@ -25,6 +25,8 @@ import org.hl7.fhir.r5.model.CodeSystem;
|
|||
import org.hl7.fhir.r5.model.Resource;
|
||||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.model.ValueSet;
|
||||
import org.hl7.fhir.r5.renderers.utils.RenderingContext;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
|
||||
public class ComparisonSession {
|
||||
|
||||
|
@ -39,8 +41,9 @@ public class ComparisonSession {
|
|||
private String title;
|
||||
private ProfileKnowledgeProvider pkpLeft;
|
||||
private ProfileKnowledgeProvider pkpRight;
|
||||
private RenderingI18nContext i18n;
|
||||
|
||||
public ComparisonSession(IWorkerContext contextLeft, IWorkerContext contextRight, String title, ProfileKnowledgeProvider pkpLeft, ProfileKnowledgeProvider pkpRight) {
|
||||
public ComparisonSession(RenderingI18nContext i18n, IWorkerContext contextLeft, IWorkerContext contextRight, String title, ProfileKnowledgeProvider pkpLeft, ProfileKnowledgeProvider pkpRight) {
|
||||
super();
|
||||
this.contextLeft = contextLeft;
|
||||
this.contextRight = contextRight;
|
||||
|
@ -48,6 +51,7 @@ public class ComparisonSession {
|
|||
this.title = title;
|
||||
this.pkpLeft = pkpLeft;
|
||||
this.pkpRight = pkpRight;
|
||||
this.i18n = i18n;
|
||||
debug = false;
|
||||
}
|
||||
|
||||
|
@ -175,6 +179,10 @@ public class ComparisonSession {
|
|||
return annotate;
|
||||
}
|
||||
|
||||
public RenderingI18nContext getI18n() {
|
||||
return i18n;
|
||||
}
|
||||
|
||||
public void setAnnotate(boolean annotate) {
|
||||
this.annotate = annotate;
|
||||
}
|
||||
|
|
|
@ -42,8 +42,6 @@ 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.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.xhtml.HierarchicalTableGenerator;
|
||||
|
@ -1253,7 +1251,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(new RenderingI18nContext(), Utilities.path("[tmp]", "compare"), false, true);
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(session.getI18n(), 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);
|
||||
|
@ -1290,32 +1288,32 @@ public class StructureDefinitionComparer extends CanonicalResourceComparer imple
|
|||
boolean ext = false;
|
||||
if (tail(path).equals("extension")) {
|
||||
if (elementIsComplex(combined))
|
||||
row.setIcon("icon_extension_complex.png", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_EXTENSION_COMPLEX));
|
||||
row.setIcon("icon_extension_complex.png", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_EXTENSION_COMPLEX));
|
||||
else
|
||||
row.setIcon("icon_extension_simple.png", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_EXTENSION_SIMPLE));
|
||||
row.setIcon("icon_extension_simple.png", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_EXTENSION_SIMPLE));
|
||||
ext = true;
|
||||
} else if (tail(path).equals("modifierExtension")) {
|
||||
if (elementIsComplex(combined))
|
||||
row.setIcon("icon_modifier_extension_complex.png", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_EXTENSION_COMPLEX));
|
||||
row.setIcon("icon_modifier_extension_complex.png", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_EXTENSION_COMPLEX));
|
||||
else
|
||||
row.setIcon("icon_modifier_extension_simple.png", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_EXTENSION_SIMPLE));
|
||||
row.setIcon("icon_modifier_extension_simple.png", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_EXTENSION_SIMPLE));
|
||||
} else if (hasChoice(combined)) {
|
||||
if (allAreReference(combined))
|
||||
row.setIcon("icon_reference.png", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_REFERENCE));
|
||||
row.setIcon("icon_reference.png", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_REFERENCE));
|
||||
else {
|
||||
row.setIcon("icon_choice.gif", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_CHOICE));
|
||||
row.setIcon("icon_choice.gif", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_CHOICE));
|
||||
typesRow = row;
|
||||
}
|
||||
} else if (combined.either().getDef().hasContentReference())
|
||||
row.setIcon("icon_reuse.png", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_REUSE));
|
||||
row.setIcon("icon_reuse.png", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_REUSE));
|
||||
else if (isPrimitive(combined))
|
||||
row.setIcon("icon_primitive.png", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_PRIMITIVE));
|
||||
row.setIcon("icon_primitive.png", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_PRIMITIVE));
|
||||
else if (hasTarget(combined))
|
||||
row.setIcon("icon_reference.png", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_REFERENCE));
|
||||
row.setIcon("icon_reference.png", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_REFERENCE));
|
||||
else if (isDataType(combined))
|
||||
row.setIcon("icon_datatype.gif", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_DATATYPE));
|
||||
row.setIcon("icon_datatype.gif", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_DATATYPE));
|
||||
else
|
||||
row.setIcon("icon_resource.png", utilsLeft.getContext().formatMessage(RenderingI18nContext.TEXT_ICON_RESOURCE));
|
||||
row.setIcon("icon_resource.png", session.getI18n().formatPhrase(RenderingContext.TEXT_ICON_RESOURCE));
|
||||
String ref = defPath == null ? null : defPath + combined.either().getDef().getId();
|
||||
String sName = tail(path);
|
||||
String sn = getSliceName(combined);
|
||||
|
|
|
@ -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(context.formatMessage(RenderingContext.ACTOR_DEF_ACT, acd.getName()) + " ");
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.ACTOR_DEF_ACT, acd.getName()) + " ");
|
||||
tr.td().tx(acd.getTitle());
|
||||
tr.td().tx(context.formatMessage(RenderingContext.ACTOR_DEF_TYP, acd.getType().toCode()) + " ");
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.ACTOR_DEF_TYP, acd.getType().toCode()) + " ");
|
||||
XhtmlNode td = tbl.tr().td().colspan("3");
|
||||
addMarkdown(td, acd.getDocumentation());
|
||||
if (acd.hasReference()) {
|
||||
tbl.tr().td().tx(context.formatMessage(RenderingContext.ACTOR_DEF_REF));
|
||||
tbl.tr().td().tx(context.formatPhrase(RenderingContext.ACTOR_DEF_REF));
|
||||
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(context.formatMessage(RenderingContext.ACTOR_DEF_CAP));
|
||||
tbl.tr().td().tx(context.formatPhrase(RenderingContext.ACTOR_DEF_CAP));
|
||||
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(context.formatMessage(RenderingContext.ACTOR_DEF_DER));
|
||||
tbl.tr().td().tx(context.formatPhrase(RenderingContext.ACTOR_DEF_DER));
|
||||
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(context.formatMessage(RenderingContext.ADD_BIND_ADD_BIND));
|
||||
tr.td().style("font-size: 11px").tx(context.formatMessage(RenderingContext.ADD_BIND_PUR));
|
||||
tr.td().style("font-size: 11px").b().tx(context.formatPhrase(RenderingContext.ADD_BIND_ADD_BIND));
|
||||
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.ADD_BIND_PUR));
|
||||
if (usage) {
|
||||
tr.td().style("font-size: 11px").tx(context.formatMessage(RenderingContext.ADD_BIND_USE));
|
||||
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.ADD_BIND_USE));
|
||||
}
|
||||
if (any) {
|
||||
tr.td().style("font-size: 11px").tx(context.formatMessage(RenderingContext.ADD_BIND_ANY));
|
||||
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.ADD_BIND_ANY));
|
||||
}
|
||||
if (doco) {
|
||||
tr.td().style("font-size: 11px").tx(context.formatMessage(RenderingContext.ADD_BIND_DOC));
|
||||
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.ADD_BIND_DOC));
|
||||
}
|
||||
for (AdditionalBindingDetail binding : bindings) {
|
||||
tr = new XhtmlNode(NodeType.Element, "tr");
|
||||
|
@ -296,8 +296,8 @@ public class AdditionalBindingsRenderer {
|
|||
}
|
||||
}
|
||||
if (any) {
|
||||
String newRepeat = binding.any ? context.formatMessage(RenderingContext.ADD_BIND_ANY_REP) : context.formatMessage(RenderingContext.ADD_BIND_ALL_REP);
|
||||
String oldRepeat = binding.compare!=null && binding.compare.any ? context.formatMessage(RenderingContext.ADD_BIND_ANY_REP) : context.formatMessage(RenderingContext.ADD_BIND_ALL_REP);
|
||||
String newRepeat = binding.any ? context.formatPhrase(RenderingContext.ADD_BIND_ANY_REP) : context.formatPhrase(RenderingContext.ADD_BIND_ALL_REP);
|
||||
String oldRepeat = binding.compare!=null && binding.compare.any ? context.formatPhrase(RenderingContext.ADD_BIND_ANY_REP) : context.formatPhrase(RenderingContext.ADD_BIND_ALL_REP);
|
||||
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", context.formatMessage(RenderingContext.ADD_BIND_EXT_PREF)).tx(context.formatMessage(RenderingContext.ADD_BIND_MAX));
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-maximum" : corePath+"extension-elementdefinition-maxvalueset.html", context.formatPhrase(RenderingContext.ADD_BIND_EXT_PREF)).tx(context.formatPhrase(RenderingContext.ADD_BIND_MAX));
|
||||
break;
|
||||
case "minimum":
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-minimum" : corePath+"extension-elementdefinition-minvalueset.html", context.formatMessage(RenderingContext.ADD_BIND_MIN_ALLOW)).tx(context.formatMessage(RenderingContext.ADD_BIND_MIN));
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-minimum" : corePath+"extension-elementdefinition-minvalueset.html", context.formatPhrase(RenderingContext.ADD_BIND_MIN_ALLOW)).tx(context.formatPhrase(RenderingContext.ADD_BIND_MIN));
|
||||
break;
|
||||
case "required" :
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-required" : corePath+"terminologies.html#strength", context.formatMessage(RenderingContext.ADD_BIND_VALID_REQ)).tx(context.formatMessage(RenderingContext.ADD_BIND_REQ_BIND));
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-required" : corePath+"terminologies.html#strength", context.formatPhrase(RenderingContext.ADD_BIND_VALID_REQ)).tx(context.formatPhrase(RenderingContext.ADD_BIND_REQ_BIND));
|
||||
break;
|
||||
case "extensible" :
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-extensible" : corePath+"terminologies.html#strength", context.formatMessage(RenderingContext.ADD_BIND_VALID_EXT)).tx(context.formatMessage(RenderingContext.ADD_BIND_EX_BIND));
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-extensible" : corePath+"terminologies.html#strength", context.formatPhrase(RenderingContext.ADD_BIND_VALID_EXT)).tx(context.formatPhrase(RenderingContext.ADD_BIND_EX_BIND));
|
||||
break;
|
||||
case "current" :
|
||||
if (r5) {
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-current" : corePath+"terminologies.html#strength", context.formatMessage(RenderingContext.ADD_BIND_NEW_REC)).tx(context.formatMessage(RenderingContext.ADD_BIND_CURR_BIND));
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-current" : corePath+"terminologies.html#strength", context.formatPhrase(RenderingContext.ADD_BIND_NEW_REC)).tx(context.formatPhrase(RenderingContext.ADD_BIND_CURR_BIND));
|
||||
} else {
|
||||
td.span(null, context.formatMessage(RenderingContext.ADD_BIND_NEW_REC)).tx(context.formatMessage(RenderingContext.ADD_BIND_REQUIRED));
|
||||
td.span(null, context.formatPhrase(RenderingContext.ADD_BIND_NEW_REC)).tx(context.formatPhrase(RenderingContext.ADD_BIND_REQUIRED));
|
||||
}
|
||||
break;
|
||||
case "preferred" :
|
||||
if (r5) {
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-preferred" : corePath+"terminologies.html#strength", context.formatMessage(RenderingContext.ADD_BIND_RECOM_VALUE_SET)).tx(context.formatMessage(RenderingContext.ADD_BIND_PREF_BIND));
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-preferred" : corePath+"terminologies.html#strength", context.formatPhrase(RenderingContext.ADD_BIND_RECOM_VALUE_SET)).tx(context.formatPhrase(RenderingContext.ADD_BIND_PREF_BIND));
|
||||
} else {
|
||||
td.span(null, context.formatMessage(RenderingContext.ADD_BIND_RECOM_VALUE_SET)).tx(context.formatMessage(RenderingContext.ADD_BIND_PREFERRED));
|
||||
td.span(null, context.formatPhrase(RenderingContext.ADD_BIND_RECOM_VALUE_SET)).tx(context.formatPhrase(RenderingContext.ADD_BIND_PREFERRED));
|
||||
}
|
||||
break;
|
||||
case "ui" :
|
||||
if (r5) {
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-ui" : corePath+"terminologies.html#strength", context.formatMessage(RenderingContext.ADD_BIND_GIVEN_CONT)).tx(context.formatMessage(RenderingContext.ADD_BIND_UI_BIND));
|
||||
td.ah(r5 ? corePath+"valueset-additional-binding-purpose.html#additional-binding-purpose-ui" : corePath+"terminologies.html#strength", context.formatPhrase(RenderingContext.ADD_BIND_GIVEN_CONT)).tx(context.formatPhrase(RenderingContext.ADD_BIND_UI_BIND));
|
||||
} else {
|
||||
td.span(null, context.formatMessage(RenderingContext.ADD_BIND_GIVEN_CONT)).tx(context.formatMessage(RenderingContext.ADD_BIND_UI));
|
||||
td.span(null, context.formatPhrase(RenderingContext.ADD_BIND_GIVEN_CONT)).tx(context.formatPhrase(RenderingContext.ADD_BIND_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, context.formatMessage(RenderingContext.ADD_BIND_DESIG_SYS)).tx(context.formatMessage(RenderingContext.ADD_BIND_STARTER));
|
||||
td.span(null, context.formatPhrase(RenderingContext.ADD_BIND_DESIG_SYS)).tx(context.formatPhrase(RenderingContext.ADD_BIND_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, context.formatMessage(RenderingContext.ADD_BIND_VALUE_COMP)).tx(context.formatMessage(RenderingContext.ADD_BIND_COMPONENT));
|
||||
td.span(null, context.formatPhrase(RenderingContext.ADD_BIND_VALUE_COMP)).tx(context.formatPhrase(RenderingContext.ADD_BIND_COMPONENT));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
td.span(null, context.formatMessage(RenderingContext.ADD_BIND_UNKNOWN_PUR)).tx(purpose);
|
||||
td.span(null, context.formatPhrase(RenderingContext.ADD_BIND_UNKNOWN_PUR)).tx(purpose);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -430,7 +430,7 @@ public class AdditionalBindingsRenderer {
|
|||
children.tx(" (");
|
||||
boolean ffirst = !b.getAny();
|
||||
if (b.getAny()) {
|
||||
children.tx(context.formatMessage(RenderingContext.ADD_BIND_ANY_REP));
|
||||
children.tx(context.formatPhrase(RenderingContext.ADD_BIND_ANY_REP));
|
||||
}
|
||||
for (UsageContext uc : b.getUsage()) {
|
||||
if (ffirst) ffirst = false; else children.tx(",");
|
||||
|
|
|
@ -68,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(context.formatMessage(RenderingContext.BUND_REND_INVALID_DOC, b.getId(), entries.get(0).get("resource").fhirType()+"')"));
|
||||
throw new FHIRException(context.formatPhrase(RenderingContext.BUND_REND_INVALID_DOC, b.getId(), 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(RenderingContext.BUNDLE_HEADER_ROOT, b.getId(), b.get("type").primitiveValue()));
|
||||
root.para().addText(formatPhrase(RenderingContext.BUNDLE_HEADER_ROOT, b.getId(), b.get("type").primitiveValue()));
|
||||
int i = 0;
|
||||
for (BaseWrapper be : entries) {
|
||||
i++;
|
||||
|
@ -93,9 +93,9 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
}
|
||||
root.hr();
|
||||
if (be.has("fullUrl")) {
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ENTRY_URL, Integer.toString(i), be.get("fullUrl").primitiveValue()));
|
||||
root.para().addText(formatPhrase(RenderingContext.BUNDLE_HEADER_ENTRY_URL, Integer.toString(i), be.get("fullUrl").primitiveValue()));
|
||||
} else {
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ENTRY, Integer.toString(i)));
|
||||
root.para().addText(formatPhrase(RenderingContext.BUNDLE_HEADER_ENTRY, Integer.toString(i)));
|
||||
}
|
||||
// if (be.hasRequest())
|
||||
// renderRequest(root, be.getRequest());
|
||||
|
@ -104,7 +104,7 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
// if (be.hasResponse())
|
||||
// renderResponse(root, be.getResponse());
|
||||
if (be.has("resource")) {
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_RESOURCE, be.get("resource").fhirType()));
|
||||
root.para().addText(formatPhrase(RenderingContext.BUNDLE_RESOURCE, be.get("resource").fhirType()));
|
||||
ResourceWrapper rw = be.getChildByName("resource").getAsResource();
|
||||
XhtmlNode xn = rw.getNarrative();
|
||||
if (xn == null || xn.isEmpty()) {
|
||||
|
@ -114,7 +114,7 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
xn = rr.render(rw);
|
||||
} catch (Exception e) {
|
||||
xn = new XhtmlNode();
|
||||
xn.para().b().tx(context.formatMessage(RenderingContext.BUNDLE_REV_EXCP, e.getMessage()) + " ");
|
||||
xn.para().b().tx(context.formatPhrase(RenderingContext.BUNDLE_REV_EXCP, e.getMessage()) + " ");
|
||||
}
|
||||
}
|
||||
root.blockquote().para().addChildren(xn);
|
||||
|
@ -288,15 +288,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(context.formatMessage(RenderingContext.BUNDLE_REV_INV_DOC));
|
||||
throw new FHIRException(context.formatPhrase(RenderingContext.BUNDLE_REV_INV_DOC));
|
||||
}
|
||||
renderDocument(x, b);
|
||||
start = 1;
|
||||
docMode = true;
|
||||
x.hr();
|
||||
x.h2().addText(formatMessage(RenderingContext.BUNDLE_DOCUMENT_CONTENT, b.getId(), b.getType().toCode()));
|
||||
x.h2().addText(formatPhrase(RenderingContext.BUNDLE_DOCUMENT_CONTENT, b.getId(), b.getType().toCode()));
|
||||
} else {
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ROOT, b.getId(), b.getType().toCode()));
|
||||
x.para().addText(formatPhrase(RenderingContext.BUNDLE_HEADER_ROOT, b.getId(), b.getType().toCode()));
|
||||
}
|
||||
int i = 0;
|
||||
for (BundleEntryComponent be : b.getEntry()) {
|
||||
|
@ -317,17 +317,17 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
x.hr();
|
||||
if (docMode) {
|
||||
if (be.hasFullUrl() && be.hasResource()) {
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_DOC_ENTRY_URD, Integer.toString(i), be.getFullUrl(), be.getResource().fhirType(), be.getResource().getIdBase()));
|
||||
x.para().addText(formatPhrase(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(RenderingContext.BUNDLE_HEADER_DOC_ENTRY_U, Integer.toString(i), be.getFullUrl()));
|
||||
x.para().addText(formatPhrase(RenderingContext.BUNDLE_HEADER_DOC_ENTRY_U, Integer.toString(i), be.getFullUrl()));
|
||||
} else if (be.hasResource()) {
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_DOC_ENTRY_RD, Integer.toString(i), be.getResource().fhirType(), be.getResource().getIdBase()));
|
||||
x.para().addText(formatPhrase(RenderingContext.BUNDLE_HEADER_DOC_ENTRY_RD, Integer.toString(i), be.getResource().fhirType(), be.getResource().getIdBase()));
|
||||
}
|
||||
} else {
|
||||
if (be.hasFullUrl()) {
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ENTRY_URL, Integer.toString(i), be.getFullUrl()));
|
||||
x.para().addText(formatPhrase(RenderingContext.BUNDLE_HEADER_ENTRY_URL, Integer.toString(i), be.getFullUrl()));
|
||||
} else {
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_HEADER_ENTRY, Integer.toString(i)));
|
||||
x.para().addText(formatPhrase(RenderingContext.BUNDLE_HEADER_ENTRY, Integer.toString(i)));
|
||||
}
|
||||
if (be.hasRequest())
|
||||
renderRequest(x, be.getRequest());
|
||||
|
@ -338,7 +338,7 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (be.hasResource()) {
|
||||
if (!docMode) {
|
||||
x.para().addText(formatMessage(RenderingContext.BUNDLE_RESOURCE, be.getResource().fhirType()));
|
||||
x.para().addText(formatPhrase(RenderingContext.BUNDLE_RESOURCE, be.getResource().fhirType()));
|
||||
}
|
||||
if (be.hasResource()) {
|
||||
XhtmlNode xn = null;
|
||||
|
@ -352,7 +352,7 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
rr.setRcontext(new ResourceContext(rcontext, be.getResource()));
|
||||
xn = rr.build(be.getResource());
|
||||
} catch (Exception e) {
|
||||
xn = makeExceptionXhtml(e, context.formatMessage(RenderingContext.BUND_REND_GEN_NARR));
|
||||
xn = makeExceptionXhtml(e, context.formatPhrase(RenderingContext.BUND_REND_GEN_NARR));
|
||||
}
|
||||
}
|
||||
x.blockquote().para().getChildNodes().addAll(checkInternalLinks(b, xn.getChildNodes()));
|
||||
|
@ -411,42 +411,42 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
|
||||
private void renderSearch(XhtmlNode root, BundleEntrySearchComponent search) {
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_SEARCH));
|
||||
b.append(formatPhrase(RenderingContext.BUNDLE_SEARCH));
|
||||
if (search.hasMode())
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_SEARCH_MODE, search.getMode().toCode()));
|
||||
b.append(formatPhrase(RenderingContext.BUNDLE_SEARCH_MODE, search.getMode().toCode()));
|
||||
if (search.hasScore()) {
|
||||
if (search.hasMode())
|
||||
b.append(",");
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_SEARCH_SCORE, search.getScore()));
|
||||
b.append(formatPhrase(RenderingContext.BUNDLE_SEARCH_SCORE, search.getScore()));
|
||||
}
|
||||
root.para().addText(b.toString());
|
||||
}
|
||||
|
||||
private void renderResponse(XhtmlNode root, BundleEntryResponseComponent response) {
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_RESPONSE));
|
||||
root.para().addText(formatPhrase(RenderingContext.BUNDLE_RESPONSE));
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(response.getStatus()+"\r\n");
|
||||
if (response.hasLocation())
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_LOCATION, response.getLocation())+"\r\n");
|
||||
b.append(formatPhrase(RenderingContext.BUNDLE_LOCATION, response.getLocation())+"\r\n");
|
||||
if (response.hasEtag())
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_ETAG, response.getEtag())+"\r\n");
|
||||
b.append(formatPhrase(RenderingContext.BUNDLE_ETAG, response.getEtag())+"\r\n");
|
||||
if (response.hasLastModified())
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_LAST_MOD, response.getEtag())+"\r\n");
|
||||
b.append(formatPhrase(RenderingContext.BUNDLE_LAST_MOD, response.getEtag())+"\r\n");
|
||||
root.pre().addText(b.toString());
|
||||
}
|
||||
|
||||
private void renderRequest(XhtmlNode root, BundleEntryRequestComponent request) {
|
||||
root.para().addText(formatMessage(RenderingContext.BUNDLE_REQUEST));
|
||||
root.para().addText(formatPhrase(RenderingContext.BUNDLE_REQUEST));
|
||||
StringBuilder b = new StringBuilder();
|
||||
b.append(request.getMethod()+" "+request.getUrl()+"\r\n");
|
||||
if (request.hasIfNoneMatch())
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_IF_NON_MATCH, request.getIfNoneMatch())+"\r\n");
|
||||
b.append(formatPhrase(RenderingContext.BUNDLE_IF_NON_MATCH, request.getIfNoneMatch())+"\r\n");
|
||||
if (request.hasIfModifiedSince())
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_IF_MOD, request.getIfModifiedSince())+"\r\n");
|
||||
b.append(formatPhrase(RenderingContext.BUNDLE_IF_MOD, request.getIfModifiedSince())+"\r\n");
|
||||
if (request.hasIfMatch())
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_IF_MATCH, request.getIfMatch())+"\r\n");
|
||||
b.append(formatPhrase(RenderingContext.BUNDLE_IF_MATCH, request.getIfMatch())+"\r\n");
|
||||
if (request.hasIfNoneExist())
|
||||
b.append(formatMessage(RenderingContext.BUNDLE_IF_NONE, request.getIfNoneExist())+"\r\n");
|
||||
b.append(formatPhrase(RenderingContext.BUNDLE_IF_NONE, request.getIfNoneExist())+"\r\n");
|
||||
root.pre().addText(b.toString());
|
||||
}
|
||||
|
||||
|
|
|
@ -289,17 +289,17 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
|
||||
x.h(2,"title").addText(conf.getTitle());
|
||||
XhtmlNode uList = x.ul();
|
||||
uList.li().addText(context.formatMessage(RenderingContext.CAPABILITY_IMP_VER, igVersion) + " ");
|
||||
uList.li().addText(context.formatMessage(RenderingContext.CAPABILITY_FHIR_VER, currentVersion.toCode()) + " ");
|
||||
uList.li().addText(context.formatPhrase(RenderingContext.CAPABILITY_IMP_VER, igVersion) + " ");
|
||||
uList.li().addText(context.formatPhrase(RenderingContext.CAPABILITY_FHIR_VER, currentVersion.toCode()) + " ");
|
||||
addSupportedFormats(uList, conf);
|
||||
|
||||
uList.li().addText(context.formatMessage(RenderingContext.CAPABILITY_PUB_ON, displayDateTime(conf.getDateElement()) + " "));
|
||||
uList.li().addText(context.formatMessage(RenderingContext.CAPABILITY_PUB_BY, conf.getPublisherElement().asStringValue()) + " ");
|
||||
uList.li().addText(context.formatPhrase(RenderingContext.CAPABILITY_PUB_ON, displayDateTime(conf.getDateElement()) + " "));
|
||||
uList.li().addText(context.formatPhrase(RenderingContext.CAPABILITY_PUB_BY, conf.getPublisherElement().asStringValue()) + " ");
|
||||
|
||||
|
||||
XhtmlNode block = x.addTag("blockquote").attribute("class","impl-note");
|
||||
block.addTag("p").addTag("strong").addText(context.formatMessage(RenderingContext.CAPABILITY_NOTE_CAP));
|
||||
block.addTag("p").addText(context.formatMessage(RenderingContext.CAPABILTY_ALLOW_CAP));
|
||||
block.addTag("p").addTag("strong").addText(context.formatPhrase(RenderingContext.CAPABILITY_NOTE_CAP));
|
||||
block.addTag("p").addText(context.formatPhrase(RenderingContext.CAPABILTY_ALLOW_CAP));
|
||||
|
||||
|
||||
addSupportedCSs(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((context.formatMessage(RenderingContext.CAPABILITY_REST_CAPS)));
|
||||
x.h(2,"rest").addText((context.formatPhrase(RenderingContext.CAPABILITY_REST_CAPS)));
|
||||
int count=1;
|
||||
for (CapabilityStatementRestComponent rest : conf.getRest()) {
|
||||
if (restNum > 1) {
|
||||
x.h(3,"rest"+Integer.toString(count)).addText(context.formatMessage(RenderingContext.CAPABILITY_REST_CONFIG, Integer.toString(count)) + " ");
|
||||
x.h(3,"rest"+Integer.toString(count)).addText(context.formatPhrase(RenderingContext.CAPABILITY_REST_CONFIG, 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(context.formatMessage(RenderingContext.CAPABILITY_RES_PRO));
|
||||
x.h(nextLevel+1,"resourcesSummary" + Integer.toString(count)).addText(context.formatMessage(RenderingContext.CAPABILITY_SUMM));
|
||||
x.h(nextLevel,"resourcesCap" + Integer.toString(count)).addText(context.formatPhrase(RenderingContext.CAPABILITY_RES_PRO));
|
||||
x.h(nextLevel+1,"resourcesSummary" + Integer.toString(count)).addText(context.formatPhrase(RenderingContext.CAPABILITY_SUMM));
|
||||
addSummaryIntro(x);
|
||||
addSummaryTable(x, rest, hasVRead, hasPatch, hasDelete, hasHistory, hasUpdates, count);
|
||||
x.addTag("hr");
|
||||
|
@ -473,7 +473,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
XhtmlNode ul = null;
|
||||
if (igShalls.size() > 0) {
|
||||
x.h(3,"shallIGs").addText(context.formatMessage(RenderingContext.CAPABILTY_SHALL_SUPP));
|
||||
x.h(3,"shallIGs").addText(context.formatPhrase(RenderingContext.CAPABILTY_SHALL_SUPP));
|
||||
ul = x.ul();
|
||||
for (String url : igShalls) {
|
||||
addResourceLink(ul.li(), url, url);
|
||||
|
@ -481,7 +481,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (igShoulds.size() > 0) {
|
||||
x.h(3,"shouldIGs").addText(context.formatMessage(RenderingContext.CAPABILITY_SHOULD_SUPP));
|
||||
x.h(3,"shouldIGs").addText(context.formatPhrase(RenderingContext.CAPABILITY_SHOULD_SUPP));
|
||||
ul = x.ul();
|
||||
for (String url : igShoulds) {
|
||||
addResourceLink(ul.li(), url, url);
|
||||
|
@ -489,7 +489,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (igMays.size() > 0) {
|
||||
x.h(3,"shouldIGs").addText(context.formatMessage(RenderingContext.CAPABILITY_SHOULD_SUPP));
|
||||
x.h(3,"shouldIGs").addText(context.formatPhrase(RenderingContext.CAPABILITY_SHOULD_SUPP));
|
||||
ul = x.ul();
|
||||
for (String url : igMays) {
|
||||
addResourceLink(ul.li(), url, url);
|
||||
|
@ -502,7 +502,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
|
||||
private void addSupportedFormats(XhtmlNode uList, CapabilityStatement conf) {
|
||||
XhtmlNode lItem = uList.li();
|
||||
lItem.addText(context.formatMessage(RenderingContext.CAPABILITY_SUPP_FORM) + " ");
|
||||
lItem.addText(context.formatPhrase(RenderingContext.CAPABILITY_SUPP_FORM) + " ");
|
||||
Boolean first = true;
|
||||
String capExpectation = null;
|
||||
for (CodeType c : conf.getFormat()) {
|
||||
|
@ -512,13 +512,13 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
capExpectation = getExtValueCode(c.getExtensionByUrl(EXPECTATION));
|
||||
if (!Utilities.noString(capExpectation)) {
|
||||
lItem.addTag("strong").addText(capExpectation);
|
||||
lItem.addText(" "+ (context.formatMessage(RenderingContext.CAPABILITY_SUPP) + " "));
|
||||
lItem.addText(" "+ (context.formatPhrase(RenderingContext.CAPABILITY_SUPP) + " "));
|
||||
}
|
||||
lItem.code().addText(c.getCode());
|
||||
first = false;
|
||||
}
|
||||
lItem = uList.li();
|
||||
lItem.addText(context.formatMessage(RenderingContext.CAPABILITY_SUPP_PATCH_FORM) + " ");
|
||||
lItem.addText(context.formatPhrase(RenderingContext.CAPABILITY_SUPP_PATCH_FORM) + " ");
|
||||
first=true;
|
||||
for (CodeType c : conf.getPatchFormat()) {
|
||||
if (!first) {
|
||||
|
@ -527,7 +527,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
capExpectation = getExtValueCode(c.getExtensionByUrl(EXPECTATION));
|
||||
if (!Utilities.noString(capExpectation)) {
|
||||
lItem.addTag("strong").addText(capExpectation);
|
||||
lItem.addText(context.formatMessage(RenderingContext.CAPABILITY_SUPP) + " ");
|
||||
lItem.addText(context.formatPhrase(RenderingContext.CAPABILITY_SUPP) + " ");
|
||||
}
|
||||
lItem.code().addText(c.getCode());
|
||||
first = false;
|
||||
|
@ -564,16 +564,16 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
addMarkdown(body.blockquote(),mdText);
|
||||
}
|
||||
}
|
||||
body.div().attribute("class","lead").addTag("em").addText(context.formatMessage(RenderingContext.CAPABILITY_SUMM_SYS_INT));
|
||||
body.div().attribute("class","lead").addTag("em").addText(context.formatPhrase(RenderingContext.CAPABILITY_SUMM_SYS_INT));
|
||||
addSystemInteractions(body, rest.getInteraction());
|
||||
|
||||
}
|
||||
|
||||
private String getCorsText(boolean on) {
|
||||
if (on) {
|
||||
return context.formatMessage(RenderingContext.CAPABILITY_CORS_YES);
|
||||
return context.formatPhrase(RenderingContext.CAPABILITY_CORS_YES);
|
||||
}
|
||||
return context.formatMessage(RenderingContext.CAPABILITY_CORS_NO);
|
||||
return context.formatPhrase(RenderingContext.CAPABILITY_CORS_NO);
|
||||
}
|
||||
|
||||
private List<String> getSecServices(List<CodeableConcept> services)
|
||||
|
@ -644,20 +644,20 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
for (Map<String,String> interactionMap : interactions) {
|
||||
item = uList.li();
|
||||
if (Utilities.noString(verb)) {
|
||||
item.addText(context.formatMessage(RenderingContext.CAPABILITY_SUPP_THE) + " ");
|
||||
item.addText(context.formatPhrase(RenderingContext.CAPABILITY_SUPP_THE) + " ");
|
||||
}
|
||||
else {
|
||||
item.addTag("strong").addText(verb);
|
||||
item.addText(context.formatMessage(RenderingContext.CAPABILITY_SUPP_THE) + " ");
|
||||
item.addText(context.formatPhrase(RenderingContext.CAPABILITY_SUPP_THE) + " ");
|
||||
}
|
||||
interaction = interactionMap.keySet().toArray()[0].toString();
|
||||
item.code(interaction);
|
||||
documentation = interactionMap.get(interaction);
|
||||
if (Utilities.noString(documentation)) {
|
||||
item.addText(context.formatMessage(RenderingContext.CAPABILITY_INT));
|
||||
item.addText(context.formatPhrase(RenderingContext.CAPABILITY_INT));
|
||||
}
|
||||
else {
|
||||
item.addText(context.formatMessage(RenderingContext.CAPABILITY_INT_DESC));
|
||||
item.addText(context.formatPhrase(RenderingContext.CAPABILITY_INT_DESC));
|
||||
try {
|
||||
addMarkdown(item, documentation);
|
||||
} catch (FHIRFormatError e) {
|
||||
|
@ -678,11 +678,11 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
if (interactions.size() == 0) return;
|
||||
XhtmlNode item = uList.li();
|
||||
if (Utilities.noString(verb)) {
|
||||
item.addText(context.formatMessage(RenderingContext.CAPABILITY_SUPPS) + " ");
|
||||
item.addText(context.formatPhrase(RenderingContext.CAPABILITY_SUPPS) + " ");
|
||||
}
|
||||
else {
|
||||
item.addTag("strong").addText(verb);
|
||||
item.addText(context.formatMessage(RenderingContext.CAPABILITY_SUPP) + " ");
|
||||
item.addText(context.formatPhrase(RenderingContext.CAPABILITY_SUPP) + " ");
|
||||
}
|
||||
addSeparatedListOfCodes(item, interactions, ",");
|
||||
item.addText(".");
|
||||
|
@ -691,11 +691,11 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
private void addSummaryIntro(XhtmlNode x) {
|
||||
XhtmlNode uList = null;
|
||||
XhtmlNode lItem = null;
|
||||
x.para().addText(context.formatMessage(RenderingContext.CAPABILITY_SUMM_RES));
|
||||
x.para().addText(context.formatPhrase(RenderingContext.CAPABILITY_SUMM_RES));
|
||||
uList=x.ul();
|
||||
uList.li().addText(context.formatMessage(RenderingContext.CAPABILITY_REV_PROF));
|
||||
uList.li().addText(context.formatPhrase(RenderingContext.CAPABILITY_REV_PROF));
|
||||
lItem = uList.li();
|
||||
lItem.addText(context.formatMessage(RenderingContext.CAPABILITY_INTER_SUPP));
|
||||
lItem.addText(context.formatPhrase(RenderingContext.CAPABILITY_INTER_SUPP));
|
||||
lItem.b().addTag("span").attribute("class","bg-info").addText("R");
|
||||
lItem.addText("ead, ");
|
||||
lItem.b().addTag("span").attribute("class","bg-info").addText("S");
|
||||
|
@ -717,40 +717,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(context.formatMessage(RenderingContext.CAPABILITY_TYP_PRES));
|
||||
uList.li().addTag("span").addText(context.formatMessage(RenderingContext.CAPABILITY_SEARCH_PAR) + " ");
|
||||
lItem.addText(context.formatPhrase(RenderingContext.CAPABILITY_TYP_PRES));
|
||||
uList.li().addTag("span").addText(context.formatPhrase(RenderingContext.CAPABILITY_SEARCH_PAR) + " ");
|
||||
lItem = uList.li();
|
||||
lItem.addText(context.formatMessage(RenderingContext.CAPABILITY_RES_ENB) + " ");
|
||||
lItem.addText(context.formatPhrase(RenderingContext.CAPABILITY_RES_ENB) + " ");
|
||||
lItem.code().addText("_include");
|
||||
lItem = uList.li();
|
||||
lItem.addText(context.formatMessage(RenderingContext.CAPABILITY_OTH_RES_ENB) + " ");
|
||||
lItem.addText(context.formatPhrase(RenderingContext.CAPABILITY_OTH_RES_ENB) + " ");
|
||||
lItem.code().addText("_revinclude");
|
||||
uList.li().addText(context.formatMessage(RenderingContext.CAPABILITY_RES_OPER));
|
||||
uList.li().addText(context.formatPhrase(RenderingContext.CAPABILITY_RES_OPER));
|
||||
}
|
||||
|
||||
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(context.formatMessage(RenderingContext.CAPABILITY_RES_TYP));
|
||||
tr.th().b().tx(context.formatMessage(RenderingContext.CAPABILITY_PROF));
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatMessage(RenderingContext.CAPABILITY_READ_INT)).tx("R");
|
||||
tr.th().b().tx(context.formatPhrase(RenderingContext.CAPABILITY_RES_TYP));
|
||||
tr.th().b().tx(context.formatPhrase(RenderingContext.CAPABILITY_PROF));
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatPhrase(RenderingContext.CAPABILITY_READ_INT)).tx("R");
|
||||
if (hasVRead)
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatMessage(RenderingContext.CAPABILITY_VREAD_INT)).tx("V-R");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatMessage(RenderingContext.CAPABILITY_SEARCH_INT)).tx("S");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatMessage(RenderingContext.CAPABILITY_UPDATE_INT)).tx("U");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatPhrase(RenderingContext.CAPABILITY_VREAD_INT)).tx("V-R");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatPhrase(RenderingContext.CAPABILITY_SEARCH_INT)).tx("S");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatPhrase(RenderingContext.CAPABILITY_UPDATE_INT)).tx("U");
|
||||
if (hasPatch)
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatMessage(RenderingContext.CAPABILITY_PATCH_INT)).tx("P");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatMessage(RenderingContext.CAPABILITY_CREATE_INT)).tx("C");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatPhrase(RenderingContext.CAPABILITY_PATCH_INT)).tx("P");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatPhrase(RenderingContext.CAPABILITY_CREATE_INT)).tx("C");
|
||||
if (hasDelete)
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatMessage(RenderingContext.CAPABILITY_DELETE_INT)).tx("D");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatPhrase(RenderingContext.CAPABILITY_DELETE_INT)).tx("D");
|
||||
if (hasUpdates)
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatMessage(RenderingContext.CAPABILITY_HISTORY_INT)).tx("H-I");
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatPhrase(RenderingContext.CAPABILITY_HISTORY_INT)).tx("H-I");
|
||||
if (hasHistory)
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatMessage(RenderingContext.CAPABILITY_HISTORY_TYPE)).tx("H-T");
|
||||
tr.th().b().attribute("title", context.formatMessage(RenderingContext.CAPABILITY_REQ_RECOM)).tx(context.formatMessage(RenderingContext.CAPABILITY_SEARCHES));
|
||||
tr.th().attribute("class", "text-center").b().attribute("title", context.formatPhrase(RenderingContext.CAPABILITY_HISTORY_TYPE)).tx("H-T");
|
||||
tr.th().b().attribute("title", context.formatPhrase(RenderingContext.CAPABILITY_REQ_RECOM)).tx(context.formatPhrase(RenderingContext.CAPABILITY_SEARCHES));
|
||||
tr.th().code().b().tx("_include");
|
||||
tr.th().code().b().tx("_revinclude");
|
||||
tr.th().b().tx(context.formatMessage(RenderingContext.CAPABILITY_OP));
|
||||
tr.th().b().tx(context.formatPhrase(RenderingContext.CAPABILITY_OP));
|
||||
|
||||
XhtmlNode tbody = t.addTag("tbody");
|
||||
XhtmlNode profCell = null;
|
||||
|
@ -775,12 +775,12 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
//profCell.ah(r.getProfile()).addText(r.getProfile());
|
||||
if (hasSupProf) {
|
||||
profCell.br();
|
||||
profCell.addTag("em").addText(context.formatMessage(RenderingContext.CAPABILITY_ADD_SUPP_PROF));
|
||||
profCell.addTag("em").addText(context.formatPhrase(RenderingContext.CAPABILITY_ADD_SUPP_PROF));
|
||||
renderSupportedProfiles(profCell, r);
|
||||
}
|
||||
}
|
||||
else { //Case of only supported profiles
|
||||
profCell.addText(context.formatMessage(RenderingContext.CAPABILITY_SUPP_PROFS));
|
||||
profCell.addText(context.formatPhrase(RenderingContext.CAPABILITY_SUPP_PROFS));
|
||||
renderSupportedProfiles(profCell, r);
|
||||
}
|
||||
//Show capabilities
|
||||
|
@ -840,17 +840,17 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (r.hasExtension(ToolingExtensions.EXT_PROFILE_MAPPING)) {
|
||||
profCell.br();
|
||||
profCell.b().tx(context.formatMessage(RenderingContext.CAPABILITY_PROF_MAP));
|
||||
profCell.b().tx(context.formatPhrase(RenderingContext.CAPABILITY_PROF_MAP));
|
||||
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(context.formatMessage(RenderingContext.CAPABILITY_CRIT));
|
||||
tr.th().tx(context.formatMessage(RenderingContext.CAPABILITY_PROF));
|
||||
tr.th().tx(context.formatPhrase(RenderingContext.CAPABILITY_CRIT));
|
||||
tr.th().tx(context.formatPhrase(RenderingContext.CAPABILITY_PROF));
|
||||
if (doco) {
|
||||
tr.th().tx(context.formatMessage(RenderingContext.CAPABILITY_CRIT));
|
||||
tr.th().tx(context.formatPhrase(RenderingContext.CAPABILITY_CRIT));
|
||||
}
|
||||
for (Extension ext : r.getExtensionsByUrl(ToolingExtensions.EXT_PROFILE_MAPPING)) {
|
||||
tr = tbl.tr();
|
||||
|
@ -967,7 +967,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(context.formatMessage(RenderingContext.CAPABILITY_RES_CONF, getResourceExpectation(r)) + " ");
|
||||
panelHead.span("float: right;","").addText(context.formatPhrase(RenderingContext.CAPABILITY_RES_CONF, getResourceExpectation(r)) + " ");
|
||||
panelHead.addText(r.getType());
|
||||
body = panel.div().attribute("class", "panel-body").div().attribute("class", "container");
|
||||
}
|
||||
|
@ -981,17 +981,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,context.formatMessage(RenderingContext.CAPABILITY_BASE_SYS));
|
||||
addLead(cell,context.formatPhrase(RenderingContext.CAPABILITY_BASE_SYS));
|
||||
cell.br();
|
||||
addResourceLink(cell, text, text);
|
||||
cell=row.div().attribute("class", "col-lg-3");
|
||||
addLead(cell, context.formatMessage(RenderingContext.CAPABILITY_PROF_CONF));
|
||||
addLead(cell, context.formatPhrase(RenderingContext.CAPABILITY_PROF_CONF));
|
||||
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, context.formatMessage(RenderingContext.CAPABILITY_FHIR));
|
||||
addLead(cell, context.formatPhrase(RenderingContext.CAPABILITY_FHIR));
|
||||
cell.br();
|
||||
cell.ah(currentFhirBase + r.getType().toLowerCase() + ".html").addText(r.getType());
|
||||
pullInteraction = true;
|
||||
|
@ -999,7 +999,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
cell = row.div().attribute("class", refPolicyWidth);
|
||||
addLead(cell,context.formatMessage(RenderingContext.CAPABILITY_REF_PROF));
|
||||
addLead(cell,context.formatPhrase(RenderingContext.CAPABILITY_REF_PROF));
|
||||
cell.br();
|
||||
addSeparatedListOfCodes(cell, getReferencePolicyStrings(r.getReferencePolicy()) , ",");
|
||||
if (pullInteraction) {
|
||||
|
@ -1010,7 +1010,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, context.formatMessage(RenderingContext.CAPABILITY_SUPP_PROF));
|
||||
addLead(cell, context.formatPhrase(RenderingContext.CAPABILITY_SUPP_PROF));
|
||||
XhtmlNode para = cell.para();
|
||||
boolean first = true;
|
||||
for (CanonicalType c : supportedProfiles) {
|
||||
|
@ -1035,7 +1035,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, context.formatMessage(RenderingContext.CAPABILITY_DOC));
|
||||
addLead(cell, context.formatPhrase(RenderingContext.CAPABILITY_DOC));
|
||||
addMarkdown(cell.blockquote(), mdText);
|
||||
}
|
||||
|
||||
|
@ -1059,12 +1059,12 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
XhtmlNode tr;
|
||||
row = body.div().attribute("class", "row");
|
||||
cell = row.div().attribute("class", "col-12");
|
||||
addLead(cell, context.formatMessage(RenderingContext.CAPABILITY_EXT_OP));
|
||||
addLead(cell, context.formatPhrase(RenderingContext.CAPABILITY_EXT_OP));
|
||||
table = cell.table("table table-condensed table-hover");
|
||||
tr = table.addTag("thead").tr();
|
||||
tr.th().addText(context.formatMessage(RenderingContext.CAPABILITY_CONF));
|
||||
tr.th().addText(context.formatMessage(RenderingContext.CAPABILITY_OPER));
|
||||
tr.th().addText(context.formatMessage(RenderingContext.CAPABILITY_DOC));
|
||||
tr.th().addText(context.formatPhrase(RenderingContext.CAPABILITY_CONF));
|
||||
tr.th().addText(context.formatPhrase(RenderingContext.CAPABILITY_OPER));
|
||||
tr.th().addText(context.formatPhrase(RenderingContext.CAPABILITY_DOC));
|
||||
tbody = table.addTag("tbody");
|
||||
addOps(tbody, map, "supported");
|
||||
addOps(tbody, map, "SHALL");
|
||||
|
@ -1120,7 +1120,7 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
XhtmlNode cell = row.div().attribute("class", widthString);
|
||||
addLead(cell, context.formatMessage(RenderingContext.CAPABILITY_INT_SUMM));
|
||||
addLead(cell, context.formatPhrase(RenderingContext.CAPABILITY_INT_SUMM));
|
||||
cell.br();
|
||||
XhtmlNode ul = cell.ul();
|
||||
addInteractionSummaryList(ul, "SHALL", shalls);
|
||||
|
@ -1185,13 +1185,13 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
XhtmlNode tr;
|
||||
row = body.div().attribute("class", "row");
|
||||
cell = row.div().attribute("class", "col-lg-7");
|
||||
addLead(cell, context.formatMessage(RenderingContext.CAPABILITY_SEARCH_PARS));
|
||||
addLead(cell, context.formatPhrase(RenderingContext.CAPABILITY_SEARCH_PARS));
|
||||
table = cell.table("table table-condensed table-hover");
|
||||
tr = table.addTag("thead").tr();
|
||||
tr.th().addText(context.formatMessage(RenderingContext.CAPABILITY_CONF));
|
||||
tr.th().addText(context.formatMessage(RenderingContext.CAPABILITY_PAR));
|
||||
tr.th().addText(context.formatMessage(RenderingContext.CAPABILITY_TYP));
|
||||
tr.th().addText(context.formatMessage(RenderingContext.CAPABILITY_DOC));
|
||||
tr.th().addText(context.formatPhrase(RenderingContext.CAPABILITY_CONF));
|
||||
tr.th().addText(context.formatPhrase(RenderingContext.CAPABILITY_PAR));
|
||||
tr.th().addText(context.formatPhrase(RenderingContext.CAPABILITY_TYP));
|
||||
tr.th().addText(context.formatPhrase(RenderingContext.CAPABILITY_DOC));
|
||||
tbody = table.addTag("tbody");
|
||||
Map<String,List<SingleParam>> map = sParams.getIndbyExp();
|
||||
addIndRows(tbody, map, "supported");
|
||||
|
@ -1201,12 +1201,12 @@ public class CapabilityStatementRenderer extends ResourceRenderer {
|
|||
addIndRows(tbody, map, "SHOULD-NOT");
|
||||
cell = row.div().attribute("class", "col-lg-5");
|
||||
if (!isCombinedEmpty(comboMap)) {
|
||||
addLead(cell, context.formatMessage(RenderingContext.CAPABILITY_COMB_SEARCH_PAR));
|
||||
addLead(cell, context.formatPhrase(RenderingContext.CAPABILITY_COMB_SEARCH_PAR));
|
||||
table = cell.table("table table-condensed table-hover");
|
||||
tr = table.addTag("thead").tr();
|
||||
tr.th().addText(context.formatMessage(RenderingContext.CAPABILITY_CONF));
|
||||
tr.th().addText(context.formatMessage(RenderingContext.CAPABILITY_PARS));
|
||||
tr.th().addText(context.formatMessage(RenderingContext.CAPABILITY_TYPS));
|
||||
tr.th().addText(context.formatPhrase(RenderingContext.CAPABILITY_CONF));
|
||||
tr.th().addText(context.formatPhrase(RenderingContext.CAPABILITY_PARS));
|
||||
tr.th().addText(context.formatPhrase(RenderingContext.CAPABILITY_TYPS));
|
||||
tbody = table.addTag("tbody");
|
||||
addComboRows(tbody, comboMap, "supported");
|
||||
addComboRows(tbody, comboMap, "SHALL");
|
||||
|
|
|
@ -107,13 +107,13 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
|
||||
private void generateFilters(XhtmlNode x, CodeSystem cs) {
|
||||
if (cs.hasFilter()) {
|
||||
x.para().b().tx(formatMessage(RenderingContext.CODESYSTEM_FILTERS));
|
||||
x.para().b().tx(formatPhrase(RenderingContext.CODESYSTEM_FILTERS));
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
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));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.CODESYSTEM_FILTER_CODE));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.CODESYSTEM_FILTER_DESC));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.CODESYSTEM_FILTER_OP));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.CODESYSTEM_FILTER_VALUE));
|
||||
for (CodeSystemFilterComponent f : cs.getFilter()) {
|
||||
tr = tbl.tr();
|
||||
renderStatus(f, tr.td()).tx(f.getCode());
|
||||
|
@ -137,20 +137,20 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
hasDescription = hasDescription || p.hasDescription();
|
||||
}
|
||||
|
||||
x.para().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROPS));
|
||||
x.para().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROPS_DESC));
|
||||
x.para().b().tx(formatPhrase(RenderingContext.CODESYSTEM_PROPS));
|
||||
x.para().b().tx(formatPhrase(RenderingContext.CODESYSTEM_PROPS_DESC));
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
if (hasRendered) {
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROP_NAME));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.CODESYSTEM_PROP_NAME));
|
||||
}
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROP_CODE));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.CODESYSTEM_PROP_CODE));
|
||||
if (hasURI) {
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROP_URI));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.CODESYSTEM_PROP_URI));
|
||||
}
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROP_TYPE));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.CODESYSTEM_PROP_TYPE));
|
||||
if (hasDescription) {
|
||||
tr.td().b().tx(formatMessage(RenderingContext.CODESYSTEM_PROP_DESC));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.CODESYSTEM_PROP_DESC));
|
||||
}
|
||||
for (PropertyComponent p : cs.getProperty()) {
|
||||
tr = tbl.tr();
|
||||
|
@ -174,32 +174,32 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
|
||||
private String sentenceForContent(CodeSystemContentMode mode, CodeSystem cs) {
|
||||
switch (mode) {
|
||||
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 COMPLETE: return formatPhrase(RenderingContext.CODESYSTEM_CONTENT_COMPLETE);
|
||||
case EXAMPLE: return formatPhrase(RenderingContext.CODESYSTEM_CONTENT_EXAMPLE);
|
||||
case FRAGMENT: return formatPhrase(RenderingContext.CODESYSTEM_CONTENT_FRAGMENT);
|
||||
case NOTPRESENT: return formatPhrase(RenderingContext.CODESYSTEM_CONTENT_NOTPRESENT);
|
||||
case SUPPLEMENT:
|
||||
boolean properties = CodeSystemUtilities.hasProperties(cs);
|
||||
boolean designations = CodeSystemUtilities.hasDesignations(cs);
|
||||
String features;
|
||||
if (properties && designations) {
|
||||
features = (context.formatMessage(RenderingContext.CODE_SYS_DISP_PROP));
|
||||
features = (context.formatPhrase(RenderingContext.CODE_SYS_DISP_PROP));
|
||||
} else if (properties) {
|
||||
features = (context.formatMessage(RenderingContext.CODE_SYS_PROP));
|
||||
features = (context.formatPhrase(RenderingContext.CODE_SYS_PROP));
|
||||
} else if (designations) {
|
||||
features = (context.formatMessage(RenderingContext.CODE_SYS_DISP));
|
||||
features = (context.formatPhrase(RenderingContext.CODE_SYS_DISP));
|
||||
} else {
|
||||
features = (context.formatMessage(RenderingContext.CODE_SYS_FEAT)); // ?
|
||||
features = (context.formatPhrase(RenderingContext.CODE_SYS_FEAT)); // ?
|
||||
}
|
||||
return formatMessage(RenderingContext.CODESYSTEM_CONTENT_SUPPLEMENT, features);
|
||||
return formatPhrase(RenderingContext.CODESYSTEM_CONTENT_SUPPLEMENT, features);
|
||||
default:
|
||||
throw new FHIRException(context.formatMessage(RenderingContext.CODE_SYS_UNKN_MODE));
|
||||
throw new FHIRException(context.formatPhrase(RenderingContext.CODE_SYS_UNKN_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(formatMessage(RenderingContext.CODESYSTEM_CONCEPTS));
|
||||
x.para().b().tx(formatPhrase(RenderingContext.CODESYSTEM_CONCEPTS));
|
||||
}
|
||||
XhtmlNode p = x.para();
|
||||
renderStatus(cs.getUrlElement(), p.param("cs")).code().tx(cs.getUrl());
|
||||
|
@ -259,10 +259,10 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (langs.size() >= 2) {
|
||||
Collections.sort(langs);
|
||||
x.para().b().tx(context.formatMessage(RenderingContext.CODE_SYS_ADD_LANG));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.CODE_SYS_ADD_LANG));
|
||||
t = x.table("codes");
|
||||
XhtmlNode tr = t.tr();
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.CODE_SYS_CODE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.CODE_SYS_CODE));
|
||||
for (String lang : langs)
|
||||
tr.td().b().addText(describeLang(lang));
|
||||
for (ConceptDefinitionComponent c : cs.getConcept()) {
|
||||
|
@ -275,11 +275,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(" "+context.formatMessage(RenderingContext.CODE_SYS_IN_A_HIERARCHY, s));
|
||||
renderStatus(hm, x).tx(" "+context.formatPhrase(RenderingContext.CODE_SYS_IN_A_HIERARCHY, s));
|
||||
} else if (VersionComparisonAnnotation.hasDeleted(cs, "hierarchyMeaning")) {
|
||||
makeHierarchyParam(x, null, (Enumeration<CodeSystemHierarchyMeaning>) VersionComparisonAnnotation.getDeleted(cs, "hierarchyMeaning").get(0));
|
||||
} else if (CodeSystemUtilities.hasHierarchy(cs)) {
|
||||
x.tx(" "+ (context.formatMessage(RenderingContext.CODE_SYS_UNDEF_HIER)));
|
||||
x.tx(" "+ (context.formatPhrase(RenderingContext.CODE_SYS_UNDEF_HIER)));
|
||||
} else {
|
||||
x.tx("");
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
|
||||
private void addCopyColumn(XhtmlNode tr) {
|
||||
if (context.isCopyButton()) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.CODE_SYS_COPY));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.CODE_SYS_COPY));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -502,11 +502,11 @@ public class CodeSystemRenderer extends TerminologyRenderer {
|
|||
td = tr.td();
|
||||
Boolean b = CodeSystemUtilities.isDeprecated(cs, c, false);
|
||||
if (b != null && b) {
|
||||
smartAddText(td, formatMessage(RenderingContext.CODESYSTEM_DEPRECATED));
|
||||
smartAddText(td, formatPhrase(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(" "+ context.formatMessage(RenderingContext.CODE_SYS_REPLACED_BY) + " ");
|
||||
td.tx(" "+ context.formatPhrase(RenderingContext.CODE_SYS_REPLACED_BY) + " ");
|
||||
String url = getCodingReference(cc, system);
|
||||
if (url != null) {
|
||||
td.ah(url).addText(cc.getCode());
|
||||
|
|
|
@ -314,23 +314,23 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
}
|
||||
|
||||
XhtmlNode p = x.para();
|
||||
p.tx(context.formatMessage(RenderingContext.CONC_MAP_FROM) + " ");
|
||||
p.tx(context.formatPhrase(RenderingContext.CONC_MAP_FROM) + " ");
|
||||
if (cm.hasSourceScope())
|
||||
AddVsRef(cm.getSourceScope().primitiveValue(), p, cm);
|
||||
else
|
||||
p.tx(context.formatMessage(RenderingContext.CONC_MAP_NOT_SPEC));
|
||||
p.tx(" "+ (context.formatMessage(RenderingContext.CONC_MAP_TO) + " "));
|
||||
p.tx(context.formatPhrase(RenderingContext.CONC_MAP_NOT_SPEC));
|
||||
p.tx(" "+ (context.formatPhrase(RenderingContext.CONC_MAP_TO) + " "));
|
||||
if (cm.hasTargetScope())
|
||||
AddVsRef(cm.getTargetScope().primitiveValue(), p, cm);
|
||||
else
|
||||
p.tx(context.formatMessage(RenderingContext.CONC_MAP_NOT_SPEC));
|
||||
p.tx(context.formatPhrase(RenderingContext.CONC_MAP_NOT_SPEC));
|
||||
|
||||
p = x.para();
|
||||
if (cm.getExperimental())
|
||||
p.addText(Utilities.capitalize(cm.getStatus().toString())+" "+ (context.formatMessage(RenderingContext.CONC_MAP_NO_PROD_USE) + " "));
|
||||
p.addText(Utilities.capitalize(cm.getStatus().toString())+" "+ (context.formatPhrase(RenderingContext.CONC_MAP_NO_PROD_USE) + " "));
|
||||
else
|
||||
p.addText(Utilities.capitalize(cm.getStatus().toString())+". ");
|
||||
p.tx(context.formatMessage(RenderingContext.CONC_MAP_PUB_ON, (cm.hasDate() ? display(cm.getDateElement()) : "?ngen-10?")+" by "+cm.getPublisher()) + " ");
|
||||
p.tx(context.formatPhrase(RenderingContext.CONC_MAP_PUB_ON, (cm.hasDate() ? display(cm.getDateElement()) : "?ngen-10?")+" by "+cm.getPublisher()) + " ");
|
||||
if (!cm.getContact().isEmpty()) {
|
||||
p.tx(" (");
|
||||
boolean firsti = true;
|
||||
|
@ -400,18 +400,18 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
x.hr();
|
||||
}
|
||||
XhtmlNode pp = x.para();
|
||||
pp.b().tx(context.formatMessage(RenderingContext.CONC_MAP_GRP, gc) + " ");
|
||||
pp.tx(context.formatMessage(RenderingContext.CONC_MAP_FROM) + " ");
|
||||
pp.b().tx(context.formatPhrase(RenderingContext.CONC_MAP_GRP, gc) + " ");
|
||||
pp.tx(context.formatPhrase(RenderingContext.CONC_MAP_FROM) + " ");
|
||||
if (grp.hasSource()) {
|
||||
renderCanonical(cm, pp, grp.getSource());
|
||||
} else {
|
||||
pp.code(context.formatMessage(RenderingContext.CONC_MAP_CODE_SYS_UNSPEC));
|
||||
pp.code(context.formatPhrase(RenderingContext.CONC_MAP_CODE_SYS_UNSPEC));
|
||||
}
|
||||
pp.tx(" to ");
|
||||
if (grp.hasTarget()) {
|
||||
renderCanonical(cm, pp, grp.getTarget());
|
||||
} else {
|
||||
pp.code(context.formatMessage(RenderingContext.CONC_MAP_CODE_SYS_UNSPEC));
|
||||
pp.code(context.formatPhrase(RenderingContext.CONC_MAP_CODE_SYS_UNSPEC));
|
||||
}
|
||||
|
||||
String display;
|
||||
|
@ -419,11 +419,11 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
// simple
|
||||
XhtmlNode tbl = x.table( "grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.CONC_MAP_SOURCE));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.CONC_MAP_REL));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.CONC_MAP_TRGT));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.CONC_MAP_SOURCE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.CONC_MAP_REL));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.CONC_MAP_TRGT));
|
||||
if (comment)
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.CONC_MAP_CMNT));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.CONC_MAP_CMNT));
|
||||
for (SourceElementComponent ccl : grp.getElement()) {
|
||||
tr = tbl.tr();
|
||||
XhtmlNode td = tr.td();
|
||||
|
@ -470,21 +470,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(context.formatMessage(RenderingContext.CONC_MAP_SRC_DET));
|
||||
tr.td().colspan(Integer.toString(1+sources.size())).b().tx(context.formatPhrase(RenderingContext.CONC_MAP_SRC_DET));
|
||||
if (hasRelationships) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.CONC_MAP_REL));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.CONC_MAP_REL));
|
||||
}
|
||||
tr.td().colspan(Integer.toString(1+targets.size())).b().tx(context.formatMessage(RenderingContext.CONC_MAP_TRGT_DET));
|
||||
tr.td().colspan(Integer.toString(1+targets.size())).b().tx(context.formatPhrase(RenderingContext.CONC_MAP_TRGT_DET));
|
||||
if (comment) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.CONC_MAP_CMNT));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.CONC_MAP_CMNT));
|
||||
}
|
||||
tr.td().colspan(Integer.toString(1+targets.size())).b().tx(context.formatMessage(RenderingContext.CONC_MAP_PROP));
|
||||
tr.td().colspan(Integer.toString(1+targets.size())).b().tx(context.formatPhrase(RenderingContext.CONC_MAP_PROP));
|
||||
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(context.formatMessage(RenderingContext.CONC_MAP_CODE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.CONC_MAP_CODE));
|
||||
for (String s : sources.keySet()) {
|
||||
if (s != null && !s.equals("code")) {
|
||||
if (sources.get(s).size() == 1) {
|
||||
|
@ -501,7 +501,7 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
String url = targets.get("code").iterator().next();
|
||||
renderCSDetailsLink(tr, url, true);
|
||||
} else
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.CONC_MAP_CODE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.CONC_MAP_CODE));
|
||||
for (String s : targets.keySet()) {
|
||||
if (s != null && !s.equals("code")) {
|
||||
if (targets.get(s).size() == 1) {
|
||||
|
@ -698,8 +698,8 @@ public class ConceptMapRenderer extends TerminologyRenderer {
|
|||
if (span2) {
|
||||
td.colspan("2");
|
||||
}
|
||||
td.b().tx(context.formatMessage(RenderingContext.CONC_MAP_CODES));
|
||||
td.tx(" " + (context.formatMessage(RenderingContext.CONC_MAP_FRM) + " "));
|
||||
td.b().tx(context.formatPhrase(RenderingContext.CONC_MAP_CODES));
|
||||
td.tx(" " + (context.formatPhrase(RenderingContext.CONC_MAP_FRM) + " "));
|
||||
if (cs == null)
|
||||
td.tx(url);
|
||||
else
|
||||
|
|
|
@ -186,7 +186,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
url = p.getUserString("filename");
|
||||
}
|
||||
} else {
|
||||
throw new DefinitionException(context.formatMessage(RenderingContext.DATA_REND_MKDWN_LNK, link) + " ");
|
||||
throw new DefinitionException(context.formatPhrase(RenderingContext.DATA_REND_MKDWN_LNK, link) + " ");
|
||||
}
|
||||
|
||||
text = left+"["+link+"]("+url+(path == null ? "" : "#"+path)+")"+right;
|
||||
|
@ -271,19 +271,19 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
public String displaySystem(String system) {
|
||||
if (system == null)
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_NOT_STAT));
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_NOT_STAT));
|
||||
if (system.equals("http://loinc.org"))
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_LOINC));
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_LOINC));
|
||||
if (system.startsWith("http://snomed.info"))
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_SNOMED));
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_SNOMED));
|
||||
if (system.equals("http://www.nlm.nih.gov/research/umls/rxnorm"))
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_RXNORM));
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_RXNORM));
|
||||
if (system.equals("http://hl7.org/fhir/sid/icd-9"))
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_ICD));
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_ICD));
|
||||
if (system.equals("http://dicom.nema.org/resources/ontology/DCM"))
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_DICOM));
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_DICOM));
|
||||
if (system.equals("http://unitsofmeasure.org"))
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_UCUM));
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_UCUM));
|
||||
|
||||
CodeSystem cs = context.getContext().fetchCodeSystem(system);
|
||||
if (cs != null) {
|
||||
|
@ -307,7 +307,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (system.contains("/")) {
|
||||
return system.substring(system.lastIndexOf("/")+1);
|
||||
} else {
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_UNKNWN));
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_UNKNWN));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -469,7 +469,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
} else {
|
||||
// somehow have to do better than this
|
||||
XhtmlNode li = ul.li();
|
||||
li.b().tx(context.formatMessage(RenderingContext.DATA_REND_UNRD_EX));
|
||||
li.b().tx(context.formatPhrase(RenderingContext.DATA_REND_UNRD_EX));
|
||||
}
|
||||
}
|
||||
for (Extension ext : element.getExtension()) {
|
||||
|
@ -519,7 +519,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
render(div, ext.getValue());
|
||||
} else {
|
||||
// somehow have to do better than this
|
||||
div.b().tx(context.formatMessage(RenderingContext.DATA_REND_UNRD_EX));
|
||||
div.b().tx(context.formatPhrase(RenderingContext.DATA_REND_UNRD_EX));
|
||||
}
|
||||
}
|
||||
for (Extension ext : element.getExtension()) {
|
||||
|
@ -550,7 +550,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (b instanceof DataType) {
|
||||
return display((DataType) b);
|
||||
} else {
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_NO_DISP, b.fhirType()) + " ");
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_NO_DISP, b.fhirType()) + " ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -588,7 +588,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
} else if (type.isPrimitive()) {
|
||||
return context.getTranslated((PrimitiveType<?>) type);
|
||||
} else {
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_NO_DISP, type.fhirType()) + " ");
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_NO_DISP, type.fhirType()) + " ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -670,7 +670,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
|
||||
public String display(BaseWrapper type) {
|
||||
return (context.formatMessage(RenderingContext.DATA_REND_TO_DO));
|
||||
return (context.formatPhrase(RenderingContext.DATA_REND_TO_DO));
|
||||
}
|
||||
|
||||
public void render(XhtmlNode x, BaseWrapper type) throws FHIRFormatError, DefinitionException, IOException {
|
||||
|
@ -678,13 +678,13 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
try {
|
||||
base = type.getBase();
|
||||
} catch (FHIRException | IOException e) {
|
||||
x.tx(context.formatMessage(RenderingContext.DATA_REND_ERROR, e.getMessage()) + " "); // this shouldn't happen - it's an error in the library itself
|
||||
x.tx(context.formatPhrase(RenderingContext.DATA_REND_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(context.formatMessage(RenderingContext.DATA_REND_TO_DO, base.fhirType()));
|
||||
x.tx(context.formatPhrase(RenderingContext.DATA_REND_TO_DO, base.fhirType()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -692,7 +692,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (b instanceof DataType) {
|
||||
render(x, (DataType) b);
|
||||
} else {
|
||||
x.tx(context.formatMessage(RenderingContext.DATA_REND_NO_DISP, b.fhirType()) + " ");
|
||||
x.tx(context.formatPhrase(RenderingContext.DATA_REND_NO_DISP, b.fhirType()) + " ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -744,11 +744,11 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
addMarkdown(x, context.getTranslated((MarkdownType) type));
|
||||
} else if (type instanceof Base64BinaryType) {
|
||||
Base64BinaryType b64 = (Base64BinaryType) type;
|
||||
x.tx(context.formatMessage(RenderingContext.DATA_REND_BASE64, (b64.getValue() == null ? "0" : b64.getValue().length)));
|
||||
x.tx(context.formatPhrase(RenderingContext.DATA_REND_BASE64, (b64.getValue() == null ? "0" : b64.getValue().length)));
|
||||
} else if (type.isPrimitive()) {
|
||||
x.tx(context.getTranslated((PrimitiveType<?>) type));
|
||||
} else {
|
||||
x.tx(context.formatMessage(RenderingContext.DATA_REND_NO_DISP, type.fhirType()) + " ");
|
||||
x.tx(context.formatPhrase(RenderingContext.DATA_REND_NO_DISP, type.fhirType()) + " ");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -850,7 +850,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
|
||||
if (a.hasAuthor()) {
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_BY) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_BY) + " ");
|
||||
if (a.hasAuthorReference()) {
|
||||
b.append(a.getAuthorReference().getReference());
|
||||
} else if (a.hasAuthorStringType()) {
|
||||
|
@ -1038,7 +1038,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
systemName = cs != null ? crPresent(cs) : displaySystem(c.getSystem());
|
||||
link = getLinkForCode(c.getSystem(), c.getVersion(), c.getCode());
|
||||
|
||||
hint = systemName+": "+display+(c.hasVersion() ? " "+ context.formatMessage(RenderingContext.DATA_REND_VERSION, c.getVersion(), ")") : "");
|
||||
hint = systemName+": "+display+(c.hasVersion() ? " "+ context.formatPhrase(RenderingContext.DATA_REND_VERSION, c.getVersion(), ")") : "");
|
||||
return new CodeResolution(systemName, systemLink, link, display, hint);
|
||||
}
|
||||
|
||||
|
@ -1073,7 +1073,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
x.tx(s);
|
||||
}
|
||||
if (c.hasVersion()) {
|
||||
x.tx(" "+context.formatMessage(RenderingContext.DATA_REND_VERSION, c.getVersion(), ")"));
|
||||
x.tx(" "+context.formatPhrase(RenderingContext.DATA_REND_VERSION, c.getVersion(), ")"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1088,7 +1088,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
s = c.getCode();
|
||||
|
||||
if (showCodeDetails) {
|
||||
x.addText(s+" "+context.formatMessage(RenderingContext.DATA_REND_DETAILS_STATED, displaySystem(c.getSystem()), c.getCode(), " = '", lookupCode(c.getSystem(), c.getVersion(), c.getCode()), c.getDisplay(), "')"));
|
||||
x.addText(s+" "+context.formatPhrase(RenderingContext.DATA_REND_DETAILS_STATED, displaySystem(c.getSystem()), c.getCode(), " = '", lookupCode(c.getSystem(), c.getVersion(), c.getCode()), c.getDisplay(), "')"));
|
||||
} else
|
||||
x.span(null, "{"+c.getSystem()+" "+c.getCode()+"}").addText(s);
|
||||
}
|
||||
|
@ -1208,7 +1208,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
}
|
||||
|
||||
x.span(null, context.formatMessage(RenderingContext.DATA_REND_CODES) +b.toString()).addText(s);
|
||||
x.span(null, context.formatPhrase(RenderingContext.DATA_REND_CODES) +b.toString()).addText(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1272,7 +1272,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
} else {
|
||||
switch (ii.getSystem()) {
|
||||
case "urn:oid:2.51.1.3":
|
||||
x.ah("https://www.gs1.org/standards/id-keys/gln", context.formatMessage(RenderingContext.DATA_REND_GLN)).tx("GLN");
|
||||
x.ah("https://www.gs1.org/standards/id-keys/gln", context.formatPhrase(RenderingContext.DATA_REND_GLN)).tx("GLN");
|
||||
break;
|
||||
default:
|
||||
x.code(ii.getSystem());
|
||||
|
@ -1286,7 +1286,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
x.nbsp();
|
||||
x.tx("(");
|
||||
if (ii.hasUse()) {
|
||||
x.tx(context.formatMessage(RenderingContext.DATA_REND_USE));
|
||||
x.tx(context.formatPhrase(RenderingContext.DATA_REND_USE));
|
||||
x.nbsp();
|
||||
x.tx(ii.getUse().toCode());
|
||||
}
|
||||
|
@ -1295,7 +1295,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
x.nbsp();
|
||||
}
|
||||
if (ii.hasPeriod()) {
|
||||
x.tx(context.formatMessage(RenderingContext.DATA_REND_PERIOD));
|
||||
x.tx(context.formatPhrase(RenderingContext.DATA_REND_PERIOD));
|
||||
x.nbsp();
|
||||
x.tx(displayPeriod(ii.getPeriod()));
|
||||
}
|
||||
|
@ -1444,7 +1444,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
c.code().tx(expr.getExpression());
|
||||
} else if (expr.hasReference()) {
|
||||
p.ah(expr.getReference()).tx(context.formatMessage(RenderingContext.DATA_REND_SOURCE));
|
||||
p.ah(expr.getReference()).tx(context.formatPhrase(RenderingContext.DATA_REND_SOURCE));
|
||||
}
|
||||
if (expr.hasName() || expr.hasDescription()) {
|
||||
p.tx("(");
|
||||
|
@ -1505,9 +1505,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(context.formatMessage(RenderingContext.DATA_REND_PHONE, c.getValue()) + " ");
|
||||
p.tx(context.formatPhrase(RenderingContext.DATA_REND_PHONE, c.getValue()) + " ");
|
||||
} else if (c.getSystem() == ContactPointSystem.FAX) {
|
||||
p.tx(context.formatMessage(RenderingContext.DATA_REND_FAX, c.getValue()) + " ");
|
||||
p.tx(context.formatPhrase(RenderingContext.DATA_REND_FAX, c.getValue()) + " ");
|
||||
} else if (c.getSystem() == ContactPointSystem.EMAIL) {
|
||||
p.tx(c.getValue());
|
||||
} else if (c.getSystem() == ContactPointSystem.URL) {
|
||||
|
@ -1522,9 +1522,9 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
protected void addTelecom(XhtmlNode p, ContactPoint c) {
|
||||
if (c.getSystem() == ContactPointSystem.PHONE) {
|
||||
p.tx(context.formatMessage(RenderingContext.DATA_REND_PHONE, c.getValue()) + " ");
|
||||
p.tx(context.formatPhrase(RenderingContext.DATA_REND_PHONE, c.getValue()) + " ");
|
||||
} else if (c.getSystem() == ContactPointSystem.FAX) {
|
||||
p.tx(context.formatMessage(RenderingContext.DATA_REND_FAX, c.getValue()) + " ");
|
||||
p.tx(context.formatPhrase(RenderingContext.DATA_REND_FAX, c.getValue()) + " ");
|
||||
} else if (c.getSystem() == ContactPointSystem.EMAIL) {
|
||||
p.ah("mailto:"+c.getValue()).addText(c.getValue());
|
||||
} else if (c.getSystem() == ContactPointSystem.URL) {
|
||||
|
@ -1577,7 +1577,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(" "+ (context.formatMessage(RenderingContext.DATA_REND_DETAILS, displaySystem(q.getSystem()))) +q.getCode()+" = '"+lookupCode(q.getSystem(), null, q.getCode())+"')");
|
||||
x.span("background: LightGoldenRodYellow", null).tx(" "+ (context.formatPhrase(RenderingContext.DATA_REND_DETAILS, displaySystem(q.getSystem()))) +q.getCode()+" = '"+lookupCode(q.getSystem(), null, q.getCode())+"')");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1621,13 +1621,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() ? context.formatMessage(RenderingContext.DATA_REND_ONGOING) : displayDateTime(p.getEndElement()));
|
||||
return s + (!p.hasEnd() ? context.formatPhrase(RenderingContext.DATA_REND_ONGOING) : displayDateTime(p.getEndElement()));
|
||||
}
|
||||
|
||||
public void renderPeriod(XhtmlNode x, Period p) {
|
||||
x.addText(!p.hasStart() ? "??" : displayDateTime(p.getStartElement()));
|
||||
x.tx(" --> ");
|
||||
x.addText(!p.hasEnd() ? context.formatMessage(RenderingContext.DATA_REND_ONGOING) : displayDateTime(p.getEndElement()));
|
||||
x.addText(!p.hasEnd() ? context.formatPhrase(RenderingContext.DATA_REND_ONGOING) : displayDateTime(p.getEndElement()));
|
||||
}
|
||||
|
||||
public void renderUsageContext(XhtmlNode x, UsageContext u) throws FHIRFormatError, DefinitionException, IOException {
|
||||
|
@ -1639,31 +1639,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(context.formatMessage(RenderingContext.DATA_REND_TYPE));
|
||||
x.b().tx(context.formatPhrase(RenderingContext.DATA_REND_TYPE));
|
||||
x.tx(": ");
|
||||
x.tx(td.getType().getDisplay());
|
||||
|
||||
if (td.hasName()) {
|
||||
x.tx(", ");
|
||||
x.b().tx(context.formatMessage(RenderingContext.DATA_REND_NAME));
|
||||
x.b().tx(context.formatPhrase(RenderingContext.DATA_REND_NAME));
|
||||
x.tx(": ");
|
||||
x.tx(context.getTranslated(td.getNameElement()));
|
||||
}
|
||||
if (td.hasCode()) {
|
||||
x.tx(", ");
|
||||
x.b().tx(context.formatMessage(RenderingContext.DATA_REND_CODE));
|
||||
x.b().tx(context.formatPhrase(RenderingContext.DATA_REND_CODE));
|
||||
x.tx(": ");
|
||||
renderCodeableConcept(x, td.getCode());
|
||||
}
|
||||
if (td.hasTiming()) {
|
||||
x.tx(", ");
|
||||
x.b().tx(context.formatMessage(RenderingContext.DATA_REND_TIMING));
|
||||
x.b().tx(context.formatPhrase(RenderingContext.DATA_REND_TIMING));
|
||||
x.tx(": ");
|
||||
render(x, td.getTiming());
|
||||
}
|
||||
if (td.hasCondition()) {
|
||||
x.tx(", ");
|
||||
x.b().tx(context.formatMessage(RenderingContext.DATA_REND_COND));
|
||||
x.b().tx(context.formatPhrase(RenderingContext.DATA_REND_COND));
|
||||
x.tx(": ");
|
||||
renderExpression(x, td.getCondition());
|
||||
}
|
||||
|
@ -1671,27 +1671,27 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
XhtmlNode tbl = x.table("grid");
|
||||
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DATA_REND_TYPE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DATA_REND_TYPE));
|
||||
tr.td().tx(td.getType().getDisplay());
|
||||
|
||||
if (td.hasName()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DATA_REND_NAME));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DATA_REND_NAME));
|
||||
tr.td().tx(context.getTranslated(td.getNameElement()));
|
||||
}
|
||||
if (td.hasCode()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DATA_REND_CODE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DATA_REND_CODE));
|
||||
renderCodeableConcept(tr.td(), td.getCode());
|
||||
}
|
||||
if (td.hasTiming()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DATA_REND_TIMING));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DATA_REND_TIMING));
|
||||
render(tr.td(), td.getTiming());
|
||||
}
|
||||
if (td.hasCondition()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DATA_REND_COND));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DATA_REND_COND));
|
||||
renderExpression(tr.td(), td.getCondition());
|
||||
}
|
||||
}
|
||||
|
@ -1701,7 +1701,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(context.formatMessage(RenderingContext.DATA_REND_TYPE));
|
||||
td.b().tx(context.formatPhrase(RenderingContext.DATA_REND_TYPE));
|
||||
td.tx(": ");
|
||||
StructureDefinition sd = context.getWorker().fetchTypeDefinition(dr.getType().toCode());
|
||||
if (sd != null && sd.hasWebPath()) {
|
||||
|
@ -1726,7 +1726,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (dr.hasSubject()) {
|
||||
tr = tbl.tr();
|
||||
td = tr.td().colspan("2");
|
||||
td.b().tx(context.formatMessage(RenderingContext.DATA_REND_SUB));
|
||||
td.b().tx(context.formatPhrase(RenderingContext.DATA_REND_SUB));
|
||||
if (dr.hasSubjectReference()) {
|
||||
renderReference(td, dr.getSubjectReference());
|
||||
} else {
|
||||
|
@ -1735,24 +1735,24 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
if (dr.hasCodeFilter() || dr.hasDateFilter()) {
|
||||
tr = tbl.tr().backgroundColor("#efefef");
|
||||
tr.td().tx(context.formatMessage(RenderingContext.DATA_REND_FILT));
|
||||
tr.td().tx(context.formatMessage(RenderingContext.DATA_REND_VALUE));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.DATA_REND_FILT));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.DATA_REND_VALUE));
|
||||
}
|
||||
for (DataRequirementCodeFilterComponent cf : dr.getCodeFilter()) {
|
||||
tr = tbl.tr();
|
||||
if (cf.hasPath()) {
|
||||
tr.td().tx(cf.getPath());
|
||||
} else {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.DATA_REND_SEARCH, cf.getSearchParam()) + " ");
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.DATA_REND_SEARCH, cf.getSearchParam()) + " ");
|
||||
}
|
||||
if (cf.hasValueSet()) {
|
||||
td = tr.td();
|
||||
td.tx(context.formatMessage(RenderingContext.DATA_REND_VALUESET) + " ");
|
||||
td.tx(context.formatPhrase(RenderingContext.DATA_REND_VALUESET) + " ");
|
||||
render(td, cf.getValueSetElement());
|
||||
} else {
|
||||
boolean first = true;
|
||||
td = tr.td();
|
||||
td.tx(context.formatMessage(RenderingContext.DATA_REND_THESE_CODES) + " ");
|
||||
td.tx(context.formatPhrase(RenderingContext.DATA_REND_THESE_CODES) + " ");
|
||||
for (Coding c : cf.getCode()) {
|
||||
if (first) first = false; else td.tx(", ");
|
||||
render(td, c);
|
||||
|
@ -1764,7 +1764,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
if (cf.hasPath()) {
|
||||
tr.td().tx(cf.getPath());
|
||||
} else {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.DATA_REND_SEARCH, cf.getSearchParam()) + " ");
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.DATA_REND_SEARCH, cf.getSearchParam()) + " ");
|
||||
}
|
||||
render(tr.td(), cf.getValue());
|
||||
}
|
||||
|
@ -1772,7 +1772,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
tr = tbl.tr();
|
||||
td = tr.td().colspan("2");
|
||||
if (dr.hasLimit()) {
|
||||
td.b().tx(context.formatMessage(RenderingContext.DATA_REND_LIMIT));
|
||||
td.b().tx(context.formatPhrase(RenderingContext.DATA_REND_LIMIT));
|
||||
td.tx(": ");
|
||||
td.tx(dr.getLimit());
|
||||
if (dr.hasSort()) {
|
||||
|
@ -1780,7 +1780,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
}
|
||||
}
|
||||
if (dr.hasSort()) {
|
||||
td.b().tx(context.formatMessage(RenderingContext.DATA_REND_SORT));
|
||||
td.b().tx(context.formatPhrase(RenderingContext.DATA_REND_SORT));
|
||||
td.tx(": ");
|
||||
boolean first = true;
|
||||
for (DataRequirementSortComponent p : dr.getSort()) {
|
||||
|
@ -1796,7 +1796,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
private String displayTiming(Timing s) throws FHIRException {
|
||||
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
|
||||
if (s.hasCode())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_GETCODE, displayCodeableConcept(s.getCode())) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_GETCODE, displayCodeableConcept(s.getCode())) + " ");
|
||||
|
||||
if (s.getEvent().size() > 0) {
|
||||
CommaSeparatedStringBuilder c = new CommaSeparatedStringBuilder();
|
||||
|
@ -1807,17 +1807,17 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
c.append("??");
|
||||
}
|
||||
}
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_EVENTS, c.toString()) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_EVENTS, c.toString()) + " ");
|
||||
}
|
||||
|
||||
if (s.hasRepeat()) {
|
||||
TimingRepeatComponent rep = s.getRepeat();
|
||||
if (rep.hasBoundsPeriod() && rep.getBoundsPeriod().hasStart())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_STARTING, displayDateTime(rep.getBoundsPeriod().getStartElement())) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_STARTING, displayDateTime(rep.getBoundsPeriod().getStartElement())) + " ");
|
||||
if (rep.hasCount())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_COUNT, Integer.toString(rep.getCount())) + " " + " times");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_COUNT, Integer.toString(rep.getCount())) + " " + " times");
|
||||
if (rep.hasDuration())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_DURATION, rep.getDuration().toPlainString()+displayTimeUnits(rep.getPeriodUnit())) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_DURATION, rep.getDuration().toPlainString()+displayTimeUnits(rep.getPeriodUnit())) + " ");
|
||||
|
||||
if (rep.hasWhen()) {
|
||||
String st = "";
|
||||
|
@ -1830,14 +1830,14 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
} else {
|
||||
String st = "";
|
||||
if (!rep.hasFrequency() || (!rep.hasFrequencyMax() && rep.getFrequency() == 1) )
|
||||
st = context.formatMessage(RenderingContext.DATA_REND_ONCE);
|
||||
st = context.formatPhrase(RenderingContext.DATA_REND_ONCE);
|
||||
else {
|
||||
st = Integer.toString(rep.getFrequency());
|
||||
if (rep.hasFrequencyMax())
|
||||
st = st + "-"+Integer.toString(rep.getFrequency());
|
||||
}
|
||||
if (rep.hasPeriod()) {
|
||||
st = st + " "+ (context.formatMessage(RenderingContext.DATA_REND_PER))+rep.getPeriod().toPlainString();
|
||||
st = st + " "+ (context.formatPhrase(RenderingContext.DATA_REND_PER))+rep.getPeriod().toPlainString();
|
||||
if (rep.hasPeriodMax())
|
||||
st = st + "-"+rep.getPeriodMax().toPlainString();
|
||||
st = st + " "+displayTimeUnits(rep.getPeriodUnit());
|
||||
|
@ -1845,7 +1845,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
b.append(st);
|
||||
}
|
||||
if (rep.hasBoundsPeriod() && rep.getBoundsPeriod().hasEnd())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_UNTIL, displayDateTime(rep.getBoundsPeriod().getEndElement())) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_UNTIL, displayDateTime(rep.getBoundsPeriod().getEndElement())) + " ");
|
||||
}
|
||||
return b.toString();
|
||||
}
|
||||
|
@ -1861,20 +1861,20 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
|
||||
private String displayEventCode(EventTiming when) {
|
||||
switch (when) {
|
||||
case C: return (context.formatMessage(RenderingContext.DATA_REND_MEALS));
|
||||
case CD: return (context.formatMessage(RenderingContext.DATA_REND_ATLUNCH));
|
||||
case CM: return (context.formatMessage(RenderingContext.DATA_REND_ATBKFST));
|
||||
case CV: return (context.formatMessage(RenderingContext.DATA_REND_ATDINR));
|
||||
case AC: return (context.formatMessage(RenderingContext.DATA_REND_BFMEALS));
|
||||
case ACD: return (context.formatMessage(RenderingContext.DATA_REND_BFLUNCH));
|
||||
case ACM: return (context.formatMessage(RenderingContext.DATA_REND_BFBKFST));
|
||||
case ACV: return (context.formatMessage(RenderingContext.DATA_REND_BFDINR));
|
||||
case HS: return (context.formatMessage(RenderingContext.DATA_REND_BFSLEEP));
|
||||
case PC: return (context.formatMessage(RenderingContext.DATA_REND_AFTRMEALS));
|
||||
case PCD: return (context.formatMessage(RenderingContext.DATA_REND_AFTRLUNCH));
|
||||
case PCM: return (context.formatMessage(RenderingContext.DATA_REND_AFTRBKFST));
|
||||
case PCV: return (context.formatMessage(RenderingContext.DATA_REND_AFTRDINR));
|
||||
case WAKE: return (context.formatMessage(RenderingContext.DATA_REND_AFTRWKNG));
|
||||
case C: return (context.formatPhrase(RenderingContext.DATA_REND_MEALS));
|
||||
case CD: return (context.formatPhrase(RenderingContext.DATA_REND_ATLUNCH));
|
||||
case CM: return (context.formatPhrase(RenderingContext.DATA_REND_ATBKFST));
|
||||
case CV: return (context.formatPhrase(RenderingContext.DATA_REND_ATDINR));
|
||||
case AC: return (context.formatPhrase(RenderingContext.DATA_REND_BFMEALS));
|
||||
case ACD: return (context.formatPhrase(RenderingContext.DATA_REND_BFLUNCH));
|
||||
case ACM: return (context.formatPhrase(RenderingContext.DATA_REND_BFBKFST));
|
||||
case ACV: return (context.formatPhrase(RenderingContext.DATA_REND_BFDINR));
|
||||
case HS: return (context.formatPhrase(RenderingContext.DATA_REND_BFSLEEP));
|
||||
case PC: return (context.formatPhrase(RenderingContext.DATA_REND_AFTRMEALS));
|
||||
case PCD: return (context.formatPhrase(RenderingContext.DATA_REND_AFTRLUNCH));
|
||||
case PCM: return (context.formatPhrase(RenderingContext.DATA_REND_AFTRBKFST));
|
||||
case PCV: return (context.formatPhrase(RenderingContext.DATA_REND_AFTRDINR));
|
||||
case WAKE: return (context.formatPhrase(RenderingContext.DATA_REND_AFTRWKNG));
|
||||
default: return "?ngen-6?";
|
||||
}
|
||||
}
|
||||
|
@ -1902,29 +1902,29 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
private String displaySampledData(SampledData s) {
|
||||
CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder();
|
||||
if (s.hasOrigin())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_ORIGIN, displayQuantity(s.getOrigin())) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_ORIGIN, displayQuantity(s.getOrigin())) + " ");
|
||||
|
||||
if (s.hasInterval()) {
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_INT, s.getInterval().toString()) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_INT, s.getInterval().toString()) + " ");
|
||||
|
||||
if (s.hasIntervalUnit())
|
||||
b.append(s.getIntervalUnit().toString());
|
||||
}
|
||||
|
||||
if (s.hasFactor())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_FACT, s.getFactor().toString()) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_FACT, s.getFactor().toString()) + " ");
|
||||
|
||||
if (s.hasLowerLimit())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_LOWER, s.getLowerLimit().toString()) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_LOWER, s.getLowerLimit().toString()) + " ");
|
||||
|
||||
if (s.hasUpperLimit())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_UP, s.getUpperLimit().toString()) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_UP, s.getUpperLimit().toString()) + " ");
|
||||
|
||||
if (s.hasDimensions())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_DIM, s.getDimensions()) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_DIM, s.getDimensions()) + " ");
|
||||
|
||||
if (s.hasData())
|
||||
b.append(context.formatMessage(RenderingContext.DATA_REND_DATA, s.getData()) + " ");
|
||||
b.append(context.formatPhrase(RenderingContext.DATA_REND_DATA, s.getData()) + " ");
|
||||
|
||||
return b.toString();
|
||||
}
|
||||
|
@ -1942,7 +1942,7 @@ public class DataRenderer extends Renderer implements CodeResolver {
|
|||
XhtmlNode xn;
|
||||
xn = new XhtmlNode(NodeType.Element, "div");
|
||||
XhtmlNode p = xn.para();
|
||||
p.b().tx((context.formatMessage(RenderingContext.DATA_REND_EXCEPTION)) +function+": "+e.getMessage());
|
||||
p.b().tx((context.formatPhrase(RenderingContext.DATA_REND_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(context.formatMessage(RenderingContext.DIAG_REP_REND_SUB));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_SUB));
|
||||
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(context.formatMessage(RenderingContext.DIAG_REP_REND_WHEN));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_WHEN));
|
||||
eff = (DataType) getProperty(dr, "effective[x]").value().getBase();
|
||||
render(tr.td(), eff);
|
||||
}
|
||||
if (dr.has("issued")) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx(context.formatMessage(RenderingContext.DIAG_REP_REND_REP));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_REP));
|
||||
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((context.formatMessage(RenderingContext.DIAG_REP_REND_PER)), pw.getValues().size()));
|
||||
tr.td().tx(Utilities.pluralize((context.formatPhrase(RenderingContext.DIAG_REP_REND_PER)), 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((context.formatMessage(RenderingContext.DIAG_REP_REND_IDENTIFIER)), pw.getValues().size())+":");
|
||||
tr.td().tx(Utilities.pluralize((context.formatPhrase(RenderingContext.DIAG_REP_REND_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((context.formatMessage(RenderingContext.DIAG_REP_REND_REQUEST)), pw.getValues().size())+":");
|
||||
tr.td().tx(Utilities.pluralize((context.formatPhrase(RenderingContext.DIAG_REP_REND_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(context.formatMessage(RenderingContext.DIAG_REP_REND_REPDET));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_REPDET));
|
||||
|
||||
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(context.formatMessage(RenderingContext.DIAG_REP_REND_CODECON));
|
||||
p.b().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_CODECON));
|
||||
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(context.formatMessage(RenderingContext.DIAG_REP_REND_UNABLE));
|
||||
container.tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_UNABLE));
|
||||
else if (r.getName().equals("Patient"))
|
||||
generatePatientSummary(container, r);
|
||||
else
|
||||
container.tx(context.formatMessage(RenderingContext.DIAG_REP_REND_NOTDONE));
|
||||
container.tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_NOTDONE));
|
||||
}
|
||||
|
||||
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(context.formatMessage(RenderingContext.DIAG_REP_REND_CODE));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DIAG_REP_REND_VALUE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_CODE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_VALUE));
|
||||
if (refRange) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DIAG_REP_REND_REFRAN));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_REFRAN));
|
||||
}
|
||||
if (flags) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DIAG_REP_REND_FLAG));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_FLAG));
|
||||
}
|
||||
if (note) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DIAG_REP_REND_NOTE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_NOTE));
|
||||
}
|
||||
if (effectiveTime) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DIAG_REP_REND_WHEN));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_WHEN));
|
||||
}
|
||||
if (issued) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.DIAG_REP_REND_REP));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_REP));
|
||||
}
|
||||
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(context.formatMessage(RenderingContext.DIAG_REP_REND_NOTRES));
|
||||
td.i().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_NOTRES));
|
||||
} 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(context.formatMessage(RenderingContext.DIAG_REP_REND_OBS));
|
||||
td.i().tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_OBS));
|
||||
}
|
||||
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(context.formatMessage(RenderingContext.DIAG_REP_REND_ERR) + " ");
|
||||
span.tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_ERR) + " ");
|
||||
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(" "+ (context.formatMessage(RenderingContext.DIAG_REP_REND_FOR)) + " ");
|
||||
td.tx(" "+ (context.formatPhrase(RenderingContext.DIAG_REP_REND_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(context.formatMessage(RenderingContext.DIAG_REP_REND_AGE) + " ");
|
||||
td.tx(context.formatPhrase(RenderingContext.DIAG_REP_REND_AGE) + " ");
|
||||
render(td, pwrA.value());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,11 +43,11 @@ public class ExampleScenarioRenderer extends TerminologyRenderer {
|
|||
case PROCESSES:
|
||||
return renderProcesses(x, scen);
|
||||
default:
|
||||
throw new FHIRException(context.formatMessage(RenderingContext.EX_SCEN_UN, context.getScenarioMode()) + " ");
|
||||
throw new FHIRException(context.formatPhrase(RenderingContext.EX_SCEN_UN, context.getScenarioMode()) + " ");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new FHIRException(context.formatMessage(RenderingContext.EX_SCEN_ERR_REN, scen.getUrl(), e) + " ");
|
||||
throw new FHIRException(context.formatPhrase(RenderingContext.EX_SCEN_ERR_REN, 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 += context.formatMessage(RenderingContext.EX_SCEN_TIME);
|
||||
plantUml += context.formatPhrase(RenderingContext.EX_SCEN_TIME);
|
||||
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(), context.formatMessage(RenderingContext.EXAMPLE_SCEN_STEP_SCEN, trimPrefix(prefix), creolLink((ref.getContent()), ref.getAttribute("href"))));
|
||||
plantUml += noteOver(scen.getActor(), context.formatPhrase(RenderingContext.EXAMPLE_SCEN_STEP_SCEN, trimPrefix(prefix), 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(context.formatMessage(RenderingContext.EX_SCEN_NAME));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_TYPE));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_DESC));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_NAME));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_TYPE));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_DESC));
|
||||
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(context.formatMessage(RenderingContext.EX_SCEN_NAME));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_TYPE));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_CONT));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_DESC));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_NAME));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_TYPE));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_CONT));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_DESC));
|
||||
|
||||
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((context.formatMessage(RenderingContext.EX_SCEN_FVER, instance.getStructureVersion()) + " ") + " ");
|
||||
typeCell.tx((context.formatPhrase(RenderingContext.EX_SCEN_FVER, 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(" "+(context.formatMessage(RenderingContext.EX_SCEN_VER, instance.getStructureVersion())+" "));
|
||||
typeCell.tx(" "+(context.formatPhrase(RenderingContext.EX_SCEN_VER, 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(context.formatMessage(RenderingContext.EX_SCEN_CONTA) + " ");
|
||||
descCell.b().tx(context.formatPhrase(RenderingContext.EX_SCEN_CONTA) + " ");
|
||||
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(context.formatMessage(RenderingContext.EX_SCEN_PROC, process.getTitle())+" ");
|
||||
div.b().tx(context.formatPhrase(RenderingContext.EX_SCEN_PROC, process.getTitle())+" ");
|
||||
if (process.hasDescription())
|
||||
addMarkdown(div, process.getDescription());
|
||||
if (process.hasPreConditions()) {
|
||||
div.para().b().i().tx(context.formatMessage(RenderingContext.EX_SCEN_PRECON));
|
||||
div.para().b().i().tx(context.formatPhrase(RenderingContext.EX_SCEN_PRECON));
|
||||
addMarkdown(div, process.getPreConditions());
|
||||
}
|
||||
if (process.hasPostConditions()) {
|
||||
div.para().b().i().tx(context.formatMessage(RenderingContext.EX_SCEN_POSTCON));
|
||||
div.para().b().i().tx(context.formatPhrase(RenderingContext.EX_SCEN_POSTCON));
|
||||
addMarkdown(div, process.getPostConditions());
|
||||
}
|
||||
XhtmlNode tbl = div.table("table-striped table-bordered").style("width:100%");
|
||||
XhtmlNode thead = tbl.tr();
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_STEP));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_NAME));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_DESC));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_IN));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_REC));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_REQ));
|
||||
thead.th().addText(context.formatMessage(RenderingContext.EX_SCEN_RES));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_STEP));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_NAME));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_DESC));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_IN));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_REC));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_REQ));
|
||||
thead.th().addText(context.formatPhrase(RenderingContext.EX_SCEN_RES));
|
||||
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(context.formatMessage(RenderingContext.EX_SCEN_SEE));
|
||||
n.tx(context.formatPhrase(RenderingContext.EX_SCEN_SEE));
|
||||
n.ah("#p_" + stepLabel, step.getProcess().getTitle());
|
||||
n.tx(" "+ context.formatMessage(RenderingContext.EX_SCEN_BEL));
|
||||
n.tx(" "+ context.formatPhrase(RenderingContext.EX_SCEN_BEL));
|
||||
|
||||
} else if (step.hasWorkflow()) {
|
||||
XhtmlNode n = row.td().colspan(6);
|
||||
n.tx(context.formatMessage(RenderingContext.EX_SCEN_OTH));
|
||||
n.tx(context.formatPhrase(RenderingContext.EX_SCEN_OTH));
|
||||
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(context.formatMessage(RenderingContext.EX_SCEN_ALT, alt.getTitle())+" ");
|
||||
altHeading.para().i().tx(context.formatPhrase(RenderingContext.EX_SCEN_ALT, 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(context.formatMessage(RenderingContext.EX_SCEN_UN_ACT, actorId)+" ");
|
||||
throw new FHIRException(context.formatPhrase(RenderingContext.EX_SCEN_UN_ACT, 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(context.formatMessage(RenderingContext.EX_SCEN_UN_INST, instanceRef.getInstanceReference())+" ");
|
||||
throw new FHIRException(context.formatPhrase(RenderingContext.EX_SCEN_UN_INST, instanceRef.getInstanceReference())+" ");
|
||||
if (instanceRef.hasVersionReference()) {
|
||||
ExampleScenarioInstanceVersionComponent theVersion = null;
|
||||
for (ExampleScenarioInstanceVersionComponent version: instance.getVersion()) {
|
||||
|
|
|
@ -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(context.formatMessage(RenderingContext.IMP_GUIDE_URL)+" ");
|
||||
x.para().tx(context.formatPhrase(RenderingContext.IMP_GUIDE_URL)+" ");
|
||||
x.pre().tx(ig.getUrl());
|
||||
addMarkdown(x, ig.getDescription());
|
||||
return true;
|
||||
|
|
|
@ -50,32 +50,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(context.formatMessage(RenderingContext.LIB_REND_PAR));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.LIB_REND_PAR));
|
||||
XhtmlNode t = x.table("grid");
|
||||
if (authors != null) {
|
||||
for (BaseWrapper cd : authors.getValues()) {
|
||||
participantRow(t, (context.formatMessage(RenderingContext.LIB_REND_AUT)), cd, email, phone, url);
|
||||
participantRow(t, (context.formatPhrase(RenderingContext.LIB_REND_AUT)), cd, email, phone, url);
|
||||
}
|
||||
}
|
||||
if (authors != null) {
|
||||
for (BaseWrapper cd : editors.getValues()) {
|
||||
participantRow(t, (context.formatMessage(RenderingContext.LIB_REND_ED)), cd, email, phone, url);
|
||||
participantRow(t, (context.formatPhrase(RenderingContext.LIB_REND_ED)), cd, email, phone, url);
|
||||
}
|
||||
}
|
||||
if (authors != null) {
|
||||
for (BaseWrapper cd : reviewers.getValues()) {
|
||||
participantRow(t, (context.formatMessage(RenderingContext.LIB_REND_REV)), cd, email, phone, url);
|
||||
participantRow(t, (context.formatPhrase(RenderingContext.LIB_REND_REV)), cd, email, phone, url);
|
||||
}
|
||||
}
|
||||
if (authors != null) {
|
||||
for (BaseWrapper cd : endorsers.getValues()) {
|
||||
participantRow(t, (context.formatMessage(RenderingContext.LIB_REND_END)), cd, email, phone, url);
|
||||
participantRow(t, (context.formatPhrase(RenderingContext.LIB_REND_END)), cd, email, phone, url);
|
||||
}
|
||||
}
|
||||
}
|
||||
PropertyWrapper artifacts = lib.getChildByName("relatedArtifact");
|
||||
if (artifacts != null && artifacts.hasValues()) {
|
||||
x.h2().tx(context.formatMessage(RenderingContext.LIB_REND_ART));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.LIB_REND_ART));
|
||||
XhtmlNode t = x.table("grid");
|
||||
boolean label = false;
|
||||
boolean display = false;
|
||||
|
@ -91,7 +91,7 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
}
|
||||
PropertyWrapper parameters = lib.getChildByName("parameter");
|
||||
if (parameters != null && parameters.hasValues()) {
|
||||
x.h2().tx(context.formatMessage(RenderingContext.LIB_REND_PARA));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.LIB_REND_PARA));
|
||||
XhtmlNode t = x.table("grid");
|
||||
boolean doco = false;
|
||||
for (BaseWrapper p : parameters.getValues()) {
|
||||
|
@ -103,14 +103,14 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
}
|
||||
PropertyWrapper dataRequirements = lib.getChildByName("dataRequirement");
|
||||
if (dataRequirements != null && dataRequirements.hasValues()) {
|
||||
x.h2().tx(context.formatMessage(RenderingContext.LIB_REND_REQ));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.LIB_REND_REQ));
|
||||
for (BaseWrapper p : dataRequirements.getValues()) {
|
||||
renderDataRequirement(x, (DataRequirement) p.getBase());
|
||||
}
|
||||
}
|
||||
PropertyWrapper contents = lib.getChildByName("content");
|
||||
if (contents != null) {
|
||||
x.h2().tx(context.formatMessage(RenderingContext.LIB_REND_CONT));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.LIB_REND_CONT));
|
||||
boolean isCql = false;
|
||||
int counter = 0;
|
||||
for (BaseWrapper p : contents.getValues()) {
|
||||
|
@ -152,23 +152,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(context.formatMessage(RenderingContext.LIB_REND_PAR));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.LIB_REND_PAR));
|
||||
XhtmlNode t = x.table("grid");
|
||||
for (ContactDetail cd : lib.getAuthor()) {
|
||||
participantRow(t, (context.formatMessage(RenderingContext.LIB_REND_AUT)), cd, email, phone, url);
|
||||
participantRow(t, (context.formatPhrase(RenderingContext.LIB_REND_AUT)), cd, email, phone, url);
|
||||
}
|
||||
for (ContactDetail cd : lib.getEditor()) {
|
||||
participantRow(t, (context.formatMessage(RenderingContext.LIB_REND_ED)), cd, email, phone, url);
|
||||
participantRow(t, (context.formatPhrase(RenderingContext.LIB_REND_ED)), cd, email, phone, url);
|
||||
}
|
||||
for (ContactDetail cd : lib.getReviewer()) {
|
||||
participantRow(t, (context.formatMessage(RenderingContext.LIB_REND_REV)), cd, email, phone, url);
|
||||
participantRow(t, (context.formatPhrase(RenderingContext.LIB_REND_REV)), cd, email, phone, url);
|
||||
}
|
||||
for (ContactDetail cd : lib.getEndorser()) {
|
||||
participantRow(t, (context.formatMessage(RenderingContext.LIB_REND_END)), cd, email, phone, url);
|
||||
participantRow(t, (context.formatPhrase(RenderingContext.LIB_REND_END)), cd, email, phone, url);
|
||||
}
|
||||
}
|
||||
if (lib.hasRelatedArtifact()) {
|
||||
x.h2().tx(context.formatMessage(RenderingContext.LIB_REND_ART));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.LIB_REND_ART));
|
||||
XhtmlNode t = x.table("grid");
|
||||
boolean label = false;
|
||||
boolean display = false;
|
||||
|
@ -183,7 +183,7 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (lib.hasParameter()) {
|
||||
x.h2().tx(context.formatMessage(RenderingContext.LIB_REND_PARA));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.LIB_REND_PARA));
|
||||
XhtmlNode t = x.table("grid");
|
||||
boolean doco = false;
|
||||
for (ParameterDefinition p : lib.getParameter()) {
|
||||
|
@ -194,13 +194,13 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
}
|
||||
}
|
||||
if (lib.hasDataRequirement()) {
|
||||
x.h2().tx(context.formatMessage(RenderingContext.LIB_REND_REQ));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.LIB_REND_REQ));
|
||||
for (DataRequirement p : lib.getDataRequirement()) {
|
||||
renderDataRequirement(x, p);
|
||||
}
|
||||
}
|
||||
if (lib.hasContent()) {
|
||||
x.h2().tx(context.formatMessage(RenderingContext.LIB_REND_CONT));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.LIB_REND_CONT));
|
||||
boolean isCql = false;
|
||||
int counter = 0;
|
||||
for (Attachment att : lib.getContent()) {
|
||||
|
@ -364,7 +364,7 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
p.tx(att.getTitle());
|
||||
p.tx(": ");
|
||||
}
|
||||
p.code().tx(context.formatMessage(RenderingContext.LIB_REND_NOCONT));
|
||||
p.code().tx(context.formatPhrase(RenderingContext.LIB_REND_NOCONT));
|
||||
p.tx(" (");
|
||||
p.code().tx(att.getContentType());
|
||||
p.tx(lang(att));
|
||||
|
@ -413,10 +413,10 @@ public class LibraryRenderer extends ResourceRenderer {
|
|||
p.tx(att.getTitle());
|
||||
p.tx(": ");
|
||||
}
|
||||
p.code().tx(context.formatMessage(RenderingContext.LIB_REND_SHOW));
|
||||
p.code().tx(context.formatPhrase(RenderingContext.LIB_REND_SHOW));
|
||||
p.code().tx(att.getContentType());
|
||||
p.tx(lang(att));
|
||||
p.tx((context.formatMessage(RenderingContext.LIB_REND_SIZE, Utilities.describeSize(att.getData().length))+" ")+")");
|
||||
p.tx((context.formatPhrase(RenderingContext.LIB_REND_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(context.formatMessage(RenderingContext.LIST_REND_DATE, displayDateTime(list.get("date").dateTimeValue()))+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.LIST_REND_DATE, displayDateTime(list.get("date").dateTimeValue()))+" ");
|
||||
}
|
||||
if (list.has("mode")) {
|
||||
td.tx(context.formatMessage(RenderingContext.LIST_REND_MODE, list.get("mode").primitiveValue())+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.LIST_REND_MODE, list.get("mode").primitiveValue())+" ");
|
||||
}
|
||||
if (list.has("status")) {
|
||||
td.tx(context.formatMessage(RenderingContext.LIST_REND_STAT, list.get("status").primitiveValue())+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.LIST_REND_STAT, list.get("status").primitiveValue())+" ");
|
||||
}
|
||||
if (list.has("code")) {
|
||||
td.tx(context.formatMessage(RenderingContext.LIST_REND_CODE, displayBase(list.get("code")))+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.LIST_REND_CODE, displayBase(list.get("code")))+" ");
|
||||
}
|
||||
tr = t.tr();
|
||||
td = tr.td();
|
||||
if (list.has("subject")) {
|
||||
td.tx(context.formatMessage(RenderingContext.LIST_REND_SUB)+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.LIST_REND_SUB)+" ");
|
||||
shortForRef(td, list.get("subject"));
|
||||
}
|
||||
if (list.has("encounter")) {
|
||||
td.tx(context.formatMessage(RenderingContext.LIST_REND_ENC)+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.LIST_REND_ENC)+" ");
|
||||
shortForRef(td, list.get("encounter"));
|
||||
}
|
||||
if (list.has("source")) {
|
||||
td.tx(context.formatMessage(RenderingContext.LIST_REND_SRC)+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.LIST_REND_SRC)+" ");
|
||||
shortForRef(td, list.get("encounter"));
|
||||
}
|
||||
if (list.has("orderedBy")) {
|
||||
td.tx(context.formatMessage(RenderingContext.LIST_REND_ORD, displayBase(list.get("orderedBy")))+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.LIST_REND_ORD, 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(context.formatMessage(RenderingContext.LIST_REND_ITEM));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.LIST_REND_ITEM));
|
||||
if (date) {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.LIST_REND_DAT));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_DAT));
|
||||
}
|
||||
if (flag) {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.LIST_REND_FLAG));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_FLAG));
|
||||
}
|
||||
if (deleted) {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.LIST_REND_DEL));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_DEL));
|
||||
}
|
||||
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(context.formatMessage(RenderingContext.LIST_REND_DATE, displayDateTime(list.getDateElement()))+" ");
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_DATE, displayDateTime(list.getDateElement()))+" ");
|
||||
}
|
||||
if (list.hasMode()) {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.LIST_REND_MODE, list.getMode().getDisplay())+" ");
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_MODE, list.getMode().getDisplay())+" ");
|
||||
}
|
||||
if (list.hasStatus()) {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.LIST_REND_STAT, list.getStatus().getDisplay())+" ");
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_STAT, list.getStatus().getDisplay())+" ");
|
||||
}
|
||||
if (list.hasCode()) {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.LIST_REND_CODE, display(list.getCode()))+" ");
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_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(context.formatMessage(RenderingContext.LIST_REND_SUB)+" ");
|
||||
td.txN(context.formatPhrase(RenderingContext.LIST_REND_SUB)+" ");
|
||||
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(context.formatMessage(RenderingContext.LIST_REND_ENC)+" "), list.getEncounter());
|
||||
shortForRef(tr.td().txN(context.formatPhrase(RenderingContext.LIST_REND_ENC)+" "), list.getEncounter());
|
||||
}
|
||||
if (list.hasSource()) {
|
||||
shortForRef(tr.td().txN(context.formatMessage(RenderingContext.LIST_REND_SRC)+" "), list.getEncounter());
|
||||
shortForRef(tr.td().txN(context.formatPhrase(RenderingContext.LIST_REND_SRC)+" "), list.getEncounter());
|
||||
}
|
||||
if (list.hasOrderedBy()) {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.LIST_REND_ORD, display(list.getOrderedBy()))+" ");
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_ORD, 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(context.formatMessage(RenderingContext.LIST_REND_ITEM));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.LIST_REND_ITEM));
|
||||
if (date) {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.LIST_REND_DAT));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_DAT));
|
||||
}
|
||||
if (flag) {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.LIST_REND_FLAG));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_FLAG));
|
||||
}
|
||||
if (deleted) {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.LIST_REND_DEL));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.LIST_REND_DEL));
|
||||
}
|
||||
for (ListResourceEntryComponent e : list.getEntry()) {
|
||||
tr = t.tr();
|
||||
|
|
|
@ -30,33 +30,33 @@ public class NamingSystemRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
public boolean render(XhtmlNode x, NamingSystem ns) throws FHIRFormatError, DefinitionException, IOException {
|
||||
x.h3().tx(context.formatMessage(RenderingContext.NAME_SYS_SUM));
|
||||
x.h3().tx(context.formatPhrase(RenderingContext.NAME_SYS_SUM));
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
row(tbl, (context.formatMessage(RenderingContext.NAME_SYS_URL)), ns.getUrl());
|
||||
row(tbl, (context.formatPhrase(RenderingContext.NAME_SYS_URL)), ns.getUrl());
|
||||
if (ns.hasVersion()) {
|
||||
row(tbl, (context.formatMessage(RenderingContext.NAME_SYS_VER)), ns.getVersion());
|
||||
row(tbl, (context.formatPhrase(RenderingContext.NAME_SYS_VER)), ns.getVersion());
|
||||
}
|
||||
if (ns.hasName()) {
|
||||
row(tbl, (context.formatMessage(RenderingContext.NAME_SYS_NAME)), gt(ns.getNameElement()));
|
||||
row(tbl, (context.formatPhrase(RenderingContext.NAME_SYS_NAME)), gt(ns.getNameElement()));
|
||||
}
|
||||
if (ns.hasTitle()) {
|
||||
row(tbl, (context.formatMessage(RenderingContext.NAME_SYS_TITLE)), gt(ns.getTitleElement()));
|
||||
row(tbl, (context.formatPhrase(RenderingContext.NAME_SYS_TITLE)), gt(ns.getTitleElement()));
|
||||
}
|
||||
row(tbl, (context.formatMessage(RenderingContext.NAME_SYS_STAT)), ns.getStatus().toCode());
|
||||
row(tbl, (context.formatPhrase(RenderingContext.NAME_SYS_STAT)), ns.getStatus().toCode());
|
||||
if (ns.hasDescription()) {
|
||||
addMarkdown(row(tbl, (context.formatMessage(RenderingContext.NAME_SYS_DEF))), ns.getDescription());
|
||||
addMarkdown(row(tbl, (context.formatPhrase(RenderingContext.NAME_SYS_DEF))), ns.getDescription());
|
||||
}
|
||||
if (ns.hasPublisher()) {
|
||||
row(tbl, (context.formatMessage(RenderingContext.NAME_SYS_PUB)), gt(ns.getPublisherElement()));
|
||||
row(tbl, (context.formatPhrase(RenderingContext.NAME_SYS_PUB)), gt(ns.getPublisherElement()));
|
||||
}
|
||||
if (ns.hasExtension(ToolingExtensions.EXT_WORKGROUP)) {
|
||||
renderCommitteeLink(row(tbl, "Committee"), ns);
|
||||
}
|
||||
if (CodeSystemUtilities.hasOID(ns)) {
|
||||
row(tbl, (context.formatMessage(RenderingContext.NAME_SYS_OID)), CodeSystemUtilities.getOID(ns)).tx("("+(context.formatMessage(RenderingContext.NAME_SYS_FOROID))+")");
|
||||
row(tbl, (context.formatPhrase(RenderingContext.NAME_SYS_OID)), CodeSystemUtilities.getOID(ns)).tx("("+(context.formatPhrase(RenderingContext.NAME_SYS_FOROID))+")");
|
||||
}
|
||||
if (ns.hasCopyright()) {
|
||||
addMarkdown(row(tbl, (context.formatMessage(RenderingContext.NAME_SYS_COPY))), ns.getCopyright());
|
||||
addMarkdown(row(tbl, (context.formatPhrase(RenderingContext.NAME_SYS_COPY))), 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(context.formatMessage(RenderingContext.NAME_SYS_IDEN));
|
||||
x.h3().tx(context.formatPhrase(RenderingContext.NAME_SYS_IDEN));
|
||||
tbl = x.table("grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx((context.formatMessage(RenderingContext.NAME_SYS_TYPE)));
|
||||
tr.td().b().tx((context.formatMessage(RenderingContext.NAME_SYS_VALUE)));
|
||||
tr.td().b().tx((context.formatPhrase(RenderingContext.NAME_SYS_TYPE)));
|
||||
tr.td().b().tx((context.formatPhrase(RenderingContext.NAME_SYS_VALUE)));
|
||||
if (hasPreferred) {
|
||||
tr.td().b().tx((context.formatMessage(RenderingContext.NAME_SYS_PREF)));
|
||||
tr.td().b().tx((context.formatPhrase(RenderingContext.NAME_SYS_PREF)));
|
||||
}
|
||||
if (hasPeriod) {
|
||||
tr.td().b().tx((context.formatMessage(RenderingContext.NAME_SYS_PER)));
|
||||
tr.td().b().tx((context.formatPhrase(RenderingContext.NAME_SYS_PER)));
|
||||
}
|
||||
if (hasComment) {
|
||||
tr.td().b().tx((context.formatMessage(RenderingContext.NAME_SYS_COM)));
|
||||
tr.td().b().tx((context.formatPhrase(RenderingContext.NAME_SYS_COM)));
|
||||
}
|
||||
for (NamingSystemUniqueIdComponent id : ns.getUniqueId()) {
|
||||
tr = tbl.tr();
|
||||
|
|
|
@ -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(context.formatMessage(RenderingContext.OBLIG_OBLIG));
|
||||
tr.td().style("font-size: 11px").b().tx(context.formatPhrase(RenderingContext.OBLIG_OBLIG));
|
||||
if (actor) {
|
||||
tr.td().style("font-size: 11px").tx(context.formatMessage(RenderingContext.OBLIG_ACT));
|
||||
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.OBLIG_ACT));
|
||||
}
|
||||
if (elementId) {
|
||||
tr.td().style("font-size: 11px").tx(context.formatMessage(RenderingContext.OBLIG_ELE));
|
||||
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.OBLIG_ELE));
|
||||
}
|
||||
if (usage) {
|
||||
tr.td().style("font-size: 11px").tx(context.formatMessage(RenderingContext.OBLIG_USE));
|
||||
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.OBLIG_USE));
|
||||
}
|
||||
if (doco) {
|
||||
tr.td().style("font-size: 11px").tx(context.formatMessage(RenderingContext.OBLIG_DOC));
|
||||
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.OBLIG_DOC));
|
||||
}
|
||||
if (filter) {
|
||||
tr.td().style("font-size: 11px").tx(context.formatMessage(RenderingContext.OBLIG_FILT));
|
||||
tr.td().style("font-size: 11px").tx(context.formatPhrase(RenderingContext.OBLIG_FILT));
|
||||
}
|
||||
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(context.formatMessage(RenderingContext.OP_DEF_OFFIC)+" ");
|
||||
x.para().tx(context.formatPhrase(RenderingContext.OP_DEF_OFFIC)+" ");
|
||||
x.pre().tx(opd.getUrl());
|
||||
addMarkdown(x, opd.getDescription());}
|
||||
|
||||
if (opd.getSystem())
|
||||
x.para().tx(context.formatMessage(RenderingContext.OP_DEF_URLS, opd.getCode()));
|
||||
x.para().tx(context.formatPhrase(RenderingContext.OP_DEF_URLS, opd.getCode()));
|
||||
for (Enumeration<VersionIndependentResourceTypesAll> c : opd.getResource()) {
|
||||
if (opd.getType())
|
||||
x.para().tx(context.formatMessage(RenderingContext.OP_DEF_URL, c.getCode()+"/$"+opd.getCode()));
|
||||
x.para().tx(context.formatPhrase(RenderingContext.OP_DEF_URL, c.getCode()+"/$"+opd.getCode()));
|
||||
if (opd.getInstance())
|
||||
x.para().tx(context.formatMessage(RenderingContext.OP_DEF_URL, c.getCode()+"/[id]/$"+opd.getCode()));
|
||||
x.para().tx(context.formatPhrase(RenderingContext.OP_DEF_URL, c.getCode()+"/[id]/$"+opd.getCode()));
|
||||
}
|
||||
|
||||
if (opd.hasInputProfile()) {
|
||||
XhtmlNode p = x.para();
|
||||
p.tx(context.formatMessage(RenderingContext.OP_DEF_INPAR));
|
||||
p.tx(context.formatPhrase(RenderingContext.OP_DEF_INPAR));
|
||||
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(context.formatMessage(RenderingContext.OP_DEF_OUTPAR));
|
||||
p.tx(context.formatPhrase(RenderingContext.OP_DEF_OUTPAR));
|
||||
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(context.formatMessage(RenderingContext.OP_DEF_PAR));
|
||||
x.para().tx(context.formatPhrase(RenderingContext.OP_DEF_PAR));
|
||||
XhtmlNode tbl = x.table( "grid");
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_DEF_USE));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_DEF_NAME));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_DEF_SCO));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_DEF_CARD));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_DEF_TYPE));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_DEF_BIND));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_DEF_DOC));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_DEF_USE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_DEF_NAME));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_DEF_SCO));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_DEF_CARD));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_DEF_TYPE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_DEF_BIND));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_DEF_DOC));
|
||||
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(context.formatMessage(RenderingContext.OP_OUT_OK));
|
||||
x.para().tx(context.formatPhrase(RenderingContext.OP_OUT_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(context.formatMessage(RenderingContext.OP_OUT_SEV));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_OUT_LOC));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_OUT_CODE));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_OUT_DET));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_OUT_DIAG));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_OUT_SEV));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_OUT_LOC));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_OUT_CODE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_OUT_DET));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_OUT_DIAG));
|
||||
if (hasSource)
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.OP_OUT_SRC));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.OP_OUT_SRC));
|
||||
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 (context.formatMessage(RenderingContext.OP_OUT_TODO));
|
||||
return (context.formatPhrase(RenderingContext.OP_OUT_TODO));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String display(ResourceWrapper r) throws UnsupportedEncodingException, IOException {
|
||||
return (context.formatMessage(RenderingContext.OP_OUT_NOT));
|
||||
return (context.formatPhrase(RenderingContext.OP_OUT_NOT));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,7 +37,7 @@ public class ParametersRenderer extends ResourceRenderer {
|
|||
|
||||
@Override
|
||||
public boolean render(XhtmlNode x, Resource r) throws FHIRFormatError, DefinitionException, IOException, FHIRException, EOperationOutcome {
|
||||
x.h2().tx(context.formatMessage(RenderingContext.PAR_REND_PAR));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.PAR_REND_PAR));
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
params(tbl, ((Parameters) r).getParameter(), 0);
|
||||
return false;
|
||||
|
@ -55,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(context.formatMessage(RenderingContext.PAR_REND_PAR));
|
||||
x.h2().tx(context.formatPhrase(RenderingContext.PAR_REND_PAR));
|
||||
XhtmlNode tbl = x.table("grid");
|
||||
PropertyWrapper pw = getProperty(params, "parameter");
|
||||
if (valued(pw)) {
|
||||
|
@ -102,7 +102,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(context.formatMessage(RenderingContext.PAR_REND_PAR));
|
||||
div.h2().tx(context.formatPhrase(RenderingContext.PAR_REND_PAR));
|
||||
XhtmlNode tbl = div.table("grid");
|
||||
params(tbl, params.getParameter(), 0);
|
||||
return div;
|
||||
|
|
|
@ -228,19 +228,19 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
if (name == null) {
|
||||
b.append(display(name));
|
||||
} else {
|
||||
b.append(context.formatMessage(RenderingContext.PAT_NO_NAME));
|
||||
b.append(context.formatPhrase(RenderingContext.PAT_NO_NAME));
|
||||
}
|
||||
b.append(" ");
|
||||
if (dob == null) {
|
||||
b.append(context.formatMessage(RenderingContext.PAT_NO_GENDER));
|
||||
b.append(context.formatPhrase(RenderingContext.PAT_NO_GENDER));
|
||||
} else {
|
||||
b.append(gender);
|
||||
}
|
||||
b.append(", ");
|
||||
if (dob == null) {
|
||||
b.append(context.formatMessage(RenderingContext.PAT_NO_DOB));
|
||||
b.append(context.formatPhrase(RenderingContext.PAT_NO_DOB));
|
||||
} else {
|
||||
b.append(context.formatMessage(RenderingContext.PAT_DOB, display(dob)));
|
||||
b.append(context.formatPhrase(RenderingContext.PAT_DOB, display(dob)));
|
||||
}
|
||||
if (id != null) {
|
||||
b.append(" ( ");
|
||||
|
@ -252,21 +252,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(context.formatMessage(RenderingContext.PAT_NO_NAME)); // todo: is this appropriate?
|
||||
x.b().tx(context.formatPhrase(RenderingContext.PAT_NO_NAME)); // todo: is this appropriate?
|
||||
} else {
|
||||
render(x.b(), name);
|
||||
}
|
||||
x.tx(" ");
|
||||
if (gender == null) {
|
||||
x.tx(context.formatMessage(RenderingContext.PAT_NO_GENDER));
|
||||
x.tx(context.formatPhrase(RenderingContext.PAT_NO_GENDER));
|
||||
} else {
|
||||
x.tx(gender);
|
||||
}
|
||||
x.tx(", ");
|
||||
if (dob == null) {
|
||||
x.tx(context.formatMessage(RenderingContext.PAT_NO_DOB));
|
||||
x.tx(context.formatPhrase(RenderingContext.PAT_NO_DOB));
|
||||
} else {
|
||||
x.tx(context.formatMessage(RenderingContext.PAT_DOB, display(dob)));
|
||||
x.tx(context.formatPhrase(RenderingContext.PAT_DOB, display(dob)));
|
||||
}
|
||||
if (id != null) {
|
||||
x.tx(" ( ");
|
||||
|
@ -435,7 +435,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
if (langs.size() == 1) {
|
||||
render(r, td, langs.get(0));
|
||||
if (prefLang != null) {
|
||||
td.tx(" "+context.formatMessage(RenderingContext.PAT_LANG_PREFERRED));
|
||||
td.tx(" "+context.formatPhrase(RenderingContext.PAT_LANG_PREFERRED));
|
||||
}
|
||||
} else if (langs.size() > 1) {
|
||||
XhtmlNode ul = td.ul();
|
||||
|
@ -443,7 +443,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
XhtmlNode li = ul.li();
|
||||
render(r, li, i);
|
||||
if (i == prefLang) {
|
||||
li.tx(" "+context.formatMessage(RenderingContext.PAT_LANG_PREFERRED));;
|
||||
li.tx(" "+context.formatPhrase(RenderingContext.PAT_LANG_PREFERRED));;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -455,13 +455,13 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
PropertyWrapper pw = getProperty(r, "generalPractitioner");
|
||||
if (pw != null) {
|
||||
for (BaseWrapper t : pw.getValues()) {
|
||||
refs.add(new NamedReferance(context.formatMessage(RenderingContext.PAT_GP), (Reference) t.getBase(), t));
|
||||
refs.add(new NamedReferance(context.formatPhrase(RenderingContext.PAT_GP), (Reference) t.getBase(), t));
|
||||
}
|
||||
}
|
||||
pw = getProperty(r, "managingOrganization");
|
||||
if (pw != null) {
|
||||
for (BaseWrapper t : pw.getValues()) {
|
||||
refs.add(new NamedReferance(context.formatMessage(RenderingContext.PAT_MO), (Reference) t.getBase(), t));
|
||||
refs.add(new NamedReferance(context.formatPhrase(RenderingContext.PAT_MO), (Reference) t.getBase(), t));
|
||||
}
|
||||
}
|
||||
pw = getProperty(r, "link");
|
||||
|
@ -485,7 +485,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
|
||||
if (refs.size() > 0) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_LINKS), context.formatMessage(RenderingContext.PAT_LINKS_HINT));
|
||||
nameCell(tr, context.formatPhrase(RenderingContext.PAT_LINKS), context.formatPhrase(RenderingContext.PAT_LINKS_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
XhtmlNode ul = td.ul();
|
||||
|
@ -500,10 +500,10 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
|
||||
private String describeLinkedRecord(String type) {
|
||||
switch (type) {
|
||||
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);
|
||||
case "replaced-by" : return context.formatPhrase(RenderingContext.PAT_LINK_REPLBY);
|
||||
case "replaces": return context.formatPhrase(RenderingContext.PAT_LINK_REPL);
|
||||
case "refer": return context.formatPhrase(RenderingContext.PAT_LINK_REFER);
|
||||
case "seealso": return context.formatPhrase(RenderingContext.PAT_LINK_SEE);
|
||||
}
|
||||
return "Unknown";
|
||||
}
|
||||
|
@ -565,9 +565,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)))+":", context.formatMessage(RenderingContext.PAT_NOM_CONTACT)+" "+display(rels.get(0)));
|
||||
nameCell(tr, (rels.get(0).getCodingFirstRep().hasDisplay() ? rels.get(0).getCodingFirstRep().getDisplay() : display(rels.get(0)))+":", context.formatPhrase(RenderingContext.PAT_NOM_CONTACT)+" "+display(rels.get(0)));
|
||||
} else {
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_NOK_CONTACT), context.formatMessage(RenderingContext.PAT_NOK_CONTACT_HINT));
|
||||
nameCell(tr, context.formatPhrase(RenderingContext.PAT_NOK_CONTACT), context.formatPhrase(RenderingContext.PAT_NOK_CONTACT_HINT));
|
||||
}
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
|
@ -581,11 +581,11 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
}
|
||||
} else if (gender != null) {
|
||||
li = ul.li();
|
||||
li.tx(context.formatMessage(RenderingContext.PAT_GENDER, gender));
|
||||
li.tx(context.formatPhrase(RenderingContext.PAT_GENDER, gender));
|
||||
}
|
||||
if (rels.size() > 1) {
|
||||
li = ul.li();
|
||||
li.tx(context.formatMessage(RenderingContext.PAT_RELN));
|
||||
li.tx(context.formatPhrase(RenderingContext.PAT_RELN));
|
||||
boolean first = true;
|
||||
for (CodeableConcept rel : rels) {
|
||||
if (first) first = false; else li.tx(", ");
|
||||
|
@ -600,12 +600,12 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (organization != null) {
|
||||
li = ul.li();
|
||||
li.tx(context.formatMessage(RenderingContext.PAT_ORG));
|
||||
li.tx(context.formatPhrase(RenderingContext.PAT_ORG));
|
||||
render(r, li, organization);
|
||||
}
|
||||
if (period != null) {
|
||||
li = ul.li();
|
||||
li.tx(context.formatMessage(RenderingContext.PAT_PERIOD));
|
||||
li.tx(context.formatPhrase(RenderingContext.PAT_PERIOD));
|
||||
render(r, li, period);
|
||||
}
|
||||
}
|
||||
|
@ -625,7 +625,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
};
|
||||
if (names.size() == 1) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_ALT_NAME), context.formatMessage(RenderingContext.PAT_ALT_NAME_HINT));
|
||||
nameCell(tr, context.formatPhrase(RenderingContext.PAT_ALT_NAME), context.formatPhrase(RenderingContext.PAT_ALT_NAME_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
if (names.size() == 1) {
|
||||
|
@ -652,7 +652,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
}
|
||||
if (tels.size() + adds.size() > 0) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_CONTACT), context.formatMessage(RenderingContext.PAT_CONTACT_HINT));
|
||||
nameCell(tr, context.formatPhrase(RenderingContext.PAT_CONTACT), context.formatPhrase(RenderingContext.PAT_CONTACT_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
td.colspan("3");
|
||||
if (tels.size() + adds.size() == 1) {
|
||||
|
@ -695,7 +695,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
PropertyWrapper a = r.getChildByName("active");
|
||||
if (a.hasValues()) {
|
||||
pos++;
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_ACTIVE), context.formatMessage(RenderingContext.PAT_ACTIVE_HINT));
|
||||
nameCell(tr, context.formatPhrase(RenderingContext.PAT_ACTIVE), context.formatPhrase(RenderingContext.PAT_ACTIVE_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
if (pos == count) {
|
||||
td.colspan("3");
|
||||
|
@ -707,7 +707,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
PropertyWrapper a = r.getChildByName("deceased[x]");
|
||||
if (a.hasValues()) {
|
||||
pos++;
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_DECEASED), context.formatMessage(RenderingContext.PAT_DECEASED_HINT));
|
||||
nameCell(tr, context.formatPhrase(RenderingContext.PAT_DECEASED), context.formatPhrase(RenderingContext.PAT_DECEASED_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
if (pos == count) {
|
||||
td.colspan("3");
|
||||
|
@ -722,7 +722,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
if (pos == 3) {
|
||||
tr = tbl.tr();
|
||||
}
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_MARITAL), context.formatMessage(RenderingContext.PAT_MARITAL_HINT));
|
||||
nameCell(tr, context.formatPhrase(RenderingContext.PAT_MARITAL), context.formatPhrase(RenderingContext.PAT_MARITAL_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
if (pos == count) {
|
||||
td.colspan("3");
|
||||
|
@ -737,7 +737,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
if (pos == 3) {
|
||||
tr = tbl.tr();
|
||||
}
|
||||
nameCell(tr, context.formatMessage(RenderingContext.PAT_MUL_BIRTH), context.formatMessage(RenderingContext.PAT_MUL_BIRTH_HINT));
|
||||
nameCell(tr, context.formatPhrase(RenderingContext.PAT_MUL_BIRTH), context.formatPhrase(RenderingContext.PAT_MUL_BIRTH_HINT));
|
||||
XhtmlNode td = tr.td();
|
||||
if (pos == count) {
|
||||
td.colspan("3");
|
||||
|
@ -780,7 +780,7 @@ public class PatientRenderer extends ResourceRenderer {
|
|||
String n = UUID.randomUUID().toString().toLowerCase()+ext;
|
||||
TextFile.bytesToFile(att.getData(), ManagedFileAccess.file(Utilities.path(context.getDestDir(), n)));
|
||||
context.registerFile(n);
|
||||
td.img(n, context.formatMessage(RenderingContext.PAT_PHOTO));
|
||||
td.img(n, context.formatPhrase(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(context.formatMessage(RenderingContext.PROF_DRIV_GEN_NARR, r.fhirType(), (context.isContained() ? " #"+r.getId() : "")));
|
||||
p.b().tx(context.formatPhrase(RenderingContext.PROF_DRIV_GEN_NARR, 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(context.formatMessage(RenderingContext.PROF_DRIV_FEXCP, r.fhirType())+" ");
|
||||
throw new FHIRException(context.formatPhrase(RenderingContext.PROF_DRIV_FEXCP, 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(context.formatMessage(RenderingContext.PROF_DRIV_ERR_GEN_NARR) +r.fhirType()+"/"+r.getId()+": "+e.getMessage());
|
||||
System.out.println(context.formatPhrase(RenderingContext.PROF_DRIV_ERR_GEN_NARR) +r.fhirType()+"/"+r.getId()+": "+e.getMessage());
|
||||
e.printStackTrace();
|
||||
x.para().b().style("color: maroon").tx(context.formatMessage(RenderingContext.PROF_DRIV_EXCP, e.getMessage())+" ");
|
||||
x.para().b().style("color: maroon").tx(context.formatPhrase(RenderingContext.PROF_DRIV_EXCP, 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(context.formatMessage(RenderingContext.PROV_PROV)+" ");
|
||||
p.tx(context.formatPhrase(RenderingContext.PROV_PROV)+" ");
|
||||
renderReference(prv, p, prv.getTargetFirstRep());
|
||||
} else {
|
||||
x.para().tx(context.formatMessage(RenderingContext.PROV_PROVE)+" ");
|
||||
x.para().tx(context.formatPhrase(RenderingContext.PROV_PROVE)+" ");
|
||||
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(context.formatMessage(RenderingContext.PROV_SUM));
|
||||
x.para().tx(context.formatPhrase(RenderingContext.PROV_SUM));
|
||||
XhtmlNode t = x.table("grid");
|
||||
XhtmlNode tr;
|
||||
if (prv.hasOccurred()) {
|
||||
tr = t.tr();
|
||||
tr.td().tx(context.formatMessage(RenderingContext.PROV_OCC));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.PROV_OCC));
|
||||
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(context.formatMessage(RenderingContext.PROV_REC));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.PROV_REC));
|
||||
tr.td().addText(displayDateTime(prv.getRecordedElement()));
|
||||
}
|
||||
if (prv.hasPolicy()) {
|
||||
tr = t.tr();
|
||||
tr.td().tx(context.formatMessage(RenderingContext.PROV_POL));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.PROV_POL));
|
||||
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(context.formatMessage(RenderingContext.PROV_LOC));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.PROV_LOC));
|
||||
renderReference(prv, tr.td(), prv.getLocation());
|
||||
}
|
||||
if (prv.hasActivity()) {
|
||||
tr = t.tr();
|
||||
tr.td().tx(context.formatMessage(RenderingContext.PROV_ACT));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.PROV_ACT));
|
||||
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(context.formatMessage(RenderingContext.PROV_AGE));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.PROV_AGE));
|
||||
t = x.table("grid");
|
||||
tr = t.tr();
|
||||
if (hasType) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.PROV_TYPE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.PROV_TYPE));
|
||||
}
|
||||
if (hasRole) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.PROV_ROLE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.PROV_ROLE));
|
||||
}
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.PROV_WHO));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.PROV_WHO));
|
||||
if (hasOnBehalfOf) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.PROV_BEHALF));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.PROV_BEHALF));
|
||||
}
|
||||
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 (context.formatMessage(RenderingContext.PROV_FOR, displayReference(prv, prv.getTargetFirstRep()))+" ");
|
||||
return (context.formatPhrase(RenderingContext.PROV_FOR, displayReference(prv, prv.getTargetFirstRep()))+" ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String display(ResourceWrapper r) throws UnsupportedEncodingException, IOException {
|
||||
return (context.formatMessage(RenderingContext.PROV_NOT));
|
||||
return (context.formatPhrase(RenderingContext.PROV_NOT));
|
||||
}
|
||||
|
||||
}
|
|
@ -68,7 +68,7 @@ public class QuestionnaireRenderer extends TerminologyRenderer {
|
|||
boolean doOpts = context.getDefinitionsTarget() == null && hasAnyOptions(q.getItem());
|
||||
|
||||
if (doOpts) {
|
||||
x.b().tx(context.formatMessage(RenderingContext.QUEST_STRUCT));
|
||||
x.b().tx(context.formatPhrase(RenderingContext.QUEST_STRUCT));
|
||||
}
|
||||
HierarchicalTableGenerator gen = new HierarchicalTableGenerator(context, context.getDestDir(), context.isInlineGraphics(), true);
|
||||
TableModel model = gen.new TableModel("qtree="+q.getId(), context.getRules() == GenerationRules.IG_PUBLISHER);
|
||||
|
@ -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(), (context.formatMessage(RenderingContext.QUEST_LINKID)), (context.formatMessage(RenderingContext.QUEST_LINK)), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatMessage(RenderingContext.QUEST_TEXT)), (context.formatMessage(RenderingContext.QUEST_TEXTFOR)), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatMessage(RenderingContext.QUEST_CARD)), (context.formatMessage(RenderingContext.QUEST_TIMES)), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatMessage(RenderingContext.QUEST_TYPE)), (context.formatMessage(RenderingContext.QUEST_TYPE_ITEM)), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatPhrase(RenderingContext.QUEST_LINKID)), (context.formatPhrase(RenderingContext.QUEST_LINK)), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatPhrase(RenderingContext.QUEST_TEXT)), (context.formatPhrase(RenderingContext.QUEST_TEXTFOR)), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatPhrase(RenderingContext.QUEST_CARD)), (context.formatPhrase(RenderingContext.QUEST_TIMES)), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatPhrase(RenderingContext.QUEST_TYPE)), (context.formatPhrase(RenderingContext.QUEST_TYPE_ITEM)), null, 0));
|
||||
if (hasFlags) {
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatMessage(RenderingContext.QUEST_FLAG)), (context.formatMessage(RenderingContext.QUEST_ATTRIBUTES)), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatPhrase(RenderingContext.QUEST_FLAG)), (context.formatPhrase(RenderingContext.QUEST_ATTRIBUTES)), null, 0));
|
||||
}
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatMessage(RenderingContext.QUEST_DESC)), (context.formatMessage(RenderingContext.QUEST_ADD_INFO)), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), (context.formatPhrase(RenderingContext.QUEST_DESC)), (context.formatPhrase(RenderingContext.QUEST_ADD_INFO)), 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(context.formatMessage(RenderingContext.QUEST_OPT));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.QUEST_OPT));
|
||||
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(context.formatMessage(RenderingContext.QUEST_ANSW, i.getLinkId())+" ");
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.QUEST_ANSW, 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", context.formatMessage(RenderingContext.QUEST_ROOT));
|
||||
r.setIcon("icon_q_root.gif", context.formatPhrase(RenderingContext.QUEST_ROOT));
|
||||
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, context.formatMessage(RenderingContext.QUEST_QUEST), null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, context.formatPhrase(RenderingContext.QUEST_QUEST), 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, context.formatMessage(RenderingContext.QUEST_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, context.formatPhrase(RenderingContext.QUEST_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, context.formatMessage(RenderingContext.QUEST_SUBJECT)).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, context.formatPhrase(RenderingContext.QUEST_SUBJECT)).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, context.formatMessage(RenderingContext.QUEST_HIDDEN)).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, context.formatPhrase(RenderingContext.QUEST_HIDDEN)).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, context.formatMessage(RenderingContext.QUEST_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, context.formatPhrase(RenderingContext.QUEST_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, context.formatMessage(RenderingContext.QUEST_LINKED)).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, context.formatPhrase(RenderingContext.QUEST_LINKED)).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, context.formatMessage(RenderingContext.QUEST_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, context.formatPhrase(RenderingContext.QUEST_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, context.formatMessage(RenderingContext.QUEST_CAT, 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, context.formatPhrase(RenderingContext.QUEST_CAT, 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, (context.formatMessage(RenderingContext.QUEST_MAX)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_MAX)+" "), 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, (context.formatMessage(RenderingContext.QUEST_DEF)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_DEF)+" "), 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, (context.formatMessage(RenderingContext.QUEST_ENABLE)+" "), null);
|
||||
Piece p = gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_ENABLE)+" "), 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, (context.formatMessage(RenderingContext.QUEST_VALUE)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_VALUE)+" "), 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, (context.formatMessage(RenderingContext.QUEST_OPTIONS)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_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, (context.formatMessage(RenderingContext.QUEST_INITIAL)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_INITIAL)+" "), 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, (context.formatMessage(RenderingContext.QUEST_EXP)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_EXP)+" "), 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(), context.formatMessage(RenderingContext.QUEST_INT), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_INT), "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.formatMessage(RenderingContext.QUEST_CONT), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-contextExpression");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_CONT), "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(), context.formatMessage(RenderingContext.QUEST_ITEM_CONT), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemContext");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_ITEM_CONT), "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(), context.formatMessage(RenderingContext.QUEST_EN), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_EN), "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(), context.formatMessage(RenderingContext.QUEST_CALC), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_CALC), "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(), context.formatMessage(RenderingContext.QUEST_CAND), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_CAND), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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(), context.formatMessage(RenderingContext.QUEST_LINKID), context.formatMessage(RenderingContext.QUEST_LINK), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatMessage(RenderingContext.QUEST_DESC), context.formatMessage(RenderingContext.QUEST_ADD_INFO), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.QUEST_LINKID), context.formatPhrase(RenderingContext.QUEST_LINK), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.QUEST_DESC), context.formatPhrase(RenderingContext.QUEST_ADD_INFO), 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, (context.formatMessage(RenderingContext.QUEST_MAX)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_MAX)+" "), 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, (context.formatMessage(RenderingContext.QUEST_DEF)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_DEF)+" "), 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, (context.formatMessage(RenderingContext.QUEST_ENABLE)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, context.formatMessage(RenderingContext.QUEST_TODO), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_ENABLE)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, context.formatPhrase(RenderingContext.QUEST_TODO), null));
|
||||
}
|
||||
if (i.hasAnswerValueSet()) {
|
||||
if (!defn.getPieces().isEmpty()) defn.addPiece(gen.new Piece("br"));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatMessage(RenderingContext.QUEST_VALUE)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_VALUE)+" "), 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, (context.formatMessage(RenderingContext.QUEST_OPTIONS)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_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, (context.formatMessage(RenderingContext.QUEST_INITIAL)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_INITIAL)+" "), 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, (context.formatMessage(RenderingContext.QUEST_EXP)+" "), null));
|
||||
defn.getPieces().add(gen.new Piece(null, (context.formatPhrase(RenderingContext.QUEST_EXP)+" "), 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(), context.formatMessage(RenderingContext.QUEST_INT), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-initialExpression");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_INT), "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.formatMessage(RenderingContext.QUEST_CONT), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-contextExpression");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_CONT), "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(), context.formatMessage(RenderingContext.QUEST_ITEM_CONT), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-itemContext");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_ITEM_CONT), "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(), context.formatMessage(RenderingContext.QUEST_EN), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_EN), "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(), context.formatMessage(RenderingContext.QUEST_CALC), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_CALC), "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(), context.formatMessage(RenderingContext.QUEST_CAND), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-candidateExpression");
|
||||
addExpression(p, e.getValueExpression(), context.formatPhrase(RenderingContext.QUEST_CAND), "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", context.formatMessage(RenderingContext.QUEST_MAND)).tx("*");
|
||||
p.span("color: red", context.formatPhrase(RenderingContext.QUEST_MAND)).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"), context.formatMessage(RenderingContext.QUEST_SUBJECT)).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"), context.formatPhrase(RenderingContext.QUEST_SUBJECT)).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"), context.formatMessage(RenderingContext.QUEST_HIDDEN)).img(getImgPath("icon-qi-hidden.png"), "icon");
|
||||
flags.ah(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "extension-questionnaire-hidden.html"), context.formatPhrase(RenderingContext.QUEST_HIDDEN)).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"), context.formatMessage(RenderingContext.QUEST_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"), context.formatPhrase(RenderingContext.QUEST_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"), context.formatMessage(RenderingContext.QUEST_LINKED)).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"), context.formatPhrase(RenderingContext.QUEST_LINKED)).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", (context.formatMessage(RenderingContext.QUEST_CAT, code)+" ")).img(getImgPath("icon-qi-" + code + ".png"), "icon");
|
||||
flags.ah("https://hl7.org/fhir/R4/extension-questionnaire-displayCategory.html", (context.formatPhrase(RenderingContext.QUEST_CAT, code)+" ")).img(getImgPath("icon-qi-" + code + ".png"), "icon");
|
||||
}
|
||||
|
||||
if (i.hasMaxLength()) {
|
||||
item(ul, context.formatMessage(RenderingContext.QUEST_MAX), Integer.toString(i.getMaxLength()));
|
||||
item(ul, context.formatPhrase(RenderingContext.QUEST_MAX), Integer.toString(i.getMaxLength()));
|
||||
}
|
||||
if (i.hasDefinition()) {
|
||||
genDefinitionLink(item(ul, context.formatMessage(RenderingContext.QUEST_DEF)), i, q);
|
||||
genDefinitionLink(item(ul, context.formatPhrase(RenderingContext.QUEST_DEF)), i, q);
|
||||
}
|
||||
if (i.hasEnableWhen()) {
|
||||
item(ul, context.formatMessage(RenderingContext.QUEST_EN), "todo");
|
||||
item(ul, context.formatPhrase(RenderingContext.QUEST_EN), "todo");
|
||||
}
|
||||
if (i.hasAnswerValueSet()) {
|
||||
XhtmlNode ans = item(ul, context.formatMessage(RenderingContext.QUEST_ANSWERS));
|
||||
XhtmlNode ans = item(ul, context.formatPhrase(RenderingContext.QUEST_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, context.formatMessage(RenderingContext.QUEST_ANSWERS), Integer.toString(i.getAnswerOption().size())+" "+Utilities.pluralize("option", i.getAnswerOption().size()), context.getDefinitionsTarget()+"#item."+i.getLinkId());
|
||||
item(ul, context.formatPhrase(RenderingContext.QUEST_ANSWERS), Integer.toString(i.getAnswerOption().size())+" "+Utilities.pluralize("option", i.getAnswerOption().size()), context.getDefinitionsTarget()+"#item."+i.getLinkId());
|
||||
}
|
||||
if (i.hasInitial()) {
|
||||
XhtmlNode vi = item(ul, context.formatMessage(RenderingContext.QUEST_INT));
|
||||
XhtmlNode vi = item(ul, context.formatPhrase(RenderingContext.QUEST_INT));
|
||||
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 context.formatMessage(RenderingContext.QUEST_QUESTIONNAIRE, q.present())+" ";
|
||||
return context.formatPhrase(RenderingContext.QUEST_QUESTIONNAIRE, q.present())+" ";
|
||||
}
|
||||
|
||||
private boolean renderLinks(XhtmlNode x, Questionnaire q) {
|
||||
x.para().tx(context.formatMessage(RenderingContext.QUEST_TRY));
|
||||
x.para().tx(context.formatPhrase(RenderingContext.QUEST_TRY));
|
||||
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(context.formatMessage(RenderingContext.QUEST_NLM));
|
||||
ul.li().ah("http://todo.nlm.gov/path?mode=ig&src="+Utilities.pathURL(context.getLink(KnownLinkType.SELF), "package.tgz")+"&q="+q.getId()+".json").tx(context.formatPhrase(RenderingContext.QUEST_NLM));
|
||||
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(" "+(context.formatMessage(RenderingContext.QUEST_QUEST)+" "));
|
||||
td.tx(" "+(context.formatPhrase(RenderingContext.QUEST_QUEST)+" "));
|
||||
td.b().tx(q.getId());
|
||||
|
||||
// general information
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_URL), q.getUrl());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_VERSION), q.getVersion());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_NAME), q.getName());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_TITLE), q.getTitle());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_URL), q.getUrl());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_VERSION), q.getVersion());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_NAME), q.getName());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_TITLE), q.getTitle());
|
||||
if (q.hasDerivedFrom()) {
|
||||
td = defn(tbl, context.formatMessage(RenderingContext.QUEST_DERIVED));
|
||||
td = defn(tbl, context.formatPhrase(RenderingContext.QUEST_DERIVED));
|
||||
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, context.formatMessage(RenderingContext.QUEST_STATUS), q.getStatus().getDisplay());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_EXPER), q.getExperimental());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_PUB), q.getDateElement().primitiveValue());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_APP), q.getApprovalDateElement().primitiveValue());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_REV_DATE), q.getLastReviewDateElement().primitiveValue());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_STATUS), q.getStatus().getDisplay());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_EXPER), q.getExperimental());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_PUB), q.getDateElement().primitiveValue());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_APP), q.getApprovalDateElement().primitiveValue());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_REV_DATE), q.getLastReviewDateElement().primitiveValue());
|
||||
if (q.hasEffectivePeriod()) {
|
||||
renderPeriod(defn(tbl, context.formatMessage(RenderingContext.QUEST_EFF_PERIOD)), q.getEffectivePeriod());
|
||||
renderPeriod(defn(tbl, context.formatPhrase(RenderingContext.QUEST_EFF_PERIOD)), q.getEffectivePeriod());
|
||||
}
|
||||
|
||||
if (q.hasSubjectType()) {
|
||||
td = defn(tbl, context.formatMessage(RenderingContext.QUEST_SUB_TYPE));
|
||||
td = defn(tbl, context.formatPhrase(RenderingContext.QUEST_SUB_TYPE));
|
||||
boolean first = true;
|
||||
for (CodeType c : q.getSubjectType()) {
|
||||
if (first) first = false; else td.tx(", ");
|
||||
td.tx(c.asStringValue());
|
||||
}
|
||||
}
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_DESCRIPTION), q.getDescription());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_PURPOSE), q.getPurpose());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_COPYRIGHT), q.getCopyright());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_DESCRIPTION), q.getDescription());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_PURPOSE), q.getPurpose());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_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, context.formatMessage(RenderingContext.QUEST_ID), qi.getLinkId());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_PREFIX), qi.getPrefix());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_TEXT), qi.getText());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_TYPE), qi.getType().getDisplay());
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_REQ), qi.getRequired(), true);
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_REP), qi.getRepeats(), true);
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_READ_ONLY), qi.getReadOnly(), false);
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_ID), qi.getLinkId());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_PREFIX), qi.getPrefix());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_TEXT), qi.getText());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_TYPE), qi.getType().getDisplay());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_REQ), qi.getRequired(), true);
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_REP), qi.getRepeats(), true);
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_READ_ONLY), qi.getReadOnly(), false);
|
||||
if (ToolingExtensions.readBoolExtension(qi, "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject")) {
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_SUB), "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-isSubject", "This element changes who the subject of the question is", null);
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_SUB), "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, context.formatMessage(RenderingContext.QUEST_MAX_LENGTH), qi.getMaxLength());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_MAX_LENGTH), qi.getMaxLength());
|
||||
if (qi.hasAnswerValueSet()) {
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_VALUE_SET), qi.getDefinition(), context.getWorker().findTxResource(ValueSet.class, qi.getAnswerValueSet(), q));
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_VALUE_SET), qi.getDefinition(), context.getWorker().findTxResource(ValueSet.class, qi.getAnswerValueSet(), q));
|
||||
}
|
||||
if (qi.hasAnswerOption()) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().tx(context.formatMessage(RenderingContext.QUEST_ALLOWED));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.QUEST_ALLOWED));
|
||||
XhtmlNode ul = tr.td().ul();
|
||||
for (QuestionnaireItemAnswerOptionComponent ans : qi.getAnswerOption()) {
|
||||
XhtmlNode li = ul.li();
|
||||
render(li, ans.getValue());
|
||||
if (ans.getInitialSelected()) {
|
||||
li.tx(" "+(context.formatMessage(RenderingContext.QUEST_INITIALLY)));
|
||||
li.tx(" "+(context.formatPhrase(RenderingContext.QUEST_INITIALLY)));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (qi.hasInitial()) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().tx(Utilities.pluralize((context.formatMessage(RenderingContext.QUEST_INITIAL_ANSWER)), qi.getInitial().size()));
|
||||
tr.td().tx(Utilities.pluralize((context.formatPhrase(RenderingContext.QUEST_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, context.formatMessage(RenderingContext.QUEST_HIDDEN_ITEM), ToolingExtensions.EXT_Q_DISPLAY_CAT, "This item is a hidden question", null);
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_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, context.formatMessage(RenderingContext.QUEST_HIDDEN_ITEM), ToolingExtensions.EXT_Q_OTP_DISP, "This item is optional to display", null);
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_HIDDEN_ITEM), ToolingExtensions.EXT_Q_OTP_DISP, "This item is optional to display", null);
|
||||
}
|
||||
|
||||
// formal definitions
|
||||
if (qi.hasDefinition()) {
|
||||
genDefinitionLink(defn(tbl, context.formatMessage(RenderingContext.QUEST_DEFINITION)), qi, q);
|
||||
genDefinitionLink(defn(tbl, context.formatPhrase(RenderingContext.QUEST_DEFINITION)), qi, q);
|
||||
}
|
||||
|
||||
if (qi.hasCode()) {
|
||||
XhtmlNode tr = tbl.tr();
|
||||
tr.td().tx(Utilities.pluralize(context.formatMessage(RenderingContext.QUEST_CODE), qi.getCode().size()));
|
||||
tr.td().tx(Utilities.pluralize(context.formatPhrase(RenderingContext.QUEST_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(context.formatMessage(RenderingContext.QUEST_OBSERVATION));
|
||||
tr.td().ah(sd.getWebPath()).tx(context.formatPhrase(RenderingContext.QUEST_OBSERVATION));
|
||||
} else {
|
||||
tr.td().ah("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod").tx(context.formatMessage(RenderingContext.QUEST_OBSERVATION));
|
||||
tr.td().ah("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-observationLinkPeriod").tx(context.formatPhrase(RenderingContext.QUEST_OBSERVATION));
|
||||
}
|
||||
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(context.formatMessage(RenderingContext.QUEST_EN));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.QUEST_EN));
|
||||
td = tr.td();
|
||||
if (qi.getEnableWhen().size() == 1) {
|
||||
renderEnableWhen(td, qi.getEnableWhen().get(0));
|
||||
} else {
|
||||
if (qi.hasEnableBehavior()) {
|
||||
td.tx(qi.getEnableBehavior().getDisplay()+" "+(context.formatMessage(RenderingContext.QUEST_TRUE)));
|
||||
td.tx(qi.getEnableBehavior().getDisplay()+" "+(context.formatPhrase(RenderingContext.QUEST_TRUE)));
|
||||
} else {
|
||||
td.tx(context.formatMessage(RenderingContext.QUEST_ARE_TRUE));
|
||||
td.tx(context.formatPhrase(RenderingContext.QUEST_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, context.formatMessage(RenderingContext.QUEST_DEFINITION), RendererFactory.factory(res, context).display(res), res.getWebPath());
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_DEFINITION), RendererFactory.factory(res, context).display(res), res.getWebPath());
|
||||
} else if (Utilities.isAbsoluteUrlLinkable(url)) {
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_DEFINITION), url, url);
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_DEFINITION), url, url);
|
||||
} {
|
||||
defn(tbl, context.formatMessage(RenderingContext.QUEST_DEFINITION), url);
|
||||
defn(tbl, context.formatPhrase(RenderingContext.QUEST_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(context.formatMessage(RenderingContext.QUEST_UNKNOWN_MODE));
|
||||
throw new Error(context.formatPhrase(RenderingContext.QUEST_UNKNOWN_MODE));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
// case DEFNS: return renderDefns(x, q);
|
||||
case TREE: return renderTree(x, qr);
|
||||
default:
|
||||
throw new Error(context.formatMessage(RenderingContext.QUEST_UNKNOWN_MODE));
|
||||
throw new Error(context.formatPhrase(RenderingContext.QUEST_UNKNOWN_MODE));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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(), context.formatMessage(RenderingContext.QUEST_LINKID), context.formatMessage(RenderingContext.QUEST_LINK), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatMessage(RenderingContext.QUEST_TEXT), context.formatMessage(RenderingContext.QUEST_TEXTFOR), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatMessage(RenderingContext.QUEST_DEFINITION), context.formatMessage(RenderingContext.QUEST_TIMES), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatMessage(RenderingContext.QUEST_ANSWER), context.formatMessage(RenderingContext.QUEST_TYPE_ITEM), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.QUEST_LINKID), context.formatPhrase(RenderingContext.QUEST_LINK), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.QUEST_TEXT), context.formatPhrase(RenderingContext.QUEST_TEXTFOR), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.QUEST_DEFINITION), context.formatPhrase(RenderingContext.QUEST_TIMES), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.QUEST_ANSWER), context.formatPhrase(RenderingContext.QUEST_TYPE_ITEM), null, 0));
|
||||
|
||||
boolean hasExt = false;
|
||||
// first we add a root for the questionaire itself
|
||||
|
@ -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(), context.formatMessage(RenderingContext.QUEST_LINKID), context.formatMessage(RenderingContext.QUEST_LINK), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatMessage(RenderingContext.QUEST_TEXT), context.formatMessage(RenderingContext.QUEST_TEXTFOR), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatMessage(RenderingContext.QUEST_DEFINITION), context.formatMessage(RenderingContext.QUEST_TIMES), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatMessage(RenderingContext.QUEST_ANSWER), context.formatMessage(RenderingContext.QUEST_TYPE_ITEM), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.QUEST_LINKID), context.formatPhrase(RenderingContext.QUEST_LINK), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.QUEST_TEXT), context.formatPhrase(RenderingContext.QUEST_TEXTFOR), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.QUEST_DEFINITION), context.formatPhrase(RenderingContext.QUEST_TIMES), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.QUEST_ANSWER), context.formatPhrase(RenderingContext.QUEST_TYPE_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", context.formatMessage(RenderingContext.QUEST_RESP_ROOT));
|
||||
r.setIcon("icon_q_root.gif", context.formatPhrase(RenderingContext.QUEST_RESP_ROOT));
|
||||
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, context.formatMessage(RenderingContext.QUEST_RESP), null, null));
|
||||
r.getCells().add(gen.new Cell(null, null, context.formatPhrase(RenderingContext.QUEST_RESP), 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", context.formatMessage(RenderingContext.QUEST_RESP_ROOT));
|
||||
r.setIcon("icon_q_root.gif", context.formatPhrase(RenderingContext.QUEST_RESP_ROOT));
|
||||
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(context.formatMessage(RenderingContext.QUEST_QUESTION), null, context.formatMessage(RenderingContext.QUEST_NONE_SPEC), null, null));
|
||||
r.getCells().add(gen.new Cell(context.formatPhrase(RenderingContext.QUEST_QUESTION), null, context.formatPhrase(RenderingContext.QUEST_NONE_SPEC), null, null));
|
||||
} else if (q == null || !q.hasWebPath()) {
|
||||
r.getCells().add(gen.new Cell(null, null, "", null, null));
|
||||
r.getCells().add(gen.new Cell(context.formatMessage(RenderingContext.QUEST_QUESTION), null, ref, null, null));
|
||||
r.getCells().add(gen.new Cell(context.formatPhrase(RenderingContext.QUEST_QUESTION), null, ref, null, null));
|
||||
} else{
|
||||
r.getCells().add(gen.new Cell(null, null, "", null, null));
|
||||
r.getCells().add(gen.new Cell(context.formatMessage(RenderingContext.QUEST_QUESTION), q.getWebPath(), q.present(), null, null));
|
||||
r.getCells().add(gen.new Cell(context.formatPhrase(RenderingContext.QUEST_QUESTION), 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", context.formatMessage(RenderingContext.QUEST_GROUP));
|
||||
r.setIcon("icon-q-group.png", context.formatPhrase(RenderingContext.QUEST_GROUP));
|
||||
} else {
|
||||
r.setIcon("icon-q-string.png", context.formatMessage(RenderingContext.QUEST_ITEM));
|
||||
r.setIcon("icon-q-string.png", context.formatPhrase(RenderingContext.QUEST_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", context.formatMessage(RenderingContext.QUEST_GROUP));
|
||||
r.setIcon("icon-q-group.png", context.formatPhrase(RenderingContext.QUEST_GROUP));
|
||||
} else {
|
||||
r.setIcon("icon-q-string.png", context.formatMessage(RenderingContext.QUEST_ITEM));
|
||||
r.setIcon("icon-q-string.png", context.formatPhrase(RenderingContext.QUEST_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(context.formatMessage(RenderingContext.QUEST_TODO));
|
||||
d.tx(context.formatPhrase(RenderingContext.QUEST_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", context.formatMessage(RenderingContext.QUEST_MAND)).tx("*");
|
||||
// p.span("color: red", context.formatPhrase(RenderingContext.QUEST_MAND)).tx("*");
|
||||
// }
|
||||
//
|
||||
// XhtmlNode input = null;
|
||||
|
@ -605,16 +605,16 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
// }
|
||||
//
|
||||
private boolean renderLinks(XhtmlNode x, QuestionnaireResponse q) {
|
||||
x.para().tx(context.formatMessage(RenderingContext.QUEST_TRY_QUEST));
|
||||
x.para().tx(context.formatPhrase(RenderingContext.QUEST_TRY_QUEST));
|
||||
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(context.formatMessage(RenderingContext.QUEST_NLM));
|
||||
ul.li().ah("http://todo.nlm.gov/path?mode=ig&src="+Utilities.pathURL(context.getLink(KnownLinkType.SELF), "package.tgz")+"&q="+q.getId()+".json").tx(context.formatPhrase(RenderingContext.QUEST_NLM));
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean renderLinks(XhtmlNode x, ResourceWrapper q) {
|
||||
x.para().tx(context.formatMessage(RenderingContext.QUEST_TRY_QUEST));
|
||||
x.para().tx(context.formatPhrase(RenderingContext.QUEST_TRY_QUEST));
|
||||
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(context.formatMessage(RenderingContext.QUEST_NLM));
|
||||
ul.li().ah("http://todo.nlm.gov/path?mode=ig&src="+Utilities.pathURL(context.getLink(KnownLinkType.SELF), "package.tgz")+"&q="+q.getId()+".json").tx(context.formatPhrase(RenderingContext.QUEST_NLM));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -711,13 +711,13 @@ public class QuestionnaireResponseRenderer extends ResourceRenderer {
|
|||
// }
|
||||
// if (qi.hasAnswerOption()) {
|
||||
// XhtmlNode tr = tbl.tr();
|
||||
// tr.td().tx(context.formatMessage(RenderingContext.QUEST_ALLOWED));
|
||||
// tr.td().tx(context.formatPhrase(RenderingContext.QUEST_ALLOWED));
|
||||
// XhtmlNode ul = tr.td().ul();
|
||||
// for (QuestionnaireItemAnswerOptionComponent ans : qi.getAnswerOption()) {
|
||||
// XhtmlNode li = ul.li();
|
||||
// render(li, ans.getValue());
|
||||
// if (ans.getInitialSelected()) {
|
||||
// li.tx(context.formatMessage(RenderingContext.QUEST_INITIALLY));
|
||||
// li.tx(context.formatPhrase(RenderingContext.QUEST_INITIALLY));
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
@ -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(context.formatMessage(RenderingContext.QUEST_DISPLAY_CAT));
|
||||
// tr.td().ah("http://hl7.org/fhir/StructureDefinition/QuestionnaireResponse-displayCategory").tx(context.formatPhrase(RenderingContext.QUEST_DISPLAY_CAT));
|
||||
// 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(context.formatMessage(RenderingContext.QUEST_OBSERVATION));
|
||||
// tr.td().ah(getSDCLink("http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-QuestionnaireResponse-observationLinkPeriod").tx(context.formatPhrase(RenderingContext.QUEST_OBSERVATION));
|
||||
// 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(context.formatMessage(RenderingContext.QUEST_ENABLE));
|
||||
// tr.td().tx(context.formatPhrase(RenderingContext.QUEST_ENABLE));
|
||||
// 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 context.formatMessage(RenderingContext.QUEST_TODO);
|
||||
return context.formatPhrase(RenderingContext.QUEST_TODO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String display(ResourceWrapper r) throws UnsupportedEncodingException, IOException {
|
||||
return context.formatMessage(RenderingContext.QUEST_NOT_DONE);
|
||||
return context.formatPhrase(RenderingContext.QUEST_NOT_DONE);
|
||||
}
|
||||
|
||||
}
|
|
@ -48,14 +48,14 @@ public class Renderer {
|
|||
}
|
||||
|
||||
|
||||
protected String formatMessage(String theMessage, Object... theMessageArguments) {
|
||||
return context.formatMessage(theMessage, theMessageArguments);
|
||||
protected String formatPhrase(String theMessage, Object... theMessageArguments) {
|
||||
return context.formatPhrase(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"), (context.formatMessage(RenderingContext.REND_STANDARDS, ss.toDisplay())));
|
||||
XhtmlNode a = td.ah(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "versions.html#std-process"), (context.formatPhrase(RenderingContext.REND_STANDARDS, 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());
|
||||
}
|
||||
|
@ -72,21 +72,21 @@ public class Renderer {
|
|||
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", (context.formatMessage(RenderingContext.REND_SINCE_ADDED, context.getChangeVersion())));
|
||||
XhtmlNode spanInner = spanOuter.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", (context.formatPhrase(RenderingContext.REND_SINCE_ADDED, context.getChangeVersion())));
|
||||
spanInner.img("icon-change-add.png", "icon");
|
||||
spanInner.tx(" "+context.formatMessage(RenderingContext.REND_ADDED));
|
||||
spanInner.tx(" "+context.formatPhrase(RenderingContext.REND_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", vca.getOriginal() == null ? context.formatMessage(RenderingContext.REND_SINCE_CHANGED, context.getChangeVersion()) : context.formatMessage(RenderingContext.REND_SINCE_CHANGED_WAS, context.getChangeVersion(), vca.getOriginal()));
|
||||
spanInner = spanOuter.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", vca.getOriginal() == null ? context.formatPhrase(RenderingContext.REND_SINCE_CHANGED, context.getChangeVersion()) : context.formatPhrase(RenderingContext.REND_SINCE_CHANGED_WAS, context.getChangeVersion(), vca.getOriginal()));
|
||||
spanInner.img("icon-change-edit.png", "icon");
|
||||
spanInner.tx(" "+context.formatMessage(RenderingContext.REND_CHANGED));
|
||||
spanInner.tx(" "+context.formatPhrase(RenderingContext.REND_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", (context.formatMessage(RenderingContext.REND_SINCE_DELETED, context.getChangeVersion())));
|
||||
spanInner = spanOuter.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", (context.formatPhrase(RenderingContext.REND_SINCE_DELETED, context.getChangeVersion())));
|
||||
spanInner.img("icon-change-remove.png", "icon");
|
||||
spanInner.tx(" "+context.formatMessage(RenderingContext.REND_REMOVED));
|
||||
spanInner.tx(" "+context.formatPhrase(RenderingContext.REND_REMOVED));
|
||||
return spanOuter.strikethrough();
|
||||
default:
|
||||
return x;
|
||||
|
@ -104,21 +104,21 @@ public class Renderer {
|
|||
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", (context.formatMessage(RenderingContext.REND_SINCE_ADDED, context.getChangeVersion())));
|
||||
XhtmlNode spanInner = divOuter.para().style("margin: 0").span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", (context.formatPhrase(RenderingContext.REND_SINCE_ADDED, context.getChangeVersion())));
|
||||
spanInner.img("icon-change-add.png", "icon");
|
||||
spanInner.tx(" "+context.formatMessage(RenderingContext.REND_ADDED));
|
||||
spanInner.tx(" "+context.formatPhrase(RenderingContext.REND_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", vca.getOriginal() == null ? context.formatMessage(RenderingContext.REND_SINCE_CHANGED, context.getChangeVersion()) : context.formatMessage(RenderingContext.REND_SINCE_CHANGED_WAS, context.getChangeVersion(), vca.getOriginal()));
|
||||
spanInner = divOuter.para().style("margin: 0").span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", vca.getOriginal() == null ? context.formatPhrase(RenderingContext.REND_SINCE_CHANGED, context.getChangeVersion()) : context.formatPhrase(RenderingContext.REND_SINCE_CHANGED_WAS, context.getChangeVersion(), vca.getOriginal()));
|
||||
spanInner.img("icon-change-edit.png", "icon");
|
||||
spanInner.tx(" "+context.formatMessage(RenderingContext.REND_CHANGED));
|
||||
spanInner.tx(" "+context.formatPhrase(RenderingContext.REND_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", (context.formatMessage(RenderingContext.REND_SINCE_DELETED, context.getChangeVersion())));
|
||||
spanInner = divOuter.para().style("margin: 0").span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", (context.formatPhrase(RenderingContext.REND_SINCE_DELETED, context.getChangeVersion())));
|
||||
spanInner.img("icon-change-remove.png", "icon");
|
||||
spanInner.tx(" "+context.formatMessage(RenderingContext.REND_REMOVED));
|
||||
spanInner.tx(" "+context.formatPhrase(RenderingContext.REND_REMOVED));
|
||||
return divOuter.strikethrough();
|
||||
default:
|
||||
return x;
|
||||
|
@ -140,27 +140,27 @@ public class Renderer {
|
|||
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", (context.formatMessage(RenderingContext.REND_ROW_SINCE, context.getChangeVersion())));
|
||||
XhtmlNode span = td.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", (context.formatPhrase(RenderingContext.REND_ROW_SINCE, context.getChangeVersion())));
|
||||
span.img("icon-change-add.png", "icon");
|
||||
span.tx(" "+ context.formatMessage(RenderingContext.REND_ADDED));
|
||||
span.tx(" "+ context.formatPhrase(RenderingContext.REND_ADDED));
|
||||
XhtmlNode x = new XhtmlNode(NodeType.Element, "holder");
|
||||
x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", context.formatMessage(RenderingContext.REND_ROW_SINCE, context.getChangeVersion())).tx(" ");
|
||||
x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", context.formatPhrase(RenderingContext.REND_ROW_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", context.formatMessage(RenderingContext.REND_ROW_CHANGED_SINCE_WAS, context.getChangeVersion(), vca.getOriginal()));
|
||||
span = td.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", context.formatPhrase(RenderingContext.REND_ROW_CHANGED_SINCE_WAS, context.getChangeVersion(), vca.getOriginal()));
|
||||
span.img("icon-change-edit.png", "icon");
|
||||
span.tx(" "+ context.formatMessage(RenderingContext.REND_CHANGED));
|
||||
span.tx(" "+ context.formatPhrase(RenderingContext.REND_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", context.formatMessage(RenderingContext.REND_ROW_REMOVED_SINCE, context.getChangeVersion()));
|
||||
span = td.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", context.formatPhrase(RenderingContext.REND_ROW_REMOVED_SINCE, context.getChangeVersion()));
|
||||
span.img("icon-change-remove.png", "icon");
|
||||
span.tx(" "+ context.formatMessage(RenderingContext.REND_REMOVED));
|
||||
span.tx(" "+ context.formatPhrase(RenderingContext.REND_REMOVED));
|
||||
x = new XhtmlNode(NodeType.Element, "holder");
|
||||
x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px; text-decoration: none", context.formatMessage(RenderingContext.REND_ROW_SINCE, context.getChangeVersion())).tx(" ");
|
||||
x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px; text-decoration: none", context.formatPhrase(RenderingContext.REND_ROW_SINCE, context.getChangeVersion())).tx(" ");
|
||||
tr.styleCells(x);
|
||||
return td;
|
||||
default:
|
||||
|
@ -173,9 +173,9 @@ public class Renderer {
|
|||
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", context.formatMessage(RenderingContext.REND_SINCE_ADDED, version));
|
||||
XhtmlNode spanInner = x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", context.formatPhrase(RenderingContext.REND_SINCE_ADDED, version));
|
||||
spanInner.img("icon-change-add.png", "icon");
|
||||
spanInner.tx(" "+context.formatMessage(RenderingContext.REND_ADDED));
|
||||
spanInner.tx(" "+context.formatPhrase(RenderingContext.REND_ADDED));
|
||||
return;
|
||||
case Changed:
|
||||
if (self.getComp().noChangeOtherThanMetadata(metadataFields)) {
|
||||
|
@ -183,15 +183,15 @@ public class Renderer {
|
|||
return;
|
||||
} else {
|
||||
spanInner = x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px",
|
||||
self.getOriginal() != null ? context.formatMessage(RenderingContext.REND_SINCE_CHANGED_WAS, version, self.getOriginal()) : context.formatMessage(RenderingContext.REND_SINCE_CHANGED, version));
|
||||
self.getOriginal() != null ? context.formatPhrase(RenderingContext.REND_SINCE_CHANGED_WAS, version, self.getOriginal()) : context.formatPhrase(RenderingContext.REND_SINCE_CHANGED, version));
|
||||
spanInner.img("icon-change-edit.png", "icon");
|
||||
spanInner.tx(" "+context.formatMessage(RenderingContext.REND_CHANGED));
|
||||
spanInner.tx(" "+context.formatPhrase(RenderingContext.REND_CHANGED));
|
||||
}
|
||||
return;
|
||||
case Deleted:
|
||||
spanInner = x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", context.formatMessage(RenderingContext.REND_SINCE_DELETED, version));
|
||||
spanInner = x.span("background-color: #fff2ff; border-left: solid 3px #ffa0ff; margin: 2px; padding: 2px", context.formatPhrase(RenderingContext.REND_SINCE_DELETED, version));
|
||||
spanInner.img("icon-change-remove.png", "icon");
|
||||
spanInner.tx(" "+context.formatMessage(RenderingContext.REND_REMOVED));
|
||||
spanInner.tx(" "+context.formatPhrase(RenderingContext.REND_REMOVED));
|
||||
return;
|
||||
default:
|
||||
x.span("color: #eeeeee").tx("n/c");
|
||||
|
|
|
@ -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(context.formatMessage(RenderingContext.REQ_ACTOR)+" ");
|
||||
p.tx(context.formatPhrase(RenderingContext.REQ_ACTOR)+" ");
|
||||
if (acd == null) {
|
||||
p.code(req.getActor().get(0).getValue());
|
||||
} else {
|
||||
p.ah(acd.getWebPath()).tx(acd.present());
|
||||
}
|
||||
} else {
|
||||
x.para().tx(context.formatMessage(RenderingContext.REQ_FOLLOWING_ACTOR)+" ");
|
||||
x.para().tx(context.formatPhrase(RenderingContext.REQ_FOLLOWING_ACTOR)+" ");
|
||||
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(context.formatMessage(RenderingContext.REQ_DERIVE)+" ");
|
||||
p.tx(context.formatPhrase(RenderingContext.REQ_DERIVE)+" ");
|
||||
if (reqd == null) {
|
||||
p.code(req.getDerivedFrom().get(0).getValue());
|
||||
} else {
|
||||
p.ah(reqd.getWebPath()).tx(reqd.present());
|
||||
}
|
||||
} else {
|
||||
x.para().tx(context.formatMessage(RenderingContext.REQ_FOLLOWING_REQ)+" ");
|
||||
x.para().tx(context.formatPhrase(RenderingContext.REQ_FOLLOWING_REQ)+" ");
|
||||
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(context.formatMessage(RenderingContext.REQ_REFERENCES)+" ");
|
||||
p.tx(context.formatPhrase(RenderingContext.REQ_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(context.formatMessage(RenderingContext.REQ_LINKS)+" ");
|
||||
td.para().tx(context.formatPhrase(RenderingContext.REQ_LINKS)+" ");
|
||||
XhtmlNode ul = td.ul();
|
||||
if (stmt.hasDerivedFrom()) {
|
||||
XhtmlNode li = ul.li();
|
||||
li.tx(context.formatMessage(RenderingContext.REQ_DERIVED)+" ");
|
||||
li.tx(context.formatPhrase(RenderingContext.REQ_DERIVED)+" ");
|
||||
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(context.formatMessage(RenderingContext.REQ_SATISFIED)+" ");
|
||||
li.tx(context.formatPhrase(RenderingContext.REQ_SATISFIED)+" ");
|
||||
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(context.formatMessage(RenderingContext.REQ_REFERENCES)+" ");
|
||||
li.tx(context.formatPhrase(RenderingContext.REQ_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(context.formatMessage(RenderingContext.REQ_SOURCES)+" ");
|
||||
li.tx(context.formatPhrase(RenderingContext.REQ_SOURCES)+" ");
|
||||
first = true;
|
||||
for (Reference c : stmt.getSource()) {
|
||||
if (first) first = false; else li.tx(", ");
|
||||
|
|
|
@ -232,11 +232,11 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
CanonicalResource cr = (CanonicalResource) target;
|
||||
if (url.contains("|")) {
|
||||
if (target.hasWebPath()) {
|
||||
x.ah(target.getWebPath()).tx(cr.present()+ context.formatMessage(RenderingContext.RES_REND_VER) +cr.getVersion()+")");
|
||||
x.ah(target.getWebPath()).tx(cr.present()+ context.formatPhrase(RenderingContext.RES_REND_VER) +cr.getVersion()+")");
|
||||
} else {
|
||||
url = url.substring(0, url.indexOf("|"));
|
||||
x.code().tx(url);
|
||||
x.tx(": "+cr.present()+ context.formatMessage(RenderingContext.RES_REND_VER) +cr.getVersion()+")");
|
||||
x.tx(": "+cr.present()+ context.formatPhrase(RenderingContext.RES_REND_VER) +cr.getVersion()+")");
|
||||
}
|
||||
} else {
|
||||
if (target.hasWebPath()) {
|
||||
|
@ -304,14 +304,14 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
if (tr != null && tr.getReference() != null) {
|
||||
link = tr.getReference();
|
||||
} else if (r.getReference().contains("?")) {
|
||||
text.append(context.formatMessage(RenderingContext.RES_REND_COND_REF)+" ");
|
||||
text.append(context.formatPhrase(RenderingContext.RES_REND_COND_REF)+" ");
|
||||
} else {
|
||||
link = r.getReference();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tr != null && tr.getReference() != null && tr.getReference().startsWith("#")) {
|
||||
text.append(context.formatMessage(RenderingContext.RES_REND_SEE_ON_THIS_PAGE)+" ");
|
||||
text.append(context.formatPhrase(RenderingContext.RES_REND_SEE_ON_THIS_PAGE)+" ");
|
||||
}
|
||||
// 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;
|
||||
|
@ -355,7 +355,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
} else if (name != null) {
|
||||
text.append(name);
|
||||
} else {
|
||||
text.append(context.formatMessage(RenderingContext.RES_REND_DESC));
|
||||
text.append(context.formatPhrase(RenderingContext.RES_REND_DESC));
|
||||
}
|
||||
}
|
||||
if (tr != null && tr.getReference() != null && tr.getReference().startsWith("#")) {
|
||||
|
@ -388,7 +388,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
c = x.ah(tr.getReference());
|
||||
}
|
||||
} else if (r.getReference().contains("?")) {
|
||||
x.tx(context.formatMessage(RenderingContext.RES_REND_COND_REF)+" ");
|
||||
x.tx(context.formatPhrase(RenderingContext.RES_REND_COND_REF)+" ");
|
||||
c = x.code("");
|
||||
} else {
|
||||
c = x.ah(r.getReference());
|
||||
|
@ -405,7 +405,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
c = x.span(null, null);
|
||||
}
|
||||
if (onPage) {
|
||||
c.tx(context.formatMessage(RenderingContext.RES_REND_SEE_ON_THIS_PAGE)+" ");
|
||||
c.tx(context.formatPhrase(RenderingContext.RES_REND_SEE_ON_THIS_PAGE)+" ");
|
||||
}
|
||||
// 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;
|
||||
|
@ -449,7 +449,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
} else if (name != null) {
|
||||
c.addText(name);
|
||||
} else {
|
||||
c.tx(context.formatMessage(RenderingContext.RES_REND_GEN_SUM)+" ");
|
||||
c.tx(context.formatPhrase(RenderingContext.RES_REND_GEN_SUM)+" ");
|
||||
if (tr != null) {
|
||||
new ProfileDrivenRenderer(context).generateResourceSummary(c, tr.getResource(), true, r.getReference().startsWith("#"), true);
|
||||
}
|
||||
|
@ -478,7 +478,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(context.formatMessage(RenderingContext.RES_REND_GEN_SUM)+" ");
|
||||
c.tx(context.formatPhrase(RenderingContext.RES_REND_GEN_SUM)+" ");
|
||||
new ProfileDrivenRenderer(context).generateResourceSummary(c, tr.getResource(), true, v.startsWith("#"), false);
|
||||
}
|
||||
} else if (tr != null && tr.getResource() != null) {
|
||||
|
@ -557,12 +557,12 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
|
||||
protected void generateCopyright(XhtmlNode x, CanonicalResource cs) {
|
||||
XhtmlNode p = x.para();
|
||||
p.b().tx(getContext().formatMessage(RenderingContext.RESOURCE_COPYRIGHT));
|
||||
p.b().tx(getContext().formatPhrase(RenderingContext.RESOURCE_COPYRIGHT));
|
||||
smartAddText(p, " " + cs.getCopyright());
|
||||
}
|
||||
|
||||
public String displayReference(Resource res, Reference r) throws UnsupportedEncodingException, IOException {
|
||||
return (context.formatMessage(RenderingContext.RES_REND_TODO));
|
||||
return (context.formatPhrase(RenderingContext.RES_REND_TODO));
|
||||
}
|
||||
|
||||
|
||||
|
@ -607,10 +607,10 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
|
||||
protected String describeStatus(PublicationStatus status, boolean experimental) {
|
||||
switch (status) {
|
||||
case ACTIVE: return experimental ? (context.formatMessage(RenderingContext.RES_REND_EXP)) : (context.formatMessage(RenderingContext.RES_REND_ACT));
|
||||
case DRAFT: return (context.formatMessage(RenderingContext.RES_REND_DRAFT));
|
||||
case RETIRED: return (context.formatMessage(RenderingContext.RES_REND_RET));
|
||||
default: return (context.formatMessage(RenderingContext.RES_REND_UNKNOWN));
|
||||
case ACTIVE: return experimental ? (context.formatPhrase(RenderingContext.RES_REND_EXP)) : (context.formatPhrase(RenderingContext.RES_REND_ACT));
|
||||
case DRAFT: return (context.formatPhrase(RenderingContext.RES_REND_DRAFT));
|
||||
case RETIRED: return (context.formatPhrase(RenderingContext.RES_REND_RET));
|
||||
default: return (context.formatPhrase(RenderingContext.RES_REND_UNKNOWN));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -656,35 +656,35 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
|
||||
if (id != null || lang != null || versionId != null || lastUpdated != null) {
|
||||
XhtmlNode p = plateStyle(div.para());
|
||||
p.tx(context.formatMessage(RenderingContext.RES_REND_RESOURCE));
|
||||
p.tx(context.formatPhrase(RenderingContext.RES_REND_RESOURCE));
|
||||
p.tx(r.fhirType());
|
||||
p.tx(" ");
|
||||
if (id != null) {
|
||||
p.tx("\""+id+"\" ");
|
||||
}
|
||||
if (versionId != null) {
|
||||
p.tx(context.formatMessage(RenderingContext.RES_REND_VERSION) + "\""+versionId+"\" ");
|
||||
p.tx(context.formatPhrase(RenderingContext.RES_REND_VERSION) + "\""+versionId+"\" ");
|
||||
}
|
||||
if (lastUpdated != null) {
|
||||
p.tx(context.formatMessage(RenderingContext.RES_REND_UPDATED) + "\"");
|
||||
p.tx(context.formatPhrase(RenderingContext.RES_REND_UPDATED) + "\"");
|
||||
renderDateTime(p, lastUpdated);
|
||||
p.tx("\" ");
|
||||
}
|
||||
if (lang != null) {
|
||||
p.tx(" " + context.formatMessage(RenderingContext.RES_REND_LANGUAGE) + "\""+lang+"\") ");
|
||||
p.tx(" " + context.formatPhrase(RenderingContext.RES_REND_LANGUAGE) + "\""+lang+"\") ");
|
||||
}
|
||||
}
|
||||
if (ir != null) {
|
||||
plateStyle(div.para()).b().tx(context.formatMessage(RenderingContext.RES_REND_SPEC_RULES) + " "+ir+"!");
|
||||
plateStyle(div.para()).b().tx(context.formatPhrase(RenderingContext.RES_REND_SPEC_RULES) + " "+ir+"!");
|
||||
}
|
||||
if (source != null) {
|
||||
plateStyle(div.para()).tx(context.formatMessage(RenderingContext.RES_REND_INFO_SOURCE) + " "+source+"!");
|
||||
plateStyle(div.para()).tx(context.formatPhrase(RenderingContext.RES_REND_INFO_SOURCE) + " "+source+"!");
|
||||
}
|
||||
if (meta != null) {
|
||||
PropertyWrapper pl = meta.getChildByName("profile");
|
||||
if (pl.hasValues()) {
|
||||
XhtmlNode p = plateStyle(div.para());
|
||||
p.tx(Utilities.pluralize(context.formatMessage(RenderingContext.RES_REND_PROFILE), pl.getValues().size())+": ");
|
||||
p.tx(Utilities.pluralize(context.formatPhrase(RenderingContext.RES_REND_PROFILE), pl.getValues().size())+": ");
|
||||
boolean first = true;
|
||||
for (BaseWrapper bw : pl.getValues()) {
|
||||
if (first) first = false; else p.tx(", ");
|
||||
|
@ -694,7 +694,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
PropertyWrapper tl = meta.getChildByName("tag");
|
||||
if (tl.hasValues()) {
|
||||
XhtmlNode p = plateStyle(div.para());
|
||||
p.tx(Utilities.pluralize(context.formatMessage(RenderingContext.RES_REND_TAG), tl.getValues().size())+": ");
|
||||
p.tx(Utilities.pluralize(context.formatPhrase(RenderingContext.RES_REND_TAG), tl.getValues().size())+": ");
|
||||
boolean first = true;
|
||||
for (BaseWrapper bw : tl.getValues()) {
|
||||
if (first) first = false; else p.tx(", ");
|
||||
|
@ -708,7 +708,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
PropertyWrapper sl = meta.getChildByName("security");
|
||||
if (sl.hasValues()) {
|
||||
XhtmlNode p = plateStyle(div.para());
|
||||
p.tx(Utilities.pluralize(context.formatMessage(RenderingContext.RES_REND_SECURITY_LABEL), tl.getValues().size())+": ");
|
||||
p.tx(Utilities.pluralize(context.formatPhrase(RenderingContext.RES_REND_SECURITY_LABEL), tl.getValues().size())+": ");
|
||||
boolean first = true;
|
||||
for (BaseWrapper bw : sl.getValues()) {
|
||||
if (first) first = false; else p.tx(", ");
|
||||
|
@ -740,7 +740,7 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
render(dr);
|
||||
} catch (Exception e) {
|
||||
XhtmlNode x = new XhtmlNode(NodeType.Element, "div");
|
||||
x.para().tx(context.formatMessage(RenderingContext.RES_REND_ERROR, e.getMessage())+" ");
|
||||
x.para().tx(context.formatPhrase(RenderingContext.RES_REND_ERROR, e.getMessage())+" ");
|
||||
dr.setText(null);
|
||||
inject(dr, x, NarrativeStatus.GENERATED);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class SearchParameterRenderer extends TerminologyRenderer {
|
|||
genStandardsStatus(h2, ss);
|
||||
}
|
||||
XhtmlNode p = x.para();
|
||||
p.tx(context.formatMessage(RenderingContext.SEARCH_PAR_PAR)+" ");
|
||||
p.tx(context.formatPhrase(RenderingContext.SEARCH_PAR_PAR)+" ");
|
||||
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(context.formatMessage(RenderingContext.SEARCH_PAR_REND_RES), spd.getBase().size()));
|
||||
tr.td().tx(Utilities.pluralize(context.formatPhrase(RenderingContext.SEARCH_PAR_REND_RES), 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(context.formatMessage(RenderingContext.SEARCH_PAR_EXP));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_EXP));
|
||||
if (spd.hasExpression()) {
|
||||
tr.td().code().tx(spd.getExpression());
|
||||
} else {
|
||||
tr.td().tx(context.formatMessage(RenderingContext.SEARCH_PAR_NONE));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_NONE));
|
||||
}
|
||||
if (spd.hasProcessingMode()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx(context.formatMessage(RenderingContext.SEARCH_PAR_PROC));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_PROC));
|
||||
tr.td().tx(spd.getProcessingMode().getDisplay());
|
||||
}
|
||||
if (spd.hasTarget()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx(Utilities.pluralize(context.formatMessage(RenderingContext.SEARCH_PAR_REND_TARGET), spd.getTarget().size()));
|
||||
tr.td().tx(Utilities.pluralize(context.formatPhrase(RenderingContext.SEARCH_PAR_REND_TARGET), spd.getTarget().size()));
|
||||
td = tr.td();
|
||||
if (isAllConcreteResources(spd.getTarget())) {
|
||||
td.ah(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "resourcelist.html")).tx(context.formatMessage(RenderingContext.SEARCH_PAR_RES));
|
||||
td.ah(Utilities.pathURL(context.getLink(KnownLinkType.SPEC), "resourcelist.html")).tx(context.formatPhrase(RenderingContext.SEARCH_PAR_RES));
|
||||
} 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(context.formatMessage(RenderingContext.SEARCH_PAR_MULTIPLES));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_MULTIPLES));
|
||||
XhtmlNode ul = tr.td().ul();
|
||||
if (!spd.hasMultipleAnd()) {
|
||||
ul.li().tx(context.formatMessage(RenderingContext.SEARCH_PAR_MULTIPLE_AND_SERVER));
|
||||
ul.li().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_MULTIPLE_AND_SERVER));
|
||||
} else if (spd.getMultipleAnd()) {
|
||||
ul.li().tx(context.formatMessage(RenderingContext.SEARCH_PAR_MULTIPLE_AND_REPEAT));
|
||||
ul.li().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_MULTIPLE_AND_REPEAT));
|
||||
} else {
|
||||
ul.li().tx(context.formatMessage(RenderingContext.SEARCH_PAR_MULTIPLE_AND_APPEAR));
|
||||
ul.li().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_MULTIPLE_AND_APPEAR));
|
||||
}
|
||||
if (!spd.hasMultipleOr()) {
|
||||
ul.li().tx(context.formatMessage(RenderingContext.SEARCH_PAR_MULTIPLE_OR_SERVER));
|
||||
ul.li().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_MULTIPLE_OR_SERVER));
|
||||
} else if (spd.getMultipleOr()) {
|
||||
ul.li().tx(context.formatMessage(RenderingContext.SEARCH_PAR_MULTIPLE_OR_MULTIPLE));
|
||||
ul.li().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_MULTIPLE_OR_MULTIPLE));
|
||||
} else {
|
||||
ul.li().tx(context.formatMessage(RenderingContext.SEARCH_PAR_MULTIPLE_OR_ONE));
|
||||
ul.li().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_MULTIPLE_OR_ONE));
|
||||
}
|
||||
|
||||
if (spd.hasComparator()) {
|
||||
tr = tbl.tr();
|
||||
tr.td().tx(context.formatMessage(RenderingContext.SEARCH_PAR_COMP));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_COMP));
|
||||
td = tr.td();
|
||||
td.tx(context.formatMessage(RenderingContext.SEARCH_PAR_ALLOWED)+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.SEARCH_PAR_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(context.formatMessage(RenderingContext.SEARCH_PAR_MOD));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_MOD));
|
||||
td = tr.td();
|
||||
td.tx(context.formatMessage(RenderingContext.SEARCH_PAR_ALLOWED)+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.SEARCH_PAR_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(context.formatMessage(RenderingContext.SEARCH_PAR_CHAIN));
|
||||
tr.td().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_CHAIN));
|
||||
td = tr.td();
|
||||
td.tx(context.formatMessage(RenderingContext.SEARCH_PAR_ALLOWED)+" ");
|
||||
td.tx(context.formatPhrase(RenderingContext.SEARCH_PAR_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(context.formatMessage(RenderingContext.SEARCH_PAR_COMP));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.SEARCH_PAR_COMP));
|
||||
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(), context.formatMessage(RenderingContext.SEARCH_PAR_PAR))) {
|
||||
if (!sd.getAbstract() && !Utilities.existsInList(sd.getType(), context.formatPhrase(RenderingContext.SEARCH_PAR_PAR))) {
|
||||
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
|
@ -631,7 +631,7 @@ public class StructureMapRenderer extends TerminologyRenderer {
|
|||
}
|
||||
if (isClause) {
|
||||
XhtmlNode s= x.color(COLOR_SPECIAL);
|
||||
s.setAttribute("title", formatMessage(RenderingContext.MAP_DEFAULT_COMMENT));
|
||||
s.setAttribute("title", formatPhrase(RenderingContext.MAP_DEFAULT_COMMENT));
|
||||
s.tx("// ");
|
||||
s.tx(doco.replace("\r\n", " ").replace("\r", " ").replace("\n", " "));
|
||||
} else {
|
||||
|
|
|
@ -49,39 +49,39 @@ public class SubscriptionTopicRenderer extends ResourceRenderer {
|
|||
}
|
||||
|
||||
if (st.hasResourceTrigger()) {
|
||||
TableData td = new TableData(context.formatMessage(RenderingContext.SUB_TOPIC_RES_TRIG));
|
||||
TableData td = new TableData(context.formatPhrase(RenderingContext.SUB_TOPIC_RES_TRIG));
|
||||
for (SubscriptionTopicResourceTriggerComponent rt : st.getResourceTrigger()) {
|
||||
TableRowData tr = td.addRow();
|
||||
if (rt.hasResource()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_RES), rt.getResourceElement());
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_RES), rt.getResourceElement());
|
||||
}
|
||||
for (Enumeration<InteractionTrigger> t : rt.getSupportedInteraction()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_INT), t);
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_INT), t);
|
||||
}
|
||||
if (rt.hasQueryCriteria()) {
|
||||
StringBuilder md = new StringBuilder();
|
||||
if (rt.getQueryCriteria().hasPrevious()) {
|
||||
md.append(context.formatMessage(RenderingContext.SUB_TOPIC_PREV, rt.getQueryCriteria().getPrevious()+"\r\n")+" ");
|
||||
md.append(context.formatPhrase(RenderingContext.SUB_TOPIC_PREV, rt.getQueryCriteria().getPrevious()+"\r\n")+" ");
|
||||
}
|
||||
if (rt.getQueryCriteria().hasResultForCreate()) {
|
||||
md.append(context.formatMessage(RenderingContext.SUB_TOPIC_CREATE, rt.getQueryCriteria().getResultForCreate()+"\r\n")+" ");
|
||||
md.append(context.formatPhrase(RenderingContext.SUB_TOPIC_CREATE, rt.getQueryCriteria().getResultForCreate()+"\r\n")+" ");
|
||||
}
|
||||
if (rt.getQueryCriteria().hasCurrent()) {
|
||||
md.append(context.formatMessage(RenderingContext.SUB_TOPIC_CREATE, rt.getQueryCriteria().getCurrent()+"\r\n")+" ");
|
||||
md.append(context.formatPhrase(RenderingContext.SUB_TOPIC_CREATE, rt.getQueryCriteria().getCurrent()+"\r\n")+" ");
|
||||
}
|
||||
if (rt.getQueryCriteria().hasPrevious()) {
|
||||
md.append(context.formatMessage(RenderingContext.SUB_TOPIC_DELETE, rt.getQueryCriteria().getResultForDelete()+"\r\n")+" ");
|
||||
md.append(context.formatPhrase(RenderingContext.SUB_TOPIC_DELETE, rt.getQueryCriteria().getResultForDelete()+"\r\n")+" ");
|
||||
}
|
||||
if (rt.getQueryCriteria().hasRequireBoth()) {
|
||||
md.append(context.formatMessage(RenderingContext.SUB_TOPIC_REQ, rt.getQueryCriteria().getRequireBoth()+"\r\n")+" ");
|
||||
md.append(context.formatPhrase(RenderingContext.SUB_TOPIC_REQ, rt.getQueryCriteria().getRequireBoth()+"\r\n")+" ");
|
||||
}
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_CRITERIA), new MarkdownType(md.toString()));
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_CRITERIA), new MarkdownType(md.toString()));
|
||||
}
|
||||
if (rt.hasFhirPathCriteriaElement()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_FHIR_PATH), rt.getFhirPathCriteriaElement());
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_FHIR_PATH), rt.getFhirPathCriteriaElement());
|
||||
}
|
||||
if (rt.hasDescription()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_DESC), rt.getDescriptionElement());
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_DESC), 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(context.formatMessage(RenderingContext.SUB_TOPIC_RES), rt.getResourceElement());
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_RES), rt.getResourceElement());
|
||||
}
|
||||
if (rt.hasEvent()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_EVENT), rt.getEvent());
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_EVENT), rt.getEvent());
|
||||
}
|
||||
if (rt.hasDescription()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_DESC), rt.getDescriptionElement());
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_DESC), 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(context.formatMessage(RenderingContext.SUB_TOPIC_RES), rt.getResourceElement());
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_RES), rt.getResourceElement());
|
||||
}
|
||||
if (rt.hasFilterParameter()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_FILT_PAR), rt.getFilterParameterElement());
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_FILT_PAR), rt.getFilterParameterElement());
|
||||
}
|
||||
if (rt.hasFilterDefinition()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_FILT_DEF), rt.getFilterDefinitionElement());
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_FILT_DEF), rt.getFilterDefinitionElement());
|
||||
}
|
||||
for (Enumeration<SearchComparator> t : rt.getComparator()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_COMP), t);
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_COMP), t);
|
||||
}
|
||||
for (Enumeration<SearchModifierCode> t : rt.getModifier()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_MOD), t);
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_MOD), 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(context.formatMessage(RenderingContext.SUB_TOPIC_RES), rt.getResourceElement());
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_RES), rt.getResourceElement());
|
||||
}
|
||||
for (StringType t : rt.getInclude()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_INCL), t);
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_INCL), t);
|
||||
}
|
||||
for (StringType t : rt.getRevInclude()) {
|
||||
tr.value(context.formatMessage(RenderingContext.SUB_TOPIC_REV_INCL), t);
|
||||
tr.value(context.formatPhrase(RenderingContext.SUB_TOPIC_REV_INCL), 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(context.formatMessage(RenderingContext.TERMINOLOGY_LVL));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.TERMINOLOGY_LVL));
|
||||
}
|
||||
tr.td().attribute("style", "white-space:nowrap").b().tx(formatMessage(RenderingContext.TX_CODE));
|
||||
tr.td().attribute("style", "white-space:nowrap").b().tx(formatPhrase(RenderingContext.TX_CODE));
|
||||
if (hasDisplay) {
|
||||
tr.td().b().tx(formatMessage(RenderingContext.TX_DISPLAY));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.TX_DISPLAY));
|
||||
}
|
||||
if (definitions) {
|
||||
tr.td().b().tx(formatMessage(RenderingContext.TX_DEFINITION));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.TX_DEFINITION));
|
||||
}
|
||||
if (deprecated) {
|
||||
tr.td().b().tx(formatMessage(RenderingContext.TX_DEPRECATED));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.TX_DEPRECATED));
|
||||
}
|
||||
if (comments) {
|
||||
tr.td().b().tx(formatMessage(RenderingContext.TX_COMMENTS));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.TX_COMMENTS));
|
||||
}
|
||||
if (version) {
|
||||
tr.td().b().tx(formatMessage(RenderingContext.TX_VERSION));
|
||||
tr.td().b().tx(formatPhrase(RenderingContext.TX_VERSION));
|
||||
}
|
||||
if (properties != null) {
|
||||
for (PropertyComponent pc : properties) {
|
||||
|
@ -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(context.formatMessage(RenderingContext.TERMINOLOGY_SNOMED));
|
||||
a.tx(context.formatPhrase(RenderingContext.TERMINOLOGY_SNOMED));
|
||||
}
|
||||
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", formatMessage(RenderingContext.TERM_REND_COPY, title));
|
||||
XhtmlNode span = x.span("cursor: pointer", formatPhrase(RenderingContext.TERM_REND_COPY, title));
|
||||
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(context.formatMessage(RenderingContext.TEST_PLAN_CONT));
|
||||
p.b().tx(context.formatPhrase(RenderingContext.TEST_PLAN_CONT));
|
||||
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(context.formatMessage(RenderingContext.TEST_PLAN_CATEGORY)+" ");
|
||||
p.b().tx(context.formatPhrase(RenderingContext.TEST_PLAN_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(context.formatMessage(RenderingContext.TEST_PLAN_SCOPE)+" ");
|
||||
p.b().tx(context.formatPhrase(RenderingContext.TEST_PLAN_SCOPE)+" ");
|
||||
renderReference(tp, p, tp.getScopeFirstRep());
|
||||
} else {
|
||||
x.para().b().tx(context.formatMessage(RenderingContext.TEST_PLAN_SCOPES));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.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(context.formatMessage(RenderingContext.TEST_PLAN_DEP)+" ");
|
||||
p.b().tx(context.formatPhrase(RenderingContext.TEST_PLAN_DEP)+" ");
|
||||
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(context.formatMessage(RenderingContext.TEST_PLAN_DEPEN));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.TEST_PLAN_DEPEN));
|
||||
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(context.formatMessage(RenderingContext.TEST_PLAN_DESC));
|
||||
li.addText(context.formatPhrase(RenderingContext.TEST_PLAN_DESC));
|
||||
}
|
||||
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(tc.hasSequence() ? formatMessage(RenderingContext.TEST_PLAN_CASE) : formatMessage(RenderingContext.TEST_PLAN_CASE_SEQ, tc.getSequence()));
|
||||
x.h2().addText(tc.hasSequence() ? formatPhrase(RenderingContext.TEST_PLAN_CASE) : formatPhrase(RenderingContext.TEST_PLAN_CASE_SEQ, tc.getSequence()));
|
||||
|
||||
if (tc.hasScope()) {
|
||||
if (tc.getScope().size() == 1) {
|
||||
p = x.para();
|
||||
p.b().tx(context.formatMessage(RenderingContext.TEST_PLAN_SCOPE)+" ");
|
||||
p.b().tx(context.formatPhrase(RenderingContext.TEST_PLAN_SCOPE)+" ");
|
||||
renderReference(tp, p, tc.getScopeFirstRep());
|
||||
} else {
|
||||
x.para().b().tx(context.formatMessage(RenderingContext.TEST_PLAN_SCOPES));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.TEST_PLAN_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(context.formatMessage(RenderingContext.TEST_PLAN_DEP));
|
||||
x.h3().addText(context.formatPhrase(RenderingContext.TEST_PLAN_DEP));
|
||||
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(context.formatMessage(RenderingContext.TEST_PLAN_DEPEN));
|
||||
x.h3().addText(context.formatPhrase(RenderingContext.TEST_PLAN_DEPEN));
|
||||
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(context.formatMessage(RenderingContext.TEST_PLAN_DESC));
|
||||
li.addText(context.formatPhrase(RenderingContext.TEST_PLAN_DESC));
|
||||
}
|
||||
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(context.formatMessage(RenderingContext.TEST_PLAN_RUN));
|
||||
x.h3().addText(context.formatPhrase(RenderingContext.TEST_PLAN_RUN));
|
||||
renderTestRun(x, tp, tc.getTestRunFirstRep());
|
||||
}
|
||||
else {
|
||||
int count = 0;
|
||||
for (TestPlanTestCaseTestRunComponent trun : tc.getTestRun()) {
|
||||
count++;
|
||||
x.h3().addText(context.formatMessage(RenderingContext.TEST_PLAN_TEST_RUN, count)+" ");
|
||||
x.h3().addText(context.formatPhrase(RenderingContext.TEST_PLAN_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(context.formatMessage(RenderingContext.TEST_PLAN_DATA));
|
||||
x.h3().addText(context.formatPhrase(RenderingContext.TEST_PLAN_DATA));
|
||||
renderTestData(x, tp, tc.getTestDataFirstRep());
|
||||
}
|
||||
else {
|
||||
int count = 0;
|
||||
for (TestPlanTestCaseTestDataComponent tdata : tc.getTestData()) {
|
||||
count++;
|
||||
x.h3().addText(context.formatMessage(RenderingContext.TEST_PLAN_TEST_DATA, count)+" ");
|
||||
x.h3().addText(context.formatPhrase(RenderingContext.TEST_PLAN_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(context.formatMessage(RenderingContext.TEST_PLAN_ASS));
|
||||
x.h3().addText(context.formatPhrase(RenderingContext.TEST_PLAN_ASS));
|
||||
renderAssertion(x, tp, tc.getAssertionFirstRep());
|
||||
}
|
||||
else {
|
||||
int count = 0;
|
||||
for (TestPlanTestCaseAssertionComponent as : tc.getAssertion()) {
|
||||
count++;
|
||||
x.h3().addText(context.formatMessage(RenderingContext.TEST_PLAN_ASSERTION, count)+" ");
|
||||
x.h3().addText(context.formatPhrase(RenderingContext.TEST_PLAN_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(context.formatMessage(RenderingContext.TEST_PLAN_LANG));
|
||||
tr.td().b().addText(context.formatMessage(RenderingContext.TEST_PLAN_SOURCE));
|
||||
tr.td().b().addText(context.formatPhrase(RenderingContext.TEST_PLAN_LANG));
|
||||
tr.td().b().addText(context.formatPhrase(RenderingContext.TEST_PLAN_SOURCE));
|
||||
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(context.formatMessage(RenderingContext.TEST_PLAN_TYPE));
|
||||
tr.td().b().addText(context.formatMessage(RenderingContext.TEST_PLAN_CONTENT));
|
||||
tr.td().b().addText(context.formatMessage(RenderingContext.TEST_PLAN_SOURCE));
|
||||
tr.td().b().addText(context.formatPhrase(RenderingContext.TEST_PLAN_TYPE));
|
||||
tr.td().b().addText(context.formatPhrase(RenderingContext.TEST_PLAN_CONTENT));
|
||||
tr.td().b().addText(context.formatPhrase(RenderingContext.TEST_PLAN_SOURCE));
|
||||
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(context.formatMessage(RenderingContext.TEST_PLAN_TYPE));
|
||||
tr.td().b().addText(context.formatMessage(RenderingContext.TEST_PLAN_CONTENT));
|
||||
tr.td().b().addText(context.formatMessage(RenderingContext.TEST_PLAN_RESULT));
|
||||
tr.td().b().addText(context.formatPhrase(RenderingContext.TEST_PLAN_TYPE));
|
||||
tr.td().b().addText(context.formatPhrase(RenderingContext.TEST_PLAN_CONTENT));
|
||||
tr.td().b().addText(context.formatPhrase(RenderingContext.TEST_PLAN_RESULT));
|
||||
tr = t.tr();
|
||||
if (as.hasType()) {
|
||||
XhtmlNode td = tr.td();
|
||||
|
|
|
@ -184,7 +184,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
|
||||
if (header) {
|
||||
XhtmlNode h = x.addTag(getHeader());
|
||||
h.tx(context.formatMessage(RenderingContext.VALUE_SET_CONT));
|
||||
h.tx(context.formatPhrase(RenderingContext.VALUE_SET_CONT));
|
||||
if (IsNotFixedExpansion(vs))
|
||||
addMarkdown(x, vs.getDescription());
|
||||
if (vs.hasCopyright())
|
||||
|
@ -206,9 +206,9 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
// }
|
||||
String msg = null;
|
||||
if (vs.getExpansion().getContains().isEmpty()) {
|
||||
msg = context.formatMessage(RenderingContext.VALUE_SET_TOO_COSTLY);
|
||||
msg = context.formatPhrase(RenderingContext.VALUE_SET_TOO_COSTLY);
|
||||
} else {
|
||||
msg = context.formatMessage(RenderingContext.VALUE_SET_CODE_SELEC, countMembership(vs));
|
||||
msg = context.formatPhrase(RenderingContext.VALUE_SET_CODE_SELEC, countMembership(vs));
|
||||
}
|
||||
x.para().style("border: maroon 1px solid; background-color: #FFCCCC; font-weight: bold; padding: 8px").addText(msg);
|
||||
} else {
|
||||
|
@ -216,17 +216,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(context.formatMessage(RenderingContext.VALUE_SET_HAS)+(hasFragment ? context.formatMessage(RenderingContext.VALUE_SET_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(context.formatPhrase(RenderingContext.VALUE_SET_HAS)+(hasFragment ? context.formatPhrase(RenderingContext.VALUE_SET_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(context.formatMessage(RenderingContext.VALUE_SET_CONTAINS)+(hasFragment ? context.formatMessage(RenderingContext.VALUE_SET_AT_LEAST) : "")+vs.getExpansion().getTotal()+" concepts.");
|
||||
x.para().tx(context.formatPhrase(RenderingContext.VALUE_SET_CONTAINS)+(hasFragment ? context.formatPhrase(RenderingContext.VALUE_SET_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 = context.formatMessage(RenderingContext.VALUE_SET_SEL);
|
||||
String msg = context.formatPhrase(RenderingContext.VALUE_SET_SEL);
|
||||
x.para().style("border: maroon 1px solid; background-color: #FFCCCC; font-weight: bold; padding: 8px").addText(msg);
|
||||
} else {
|
||||
x.para().tx(context.formatMessage(RenderingContext.VALUE_SET_NUMBER_CONCEPTS, count));
|
||||
x.para().tx(context.formatPhrase(RenderingContext.VALUE_SET_NUMBER_CONCEPTS, count));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,21 +244,21 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
XhtmlNode t = x.table( "codes");
|
||||
XhtmlNode tr = t.tr();
|
||||
if (doLevel)
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.VALUE_SET_LEVEL));
|
||||
tr.td().attribute("style", "white-space:nowrap").b().tx(context.formatMessage(RenderingContext.VALUE_SET_CODE));
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.VALUE_SET_SYSTEM));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_LEVEL));
|
||||
tr.td().attribute("style", "white-space:nowrap").b().tx(context.formatPhrase(RenderingContext.VALUE_SET_CODE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_SYSTEM));
|
||||
XhtmlNode tdDisp = tr.td();
|
||||
tdDisp.b().tx(context.formatMessage(RenderingContext.VALUE_SET_DISPLAY));
|
||||
tdDisp.b().tx(context.formatPhrase(RenderingContext.VALUE_SET_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(context.formatMessage(RenderingContext.VALUE_SET_INACTIVE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_INACTIVE));
|
||||
}
|
||||
if (doDefinition) {
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.VALUE_SET_DEF));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_DEF));
|
||||
doDesignations = false;
|
||||
for (String n : Utilities.sorted(properties.keySet())) {
|
||||
tr.td().b().ah(properties.get(n)).addText(n);
|
||||
|
@ -294,15 +294,15 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (!doDesignations && langs.size() + designations.size() > 0) {
|
||||
Collections.sort(langs);
|
||||
if (designations.size() == 0) {
|
||||
x.para().b().tx(context.formatMessage(RenderingContext.VALUE_SET_ADD_LANG));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_ADD_LANG));
|
||||
} else if (langs.size() == 0) {
|
||||
x.para().b().tx(context.formatMessage(RenderingContext.VALUE_SET_DESIG));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_DESIG));
|
||||
} else {
|
||||
x.para().b().tx(context.formatMessage(RenderingContext.VALUE_SET_ADD_DESIG));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_ADD_DESIG));
|
||||
}
|
||||
t = x.table("codes");
|
||||
tr = t.tr();
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.VALUE_SET_CODE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_CODE));
|
||||
for (String url : designations.keySet()) {
|
||||
tr.td().b().addText(designations.get(url));
|
||||
}
|
||||
|
@ -342,8 +342,8 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
|
||||
private boolean generateContentModeNotices(XhtmlNode x, ValueSetExpansionComponent expansion, Resource vs) {
|
||||
generateContentModeNotice(x, expansion, "example", context.formatMessage(RenderingContext.VALUE_SET_EXP), vs);
|
||||
return generateContentModeNotice(x, expansion, "fragment", context.formatMessage(RenderingContext.VALUE_SET_EXP_FRAG), vs);
|
||||
generateContentModeNotice(x, expansion, "example", context.formatPhrase(RenderingContext.VALUE_SET_EXP), vs);
|
||||
return generateContentModeNotice(x, expansion, "fragment", context.formatPhrase(RenderingContext.VALUE_SET_EXP_FRAG), vs);
|
||||
}
|
||||
|
||||
private boolean generateContentModeNotice(XhtmlNode x, ValueSetExpansionComponent expansion, String mode, String text, Resource vs) {
|
||||
|
@ -486,14 +486,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(context.formatMessage(RenderingContext.VALUE_SET_EXPANSION)+" ");
|
||||
p.tx(context.formatPhrase(RenderingContext.VALUE_SET_EXPANSION)+" ");
|
||||
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(context.formatMessage(RenderingContext.VALUE_SET_EXPANSIONS));
|
||||
div.para().tx(context.formatPhrase(RenderingContext.VALUE_SET_EXPANSIONS));
|
||||
ul = div.ul();
|
||||
first = false;
|
||||
}
|
||||
|
@ -513,30 +513,30 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (parts.length >= 5) {
|
||||
String m = describeModule(parts[4]);
|
||||
if (parts.length == 7) {
|
||||
x.tx(context.formatMessage(RenderingContext.VALUE_SET_SNOMED_ADD, m, formatSCTDate(parts[6])));
|
||||
x.tx(context.formatPhrase(RenderingContext.VALUE_SET_SNOMED_ADD, m, formatSCTDate(parts[6])));
|
||||
} else {
|
||||
x.tx(context.formatMessage(RenderingContext.VALUE_SET_SNOMED, m));
|
||||
x.tx(context.formatPhrase(RenderingContext.VALUE_SET_SNOMED, m));
|
||||
}
|
||||
} else {
|
||||
x.tx(displaySystem(u)+" "+ context.formatMessage(RenderingContext.VALUE_SET_VERSION) + " " +v);
|
||||
x.tx(displaySystem(u)+" "+ context.formatPhrase(RenderingContext.VALUE_SET_VERSION) + " " +v);
|
||||
}
|
||||
} else if (u.equals("http://loinc.org")) {
|
||||
String vd = describeLoincVer(v);
|
||||
if (vd != null) {
|
||||
x.tx(context.formatMessage(RenderingContext.VALUE_SET_LOINCV)+v+" ("+vd+")");
|
||||
x.tx(context.formatPhrase(RenderingContext.VALUE_SET_LOINCV)+v+" ("+vd+")");
|
||||
} else {
|
||||
x.tx(context.formatMessage(RenderingContext.VALUE_SET_LOINCV)+v);
|
||||
x.tx(context.formatPhrase(RenderingContext.VALUE_SET_LOINCV)+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()+" "+ context.formatMessage(RenderingContext.VALUE_SET_NO_VERSION)+cr.fhirType()+")");
|
||||
x.ah(cr.getWebPath()).tx(t+" "+cr.present()+" "+ context.formatPhrase(RenderingContext.VALUE_SET_NO_VERSION)+cr.fhirType()+")");
|
||||
} else {
|
||||
x.tx(t+" "+displaySystem(u)+" "+context.formatMessage(RenderingContext.VALUE_SET_NO_VERSION)+cr.fhirType()+")");
|
||||
x.tx(t+" "+displaySystem(u)+" "+context.formatPhrase(RenderingContext.VALUE_SET_NO_VERSION)+cr.fhirType()+")");
|
||||
}
|
||||
} else {
|
||||
x.tx(t+" "+displaySystem(u)+" "+ context.formatMessage(RenderingContext.VALUE_SET_NO_VER));
|
||||
x.tx(t+" "+displaySystem(u)+" "+ context.formatPhrase(RenderingContext.VALUE_SET_NO_VER));
|
||||
}
|
||||
} else {
|
||||
CanonicalResource cr = (CanonicalResource) getContext().getWorker().fetchResource(Resource.class, u+"|"+v, source);
|
||||
|
@ -547,7 +547,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
x.tx(t+" "+displaySystem(u)+" v"+v+" ("+cr.fhirType()+")");
|
||||
}
|
||||
} else {
|
||||
x.tx(t+" "+displaySystem(u)+" "+ context.formatMessage(RenderingContext.VALUE_SET_VERSION)+v);
|
||||
x.tx(t+" "+displaySystem(u)+" "+ context.formatPhrase(RenderingContext.VALUE_SET_VERSION)+v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -619,21 +619,21 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
|
||||
private String describeModule(String module) {
|
||||
if ("900000000000207008".equals(module))
|
||||
return context.formatMessage(RenderingContext.VALUE_SET_INT);
|
||||
return context.formatPhrase(RenderingContext.VALUE_SET_INT);
|
||||
if ("731000124108".equals(module))
|
||||
return context.formatMessage(RenderingContext.VALUE_SET_US);
|
||||
return context.formatPhrase(RenderingContext.VALUE_SET_US);
|
||||
if ("32506021000036107".equals(module))
|
||||
return context.formatMessage(RenderingContext.VALUE_SET_AUS);
|
||||
return context.formatPhrase(RenderingContext.VALUE_SET_AUS);
|
||||
if ("449081005".equals(module))
|
||||
return context.formatMessage(RenderingContext.VALUE_SET_SPAN);
|
||||
return context.formatPhrase(RenderingContext.VALUE_SET_SPAN);
|
||||
if ("554471000005108".equals(module))
|
||||
return context.formatMessage(RenderingContext.VALUE_SET_DANISH);
|
||||
return context.formatPhrase(RenderingContext.VALUE_SET_DANISH);
|
||||
if ("11000146104".equals(module))
|
||||
return context.formatMessage(RenderingContext.VALUE_SET_DUTCH);
|
||||
return context.formatPhrase(RenderingContext.VALUE_SET_DUTCH);
|
||||
if ("45991000052106".equals(module))
|
||||
return context.formatMessage(RenderingContext.VALUE_SET_SWEDISH);
|
||||
return context.formatPhrase(RenderingContext.VALUE_SET_SWEDISH);
|
||||
if ("999000041000000102".equals(module))
|
||||
return context.formatMessage(RenderingContext.VALUE_SET_UK);
|
||||
return context.formatPhrase(RenderingContext.VALUE_SET_UK);
|
||||
return module;
|
||||
}
|
||||
|
||||
|
@ -827,7 +827,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (doInactive) {
|
||||
td = tr.td();
|
||||
if (c.getInactive()) {
|
||||
td.tx(context.formatMessage(RenderingContext.VALUE_SET_INACT));
|
||||
td.tx(context.formatPhrase(RenderingContext.VALUE_SET_INACT));
|
||||
}
|
||||
}
|
||||
if (doDefinition) {
|
||||
|
@ -896,7 +896,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
CodeSystem e = getContext().getWorker().fetchCodeSystem(system);
|
||||
if (e == null || (e.getContent() != org.hl7.fhir.r5.model.Enumerations.CodeSystemContentMode.COMPLETE && e.getContent() != org.hl7.fhir.r5.model.Enumerations.CodeSystemContentMode.FRAGMENT)) {
|
||||
if (isAbstract)
|
||||
td.i().setAttribute("title", context.formatMessage(RenderingI18nContext.VS_ABSTRACT_CODE_HINT)).addText(code);
|
||||
td.i().setAttribute("title", context.formatPhrase(RenderingContext.VS_ABSTRACT_CODE_HINT)).addText(code);
|
||||
else if ("http://snomed.info/sct".equals(system)) {
|
||||
td.ah(sctLink(code)).addText(code);
|
||||
} else if ("http://loinc.org".equals(system)) {
|
||||
|
@ -910,7 +910,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
else
|
||||
href = href + "#"+e.getId()+"-"+Utilities.nmtokenize(code);
|
||||
if (isAbstract)
|
||||
td.ah(href).setAttribute("title", context.formatMessage(RenderingI18nContext.VS_ABSTRACT_CODE_HINT)).i().addText(code);
|
||||
td.ah(href).setAttribute("title", context.formatPhrase(RenderingContext.VS_ABSTRACT_CODE_HINT)).i().addText(code);
|
||||
else
|
||||
td.ah(href).addText(code);
|
||||
}
|
||||
|
@ -959,26 +959,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(context.formatMessage(RenderingContext.VALUE_SET_RULES_INC));
|
||||
p.tx(context.formatPhrase(RenderingContext.VALUE_SET_RULES_INC));
|
||||
XhtmlNode ul = x.ul();
|
||||
for (ConceptSetComponent inc : vs.getCompose().getInclude()) {
|
||||
hasExtensions = genInclude(ul, inc, context.formatMessage(RenderingContext.VALUE_SET_INC), langs, doDesignations, maps, designations, index, vs) || hasExtensions;
|
||||
hasExtensions = genInclude(ul, inc, context.formatPhrase(RenderingContext.VALUE_SET_INC), langs, doDesignations, maps, designations, index, vs) || hasExtensions;
|
||||
index++;
|
||||
}
|
||||
for (Base inc : VersionComparisonAnnotation.getDeleted(vs.getCompose(), "include")) {
|
||||
genInclude(ul, (ConceptSetComponent) inc, context.formatMessage(RenderingContext.VALUE_SET_INC), langs, doDesignations, maps, designations, index, vs);
|
||||
genInclude(ul, (ConceptSetComponent) inc, context.formatPhrase(RenderingContext.VALUE_SET_INC), langs, doDesignations, maps, designations, index, vs);
|
||||
index++;
|
||||
}
|
||||
if (vs.getCompose().hasExclude() || VersionComparisonAnnotation.hasDeleted(vs.getCompose(), "exclude")) {
|
||||
p = x.para();
|
||||
p.tx(context.formatMessage(RenderingContext.VALUE_SET_RULES_EXC));
|
||||
p.tx(context.formatPhrase(RenderingContext.VALUE_SET_RULES_EXC));
|
||||
ul = x.ul();
|
||||
for (ConceptSetComponent exc : vs.getCompose().getExclude()) {
|
||||
hasExtensions = genInclude(ul, exc, context.formatMessage(RenderingContext.VALUE_SET_EXCL), langs, doDesignations, maps, designations, index, vs) || hasExtensions;
|
||||
hasExtensions = genInclude(ul, exc, context.formatPhrase(RenderingContext.VALUE_SET_EXCL), langs, doDesignations, maps, designations, index, vs) || hasExtensions;
|
||||
index++;
|
||||
}
|
||||
for (Base inc : VersionComparisonAnnotation.getDeleted(vs.getCompose(), "exclude")) {
|
||||
genInclude(ul, (ConceptSetComponent) inc, context.formatMessage(RenderingContext.VALUE_SET_EXCL), langs, doDesignations, maps, designations, index, vs);
|
||||
genInclude(ul, (ConceptSetComponent) inc, context.formatPhrase(RenderingContext.VALUE_SET_EXCL), langs, doDesignations, maps, designations, index, vs);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
|
@ -989,15 +989,15 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (!doDesignations && langs.size() + designations.size() > 0) {
|
||||
Collections.sort(langs);
|
||||
if (designations.size() == 0) {
|
||||
x.para().b().tx(context.formatMessage(RenderingContext.VALUE_SET_ADD_LANG));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_ADD_LANG));
|
||||
} else if (langs.size() == 0) {
|
||||
x.para().b().tx(context.formatMessage(RenderingContext.VALUE_SET_DESIG));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_DESIG));
|
||||
} else {
|
||||
x.para().b().tx(context.formatMessage(RenderingContext.VALUE_SET_ADD_DESIG));
|
||||
x.para().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_ADD_DESIG));
|
||||
}
|
||||
XhtmlNode t = x.table("codes");
|
||||
XhtmlNode tr = t.tr();
|
||||
tr.td().b().tx(context.formatMessage(RenderingContext.VALUE_SET_CODE));
|
||||
tr.td().b().tx(context.formatPhrase(RenderingContext.VALUE_SET_CODE));
|
||||
for (String url : designations.keySet()) {
|
||||
tr.td().b().addText(designations.get(url));
|
||||
}
|
||||
|
@ -1016,14 +1016,14 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
|
||||
private void renderExpansionRules(XhtmlNode x, ConceptSetComponent inc, int index, Map<String, ConceptDefinitionComponent> definitions) throws FHIRException, IOException {
|
||||
String s = context.formatMessage(RenderingContext.VALUE_SET_NOT_DEF);
|
||||
String s = context.formatPhrase(RenderingContext.VALUE_SET_NOT_DEF);
|
||||
if (inc.hasExtension(ToolingExtensions.EXT_EXPAND_RULES)) {
|
||||
String rule = inc.getExtensionString(ToolingExtensions.EXT_EXPAND_RULES);
|
||||
if (rule != null) {
|
||||
switch (rule) {
|
||||
case "all-codes": s = context.formatMessage(RenderingContext.VALUE_SET_ALL_CODE);
|
||||
case "ungrouped": s = context.formatMessage(RenderingContext.VALUE_SET_NOT_FOUND);
|
||||
case "groups-only": s = context.formatMessage(RenderingContext.VALUE_SET_CONT_STRUC);
|
||||
case "all-codes": s = context.formatPhrase(RenderingContext.VALUE_SET_ALL_CODE);
|
||||
case "ungrouped": s = context.formatPhrase(RenderingContext.VALUE_SET_NOT_FOUND);
|
||||
case "groups-only": s = context.formatPhrase(RenderingContext.VALUE_SET_CONT_STRUC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1032,8 +1032,8 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
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(), context.formatMessage(RenderingContext.VALUE_SET_CODE), context.formatMessage(RenderingContext.VALUE_SET_CODE_ITEM), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatMessage(RenderingContext.VALUE_SET_DISPLAY), context.formatMessage(RenderingContext.VALUE_SET_DISPLAY_ITEM), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.VALUE_SET_CODE), context.formatPhrase(RenderingContext.VALUE_SET_CODE_ITEM), null, 0));
|
||||
model.getTitles().add(gen.new Title(null, model.getDocoRef(), context.formatPhrase(RenderingContext.VALUE_SET_DISPLAY), context.formatPhrase(RenderingContext.VALUE_SET_DISPLAY_ITEM), null, 0));
|
||||
|
||||
for (Extension ext : inc.getExtensionsByUrl(ToolingExtensions.EXT_EXPAND_GROUP)) {
|
||||
renderExpandGroup(gen, model, ext, inc, definitions);
|
||||
|
@ -1141,9 +1141,9 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
switch (url) {
|
||||
case "http://snomed.info/sct#900000000000003001":
|
||||
return context.formatMessage(RenderingContext.VALUE_SET_SPEC_NAME);
|
||||
return context.formatPhrase(RenderingContext.VALUE_SET_SPEC_NAME);
|
||||
case "http://snomed.info/sct#900000000000013009":
|
||||
return context.formatMessage(RenderingContext.VALUE_SET_SYNONYM);
|
||||
return context.formatPhrase(RenderingContext.VALUE_SET_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;
|
||||
|
@ -1177,14 +1177,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+" "+ context.formatMessage(RenderingContext.VALUE_SET_ALL_CODES_DEF) + " ");
|
||||
li.addText(type+" "+ context.formatPhrase(RenderingContext.VALUE_SET_ALL_CODES_DEF) + " ");
|
||||
addCsRef(inc, li, e);
|
||||
} else {
|
||||
if (inc.getConcept().size() > 0) {
|
||||
li.addText(type+" "+ context.formatMessage(RenderingContext.VALUE_SET_THESE_CODES_DEF) + " ");
|
||||
li.addText(type+" "+ context.formatPhrase(RenderingContext.VALUE_SET_THESE_CODES_DEF) + " ");
|
||||
addCsRef(inc, li, e);
|
||||
if (inc.hasVersion()) {
|
||||
li.addText(" "+ context.formatMessage(RenderingContext.VALUE_SET_VERSION) + " ");
|
||||
li.addText(" "+ context.formatPhrase(RenderingContext.VALUE_SET_VERSION) + " ");
|
||||
li.code(inc.getVersion());
|
||||
}
|
||||
|
||||
|
@ -1211,24 +1211,24 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
}
|
||||
if (inc.getFilter().size() > 0) {
|
||||
li.addText(type+" "+ context.formatMessage(RenderingContext.VALUE_SET_CODES_FROM));
|
||||
li.addText(type+" "+ context.formatPhrase(RenderingContext.VALUE_SET_CODES_FROM));
|
||||
addCsRef(inc, li, e);
|
||||
li.tx(" "+ context.formatMessage(RenderingContext.VALUE_SET_WHERE)+" ");
|
||||
li.tx(" "+ context.formatPhrase(RenderingContext.VALUE_SET_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(" "+ context.formatMessage(RenderingContext.VALUE_SET_AND));
|
||||
li.tx(" "+ context.formatPhrase(RenderingContext.VALUE_SET_AND));
|
||||
} else {
|
||||
li.tx(context.formatMessage(RenderingContext.VALUE_SET_COMMA)+" ");
|
||||
li.tx(context.formatPhrase(RenderingContext.VALUE_SET_COMMA)+" ");
|
||||
}
|
||||
}
|
||||
XhtmlNode wli = renderStatus(f, li);
|
||||
if (f.getOp() == FilterOperator.EXISTS) {
|
||||
if (f.getValue().equals("true")) {
|
||||
wli.tx(f.getProperty()+" "+ context.formatMessage(RenderingContext.VALUE_SET_EXISTS));
|
||||
wli.tx(f.getProperty()+" "+ context.formatPhrase(RenderingContext.VALUE_SET_EXISTS));
|
||||
} else {
|
||||
wli.tx(f.getProperty()+" "+ context.formatMessage(RenderingContext.VALUE_SET_DOESNT_EXIST));
|
||||
wli.tx(f.getProperty()+" "+ context.formatPhrase(RenderingContext.VALUE_SET_DOESNT_EXIST));
|
||||
}
|
||||
} else {
|
||||
wli.tx(f.getProperty()+" "+describe(f.getOp())+" ");
|
||||
|
@ -1256,7 +1256,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
}
|
||||
}
|
||||
if (inc.hasValueSet()) {
|
||||
li.tx(context.formatMessage(RenderingContext.VALUE_SET_WHERE_CODES)+" ");
|
||||
li.tx(context.formatPhrase(RenderingContext.VALUE_SET_WHERE_CODES)+" ");
|
||||
boolean first = true;
|
||||
for (UriType vs : inc.getValueSet()) {
|
||||
if (first)
|
||||
|
@ -1327,7 +1327,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
if (hasComments) {
|
||||
td = tr.td();
|
||||
if (ExtensionHelper.hasExtension(c, ToolingExtensions.EXT_VS_COMMENT)) {
|
||||
smartAddText(td, context.formatMessage(RenderingContext.VALUE_SET_NOTE, ToolingExtensions.readStringExtension(c, ToolingExtensions.EXT_VS_COMMENT)+" "));
|
||||
smartAddText(td, context.formatPhrase(RenderingContext.VALUE_SET_NOTE, ToolingExtensions.readStringExtension(c, ToolingExtensions.EXT_VS_COMMENT)+" "));
|
||||
}
|
||||
}
|
||||
if (doDesignations) {
|
||||
|
@ -1408,7 +1408,7 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
ValueSetExpansionOutcome vso = getContext().getWorker().expandVS(vs, true, false);
|
||||
ValueSet valueset = vso.getValueset();
|
||||
if (valueset == null)
|
||||
throw new TerminologyServiceException(context.formatMessage(RenderingContext.VALUE_SET_ERROR, vso.getError()+" "));
|
||||
throw new TerminologyServiceException(context.formatPhrase(RenderingContext.VALUE_SET_ERROR, vso.getError()+" "));
|
||||
vse = valueset.getExpansion();
|
||||
|
||||
} catch (Exception e1) {
|
||||
|
@ -1505,18 +1505,18 @@ public class ValueSetRenderer extends TerminologyRenderer {
|
|||
|
||||
private String describe(FilterOperator op) {
|
||||
if (op == null)
|
||||
return " "+ context.formatMessage(RenderingContext.VALUE_SET_NULL);
|
||||
return " "+ context.formatPhrase(RenderingContext.VALUE_SET_NULL);
|
||||
switch (op) {
|
||||
case EQUAL: return " "+ context.formatMessage(RenderingContext.VALUE_SET_EQUAL);
|
||||
case ISA: return " "+ context.formatMessage(RenderingContext.VALUE_SET_ISA);
|
||||
case ISNOTA: return " "+ context.formatMessage(RenderingContext.VALUE_SET_ISNOTA);
|
||||
case REGEX: return " "+ context.formatMessage(RenderingContext.VALUE_SET_REGEX);
|
||||
case NULL: return " "+ context.formatMessage(RenderingContext.VALUE_SET_NULLS);
|
||||
case IN: return " "+ context.formatMessage(RenderingContext.VALUE_SET_IN);
|
||||
case NOTIN: return " "+ context.formatMessage(RenderingContext.VALUE_SET_NOTIN);
|
||||
case DESCENDENTOF: return " "+ context.formatMessage(RenderingContext.VALUE_SET_DESCENDENTOF);
|
||||
case EXISTS: return " "+ context.formatMessage(RenderingContext.VALUE_SET_EXISTS);
|
||||
case GENERALIZES: return " "+ context.formatMessage(RenderingContext.VALUE_SET_GENERALIZES);
|
||||
case EQUAL: return " "+ context.formatPhrase(RenderingContext.VALUE_SET_EQUAL);
|
||||
case ISA: return " "+ context.formatPhrase(RenderingContext.VALUE_SET_ISA);
|
||||
case ISNOTA: return " "+ context.formatPhrase(RenderingContext.VALUE_SET_ISNOTA);
|
||||
case REGEX: return " "+ context.formatPhrase(RenderingContext.VALUE_SET_REGEX);
|
||||
case NULL: return " "+ context.formatPhrase(RenderingContext.VALUE_SET_NULLS);
|
||||
case IN: return " "+ context.formatPhrase(RenderingContext.VALUE_SET_IN);
|
||||
case NOTIN: return " "+ context.formatPhrase(RenderingContext.VALUE_SET_NOTIN);
|
||||
case DESCENDENTOF: return " "+ context.formatPhrase(RenderingContext.VALUE_SET_DESCENDENTOF);
|
||||
case EXISTS: return " "+ context.formatPhrase(RenderingContext.VALUE_SET_EXISTS);
|
||||
case GENERALIZES: return " "+ context.formatPhrase(RenderingContext.VALUE_SET_GENERALIZES);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -1061,15 +1061,22 @@ public class RenderingI18nContext extends I18nBase {
|
|||
public static final String TERM_REND_COPY = "TERM_REND_COPY";
|
||||
public static final String TEST_PLAN_CASE = "TEST_PLAN_CASE";
|
||||
public static final String TEST_PLAN_CASE_SEQ = "TEST_PLAN_CASE_SEQ";
|
||||
|
||||
|
||||
protected String getMessagesSourceFileName() {
|
||||
return "rendering-phrases";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
protected String typeOfString() {
|
||||
return "phrase";
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String formatPhrase(String theMessage, Object... theMessageArguments) {
|
||||
return formatMessage(theMessage, theMessageArguments);
|
||||
}
|
||||
|
||||
public String formatPhrasePlural(Integer plural, String theMessage, Object... theMessageArguments) {
|
||||
return formatMessagePlural(plural, theMessage, theMessageArguments);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -671,11 +671,11 @@ public class HierarchicalTableGenerator {
|
|||
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(), 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));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_HEAD_NAME), i18n.formatPhrase(RenderingI18nContext.SD_HEAD_NAME_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_HEAD_FLAGS), i18n.formatPhrase(RenderingI18nContext.SD_HEAD_FLAGS_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_HEAD_CARD), i18n.formatPhrase(RenderingI18nContext.SD_HEAD_CARD_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_HEAD_TYPE), i18n.formatPhrase(RenderingI18nContext.SD_HEAD_TYPE_DESC), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_HEAD_DESC), i18n.formatPhrase(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));
|
||||
}
|
||||
|
@ -692,16 +692,16 @@ public class HierarchicalTableGenerator {
|
|||
model.setDocoImg(Utilities.pathURL(prefix, "help16.png"));
|
||||
}
|
||||
model.setDocoRef(Utilities.pathURL(prefix, "formats.html#table"));
|
||||
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));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_NAME), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_NAME_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_FLAGS_L), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_FLAGS_L_DESC), null, 0).setStyle("border-left: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_CARD_L), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_CARD_L_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_TYPE_L), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_TYPE_L_DESC), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_DESC_L), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_DESC_L_DESC), null, 0).setStyle("border-right: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_FLAGS_R), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_FLAGS_R_DESC), null, 0).setStyle("border-left: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_CARD_R), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_CARD_R_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_TYPE_R), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_TYPE_R_DESC), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_DESC_R), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_DESC_R_DESC), null, 0).setStyle("border-right: 1px grey solid"));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_COMP), i18n.formatPhrase(RenderingI18nContext.SD_COMP_HEAD_COMP_DESC), null, 0));
|
||||
return model;
|
||||
}
|
||||
|
||||
|
@ -709,10 +709,10 @@ public class HierarchicalTableGenerator {
|
|||
|
||||
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(), i18n.formatPhrase(RenderingI18nContext.SD_GRID_HEAD_NAME), i18n.formatPhrase(RenderingI18nContext.SD_GRID_HEAD_NAME_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_GRID_HEAD_CARD), i18n.formatPhrase(RenderingI18nContext.SD_GRID_HEAD_CARD_DESC), null, 0));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_GRID_HEAD_TYPE), i18n.formatPhrase(RenderingI18nContext.SD_GRID_HEAD_TYPE_DESC), null, 100));
|
||||
model.getTitles().add(new Title(null, model.getDocoRef(), i18n.formatPhrase(RenderingI18nContext.SD_GRID_HEAD_DESC), i18n.formatPhrase(RenderingI18nContext.SD_GRID_HEAD_DESC_DESC), null, 0));
|
||||
|
||||
return model;
|
||||
}
|
||||
|
@ -755,10 +755,10 @@ public class HierarchicalTableGenerator {
|
|||
tc.setAttribute("class", "hierarchy");
|
||||
tc.setAttribute("colspan", Integer.toString(model.getTitles().size()));
|
||||
tc.addTag("br");
|
||||
XhtmlNode a = tc.addTag("a").setAttribute("title", i18n.formatMessage(RenderingI18nContext.SD_LEGEND)).setAttribute("href", model.getDocoRef());
|
||||
XhtmlNode a = tc.addTag("a").setAttribute("title", i18n.formatPhrase(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(" "+i18n.formatMessage(RenderingI18nContext.SD_DOCO));
|
||||
a.addText(" "+i18n.formatPhrase(RenderingI18nContext.SD_DOCO));
|
||||
}
|
||||
return table;
|
||||
}
|
||||
|
|
|
@ -909,7 +909,7 @@ CAPABILITY_SUPP_PROFS = Supported Profiles
|
|||
CAPABILITY_EXT_OP = Extended Operations
|
||||
CAPABILITY_INT_SUMM = Interaction summary
|
||||
CAPABILITY_SEARCH_PARS = Search Parameters
|
||||
CAPABILITY_COMB_SEARCH_PARS = Combined Search Parameters
|
||||
CAPABILITY_COMB_SEARCH_PAR = Combined Search Parameters
|
||||
CODE_SYS_IN_A_HIERARCHY = in a {0} hierarchy
|
||||
CODE_SYS_REPLACED_BY = (replaced by
|
||||
DATA_REND_ONGOING = (ongoing)
|
||||
|
|
|
@ -13,6 +13,7 @@ import org.hl7.fhir.r5.model.Resource;
|
|||
import org.hl7.fhir.r5.model.StructureDefinition;
|
||||
import org.hl7.fhir.r5.utils.EOperationOutcome;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.validation.ValidationEngine;
|
||||
import org.hl7.fhir.validation.cli.utils.Params;
|
||||
|
||||
|
@ -60,7 +61,7 @@ public class ComparisonService {
|
|||
|
||||
public static void compareStructureDefinitions(String dest, ValidationEngine validator, String left, String right, StructureDefinition resLeft, StructureDefinition resRight) throws IOException, FHIRException, EOperationOutcome {
|
||||
System.out.println("Comparing StructureDefinitions " + left + " to " + right);
|
||||
ComparisonSession session = new ComparisonSession(validator.getContext(), validator.getContext(), "Comparing Profiles", null, null);
|
||||
ComparisonSession session = new ComparisonSession(new RenderingI18nContext(), validator.getContext(), validator.getContext(), "Comparing Profiles", null, null);
|
||||
session.compare(resLeft, resRight);
|
||||
|
||||
System.out.println("Generating output to " + dest + "...");
|
||||
|
|
|
@ -65,6 +65,7 @@ import org.hl7.fhir.utilities.TextFile;
|
|||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.VersionUtilities;
|
||||
import org.hl7.fhir.utilities.filesystem.ManagedFileAccess;
|
||||
import org.hl7.fhir.utilities.i18n.RenderingI18nContext;
|
||||
import org.hl7.fhir.utilities.json.model.*;
|
||||
import org.hl7.fhir.utilities.npm.CommonPackages;
|
||||
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
|
||||
|
@ -155,7 +156,7 @@ public class ComparisonTests {
|
|||
prefix = loadResource("html-prefix.html");
|
||||
suffix = loadResource("html-suffix.html");
|
||||
|
||||
ComparisonSession session = new ComparisonSession(context, context, "Comparison Tests", null, null);
|
||||
ComparisonSession session = new ComparisonSession(new RenderingI18nContext(), context, context, "Comparison Tests", null, null);
|
||||
if (content.has("version")) {
|
||||
session.setAnnotate(true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue