Browse Source

危警值数据表

master
wxd 1 year ago
parent
commit
e704ab4ba7
  1. 37
      src/Shentun.Peis.Domain/Asbitems/Asbitem.cs
  2. 15
      src/Shentun.Peis.Domain/CriticalFollowValueTypes/CriticalFollowValueType.cs
  3. 18
      src/Shentun.Peis.Domain/CriticalValues/CriticalFollowValue.cs
  4. 37
      src/Shentun.Peis.Domain/Items/Item.cs
  5. 11
      src/Shentun.Peis.Domain/ReferenceRanges/ReferenceRange.cs
  6. 6
      src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs
  7. 6
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/Asbitems/AsbitemDbMapping.cs
  8. 4
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/CriticalFollowValueTypes/CriticalFollowValueTypeDbMapping.cs
  9. 6
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/CriticalValues/CriticalValueDbMapping.cs
  10. 5
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/Items/ItemDbMapping.cs
  11. 6
      src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs

37
src/Shentun.Peis.Domain/Asbitems/Asbitem.cs

@ -190,18 +190,31 @@ namespace Shentun.Peis.Models
[Column("for_pregnant_flag")] [Column("for_pregnant_flag")]
public char ForPregnantFlag { get; set; } public char ForPregnantFlag { get; set; }
///// <summary>
///// 备孕期间禁止检查
///// </summary>
//[MaxLength(1)]
//[Column("is_disable_prepare_pregnancy")]
//public char IsDisablePreparePregnancy { get; set; }
///// <summary>
///// 怀孕期间禁止检查
///// </summary>
//[MaxLength(1)]
//[Column("is_disable_pregnancy")]
//public char IsDisablePregnancy { get; set; }
/// <summary>
/// 是否启用危急值函数 Y N
/// </summary>
[Column("is_critical_value_function")]
public char IsCriticalValueFunction { get; set; }
/// <summary>
/// 危急值函数
/// </summary>
[Column("critical_value_function")]
public string CriticalValueFunction { get; set; }
/// <summary>
/// 是否启用随访函数 Y N
/// </summary>
[Column("is_follow_up_function")]
public char IsFollowUpFunction { get; set; }
/// <summary>
/// 随访函数
/// </summary>
[Column("follow_up_function")]
public string FollowUpFunction { get; set; }
[Column("concurrency_stamp")] [Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; } public string ConcurrencyStamp { get; set; }

15
src/Shentun.Peis.Domain/CriticalValueTypes/CriticalValueType.cs → src/Shentun.Peis.Domain/CriticalFollowValueTypes/CriticalFollowValueType.cs

@ -11,13 +11,14 @@ namespace Shentun.Peis.Models
/// <summary> /// <summary>
/// 危急值类别 /// 危急值类别
/// </summary> /// </summary>
[Table("critical_value_type")]
[Index(nameof(DisplayName), Name = "ix_critical_value_type", IsUnique = true)]
public class CriticalValueType : AuditedEntity<Guid>, IHasConcurrencyStamp
[Table("critical_follow_value_type")]
[Index(nameof(DisplayName), Name = "ix_critical_follow_value_type", IsUnique = true)]
public class CriticalFollowValueType : AuditedEntity<Guid>, IHasConcurrencyStamp
{ {
public CriticalValueType()
public CriticalFollowValueType()
{ {
CriticalValues = new HashSet<CriticalValue>();
CriticalValues = new HashSet<CriticalFollowValue>();
} }
/// <summary> /// <summary>
@ -57,8 +58,8 @@ namespace Shentun.Peis.Models
//[StringLength(40)] //[StringLength(40)]
//public string ConcurrencyStamp { get; set; } = null!; //public string ConcurrencyStamp { get; set; } = null!;
[InverseProperty(nameof(CriticalValue.CriticalValueType))]
public virtual ICollection<CriticalValue> CriticalValues { get; set; }
[InverseProperty(nameof(CriticalFollowValue.CriticalValueType))]
public virtual ICollection<CriticalFollowValue> CriticalValues { get; set; }
//public override object[] GetKeys() //public override object[] GetKeys()
//{ //{

18
src/Shentun.Peis.Domain/CriticalValues/CriticalValue.cs → src/Shentun.Peis.Domain/CriticalValues/CriticalFollowValue.cs

@ -11,11 +11,11 @@ namespace Shentun.Peis.Models
/// <summary> /// <summary>
/// 危急值关键字设置 /// 危急值关键字设置
/// </summary> /// </summary>
[Table("critical_value")]
[Index(nameof(DisplayName), Name = "ix_critical_value", IsUnique = true)]
public class CriticalValue : AuditedEntity<Guid>, IHasConcurrencyStamp
[Table("critical_follow_value")]
[Index(nameof(DisplayName), Name = "ix_critical_follow_value", IsUnique = true)]
public class CriticalFollowValue : AuditedEntity<Guid>, IHasConcurrencyStamp
{ {
/// <summary> /// <summary>
/// 名称 /// 名称
/// </summary> /// </summary>
@ -28,7 +28,13 @@ namespace Shentun.Peis.Models
/// </summary> /// </summary>
[Column("critical_value_type_id")] [Column("critical_value_type_id")]
public Guid CriticalValueTypeId { get; set; }
public Guid CriticalValueTypeId { get; set; }
/// <summary>
/// 危急随访值标志 0-危急值,1-随访值
/// </summary>
[Column("critical_follow_value_flag")]
public char CriticalFollowValueFlag { get; set; }
[Column("display_order")] [Column("display_order")]
@ -52,7 +58,7 @@ namespace Shentun.Peis.Models
[ForeignKey(nameof(CriticalValueTypeId))] [ForeignKey(nameof(CriticalValueTypeId))]
[InverseProperty("CriticalValues")] [InverseProperty("CriticalValues")]
public virtual CriticalValueType CriticalValueType { get; set; } = null!;
public virtual CriticalFollowValueType CriticalValueType { get; set; } = null!;
//public override object[] GetKeys() //public override object[] GetKeys()
//{ //{

37
src/Shentun.Peis.Domain/Items/Item.cs

@ -161,17 +161,32 @@ namespace Shentun.Peis.Models
public string ConcurrencyStamp { get; set; } public string ConcurrencyStamp { get; set; }
//[Column("last_modifier_id")]
//public Guid LastModifierId { get; set; }
//[Column("last_modification_time", TypeName = "timestamp without time zone")]
//public DateTime LastModificationTime { get; set; }
//[Column("creator_id")]
//public Guid CreatorId { get; set; }
//[Column("creation_time", TypeName = "timestamp without time zone")]
//public DateTime CreationTime { get; set; }
//[Column("concurrency_stamp")]
//[StringLength(40)]
//public string ConcurrencyStamp { get; set; } = null!;
/// <summary>
/// 是否启用危急值函数 Y N
/// </summary>
[Column("is_critical_value_function")]
public char IsCriticalValueFunction { get; set; }
/// <summary>
/// 危急值函数
/// </summary>
[Column("critical_value_function")]
public string CriticalValueFunction { get; set; }
/// <summary>
/// 是否启用随访函数 Y N
/// </summary>
[Column("is_follow_up_function")]
public char IsFollowUpFunction { get; set; }
/// <summary>
/// 随访函数
/// </summary>
[Column("follow_up_function")]
public string FollowUpFunction { get; set; }
[ForeignKey(nameof(ItemTypeId))] [ForeignKey(nameof(ItemTypeId))]
[InverseProperty("Items")] [InverseProperty("Items")]

11
src/Shentun.Peis.Domain/ReferenceRanges/ReferenceRange.cs

@ -50,8 +50,17 @@ namespace Shentun.Peis.Models
/// 危急值 /// 危急值
/// </summary> /// </summary>
[Column("critical_range_value")] [Column("critical_range_value")]
[StringLength(50)]
[StringLength(150)]
public string? CriticalRangeValue { get; set; } public string? CriticalRangeValue { get; set; }
/// <summary>
/// 随访范围值
/// </summary>
[Column("follow_up_range_value")]
[StringLength(150)]
public string? FollowUpRangeValue { get; set; }
/// <summary> /// <summary>
/// 偏低诊断 /// 偏低诊断
/// </summary> /// </summary>

6
src/Shentun.Peis.Domain/RegisterChecks/RegisterCheck.cs

@ -163,11 +163,7 @@ namespace Shentun.Peis.Models
/// </summary> /// </summary>
[Column("sign_in_time")] [Column("sign_in_time")]
public DateTime? SignInTime { get; set; } public DateTime? SignInTime { get; set; }
///// <summary>
///// 检查组合项目记录ID
///// </summary>
//[Column("register_asbitem_id")]
//public Guid RegisterAsbitemId { get; set; }
/// <summary> /// <summary>
/// lis审核医生 /// lis审核医生

6
src/Shentun.Peis.EntityFrameworkCore/DbMapping/Asbitems/AsbitemDbMapping.cs

@ -38,8 +38,10 @@ namespace Shentun.Peis.DbMapping
entity.Property(t => t.BarcodeMode).HasComment("条码模式").IsRequired().HasDefaultValueSql("'0'"); entity.Property(t => t.BarcodeMode).HasComment("条码模式").IsRequired().HasDefaultValueSql("'0'");
entity.Property(t => t.IsWebAppoint).HasComment("是否支持网上预约").IsRequired().HasDefaultValueSql("'Y'"); entity.Property(t => t.IsWebAppoint).HasComment("是否支持网上预约").IsRequired().HasDefaultValueSql("'Y'");
entity.Property(t => t.ForPregnantFlag).HasComment("备怀孕期间禁止检查").IsRequired().HasDefaultValueSql("'A'"); entity.Property(t => t.ForPregnantFlag).HasComment("备怀孕期间禁止检查").IsRequired().HasDefaultValueSql("'A'");
//entity.Property(t => t.IsDisablePreparePregnancy).HasComment("备孕期间禁止检查").IsRequired().HasDefaultValueSql("'N'");
//entity.Property(t => t.IsDisablePregnancy).HasComment("怀孕期间禁止检查").IsRequired().HasDefaultValueSql("'N'");
entity.Property(t => t.IsCriticalValueFunction).HasComment("是否启用危急值函数").IsRequired().HasDefaultValue("'N'");
entity.Property(t => t.CriticalValueFunction).HasComment("危急值函数");
entity.Property(t => t.IsFollowUpFunction).HasComment("是否启用随访函数").IsRequired().HasDefaultValue("'N'");
entity.Property(t => t.FollowUpFunction).HasComment("随访函数");
entity.Property(e => e.Id) entity.Property(e => e.Id)
.IsFixedLength() .IsFixedLength()
.HasComment("编号").HasColumnName("id"); .HasComment("编号").HasColumnName("id");

4
src/Shentun.Peis.EntityFrameworkCore/DbMapping/CriticalValueTypes/CriticalValueTypeDbMapping.cs → src/Shentun.Peis.EntityFrameworkCore/DbMapping/CriticalFollowValueTypes/CriticalFollowValueTypeDbMapping.cs

@ -10,9 +10,9 @@ using System.Threading.Tasks;
namespace Shentun.Peis.DbMapping namespace Shentun.Peis.DbMapping
{ {
internal class CriticalValueTypeDbMapping : IEntityTypeConfiguration<CriticalValueType>
internal class CriticalFollowValueTypeDbMapping : IEntityTypeConfiguration<CriticalFollowValueType>
{ {
public void Configure(EntityTypeBuilder<CriticalValueType> entity)
public void Configure(EntityTypeBuilder<CriticalFollowValueType> entity)
{ {
entity.HasComment("危急值类别"); entity.HasComment("危急值类别");
entity.Property(t => t.DisplayName).HasComment("名称").IsRequired(); entity.Property(t => t.DisplayName).HasComment("名称").IsRequired();

6
src/Shentun.Peis.EntityFrameworkCore/DbMapping/CriticalValues/CriticalValueDbMapping.cs

@ -10,14 +10,16 @@ using System.Threading.Tasks;
namespace Shentun.Peis.DbMapping namespace Shentun.Peis.DbMapping
{ {
internal class CriticalValueDbMapping : IEntityTypeConfiguration<CriticalValue>
internal class CriticalValueDbMapping : IEntityTypeConfiguration<CriticalFollowValue>
{ {
public void Configure(EntityTypeBuilder<CriticalValue> entity)
public void Configure(EntityTypeBuilder<CriticalFollowValue> entity)
{ {
entity.HasComment("危急值关键字设置"); entity.HasComment("危急值关键字设置");
entity.Property(t => t.DisplayName).HasComment("名称").IsRequired(); entity.Property(t => t.DisplayName).HasComment("名称").IsRequired();
entity.Property(t => t.CriticalValueTypeId).HasComment("危急值类别编号").IsRequired().IsFixedLength(); entity.Property(t => t.CriticalValueTypeId).HasComment("危急值类别编号").IsRequired().IsFixedLength();
entity.Property(t => t.CriticalFollowValueFlag).HasComment("危急随访值标志").IsRequired();
entity.Property(e => e.Id).IsFixedLength().IsRequired(); entity.Property(e => e.Id).IsFixedLength().IsRequired();
//entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");

5
src/Shentun.Peis.EntityFrameworkCore/DbMapping/Items/ItemDbMapping.cs

@ -37,6 +37,11 @@ namespace Shentun.Peis.DbMapping
entity.Property(t => t.IsActive).HasComment("启用").IsRequired().HasDefaultValueSql("'Y'"); entity.Property(t => t.IsActive).HasComment("启用").IsRequired().HasDefaultValueSql("'Y'");
entity.Property(t => t.LineModeFlag).HasComment("项目结果行模式").HasDefaultValue('2').IsRequired(); entity.Property(t => t.LineModeFlag).HasComment("项目结果行模式").HasDefaultValue('2').IsRequired();
entity.Property(t => t.IsCriticalValueFunction).HasComment("是否启用危急值函数").IsRequired().HasDefaultValue("'N'");
entity.Property(t => t.CriticalValueFunction).HasComment("危急值函数");
entity.Property(t => t.IsFollowUpFunction).HasComment("是否启用随访函数").IsRequired().HasDefaultValue("'N'");
entity.Property(t => t.FollowUpFunction).HasComment("随访函数");
entity.Property(e => e.Id).IsFixedLength(); entity.Property(e => e.Id).IsFixedLength();
//entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)"); //entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");

6
src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs

@ -166,8 +166,8 @@ public class PeisDbContext :
public DbSet<CommonCharType> CommonCharTypes { get; set; } = null!; public DbSet<CommonCharType> CommonCharTypes { get; set; } = null!;
public DbSet<ContactMethod> ContactMethods { get; set; } = null!; public DbSet<ContactMethod> ContactMethods { get; set; } = null!;
public DbSet<ContactPerson> ContactPeople { get; set; } = null!; public DbSet<ContactPerson> ContactPeople { get; set; } = null!;
public DbSet<CriticalValue> CriticalValues { get; set; } = null!;
public DbSet<CriticalValueType> CriticalValueTypes { get; set; } = null!;
public DbSet<CriticalFollowValue> CriticalValues { get; set; } = null!;
public DbSet<CriticalFollowValueType> CriticalValueTypes { get; set; } = null!;
public DbSet<CustomerOrg> CustomerOrgs { get; set; } = null!; public DbSet<CustomerOrg> CustomerOrgs { get; set; } = null!;
public DbSet<CustomerOrgCharge> CustomerOrgCharges { get; set; } = null!; public DbSet<CustomerOrgCharge> CustomerOrgCharges { get; set; } = null!;
public DbSet<CustomerOrgChargeBack> CustomerOrgChargeBacks { get; set; } = null!; public DbSet<CustomerOrgChargeBack> CustomerOrgChargeBacks { get; set; } = null!;
@ -439,7 +439,7 @@ public class PeisDbContext :
.ApplyConfiguration(new ContactMethodDbMapping()) .ApplyConfiguration(new ContactMethodDbMapping())
.ApplyConfiguration(new ContactPersonDbMapping()) .ApplyConfiguration(new ContactPersonDbMapping())
.ApplyConfiguration(new CriticalValueDbMapping()) .ApplyConfiguration(new CriticalValueDbMapping())
.ApplyConfiguration(new CriticalValueTypeDbMapping())
.ApplyConfiguration(new CriticalFollowValueTypeDbMapping())
.ApplyConfiguration(new CustomerOrgDbMapping()) .ApplyConfiguration(new CustomerOrgDbMapping())
.ApplyConfiguration(new CustomerOrgChargeDbMapping()) .ApplyConfiguration(new CustomerOrgChargeDbMapping())
.ApplyConfiguration(new CustomerOrgChargeBackDbMapping()) .ApplyConfiguration(new CustomerOrgChargeBackDbMapping())

Loading…
Cancel
Save