feature: Reconciliation Jobs

This commit is contained in:
voltsrage
2026-06-17 14:36:10 +08:00
parent 56d052aa4f
commit 101040f9d9
40 changed files with 2845 additions and 32 deletions
@@ -25,6 +25,15 @@ public class ReconciliationAlertConfiguration : IEntityTypeConfiguration<Reconci
builder.Property(r => r.ResolvedAt).HasColumnName("resolved_at");
builder.Property(r => r.CreatedAt).HasColumnName("created_at").HasDefaultValueSql("NOW()");
builder.HasOne(r => r.Encounter)
.WithMany()
.HasForeignKey(r => r.EncounterId)
.OnDelete(DeleteBehavior.SetNull);
builder.HasOne(r => r.Patient)
.WithMany()
.HasForeignKey(r => r.PatientId)
.OnDelete(DeleteBehavior.SetNull);
builder.HasIndex(r => new { r.CheckType, r.EncounterId })
.HasFilter("resolved_at IS NULL");
}