导航属性优化整理
continuous-integration/drone/push Build is passing

This commit is contained in:
hang
2024-08-22 20:10:59 +08:00
parent 4319982be9
commit 47ec4a5e7e
142 changed files with 1860 additions and 2493 deletions
+9 -41
View File
@@ -12,52 +12,34 @@ namespace IRaCIS.Core.Domain.Models
///DataInspection
///</summary>
[Table("DataInspection")]
public class DataInspection : BaseAuditAddEntity
public class DataInspection : BaseAddAuditEntity
{
#region
[JsonIgnore]
[ForeignKey("TrialReadingCriterionId")]
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
#endregion
/// <summary>
/// 项目iD
/// </summary>
public Guid? TrialId { get; set; }
public Guid? TrialId { get; set; }
public Guid? TrialSiteId { get; set; }
/// <summary>
/// 受试者
/// </summary>
public Guid? SubjectId { get; set; }
/// <summary>
/// 访视
/// </summary>
public Guid? SubjectVisitId { get; set; }
public Guid? SubjectVisitId { get; set; }
public Guid? VisitTaskId { get; set; }
public VisitTask VisitTask { get; set; }
/// <summary>
/// IP地址
/// </summary>
public string IP { get; set; } = string.Empty;
/// <summary>
/// 修改原因
/// </summary>
[Required]
public string Reason { get; set; } = string.Empty;
/// <summary>
/// 是否有签名
/// </summary>
public bool IsSign { get; set; }
/// <summary>
@@ -90,26 +72,14 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public Guid? ModuleTypeId { get; set; }
/// <summary>
/// Json 对象
/// </summary>
public string JsonDetail { get; set; } = string.Empty;
/// <summary>
/// 创建人名称
/// </summary>
public string CreateUserName { get; set; } = string.Empty;
public string CreateUserRealName { get; set; } = string.Empty;
/// <summary>
/// 角色名称
/// </summary>
public string RoleName { get; set; } = string.Empty;
/// <summary>
/// 标识
/// </summary>
@@ -146,8 +116,6 @@ namespace IRaCIS.Core.Domain.Models
public Guid? DoctorUserId { get; set; }
[ForeignKey("TrialReadingCriterionId")]
public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; }
}
+13 -15
View File
@@ -8,12 +8,22 @@ namespace IRaCIS.Core.Domain.Models
[Table("Enroll")]
public partial class Enroll : BaseFullAuditEntity
{
#region
[JsonIgnore]
[ForeignKey("TrialId")]
public virtual Trial Trial { get; set; }
[JsonIgnore]
public virtual Doctor Doctor { get; set; }
[JsonIgnore]
public User DoctorUser { get; set; }
[JsonIgnore]
public List<EnrollReadingCategory> EnrollReadingCategoryList { get; set; }
[JsonIgnore]
public List<EnrollReadingCriterion> EnrollReadingCriteriaList { get; set; }
#endregion
public Guid DoctorId { get; set; }
@@ -28,9 +38,7 @@ namespace IRaCIS.Core.Domain.Models
public string Memo { get; set; } = string.Empty;
public int ReviewerReadingType { get; set; } = 0;
public int? Training { get; set; }
public int? RefresherTraining { get; set; }
@@ -49,24 +57,14 @@ namespace IRaCIS.Core.Domain.Models
public int? Global { get; set; }
public int? Downtime { get; set; }
/// <summary>
/// 生成账号 加入到项目中后 赋值
/// </summary>
public Guid? DoctorUserId { get; set; }
[JsonIgnore]
public User DoctorUser { get; set; }
[JsonIgnore]
public List<EnrollReadingCategory> EnrollReadingCategoryList { get; set; }
[JsonIgnore]
public List<EnrollReadingCriterion> EnrollReadingCriteriaList { get; set; }
}
}
+11 -7
View File
@@ -5,10 +5,18 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
[Table("EnrollDetail")]
public partial class EnrollDetail : BaseAuditAddEntity
public partial class EnrollDetail : BaseAddAuditEntity
{
#region µ¼º½ÊôÐÔ
[JsonIgnore]
public virtual TrialStatusDetail TrialDetail { get; set; }
public virtual TrialStatusDetail TrialDetail { get; set; }
[JsonIgnore]
[ForeignKey("CreateUserId")]
public User CreateUser { get; set; }
[JsonIgnore]
public Doctor Doctor { get; set; }
#endregion
public Guid DoctorId { get; set; }
public Guid TrialId { get; set; }
@@ -20,10 +28,6 @@ namespace IRaCIS.Core.Domain.Models
public Guid TrialDetailId { get; set; }
[JsonIgnore]
[ForeignKey("CreateUserId")]
public User CreateUser { get; set; }
[JsonIgnore]
public Doctor Doctor { get; set; }
}
}
@@ -13,9 +13,15 @@ namespace IRaCIS.Core.Domain.Models
///EnrollReadingCategory
///</summary>
[Table("EnrollReadingCategory")]
public class EnrollReadingCategory : BaseAuditAddEntity
public class EnrollReadingCategory : BaseAddAuditEntity
{
#region
[JsonIgnore]
[ForeignKey("EnrollId")]
public Enroll Enroll { get; set; }
#endregion
public Guid EnrollId { get; set; }
@@ -24,11 +30,7 @@ namespace IRaCIS.Core.Domain.Models
public Guid TrialReadingCriterionId { get; set; }
[JsonIgnore]
[ForeignKey("EnrollId")]
public Enroll Enroll { get; set; }
}
}
+19 -148
View File
@@ -9,21 +9,16 @@ using Newtonsoft.Json;
namespace IRaCIS.Core.Domain.Models
{
[Table("Trial")]
public partial class Trial : BaseFullAuditDeleteEntity
public partial class Trial : BaseFullDeleteAuditEntity
{
public Trial()
{
ClinicalTrialProjectDetails = new HashSet<TrialStatusDetail>();
TrialDicList = new List<TrialDictionary>();
}
#region
[JsonIgnore]
public List<TrialBodyPart> TrialBodyPartList { get; set; }
[JsonIgnore]
public List<TaskMedicalReview> TaskMedicalReviewList { get; set; }
[JsonIgnore]
public List<TaskConsistentRule> TaskConsistentRuleList { get; set; }
@@ -33,7 +28,7 @@ namespace IRaCIS.Core.Domain.Models
public List<VisitTask> VisitTaskList { get; set; } = new List<VisitTask>() { };
[JsonIgnore]
public List<VisitTaskReReading> VisitTaskReReadingList { get; set; }
public List<VisitTaskReReading> VisitTaskReReadingList { get; set; }
[JsonIgnore]
public List<TrialSiteSurvey> TrialSiteSurveyList { get; set; } = new List<TrialSiteSurvey>();
@@ -61,8 +56,6 @@ namespace IRaCIS.Core.Domain.Models
public List<ReadModule> ReadModuleList { get; set; } = new List<ReadModule>();
[JsonIgnore]
public List<UserFeedBack> UserFeedBackList { get; set; } = new List<UserFeedBack>();
public Guid IndicationTypeId { get; set; } = Guid.Empty;
public Guid? PhaseId { get; set; } = Guid.Empty;
[JsonIgnore]
[ForeignKey("IndicationTypeId")]
@@ -86,12 +79,20 @@ namespace IRaCIS.Core.Domain.Models
public List<ClinicalDataTrialSet> clinicalDataTrialSets { get; set; } = new List<ClinicalDataTrialSet> { };
[JsonIgnore]
public virtual ICollection<TrialStatusDetail> ClinicalTrialProjectDetails { get; set; }
public List<TrialStatusDetail> ClinicalTrialProjectDetails { get; set; }
[JsonIgnore]
public virtual ICollection<TrialDictionary> TrialDicList { get; set; }
public List<TrialDictionary> TrialDicList { get; set; } = new List<TrialDictionary>();
[JsonIgnore]
public List<ReadingClinicalData> ReadingClinicalDataList { get; set; }
[JsonIgnore]
public List<TrialStateChange> TrialStateChangeList { get; set; } = new List<TrialStateChange>();
#endregion
public Guid IndicationTypeId { get; set; } = Guid.Empty;
public Guid? PhaseId { get; set; } = Guid.Empty;
[StringLength(100)]
public string TrialCode { get; set; } = string.Empty;
@@ -104,16 +105,10 @@ namespace IRaCIS.Core.Domain.Models
//[ConcurrencyCheck]
public int TrialEnrollStatus { get; set; }
//启动状态
[StringLength(500)]
public string TrialStatusStr { get; set; } = StaticData.TrialState.TrialInitializing;
[JsonIgnore]
public List<TrialStateChange> TrialStateChangeList { get; set; } = new List<TrialStateChange>();
public Guid? CROId { get; set; } = Guid.Empty;
public Guid? SponsorId { get; set; } = Guid.Empty;
@@ -147,20 +142,6 @@ namespace IRaCIS.Core.Domain.Models
//废弃
//public AttendedReviewerType AttendedReviewerType { get; set; } = AttendedReviewerType.CN;//0全部中国医生 1美国医生 2既有中国医生,也有美国医生
////废弃
//[JsonIgnore]
//[ForeignKey("DeclarationTypeId")]
//public Dictionary DeclarationType { get; set; }
//废弃
//public Guid DeclarationTypeId { get; set; } = Guid.Empty;
public string DeclarationTypes { get; set; } = string.Empty;
[NotMapped]
@@ -168,13 +149,10 @@ namespace IRaCIS.Core.Domain.Models
.Select(s => Enum.Parse(typeof(DeclarationType), s)).Cast<DeclarationType>().ToList();
[NotMapped]
public List<AttendedReviewerType> AttendedReviewerTypeEnumList=> AttendedReviewerTypes.Split('|',StringSplitOptions.RemoveEmptyEntries)
public List<AttendedReviewerType> AttendedReviewerTypeEnumList => AttendedReviewerTypes.Split('|', StringSplitOptions.RemoveEmptyEntries)
.Select(s => Enum.Parse(typeof(AttendedReviewerType), s)).Cast<AttendedReviewerType>().ToList();
public string AttendedReviewerTypes { get; set; }=string.Empty;
public string AttendedReviewerTypes { get; set; } = string.Empty;
public string TrialExtraConfigJsonStr { get; set; } = string.Empty;
@@ -244,16 +222,12 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public bool IsImageExport { get; set; } = false;
public bool IsSubjectSecondCodeView { get; set; }
//阅片方式
public int ReadingMode { get; set; } = 1;
public int ChangeDefalutDays { get; set; } = 5;
/// <summary>
@@ -307,8 +281,6 @@ namespace IRaCIS.Core.Domain.Models
public int PlanVisitCount { get; set; }
public DateTime? TrialFinishedTime { get; set; }
public bool IsSubjectSexView { get; set; } = false;
@@ -316,7 +288,6 @@ namespace IRaCIS.Core.Domain.Models
//配置Suject Edit页面 是否显示 加急
public bool IsSubjectExpeditedView { get; set; } = false;
public bool IsTrialStart { get; set; } = false;
@@ -331,10 +302,8 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public DateTime? TrialFinishTime { get; set; }
public int? DigitPlaces { get; set; } = 1;
public bool IsTrialProcessConfirmed { get; set; }
public bool IsTrialBasicLogicConfirmed { get; set; }
public bool IsTrialUrgentConfirmed { get; set; }
@@ -347,14 +316,14 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public DateTime? SyncClinicalDataTime { get; set; }
public string BlindBaseLineName { get; set; } = "Baseline";
public string BlindFollowUpPrefix { get; set; } = "Follow-up";
public int IndicationEnum { get; set; } = -1;
public string VitrualSiteCode { get; set; }=string.Empty;
public string VitrualSiteCode { get; set; } = string.Empty;
#region
/// <summary>
@@ -393,104 +362,6 @@ namespace IRaCIS.Core.Domain.Models
public bool IsTrialPACSConfirmed { get; set; }
///// <summary>
///// 图像是否有标注
///// </summary>
//public bool IsImageIabeled { get; set; }
////阅片类型
//public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double;
//public bool IsGlobalReading { get; set; } = true;
///// <summary>
///// 仲裁阅片
///// </summary>
//public bool? IsArbitrationReading { get; set; } = true;
//public bool IsClinicalReading { get; set; }
///// <summary>
///// 1 Mint、2 PACS
///// </summary>
//public int ImagePlatform { get; set; } = 1;
///// <summary>
///// 仲裁规则
///// </summary>
//public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.None;
////任务分配对象
//public TaskAllocateObj TaskAllocateObjEnum { get; set; }
////后续访视任务自动分配
//public bool IsFollowVisitAutoAssign { get; set; } = true;
////后续全局自动分配
//public bool IsFollowGlobalVisitAutoAssign { get; set; } = true;
//public bool IsFollowJudgeTaskAutoAssign { get; set; } = true;
//public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
////后续访视自动分配默认状态
//public TaskAllocateDefaultState FollowVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
////后续全局自动分配默认状态
//public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
////读片任务显示规则
//public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
///// <summary>
///// 阅片是否显示受试者信息
///// </summary>
//public bool IsReadingShowSubjectInfo { get; set; } = false;
///// <summary>
///// 阅片是否显示既往结果
///// </summary>
//public bool IsReadingShowPreviousResults { get; set; } = false;
///// <summary>
///// 是确认医学审核问题
///// </summary>
//public bool IsConfirmMedicineQuestion { get; set; } = false;
///// <summary>
///// 阅片信息签名时间
///// </summary>
//public DateTime? ReadingInfoSignTime { get; set; }
///// <summary>
///// 阅片工具
///// </summary>
//public ReadingTool? ReadingTool { get; set; }
//public Guid? ReviewTypeId { get; set; } = Guid.Empty;
//[ForeignKey("ReviewTypeId")]
//public Dictionary ReviewType { get; set; }
//public Guid? QCSecondConfirmedUserId { get; set; }
//public DateTime? QCSecondConfirmedTime { get; set; }
//public int QCQuestionConfirmState { get; set; }
}
}
+9 -6
View File
@@ -14,10 +14,16 @@ namespace IRaCIS.Core.Domain.Models
///TrialBodyPart
///</summary>
[Table("TrialBodyPart")]
public class TrialBodyPart : BaseAuditAddEntity
public class TrialBodyPart : BaseAddAuditEntity
{
public string Code { get; set; }
#region
[JsonIgnore]
public Trial Trial { get; set; }
#endregion
public string Code { get; set; }
public string Name { get; set; }
@@ -29,9 +35,6 @@ namespace IRaCIS.Core.Domain.Models
public Guid TrialId { get; set; }
[JsonIgnore]
public Trial Trial { get; set; }
public bool IsHandAdd { get; set; }
+3 -2
View File
@@ -7,13 +7,14 @@ namespace IRaCIS.Core.Domain.Models
[Table("TrialDictionary")]
public partial class TrialDictionary : Entity
{
//public Guid Id { get; set; }
#region µ¼º½ÊôÐÔ
[JsonIgnore]
public virtual Trial Trial { get; set; }
[JsonIgnore]
public virtual Dictionary Dictionary { get; set; }
#endregion
[StringLength(50)]
public string KeyName { get; set; } = string.Empty;
public Guid TrialId { get; set; }
+5 -3
View File
@@ -13,10 +13,12 @@ namespace IRaCIS.Core.Domain.Models
///TrialSign
///</summary>
[Table("TrialSign")]
public class TrialSign : BaseAuditAddEntity
public class TrialSign : BaseAddAuditEntity
{
public Guid? TrialId { get; set; }
#region
#endregion
public Guid? TrialId { get; set; }
public Guid? SubjectVisitId { get; set; }
+13 -9
View File
@@ -11,13 +11,20 @@ namespace IRaCIS.Core.Domain.Models
///TrialStateChange
///</summary>
[Table("TrialStateChange")]
public class TrialStateChange : BaseAuditAddEntity
public class TrialStateChange : BaseAddAuditEntity
{
[JsonIgnore]
[ForeignKey("TrialId")]
public Trial Trial { get; set; }
public Guid TrialId { get; set; }
#region
[JsonIgnore]
[ForeignKey("TrialId")]
public Trial Trial { get; set; }
[JsonIgnore]
[ForeignKey("CreateUserId")]
public User User { get; set; }
#endregion
public Guid TrialId { get; set; }
public string OriginState { get; set; } = String.Empty;
@@ -29,9 +36,6 @@ namespace IRaCIS.Core.Domain.Models
public string Reason { get; set; }=String.Empty;
[JsonIgnore]
[ForeignKey("CreateUserId")]
public User User { get; set; }
}
+7 -10
View File
@@ -6,23 +6,20 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Domain.Models
{
[Table("TrialStatus")]
public partial class TrialStatusDetail : BaseAuditAddEntity
public partial class TrialStatusDetail : BaseAddAuditEntity
{
public virtual ICollection<EnrollDetail> IntoGroupDetails { get; set; }
public TrialStatusDetail()
{
IntoGroupDetails = new HashSet<EnrollDetail>();
}
#region µ¼º½ÊôÐÔ
[JsonIgnore]
public List<EnrollDetail> IntoGroupDetails { get; set; }
[JsonIgnore]
public Trial Trial { get; set; }
#endregion
public Guid TrialId { get; set; }
public int TrialStatus { get; set; }
[StringLength(100)]
public string Memo { get; set; } = string.Empty;
public int OptUserType { get; set; }