Resolved styling issues from Clinical Meteor packages, added HIPAA Audit Log package
This commit is contained in:
1 parent
98222abd0a
commit
2ea9eae0aa
28 files changed
+968
-22
No files matched your search
@@ -0,0 +1,171 @@
|
||||
|
||||
|
||||
|
||||
<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">
|
||||
<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.
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'access'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<i class="pull-left fa fa-database fa-2x lightgray"></i>
|
||||
<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">
|
||||
<i class="pull-left fa fa-plus-circle fa-2x lightgray"></i>
|
||||
<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">
|
||||
<i class="pull-left fa fa-pencil fa-2x lightgray"></i>
|
||||
<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>.
|
||||
{{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">
|
||||
<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.
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'delete'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<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.
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'denied'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<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.
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'viewed'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<i class="pull-left fa fa-eye fa-2x lightgray"></i>
|
||||
<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>.
|
||||
{{else}}
|
||||
<span style="{{getHighlightColor}}">{{userName}}</span> viewed record <span style="{{getHighlightColor}}">{{getRecordId}}</span> in the <span style="{{getHighlightColor}}">{{getCollectionName}}</span> collection.
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'publish'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<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.
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'unpublish'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<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.
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
{{#if logMessageType 'error'}}
|
||||
<li class="hipaaAuditItem list-group-item">
|
||||
<div class="media">
|
||||
<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="error">{{getErrorMessage}}</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{/if}}
|
||||
|
||||
|
||||
</template>
|
||||
@@ -0,0 +1,131 @@
|
||||
//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'
|
||||
}
|
||||
}
|
||||
],
|
||||
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());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
// 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,74 @@
|
||||
#hipaaAuditLog{
|
||||
padding-left: 0px !important;
|
||||
|
||||
li{
|
||||
list-style: none;
|
||||
padding-top: 5px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.gray{
|
||||
color: gray;
|
||||
}
|
||||
.lightgray{
|
||||
color: #aaaaaa;
|
||||
}
|
||||
.iconColumn{
|
||||
width: 10%;
|
||||
}
|
||||
.messageClumn{
|
||||
width: 80%;
|
||||
}
|
||||
.fa{
|
||||
padding-right: 12px;
|
||||
padding-left: 4px;
|
||||
padding-top: 6px;
|
||||
width: 40px;
|
||||
//border: 1px solid orange;
|
||||
}
|
||||
.fa-recycle{
|
||||
padding-top: 8px;
|
||||
}
|
||||
.fa-plus-circle{
|
||||
padding-left: 6px !important;
|
||||
}
|
||||
.fa-circle-o{
|
||||
padding-left: 6px !important;
|
||||
}
|
||||
.fa-minus-circle{
|
||||
padding-left: 6px !important;
|
||||
}
|
||||
.fa-database{
|
||||
padding-left: 7px !important;
|
||||
}
|
||||
.fa-pencil{
|
||||
padding-left: 6px !important;
|
||||
}
|
||||
.fa-code-fork{
|
||||
padding-left: 12px !important;
|
||||
}
|
||||
.fa-warning{
|
||||
padding-left: 5px !important
|
||||
}
|
||||
.fa-rss{
|
||||
padding-left: 7px !important;
|
||||
}
|
||||
|
||||
.hipaaAuditItem{
|
||||
border-top: 1px solid lightgray;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
.hipaaAuditItem:nth-child(1){
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
.media-body{
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
|
||||
#hipaaAuditLog{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<template name="hipaaLogPage">
|
||||
<div id="hipaaLogPage" class="page">
|
||||
{{> hipaaRibbon }}
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
{{> hipaaAuditLog}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,14 @@
|
||||
Router.route("/audit", {
|
||||
name:"hipaaAuditLogRoute",
|
||||
template:"hipaaLogPage"
|
||||
});
|
||||
|
||||
|
||||
Template.hipaaLogPage.helpers({});
|
||||
|
||||
Template.hipaaLogPage.events({});
|
||||
|
||||
// We probably don't need this, but the subscription in subscriptions.js doesn't seem to be working?
|
||||
Template.hipaaLogPage.onCreated(function() {
|
||||
this.subscribe('HipaaLog');
|
||||
})
|
||||
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
#hipaaLogPage{
|
||||
background-color: white;
|
||||
//padding-top: 80px;
|
||||
|
||||
#hipaaLogTitle{
|
||||
left: 30px;
|
||||
position: absolute;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<template name="hipaaRibbon">
|
||||
<aside id="hipaaRibbon" class="{{getRibbonClass}}">
|
||||
<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>
|
||||
</select>
|
||||
</aside>
|
||||
|
||||
</template>
|
||||
@@ -0,0 +1,99 @@
|
||||
Template.hipaaRibbon.events({
|
||||
'keyup #hipaaSearchFilter': function () {
|
||||
Session.set("hipaaSearchFilter", $('#hipaaSearchFilter').val());
|
||||
},
|
||||
"change #beginDateInput": function (event, template) {
|
||||
Session.set("beginDateFilter", $('#beginDateInput').val() + "T00:00:00.000Z");
|
||||
},
|
||||
"change #endDateInput": function (event, template) {
|
||||
Session.set("endDateFilter", $('#endDateInput').val() + "T00:00:00.000Z");
|
||||
},
|
||||
|
||||
'click #filterCreatedButton': function () {
|
||||
Session.set("hipaaTypeFilter", 'create');
|
||||
},
|
||||
'click #filterModifiedButton': function () {
|
||||
Session.set("hipaaTypeFilter", 'modify');
|
||||
},
|
||||
'click #filterViewedButton': function () {
|
||||
Session.set("hipaaTypeFilter", 'viewed');
|
||||
},
|
||||
'click #filterAllButton': function () {
|
||||
Session.set("hipaaTypeFilter", '');
|
||||
}
|
||||
});
|
||||
|
||||
var ribbonBreakPoint = 760;
|
||||
|
||||
|
||||
Meteor.startup(function(){
|
||||
$(window).resize(function(evt) {
|
||||
Session.set("ribbonWidth", $('#hipaaRibbon').width());
|
||||
});
|
||||
});
|
||||
|
||||
Template.hipaaRibbon.helpers({
|
||||
getSearchFilterStyling: function () {
|
||||
// spacing between inputs should be 20px each
|
||||
// if the overall width of the audit log is less than N, show the fullwidth
|
||||
if(Session.get('ribbonWidth') > ribbonBreakPoint){
|
||||
var searchFilterWidth = Session.get('ribbonWidth') - 575;
|
||||
return "margin-left: 10px; margin-right: 5px; width:" + searchFilterWidth + "px;";
|
||||
}else{
|
||||
var ribbonWidth = Session.get('ribbonWidth') - 40;
|
||||
return "width: " + ribbonWidth + "px; margin-left: 10px; margin-right: 10px;";
|
||||
}
|
||||
},
|
||||
getDateRangeStyling: function () {
|
||||
// spacing between inputs should be 20px each
|
||||
// date range inputs shouldn't be less than 170 px
|
||||
// if the overall width of the audit log is less than N, dont even show them
|
||||
if(Session.get('ribbonWidth') > ribbonBreakPoint){
|
||||
return "visbility: visible; margin-left: 5px; margin-right: 5px; width: 170px;";
|
||||
}else{
|
||||
return "display: none; visibility: hidden";
|
||||
}
|
||||
},
|
||||
getSelectStyling: function () {
|
||||
// spacing between inputs should be 20px each
|
||||
// select input should be the same as daterange
|
||||
if(Session.get('ribbonWidth') > ribbonBreakPoint){
|
||||
return "visbility: visible; margin-left: 5px; margin-right: 5px; width: 170px;";
|
||||
}else{
|
||||
return "display: none; visibility: hidden";
|
||||
}
|
||||
},
|
||||
getRibbonClass: function () {
|
||||
var hipaaAuditLog = Session.get('HipaaAuditLogConfig');
|
||||
if (hipaaAuditLog && hipaaAuditLog.classes) {
|
||||
return hipaaAuditLog.classes.ribbon;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getSelectClass: function () {
|
||||
var hipaaAuditLog = Session.get('HipaaAuditLogConfig');
|
||||
if (hipaaAuditLog && hipaaAuditLog.classes) {
|
||||
return hipaaAuditLog.classes.select;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getInputClass: function () {
|
||||
var hipaaAuditLog = Session.get('HipaaAuditLogConfig');
|
||||
if (hipaaAuditLog && hipaaAuditLog.classes) {
|
||||
return hipaaAuditLog.classes.input;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getHipaaSearchFilter: function () {
|
||||
return Session.get('hipaaSearchFilter');
|
||||
},
|
||||
getBeginDate: function () {
|
||||
return moment(Session.get("beginDateFilter")).format("YYYY-MM-DD");
|
||||
},
|
||||
getEndDate: function () {
|
||||
return moment(Session.get("endDateFilter")).format("YYYY-MM-DD");
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
#hipaaRibbon{
|
||||
position: static;
|
||||
width: 100%;
|
||||
padding-top: 10px;
|
||||
height: 60px;
|
||||
//background-color: lightgray;
|
||||
|
||||
input[type="date"]{
|
||||
padding-left: 10px;
|
||||
}
|
||||
input[type="text"]{
|
||||
// padding-left: 10px;
|
||||
// padding-right: 10px;
|
||||
}
|
||||
select{
|
||||
display: inline-block;
|
||||
height: 40px;
|
||||
// padding-left: 10px;
|
||||
// padding-right: 10px;
|
||||
}
|
||||
|
||||
#hipaaSearchFilter{
|
||||
color: black;
|
||||
}
|
||||
//---------------------------------------
|
||||
// Bootstrap users
|
||||
.form-control{
|
||||
display: inline-block !important;
|
||||
}
|
||||
}
|
||||
|
||||
// @media only screen and (max-width: 850px) {
|
||||
//
|
||||
// }
|
||||
@@ -0,0 +1 @@
|
||||
Meteor.subscribe('HipaaLog');
|
||||
Reference in new issue
Block a user