Skip to content

Commit

Permalink
Merge pull request #5238 from openmsupply/#5237-case-sensitive-should…
Browse files Browse the repository at this point in the history
…-be-ingored-for-name

#5237 Case sensitive should be ignored to check name duplicity
  • Loading branch information
arjunSussol authored Jul 6, 2023
2 parents 91b4e07 + 473d8ed commit 271c3e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/selectors/patient.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const selectCanEditPatient = ({ patient }) => {
export const selectPatientByNameAndDoB = ({ lastName, firstName, dateOfBirth }) => {
if (dateOfBirth) {
const dob = moment(dateOfBirth).format('L');
const query = 'lastName = $0 AND firstName = $1 AND isDeleted = $2';
const query = 'lastName BEGINSWITH[c] $0 AND firstName BEGINSWITH[c] $1 AND isDeleted = $2';
const duplicatePatients = UIDatabase.objects('Patient').filtered(
query,
lastName.trim(),
Expand Down

0 comments on commit 271c3e9

Please sign in to comment.