Skip to content

fix(anc): require Primi Gravida and LMP in the nurse ANC form - #470

Open
gkbishnoi07 wants to merge 1 commit into
angular-zard-migrationfrom
fix/anc-mandatory-fields-validation
Open

fix(anc): require Primi Gravida and LMP in the nurse ANC form#470
gkbishnoi07 wants to merge 1 commit into
angular-zard-migrationfrom
fix/anc-mandatory-fields-validation

Conversation

@gkbishnoi07

Copy link
Copy Markdown

What

Marks Primi Gravida and Last Menstrual Period (LMP) as required in the nurse ANC obstetric form (createPatientANCDetailsForm in general-utility.ts).

Why

These two fields drive the ANC obstetric details. When they were left empty, the form-level "required fields" validation never flagged them, so the submit went straight to the backend and returned a confusing generic error. Adding the validators the submit check already looks for means the user now sees a clear "Below Fields Are Required: Primi Gravida, Last Menstrual Period" dialog instead.

Scope

  • Single, targeted change — only the two form validators (2 lines).
  • Does not change the backend ANC save behaviour. The separate "Unable to save data" backend error is pre-existing (reproduces on the old MMU-UI too) and is being followed up with the backend team.

Testing

  • Submitting ANC with Primi Gravida / LMP empty now shows the friendly required-fields dialog instead of the backend error.
  • Filling both fields proceeds as before.

the nurse ANC obstetric form never marked primiGravida/lmpDate as required,
so an empty submit skipped frontend validation and hit the backend with a
generic "unable to save data". add the validators the submit check already
expects, so the missing-fields dialog shows instead.
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 9f1d0090-5bea-4028-bb11-4f92b22b1187

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

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.

1 participant