Skip to content

Fix issues in the refactored Pathogen Test Form #13938

@roldy

Description

@roldy

Context

The PathogenTestForm was recently refactored from a monolithic Vaadin form into a
component-based architecture, each component managing its own field visibility via a form
event bus. Chris produced a test sheet (Pathogen test form testing.xlsx, sheets "LU Pathogen test
form issues" and "Global SORMAS path test issues") listing defects in the refactored form. This
issue tracks the fixes implemented for the items that live in the pathogen test form, its create
flow, and the pathogen-test "box".

What was implemented

Result-driven field visibility

Several result-dependent fields stayed visible/writable when the test result was not positive.
They now consistently hide and clear when the result is not POSITIVE.

  • CQ value field now requires a positive result in all branches (PCR/RT-PCR, Cq value
    detection, Malaria qPCR).
  • 4-fold antibody increase checkbox is shown/enabled only for IgM/IgG serum antibody and
    a positive result, and is re-evaluated when the result changes.
    (relates to Checkbox " 4 fold increase in antibody titers" in create a new test is not writable #13559)
  • Dengue serotype hides when result is not positive (NAAT/PCR/Neutralizing). (Dengue - Enhance Sample form #13814)
  • Malaria species now subscribes to result changes and hides when not positive. (Malaria - Enhance Sample form #13801)
  • TB test scale (Microscopy) hides when the result is not positive. (Enhance sample and pathogen test forms for TB-specific data #13324)
  • Disease subtype/variant (RSV, Influenza, and all subtype-allowed diseases) is shown only when the
    test result is Positive
    ; it is hidden and cleared for every other result (blank, Pending, Negative,
    Indeterminate, Not done). As part of this, the variant↔result coupling was
    adjusted: selecting a variant still auto-sets the result to Positive, but clearing a variant no longer
    clears the result (this previously wiped a user's selection when the variant auto-cleared).
  • RSV + PCR auto-sets the result to Positive for consistency with other diseases (Dengue/Malaria
    already auto-set Positive on PCR). Combined with the subtype rule above, the RSV subtype now appears automatically on PCR.

Disease scoping

  • CT-target fields (Ct E / N / RdRp / S / ORF1 / RdRp-S) are SARS-CoV-2 specific and are now
    shown only for COVID-19 + PCR/RT-PCR (previously shown for any non-TB disease).
  • Fixes "Type A+B" appearing twice in the Influenza subtype/variant dropdown

Captions / labels (English default)

  • Malaria field caption "Specie" → "Species" (and "Specify specie text" → "Specify species text").
  • IPI (Invasive Pneumococcal Infection) serotyping renames, applied disease-specifically so other
    diseases keep their wording: SEROGROUPING test type shown as "Serotyping", serotype field
    labelled "Serotype", method labelled "Serotyping Method". Uses the disease-suffixed caption
    pattern (cf. …fourFoldIncreaseAntibodyTiter.DENGUE). (Modify sample form for IPI sterile site restrictions and serotype field #13341)
    • IPI previously offered two near-synonymous test types — SEROGROUPING and a generic
      SEROTYPING (both displayed "Serotyping" after the rename), causing a duplicate dropdown entry.
      This was fixed & the value all IPI serotyping logic remains. IMI is unaffected (still has
      both) & CSM has neither by design.
  • "Antibiotic susceptibility" test type renamed globally to "Antibiotic Susceptibility Testing (AST)".

Pathogen test box

Create-flow validations

  • Test date is now mandatory (validated on commit, with a required indicator).
  • Lab is now required and pre-filled for non-internal samples when creating a test from an
    existing sample, consistent with the create-sample-plus-test flow. (Update Samples and Pathogen Tests for Measles #13367)
  • Test date before sample date now triggers the validation error when saving the test itself,
    rather than only later when saving the sample.

Out of scope (should be tracked separately)

Specimen-condition task creation, per-disease sample lists, RSV case classification, IGRA result
algorithm, Dengue serotype as a case-form disease variant, and the AST therapy-tab overwrite
behaviour are outside the pathogen test form and are not addressed here.

Metadata

Metadata

Labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions