Skip to content

FIX: multiple patients found with same phone number

Surya Manoj Pentakota requested to merge fix/create_patient into develop

Description

This MR fixes the bug where when creating a new patient we check the phone number and if a user exists with the phone number who is not a patient we add patient role to them. here if there exists multiple users with the same phone number then it conflicts with the current implementation as we are only utilizing the first match. fixed this by throwing an error here as makeshift fix until we fix the database integrity properly.

Checklist

  • The bug has been reproduced and confirmed.
  • A clear and concise fix has been implemented.
  • New tests have been added to prevent regressions.
  • Existing tests are passing.

Related Issue(s)

Closes #

Merge request reports

Loading