chore(lesion-tracker): Remove unused Reviewer code for study list
This commit is contained in:
parent
6468203cf3
commit
2f05ed5961
@ -1,9 +1,6 @@
|
|||||||
<template name="longitudinalStudyListStudy">
|
<template name="longitudinalStudyListStudy">
|
||||||
<tr class="studylistStudy noselect {{#if this.selected}}active{{/if}}">
|
<tr class="studylistStudy noselect {{#if this.selected}}active{{/if}}">
|
||||||
<td>
|
<td>
|
||||||
{{#if reviewerTip}}
|
|
||||||
<i class="fa fa-exclamation-circle reviewerTip" data-toggle="tooltip" data-placement="bottom" title="{{reviewerTip}}"></i>
|
|
||||||
{{/if}}
|
|
||||||
{{formatPN patientName}}
|
{{formatPN patientName}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@ -26,55 +26,6 @@ if (OHIF.studylist) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return timepointApi.name(timepoint);
|
return timepointApi.name(timepoint);
|
||||||
},
|
|
||||||
|
|
||||||
reviewerTip() {
|
|
||||||
const instance = Template.instance();
|
|
||||||
const timepointApi = OHIF.studylist.timepointApi;
|
|
||||||
if (!timepointApi || !window.Reviewers) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const timepoint = timepointApi.study(instance.data.studyInstanceUid);
|
|
||||||
if (!timepoint) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const timepointReviewers = window.Reviewers.findOne({ timepointId: timepoint.timepointId });
|
|
||||||
if (!timepointReviewers) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
return getReviewerTipText(timepointReviewers.reviewers);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function getReviewerTipText(reviewers) {
|
|
||||||
if (!reviewers || !reviewers.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const newReviewers = reviewers.filter(function(reviewer) {
|
|
||||||
return reviewer.userId !== Meteor.userId();
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!newReviewers.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let tipText = 'The study is being reviewed by ';
|
|
||||||
newReviewers.forEach(function(reviewer, index) {
|
|
||||||
if (reviewer.userId === Meteor.userId()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (index > 0) {
|
|
||||||
tipText += ',';
|
|
||||||
}
|
|
||||||
|
|
||||||
tipText += reviewer.userName;
|
|
||||||
});
|
|
||||||
|
|
||||||
return tipText;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,2 @@
|
|||||||
.studylistStudy
|
.studylistStudy
|
||||||
cursor: pointer
|
cursor: pointer
|
||||||
|
|
||||||
.reviewerTip
|
|
||||||
color: darkred
|
|
||||||
@ -49,8 +49,6 @@ Template.timeoutCountdownDialog.onRendered(() => {
|
|||||||
instance.interval = setInterval(() => {
|
instance.interval = setInterval(() => {
|
||||||
Session.set('countdownDialogTimeLeft', --timeLeft);
|
Session.set('countdownDialogTimeLeft', --timeLeft);
|
||||||
if (!timeLeft) {
|
if (!timeLeft) {
|
||||||
// Remove reviewer info for the user
|
|
||||||
Meteor.call('removeUserFromReviewers', Meteor.userId());
|
|
||||||
instance.close(instance.data.promiseReject);
|
instance.close(instance.data.promiseReject);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user