Skip to content

Feature 13918 salmonellosis form enhancements#13934

Merged
roldy merged 8 commits into
developmentfrom
feature-13918-salmonellosis-form-enhancements
May 25, 2026
Merged

Feature 13918 salmonellosis form enhancements#13934
roldy merged 8 commits into
developmentfrom
feature-13918-salmonellosis-form-enhancements

Conversation

@roldy
Copy link
Copy Markdown
Contributor

@roldy roldy commented May 15, 2026

Fixes #13916 #13917 #13918 #13939 #13940 #13941

Summary by CodeRabbit

  • New Features

    • Added Salmonellosis support for more sample materials and new pathogen test types (CGMLST, SNP_TYPING, SEROTYPING)
    • Disease-aware filtering for exposure subsettings and dynamic test-type text display
  • Improvements

    • Hide vaccination/immunization and specific hospitalization fields for Salmonellosis
    • Contact visit column visibility adjusted for Salmonellosis
    • Sample export now includes SNOMED codes and tested-disease info
  • Removals

    • Eating-out-venue fields and related UI/schema entries removed
  • Style

    • New caption style to preserve original casing in UI captions

Review Change Stack

roldy added 2 commits May 15, 2026 13:47
Resolved conflict in sormas_schema.sql: kept both the External Survey
integration (#13832) at v629 and the Salmonellosis FoodHistory work
(#13918, #13917), renumbering the FoodHistory inserts from 629/630/631
to 630/631/632 so the version sequence stays contiguous.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR makes pathogen test free-text visibility and exposure subsettings disease-aware for SALMONELLOSIS, extends sample materials with SNOMED codes, removes EatingOutVenue and related fields (migrating to shopping-for-food details), updates sample export/labels to include tested disease, and adjusts UI/DB/Swagger accordingly.

Changes

Salmonellosis Disease-Aware Visibility and Sample Context

Layer / File(s) Summary
Test Type & Sample Material Metadata
sormas-api/src/main/java/de/symeda/sormas/api/sample/RevealsTestTypeText.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/enum.properties, sormas-rest/swagger.*
Adds @RevealsTestTypeText; updates PathogenTestType to include Salmonellosis in @Diseases lists and to conditionally append free-text via revealsTestTypeText(...); extends SampleMaterial with Salmonellosis-scoped constants + SNOMED map and updates enum captions and OpenAPI enums.
Disease-Aware Exposure Sub-Setting Filtering
sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureSubSetting.java
Adds disease-aware overloads getValues(..., Disease) and getValuesForCategoryOnly(..., Disease) and a visibility helper that reads @Diseases annotations to filter subsettings by disease.
Sample Export & UI Labels
sormas-api/.../SampleExportDto.java, sormas-backend/.../SampleFacadeEjb.java, sormas-ui/.../PathogenTestListEntry.java
SampleExportPathogenTest gains testedDisease; export construction passes testedDisease; formatType() uses testedDisease; adds getSampleMaterialSnomedCode() and UI labels include tested disease context.
Remove EatingOutVenue; DTO/Entity/Backend/SQL
sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java, sormas-api/.../EatingOutVenue.java (removed), sormas-backend/.../exposure/Exposure.java, sormas-backend/.../epidata/EpiDataFacadeEjb.java, sormas-backend/src/main/resources/sql/sormas_schema.sql, sormas-api/src/main/resources/*
Removes EatingOutVenue enum and eating-out fields; introduces shoppingForFoodDetails in DTO and entity; backend mapping and facades updated; SQL migration drops join tables/columns/triggers; captions/properties updated.
Case & Contact Immunization Gating
sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java, sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java, sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java
Hides vaccinationStatus for Salmonellosis; Case and Contact views suppress immunization panel for Salmonellosis and use resolvedDisease fallback when filtering immunization/vaccination lists.
Hospitalization & Contact Grid Changes
sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java, sormas-ui/src/main/java/de/symeda/sormas/ui/contact/AbstractContactGrid.java
HospitalizationForm hides ICU-related fields for Salmonellosis; contact grid refactors imports, streamlines proximity renderer, and hides visits column when disease is Salmonellosis or follow-up disabled.
ExposureForm & TestMethodComponent
sormas-ui/src/main/java/de/symeda/sormas/ui/exposure/ExposureForm.java, sormas-ui/src/main/java/de/symeda/sormas/ui/samples/components/TestMethodComponent.java
ExposureForm removes eating-out UI wiring and uses shoppingForFoodDetails visibility; updateSubSettings uses disease-aware overload; TestMethodComponent uses PathogenTestType.revealsTestTypeText(...) to control test-type-text field visibility.
UI styling & small refactors
sormas-ui/src/main/java/de/symeda/sormas/ui/utils/CssStyles.java, sormas-ui/src/main/webapp/VAADIN/themes/sormas/global.scss, sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java, sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java
Adds CAPTION_NO_UPPERCASE style + SCSS rule; minor EpiDataForm reformatting; small backend mapping/null-guard adjustments.
OpenAPI / Swagger updates
sormas-rest/swagger.json, sormas-rest/swagger.yaml
Expands enums for pathogen test types and sample materials and removes eatingOutVenues schema entries.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related issues

  • #13916 — overlaps with PathogenTestType and ExposureSubSetting Salmonellosis annotations and SHOPPING_FOR_FOOD handling.
  • #13917 — DTOs/persistence/facades objectives include exposure eating-out/shop fields and Salmonellosis symptom annotations; parts implemented here.

Possibly related PRs

Suggested reviewers

  • obinna-h-n
  • KarnaiahPesula
  • raulbob

Poem

🐰 I hop through enums, annotations in tow,

I let test-type details only sometimes show.
I map sample bits to SNOMED with a twitch,
and tuck eating-out fields in a migration stitch.
Hooray — visibility sorted, one small hop, one big switch.

🚥 Pre-merge checks | ✅ 1 | ❌ 4

❌ Failed checks (1 warning, 3 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description includes references to linked issues (#13917 #13918) but lacks detail about actual changes made beyond issue numbers. Add a brief summary of the key changes implemented (e.g., removed eating out venues, added shopping for food details, new pathogen test types) to clarify the scope.
Linked Issues check ❓ Inconclusive The PR addresses core requirements: new fields added to DTOs (ExposureDto, SampleExportDto, SampleMaterial), disease-aware filtering (ExposureSubSetting, PathogenTestType), UI updates for Salmonellosis exposure/pathogen handling, and schema migrations. However, some UI/form components from #13917 acceptance criteria (PersonDto.placeOfWork rendering, HospitalizationDto.stillHospitalized checkbox, full EpiDataForm section, SymptomsForm isFoodborneGastrointestinal flag, PathogenTestForm test-type restriction) are not visible in the provided changes. Verify whether missing #13917 UI requirements (PersonEditForm.placeOfWork, HospitalizationForm.stillHospitalized checkbox, EpiDataForm section, SymptomsForm isFoodborneGastrointestinal, PathogenTestForm test-type restriction) were addressed in separate commits or are pending.
Out of Scope Changes check ❓ Inconclusive Most changes align with Salmonellosis feature scope. However, the removal of EatingOutVenue enum and eating-out venue fields represents significant API/schema removal that goes beyond adding Salmonellosis-specific restrictions. Clarify whether removing eating-out venues entirely (rather than just hiding for Salmonellosis) aligns with the original #13917/#13918 requirements, as this affects all diseases.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Feature 13918 salmonellosis form enhancements' accurately reflects the main change—Salmonellosis-related form enhancements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature-13918-salmonellosis-form-enhancements

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (1)
sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java (1)

147-150: ⚡ Quick win

Use the same disease fallback for criteria building as for panel visibility.

Line 255 gates rendering with resolvedDisease, but the immunization/vaccination criteria still use refreshedContact.getDisease(). For contacts with null disease and case-derived disease, this can produce inconsistent filtering.

♻️ Proposed adjustment
- return new ImmunizationListCriteria.Builder(refreshedContact.getPerson()).withDisease(refreshedContact.getDisease()).build();
+ Disease criteriaDisease = refreshedContact.getDisease();
+ if (criteriaDisease == null && refreshedContact.getCaze() != null) {
+ 	CaseDataDto refreshedCase = FacadeProvider.getCaseFacade().getCaseDataByUuid(refreshedContact.getCaze().getUuid());
+ 	criteriaDisease = refreshedCase != null ? refreshedCase.getDisease() : null;
+ }
+ return new ImmunizationListCriteria.Builder(refreshedContact.getPerson()).withDisease(criteriaDisease).build();
- return new VaccinationCriteria.Builder(refreshedContact.getPerson()).withDisease(refreshedContact.getDisease())
+ Disease criteriaDisease = refreshedContact.getDisease() != null
+ 	? refreshedContact.getDisease()
+ 	: refreshedCase != null ? refreshedCase.getDisease() : null;
+ return new VaccinationCriteria.Builder(refreshedContact.getPerson()).withDisease(criteriaDisease)
 	.build()

Also applies to: 255-257

🤖 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/contact/ContactDataView.java`
around lines 147 - 150, The criteria building is using
refreshedContact.getDisease() while panel visibility uses resolvedDisease
(computed from contactDto and caseDto), causing inconsistent filtering; update
the criteria construction in ContactDataView to use the same resolvedDisease
variable (the one computed from contactDto and caseDto) instead of
refreshedContact.getDisease() so immunization/vaccination criteria and the
visibility gate both use the same disease fallback logic (ensure any references
in methods that build criteria or call into the immunization/vaccination filters
use resolvedDisease).
🤖 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-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java`:
- Around line 204-209: EpiDataDto now contains a mutable nested field
foodHistory (FoodHistoryDto) but its clone() currently performs a shallow copy;
update EpiDataDto.clone() to deep-copy foodHistory by invoking its copy/clone
constructor or a toDto/deepClone method (handle nulls), so the cloned EpiDataDto
gets an independent FoodHistoryDto instance; also apply the same deep-copy
pattern to the other similar nested fields referenced around the other ranges
(the blocks around lines shown for 448-454 and 463-479) to prevent shared
mutable state between original and clone.

In `@sormas-api/src/main/java/de/symeda/sormas/api/epidata/FoodHistoryDto.java`:
- Around line 57-59: In setConsumedItemsDetails on FoodHistoryDto, normalize the
incoming Map<FoodConsumptionItem,String> instead of assigning it directly: if
the argument is null, set this.consumedItemsDetails to an empty
EnumMap<>(FoodConsumptionItem.class); otherwise create a new
EnumMap<>(FoodConsumptionItem.class) and putAll from the provided map (or copy
directly if it already is an EnumMap) so consumedItemsDetails is never null and
always an EnumMap, preserving DTO invariants.

In `@sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java`:
- Around line 262-284: The formatting method
PathogenTestType.toString(PathogenTestType, String) currently appends the
details text only for OTHER, so new free-text types annotated with
`@RevealsTestTypeText` (e.g., MULTILOCUS_SEQUENCE_TYPING, CGMLST, SNP_TYPING,
SEROTYPING) lose their testTypeText; update toString (and the formatType()
callers) to also include the provided details when the enum constant is
annotated with `@RevealsTestTypeText` (detect via the enum constant's annotation
or an existing helper such as a reveals-test-type flag), i.e., if details is
non-empty and the constant has `@RevealsTestTypeText` then append/format the
details the same way as OTHER.

In `@sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java`:
- Around line 350-357: The OneToOne mapping on EpiData.getFoodHistory()
currently uses cascade = CascadeType.ALL but lacks orphan removal, so when
EpiDataFacadeEjb calls target.setFoodHistory(null) the detached FoodHistory is
not deleted; update the mapping on the getFoodHistory() method in class EpiData
to include orphanRemoval = true (retain existing cascade and fetch settings) so
that removing the reference will delete the orphaned FoodHistory entity.

In `@sormas-backend/src/main/resources/sql/sormas_schema.sql`:
- Around line 16035-16038: The trigger creation for delete_history_trigger on
the composite-PK join table foodhistory_consumeditems is incorrect because the
trigger function is only parameterized by foodhistory_id and will mis-handle
sibling rows; remove the DROP TRIGGER / CREATE TRIGGER statements for
delete_history_trigger referring to foodhistory_consumeditems and do not
register this trigger for that table (or replace with a table-specific history
cleanup that considers both keys) — locate the CREATE TRIGGER ... AFTER DELETE
ON foodhistory_consumeditems and the call to
delete_history_trigger('foodhistory_consumeditems_history','foodhistory_id') and
remove or omit those lines.

---

Nitpick comments:
In `@sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java`:
- Around line 147-150: The criteria building is using
refreshedContact.getDisease() while panel visibility uses resolvedDisease
(computed from contactDto and caseDto), causing inconsistent filtering; update
the criteria construction in ContactDataView to use the same resolvedDisease
variable (the one computed from contactDto and caseDto) instead of
refreshedContact.getDisease() so immunization/vaccination criteria and the
visibility gate both use the same disease fallback logic (ensure any references
in methods that build criteria or call into the immunization/vaccination filters
use resolvedDisease).
🪄 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: cf685b63-64b2-4c65-8753-4122980c7c9e

📥 Commits

Reviewing files that changed from the base of the PR and between 4d01e4f and c79835c.

⛔ Files ignored due to path filters (1)
  • sormas-api/src/main/resources/doc/SORMAS_Data_Dictionary.xlsx is excluded by !**/*.xlsx
📒 Files selected for processing (33)
  • sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/epidata/FoodConsumptionItem.java
  • sormas-api/src/main/java/de/symeda/sormas/api/epidata/FoodHistoryDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureSubSetting.java
  • sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java
  • sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/RevealsTestTypeText.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleExportDto.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/main/resources/strings.properties
  • sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/FoodHistory.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/FoodHistoryMapper.java
  • sormas-backend/src/main/resources/META-INF/persistence.xml
  • sormas-backend/src/main/resources/sql/sormas_schema.sql
  • sormas-backend/src/test/resources/META-INF/persistence.xml
  • sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/contact/AbstractContactGrid.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/FoodHistoryForm.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/FoodHistoryItemsField.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/exposure/ExposureForm.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/components/TestMethodComponent.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/utils/CssStyles.java
  • sormas-ui/src/main/webapp/VAADIN/themes/sormas/global.scss
  • sormas-ui/src/test/resources/META-INF/persistence.xml

Comment thread sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java Outdated
Comment thread sormas-api/src/main/java/de/symeda/sormas/api/epidata/FoodHistoryDto.java Outdated
Comment thread sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java Outdated
Comment thread sormas-backend/src/main/resources/sql/sormas_schema.sql Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
sormas-api/src/main/java/de/symeda/sormas/api/epidata/FoodHistoryDto.java (1)

57-60: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Guard against EnumMap construction failure for empty generic maps.

Line 59 can throw at runtime when consumedItemsDetails is empty and not already an EnumMap. Build with explicit key type, then copy entries.

Proposed fix
 public void setConsumedItemsDetails(Map<FoodConsumptionItem, String> consumedItemsDetails) {
-	this.consumedItemsDetails =
-		consumedItemsDetails == null ? new EnumMap<>(FoodConsumptionItem.class) : new EnumMap<>(consumedItemsDetails);
+	EnumMap<FoodConsumptionItem, String> normalized = new EnumMap<>(FoodConsumptionItem.class);
+	if (consumedItemsDetails != null) {
+		normalized.putAll(consumedItemsDetails);
+	}
+	this.consumedItemsDetails = normalized;
 }
In Java, does `new EnumMap<>(map)` throw when `map` is empty and not an EnumMap (e.g., Collections.emptyMap())? Please cite the JDK behavior.
🤖 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/main/java/de/symeda/sormas/api/epidata/FoodHistoryDto.java`
around lines 57 - 60, In setConsumedItemsDetails in FoodHistoryDto the current
new EnumMap<>(consumedItemsDetails) can throw for empty generic maps (e.g.,
Collections.emptyMap()); instead construct an EnumMap with the key type (new
EnumMap<>(FoodConsumptionItem.class)) and then, if the incoming
consumedItemsDetails is non-null, call putAll(consumedItemsDetails) to copy
entries; preserve the null-to-empty behavior by initializing the field to a new
EnumMap<>(FoodConsumptionItem.class) when the argument is null.
🤖 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.

Duplicate comments:
In `@sormas-api/src/main/java/de/symeda/sormas/api/epidata/FoodHistoryDto.java`:
- Around line 57-60: In setConsumedItemsDetails in FoodHistoryDto the current
new EnumMap<>(consumedItemsDetails) can throw for empty generic maps (e.g.,
Collections.emptyMap()); instead construct an EnumMap with the key type (new
EnumMap<>(FoodConsumptionItem.class)) and then, if the incoming
consumedItemsDetails is non-null, call putAll(consumedItemsDetails) to copy
entries; preserve the null-to-empty behavior by initializing the field to a new
EnumMap<>(FoodConsumptionItem.class) when the argument is null.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 257eb1d6-d730-4802-aa8e-4378d41c716b

📥 Commits

Reviewing files that changed from the base of the PR and between c79835c and 8e337ea.

📒 Files selected for processing (9)
  • sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/epidata/FoodHistoryDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleExportDto.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java
  • sormas-backend/src/main/resources/sql/sormas_schema.sql
  • sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/pathogentestlink/PathogenTestListEntry.java
🚧 Files skipped from review as they are similar to previous changes (2)
  • sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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/exposure/ExposureForm.java`:
- Around line 406-411: The listener in ExposureForm currently only updates
shoppingForFoodDetailsField visibility for Disease.SALMONELLOSIS and
ExposureSubSetting.SHOPPING_FOR_FOOD; reintroduce/update the same listener logic
to also set eatingOutVenues.visible when disease == Disease.SALMONELLOSIS and
selectedSubSettings contains ExposureSubSetting.EATING_OUTSIDE (or EATING_OUT)
and set eatingOutVenueOther.visible when the selectedSubSettings contains
ExposureSubSetting.OTHER; use the same selectedSubSettings and disease checks as
for shoppingForFoodDetailsField so all three visibility rules
(shoppingForFoodDetailsField, eatingOutVenues, eatingOutVenueOther) are handled
together and the scope is explicit in the ExposureForm listener.
🪄 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: de94de28-4bdd-4ece-a0a4-3245c3861853

📥 Commits

Reviewing files that changed from the base of the PR and between 145c20f and 6f5e9b3.

📒 Files selected for processing (11)
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/EatingOutVenue.java
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java
  • sormas-api/src/main/resources/captions.properties
  • sormas-api/src/main/resources/enum.properties
  • sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/exposure/Exposure.java
  • sormas-backend/src/main/resources/sql/sormas_schema.sql
  • sormas-rest/swagger.json
  • sormas-rest/swagger.yaml
  • sormas-ui/src/main/java/de/symeda/sormas/ui/exposure/ExposureForm.java
💤 Files with no reviewable changes (5)
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/EatingOutVenue.java
  • sormas-api/src/main/resources/captions.properties
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/exposure/Exposure.java
  • sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java
🚧 Files skipped from review as they are similar to previous changes (1)
  • sormas-api/src/main/resources/enum.properties

Copy link
Copy Markdown
Contributor

@raulbob raulbob left a comment

Choose a reason for hiding this comment

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

Tests are failing.

@roldy roldy merged commit 227edcc into development May 25, 2026
7 of 8 checks passed
@roldy roldy deleted the feature-13918-salmonellosis-form-enhancements branch May 25, 2026 07:11
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.

Salmonellosis - Enhance case data form

2 participants