diff --git a/Packages/hangingprotocols/client/protocolEngine.js b/Packages/hangingprotocols/client/protocolEngine.js index ddd292ca2..94f365b99 100644 --- a/Packages/hangingprotocols/client/protocolEngine.js +++ b/Packages/hangingprotocols/client/protocolEngine.js @@ -252,9 +252,9 @@ HP.ProtocolEngine = class ProtocolEngine { id: protocol.id }); - // If it is not already in the MatchedProtocols Collection, insert it + // If it is not already in the MatchedProtocols Collection, insert it with its score if (!protocolInCollection) { - MatchedProtocols.insert(protocol); + MatchedProtocols.insert(matchedDetail); } }); }); @@ -277,7 +277,7 @@ HP.ProtocolEngine = class ProtocolEngine { }).fetch(); // Return the highest scoring Protocol - return sorted[0]; + return sorted[0].protocol; } /** @@ -435,7 +435,7 @@ HP.ProtocolEngine = class ProtocolEngine { // This tests to make sure there is actually image data in this instance // TODO: Change this when we add PDF and MPEG support // See https://ohiforg.atlassian.net/browse/LT-227 - if (!instance.rows || !instance.columns) { + if (!isImage(instance.sopClassUid) && !instance.rows) { return; }