Whack of matcher changes for vector calculation to only count _relevant_ field matchers
This commit is contained in:
parent
3d34502fae
commit
46235226cf
|
@ -77,7 +77,7 @@ public class EmpiProviderMatchR4Test extends BaseProviderR4Test {
|
|||
Bundle.BundleEntrySearchComponent searchComponent = entry0.getSearch();
|
||||
assertEquals(Bundle.SearchEntryMode.MATCH, searchComponent.getMode());
|
||||
|
||||
assertEquals(2.0 / 3.0, searchComponent.getScore().doubleValue(), 0.01);
|
||||
assertEquals(1.0 / 1.0, searchComponent.getScore().doubleValue(), 0.01);
|
||||
Extension matchGradeExtension = searchComponent.getExtensionByUrl(EmpiConstants.FIHR_STRUCTURE_DEF_MATCH_GRADE_URL_NAMESPACE);
|
||||
assertNotNull(matchGradeExtension);
|
||||
assertEquals(MatchGrade.CERTAIN.toCode(), matchGradeExtension.getValue().toString());
|
||||
|
|
|
@ -43,11 +43,9 @@
|
|||
{
|
||||
"name": "cosine-code",
|
||||
"resourceType": "Medication",
|
||||
"resourcePath": "code",
|
||||
"similarity": {
|
||||
"algorithm": "COSINE",
|
||||
"matchThreshold": 0.8,
|
||||
"exact": true
|
||||
"resourcePath": "code.coding.code",
|
||||
"matcher": {
|
||||
"algorithm": "STRING"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -134,7 +134,7 @@ public class EmpiResourceMatcherSvc {
|
|||
}
|
||||
|
||||
EmpiMatchOutcome retVal = new EmpiMatchOutcome(vector, score);
|
||||
retVal.setEmpiRuleCount(myFieldMatchers.size());
|
||||
retVal.setEmpiRuleCount(resourceRelevantFieldMatchers.size());
|
||||
return retVal;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue