Skip to content

Commit

Permalink
Append all phone numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
reagan-meant committed Feb 25, 2024
1 parent df00a4f commit 0093aab
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions server/lib/routes/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -1159,11 +1159,14 @@ router.post('/matches', (req, res) => {
}
}
let systemName = generalMixin.getClientDisplayName(clientUserId);
let phone;
let phone = '';
if(patient.telecom) {
for(let telecom of patient.telecom) {
if(telecom.system === 'phone') {
phone = telecom.value;
if (phone) {
phone += ', ';
}
phone += telecom.value;
}
}
}
Expand Down Expand Up @@ -1359,11 +1362,14 @@ router.get('/potential-matches/:id', (req, res) => {
}
}
let systemName = generalMixin.getClientDisplayName(clientUserId);
let phone;
let phone = '';
if(patient.telecom) {
for(let telecom of patient.telecom) {
if(telecom.system === 'phone') {
phone = telecom.value;
if (phone) {
phone += ', ';
}
phone += telecom.value;
}
}
}
Expand Down

0 comments on commit 0093aab

Please sign in to comment.