OuhscBbmc / REDCapR

R utilities for interacting with REDCap
https://ouhscbbmc.github.io/REDCapR
Other
112 stars 46 forks source link

Logging (audit trail) #243

Closed wrlemast closed 5 years ago

wrlemast commented 5 years ago

I am trying to find a way to pull the logging data as a way of tracking employee productivity.

wibeasley commented 5 years ago

@wrlemast, I'm not seeing any API method to retrieve the logging info. If that doesn't exist, there's nothing for REDCapR to call.

Two options I see:

  1. pull from MySQL directly
  2. request the feature be added on the community site.

Both are feasible. I'm willing to discuss it more if you'd like.

wrlemast commented 5 years ago

@wibeasley, Thank you for a quick response. I would appreciate a discussion about pulling from MySQL.

I am very new to this (my training is in biochemistry), so please excuse me if I seem a little slow at this. Had a java class in college, I am very advanced in excel (used VBA a bunch). Also I use Power Bi.

My supervisor said that she would all me to get MySQL to complete this. How difficult is it to pull from MySQL?

Again, Thank you!

wrlemast commented 5 years ago

@wibeasley, Also I do not have access to the community site.

wibeasley commented 5 years ago

It's not my favorite that the community site isn't open to API developers. You'll need to talk to your REDCap admins for both requesting the feature on the site, and to access the underlying database.

Politically, they'll be understandably reluctant to open up the database to you. Maybe they'll be willing to regularly export a subset of data that pertains just to your project_id.

Technically, look around line 244 for the sql reading from the user table. You'd do something similar with the 'odbc' package (but pull from the table containing the audit info you want) https://github.com/OuhscBbmc/REDCapR/blob/master/vignettes/SecurityDatabase.Rmd

wibeasley commented 5 years ago

@wrlemast, I hope this effort accessing the database directly went well. Here is a recent thread that might be relevant (that your site REDCap admin can access and share):

https://community.projectredcap.org/questions/66080/logging-database-table-1.html