Skip to content

Feature 14233 mumps samples and pathogen test form changes - #14260

Merged
KarnaiahPesula merged 7 commits into
developmentfrom
feature-14233-mumps-samples-and-pathogen-test-form-changes
Jul 31, 2026
Merged

Feature 14233 mumps samples and pathogen test form changes#14260
KarnaiahPesula merged 7 commits into
developmentfrom
feature-14233-mumps-samples-and-pathogen-test-form-changes

Conversation

@KarnaiahPesula

@KarnaiahPesula KarnaiahPesula commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #

Summary by CodeRabbit

  • New Features
    • Added Mumps-specific sample testing, including genotype options and sequence ID capture.
    • Added seroconversion tracking for positive antibody tests.
    • Added Mumps-specific test fields, visibility rules, and automatic result handling.
    • Expanded supported specimen materials and laboratory test types for Mumps.
  • Bug Fixes
    • Improved clearing and visibility of disease-specific testing fields.
    • Corrected display of Mumps genotype information in summaries.
    • Improved field length validation for cluster identifiers.
    • Improved support for Salmonellosis and Dengue specimen materials.

…gen-test-form-changes

# Conflicts:
#	sormas-api/src/main/java/de/symeda/sormas/api/Disease.java
#	sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java
#	sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java
#	sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java
#	sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java
…s-and-pathogen-test-form-changes

# Conflicts:
#	sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java
#	sormas-backend/src/main/resources/sql/sormas_schema.sql
#	sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 402cd513-2e0f-447e-962a-d81ef65ff68d

📥 Commits

Reviewing files that changed from the base of the PR and between 1200cc2 and 8a16144.

📒 Files selected for processing (2)
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/components/AdditionalTestInfoComponent.java
🚧 Files skipped from review as they are similar to previous changes (2)
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/components/AdditionalTestInfoComponent.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java

📝 Walkthrough

Walkthrough

The PR adds Mumps genotype and pathogen-test support. It updates API contracts, disease applicability, database persistence, DTO conversion, and pathogen-test UI behavior. It also adds seroconversion handling and adjusts related visibility logic.

Changes

Mumps pathogen-test support

Layer / File(s) Summary
Mumps sample and test contracts
sormas-api/src/main/java/de/symeda/sormas/api/sample/GenoType.java, PathogenTestDto.java, PathogenTestType.java, SampleMaterial.java
Adds twelve Mumps genotype constants, sequencing and seroconversion DTO fields, and Mumps applicability to pathogen test types and sample materials.
Pathogen-test persistence and migration
sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTest.java, PathogenTestFacadeEjb.java, sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java, sormas-backend/src/main/resources/sql/sormas_schema.sql
Persists the new pathogen-test fields, adds schema version 658, backfills seroconversion values, and constrains cluster identifiers.
Mumps pathogen-test UI flow
sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/*, sormas-ui/src/main/java/de/symeda/sormas/ui/samples/components/*, sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java, sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java, sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/sidecomponent/SideComponentField.java
Adds the Mumps disease section, genotype and sequence ID fields, reference-laboratory behavior, seroconversion controls, and Mumps side-component display handling.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: raulbob

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains only the template and leaves the required issue reference unresolved as "Fixes #". Add the related issue number after "Fixes #" and provide a concise summary of the implemented changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Mumps sample and pathogen test form changes and includes the related feature number.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 feature-14233-mumps-samples-and-pathogen-test-form-changes

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/AbstractDiseaseSectionComponent.java (1)

129-139: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Guard the field clear with the visibility flag.

setVisibleClear clears every HasValue component unconditionally, even when isVisible is true. The method name and the AbstractEditForm.setVisibleClear(boolean, String...) sibling both imply that the clear happens only when hiding a field.

Today's call sites in MumpsSectionComponent and ShigellosisSectionComponent always pass false, so the current behavior is not user-visible. This method is a shared base-class utility for all disease sections, though. A future call with isVisible == true will silently clear field values while making them visible.

🐛 Proposed fix
 	public void setVisibleClear(boolean isVisible, AbstractComponent... components) {
 		if (components == null) {
 			return;
 		}
 		for (AbstractComponent component : components) {
 			component.setVisible(isVisible);
-			if (component instanceof HasValue) {
+			if (!isVisible && component instanceof HasValue) {
 				((HasValue<?>) component).clear();
 			}
 		}
 	}
🤖 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/samples/diseasesection/AbstractDiseaseSectionComponent.java`
around lines 129 - 139, Update AbstractDiseaseSectionComponent.setVisibleClear
so HasValue components are cleared only when isVisible is false, while
preserving visibility updates for both true and false values; align this
behavior with the sibling AbstractEditForm.setVisibleClear implementation.
🤖 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/samples/components/AdditionalTestInfoComponent.java`:
- Around line 43-54: Override setDto in AdditionalTestInfoComponent to assign
currentTestType from the loaded PathogenTestDto before invoking the existing
recomputation logic. Ensure the DTO’s persisted test type is available when
updateReferenceLaboratory or isMumpsTargetTest evaluates the
reference-laboratory flag, while preserving the normal field-binding behavior.

In
`@sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/MumpsSectionComponent.java`:
- Around line 44-63: Update the allowed disease annotations on
PathogenTestDto.genoType and PathogenTestDto.genoTypeText to include
Disease.MUMPS, while preserving their existing Disease.MEASLES and
Disease.CRYPTOSPORIDIOSIS entries so Mumps genotype values remain bindable in
MumpsSectionComponent.

---

Outside diff comments:
In
`@sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/AbstractDiseaseSectionComponent.java`:
- Around line 129-139: Update AbstractDiseaseSectionComponent.setVisibleClear so
HasValue components are cleared only when isVisible is false, while preserving
visibility updates for both true and false values; align this behavior with the
sibling AbstractEditForm.setVisibleClear implementation.
🪄 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 Plus

Run ID: d6ef85c0-852d-4811-bea8-c5d09204277d

📥 Commits

Reviewing files that changed from the base of the PR and between b6a77e6 and 1200cc2.

📒 Files selected for processing (17)
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/GenoType.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTest.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTestFacadeEjb.java
  • sormas-backend/src/main/resources/sql/sormas_schema.sql
  • sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/components/AdditionalTestInfoComponent.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/components/FourFoldCtCqComponent.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/AbstractDiseaseSectionComponent.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/DiseaseSectionFactory.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/MumpsSectionComponent.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/ShigellosisSectionComponent.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/sidecomponent/SideComponentField.java

@KarnaiahPesula
KarnaiahPesula requested review from raulbob and roldy July 31, 2026 13:51
@KarnaiahPesula
KarnaiahPesula merged commit a2466cb into development Jul 31, 2026
7 checks passed
@KarnaiahPesula
KarnaiahPesula deleted the feature-14233-mumps-samples-and-pathogen-test-form-changes branch July 31, 2026 14:18
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.

2 participants