feature: Clinical Data Model Expansion & Observation Vocabulary
This commit is contained in:
@@ -14,6 +14,13 @@ public class PatientConfiguration : IEntityTypeConfiguration<Patient>
|
||||
builder.Property(p => p.DateOfBirth).HasColumnName("date_of_birth");
|
||||
builder.Property(p => p.Gender).HasColumnName("gender").HasMaxLength(10).IsRequired();
|
||||
builder.Property(p => p.Status).HasColumnName("status").HasMaxLength(20).HasDefaultValue("active");
|
||||
builder.Property(p => p.BloodType).HasColumnName("blood_type").HasMaxLength(5)
|
||||
.HasConversion(
|
||||
v => v!.Value.ToDbString(),
|
||||
v => BloodTypeExtensions.FromDbString(v));
|
||||
builder.Property(p => p.Allergies).HasColumnName("allergies");
|
||||
builder.Property(p => p.EmergencyContactName).HasColumnName("emergency_contact_name").HasMaxLength(200);
|
||||
builder.Property(p => p.EmergencyContactPhone).HasColumnName("emergency_contact_phone").HasMaxLength(20);
|
||||
builder.Property(p => p.CreatedAt).HasColumnName("created_at").HasDefaultValueSql("NOW()");
|
||||
|
||||
// MRN uses exact-match unique index — MRN lookups are always equality checks,
|
||||
|
||||
Reference in New Issue
Block a user