File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
org.hl7.fhir.publisher.core/src/main/java/org/hl7/fhir/igtools/publisher Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -4784,7 +4784,16 @@ private boolean load() throws Exception {
4784
4784
rg.setName(r.getElement().getExtensionValue(ToolingExtensions.EXT_ARTIFACT_NAME).primitiveValue());
4785
4785
} else if (!rg.hasName()) {
4786
4786
if (r.getElement().hasChild("title")) {
4787
- rg.setName(r.getElement().getChildValue("title"));
4787
+ rg.setName(r.getElement().getChildValue("title"));
4788
+ } else if ("Bundle".equals(r.getElement().getName())) {
4789
+ // If the resource is a document Bundle, get the title from the Composition
4790
+ List<Element> entryList = r.getElement().getChildren("entry");
4791
+ if (entryList != null && !entryList.isEmpty()) {
4792
+ Element resource = entryList.get(0).getNamedChild("resource");
4793
+ if (resource != null) {
4794
+ rg.setName(resource.getChildValue("title") + " (Bundle)");
4795
+ }
4796
+ }
4788
4797
}
4789
4798
}
4790
4799
if (r.getElement().hasExtension(ToolingExtensions.EXT_RESOURCE_DESC)) {
You can’t perform that action at this time.
0 commit comments