Skip to content

Fixes release testing tests & sample gaps#14098

Merged
roldy merged 2 commits into
developmentfrom
fixes-release-testing
Jun 30, 2026
Merged

Fixes release testing tests & sample gaps#14098
roldy merged 2 commits into
developmentfrom
fixes-release-testing

Conversation

@roldy

@roldy roldy commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #14014 #14025 #14023 #14034 #14026 #14031 #14024

Summary by CodeRabbit

  • New Features

    • Added RSV subtype support to pathogen tests, including a new selectable test type and matching label text.
    • Added a new disease-specific section for RSV in the sample/testing UI.
    • Expanded specimen and test options for several diseases, including updated selectable test methods and sample materials.
  • Bug Fixes

    • Improved visibility of immunization-related side panels for users with access.
    • Updated active/deprecated material handling so RSV-related sample types are treated correctly.

@roldy roldy changed the title Fixes release testing Fixes release testing tests & sample gaps Jun 30, 2026
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new RSV_SUBTYPING pathogen test type with a conditional UI subtype selector (RsvSectionComponent) shown when the test result is positive. Reactivates NASOPHARYNGEAL_LAVAGE for RSV, adjusts disease scopes and country-visibility annotations on several test types and sample materials, renames two swab captions, and removes a Luxembourg-specific guard that was hiding the immunization side panel.

Changes

RSV Subtyping, Sample Material & Test Type Updates

Layer / File(s) Summary
PathogenTestType and SampleMaterial enum changes
sormas-api/.../sample/PathogenTestType.java, sormas-api/.../sample/SampleMaterial.java
Adds RSV_SUBTYPING enum constant scoped to RESPIRATORY_SYNCYTIAL_VIRUS with MOLECULAR_ASSAYS category. Updates ANTIGEN_DETECTION and LATEX_AGGLUTINATION to be selectable for new tests with narrowed disease scopes. Adds GIARDIASIS to RAPID_ANTIGEN_DETECTION. Reactivates NASOPHARYNGEAL_LAVAGE for RSV and removes it from DEPRECATED_MATERIALS. Drops @HideForCountries from OP_ASPIRATE, NP_ASPIRATE, and AMNIOTIC_FLUID. Expands disease lists for BONE and LUNG_TISSUE to include DENGUE.
i18n constants and property files
sormas-api/.../i18n/Captions.java, sormas-api/src/main/resources/captions.properties, sormas-api/src/main/resources/enum.properties
Adds PathogenTest_rsvSubtype caption constant and PathogenTest.rsvSubtype = RSV subtype property. Adds PathogenTestType.RSV_SUBTYPING = RSV subtyping. Renames THROAT_SWAB to "(old)" variant and updates OROPHARYNGEAL_SWAB to the more specific label.
RsvSectionComponent and DiseaseSectionFactory wiring
sormas-ui/.../diseasesection/RsvSectionComponent.java, sormas-ui/.../diseasesection/DiseaseSectionFactory.java
New RsvSectionComponent renders a ComboBox<RsvSubtype> bound to PathogenTestDto.rsvSubtype, visible only when test type is RSV_SUBTYPING and result is POSITIVE; clears value when hidden. DiseaseSectionFactory routes RESPIRATORY_SYNCYTIAL_VIRUS to this new component.
Luxembourg immunization box fix
sormas-ui/.../person/PersonSideComponentsElement.java
Removes the country-is-Luxembourg check from the immunization side-component condition, leaving only the IMMUNIZATION_VIEW permission guard.
Unit test updates
sormas-api/src/test/java/.../sample/PathogenTestTypeTest.java, sormas-api/src/test/java/.../sample/SampleMaterialTest.java
Removes ANTIGEN_DETECTION and LATEX_AGGLUTINATION from EXPECTED_LEGACY; adds RSV_SUBTYPING to selectable assertions. Updates active material count to 53 and removes NASOPHARYNGEAL_LAVAGE from the deprecated set assertion.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • SORMAS-Foundation/SORMAS-Project#13584: Implements RSV subtype support across PathogenTestType, DTO, entity, and lab message mappings — directly overlaps with the rsvSubtype/RSV_SUBTYPING changes here.
  • SORMAS-Foundation/SORMAS-Project#13962: Modifies SampleMaterial @Diseases/@HideForCountries annotations and DEPRECATED_MATERIALS, directly overlapping with this PR's specimen-material changes.
  • SORMAS-Foundation/SORMAS-Project#13964: Adds @ResultValueTypeRel metadata to pathogen test types — the same annotation this PR applies to RSV_SUBTYPING, ANTIGEN_DETECTION, and LATEX_AGGLUTINATION.

Suggested reviewers

  • KarnaiahPesula
  • obinna-h-n
  • raulbob

Poem

🐇 A new subtype combo appears on screen,
RSV_SUBTYPING joins the testing scene.
Old swab names shuffled, lavage brought to life,
Luxembourg's immunization box ends its strife.
Enum by enum, the data grows bright —
Hop hop, the rabbit sets every annotation right! 🌿

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The RSV, sample-material, and related test/UI changes are unrelated to #14014 and look like additional scope. Either link the missing issues for these changes or move them into separate PRs to keep #14014 focused.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 is concise and broadly reflects the release-testing/sample-gap work, though it omits the main immunization visibility fix.
Description check ✅ Passed The PR description matches the required Fixes # template and includes issue references, so it is sufficiently complete.
Linked Issues check ✅ Passed The PersonSideComponentsElement change shows the immunization box when permitted, matching #14014's visibility 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 fixes-release-testing

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.44.0)
sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java

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.

🧹 Nitpick comments (1)
sormas-api/src/test/java/de/symeda/sormas/api/sample/PathogenTestTypeTest.java (1)

101-104: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover these new methods in the exhaustive result-type contract test.

ANTIGEN_DETECTION, LATEX_AGGLUTINATION, and RSV_SUBTYPING now have explicit @ResultValueTypeRel(QUALITATIVE) annotations in PathogenTestType.java, but this update only checks selectability. everyMethodMapsToItsExpectedResultValueTypes still treats unmapped methods as default-qualitative, so those annotations could be deleted without failing a test.

🤖 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-api/src/test/java/de/symeda/sormas/api/sample/PathogenTestTypeTest.java`
around lines 101 - 104, The exhaustive result-type contract test in
PathogenTestTypeTest currently only verifies selectability and still lets
unmapped methods fall back to the default qualitative behavior, so the new
`@ResultValueTypeRel`(QUALITATIVE) annotations on ANTIGEN_DETECTION,
LATEX_AGGLUTINATION, and RSV_SUBTYPING are not actually covered. Update
everyMethodMapsToItsExpectedResultValueTypes to include and assert these
PathogenTestType methods explicitly, alongside the existing expected result
value type mapping, so removing the annotations would fail the contract test.
🤖 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.

Nitpick comments:
In
`@sormas-api/src/test/java/de/symeda/sormas/api/sample/PathogenTestTypeTest.java`:
- Around line 101-104: The exhaustive result-type contract test in
PathogenTestTypeTest currently only verifies selectability and still lets
unmapped methods fall back to the default qualitative behavior, so the new
`@ResultValueTypeRel`(QUALITATIVE) annotations on ANTIGEN_DETECTION,
LATEX_AGGLUTINATION, and RSV_SUBTYPING are not actually covered. Update
everyMethodMapsToItsExpectedResultValueTypes to include and assert these
PathogenTestType methods explicitly, alongside the existing expected result
value type mapping, so removing the annotations would fail the contract test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b490437b-36ae-4467-b3d8-79f6ede55c29

📥 Commits

Reviewing files that changed from the base of the PR and between 2451102 and 94829c8.

📒 Files selected for processing (10)
  • sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.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-api/src/main/resources/captions.properties
  • sormas-api/src/main/resources/enum.properties
  • sormas-api/src/test/java/de/symeda/sormas/api/sample/PathogenTestTypeTest.java
  • sormas-api/src/test/java/de/symeda/sormas/api/sample/SampleMaterialTest.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonSideComponentsElement.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/RsvSectionComponent.java

@roldy roldy requested review from KarnaiahPesula and raulbob June 30, 2026 09:47
@roldy roldy merged commit f07820b into development Jun 30, 2026
5 checks passed
@roldy roldy deleted the fixes-release-testing branch June 30, 2026 09:51
@coderabbitai coderabbitai Bot mentioned this pull request Jul 3, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jul 10, 2026
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.

Person View - Immunization Box not visible

2 participants