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,72 @@
|
||||
|
||||
describe('clinical:hipaa-audit-log', function () {
|
||||
var server = meteor();
|
||||
var client = browser(server);
|
||||
|
||||
// beforeEach(function () {
|
||||
// server.execute(function () {
|
||||
//
|
||||
// }).then(function (value){
|
||||
//
|
||||
// });
|
||||
// });
|
||||
// afterEach(function () {
|
||||
// server.execute(function () {
|
||||
//
|
||||
// });
|
||||
// });
|
||||
|
||||
it('HipaaLogger should exist on the client', function () {
|
||||
return client.execute(function () {
|
||||
expect(HipaaLogger).to.exist;
|
||||
});
|
||||
});
|
||||
|
||||
it('HipaaLogger should exist on the server', function () {
|
||||
return server.execute(function () {
|
||||
expect(HipaaLogger).to.exist;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it("HipaaLogger can log events on the client", function () {
|
||||
return client.execute(function () {
|
||||
HipaaLogger.logEvent({
|
||||
eventType: "modified",
|
||||
userId: "janedoe",
|
||||
userName: "Jane Doe",
|
||||
collectionName: "Medications",
|
||||
recordId: "123",
|
||||
patientId: "123",
|
||||
patientName: "abc"
|
||||
});
|
||||
return HipaaLog.findOne();
|
||||
}).then(function (eventRecord){
|
||||
server.wait(500, "", function (){
|
||||
expect(eventRecord).to.exist;
|
||||
expect(eventRecord.userId).to.equal("janedoe");
|
||||
expect(eventRecord.userName).to.equal("Jane Doe");
|
||||
});
|
||||
});
|
||||
});
|
||||
it("HipaaLogger can log events on the server", function () {
|
||||
return server.execute(function () {
|
||||
HipaaLogger.logEvent({
|
||||
eventType: "modified",
|
||||
userId: "janedoe",
|
||||
userName: "Jane Doe",
|
||||
collectionName: "Medications",
|
||||
recordId: "123",
|
||||
patientId: "123",
|
||||
patientName: "abc"
|
||||
});
|
||||
|
||||
var eventRecord = HipaaLog.findOne();
|
||||
|
||||
expect(eventRecord).to.exist;
|
||||
expect(eventRecord.userId).to.equal("janedoe");
|
||||
expect(eventRecord.userName).to.equal("Jane Doe");
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
|
||||
|
||||
|
||||
exports.command = function(rowIndex, hipaaEvent) {
|
||||
this
|
||||
.verify.elementPresent("#hipaaAuditLog .hipaaAuditItem:nth-child(" + rowIndex + ")")
|
||||
|
||||
if(hipaaEvent.type === "create"){
|
||||
this
|
||||
.verify.elementPresent("#hipaaAuditLog .hipaaAuditItem:nth-child(" + rowIndex + ") .userName", hipaaEvent.userName)
|
||||
.verify.elementPresent("#hipaaAuditLog .hipaaAuditItem:nth-child(" + rowIndex + ") .recordId", hipaaEvent.recordId)
|
||||
.verify.elementPresent("#hipaaAuditLog .hipaaAuditItem:nth-child(" + rowIndex + ") .collectionName", hipaaEvent.collectionName)
|
||||
|
||||
if(hipaaEvent.patientName){
|
||||
this.verify.elementPresent("#hipaaAuditLog .hipaaAuditItem:nth-child(" + rowIndex + ") .patientName", hipaaEvent.patientName)
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
exports.command = function() {
|
||||
this
|
||||
.verify.elementPresent("#hipaaLogPage")
|
||||
.verify.elementPresent("#hipaaAuditLog")
|
||||
|
||||
return this;
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
|
||||
|
||||
|
||||
|
||||
// syncrhonous version; doesn't work well
|
||||
/*exports.command = function(hipaaEvent, timeout) {
|
||||
var client = this;
|
||||
this
|
||||
.execute(function(data){
|
||||
return HipaaLogger.logEventObject(data);
|
||||
}, [hipaaEvent], function(result){
|
||||
console.log("result.value", result.value);
|
||||
client.assert.ok(result.value);
|
||||
}).pause(1000)
|
||||
return this;
|
||||
};*/
|
||||
|
||||
|
||||
|
||||
|
||||
// async version calls method on the server
|
||||
exports.command = function(hipaaEvent, timeout) {
|
||||
var client = this;
|
||||
if (!timeout) {
|
||||
timeout = 5000;
|
||||
}
|
||||
|
||||
this
|
||||
.timeoutsAsyncScript(timeout)
|
||||
.executeAsync(function(data, meteorCallback){
|
||||
//return HipaaLogger.logEventObject(data);
|
||||
Meteor.call('logHipaaEvent', data, function(meteorError, meteorResult){
|
||||
var response = (meteorError ? { error: meteorError } : { result: meteorResult });
|
||||
meteorCallback(response);
|
||||
})
|
||||
}, [hipaaEvent], function(result){
|
||||
console.log("result.value", result.value);
|
||||
client.assert.ok(result.value);
|
||||
}).pause(1000)
|
||||
return this;
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
describe('clinical:hipaa-audit-log', function () {
|
||||
|
||||
describe('user interface', function () {
|
||||
it.client('displays an audit log', function () {
|
||||
|
||||
});
|
||||
it.client('has a search button', function () {
|
||||
|
||||
});
|
||||
it.client('has filter buttons', function () {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
describe('server functionality', function () {
|
||||
it.client('logs hipaa events to a HIPAA collection', function () {
|
||||
|
||||
});
|
||||
|
||||
it.client('doesnt allow users to delete or modify events', function () {
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user