LT-61: Record actions that create, modify, delete, associate timepoints, remove associations and login
- Show Last Login Date popup after login successful (WIP)
This commit is contained in:
1 parent
e277c4b484
commit
83e067b701
12 files changed
+187
-52
No files matched your search
+46
-8
@@ -37,7 +37,20 @@ function removeTimepointAssociations() {
|
||||
Meteor.call('removeAssociatedStudy', study._id, function(error) {
|
||||
if (error) {
|
||||
log.warn(error);
|
||||
return;
|
||||
}
|
||||
|
||||
// Log
|
||||
var hipaaEvent = {
|
||||
eventType: 'delete',
|
||||
userId: Meteor.userId(),
|
||||
userName: Meteor.user().profile.fullName,
|
||||
collectionName: "Studies",
|
||||
recordId: study.studyInstanceUid,
|
||||
patientId: study.patientId,
|
||||
patientName: study.patientName
|
||||
};
|
||||
HipaaLogger.logEvent(hipaaEvent);
|
||||
});
|
||||
|
||||
// Find the Timepoint that was previously referenced
|
||||
@@ -64,13 +77,38 @@ function removeTimepointAssociations() {
|
||||
studyInstanceUids: timepoint.studyInstanceUids
|
||||
}
|
||||
});
|
||||
|
||||
// Log
|
||||
var hipaaEvent = {
|
||||
eventType: 'modify',
|
||||
userId: Meteor.userId(),
|
||||
userName: Meteor.user().profile.fullName,
|
||||
collectionName: "Timepoints",
|
||||
recordId: study.timepointId,
|
||||
patientId: study.patientId,
|
||||
patientName: study.patientName
|
||||
};
|
||||
HipaaLogger.logEvent(hipaaEvent);
|
||||
} else {
|
||||
// If no more Studies are associated with this Timepoint, we should remove it
|
||||
// from the Timepoints Collection via a server call
|
||||
Meteor.call('removeTimepoint', timepoint._id, function(error) {
|
||||
if (error) {
|
||||
log.warn(error);
|
||||
return;
|
||||
}
|
||||
|
||||
// Log
|
||||
var hipaaEvent = {
|
||||
eventType: 'delete',
|
||||
userId: Meteor.userId(),
|
||||
userName: Meteor.user().profile.fullName,
|
||||
collectionName: "Timepoints",
|
||||
recordId: study.timepointId,
|
||||
patientId: study.patientId,
|
||||
patientName: study.patientName
|
||||
};
|
||||
HipaaLogger.logEvent(hipaaEvent);
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -81,10 +119,10 @@ function removeTimepointAssociations() {
|
||||
*/
|
||||
function exportSelectedStudies() {
|
||||
var selectedStudies = WorklistSelectedStudies.find({}, {
|
||||
sort: {
|
||||
studyDate: 1
|
||||
}
|
||||
}).fetch();
|
||||
sort: {
|
||||
studyDate: 1
|
||||
}
|
||||
}).fetch();
|
||||
|
||||
if (!selectedStudies) {
|
||||
return;
|
||||
@@ -98,10 +136,10 @@ function exportSelectedStudies() {
|
||||
*/
|
||||
function viewStudies() {
|
||||
var selectedStudies = WorklistSelectedStudies.find({}, {
|
||||
sort: {
|
||||
studyDate: 1
|
||||
}
|
||||
}).fetch();
|
||||
sort: {
|
||||
studyDate: 1
|
||||
}
|
||||
}).fetch();
|
||||
|
||||
if (!selectedStudies) {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user