Skip to content

Commit

Permalink
Merge pull request #143 from jabahum/fix-validsystem-bug
Browse files Browse the repository at this point in the history
Fix system check  bug
  • Loading branch information
ashaban authored Jun 13, 2024
2 parents b3f0e58 + 75f2c1c commit 45a891f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
7 changes: 4 additions & 3 deletions server/lib/medMatching.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,20 @@ module.exports = () => ({
if (!isMatch) {
missMatchFound = true;
}
case 'metaphone':
break;
case 'metaphone':
isMatch = this.metaphoneMatcher(sourceValue, targetValue);
if (!isMatch) {
missMatchFound = true;
}
break;
case 'double-metaphone':
case 'double-metaphone':
isMatch = this.doubleMetaphoneMatcher(sourceValue, targetValue);
if (!isMatch) {
missMatchFound = true;
}
break;
default:
default:
missMatchFound = true;
break;
}
Expand Down
13 changes: 6 additions & 7 deletions server/lib/routes/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -1509,10 +1509,9 @@ router.get(`/get-match-issues`, (req, res) => {
if(link) {
link = link.split('/')[1];
}
const validSystem = entry.resource.identifier && entry.resource.identifier.find(identifier => {
return 'http://openclientregistry.org/fhir/sourceid' && identifier.value;
});


const validSystem = generalMixin.getClientIdentifier(entry.resource);

let matchTag = entry.resource.meta.tag.find((tag) => {
return tag.system === matchIssuesURI;
});
Expand Down Expand Up @@ -1560,9 +1559,9 @@ router.get(`/get-new-auto-matches`, (req, res) => {
if(link) {
link = link.split('/')[1];
}
const validSystem = entry.resource.identifier && entry.resource.identifier.find(identifier => {
return 'http://openclientregistry.org/fhir/sourceid' && identifier.value;
});

const validSystem = generalMixin.getClientIdentifier(entry.resource);


let matchTag = entry.resource.meta.tag.find((tag) => {
return tag.system === matchAutoURI;
Expand Down

0 comments on commit 45a891f

Please sign in to comment.