clinical:hipaa-logger

v2.0.4Published 6 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

clinical:hipaa-logger

Write HIPAA events to a logging collection. No UI provided.

====================================================

Installation

meteor add clinical:hipaa-logger

====================================================

Architecture

The clinical:hipaa-logger package is responsible for creating the HipaaLog collection, and writing entries to it. If you wish to display contents of the audit log, use the clinical:hipaa-audit-log package, and either add the {{> hipaaAuditLog}} template to your app, or connect a secondary app to the HipaaLog collection.

HipaaLog Architecture

====================================================

Basic Example

The HipaaLogger object accepts a HipaaEvent object

1HipaaLogger.logEvent({
2  eventType: "update",
3  userId: Meteor.userId(),
4  userName: Meteor.user().fullName(),
5  collectionName: "Medications",
6  recordId: Random.id(),
7  patientId: Session.get('currentPatientId'),
8  patientName: Session.get('currentPatientName')
9});

====================================================

HipaaLog.HipaaEvent.EventType

The following event types are recognized:

init
read
create
update
delete
denied
publish
unpublish

====================================================

Callback Example

In typical situations, HIPAA events will occur as parts of other functions, usually related to adding, viewing, or removing data. Attaching the HipaaLoger to callbacks and hooks is a best practice.

1Template.samplePage.events({
2  'click #saveButton': function (evt, tmpl) {
3    var self = this;
4
5    Vitals.update({_id: this._id},{$set:{
6      stared: true
7    }}, function(error, result){
8      if(error){
9        HipaaLogger.logEvent("error", Meteor.userId(), Meteor.user().profile.fullName, "Vitals", null, null, null, error);
10      }
11      if(result){
12        HipaaLogger.logEvent("create", Meteor.userId(), Meteor.user().profile.fullName, "Vitals", null, null, null, null);
13      }
14    });
15  }
16});

===========================

Contributors

This package was made possible through generous support from Artaic Health and their NIH Small Business Innovation Research Grant.

===========================

Licensing

MIT License