Skip to content

Shigellosis lab message processing + minor defects.#13988

Open
KarnaiahPesula wants to merge 2 commits into
developmentfrom
feature-13965-shigellosis-lab-messages
Open

Shigellosis lab message processing + minor defects.#13988
KarnaiahPesula wants to merge 2 commits into
developmentfrom
feature-13965-shigellosis-lab-messages

Conversation

@KarnaiahPesula

@KarnaiahPesula KarnaiahPesula commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Fixes #

Summary by CodeRabbit

Release Notes

New Features

  • Added sexual contact selection to exposure and epidemiological data collection.
  • Added pathogen test category support in laboratory test reports.
  • Added susceptibility method fields for additional antibiotics.

Improvements

  • Renamed medication status from “under medication” to “on medication”, including updated UI behavior for showing medication details.
  • Enhanced Shigellosis support with expanded serotyping/serotyping-method options, improved disease-scoped test visibility, and broader household-contact sub-setting applicability.

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

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR implements Shigellosis lab message support (#13965) by: renaming underMedication to onMedication across the stack; introducing a SexualContact enum and exposure field; adding PathogenTestCategory to TestReport; scoping numerous PathogenTestType constants as hidden for SHIGELLOSIS; updating PathogenSpecie and SerotypingMethod annotations; extending DrugSusceptibility method fields for multiple antibiotics; refactoring ShigellosisSectionComponent serotyping UI with a new setVisibleClear helper; and migrating the database schema (version 638).

Changes

Shigellosis Lab Messages

Layer / File(s) Summary
onMedication rename: DTO, entity, mapper, form, i18n, SQL
sormas-api/.../clinicalcourse/HealthConditionsDto.java, sormas-backend/.../clinicalcourse/HealthConditions.java, sormas-backend/.../clinicalcourse/HealthConditionsMapper.java, sormas-ui/.../clinicalcourse/HealthConditionsForm.java, sormas-api/.../i18n/Captions.java, sormas-api/src/main/resources/captions.properties
Renames UNDER_MEDICATION/underMedication to ON_MEDICATION/onMedication across DTO constant and accessors, backend entity field and accessors, bidirectional mapper, UI form field references and visibility rules, and i18n keys/captions. SQL column rename is covered in the migration layer.
SexualContact enum, ExposureDto/Exposure entity, EpiData mapping, and ExposureForm UI
sormas-api/.../exposure/SexualContact.java, sormas-api/.../exposure/ExposureDto.java, sormas-api/.../exposure/ExposureSubSetting.java, sormas-backend/.../exposure/Exposure.java, sormas-backend/.../epidata/EpiDataFacadeEjb.java, sormas-ui/.../exposure/ExposureForm.java, sormas-api/.../i18n/Captions.java, sormas-api/src/main/resources/captions.properties, sormas-api/src/main/resources/enum.properties
Introduces SexualContact enum with localized toString, adds sexualContact field to ExposureDto (scoped to SHIGELLOSIS) and the JPA entity with @Enumerated(STRING) persistence, wires bidirectional EpiDataFacadeEjb mapping in both directions, annotates HOUSEHOLD_CONTACT ExposureSubSetting for SHIGELLOSIS, and adds a ComboBox in ExposureForm with show/hide toggling based on SEXUAL_ACTIVITY sub-setting selection and proper setValue restoration.
PathogenTestCategory on TestReport/TestReportDto and facade
sormas-api/.../externalmessage/labmessage/TestReportDto.java, sormas-backend/.../externalmessage/labmessage/TestReport.java, sormas-backend/.../externalmessage/labmessage/TestReportFacadeEjb.java
Adds pathogenTestCategory field (with @Enumerated(STRING) getter) to TestReport entity and TestReportDto, and wires both conversion directions in TestReportFacadeEjb (toDto and fillOrBuildEntity).
PathogenTestType SHIGELLOSIS disease-scoping annotations
sormas-api/.../sample/PathogenTestType.java
Adds @Diseases(SHIGELLOSIS, hide=true) to ~18 PathogenTestType constants across Molecular Assays, Serological Tests, Antigen Detection, Culture & Isolation, Microscopy & Staining, Antimicrobial Susceptibility, and Functional Immune Assays. Removes SHIGELLOSIS from SLIDE_AGGLUTINATION and extends SNP_TYPING's @RevealsTestTypeText to include SHIGELLOSIS alongside SALMONELLOSIS.
PathogenSpecie test-type broadening and SerotypingMethod annotation updates
sormas-api/.../sample/PathogenSpecie.java, sormas-api/.../sample/SerotypingMethod.java
Broadens Shigella species constants (BOYDII, DYSENTERIAE, FLEXNERI, SONNEI, SHIGELLA_SPP) and OTHER @ApplicableToPathogenTests to include BACTERIAL_CULTURE, SEROGROUPING, and SEROTYPING. Updates SerotypingMethod entries to switch SEROGROUPING to SEROTYPING for MULTIPLEX_PCR, AGGLUTINATION, and WGS_PREDICTION, narrows DISK_DIFFUSION, and removes MIC_DETERMINATION enum constant.
DrugSusceptibilityDto method fields, DrugSusceptibility entity, mapper, and DrugSusceptibilityForm UI
sormas-api/.../therapy/DrugSusceptibilityDto.java, sormas-backend/.../therapy/DrugSusceptibility.java, sormas-backend/.../therapy/DrugSusceptibilityMapper.java, sormas-ui/.../therapy/DrugSusceptibilityForm.java
Adds susceptibility method field support for azithromycin, ceftazidime, cefotaxime, ampicillin, and trimethoprim-sulfamethoxazole by introducing constants, private fields with @Diseases/@ApplicableToPathogenTests annotations (scoped to SHIGELLOSIS), and getter/setter methods in the DTO. Mirrors these as SusceptibilityMethod fields in the backend entity with @Enumerated(STRING) accessors. Wires bidirectional mapping in the facade. Updates DrugSusceptibilityForm to expand HTML layout rows and add method field dropdowns for all affected drugs. Also broadens @Diseases for capreomycin and streptomycin surveillance fields to include SHIGELLOSIS.
ShigellosisSectionComponent serotyping UI refactor, setVisibleClear helper, SideComponentField, TestMethodComponent
sormas-ui/.../samples/diseasesection/AbstractDiseaseSectionComponent.java, sormas-ui/.../samples/diseasesection/ShigellosisSectionComponent.java, sormas-ui/.../utils/components/sidecomponent/SideComponentField.java, sormas-ui/.../samples/components/TestMethodComponent.java
Adds setVisibleClear(AbstractComponent...) helper to AbstractDiseaseSectionComponent for atomic hide+clear operations on Vaadin fields. Refactors ShigellosisSectionComponent to introduce serotypeTF, serotypingMethodCBF, serotypingMethodTF fields with binder bindings, resets test result on TestTypeChangedEvent, treats both SEROGROUPING and SEROTYPING as POSITIVE, and rewrites updateFieldVisibility using computed boolean flags with setVisibleClear calls. Expands SideComponentField SHIGELLOSIS variant map to include SEROTYPING and adds null guards. Adds null-category guard in TestMethodComponent to clear test-type field when category becomes null.
SQL migration version 638, PersonEditForm simplification, and caption updates
sormas-backend/src/main/resources/sql/sormas_schema.sql, sormas-ui/.../person/PersonEditForm.java, sormas-api/src/main/resources/captions.properties
Schema version 638 adds pathogentestcategory and sexualcontact columns to testreport/exposures (and history tables), adds method columns to drugsusceptibility/drugsusceptibility_history, and conditionally renames undermedication to onmedication in healthconditions/healthconditions_history. Simplifies PersonEditForm by removing ENTRY_DATE_DISEASE whitelist and Luxembourg/foreign-status conditional visibility logic. Updates several Symptoms.* caption values with revised wording and spacing.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related issues

  • #13965: The main issue tracking Shigellosis lab message processing; the database schema migration is explicitly tagged with comment #13965 - Shigellosis Lab messages.

Possibly related PRs

  • SORMAS-Foundation/SORMAS-Project#13963: Modifies HealthConditionsDto medication fields and overlaps on disease-scoped test type applicability in PathogenSpecie and PathogenTestType.
  • SORMAS-Foundation/SORMAS-Project#13766: Extends the same lab-message TestReportDto/TestReport model and updates TestReportFacadeEjb mapping (main PR adds pathogenTestCategory; related PR adds strainCallStatus/serotype).
  • SORMAS-Foundation/SORMAS-Project#13961: Modifies TestMethodComponent category handling and DrugSusceptibilityForm antibiotic method support, directly overlapping with this PR's UI enhancements.

Suggested reviewers

  • obinna-h-n
  • raulbob

Poem

🐇 Hop hop, the rabbit checks the changes,
onMedication rearranges,
Shigella types now scoped and free,
SexualContact finds harmony,
Serotyping flows with grace,
Schema 638 sets the place! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete and does not follow the template. It only contains the template boilerplate with no issue reference (Fixes # is blank) and no substantive explanation of the changes. Complete the PR description by specifying the issue number (e.g., 'Fixes #13965') and providing a detailed explanation of the changes made, including the purpose and scope of the shigellosis lab message processing implementation.
Docstring Coverage ⚠️ Warning Docstring coverage is 4.17% 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 'Shigellosis lab message processing + minor defects' clearly and accurately describes the main objective of the PR, which involves implementing shigellosis lab message processing and addressing minor defects.
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.

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

✨ 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-13965-shigellosis-lab-messages

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.

@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: 4

🤖 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/exposure/ExposureDto.java`:
- Around line 470-472: The sexualContact field in the ExposureDto class is
missing the `@SensitiveData` annotation, which is required for proper
sensitive-data access control. Add the `@SensitiveData` annotation above the
`@Diseases` annotation on the sexualContact field to ensure it is properly
protected as sensitive data.

In `@sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java`:
- Line 206: The enum constant SHISPP in PathogenSpecie.java was renamed from
SHIGELLA_SPP, but this breaking change requires three synchronization updates to
prevent deserialization failures and UI display issues. Update all 46 language
enum.properties files (enum.properties, enum_en-KE.properties, etc.) to replace
Pathogen.SHIGELLA_SPP with Pathogen.SHISPP. Update sormas_schema.sql to replace
the seed value 'SHIGELLA_SPP' with 'SHISPP' in the customizableenumvalue table
insert statement. Create a database migration script to update any existing
persisted records in the customizableenumvalue table that contain the old value
'SHIGELLA_SPP' to 'SHISPP' to ensure existing data can be properly deserialized
when JPA attempts to map them to the renamed enum constant.

In `@sormas-backend/src/main/resources/sql/sormas_schema.sql`:
- Around line 16305-16312: The migration logic contains an impossible condition
where both the EXISTS and NOT EXISTS checks look for the same column
'undermedication', making the condition always false and preventing the
migration from running. Fix this by changing the NOT EXISTS clause to check for
'onmedication' instead of 'undermedication', so the condition properly verifies
that the old column exists and the new column does not. Additionally, remove the
duplicate IF block that appears immediately after (the second identical IF
statement in each pair), since only one migration check is needed for each
column rename operation. Apply these fixes to both occurrences of this pattern
in the file.

In
`@sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/ShigellosisSectionComponent.java`:
- Around line 149-171: The updateFieldVisibility method clears field values in
the setVisibleClear calls before subsequently making those same fields visible
again, causing data loss. The negative condition guards (if (!isSerogrouping),
if (!isSerotype), if (!showDrugSusceptibilityForm)) cause overlapping field
clearances. Restructure the logic so that setVisibleClear only executes when the
field will definitely remain hidden, by either: (1) inverting the guard
conditions to check that the field won't be shown in the subsequent visibility
assignments, or (2) reorganizing to clear fields only when they should remain
invisible across all visibility-setting paths. Ensure specie is only cleared
when both isSerogrouping and isSerotype are false, serotypeTF is only cleared
when isSerotype is false, and serotypingMethodCBF is only cleared when both
isSerotype and showDrugSusceptibilityForm are false.
🪄 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: 7e9bb40f-d88d-4f01-9bf5-8d3137dd0940

📥 Commits

Reviewing files that changed from the base of the PR and between 443a003 and 3239a4c.

📒 Files selected for processing (25)
  • sormas-api/src/main/java/de/symeda/sormas/api/clinicalcourse/HealthConditionsDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureSubSetting.java
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/SexualContact.java
  • sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/labmessage/TestReportDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java
  • sormas-api/src/main/resources/captions.properties
  • sormas-api/src/main/resources/enum.properties
  • sormas-backend/src/main/java/de/symeda/sormas/backend/clinicalcourse/HealthConditions.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/clinicalcourse/HealthConditionsMapper.java
  • 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/java/de/symeda/sormas/backend/externalmessage/labmessage/TestReport.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/labmessage/TestReportFacadeEjb.java
  • sormas-backend/src/main/resources/sql/sormas_schema.sql
  • sormas-ui/src/main/java/de/symeda/sormas/ui/clinicalcourse/HealthConditionsForm.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/exposure/ExposureForm.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/components/TestMethodComponent.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/ShigellosisSectionComponent.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/sidecomponent/SideComponentField.java

Comment thread sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java Outdated
Comment thread sormas-backend/src/main/resources/sql/sormas_schema.sql
Some minor issues fixed.
@KarnaiahPesula KarnaiahPesula changed the title Shigellosis lab message processing + some minor defects. Shigellosis lab message processing + minor defects. Jun 16, 2026

@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

🤖 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-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibilityMapper.java`:
- Around line 133-137: The hasData method in DrugSusceptibilityMapper is missing
validation for the five newly introduced *Method fields that were added to the
mapping logic. Update the hasData method to include checks for
AzithromycinMethod, AmpicillinMethod, CeftazidimeMethod, CefotaximeMethod, and
TrimethoprimSulfamethoxazoleMethod so that records containing only these method
values are not incorrectly treated as empty data. Apply the same fix to all
locations where hasData performs similar validation checks for
DrugSusceptibility fields.

In
`@sormas-ui/src/main/java/de/symeda/sormas/ui/therapy/DrugSusceptibilityForm.java`:
- Around line 96-97: Remove the empty string field-location placeholders from
all fluidRowLocsCss method calls in the DrugSusceptibilityForm class. These
empty strings ("") are being passed as arguments for zone-diameter and
surveillance fields, but they generate invalid location='' HTML attributes that
break Vaadin template binding. For each affected fluidRowLocsCss call, identify
the empty strings and either omit those parameters entirely from the argument
list or restructure the call to pass only the fields that have actual location
values, ensuring no empty strings are passed as location placeholders.
🪄 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: 421de8d0-a1bf-4321-8918-cb6f91f286fd

📥 Commits

Reviewing files that changed from the base of the PR and between 3239a4c and 31c75d0.

📒 Files selected for processing (10)
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenSpecie.java
  • sormas-api/src/main/java/de/symeda/sormas/api/sample/SerotypingMethod.java
  • sormas-api/src/main/java/de/symeda/sormas/api/therapy/DrugSusceptibilityDto.java
  • sormas-api/src/main/resources/enum.properties
  • sormas-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibility.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibilityMapper.java
  • sormas-backend/src/main/resources/sql/sormas_schema.sql
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/ShigellosisSectionComponent.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/therapy/DrugSusceptibilityForm.java
🚧 Files skipped from review as they are similar to previous changes (2)
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java
  • sormas-ui/src/main/java/de/symeda/sormas/ui/samples/diseasesection/ShigellosisSectionComponent.java

Comment on lines +133 to +137
target.setAzithromycinMethod(source.getAzithromycinMethod());
target.setAmpicillinMethod(source.getAmpicillinMethod());
target.setCeftazidimeMethod(source.getCeftazidimeMethod());
target.setCefotaximeMethod(source.getCefotaximeMethod());
target.setTrimethoprimSulfamethoxazoleMethod(source.getTrimethoprimSulfamethoxazoleMethod());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

hasData is missing the newly introduced method fields.

You mapped the five new *Method fields in both directions, but hasData still ignores them. If a record only has one of these method values, hasData returns false and that data can be treated as empty.

Suggested fix
@@
 			|| dto.getAzithromycinMic() != null
 			|| dto.getAzithromycinSusceptibility() != null
+			|| dto.getAzithromycinMethod() != null
 			|| dto.getCeftazidimeMic() != null
 			|| dto.getCeftazidimeSusceptibility() != null
+			|| dto.getCeftazidimeMethod() != null
 			|| dto.getCefotaximeMic() != null
 			|| dto.getCefotaximeSusceptibility() != null
+			|| dto.getCefotaximeMethod() != null
 			|| dto.getAmpicillinMic() != null
 			|| dto.getAmpicillinSusceptibility() != null
+			|| dto.getAmpicillinMethod() != null
 			|| dto.getTrimethoprimSulfamethoxazoleMic() != null
-			|| dto.getTrimethoprimSulfamethoxazoleSusceptibility() != null;
+			|| dto.getTrimethoprimSulfamethoxazoleSusceptibility() != null
+			|| dto.getTrimethoprimSulfamethoxazoleMethod() != null;

Also applies to: 244-248

🤖 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-backend/src/main/java/de/symeda/sormas/backend/therapy/DrugSusceptibilityMapper.java`
around lines 133 - 137, The hasData method in DrugSusceptibilityMapper is
missing validation for the five newly introduced *Method fields that were added
to the mapping logic. Update the hasData method to include checks for
AzithromycinMethod, AmpicillinMethod, CeftazidimeMethod, CefotaximeMethod, and
TrimethoprimSulfamethoxazoleMethod so that records containing only these method
values are not incorrectly treated as empty data. Apply the same fix to all
locations where hasData performs similar validation checks for
DrugSusceptibility fields.

Comment on lines +96 to +97
+ fluidRowLocsCss(CssStyles.GRID_ROW_GAP_1, AZITHROMYCIN_LABEL_LOC, DrugSusceptibilityDto.AZITHROMYCIN_MIC, "", DrugSusceptibilityDto.AZITHROMYCIN_METHOD, DrugSusceptibilityDto.AZITHROMYCIN_SUSCEPTIBILITY, "")
+ fluidRowLocsCss(CssStyles.GRID_ROW_GAP_1, AMPICILLIN_LABEL_LOC, DrugSusceptibilityDto.AMPICILLIN_MIC, "", DrugSusceptibilityDto.AMPICILLIN_METHOD, DrugSusceptibilityDto.AMPICILLIN_SUSCEPTIBILITY, "")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Locate LayoutUtil and inspect fluidRowLocsCss implementation:"
fd -i 'LayoutUtil.java' | sed 's/^/ - /'

echo
echo "Show fluidRowLocsCss definition and nearby logic:"
rg -n -C4 'fluidRowLocsCss\s*\(' $(fd -i 'LayoutUtil.java')

echo
echo "Find all calls that pass empty-string placeholders:"
rg -n -C2 'fluidRowLocsCss\s*\(.*""' sormas-ui/src/main/java/de/symeda/sormas/ui/therapy/DrugSusceptibilityForm.java

Repository: SORMAS-Foundation/SORMAS-Project

Length of output: 3960


🏁 Script executed:

cat -n sormas-ui/src/main/java/de/symeda/sormas/ui/utils/LayoutUtil.java | sed -n '225,260p'

Repository: SORMAS-Foundation/SORMAS-Project

Length of output: 1778


🏁 Script executed:

rg -n 'public static.*fluidColumnLoc' sormas-ui/src/main/java/de/symeda/sormas/ui/utils/LayoutUtil.java -A 20

Repository: SORMAS-Foundation/SORMAS-Project

Length of output: 1126


🏁 Script executed:

fd -i 'FluidColumn.java' && echo "---" && rg -n 'class FluidColumn' $(fd -i 'FluidColumn.java') -A 30

Repository: SORMAS-Foundation/SORMAS-Project

Length of output: 3140


🏁 Script executed:

rg -n 'fluidRowLocsCss.*"".*""' sormas-ui/src/main/java/ | head -20

Repository: SORMAS-Foundation/SORMAS-Project

Length of output: 1622


Remove empty string field-location placeholders from fluidRowLocsCss calls.

The fluidRowLocsCss method does not ignore empty strings—it generates invalid location='' HTML attributes that could break Vaadin template binding. Lines 96, 97, 107, 108, and 110 pass "" for zone-diameter and surveillance fields, but these should be omitted entirely instead of left as placeholders. Either exclude these fields from the row definition or pass the full list only when all fields are present.

Example of the issue

Lines 96-97 and 107-108, 110:

fluidRowLocsCss(CssStyles.GRID_ROW_GAP_1, AZITHROMYCIN_LABEL_LOC, DrugSusceptibilityDto.AZITHROMYCIN_MIC, "", DrugSusceptibilityDto.AZITHROMYCIN_METHOD, DrugSusceptibilityDto.AZITHROMYCIN_SUSCEPTIBILITY, "")

generates:

<div ... location=''> ... </div>
🤖 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/therapy/DrugSusceptibilityForm.java`
around lines 96 - 97, Remove the empty string field-location placeholders from
all fluidRowLocsCss method calls in the DrugSusceptibilityForm class. These
empty strings ("") are being passed as arguments for zone-diameter and
surveillance fields, but they generate invalid location='' HTML attributes that
break Vaadin template binding. For each affected fluidRowLocsCss call, identify
the empty strings and either omit those parameters entirely from the argument
list or restructure the call to pass only the fields that have actual location
values, ensuring no empty strings are passed as location placeholders.

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 - lab messages

1 participant