Conditional enable/disable logic for Folic Acid and IFA tablet fields is not working in ANC Visit registration.

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium
    • 2.11
    • Affects Version/s: None
    • None
    • FLW Sprint 46
    • FLW Mobile App
    • All

      Under Maternal Health → ANC Visits → Add New Visit, the fields "No. of Folic Acid Tabs Given" and "No. of IFA Tabs Given" are expected to be enabled or disabled based on the calculated Weeks of Pregnancy.

      The application is currently not enforcing the configured business rules, resulting in both fields being editable when they should be disabled.

      Configured Business Rules

      1. No. of Folic Acid Tabs Given

      • Must accept numeric (integer) values only
      • Default Value: 0
      • Maximum Value: 60
      • Field should be disabled when Weeks of Pregnancy is greater than 12 weeks
      • Field should be enabled only up to and including 12 weeks of pregnancy

      2. No. of IFA Tabs Given

      • Must accept numeric (integer) values only
      • Default Value: Null (if no data entered)
      • Maximum Value: 400
      • Field should remain disabled up to 12 weeks of pregnancy
      • Field should be enabled only when Weeks of Pregnancy is greater than 12 weeks

      Current Behavior

      Scenario 1

      • Weeks of Pregnancy is greater than 12 weeks.
      • No. of Folic Acid Tabs Given remains enabled and editable.

      Expected: Field should be disabled.

      Scenario 2

      • Weeks of Pregnancy is less than or equal to 12 weeks.
      • No. of IFA Tabs Given remains enabled and editable.

      Expected: Field should be disabled.

      Steps to Reproduce : 

      1. Navigate to Maternal Health → ANC Visits.
      2. Select a pregnant woman and click Add New Visit.
      3. Enter an ANC Date that results in Weeks of Pregnancy > 12.
      4. Observe the No. of Folic Acid Tabs Given field.
      5. Enter an ANC Date that results in Weeks of Pregnancy ≤ 12.
      6. Observe the No. of IFA Tabs Given field.

       

      Expected Behavior

      Weeks of Pregnancy Folic Acid Tabs Field IFA Tabs Field
      ≤ 12 Weeks Enabled Disabled
      > 12 Weeks Disabled Enabled

      The enable/disable behavior should update automatically whenever the Weeks of Pregnancy value changes.

      Acceptance Criteria

      • When Weeks of Pregnancy is 12 weeks or less, only No. of Folic Acid Tabs Given is enabled.
      • When Weeks of Pregnancy is greater than 12 weeks, only No. of IFA Tabs Given is enabled.
      • The field state updates dynamically whenever Weeks of Pregnancy is recalculated.
      • Users cannot enter values into disabled fields.
      • Existing validations (numeric input, maximum limits, default values) continue to function as configured.
      • No impact on ANC Visit save and sync functionality.

              Assignee:
              Ishwar Chouhan
              Reporter:
              Pranoti Monde
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: