Cleanup around viewerbase and worklist
This commit is contained in:
1 parent
0365e9963d
commit
5363880e40
19 files changed
+132
-115
No files matched your search
@@ -12,6 +12,8 @@ createStacks = function(study) {
|
||||
if (!anInstance || !anInstance.rows) {
|
||||
return;
|
||||
}
|
||||
|
||||
series.studyInstanceUid = study.studyInstanceUid;
|
||||
stacks.push(series);
|
||||
});
|
||||
return stacks;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
});
|
||||
@@ -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;
|
||||
});
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user