LT-61: Search by User Name, Patient Name, Study InstanceUid and Action Type

This commit is contained in:
Aysel Afsar 2016-04-06 14:48:21 -04:00
parent 83e067b701
commit 2a89e5c7e2
6 changed files with 71 additions and 17 deletions

View File

@ -16,7 +16,7 @@
<i class="pull-left fa fa-gears fa-2x lightgray"></i>
<div class="media-body">
<span class="small gray">{{entryTimestamp}}</span><br>
<span style="{{getHighlightColor}}">{{userName}}</span> initialized HIPAA Audit Log.
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> initialized HIPAA Audit Log.
</div>
</div>
</li>
@ -60,7 +60,7 @@
<div class="media-body">
<span class="small gray">{{entryTimestamp}}</span><br>
{{#if hasPatientInfo}}
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> modified record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection, regarding patient <span class="patientName {{getHighlightColor}}">{{getPatientName}}</span>.
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> modified record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection, regarding patient <span class="patientName" style="{{getHighlightColor}}">{{getPatientName}}</span>.
{{else}}
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> modified record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
{{/if}}
@ -77,7 +77,7 @@
<i class="pull-left fa fa-code-fork fa-2x lightgray"></i>
<div class="media-body">
<span class="small gray">{{entryTimestamp}}</span><br>
<span style="{{getHighlightColor}}">{{userName}}</span> cloned record <span style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> cloned record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
</div>
</div>
</li>
@ -90,7 +90,7 @@
<i class="pull-left fa fa-minus-circle fa-2x lightgray"></i>
<div class="media-body">
<span class="small gray">{{entryTimestamp}}</span><br>
<span style="{{getHighlightColor}}">{{userName}}</span> deleted record <span style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> deleted record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
</div>
</div>
</li>
@ -103,7 +103,7 @@
<i class="pull-left fa fa-warning fa-2x lightgray"></i>
<div class="media-body">
<span class="small gray">{{entryTimestamp}}</span><br>
<span style="{{getHighlightColor}}">{{userName}}</span> was denied access to record <span style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> was denied access to record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
</div>
</div>
</li>
@ -117,9 +117,9 @@
<div class="media-body">
<span class="small gray">{{entryTimestamp}}</span><br>
{{#if hasPatientInfo}}
<span style="{{getHighlightColor}}">{{userName}}</span> viewed record <span style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span style="{{getHighlightColor}}">{{getCollectionName}}</span> collection, regarding patient <span style="{{getHighlightColor}}">{{getPatientName}}</span>.
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> viewed record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection, regarding patient <span class="patientName" style="{{getHighlightColor}}">{{getPatientName}}</span>.
{{else}}
<span style="{{getHighlightColor}}">{{userName}}</span> viewed record <span style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> viewed record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
{{/if}}
</div>
</div>
@ -133,7 +133,7 @@
<i class="pull-left fa fa-rss fa-2x lightgray"></i>
<div class="media-body">
<span class="small gray">{{entryTimestamp}}</span><br>
<span style="{{getHighlightColor}}">{{userName}}</span> published record <span style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> published record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
</div>
</div>
</li>
@ -146,7 +146,7 @@
<i class="pull-left fa fa-circle-o fa-2x lightgray"></i>
<div class="media-body">
<span class="small gray">{{entryTimestamp}}</span><br>
<span style="{{getHighlightColor}}">{{userName}}</span> unpublished record <span style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> unpublished record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
</div>
</div>
</li>
@ -159,7 +159,7 @@
<i class="pull-left fa fa-bomb fa-2x lightgray"></i>
<div class="media-body">
<span class="small gray">{{entryTimestamp}}</span><br>
<span style="{{getHighlightColor}}">{{userName}}</span> received a data access error while performing an action!<br>
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> received a data access error while performing an action!<br>
<span class="error">{{getErrorMessage}}</span>
</div>

View File

@ -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);
}
});

View File

@ -70,5 +70,9 @@
width: 100%;
}
.userName, .patientName, .mongoRecordId, .collectionName{
cursor: pointer;
}
}

View File

@ -1,13 +1,17 @@
<template name="hipaaRibbon">
<aside id="hipaaRibbon" class="{{getRibbonClass}}">
<input type="text" name="hipaaSearchFilter" id="hipaaSearchFilter" class="{{getInputClass}}" value="{{getHipaaSearchFilter}}" placeholder="Search User" style="{{getSearchFilterStyling}}">
<div class="btn-group">
<input type="text" name="hipaaSearchFilter" id="hipaaSearchFilter" class="{{getInputClass}}" value="{{getHipaaSearchFilter}}" placeholder="Search User" style="{{getSearchFilterStyling}}">
<span id="searchClear" class="glyphicon glyphicon-remove-circle"></span>
</div>
<!--<input type="text" name="hipaaSearchFilter" id="hipaaSearchFilter" class="{{getInputClass}}" value="{{getHipaaSearchFilter}}" placeholder="Search User" style="{{getSearchFilterStyling}}">-->
<input type="date" id="beginDateInput" class="{{getInputClass}}" value="{{getBeginDate}}" style="{{getDateRangeStyling}}">
<input type="date" id="endDateInput" class="{{getInputClass}}" value="{{getEndDate}}" style="{{getDateRangeStyling}}">
<select id="actionFilter" name="actionFilter" class="{{getSelectClass}}" style="{{getSelectStyling}}">
<option id="filterCreatedButton">Created</option>
<option id="filterModifiedButton">Modified</option>
<option id="filterViewedButton">Viewed</option>
<option id="filterAllButton">All</option>
<option id="filterCreatedButton" value="create">Created</option>
<option id="filterModifiedButton" value="modify">Modified</option>
<option id="filterViewedButton" value="viewed">Viewed</option>
<option id="filterAllButton" selected value="">All</option>
</select>
</aside>

View File

@ -8,7 +8,10 @@ Template.hipaaRibbon.events({
"change #endDateInput": function (event, template) {
Session.set("endDateFilter", $('#endDateInput').val() + "T00:00:00.000Z");
},
'change #actionFilter': function(e) {
var actionType = e.currentTarget.value;
Session.set("hipaaTypeFilter", actionType);
},
'click #filterCreatedButton': function () {
Session.set("hipaaTypeFilter", 'create');
},
@ -20,6 +23,9 @@ Template.hipaaRibbon.events({
},
'click #filterAllButton': function () {
Session.set("hipaaTypeFilter", '');
},
'click #searchClear': function() {
Session.set("hipaaSearchFilter", '');
}
});

View File

@ -28,6 +28,17 @@
.form-control{
display: inline-block !important;
}
#searchClear {
position: absolute;
right: 14px;
top: 0;
bottom: 0;
height: 14px;
margin: auto;
font-size: 14px;
cursor: pointer;
color: #ccc;
}
}
// @media only screen and (max-width: 850px) {