feature: PHI Column Encryption + Access Logging
This commit is contained in:
@@ -8,17 +8,20 @@ public class PhiAccessLogService : IPhiAccessLogService
|
||||
private readonly ICurrentUserService _currentUser;
|
||||
private readonly IHttpContextAccessor _http;
|
||||
private readonly PhiEncryptionOptions _options;
|
||||
private readonly ClinicalMetrics _metrics;
|
||||
|
||||
public PhiAccessLogService(
|
||||
AppDbContext db,
|
||||
ICurrentUserService currentUser,
|
||||
IHttpContextAccessor http,
|
||||
IOptions<PhiEncryptionOptions> options)
|
||||
IOptions<PhiEncryptionOptions> options,
|
||||
ClinicalMetrics metrics)
|
||||
{
|
||||
_db = db;
|
||||
_currentUser = currentUser;
|
||||
_http = http;
|
||||
_options = options.Value;
|
||||
_metrics = metrics;
|
||||
}
|
||||
|
||||
public async Task LogViewAsync(Guid patientId, string resourcePath) =>
|
||||
@@ -68,6 +71,8 @@ public class PhiAccessLogService : IPhiAccessLogService
|
||||
});
|
||||
|
||||
await _db.SaveChangesAsync();
|
||||
|
||||
_metrics.PhiAccessLogsTotal.WithLabels(accessType.ToDbString()).Inc();
|
||||
}
|
||||
|
||||
private static string HashQuery(string query)
|
||||
|
||||
Reference in New Issue
Block a user