hl7ch / ch-emed

FHIR Implementation Guide which defines the documents for the exchange of medication information in the context of the Swiss EPR
https://fhir.ch/ig/ch-emed/index.html
MIT License
1 stars 1 forks source link

Build issue (Michaela Ziegler, ahdis ag) #286

Closed ziegm closed 3 months ago

ziegm commented 3 months ago
Generate HTML Outputs
Exception in thread "main" java.lang.Error: Duplicated element 'author' @ 'Bundle.entry[0].resource'

@qligier you already had a look into that, right?

As workaround, I commented out the second author in 2-5-Composition.

qligier commented 3 months ago

I took a look at it some time ago, the bug is here: https://github.com/hapifhir/org.hl7.fhir.core/blob/master/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/renderers/BundleRenderer.java#L162

comp.child("author") should be comp.children("author"), but the renderDataType method won't accept a list of resources. Maybe something like:

for (final ResourceWrapper author : comp.children("author")) {
    renderDataType(status, p.param("author"), author);
}

could work, but I don't really have time to test it. Is there an open issue/a Zulip discussion on this already?

ziegm commented 3 months ago

@qligier could not find anything on zulip. can i assign you for the issue (does not hurry at all)?

qligier commented 3 months ago

It was fixed: https://github.com/hapifhir/org.hl7.fhir.core/pull/1712/files

ziegm commented 3 months ago

Yeah, works again: https://build.fhir.org/ig/hl7ch/ch-emed/branches/master/build.log

Thanks for having a look into it @qligier