Skip to content

fix: remove vitals dependency for KYP submission

Rajuldev Vandana requested to merge feat/kyp into develop

Overview

This MR fixes the KYP (Know Your Patient) backend flow by removing the dependency on vitals before allowing KYP submission.


What does this MR do and why?

Previously, the backend enforced a validation that required vitals to be recorded before updating KYP data. This caused KYP submission to fail with an error:

"Vitals must be recorded before updating know your patient info"

However, KYP is part of the initial patient workflow and should be allowed immediately after registration, without depending on vitals.

This MR removes that restriction and aligns backend behavior with the expected workflow.


Changes Made

  • Removed validation that blocks KYP update when vitals are not recorded
  • Allowed patient update (KYP) immediately after registration
  • Ensured KYP submission API returns success without dependency on vitals
  • No changes made to vitals or queue logic

Technical Details

Root Cause:

  • Backend validation required vitals to exist before allowing patient update

Fix:

  • Removed or bypassed the validation check for vitals in patient update endpoint
  • Ensured KYP data can be saved independently

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

How to Set Up and Validate Locally

  1. Run backend server
  2. Register a new patient
  3. Submit KYP without recording vitals

Expected:

  • KYP submission should succeed
  • No "vitals required" error should appear

Testing Done

  • Manual testing completed

Test Cases Covered:

Scenario Expected Result Status
Submit KYP without vitals Success response
KYP data persistence Data saved correctly

Known Limitations

  • Validation removal applies only to KYP flow; vitals logic remains unchanged for later stages

Additional Notes

  • This change aligns backend with actual workflow: Registration → KYP → Doctor Assignment → Vitals

Merge request reports

Loading