Skip to content

#14143 - Added region/district inputs for quick immunization#14161

Merged
raulbob merged 1 commit into
developmentfrom
bugfix-14143-quick_immunization_region_district_inputs
Jul 7, 2026
Merged

#14143 - Added region/district inputs for quick immunization#14161
raulbob merged 1 commit into
developmentfrom
bugfix-14143-quick_immunization_region_district_inputs

Conversation

@raulbob

@raulbob raulbob commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #14143

Summary by CodeRabbit

  • New Features

    • Added jurisdiction fields for region and district in the immunization quick creation form.
    • District choices now update automatically based on the selected region.
    • The jurisdiction section is shown only when relevant information is available.
  • Bug Fixes

    • Improved form loading so region and district values are refreshed and applied more reliably when editing or creating immunizations.

@coderabbitai

coderabbitai Bot commented Jul 7, 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

Run ID: c8f339ff-0b40-4771-871f-261d7afcbad1

📥 Commits

Reviewing files that changed from the base of the PR and between f904f2e and d0a1326.

📒 Files selected for processing (1)
  • sormas-ui/src/main/java/de/symeda/sormas/ui/immunization/components/form/QuickImmunizationCreationForm.java

📝 Walkthrough

Walkthrough

QuickImmunizationCreationForm's FieldsComponent adds responsibleRegion and responsibleDistrict combo boxes grouped in a jurisdictionRow. These fields are bound with required validation, populated from region/district reference data, dynamically filtered on region change, and shown or hidden based on whether the ImmunizationDto already has jurisdiction values set.

Changes

Jurisdiction fields cohort

Layer / File(s) Summary
Imports and documentation
QuickImmunizationCreationForm.java
Adds HorizontalLayout, RegionReferenceDto, DistrictReferenceDto, FieldHelper, FormComponent imports and updates class javadoc to reflect conditional jurisdiction inputs.
Field declarations and layout
QuickImmunizationCreationForm.java
Declares responsibleRegion, responsibleDistrict, and jurisdictionRow fields; builds combo boxes with caption generators and item sources into a new layout row.
Binding and visibility logic
QuickImmunizationCreationForm.java
Binds jurisdiction fields with required validation, refreshes district options before/after binding in setDto(...), and adds refreshDistrictOptions/updateJurisdictionFieldsVisibility helpers to show/hide the row based on DTO state.
Dynamic region-change wiring
QuickImmunizationCreationForm.java
Adds a value-change listener on responsibleRegion in wireEvents() to refresh district options dynamically.

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant FieldsComponent
  participant QuickImmunizationCreationForm

  User->>FieldsComponent: open quick immunization form
  QuickImmunizationCreationForm->>FieldsComponent: setDto(dto)
  QuickImmunizationCreationForm->>QuickImmunizationCreationForm: refreshDistrictOptions()
  QuickImmunizationCreationForm->>QuickImmunizationCreationForm: updateJurisdictionFieldsVisibility(dto)
  FieldsComponent-->>User: show/hide jurisdictionRow

  User->>FieldsComponent: select responsibleRegion
  FieldsComponent->>QuickImmunizationCreationForm: region value changed
  QuickImmunizationCreationForm->>QuickImmunizationCreationForm: refreshDistrictOptions(region)
  FieldsComponent-->>User: updated responsibleDistrict options
Loading

Related issues: #14143 - Region and district selection now displays properly in the quick immunization form.

Suggested labels: ui, bug-fix

Suggested reviewers: none identified

🐰 A form once locked with fields unseen,
Now shows the region, district, clean,
Pick your place, the list will bind,
Jurisdiction found, no more left behind.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding region and district inputs for quick immunization.
Description check ✅ Passed The description follows the template by specifying the linked issue as "Fixes #14143".
Linked Issues check ✅ Passed The code adds visible, selectable region and district fields to the quick immunization flow as requested in #14143.
Out of Scope Changes check ✅ Passed The changes stay focused on the quick immunization form and do not introduce unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 bugfix-14143-quick_immunization_region_district_inputs

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.

@raulbob raulbob merged commit bfad852 into development Jul 7, 2026
7 checks passed
@raulbob raulbob deleted the bugfix-14143-quick_immunization_region_district_inputs branch July 7, 2026 21:45
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.

(qa-int)Quick-Immunization is asking for Region and District, but can't select it

2 participants