First pass at a Hanging Protocol implementation and editor (LT-131)
This commit is contained in:
1 parent
dfcb33153f
commit
2e52d9e3c1
157 files changed
+8869
-23585
No files matched your search
@@ -54,3 +54,4 @@ gilbertwat:bootstrap3-daterangepicker
|
||||
email
|
||||
peppelg:bootstrap-3-modal
|
||||
simple:reactive-method
|
||||
hangingprotocols
|
||||
@@ -31,6 +31,7 @@ clinical:router-url@2.0.15
|
||||
clinical:theming@0.4.10
|
||||
coffeescript@1.0.11
|
||||
cornerstone@0.0.1
|
||||
dburles:mongo-collection-instances@0.3.4
|
||||
ddp@1.2.2
|
||||
ddp-client@1.2.1
|
||||
ddp-common@1.2.2
|
||||
@@ -63,6 +64,7 @@ iron:core@1.0.11
|
||||
iron:dynamic-template@1.0.12
|
||||
iron:layout@1.0.12
|
||||
jquery@1.11.4
|
||||
lai:collection-extensions@0.1.4
|
||||
launch-screen@1.0.4
|
||||
lesiontracker@0.0.1
|
||||
livedata@1.0.15
|
||||
@@ -79,10 +81,12 @@ momentjs:moment@2.12.0
|
||||
mongo@1.1.3
|
||||
mongo-id@1.0.1
|
||||
mrt:moment@2.8.1
|
||||
natestrauser:select2@4.0.2
|
||||
npm-bcrypt@0.7.8_2
|
||||
npm-mongo@1.4.39_1
|
||||
observe-sequence@1.0.7
|
||||
ordered-dict@1.0.4
|
||||
orthanc-remote@0.0.1
|
||||
peppelg:bootstrap-3-modal@1.0.4
|
||||
practicalmeteor:chai@2.1.0_1
|
||||
practicalmeteor:loglevel@1.2.0_2
|
||||
@@ -94,6 +98,7 @@ reactive-var@1.0.6
|
||||
reload@1.1.4
|
||||
retry@1.0.4
|
||||
routepolicy@1.0.6
|
||||
rubaxa:sortable@1.3.0
|
||||
rwatts:uuid@0.0.2
|
||||
service-configuration@1.0.5
|
||||
session@1.1.1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template name="viewerMain">
|
||||
<div class="viewerMain">
|
||||
{{ >toolbar toolbarOptions=toolbarOptions }}
|
||||
{{ >imageViewerViewports }}
|
||||
<div id='layoutManagerTarget'>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -86,25 +86,23 @@ Template.viewerMain.helpers({
|
||||
// CR/UN/EX Tools
|
||||
var crunexToolsBtns = {
|
||||
id: 'crunexTools',
|
||||
tools:[{
|
||||
tools: [{
|
||||
id: 'crTool',
|
||||
title: 'CR Tool',
|
||||
classes: 'imageViewerTool',
|
||||
iconClasses: 'fa fa-cr'
|
||||
},
|
||||
{
|
||||
}, {
|
||||
id: 'unTool',
|
||||
title: 'UN Tool',
|
||||
classes: 'imageViewerTool',
|
||||
iconClasses: 'fa fa-un'
|
||||
},
|
||||
{
|
||||
}, {
|
||||
id: 'exTool',
|
||||
title: 'EX Tool',
|
||||
classes: 'imageViewerTool',
|
||||
iconClasses: 'fa fa-ex'
|
||||
}],
|
||||
title: "CR/UN/EX",
|
||||
title: 'CR/UN/EX',
|
||||
groupIcon: 'fa fa-exchange'
|
||||
};
|
||||
|
||||
@@ -118,3 +116,12 @@ Template.viewerMain.helpers({
|
||||
return toolbarOptions;
|
||||
}
|
||||
});
|
||||
|
||||
Template.viewerMain.onRendered(function() {
|
||||
var parentNode = document.getElementById('layoutManagerTarget');
|
||||
var studies = this.data.studies;
|
||||
layoutManager = new LayoutManager(parentNode, studies);
|
||||
|
||||
ProtocolEngine = new HP.ProtocolEngine(layoutManager, studies);
|
||||
HP.setEngine(ProtocolEngine);
|
||||
});
|
||||
@@ -2,15 +2,22 @@
|
||||
width: 100%
|
||||
height: 84%
|
||||
|
||||
#layoutManagerTarget
|
||||
width: 100%
|
||||
height: calc(100% - 30px)
|
||||
|
||||
//font awesome icons
|
||||
.fa-cr:before
|
||||
content: 'CR'
|
||||
font-weight: bold
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
|
||||
|
||||
.fa-un:before
|
||||
content: 'UN'
|
||||
font-weight: bold
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
|
||||
|
||||
.fa-ex:before
|
||||
content: 'EX'
|
||||
font-weight: bold
|
||||
font-weight: bold
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif
|
||||
@@ -0,0 +1,183 @@
|
||||
// Define Baseline protocol
|
||||
var proto = new HP.Protocol('LT_Baseline');
|
||||
proto.locked = true;
|
||||
|
||||
var studyDescription = new HP.ProtocolMatchingRule();
|
||||
studyDescription.required = true;
|
||||
studyDescription.attribute = 'studyDescription';
|
||||
studyDescription.constraint = {
|
||||
contains: {
|
||||
value: 'CT'
|
||||
}
|
||||
};
|
||||
|
||||
var isBaseline = new HP.ProtocolMatchingRule();
|
||||
isBaseline.required = true;
|
||||
isBaseline.attribute = 'timepointType';
|
||||
isBaseline.constraint = {
|
||||
equals: {
|
||||
value: 'baseline'
|
||||
}
|
||||
};
|
||||
|
||||
proto.addProtocolMatchingRule(studyDescription);
|
||||
proto.addProtocolMatchingRule(isBaseline);
|
||||
|
||||
var oneByOne = new HP.ViewportStructure('grid', {
|
||||
rows: 1,
|
||||
columns: 1
|
||||
});
|
||||
|
||||
// Stage 1
|
||||
var single = new HP.Viewport();
|
||||
|
||||
var baseline = new HP.StudyMatchingRule(true);
|
||||
baseline.required = true;
|
||||
baseline.attribute = 'timepointType';
|
||||
baseline.constraint = {
|
||||
equals: {
|
||||
value: 'baseline'
|
||||
}
|
||||
};
|
||||
|
||||
var body = new HP.SeriesMatchingRule();
|
||||
body.attribute = 'seriesDescription';
|
||||
body.weight = 5;
|
||||
body.constraint = {
|
||||
contains: {
|
||||
value: 'Body'
|
||||
}
|
||||
};
|
||||
|
||||
var chest = new HP.SeriesMatchingRule();
|
||||
chest.attribute = 'seriesDescription';
|
||||
chest.constraint = {
|
||||
contains: {
|
||||
value: 'CHEST'
|
||||
}
|
||||
};
|
||||
|
||||
single.studyMatchingRules.push(baseline);
|
||||
single.seriesMatchingRules.push(body);
|
||||
single.seriesMatchingRules.push(chest);
|
||||
|
||||
var first = new HP.Stage(oneByOne, 'oneByOne');
|
||||
first.viewports.push(single);
|
||||
|
||||
proto.addStage(first);
|
||||
|
||||
HP.lesionTrackerBaselineProtocol = proto;
|
||||
HP.lesionTrackerBaselineProtocol.id = 'lesionTrackerBaselineProtocol';
|
||||
|
||||
|
||||
// Define Followup Protocol
|
||||
var proto = new HP.Protocol('LT_BaselineFollowup');
|
||||
proto.locked = true;
|
||||
|
||||
var studyDescription = new HP.ProtocolMatchingRule();
|
||||
studyDescription.required = true;
|
||||
studyDescription.attribute = 'studyDescription';
|
||||
studyDescription.constraint = {
|
||||
contains: {
|
||||
value: 'CT'
|
||||
}
|
||||
};
|
||||
|
||||
var isFollowup = new HP.ProtocolMatchingRule();
|
||||
isFollowup.required = true;
|
||||
isFollowup.attribute = 'timepointType';
|
||||
isFollowup.constraint = {
|
||||
equals: {
|
||||
value: 'followup'
|
||||
}
|
||||
};
|
||||
|
||||
proto.addProtocolMatchingRule(studyDescription);
|
||||
proto.addProtocolMatchingRule(isFollowup);
|
||||
|
||||
var oneByTwo = new HP.ViewportStructure('grid', {
|
||||
rows: 1,
|
||||
columns: 2
|
||||
});
|
||||
|
||||
// Stage 1
|
||||
var left = new HP.Viewport();
|
||||
var right = new HP.Viewport();
|
||||
|
||||
var baseline = new HP.StudyMatchingRule(true);
|
||||
baseline.required = true;
|
||||
baseline.attribute = 'timepointType';
|
||||
baseline.constraint = {
|
||||
equals: {
|
||||
value: 'baseline'
|
||||
}
|
||||
};
|
||||
|
||||
var followup = new HP.StudyMatchingRule();
|
||||
followup.required = true;
|
||||
followup.attribute = 'timepointType';
|
||||
followup.constraint = {
|
||||
equals: {
|
||||
value: 'followup'
|
||||
}
|
||||
};
|
||||
|
||||
var body = new HP.SeriesMatchingRule();
|
||||
body.attribute = 'seriesDescription';
|
||||
body.weight = 5;
|
||||
body.constraint = {
|
||||
contains: {
|
||||
value: 'Body'
|
||||
}
|
||||
};
|
||||
|
||||
var chest = new HP.SeriesMatchingRule();
|
||||
chest.attribute = 'seriesDescription';
|
||||
chest.constraint = {
|
||||
contains: {
|
||||
value: 'CHEST'
|
||||
}
|
||||
};
|
||||
|
||||
left.studyMatchingRules.push(baseline);
|
||||
left.seriesMatchingRules.push(body);
|
||||
left.seriesMatchingRules.push(chest);
|
||||
|
||||
right.studyMatchingRules.push(followup);
|
||||
right.seriesMatchingRules.push(body);
|
||||
right.seriesMatchingRules.push(chest);
|
||||
|
||||
var first = new HP.Stage(oneByTwo, 'oneByTwo');
|
||||
first.viewports.push(left);
|
||||
first.viewports.push(right);
|
||||
|
||||
proto.addStage(first);
|
||||
|
||||
HP.lesionTrackerFollowupProtocol = proto;
|
||||
HP.lesionTrackerFollowupProtocol.id = 'lesionTrackerFollowupProtocol';
|
||||
|
||||
Meteor.call('removeHangingProtocolByID', HP.lesionTrackerBaselineProtocol.id, function() {
|
||||
HangingProtocols.insert(HP.lesionTrackerBaselineProtocol);
|
||||
});
|
||||
|
||||
Meteor.call('removeHangingProtocolByID', HP.lesionTrackerFollowupProtocol.id, function() {
|
||||
HangingProtocols.insert(HP.lesionTrackerFollowupProtocol);
|
||||
});
|
||||
|
||||
Meteor.startup(function() {
|
||||
getTimepointType = function(study) {
|
||||
var timepoint = Timepoints.findOne({
|
||||
studyInstanceUids: {
|
||||
$in: [study.studyInstanceUid]
|
||||
}
|
||||
});
|
||||
|
||||
if (!timepoint) {
|
||||
return;
|
||||
}
|
||||
|
||||
return timepoint.timepointType;
|
||||
};
|
||||
|
||||
HP.addCustomAttribute('timepointType', 'Timepoint Type', getTimepointType);
|
||||
});
|
||||
@@ -15,8 +15,7 @@ Object.keys(ViewerData).forEach(function(contentId) {
|
||||
|
||||
Router.configure({
|
||||
layoutTemplate: 'lesionTrackerLayout',
|
||||
loadingTemplate: 'lesionTrackerLayout',
|
||||
notFoundTemplate: 'notFound'
|
||||
loadingTemplate: 'lesionTrackerLayout'
|
||||
});
|
||||
|
||||
Router.onBeforeAction('loading');
|
||||
|
||||
Reference in new issue
Block a user