fix rendering of contained resources in Kindling
This commit is contained in:
parent
a058d0ee4d
commit
c221488463
|
@ -833,19 +833,12 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
|
||||||
if ("DomainResource.contained".equals(child.getBase().getPath())) {
|
if ("DomainResource.contained".equals(child.getBase().getPath())) {
|
||||||
if (round2) {
|
if (round2) {
|
||||||
for (BaseWrapper v : p.getValues()) {
|
for (BaseWrapper v : p.getValues()) {
|
||||||
if (v.getBase() != null && !RendererFactory.hasSpecificRenderer(v.fhirType())) {
|
if (v.getResource() != null && !RendererFactory.hasSpecificRenderer(v.fhirType())) {
|
||||||
x.hr();
|
x.hr();
|
||||||
RenderingContext ctxt = context.copy();
|
RenderingContext ctxt = context.copy();
|
||||||
ctxt.setContained(true);
|
ctxt.setContained(true);
|
||||||
ResourceRenderer rnd = RendererFactory.factory(v.fhirType(), ctxt);
|
ResourceRenderer rnd = RendererFactory.factory(v.fhirType(), ctxt);
|
||||||
ResourceWrapper rw = null;
|
ResourceWrapper rw = v.getResource();
|
||||||
if (v.getBase() instanceof org.hl7.fhir.r5.elementmodel.Element) {
|
|
||||||
rw = new ElementWrappers.ResourceWrapperMetaElement(ctxt, (org.hl7.fhir.r5.elementmodel.Element) v.getBase());
|
|
||||||
} else if (v.getBase() instanceof Resource){
|
|
||||||
rw = new DirectWrappers.ResourceWrapperDirect(ctxt, (Resource) v.getBase());
|
|
||||||
} else {
|
|
||||||
throw new FHIRException("Not handled: base = "+v.getBase().getClass().getName());
|
|
||||||
}
|
|
||||||
rnd.render(x.blockquote(), rw);
|
rnd.render(x.blockquote(), rw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue