feature: PHI Column Encryption + Access Logging
This commit is contained in:
@@ -9,11 +9,13 @@ public static class PatientPhiConverterConfigurator
|
||||
var entity = modelBuilder.Entity<Patient>();
|
||||
|
||||
entity.Property(p => p.FirstName)
|
||||
.HasColumnType("text")
|
||||
.HasConversion(
|
||||
v => crypto.Encrypt(v),
|
||||
v => crypto.Decrypt(v));
|
||||
|
||||
entity.Property(p => p.LastName)
|
||||
.HasColumnType("text")
|
||||
.HasConversion(
|
||||
v => crypto.Encrypt(v),
|
||||
v => crypto.Decrypt(v));
|
||||
@@ -24,11 +26,13 @@ public static class PatientPhiConverterConfigurator
|
||||
v => v == null ? null : crypto.Decrypt(v));
|
||||
|
||||
entity.Property(p => p.EmergencyContactName)
|
||||
.HasColumnType("text")
|
||||
.HasConversion(
|
||||
v => v == null ? null! : crypto.Encrypt(v),
|
||||
v => v == null ? null : crypto.Decrypt(v));
|
||||
|
||||
entity.Property(p => p.EmergencyContactPhone)
|
||||
.HasColumnType("text")
|
||||
.HasConversion(
|
||||
v => v == null ? null! : crypto.Encrypt(v),
|
||||
v => v == null ? null : crypto.Decrypt(v));
|
||||
|
||||
Reference in New Issue
Block a user