Skip to content

Commit

Permalink
Fix valide system system bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jabahum committed Jun 11, 2024
1 parent ba3de79 commit 75f2c1c
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 75f2c1c

Please sign in to comment.