Feature 14233 mumps samples and pathogen test form changes - #14260
Conversation
…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
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThe 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. ChangesMumps pathogen-test support
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
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 winGuard the field clear with the visibility flag.
setVisibleClearclears everyHasValuecomponent unconditionally, even whenisVisibleistrue. The method name and theAbstractEditForm.setVisibleClear(boolean, String...)sibling both imply that the clear happens only when hiding a field.Today's call sites in
MumpsSectionComponentandShigellosisSectionComponentalways passfalse, so the current behavior is not user-visible. This method is a shared base-class utility for all disease sections, though. A future call withisVisible == truewill 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
📒 Files selected for processing (17)
sormas-api/src/main/java/de/symeda/sormas/api/sample/GenoType.javasormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestDto.javasormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.javasormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.javasormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.javasormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTest.javasormas-backend/src/main/java/de/symeda/sormas/backend/sample/PathogenTestFacadeEjb.javasormas-backend/src/main/resources/sql/sormas_schema.sqlsormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.javasormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.javasormas-ui/src/main/java/de/symeda/sormas/ui/samples/components/AdditionalTestInfoComponent.javasormas-ui/src/main/java/de/symeda/sormas/ui/samples/components/FourFoldCtCqComponent.javasormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/AbstractDiseaseSectionComponent.javasormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/DiseaseSectionFactory.javasormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/MumpsSectionComponent.javasormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/ShigellosisSectionComponent.javasormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/sidecomponent/SideComponentField.java
Fixes #
Summary by CodeRabbit