fix(hp): Add displaySetMatchDetails and displaySets to options in (#3320)

The sameAs function requires displaySetMatchDetails and displaySets to compare attributes between display sets, but these properties were not being passed into the options object. This commit adds the necessary lines of code to include displaySetMatchDetails and displaySets in the options object, fixing the issue where the  custom attribute function 'sameAs' was missing required data.
This commit is contained in:
Sofien-Sellami authored and GitHub committed 2023-04-13 23:08:13 -04:00
1 parent 1173e7de6c
commit 83b4606357
1 file changed
+11 -2
@@ -1297,7 +1297,11 @@ export default class HangingProtocolService extends PubSubService {
const studyMatchDetails = this.protocolEngine.findMatch(
study,
studyMatchingRules,
{ studies: this.studies, displaySets: studyDisplaySets }
{
studies: this.studies,
displaySets: studyDisplaySets,
displaySetMatchDetails: this.displaySetMatchDetails,
}
);
// Prevent bestMatch from being updated if the matchDetails' required attribute check has failed
@@ -1321,7 +1325,12 @@ export default class HangingProtocolService extends PubSubService {
displaySet,
seriesMatchingRules,
// Todo: why we have images here since the matching type does not have it
{ studies: this.studies, instance: displaySet.images?.[0] }
{
studies: this.studies,
instance: displaySet.images?.[0],
displaySetMatchDetails: this.displaySetMatchDetails,
displaySets: studyDisplaySets,
}
);
// Prevent bestMatch from being updated if the matchDetails' required attribute check has failed