Skip to content

#14045 - Add exclusion for specific diseases in immunization management#14073

Open
raulbob wants to merge 1 commit into
developmentfrom
bugfix-14045-shigellosis_immunization_hidden
Open

#14045 - Add exclusion for specific diseases in immunization management#14073
raulbob wants to merge 1 commit into
developmentfrom
bugfix-14045-shigellosis_immunization_hidden

Conversation

@raulbob

@raulbob raulbob commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Fixes #14045

Summary by CodeRabbit

  • Bug Fixes
    • Updated event participant screens so immunization-related panels are hidden for certain excluded diseases.
    • This reduces clutter and prevents immunization actions from appearing where they are not applicable.

@raulbob raulbob linked an issue Jun 29, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

EventParticipantDataView gains a static IMMUNIZATION_EXCLUDED_DISEASES set containing GIARDIASIS, CRYPTOSPORIDIOSIS, SALMONELLOSIS, and SHIGELLOSIS. The immunization side-panel rendering guard in initView is extended to skip immunization UI when the event's disease is in that set.

Immunization panel disease exclusion

Layer / File(s) Summary
Disease exclusion constant and rendering guard
sormas-ui/.../events/EventParticipantDataView.java
Adds Arrays, HashSet, Set, and Disease imports; defines IMMUNIZATION_EXCLUDED_DISEASES with four diseases; extends the initView condition with !IMMUNIZATION_EXCLUDED_DISEASES.contains(event.getDisease()) to suppress immunization UI for those diseases.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Suggested reviewers

  • roldy
  • KarnaiahPesula

🐇 Four diseases, one tidy set,
No immunization panel — that's the bet!
Shigellosis hides away,
Salmonellosis has no say,
The rabbit hops on, all conditions met! 🌿

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR also excludes Giardiasis, Cryptosporidiosis, and Salmonellosis, which are not requested in issue #14045. Limit the exclusion to Shigellosis unless the extra diseases are justified by the issue or another linked requirement.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the immunization exclusion change.
Description check ✅ Passed The description follows the template by referencing the linked issue number.
Linked Issues check ✅ Passed The change hides immunization for Shigellosis, matching the linked issue requirement.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix-14045-shigellosis_immunization_hidden

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java`:
- Around line 178-180: The immunization visibility guard was added in
EventParticipantDataView, but the reported issue is in the case UI, so update
the equivalent check in the case data view instead. Find the corresponding
immunization panel logic in the case screen (around the case DTO/view handling)
and apply the same UiUtil.permitted, disease-null, and
IMMUNIZATION_EXCLUDED_DISEASES guard there so Shigellosis cases hide the panel
as intended.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d7a13c8d-fdff-426d-ace5-ec8223cef59e

📥 Commits

Reviewing files that changed from the base of the PR and between 5e5e8a1 and b067ecf.

📒 Files selected for processing (1)
  • sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java

Comment on lines +178 to +180
if (UiUtil.permitted(FeatureType.IMMUNIZATION_MANAGEMENT, UserRight.IMMUNIZATION_VIEW)
&& event.getDisease() != null
&& !IMMUNIZATION_EXCLUDED_DISEASES.contains(event.getDisease())) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

This change targets the wrong screen for issue #14045.

EventParticipantDataView only affects event participants (EventParticipantDto/EventDto), but the linked bug is about hiding immunization in the case view for Shigellosis. Unless the equivalent guard was also added to the case data view, the reported UI will still show the panel there.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java`
around lines 178 - 180, The immunization visibility guard was added in
EventParticipantDataView, but the reported issue is in the case UI, so update
the equivalent check in the case data view instead. Find the corresponding
immunization panel logic in the case screen (around the case DTO/view handling)
and apply the same UiUtil.permitted, disease-null, and
IMMUNIZATION_EXCLUDED_DISEASES guard there so Shigellosis cases hide the panel
as intended.

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 this pull request may close these issues.

Shigellosis - Case Immunization should be hidden

1 participant