From 83b460635794f962f1cf6978eaecc4f74073d03f Mon Sep 17 00:00:00 2001 From: Sofien-Sellami <73444179+Sofien-Sellami@users.noreply.github.com> Date: Fri, 14 Apr 2023 04:08:13 +0100 Subject: [PATCH] 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. --- .../HangingProtocolService.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts b/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts index 2d06acdaf..4ae568c2a 100644 --- a/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts +++ b/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts @@ -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