diff --git a/LesionTracker/.meteor/packages b/LesionTracker/.meteor/packages index 91343c364..a17d120ed 100644 --- a/LesionTracker/.meteor/packages +++ b/LesionTracker/.meteor/packages @@ -52,3 +52,5 @@ aldeed:template-extension@4.0.0 zuuk:stale-session gilbertwat:bootstrap3-daterangepicker email +peppelg:bootstrap-3-modal +simple:reactive-method diff --git a/LesionTracker/.meteor/versions b/LesionTracker/.meteor/versions index 8ff293c77..37f81bc2d 100644 --- a/LesionTracker/.meteor/versions +++ b/LesionTracker/.meteor/versions @@ -83,6 +83,7 @@ npm-bcrypt@0.7.8_2 npm-mongo@1.4.39_1 observe-sequence@1.0.7 ordered-dict@1.0.4 +peppelg:bootstrap-3-modal@1.0.4 practicalmeteor:chai@2.1.0_1 practicalmeteor:loglevel@1.2.0_2 promise@0.5.1 @@ -98,6 +99,7 @@ service-configuration@1.0.5 session@1.1.1 sha@1.0.4 silentcicero:jszip@0.0.4 +simple:reactive-method@1.0.2 spacebars@1.0.7 spacebars-compiler@1.0.7 srp@1.0.4 diff --git a/LesionTracker/client/routes.js b/LesionTracker/client/routes.js index 6beedb3f6..f983af0c1 100644 --- a/LesionTracker/client/routes.js +++ b/LesionTracker/client/routes.js @@ -26,7 +26,8 @@ var data = { 'associationModal', 'optionsModal', 'serverInformationModal', - 'confirmRemoveTimepointAssociation' + 'confirmRemoveTimepointAssociation', + 'lastLoginModal' ] }; diff --git a/LesionTracker/defaultSettings.js b/LesionTracker/defaultSettings.js index 2b1f48637..f7cb4245a 100644 --- a/LesionTracker/defaultSettings.js +++ b/LesionTracker/defaultSettings.js @@ -40,12 +40,8 @@ Meteor.startup(function() { // Bind events if window is closed $(window).bind('beforeunload', function (e) { - closingWindow(); // have to return null, unless you want a chrome popup alert - //return 'If you leave this page then any unsaved changes will be lost.'; + // return 'If you leave this page then any unsaved changes will be lost.'; }); }); -closingWindow = function(){ - Meteor.call('removeUserFromReviewers', Meteor.userId()); -}; diff --git a/Packages/active-entry/server/methods.js b/Packages/active-entry/server/methods.js index 5b6cbb1c1..5225148e9 100644 --- a/Packages/active-entry/server/methods.js +++ b/Packages/active-entry/server/methods.js @@ -123,7 +123,12 @@ Meteor.methods({ }, updateLastLoginDate: function () { - Meteor.users.update({_id: Meteor.userId()}, {$set: {lastLoginDate: new Date()}}); + var user = Meteor.users.findOne(Meteor.userId()); + if (!user) { + return; + } + // Update priorLoginDate and lastLoginDate + Meteor.users.update({_id: Meteor.userId()}, {$set: {priorLoginDate: user.lastLoginDate, lastLoginDate: new Date()}}); }, isAccountInactive: function (inactivityParameters) { diff --git a/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.html b/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.html index 9ea39789f..e24036ac0 100644 --- a/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.html +++ b/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.html @@ -16,7 +16,7 @@
{{entryTimestamp}}
- {{userName}} initialized HIPAA Audit Log. + {{userName}} initialized HIPAA Audit Log.
@@ -60,7 +60,7 @@
{{entryTimestamp}}
{{#if hasPatientInfo}} - {{userName}} modified record {{getRecordId}} in the {{getCollectionName}} collection, regarding patient {{getPatientName}}. + {{userName}} modified record {{getRecordId}} in the {{getCollectionName}} collection, regarding patient {{getPatientName}}. {{else}} {{userName}} modified record {{getRecordId}} in the {{getCollectionName}} collection. {{/if}} @@ -77,7 +77,7 @@
{{entryTimestamp}}
- {{userName}} cloned record {{getRecordId}} in the {{getCollectionName}} collection. + {{userName}} cloned record {{getRecordId}} in the {{getCollectionName}} collection.
@@ -90,7 +90,7 @@
{{entryTimestamp}}
- {{userName}} deleted record {{getRecordId}} in the {{getCollectionName}} collection. + {{userName}} deleted record {{getRecordId}} in the {{getCollectionName}} collection.
@@ -103,7 +103,7 @@
{{entryTimestamp}}
- {{userName}} was denied access to record {{getRecordId}} in the {{getCollectionName}} collection. + {{userName}} was denied access to record {{getRecordId}} in the {{getCollectionName}} collection.
@@ -117,9 +117,9 @@
{{entryTimestamp}}
{{#if hasPatientInfo}} - {{userName}} viewed record {{getRecordId}} in the {{getCollectionName}} collection, regarding patient {{getPatientName}}. + {{userName}} viewed record {{getRecordId}} in the {{getCollectionName}} collection, regarding patient {{getPatientName}}. {{else}} - {{userName}} viewed record {{getRecordId}} in the {{getCollectionName}} collection. + {{userName}} viewed record {{getRecordId}} in the {{getCollectionName}} collection. {{/if}}
@@ -133,7 +133,7 @@
{{entryTimestamp}}
- {{userName}} published record {{getRecordId}} in the {{getCollectionName}} collection. + {{userName}} published record {{getRecordId}} in the {{getCollectionName}} collection.
@@ -146,7 +146,7 @@
{{entryTimestamp}}
- {{userName}} unpublished record {{getRecordId}} in the {{getCollectionName}} collection. + {{userName}} unpublished record {{getRecordId}} in the {{getCollectionName}} collection.
@@ -159,7 +159,7 @@
{{entryTimestamp}}
- {{userName}} received a data access error while performing an action!
+ {{userName}} received a data access error while performing an action!
{{getErrorMessage}}
diff --git a/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.js b/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.js index acd458a9b..ffe8fc177 100644 --- a/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.js +++ b/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.js @@ -20,7 +20,7 @@ Template.hipaaAuditLog.helpers({ }, hipaaAudit: function () { // return HipaaLog.find(); - return HipaaLog.find({ + return HipaaLog.find({ $or: [ { userName: { @@ -33,6 +33,18 @@ Template.hipaaAuditLog.helpers({ $regex: Session.get('hipaaSearchFilter'), $options: 'i' } + }, + { + recordId: { + $regex: Session.get('hipaaSearchFilter'), + $options: 'i' + } + }, + { + collectionName: { + $regex: Session.get('hipaaSearchFilter'), + $options: 'i' + } } ], eventType: { @@ -54,6 +66,23 @@ Template.hipaaAuditLog.helpers({ Template.hipaaAuditLog.events({ "keyup #hipaaSearchFilter": function (event, template) { Session.set("hipaaSearchFilter", $('#hipaaSearchFilter').val()); + }, + "click .userName": function(event, template) { + var userName = $(event.currentTarget).text(); + Session.set('hipaaSearchFilter', userName); + }, + "click .patientName": function(event, template) { + var patientName = $(event.currentTarget).text(); + var patientNameRegex = patientName.replace(/[!@#$%^&*()+=\-[\]\\';,./{}|":<>?~_]/g, "\\$&"); + Session.set('hipaaSearchFilter', patientNameRegex); + }, + "click .mongoRecordId": function(event, template) { + var mongoRecordId = $(event.currentTarget).text(); + Session.set('hipaaSearchFilter', mongoRecordId); + }, + "click .collectionName": function(event, template) { + var collectionName = $(event.currentTarget).text(); + Session.set('hipaaSearchFilter', collectionName); } }); diff --git a/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.less b/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.less index 0d902457e..e600a3850 100644 --- a/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.less +++ b/Packages/hipaa-audit-log/components/hipaaAuditLog/hipaaAuditLog.less @@ -70,5 +70,9 @@ width: 100%; } + .userName, .patientName, .mongoRecordId, .collectionName{ + cursor: pointer; + } + } diff --git a/Packages/hipaa-audit-log/components/hipaaRibbon/hipaaRibbon.html b/Packages/hipaa-audit-log/components/hipaaRibbon/hipaaRibbon.html index c0a38264a..076b5e387 100644 --- a/Packages/hipaa-audit-log/components/hipaaRibbon/hipaaRibbon.html +++ b/Packages/hipaa-audit-log/components/hipaaRibbon/hipaaRibbon.html @@ -1,13 +1,17 @@