Skip to content

Commit

Permalink
EDIT improve patients.normalizedName
Browse files Browse the repository at this point in the history
  • Loading branch information
make-github-pseudonymous-again committed Jan 6, 2025
1 parent 89a2820 commit 713b053
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imports/api/patients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const splitNames = (string: string) => {
return [firstnameWords, middlenameWords] as const;
};

function normalizedName(firstname, lastname) {
export const normalizedName = (firstname: string | undefined, lastname: string | undefined) => {
const lastnameHash = words(lastname ?? '').join('');
const firstnameHash = words(names(firstname ?? '')[0] ?? '').join('');
return `${lastnameHash} ${firstnameHash}`;
Expand Down

0 comments on commit 713b053

Please sign in to comment.