diff --git a/Packages/ohif-studies/imports/client/components/browser/item.html b/Packages/ohif-studies/imports/client/components/browser/item.html
index 47ba98492..f6a4db584 100644
--- a/Packages/ohif-studies/imports/client/components/browser/item.html
+++ b/Packages/ohif-studies/imports/client/components/browser/item.html
@@ -14,7 +14,7 @@
{{formatDA studyData.studyDate 'D-MMM-YYYY'}}
{{studyData.studyDescription}}
{{else}}
- {{#if eq studyData.available false}}N/A{{else}}Click to load{{/if}}
+ {{#if eq studyAvailable false}}N/A{{else}}Click to load{{/if}}
{{/if}}
diff --git a/Packages/ohif-studies/imports/client/components/browser/item.js b/Packages/ohif-studies/imports/client/components/browser/item.js
index 1b5118ee2..99d8e3a27 100644
--- a/Packages/ohif-studies/imports/client/components/browser/item.js
+++ b/Packages/ohif-studies/imports/client/components/browser/item.js
@@ -113,5 +113,14 @@ Template.studyBrowserItem.helpers({
// If we have more than two modalities, change the line height to display multiple rows
return 'font-size:0.7em;line-height:1.4em;padding-top:0.5em';
}
+ },
+
+ studyAvailable() {
+ const { studyInformation } = Template.instance().data;
+ if (!studyInformation) {
+ return;
+ }
+
+ return studyInformation.available;
}
});
diff --git a/Packages/ohif-studies/imports/client/components/browser/list.js b/Packages/ohif-studies/imports/client/components/browser/list.js
index 66337d5c0..b6537598d 100644
--- a/Packages/ohif-studies/imports/client/components/browser/list.js
+++ b/Packages/ohif-studies/imports/client/components/browser/list.js
@@ -1,9 +1,24 @@
import { Template } from 'meteor/templating';
+Template.studyBrowserList.onCreated(() => {
+ const instance = Template.instance();
+
+ if (instance.data.studiesData) {
+ instance.studiesData = instance.data.studiesData;
+ }
+});
+
Template.studyBrowserList.helpers({
getStudiesInformation() {
const instance = Template.instance();
- const studiesInformation = instance.data.studiesInformation || [];
+
+ let studiesInformation;
+ if (instance.studiesData) {
+ studiesInformation = instance.studiesData.get() || [];
+ } else {
+ studiesInformation = instance.data.studiesInformation || [];
+ }
+
const result = new Map();
studiesInformation.forEach(item => result.set(item.studyInstanceUid, item));
return Array.from(result.values());