fix for rendering bundles on ElementModels
This commit is contained in:
parent
8a6b797c92
commit
0cf371c657
|
@ -6486,4 +6486,8 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
return "true".equals(ToolingExtensions.readStringExtension(profile, ToolingExtensions.EXT_MUST_SUPPORT));
|
||||
}
|
||||
|
||||
public ElementDefinitionResolution resolveContentRef(StructureDefinition structure, ElementDefinition element) {
|
||||
return getElementById(structure, structure.getSnapshot().getElement(), element.getContentReference());
|
||||
}
|
||||
|
||||
}
|
|
@ -119,7 +119,7 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
// * The subject resource Narrative
|
||||
// * The Composition resource Narrative
|
||||
// * The section.text Narratives
|
||||
ResourceWrapper comp = (ResourceWrapper) entries.get(0).getChildByName("resource").getValues().get(0);
|
||||
ResourceWrapper comp = (ResourceWrapper) entries.get(0).getChildByName("resource").getAsResource();
|
||||
ResourceWrapper subject = resolveReference(entries, comp.get("subject"));
|
||||
if (subject != null) {
|
||||
if (subject.hasNarrative()) {
|
||||
|
@ -175,7 +175,7 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
if (entry.has("fullUrl")) {
|
||||
String fu = entry.get("fullUrl").primitiveValue();
|
||||
if (ref.equals(fu)) {
|
||||
return (ResourceWrapper) entry.getChildByName("resource").getValues().get(0);
|
||||
return (ResourceWrapper) entry.getChildByName("resource").getAsResource();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue