Browse Source

危警值数据表

master
wxd 1 year ago
parent
commit
46efa4431d
  1. 16
      src/Shentun.Peis.Application/BeiJingMZAKExportDatas/BeiJingMZAKExportDataAppService.cs
  2. 24
      src/Shentun.Peis.Application/DataMigrations/BaseDataHandleAppService.cs
  3. 6
      src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs
  4. 8
      src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs
  5. 46
      src/Shentun.Peis.Domain/FollowUps/FollowUp.cs
  6. 8
      src/Shentun.Peis.Domain/PatientRegisters/PatientRegister.cs
  7. 29
      src/Shentun.Peis.Domain/PhoneFollows/PhoneFollowUp.cs
  8. 20
      src/Shentun.Peis.Domain/SmsSends/SmsSend.cs
  9. 9
      src/Shentun.Peis.Domain/SmsTypes/SmsType.cs
  10. 26
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/FollowUps/FollowUpDbMapping.cs
  11. 11
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/PhoneFollows/PhoneFollowDbMapping.cs
  12. 8
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterChecks/RegisterCheckDbMapping.cs
  13. 2
      src/Shentun.Peis.EntityFrameworkCore/DbMapping/SmsSends/SmsSendDbMapping.cs
  14. 7
      src/Shentun.Peis.EntityFrameworkCore/EntityFrameworkCore/PeisDbContext.cs

16
src/Shentun.Peis.Application/BeiJingMZAKExportDatas/BeiJingMZAKExportDataAppService.cs

@ -2693,12 +2693,12 @@ namespace Shentun.Peis.BeiJingMZAKExportDatas
CheckRequestPrintTimes = (short)1,
CompleteFlag = Convert.ToChar(rowAsbitem["complete_flag"].ToString()),
CriticalRangeValue = null,
CriticalValueCreateDate = null,
//CriticalValueCreateDate = null,
IsCriticalValue = null,
CriticalValueContent = null,
CriticalValueProcessDate = null,
CriticalValueProcessDoctor = null,
CriticalValueProcessFlag = null,
//CriticalValueProcessDate = null,
//CriticalValueProcessDoctor = null,
//CriticalValueProcessFlag = null,
IsAudit = string.IsNullOrEmpty(rowAsbitem["audit_flag"].ToString()) ? 'N' : Convert.ToChar(rowAsbitem["audit_flag"].ToString()),
IsLock = string.IsNullOrEmpty(rowAsbitem["lock_flag"].ToString()) ? 'N' : Convert.ToChar(rowAsbitem["lock_flag"].ToString()),
PatientRegisterId = patientRegisterId,
@ -3268,12 +3268,12 @@ namespace Shentun.Peis.BeiJingMZAKExportDatas
CheckRequestPrintTimes = (short)1,
CompleteFlag = Convert.ToChar(rowAsbitem["complete_flag"].ToString()),
CriticalRangeValue = null,
CriticalValueCreateDate = null,
//CriticalValueCreateDate = null,
IsCriticalValue = null,
CriticalValueContent = null,
CriticalValueProcessDate = null,
CriticalValueProcessDoctor = null,
CriticalValueProcessFlag = null,
//CriticalValueProcessDate = null,
//CriticalValueProcessDoctor = null,
//CriticalValueProcessFlag = null,
IsAudit = string.IsNullOrEmpty(rowAsbitem["audit_flag"].ToString()) ? 'N' : Convert.ToChar(rowAsbitem["audit_flag"].ToString()),
IsLock = string.IsNullOrEmpty(rowAsbitem["lock_flag"].ToString()) ? 'N' : Convert.ToChar(rowAsbitem["lock_flag"].ToString()),
PatientRegisterId = patientRegisterId,

24
src/Shentun.Peis.Application/DataMigrations/BaseDataHandleAppService.cs

@ -2613,12 +2613,12 @@ namespace Shentun.Peis.DataMigrations
CheckRequestPrintTimes = (short)1,
CompleteFlag = Convert.ToChar(rowAsbitem["complete_flag"].ToString()),
CriticalRangeValue = null,
CriticalValueCreateDate = null,
// CriticalValueCreateDate = null,
IsCriticalValue = null,
CriticalValueContent = null,
CriticalValueProcessDate = null,
CriticalValueProcessDoctor = null,
CriticalValueProcessFlag = null,
//CriticalValueProcessDate = null,
//CriticalValueProcessDoctor = null,
//CriticalValueProcessFlag = null,
IsAudit = string.IsNullOrEmpty(rowAsbitem["audit_flag"].ToString()) ? 'N' : Convert.ToChar(rowAsbitem["audit_flag"].ToString()),
IsLock = string.IsNullOrEmpty(rowAsbitem["lock_flag"].ToString()) ? 'N' : Convert.ToChar(rowAsbitem["lock_flag"].ToString()),
PatientRegisterId = patientRegisterId,
@ -3515,12 +3515,12 @@ namespace Shentun.Peis.DataMigrations
CheckRequestPrintTimes = (short)1,
CompleteFlag = Convert.ToChar(rowAsbitem["complete_flag"].ToString()),
CriticalRangeValue = null,
CriticalValueCreateDate = null,
//CriticalValueCreateDate = null,
IsCriticalValue = null,
CriticalValueContent = null,
CriticalValueProcessDate = null,
CriticalValueProcessDoctor = null,
CriticalValueProcessFlag = null,
//CriticalValueProcessDate = null,
//CriticalValueProcessDoctor = null,
//CriticalValueProcessFlag = null,
IsAudit = string.IsNullOrEmpty(rowAsbitem["audit_flag"].ToString()) ? 'N' : Convert.ToChar(rowAsbitem["audit_flag"].ToString()),
IsLock = string.IsNullOrEmpty(rowAsbitem["lock_flag"].ToString()) ? 'N' : Convert.ToChar(rowAsbitem["lock_flag"].ToString()),
PatientRegisterId = patientRegisterId,
@ -4044,12 +4044,12 @@ namespace Shentun.Peis.DataMigrations
CheckRequestPrintTimes = (short)1,
CompleteFlag = Convert.ToChar(row["complete_flag"].ToString()),
CriticalRangeValue = null,
CriticalValueCreateDate = null,
// CriticalValueCreateDate = null,
IsCriticalValue = null,
CriticalValueContent = null,
CriticalValueProcessDate = null,
CriticalValueProcessDoctor = null,
CriticalValueProcessFlag = null,
//CriticalValueProcessDate = null,
//CriticalValueProcessDoctor = null,
//CriticalValueProcessFlag = null,
IsAudit = string.IsNullOrEmpty(row["audit_flag"].ToString()) ? 'N' : Convert.ToChar(row["audit_flag"].ToString()),
IsLock = string.IsNullOrEmpty(row["lock_flag"].ToString()) ? 'N' : Convert.ToChar(row["lock_flag"].ToString()),
PatientRegisterId = item.Id,

6
src/Shentun.Peis.Application/PeisApplicationAutoMapperProfile.cs

@ -409,9 +409,9 @@ public class PeisApplicationAutoMapperProfile : Profile
CreateMap<RegisterCheck, RegisterCheckDto>();
CreateMap<UpdateCheckDoctorDto, RegisterCheck>().ForMember(d => d.CheckDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.CheckDate)));
CreateMap<UpdateCriticalValueDto, RegisterCheck>()
.ForMember(d => d.CriticalValueProcessDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.CriticalValueProcessDate)))
.ForMember(d => d.CriticalValueCreateDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.CriticalValueCreateDate)));
//CreateMap<UpdateCriticalValueDto, RegisterCheck>()
// .ForMember(d => d.CriticalValueProcessDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.CriticalValueProcessDate)))
// .ForMember(d => d.CriticalValueCreateDate, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.CriticalValueCreateDate)));
CreateMap<UpdateAuditorDoctorDto, RegisterCheck>().ForMember(d => d.AuditTime, opt => opt.MapFrom(src => PageHelper.ConvertDatetimeV(src.AuditTime)));

8
src/Shentun.Peis.Application/TransToWebPeis/TransToWebPeisAppService.cs

@ -1055,10 +1055,10 @@ namespace Shentun.Peis.TransToWebPeis
new SugarParameter("critical_value",registerCheckWithDetail.CriticalRangeValue),
new SugarParameter("critical_value_flag",registerCheckWithDetail.IsCriticalValue),
new SugarParameter("critical_value_process_content",registerCheckWithDetail.CriticalValueContent),
new SugarParameter("critical_value_process_flag",registerCheckWithDetail.CriticalValueProcessFlag),
new SugarParameter("critical_value_process_doctor",registerCheckWithDetail.CriticalValueProcessDoctor),
new SugarParameter("critical_value_process_date",registerCheckWithDetail.CriticalValueProcessDate),
new SugarParameter("critical_value_create_date",registerCheckWithDetail.CriticalValueCreateDate),
//new SugarParameter("critical_value_process_flag",registerCheckWithDetail.CriticalValueProcessFlag),
//new SugarParameter("critical_value_process_doctor",registerCheckWithDetail.CriticalValueProcessDoctor),
//new SugarParameter("critical_value_process_date",registerCheckWithDetail.CriticalValueProcessDate),
//new SugarParameter("critical_value_create_date",registerCheckWithDetail.CriticalValueCreateDate),
new SugarParameter("check_doctor_id",registerCheckWithDetail.CheckDoctorId),
new SugarParameter("check_date",registerCheckWithDetail.CheckDate),
new SugarParameter("is_audit",registerCheckWithDetail.IsAudit),

46
src/Shentun.Peis.Domain/FollowUps/FollowUp.cs

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Domain.Entities;
namespace Shentun.Peis.Models
{
/// <summary>
/// 随访表
/// </summary>
[Table("follow_up")]
public class FollowUp : AuditedEntity<Guid>, IHasConcurrencyStamp
{
/// <summary>
/// 登记流水号
/// </summary>
[Column("patient_register_id")]
public Guid PatientRegisterId { get; set; }
/// <summary>
/// 是否短信随访创建完成
/// </summary>
[Column("is_sms_complete")]
[MaxLength(1)]
public char IsSmsComplete { get; set; }
/// <summary>
/// 是否电话随访创建完成
/// </summary>
[Column("is_phone_complete")]
[MaxLength(1)]
public char IsPhoneComplete { get; set; }
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }
}
}

8
src/Shentun.Peis.Domain/PatientRegisters/PatientRegister.cs

@ -26,7 +26,7 @@ namespace Shentun.Peis.Models
PatientOccupationalHistories = new HashSet<PatientOccupationalHistory>();
PatientPoisons = new HashSet<PatientPoison>();
PatientSymptoms = new HashSet<PatientSymptom>();
PhoneFollows = new HashSet<PhoneFollow>();
PhoneFollows = new HashSet<PhoneFollowUp>();
QueueRegisters = new HashSet<QueueRegister>();
RegisterCheckAsbitems = new HashSet<RegisterCheckAsbitem>();
SumDiagnoses = new HashSet<SumDiagnosis>();
@ -43,7 +43,7 @@ namespace Shentun.Peis.Models
PatientOccupationalHistories = new HashSet<PatientOccupationalHistory>();
PatientPoisons = new HashSet<PatientPoison>();
PatientSymptoms = new HashSet<PatientSymptom>();
PhoneFollows = new HashSet<PhoneFollow>();
PhoneFollows = new HashSet<PhoneFollowUp>();
QueueRegisters = new HashSet<QueueRegister>();
RegisterCheckAsbitems = new HashSet<RegisterCheckAsbitem>();
SumDiagnoses = new HashSet<SumDiagnosis>();
@ -348,8 +348,8 @@ namespace Shentun.Peis.Models
public virtual ICollection<PatientPoison> PatientPoisons { get; set; }
[InverseProperty(nameof(PatientSymptom.PatientRegister))]
public virtual ICollection<PatientSymptom> PatientSymptoms { get; set; }
[InverseProperty(nameof(PhoneFollow.PatientRegister))]
public virtual ICollection<PhoneFollow> PhoneFollows { get; set; }
[InverseProperty(nameof(PhoneFollowUp.PatientRegister))]
public virtual ICollection<PhoneFollowUp> PhoneFollows { get; set; }
[InverseProperty(nameof(QueueRegister.PatientRegister))]
public virtual ICollection<QueueRegister> QueueRegisters { get; set; }
[InverseProperty(nameof(RegisterCheckAsbitem.PatientRegister))]

29
src/Shentun.Peis.Domain/PhoneFollows/PhoneFollow.cs → src/Shentun.Peis.Domain/PhoneFollows/PhoneFollowUp.cs

@ -11,8 +11,8 @@ namespace Shentun.Peis.Models
/// <summary>
/// 电话随访
/// </summary>
[Table("phone_follow")]
public class PhoneFollow : AuditedEntity<Guid>, IHasConcurrencyStamp
[Table("phone_follow_up")]
public class PhoneFollowUp : AuditedEntity<Guid>, IHasConcurrencyStamp
{
/// <summary>
/// 病人登记ID
@ -22,21 +22,36 @@ namespace Shentun.Peis.Models
/// <summary>
/// 随访内容
/// </summary>
[Column("follow_content")]
[Column("follow_up_content")]
[StringLength(200)]
public string FollowContent { get; set; } = null!;
public string FollowUpContent { get; set; } = null!;
/// <summary>
/// 回复内容
/// </summary>
[Column("reply_content")]
[StringLength(200)]
public string? ReplyContent { get; set; }
///// <summary>
///// 随访计划ID
///// </summary>
//[Column("follow_up_plan_id")]
//public Guid? FollowUpPlanId { get; set; }
/// <summary>
/// 随访计划ID
/// 随访ID
/// </summary>
[Column("follow_up_plan_id")]
public Guid? FollowUpPlanId { get; set; }
[Column("follow_up_id")]
public Guid? FollowUpId { get; set; }
/// <summary>
/// 是否完成
/// </summary>
[Column("is_complete")]
[MaxLength(1)]
public char IsComplete { get; set; }
[Column("concurrency_stamp")]
public string ConcurrencyStamp { get; set; }

20
src/Shentun.Peis.Domain/SmsSends/SmsSend.cs

@ -19,24 +19,30 @@ namespace Shentun.Peis.Models
/// </summary>
[Column("sms_type_id")]
//[StringLength(2)]
public Guid SmsTypeId { get; set; }
[StringLength(2)]
public string SmsTypeId { get; set; }
/// <summary>
/// 随访计划ID
/// 随访ID
/// </summary>
[Column("follow_up_plan_id")]
public Guid? FollowUpPlanId { get; set; }
[Column("follow_up_id")]
public Guid? FollowUpId { get; set; }
///// <summary>
///// 随访计划ID
///// </summary>
//[Column("follow_up_plan_id")]
//public Guid? FollowUpPlanId { get; set; }
/// <summary>
/// 人员ID
/// </summary>
[Column("patient_id")]
[StringLength(10)]
public Guid? PatientId { get; set; }
/// <summary>
/// 姓名
/// </summary>
[Column("patient_name")]
[StringLength(16)]
[StringLength(30)]
public string PatientName { get; set; } = null!;
/// <summary>
/// 手机号

9
src/Shentun.Peis.Domain/SmsTypes/SmsType.cs

@ -12,9 +12,14 @@ namespace Shentun.Peis.Models
/// 短信类别
/// </summary>
[Table("sms_type")]
public class SmsType : AuditedEntity<Guid>, IHasConcurrencyStamp
public class SmsType : AuditedEntity<string>, IHasConcurrencyStamp
{
[Column("Id")]
[Comment("主键Id")]
[StringLength(2)]
public override string Id { get => base.Id; protected set => base.Id = value; }
[Column("display_name")]
[StringLength(20)]
public string DisplayName { get; set; } = null!;

26
src/Shentun.Peis.EntityFrameworkCore/DbMapping/FollowUps/FollowUpDbMapping.cs

@ -0,0 +1,26 @@
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using Shentun.Peis.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shentun.Peis.EntityFrameworkCore;
namespace Shentun.Peis.DbMapping
{
internal class FollowUpDbMapping : IEntityTypeConfiguration<FollowUp>
{
public void Configure(EntityTypeBuilder<FollowUp> entity)
{
entity.HasComment("随访表");
entity.Property(t => t.PatientRegisterId).HasComment("人员登记ID").IsRequired();
entity.Property(t => t.IsPhoneComplete).HasComment("是否电话随访创建完成").IsRequired().HasDefaultValueSql("'N'");
entity.Property(t => t.IsSmsComplete).HasComment("是否短信随访创建完成").IsRequired().HasDefaultValueSql("'N'");
entity.ConfigureByConvention();
}
}
}

11
src/Shentun.Peis.EntityFrameworkCore/DbMapping/PhoneFollows/PhoneFollowDbMapping.cs

@ -10,16 +10,17 @@ using System.Threading.Tasks;
namespace Shentun.Peis.DbMapping
{
internal class PhoneFollowDbMapping : IEntityTypeConfiguration<PhoneFollow>
internal class PhoneFollowDbMapping : IEntityTypeConfiguration<PhoneFollowUp>
{
public void Configure(EntityTypeBuilder<PhoneFollow> entity)
public void Configure(EntityTypeBuilder<PhoneFollowUp> entity)
{
entity.HasComment("电话随访");
entity.Property(t => t.PatientRegisterId).HasComment("病人登记ID").IsRequired();
entity.Property(t => t.FollowContent).HasComment("随访内容");
entity.Property(t => t.FollowUpContent).HasComment("随访内容");
entity.Property(t => t.ReplyContent).HasComment("回复内容");
entity.Property(t => t.FollowUpPlanId).HasComment("随访计划ID");
//entity.Property(t => t.FollowUpPlanId).HasComment("随访计划ID");
entity.Property(t => t.IsComplete).HasComment("是否完成").IsRequired().HasDefaultValueSql("'N'");
entity.Property(e => e.Id).ValueGeneratedNever().IsRequired();
//entity.Property(e => e.CreationTime).HasDefaultValueSql("(date(timezone('UTC-8'::text, now())) - 1)");

8
src/Shentun.Peis.EntityFrameworkCore/DbMapping/RegisterChecks/RegisterCheckDbMapping.cs

@ -23,10 +23,10 @@ namespace Shentun.Peis.DbMapping
entity.Property(t => t.CriticalRangeValue).HasComment("危急值");
entity.Property(t => t.IsCriticalValue).HasComment("危急值标志").HasDefaultValueSql("0");
entity.Property(t => t.CriticalValueContent).HasComment("危急值处理内容");
entity.Property(t => t.CriticalValueProcessFlag).HasComment("危急值处理标志");
entity.Property(t => t.CriticalValueProcessDoctor).HasComment("危急值处理医生");
entity.Property(t => t.CriticalValueProcessDate).HasComment("危急值处理日期");
entity.Property(t => t.CriticalValueCreateDate).HasComment("危急值创建日期");
//entity.Property(t => t.CriticalValueProcessFlag).HasComment("危急值处理标志");
//entity.Property(t => t.CriticalValueProcessDoctor).HasComment("危急值处理医生");
//entity.Property(t => t.CriticalValueProcessDate).HasComment("危急值处理日期");
//entity.Property(t => t.CriticalValueCreateDate).HasComment("危急值创建日期");
entity.Property(t => t.CheckDoctorId).HasComment("检查医生ID");
entity.Property(t => t.CheckDate).HasComment("检查日期");
entity.Property(t => t.IsAudit).HasComment("是审核");

2
src/Shentun.Peis.EntityFrameworkCore/DbMapping/SmsSends/SmsSendDbMapping.cs

@ -16,7 +16,7 @@ namespace Shentun.Peis.DbMapping
{
entity.HasComment("短信发送");
entity.Property(t => t.SmsTypeId).HasComment("短信类别ID").IsRequired();
entity.Property(t => t.FollowUpPlanId).HasComment("随访计划ID");
//entity.Property(t => t.FollowUpPlanId).HasComment("随访计划ID");
entity.Property(t => t.PatientId).HasComment("人员ID").IsRequired();
entity.Property(t => t.PatientName).HasComment("姓名").IsRequired();
entity.Property(t => t.MobileTelephone).HasComment("手机号").IsRequired();

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

@ -227,7 +227,7 @@ public class PeisDbContext :
public DbSet<PayMode> PayModes { get; set; } = null!;
public DbSet<PersonnelType> PersonnelTypes { get; set; } = null!;
public DbSet<PhoneFollow> PhoneFollows { get; set; } = null!;
public DbSet<PhoneFollowUp> PhoneFollows { get; set; } = null!;
public DbSet<Poison> Poisons { get; set; } = null!;
public DbSet<PoisonType> PoisonTypes { get; set; } = null!;
public DbSet<PositionType> PositionTypes { get; set; } = null!;
@ -359,6 +359,8 @@ public class PeisDbContext :
public DbSet<RoomDetail> RoomDetails { get; set; } = null!;
public DbSet<FollowUp> FollowUps { get; set; } = null!;
public PeisDbContext(DbContextOptions<PeisDbContext> options)
: base(options)
{
@ -600,7 +602,8 @@ public class PeisDbContext :
.ApplyConfiguration(new PatientOccupationalMedicalHistoryDbMapping())
.ApplyConfiguration(new PatientPastMedicalHistoryDbMapping())
.ApplyConfiguration(new OcCheckTypeDetailDbMapping())
.ApplyConfiguration(new RoomDetailDbMapping());
.ApplyConfiguration(new RoomDetailDbMapping())
.ApplyConfiguration(new FollowUpDbMapping());
#endregion

Loading…
Cancel
Save