r4b changes for r5
This commit is contained in:
parent
ba2ff9390d
commit
84cb59683c
|
@ -103,14 +103,19 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean render(XhtmlNode x, ResourceWrapper r) throws FHIRFormatError, DefinitionException, IOException {
|
public boolean render(XhtmlNode x, ResourceWrapper r) throws FHIRFormatError, DefinitionException, IOException {
|
||||||
|
boolean idDone = false;
|
||||||
|
XhtmlNode p = x.para();
|
||||||
if (context.isAddGeneratedNarrativeHeader()) {
|
if (context.isAddGeneratedNarrativeHeader()) {
|
||||||
x.para().b().tx("Generated Narrative: "+r.fhirType());
|
p.b().tx("Generated Narrative: "+r.fhirType());
|
||||||
}
|
p.an(r.getId());
|
||||||
if (!Utilities.noString(r.getId())) {
|
idDone = true;
|
||||||
x.an(r.getId());
|
|
||||||
}
|
}
|
||||||
if (context.isTechnicalMode() && !context.isContained()) {
|
if (context.isTechnicalMode() && !context.isContained()) {
|
||||||
renderResourceHeader(r, x);
|
renderResourceHeader(r, x, !idDone);
|
||||||
|
idDone = true;
|
||||||
|
}
|
||||||
|
if (!Utilities.noString(r.getId()) && !idDone) {
|
||||||
|
x.para().an(r.getId());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
StructureDefinition sd = r.getDefinition();
|
StructureDefinition sd = r.getDefinition();
|
||||||
|
|
|
@ -397,12 +397,16 @@ public abstract class ResourceRenderer extends DataRenderer {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderResourceHeader(ResourceWrapper r, XhtmlNode x) throws UnsupportedEncodingException, FHIRException, IOException {
|
protected void renderResourceHeader(ResourceWrapper r, XhtmlNode x, boolean doId) throws UnsupportedEncodingException, FHIRException, IOException {
|
||||||
XhtmlNode div = x.div().style("display: inline-block").style("background-color: #d9e0e7").style("padding: 6px")
|
XhtmlNode div = x.div().style("display: inline-block").style("background-color: #d9e0e7").style("padding: 6px")
|
||||||
.style("margin: 4px").style("border: 1px solid #8da1b4")
|
.style("margin: 4px").style("border: 1px solid #8da1b4")
|
||||||
.style("border-radius: 5px").style("line-height: 60%");
|
.style("border-radius: 5px").style("line-height: 60%");
|
||||||
|
|
||||||
String id = getPrimitiveValue(r, "id");
|
String id = getPrimitiveValue(r, "id");
|
||||||
|
if (doId) {
|
||||||
|
div.an(id);
|
||||||
|
}
|
||||||
|
|
||||||
String lang = getPrimitiveValue(r, "language");
|
String lang = getPrimitiveValue(r, "language");
|
||||||
String ir = getPrimitiveValue(r, "implicitRules");
|
String ir = getPrimitiveValue(r, "implicitRules");
|
||||||
BaseWrapper meta = r.getChildByName("meta").hasValues() ? r.getChildByName("meta").getValues().get(0) : null;
|
BaseWrapper meta = r.getChildByName("meta").hasValues() ? r.getChildByName("meta").getValues().get(0) : null;
|
||||||
|
|
Loading…
Reference in New Issue