nonTarget tool is added
This commit is contained in:
1 parent
02a5b2fc53
commit
db21685473
16 files changed
+814
-20
No files matched your search
@@ -0,0 +1,133 @@
|
||||
//fill selectLesionLocation element
|
||||
var lesionLocationsArray = [{
|
||||
location: "Brain Brainstem",
|
||||
hasDescription: false,
|
||||
description: ""
|
||||
}, {
|
||||
location: "Brain Cerebellum Left",
|
||||
hasDescription: false,
|
||||
description: ""
|
||||
}, {
|
||||
location: "Brain Cerebrum Left",
|
||||
hasDescription: false,
|
||||
description: ""
|
||||
}, {
|
||||
location: "Brain Cerebrum Right",
|
||||
hasDescription: false,
|
||||
description: ""
|
||||
}, {
|
||||
location: "Brain Multiple Sites",
|
||||
hasDescription: false,
|
||||
description: ""
|
||||
}];
|
||||
|
||||
var lesionLocationsResponseArray = [
|
||||
{
|
||||
text: "Complete response",
|
||||
code: "CR",
|
||||
description: ""
|
||||
},
|
||||
{
|
||||
text: "Progressive disease",
|
||||
code: "PD",
|
||||
description: ""
|
||||
},
|
||||
{
|
||||
text: "Stable disease",
|
||||
code: "SD",
|
||||
description: ""
|
||||
},
|
||||
{
|
||||
text: "Non-measurable",
|
||||
code: "NM",
|
||||
description: ""
|
||||
},
|
||||
{
|
||||
text: "Unknown",
|
||||
code: "UN",
|
||||
description: ""
|
||||
},
|
||||
{
|
||||
text: "Not Evaluable",
|
||||
code: "NE",
|
||||
description: ""
|
||||
},
|
||||
{
|
||||
text: "Non-CR/Non-PD",
|
||||
code: "NN",
|
||||
description: ""
|
||||
},
|
||||
{
|
||||
text: "Excluded",
|
||||
code: "EX",
|
||||
description: ""
|
||||
}
|
||||
];
|
||||
|
||||
Template.nonTargetLesionDialog.onRendered(function() {
|
||||
|
||||
function fillSelectLesionLocation() {
|
||||
var el = $("#selectNonTargetLesionLocation");
|
||||
el.find('option:not(:first)').remove();
|
||||
$.each(lesionLocationsArray, function(key, value) {
|
||||
el.append("<option value='" + key + "'>" + value.location + "</option>");
|
||||
});
|
||||
}
|
||||
|
||||
function fillResponses() {
|
||||
var el = $("#selectNonTargetLesionLocationResponse");
|
||||
el.find('option:not(:first)').remove();
|
||||
$.each(lesionLocationsResponseArray, function(key, value) {
|
||||
el.append("<option value='" + value.code + "'>" + value.code +" - "+value.text + "</option>");
|
||||
});
|
||||
}
|
||||
|
||||
// Fill dropdown
|
||||
fillSelectLesionLocation();
|
||||
|
||||
// Fill location responses
|
||||
fillResponses();
|
||||
|
||||
});
|
||||
|
||||
Template.nonTargetLesionDialog.events({
|
||||
'click button#btnCloseNonTargetLesionPopup': function(e) {
|
||||
$("#nonTargetLesionLocationDialog").modal("hide");
|
||||
},
|
||||
|
||||
'click button#nonTargetLesionOK': function() {
|
||||
// Set activeModule parameters in index.html
|
||||
$("#nonTargetLesionLocationDialog").modal("hide");
|
||||
|
||||
var lesionData = Session.get("nonTargetLesionData");
|
||||
// Get selected location data
|
||||
var selectedLocationIndex = $("#selectNonTargetLesionLocation").val();
|
||||
if (selectedLocationIndex < 0) {
|
||||
return;
|
||||
}
|
||||
// Get selected location data
|
||||
var locationObj = lesionLocationsArray[selectedLocationIndex];
|
||||
lesionData.location = $("#selectNonTargetLesionLocation :selected").text();
|
||||
lesionData.measurementText = $("#selectNonTargetLesionLocationResponse").val();
|
||||
|
||||
// Select first option
|
||||
$("#selectNonTargetLesionLocation").val($("#selectNonTargetLesionLocation option:first").val());
|
||||
$("#selectNonTargetLesionLocationResponse").val($("#selectNonTargetLesionLocationResponse option:first").val());
|
||||
|
||||
if (typeof lesionData.locationUID !== 'undefined') {
|
||||
measurementManagerDAL.updateTimepointData(lesionData);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Adds location data to trialPatientLocations array and returns locationUID
|
||||
var locationUID = measurementManagerDAL.addNewLocation(locationObj);
|
||||
// Linkk locationUID with activeLesionMeasurementData
|
||||
lesionData.locationUID = locationUID;
|
||||
|
||||
measurementManagerDAL.addLesionData(lesionData);
|
||||
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
Reference in new issue
Block a user