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 (round2) {
|
||||
for (BaseWrapper v : p.getValues()) {
|
||||
if (v.getBase() != null && !RendererFactory.hasSpecificRenderer(v.fhirType())) {
|
||||
if (v.getResource() != null && !RendererFactory.hasSpecificRenderer(v.fhirType())) {
|
||||
x.hr();
|
||||
RenderingContext ctxt = context.copy();
|
||||
ctxt.setContained(true);
|
||||
ResourceRenderer rnd = RendererFactory.factory(v.fhirType(), ctxt);
|
||||
ResourceWrapper rw = null;
|
||||
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());
|
||||
}
|
||||
ResourceWrapper rw = v.getResource();
|
||||
rnd.render(x.blockquote(), rw);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue