Creating timepoint browser
This commit is contained in:
1 parent
eb372bed03
commit
fd9cfed8e9
23 files changed
+204
-132
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import './dialog/nonTargetMeasurement.html';
|
||||
import './dialog/nonTargetMeasurement.js';
|
||||
|
||||
import './timepointBrowser';
|
||||
|
||||
import './trialOptionsModal/irRCDescription.html';
|
||||
import './trialOptionsModal/recistDescription.html';
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
import './list.html';
|
||||
import './item.html';
|
||||
import './item.js';
|
||||
@@ -0,0 +1,16 @@
|
||||
<template name="timepointBrowserItem">
|
||||
<div class="timepointEntry p-y-2">
|
||||
<div class="timepointHeader">
|
||||
<div class="timepointDetails clearfix">
|
||||
<div class="timepointFollowupTitle pull-left">
|
||||
{{this.timepointApi.title timepoint}}
|
||||
</div>
|
||||
<div class="expandIcon pull-right">
|
||||
<i class="fa fa-chevron-down"></i>
|
||||
</div>
|
||||
<div class="timepointDate pull-right m-r-1">{{formatDA this.timepoint.earliestDate 'D-MMM-YYYY'}}</div>
|
||||
</div>
|
||||
<!-- <div class="timepointModalities">{{modalitiesSummary timepoint}}</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,28 @@
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Template } from 'meteor/templating';
|
||||
import { ReactiveVar } from 'meteor/reactive-var';
|
||||
import { OHIF } from 'meteor/ohif:core';
|
||||
|
||||
Template.timepointBrowserItem.onCreated(() => {
|
||||
const instance = Template.instance();
|
||||
const { timepoint, timepointApi } = instance.data;
|
||||
|
||||
instance.loading = new ReactiveVar(false);
|
||||
instance.loaded = !!(timepoint.studiesData && timepoint.studiesData.length);
|
||||
|
||||
instance.autorun(() => {
|
||||
if (instance.loaded || !instance.loading.get()) return;
|
||||
|
||||
const filter = { studyInstanceUid: timepoint.studyInstanceUids };
|
||||
Meteor.call('StudyListSearch', filter, (error, studiesData) => {
|
||||
if (error) {
|
||||
const text = 'An error has occurred while retrieving studies information';
|
||||
OHIF.ui.notifications.danger({ text });
|
||||
OHIF.log.error(error);
|
||||
} else {
|
||||
timepoint.studiesData = studiesData;
|
||||
timepointApi.timepoints.update(timepoint._id, { $set: studiesData });
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,7 @@
|
||||
<template name="timepointBrowserList">
|
||||
{{#scrollArea class=(concat 'full-height ' this.class) scrollableClass=this.scrollableClass}}
|
||||
{{#each timepoint in this.timepoints}}
|
||||
{{>timepointBrowserItem (clone this timepoint=timepoint)}}
|
||||
{{/each}}
|
||||
{{/scrollArea}}
|
||||
</template>
|
||||
Reference in new issue
Block a user