fix for rendering bundles on ElementModels
This commit is contained in:
parent
8a6b797c92
commit
0cf371c657
|
@ -6485,5 +6485,9 @@ public class ProfileUtilities extends TranslatingUtilities {
|
||||||
public static boolean isMustSupport(CanonicalType profile) {
|
public static boolean isMustSupport(CanonicalType profile) {
|
||||||
return "true".equals(ToolingExtensions.readStringExtension(profile, ToolingExtensions.EXT_MUST_SUPPORT));
|
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 subject resource Narrative
|
||||||
// * The Composition resource Narrative
|
// * The Composition resource Narrative
|
||||||
// * The section.text Narratives
|
// * 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"));
|
ResourceWrapper subject = resolveReference(entries, comp.get("subject"));
|
||||||
if (subject != null) {
|
if (subject != null) {
|
||||||
if (subject.hasNarrative()) {
|
if (subject.hasNarrative()) {
|
||||||
|
@ -175,7 +175,7 @@ public class BundleRenderer extends ResourceRenderer {
|
||||||
if (entry.has("fullUrl")) {
|
if (entry.has("fullUrl")) {
|
||||||
String fu = entry.get("fullUrl").primitiveValue();
|
String fu = entry.get("fullUrl").primitiveValue();
|
||||||
if (ref.equals(fu)) {
|
if (ref.equals(fu)) {
|
||||||
return (ResourceWrapper) entry.getChildByName("resource").getValues().get(0);
|
return (ResourceWrapper) entry.getChildByName("resource").getAsResource();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue