Fix: dhirSubmission.jsp compilation error after AbstractFhirMessageBuilder relocation#2481
Fix: dhirSubmission.jsp compilation error after AbstractFhirMessageBuilder relocation#2481LiamStanziani wants to merge 1 commit into
Conversation
…le being moved into a different folder
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA single import statement in ChangesFHIR Builder Package Correction
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideFixes JSP compilation by updating dhirSubmission.jsp to import the relocated DSTU3-specific AbstractFhirMessageBuilder class from its new package path, preserving previous FHIR-version behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
There was a problem hiding this comment.
Code Review
This pull request updates the import path for AbstractFhirMessageBuilder in dhirSubmission.jsp to reference the dstu3 package instead of the generic fhir.builder package. No review comments were provided, so there is no feedback to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Summary
oscarPrevention/dhirSubmission.jspfails to compile because it importsAbstractFhirMessageBuilderfrom a package that no longer exists. The FHIRlibraries refactor (OpenOSP PR
#224, reacheddevelopvia the upstream sync PR #2479)split that single class into version-specific
dstu3andr4variants andremoved the old path. This one-line fix repoints the import at the dstu3
variant — the version this JSP's import previously resolved to — restoring the
page to its prior state and unblocking compilation.
Problem
The JSP imports the builder from its old, now-deleted location:
The package
ca.openosp.openo.integration.fhir.builderno longer exists. As partof the FHIR-libraries refactor,
AbstractFhirMessageBuilderwas forked into twoversion-pinned variants:
ca.openosp.openo.integration.fhir.dstu3.builder.AbstractFhirMessageBuilder(
FhirContext.forDstu3())ca.openosp.openo.integration.fhir.r4.builder.AbstractFhirMessageBuilder(
FhirContext.forR4())Because the import target is gone, the JSP no longer compiles. The class is used
on the page (line ~333), where it serializes the FHIR bundle:
String theString = AbstractFhirMessageBuilder.getFhirContext() .newJsonParser().setPrettyPrint(true).encodeResourceToString(bundle);Solution
Repoint the import at the dstu3 sub-package — the variant this JSP's import
resolved to before the file moved (the original pre-split builder was bound to
FhirContext.forDstu3()):This is the minimal, behavior-preserving change: it restores the page to the
state it was in before the file was relocated, without altering FHIR-version
semantics. The page (and the wider DHIR feature) ships disabled by default
(
dhir.enabled=false), so this is a low-risk fix to unblock JSP compilation.Verification
ca.openosp.openo.integration.fhir.builderno longerexists on disk.
FhirContext.forDstu3(),so the dstu3 variant is the faithful continuation of this import.
getFhirContext()is apublic staticmethod on the dstu3 builder,so the usage resolves and compiles.
src/still references the old package path.make jspcto confirm the JSP compiles cleanly.Note for future DHIR work
While tracing this, I noticed that other parts of the DHIR path appear to be on
r4 — e.g. the producer that fills the
bundlessession attribute(
prevention/pageUtil/AddPrevention2Action) and theintegration/dhir/*backendnow reference
org.hl7.fhir.r4.model.*, whereas this JSP is dstu3. We have notfully traced why this page was left on dstu3, and there may be an intentional
reason we're missing, so this PR deliberately does not change it — it only
restores the page to its previous (dstu3) state to fix the build.
Flagging it so it can be looked at properly whenever DHIR is next worked on: it
would be worth confirming whether this consumer should be aligned to r4 to match
the producer, and validating an actual DHIR submission end-to-end.
For reference, the upstream OscarPro version of this page resolves these imports
to the r4 variants, which may be a useful comparison point for that future
investigation:
https://bitbucket.org/oscaremr/oscarpro/src/master/src/main/webapp/oscarPrevention/dhirSubmission.jsp
Files changed
src/main/webapp/oscarPrevention/dhirSubmission.jsp— 1 line (import path).Summary by Sourcery
Bug Fixes:
Summary by CodeRabbit