Cleanup around viewerbase and worklist

This commit is contained in:
Erik Ziegler committed 2015-11-06 15:29:09 +01:00
1 parent 0365e9963d
commit 5363880e40
19 files changed
+132 -115

No files matched your search

+2
View File
@@ -12,6 +12,8 @@ createStacks = function(study) {
if (!anInstance || !anInstance.rows) {
return;
}
series.studyInstanceUid = study.studyInstanceUid;
stacks.push(series);
});
return stacks;
+1 -5
View File
@@ -2,12 +2,8 @@ UI.registerHelper('formatDA', function (context, format, options) {
if (!context) {
return undefined;
}
/*var date = DICOMUtilities.toDate(context, '', false);
if(!date) {
return context;
}*/
var date = context;
var dateAsMoment = moment(date);
var dateAsMoment = moment(date, "YYYYMMDD");
var strFormat = "MMM D, YYYY";
if (options) {
strFormat = format;
@@ -1,5 +1,5 @@
UI.registerHelper('formatNumberPrecision', function(context, precision, options) {
if(context) {
if (context) {
return parseFloat(context).toFixed(precision);
}
});
+3 -16
View File
@@ -1,20 +1,7 @@
UI.registerHelper('formatDA', function (context, format, options) {
UI.registerHelper('formatPN', function (context, format, options) {
if (!context) {
return undefined;
}
var pn = context;
var str = '';
if(pn.prefix) {
str = pn.prefix + ' ';
}
str += (pn.familyName || '') + ', ';
str += (pn.givenName || '');
if(pn.middleName) {
str += ' ' + pn.middleName;
}
if(pn.suffix) {
str += ' ' + pn.suffix;
}
return str;
var patientName = context.replace('^', ', ');
return patientName;
});
+6 -5
View File
@@ -10,9 +10,10 @@ addMetaData = function(imageId, data) {
var metaData = {};
metaData.study = {
date: instanceMetaData.studyDate,
time: instanceMetaData.studyTime,
description: instanceMetaData.studyDescription
instanceUid: studyMetaData.studyInstanceUid,
date: studyMetaData.studyDate,
time: studyMetaData.studyTime,
description: studyMetaData.studyDescription
};
metaData.series = {
@@ -29,8 +30,8 @@ addMetaData = function(imageId, data) {
};
metaData.patient = {
name: instanceMetaData.patientName,
id: instanceMetaData.patientId
name: studyMetaData.patientName,
id: studyMetaData.patientId
};
// If there is sufficient information, populate