Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thymeleaf problems with HAPIFHIR 6.6.1 #28

Closed
bdc-ehealth opened this issue Jun 27, 2023 · 1 comment · Fixed by #29
Closed

Thymeleaf problems with HAPIFHIR 6.6.1 #28

bdc-ehealth opened this issue Jun 27, 2023 · 1 comment · Fixed by #29

Comments

@bdc-ehealth
Copy link
Collaborator

Bart Decuypere: Hi, we are implementing automatic narrative generation, and after an upgrade from 6.2.5 to a later version (6.4.4 and also 6.6.1), we see that the automatic narrative generation is no longer functioning for R4. (https://hapifhir.io/hapi-fhir/docs/model/narrative_generation.html)

This line, which should be generating the narrative, is only returning an empty Narrative: https://github.com/hapifhir/org.hl7.fhir.core/blob/ff44e50fc3d66b6c795aa8f2802efd0384265575/org.hl7.fhir.r4/src/main/java/org/hl7/fhir/r4/model/DomainResource.java#L99

We have set our narrative generator on the context, as indicated on (https://hapifhir.io/hapi-fhir/docs/model/narrative_generation.html)

Bart Decuypere: If you need more information from me to be able to help me, please say so! Additional info can be found here: https://chat.fhir.org/#narrow/stream/179167-hapi/topic/upgrade.20hapi-fhir-base.20trouble

Bart Decuypere: I further debugged this issue, and the problem is here:
https://github.com/hapifhir/hapi-fhir/blob/73d6997d214c23f54c2acf66bd6bbd54092609e2/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative2/NarrativeTemplateManifest.java#L269

It is no longer possible to assign a template to a resource only, if that resource has a profile assigned to it. The code should be changed to:

.filter(t -> theProfiles.isEmpty() || t.getAppliesToProfiles().isEmpty() || t.getAppliesToProfiles().stream().anyMatch(theProfiles::contains))
In that way, if the properties file does not contain a profile, and the resource does, the template will still apply for the resource. This is the intended behaviour, I think.

Bart Decuypere: And the bug was introduced by @james Agnew on Jan 24 of this year: hapifhir/hapi-fhir#4438 .

@bdc-ehealth
Copy link
Collaborator Author

As a workaround, I updated narrative.properties, but the functionality is not completely identical: see remark above.

@bdc-ehealth bdc-ehealth linked a pull request Jun 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant