fix(nurse-doctor): correct mandatory-field enforcement (vitals, clinical obs, family history) - #441
Conversation
[22] Waist Circumference was falsely required for NCD screening (age >= 30) via a template [required] and blocked submit; removed (no form-level validator exists). [10] Cancer vitals Systolic/Diastolic BP (1st reading) raised a mandatory popup for age > 30 via a template [required]; removed — BP is optional in cancer screening. [21] Quick Consult "Clinical Observations" was required (Validators.required + template required) and wrongly blocked Next; made optional to match the general case-record findings field. [20] Family History: require a family member whenever a real disease is chosen (mirrors the existing NCD-screening rule); empty / None / Nil rows keep family history optional overall.
…MRIT logic) The original app never validated family member in checkNurseRequirements — only the NCD-screening path enforces it. Per product decision, follow the original: General OPD (and ANC/PNC/NCD-care/COVID) family history stays optional. Reverts the [20] check.
…) + show red * The earlier [21] change made Clinical Observations optional, but the original app had it mandatory (clinicalObservation: [null, Validators.required] + template required) — the checkQuickConsultDoctorData gate pushes it to the required list when the control errors. The real gap Shivani reported was the MISSING visual marker, not the blocking. So: restore Validators.required + template required (re-arming the existing Next-gate) and add zRequired so the field finally shows the red * the original never had.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
|



What
Aligns several mandatory-field behaviours to the original AMRIT logic after the Zard migration.
[required]that popped the mandatory dialog on submit though no form-level validator exists. (QA)[required]="benAge > 30"on Systolic/Diastolic BP; BP is optional in cancer screening. (QA)main. NCD screening keeps its original family-member + Diabetes-Mellitus requirement.main:Validators.required+ templaterequired, re-arming the existingcheckQuickConsultDoctorDatagate) and added the red*the original never showed — which was the actual gap reported.Testing
*and blocks Next when empty.