导航属性加注释
							parent
							
								
									0342048a02
								
							
						
					
					
						commit
						a8cd00b962
					
				| 
						 | 
				
			
			@ -8,10 +8,11 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
    [Table("DicomSeries")]
 | 
			
		||||
    public class DicomSeries : Entity, IAuditAdd, IAuditUpdate, ISoftDelete
 | 
			
		||||
    {
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        [ForeignKey("StudyId")]
 | 
			
		||||
        public DicomStudy DicomStudy { get; set; }
 | 
			
		||||
 | 
			
		||||
       
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        public List<DicomInstance> DicomInstanceList { get; set; } 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,10 +10,13 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
    {
 | 
			
		||||
        //一个检查 由多个人管理
 | 
			
		||||
        //public List<TrialSiteUser> TrialSiteUserList { get; set; } = new List<TrialSiteUser>();
 | 
			
		||||
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        public List<StudyMonitor> DicomStudyMonitorList { get; set; } = new List<StudyMonitor>();
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        public List <StudyDTF> StudyDTFList { get; set;} = new List<StudyDTF>();
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        public TrialSite TrialSite { get; set; }
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        public Site Site { get; set; }
 | 
			
		||||
 | 
			
		||||
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
 | 
			
		||||
| 
						 | 
				
			
			@ -68,6 +71,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
        public Guid CreateUserId { get; set; }
 | 
			
		||||
        public DateTime CreateTime { get; set; } = DateTime.Now;
 | 
			
		||||
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        [ForeignKey("CreateUserId")]
 | 
			
		||||
        public User Uploader { get; set; }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -90,10 +94,11 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
 | 
			
		||||
        public string CheckResult { get; set; }=string.Empty;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        [ForeignKey("SubjectId")]
 | 
			
		||||
        public Subject Subject { get; set; }
 | 
			
		||||
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        [ForeignKey("SubjectVisitId")]
 | 
			
		||||
        public SubjectVisit SubjectVisit { get; set; }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -10,8 +10,8 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
    public class CheckChallengeDialog : Entity, IAuditAdd
 | 
			
		||||
    {
 | 
			
		||||
        public string TalkContent { get; set; } = string.Empty;
 | 
			
		||||
 | 
			
		||||
       public SubjectVisit SubjectVisit { get; set; }
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        public SubjectVisit SubjectVisit { get; set; }
 | 
			
		||||
        public Guid SubjectVisitId { get; set; }
 | 
			
		||||
 | 
			
		||||
        public User CreateUser { get; set; }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,7 +14,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
	 [Table("PreviousHistory")]	
 | 
			
		||||
	 public class PreviousHistory : Entity, IAuditAddWithUserName
 | 
			
		||||
	{
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public SubjectVisit SubjectVisit { get; set; }
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// CreateUserId
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,7 +15,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
	 public class PreviousOther : Entity, IAuditAddWithUserName
 | 
			
		||||
	{
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public SubjectVisit SubjectVisit { get; set; }
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// CreateUserId
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
		/// </summary>
 | 
			
		||||
		public Guid TrialId { get; set; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
	    /// <summary>
 | 
			
		||||
		/// 创建人
 | 
			
		||||
		/// </summary>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,6 +7,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
{
 | 
			
		||||
    public class QCChallenge : Entity, IAuditAdd
 | 
			
		||||
    {
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        [ForeignKey("CreateUserId")]
 | 
			
		||||
      
 | 
			
		||||
        public User CreateUser { get; set; }
 | 
			
		||||
| 
						 | 
				
			
			@ -42,6 +43,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
 | 
			
		||||
        public Guid? LatestReplyUserId { get; set; }
 | 
			
		||||
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        [ForeignKey("LatestReplyUserId")]
 | 
			
		||||
        public User LatestReplyUser { get; set; }
 | 
			
		||||
        public string ChallengeCode { get; set; }
 | 
			
		||||
| 
						 | 
				
			
			@ -70,11 +72,11 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
        public string ChallengeType { get; set; } = string.Empty;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        //导航属性
 | 
			
		||||
        [ForeignKey("SubjectVisitId")]
 | 
			
		||||
        public SubjectVisit SubjectVisit { get; set; }
 | 
			
		||||
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        public List<QCChallengeDialog> DialogList { get; set; } = new List<QCChallengeDialog>();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,6 +6,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
{
 | 
			
		||||
    public class QCChallengeDialog : Entity, IAuditAdd
 | 
			
		||||
    {
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        public QCChallenge QCChallenge { get; set; }
 | 
			
		||||
        public string TalkContent { get; set; } = string.Empty;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -13,6 +14,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
 | 
			
		||||
        public Guid SubjectVisitId { get; set; }
 | 
			
		||||
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
        [ForeignKey("CreateUserId")]
 | 
			
		||||
        public User CreateUser { get; set; } 
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -13,7 +13,8 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
	 ///</summary>
 | 
			
		||||
	 [Table("TrialQCQuestion")]	
 | 
			
		||||
	 public class TrialQCQuestion : Entity, IAuditUpdate, IAuditAdd
 | 
			
		||||
	 { 
 | 
			
		||||
	{
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public Trial Trial { get; set; }
 | 
			
		||||
 | 
			
		||||
		/// <summary>
 | 
			
		||||
| 
						 | 
				
			
			@ -48,7 +49,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
 | 
			
		||||
	
 | 
			
		||||
		public Guid? ParentId { get; set; }
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		[ForeignKey("ParentId")]
 | 
			
		||||
		public TrialQCQuestion ParentQCQuestion { get; set; }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -100,8 +101,8 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
		public bool? IsConfirm { get; set; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public List<TrialQCQuestionAnswer> TrialQCQuestionAnswerList { get; set; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -72,6 +72,7 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
 | 
			
		||||
		public Guid TrialQCQuestionConfigureId { get; set; }
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public TrialQCQuestion TrialQCQuestionConfigure { get; set; }
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -20,16 +20,17 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
		 public TrialSiteSurveyEnum State { get; set; } = TrialSiteSurveyEnum.ToSubmit;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		// 必须 { get; set; }  否则 翻译出错
 | 
			
		||||
        // 必须 { get; set; }  否则 翻译出错
 | 
			
		||||
        [JsonIgnore]
 | 
			
		||||
		public List<TrialSiteUserSurvey> TrialSiteUserSurveyList { get; set; } =new List<TrialSiteUserSurvey>();
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public List<TrialSiteEquipmentSurvey> TrialSiteEquipmentSurveyList { get; set; } = new List<TrialSiteEquipmentSurvey>();
 | 
			
		||||
 | 
			
		||||
        public List<TrialSiteEquipmentSurvey> TrialSiteEquipmentSurveyList { get; set; } = new List<TrialSiteEquipmentSurvey>();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public TrialSite TrialSite { get; set; }
 | 
			
		||||
 | 
			
		||||
        public Trial Trial { get; set; }
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public Trial Trial { get; set; }
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public Site Site { get; set; }
 | 
			
		||||
 | 
			
		||||
        public DateTime? DeletedTime { get; set; }
 | 
			
		||||
| 
						 | 
				
			
			@ -142,8 +143,9 @@ namespace IRaCIS.Core.Domain.Models
 | 
			
		|||
 | 
			
		||||
		public DateTime? ReviewerTime { get; set; }
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public User ReviewerUser { get; set; }
 | 
			
		||||
 | 
			
		||||
		[JsonIgnore]
 | 
			
		||||
		public User PreliminaryUser { get; set; }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -179,7 +179,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
            {
 | 
			
		||||
                var entity = item.Entity as TrialQCQuestion;
 | 
			
		||||
                var paretName = await _dbContext.TrialQCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
 | 
			
		||||
                await InsertInspection<TrialQCQuestion>(entity, type, null, new
 | 
			
		||||
                await InsertInspection<TrialQCQuestion>(entity, type, x => new InspectionConvertDTO()
 | 
			
		||||
                {
 | 
			
		||||
                    ObjectRelationParentId = x.TrialId
 | 
			
		||||
                }, new
 | 
			
		||||
                {
 | 
			
		||||
                    QuestionName = entity.QuestionName,
 | 
			
		||||
                    Type = entity.Type,
 | 
			
		||||
| 
						 | 
				
			
			@ -197,7 +200,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
            // 检查
 | 
			
		||||
            foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomStudy)))
 | 
			
		||||
            {
 | 
			
		||||
                await InsertInspection<DicomStudy>(item.Entity as DicomStudy, type);
 | 
			
		||||
                await InsertInspection<DicomStudy>(item.Entity as DicomStudy, type, x => new InspectionConvertDTO()
 | 
			
		||||
                {
 | 
			
		||||
                    ObjectRelationParentId=x.SubjectVisitId
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // 序列
 | 
			
		||||
| 
						 | 
				
			
			@ -209,7 +215,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                {
 | 
			
		||||
                    dicomStudy = await _dbContext.DicomStudys.AsNoTracking().FirstOrDefaultAsync(x => x.Id == entity.StudyId);
 | 
			
		||||
                }
 | 
			
		||||
                await InsertInspection<DicomSeries>(item.Entity as DicomSeries, type, null, new
 | 
			
		||||
                await InsertInspection<DicomSeries>(item.Entity as DicomSeries, type,  x => new InspectionConvertDTO()
 | 
			
		||||
                {
 | 
			
		||||
                    ObjectRelationParentId = x.StudyId
 | 
			
		||||
                }, new
 | 
			
		||||
                {
 | 
			
		||||
                    StudyCode = dicomStudy?.StudyCode,
 | 
			
		||||
                    Modalities = dicomStudy?.Modalities,
 | 
			
		||||
| 
						 | 
				
			
			@ -231,6 +240,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                    TrialId = subjectvisit.TrialId,
 | 
			
		||||
                    SubjectId = subjectvisit.SubjectId,
 | 
			
		||||
 | 
			
		||||
                    ObjectRelationParentId=x.SubjectVisitId,
 | 
			
		||||
 | 
			
		||||
                }, new
 | 
			
		||||
                {
 | 
			
		||||
                    Type = "既往手术史"
 | 
			
		||||
| 
						 | 
				
			
			@ -249,6 +260,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                    SubjectVisitName = subjectvisit.VisitName,
 | 
			
		||||
                    TrialId = subjectvisit.TrialId,
 | 
			
		||||
                    SubjectId = subjectvisit.SubjectId,
 | 
			
		||||
 | 
			
		||||
                    ObjectRelationParentId = x.SubjectVisitId,
 | 
			
		||||
                }, new
 | 
			
		||||
                {
 | 
			
		||||
                    Type = "既往放疗史"
 | 
			
		||||
| 
						 | 
				
			
			@ -267,6 +280,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                    SubjectVisitName = subjectvisit.VisitName,
 | 
			
		||||
                    TrialId = subjectvisit.TrialId,
 | 
			
		||||
                    SubjectId = subjectvisit.SubjectId,
 | 
			
		||||
 | 
			
		||||
                    ObjectRelationParentId = x.SubjectVisitId,
 | 
			
		||||
                }, new
 | 
			
		||||
                {
 | 
			
		||||
                    Type = "其他治疗史"
 | 
			
		||||
| 
						 | 
				
			
			@ -293,6 +308,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                    SubjectId = subjectvisit.SubjectId,
 | 
			
		||||
                    SubjectVisitName = subjectvisit.VisitName,
 | 
			
		||||
                    BlindName = subjectvisit.BlindName,
 | 
			
		||||
 | 
			
		||||
                    ObjectRelationParentId=x.SubjectVisitId
 | 
			
		||||
                }, new
 | 
			
		||||
                {
 | 
			
		||||
                    ChallengeCode = entity.ChallengeCode,
 | 
			
		||||
| 
						 | 
				
			
			@ -303,11 +320,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            //Qc 问题
 | 
			
		||||
            foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion)))
 | 
			
		||||
            {
 | 
			
		||||
                await InsertInspection<QCQuestion>(item.Entity as QCQuestion, type);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            // 一致性核查文件  
 | 
			
		||||
            foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ConsistencyCheckFile)))
 | 
			
		||||
| 
						 | 
				
			
			@ -315,6 +328,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                await InsertInspection<ConsistencyCheckFile>(item.Entity as ConsistencyCheckFile, type, x => new InspectionConvertDTO()
 | 
			
		||||
                {
 | 
			
		||||
                    CreateTime = x.CreateTime,
 | 
			
		||||
 | 
			
		||||
                    ObjectRelationParentId=x.TrialId
 | 
			
		||||
 | 
			
		||||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -405,8 +421,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                await InsertInspection<CheckChallengeDialog>(entity, type, x => new InspectionConvertDTO()
 | 
			
		||||
                {
 | 
			
		||||
                    GeneralId = entity.SubjectVisitId,
 | 
			
		||||
                    //byzhouhang
 | 
			
		||||
                    ObjectRelationParentId = entity.SubjectVisitId,
 | 
			
		||||
 | 
			
		||||
                    TrialId = subjectvisit.TrialId,
 | 
			
		||||
                    SubjectVisitId = x.SubjectVisitId,
 | 
			
		||||
                    SiteId = subjectvisit.SiteId,
 | 
			
		||||
| 
						 | 
				
			
			@ -415,6 +430,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                    BlindName = subjectvisit.BlindName,
 | 
			
		||||
                    Reason = reason,
 | 
			
		||||
                    CreateTime = x.CreateTime,
 | 
			
		||||
 | 
			
		||||
                    //byzhouhang
 | 
			
		||||
                    ObjectRelationParentId = entity.SubjectVisitId,
 | 
			
		||||
                }, new
 | 
			
		||||
                {
 | 
			
		||||
                    CheckState = subjectvisit.CheckState,
 | 
			
		||||
| 
						 | 
				
			
			@ -442,8 +460,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                await InsertInspection<QCChallengeDialog>(entity, type, x => new InspectionConvertDTO()
 | 
			
		||||
                {
 | 
			
		||||
                    GeneralId = qCChallenge.Id,
 | 
			
		||||
                    //byzhouhang
 | 
			
		||||
                    ObjectRelationParentId = qCChallenge.Id,
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    TrialId = subjectvisit.TrialId,
 | 
			
		||||
                    SubjectVisitId = x.SubjectVisitId,
 | 
			
		||||
| 
						 | 
				
			
			@ -452,6 +469,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                    SubjectVisitName = subjectvisit.VisitName,
 | 
			
		||||
                    BlindName = subjectvisit.BlindName,
 | 
			
		||||
                    Reason = reason,
 | 
			
		||||
                    //byzhouhang
 | 
			
		||||
                    ObjectRelationParentId = qCChallenge.Id,
 | 
			
		||||
                }, new
 | 
			
		||||
                {
 | 
			
		||||
                    AuditState = subjectvisit.AuditState,
 | 
			
		||||
| 
						 | 
				
			
			@ -494,7 +513,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
 | 
			
		|||
                });
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            //Qc 问题
 | 
			
		||||
            foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion)))
 | 
			
		||||
            {
 | 
			
		||||
                await InsertInspection<QCQuestion>(item.Entity as QCQuestion, type);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // 项目文档
 | 
			
		||||
            foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialDocument)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue