Skip to content

[Part 1 / Phase 3] PathogenTestForm: Refactor TuberculosisDiseaseSectionLayout #13855

@roldy

Description

@roldy

Problem Description

Context

Part of Epic: [Epic] PathogenTestForm: Composition + Stable Form Refactor
Blocked by: Phase 2

Refactor TuberculosisDiseaseSectionLayout to use the new clean interface signatures.
Remove all bridge method calls (form.addSectionField(...), form.getCurrentDisease(), etc.)
and delegate tube logic to a forthcoming TubeFieldHandler.

Proposed Solution

Tasks

  • Remove all form.addSectionField(...) / form.removeSectionField(...) calls
  • Use fieldGroup.buildAndBind(...) + panel.addComponent(...) directly
  • Wire Luxembourg visibility via FieldHelper.setVisibleWhen(fieldGroup, ...) — capture registrations for cleanup in unbindFields()
  • Stub TubeFieldHandler usage (can use placeholder until Phase 6)
  • Implement onTestTypeChanged():
    • Call drugSusceptibilityField.updateFieldsVisibility()
    • Apply Luxembourg-specific auto-result rules for IGRA test type

Additional Information

Acceptance Criteria

  • No import of PathogenTestForm
  • bindFields / unbindFields / onTestTypeChanged all use only FieldGroup + CustomLayout + standard types
  • Luxembourg IGRA visibility rules still work correctly
  • mvn compile -pl sormas-ui passes

Metadata

Metadata

Labels

refactoringTechnical refactoring of an existing featuretaskSomething to be done that does not directly affect the software

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions