HL7 / fhir-ig-publisher

Source code for the IG publisher
Apache License 2.0
68 stars 56 forks source link

PractitionerCommunicationComponent not handled - should not be here #690

Closed qligier closed 1 year ago

qligier commented 1 year ago

When running the IG Publisher on a project, I got the following error:

onGenerate:
Template Done                                                                    (00:24.486)
Error Generating Narrative for Practitioner/TestPractitioner: type org.hl7.fhir.r5.model.Practitioner$PractitionerCommunicationComponent not handled - should not be here
org.apache.commons.lang3.NotImplementedException: type org.hl7.fhir.r5.model.Practitioner$PractitionerCommunicationComponent not handled - should not be here
        at org.hl7.fhir.r5.renderers.ProfileDrivenRenderer.renderLeaf(ProfileDrivenRenderer.java:494)
        at org.hl7.fhir.r5.renderers.ProfileDrivenRenderer.generateElementByProfile(ProfileDrivenRenderer.java:846)
        at org.hl7.fhir.r5.renderers.ProfileDrivenRenderer.generateForProperty(ProfileDrivenRenderer.java:790)
        at org.hl7.fhir.r5.renderers.ProfileDrivenRenderer.generateByProfile(ProfileDrivenRenderer.java:771)
        at org.hl7.fhir.r5.renderers.ProfileDrivenRenderer.render(ProfileDrivenRenderer.java:129)
        at org.hl7.fhir.r5.renderers.ProfileDrivenRenderer.render(ProfileDrivenRenderer.java:100)
        at org.hl7.fhir.r5.renderers.ResourceRenderer.build(ResourceRenderer.java:72)
        at org.hl7.fhir.r5.renderers.BundleRenderer.render(BundleRenderer.java:343)
        at org.hl7.fhir.igtools.publisher.Publisher.getXhtml(Publisher.java:10774)
        at org.hl7.fhir.igtools.publisher.Publisher.saveDirectResourceOutputs(Publisher.java:10046)
        at org.hl7.fhir.igtools.publisher.Publisher.generateHtmlOutputs(Publisher.java:9311)
        at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:6834)
        at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:1116)
        at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:929)
        at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:11388)

I use the IG Publisher v1.3.11 and SUSHI v2.10.2. Here is a simple project that reproduces the error: https://github.com/ahdis/ch-ig/tree/shouldnotbethere (branch shouldnotbethere).

The reproduction case simply is:

Instance: TestPractitioner
InstanceOf: Practitioner
Title: "Test Practitioner"
* id = "TestPractitioner"
* communication[+].coding = #en

Instance: TestBundle
InstanceOf: Bundle
Title: "TestBundle"
* type = #searchset
* id = "TestBundle"
* entry[+].resource = TestPractitioner

For some reason, generating the narrative of the practitioner does not work, but only when it is inserted in the bundle.

grahamegrieve commented 1 year ago

see #698 - same issue.