WIP reorganization
This commit is contained in:
1 parent
6706dfe634
commit
054e37dfb7
266 files changed
+98
-620
No files matched your search
@@ -0,0 +1,188 @@
|
||||
<template name="hipaaAuditLog">
|
||||
<ul id="hipaaAuditLog" class="list-group">
|
||||
{{#each hipaaAudit}}
|
||||
{{> hipaaEntry}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
<template name="hipaaEntry">
|
||||
{{#if logMessageType 'init'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-gears fa-2x"></i>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="small gray">{{entryTimestamp}}</span><br>
|
||||
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> initialized HIPAA Audit Log.
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'access'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-database fa-2x"></i>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="small gray">{{entryTimestamp}}</span><br>
|
||||
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> accessed record(s) <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'create'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-plus-circle fa-2x"></i>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="small gray">{{entryTimestamp}}</span><br>
|
||||
{{#if hasPatientInfo}}
|
||||
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> created 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> created record <span class="mongoRecordId" style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span class="collectionName" style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'modify'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-pencil fa-2x"></i>
|
||||
</div>
|
||||
<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" 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}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'clone'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-code-fork fa-2x"></i>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="small gray">{{entryTimestamp}}</span><br>
|
||||
<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>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'delete'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-minus-circle fa-2x"></i>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="small gray">{{entryTimestamp}}</span><br>
|
||||
<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>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'denied'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-warning fa-2x"></i>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="small gray">{{entryTimestamp}}</span><br>
|
||||
<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>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'viewed'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-eye fa-2x"></i>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="small gray">{{entryTimestamp}}</span><br>
|
||||
{{#if hasPatientInfo}}
|
||||
<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 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>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'publish'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-rss fa-2x"></i>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="small gray">{{entryTimestamp}}</span><br>
|
||||
<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>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'unpublish'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-circle-o fa-2x"></i>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="small gray">{{entryTimestamp}}</span><br>
|
||||
<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>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'error'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<div class="media-icon">
|
||||
<i class="fa fa-bomb fa-2x"></i>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<span class="small gray">{{entryTimestamp}}</span><br>
|
||||
<span class="userName" style="{{getHighlightColor}}">{{userName}}</span> received a data access error while performing an action!<br>
|
||||
<span class="error">{{getErrorMessage}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
</template>
|
||||
@@ -0,0 +1,160 @@
|
||||
//Hipaa = new Meteor.Collection("hipaa");
|
||||
|
||||
Session.setDefault("hipaaSearchFilter", '');
|
||||
Session.setDefault("hipaaTypeFilter", '');
|
||||
|
||||
// search window defaults to seven days in the past and one day in the future
|
||||
Session.setDefault("beginDateFilter", new Date(moment().subtract(7, "days")).toISOString());
|
||||
Session.setDefault("endDateFilter", new Date(moment().add(1, "days")).toISOString());
|
||||
|
||||
|
||||
|
||||
|
||||
Template.hipaaAuditLog.onRendered(function () {
|
||||
Session.set("ribbonWidth", $('#hipaaRibbon').width());
|
||||
});
|
||||
|
||||
Template.hipaaAuditLog.helpers({
|
||||
getHipaaSearchFilter: function () {
|
||||
return Session.get('hipaaSearchFilter');
|
||||
},
|
||||
hipaaAudit: function () {
|
||||
// return HipaaLog.find();
|
||||
return HipaaLog.find({
|
||||
$or: [
|
||||
{
|
||||
userName: {
|
||||
$regex: Session.get('hipaaSearchFilter'),
|
||||
$options: 'i'
|
||||
}
|
||||
},
|
||||
{
|
||||
patientName: {
|
||||
$regex: Session.get('hipaaSearchFilter'),
|
||||
$options: 'i'
|
||||
}
|
||||
},
|
||||
{
|
||||
recordId: {
|
||||
$regex: Session.get('hipaaSearchFilter'),
|
||||
$options: 'i'
|
||||
}
|
||||
},
|
||||
{
|
||||
collectionName: {
|
||||
$regex: Session.get('hipaaSearchFilter'),
|
||||
$options: 'i'
|
||||
}
|
||||
}
|
||||
],
|
||||
eventType: {
|
||||
$regex: Session.get("hipaaTypeFilter"),
|
||||
$options: 'i'
|
||||
},
|
||||
timestamp: {
|
||||
$lte: new Date(Session.get('endDateFilter')),
|
||||
$gte: new Date(Session.get('beginDateFilter'))
|
||||
}
|
||||
}, {
|
||||
sort: {
|
||||
timestamp: -1
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
// HIPAA EVENT RECORD
|
||||
|
||||
Template.hipaaEntry.helpers({
|
||||
getHighlightColor: function () {
|
||||
var hipaaAuditLog = Session.get('HipaaAuditLogConfig');
|
||||
if (hipaaAuditLog) {
|
||||
return "color:" + hipaaAuditLog.highlightColor;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getUserName: function () {
|
||||
if (this.userName) {
|
||||
return this.userName;
|
||||
} else {
|
||||
return "---";
|
||||
}
|
||||
},
|
||||
getPatientName: function () {
|
||||
if (this.patientName) {
|
||||
return this.patientName;
|
||||
} else {
|
||||
return "---";
|
||||
}
|
||||
},
|
||||
hasPatientInfo: function () {
|
||||
if (this.patientName) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
getErrorMessage: function () {
|
||||
if (this.message) {
|
||||
return this.message;
|
||||
} else {
|
||||
return "---";
|
||||
}
|
||||
},
|
||||
getCollectionName: function () {
|
||||
if (this.collectionName) {
|
||||
return this.collectionName;
|
||||
} else {
|
||||
return "---";
|
||||
}
|
||||
},
|
||||
getRecordId: function () {
|
||||
if (this.recordId) {
|
||||
return this.recordId;
|
||||
} else {
|
||||
return "---";
|
||||
}
|
||||
},
|
||||
entryTimestamp: function () {
|
||||
return moment(this.timestamp).format("YYYY, MMM DD, hh:mm A");
|
||||
},
|
||||
entryTime: function () {
|
||||
return moment(this.timestamp).format("HH:MM A");
|
||||
},
|
||||
entryDate: function () {
|
||||
return moment(this.timestamp).format("YYYY, MMM DD");
|
||||
},
|
||||
logMessageType: function (eventType) {
|
||||
if (this.eventType === eventType) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,54 @@
|
||||
#hipaaAuditLog{
|
||||
color: #fff;
|
||||
width: 100%;
|
||||
|
||||
.hipaaAuditItem {
|
||||
border: none;
|
||||
background-color: black;
|
||||
list-style: none;
|
||||
padding: 10px;
|
||||
line-height: 25px;
|
||||
|
||||
// There's a CSS rule on ohif-user-management that's changing the .hipaaAuditItem border style (w/ !important)
|
||||
&:first-child {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
&:not(:first-child) {
|
||||
border-top: 1px solid #436270;
|
||||
}
|
||||
|
||||
border-bottom: 1px solid #436270;
|
||||
|
||||
&:nth-child(even) {
|
||||
background-color: #151a1f;
|
||||
}
|
||||
|
||||
&:hover, &:active, &.active {
|
||||
background-color: #2c363f;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.item-icon {
|
||||
top: 12px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.media-icon {
|
||||
float: left;
|
||||
top: 12px;
|
||||
width: 40px;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.gray{
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.userName, .patientName, .mongoRecordId, .collectionName{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user