using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using IRaCIS.Core.Domain.Share; using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; namespace IRaCIS.Core.Domain.Models; [Comment("项目 - 受试者")] [Table("Subject")] public class Subject : BaseFullDeleteAuditEntity { #region 导航属性 [JsonIgnore] public List TaskStudyList { get; set; } = new List(); [JsonIgnore] public List SubjectVisitList { get; set; } = new List(); [JsonIgnore] public List SubjectDoctorList { get; set; } = new List(); [JsonIgnore] public List SubjectVisitTaskList { get; set; } = new List(); [JsonIgnore] public List ReadModuleList { get; set; } [JsonIgnore] public List SubjectCanceDoctorList { get; set; } [JsonIgnore] public List ClinicalDataList { get; set; } [JsonIgnore] public List SubjectCriteriaEvaluationList { get; set; } [JsonIgnore] public List SubjectCriteriaEvaluationVisitFilterList { get; set; } [JsonIgnore] public List SubjectAdditionalEvaluationResult { get; set; } [JsonIgnore] public List ReadingTaskQuestionAnswerList { get; set; } [JsonIgnore] [ForeignKey("FinalSubjectVisitId")] public SubjectVisit FinalSubjectVisit { get; set; } [JsonIgnore] [ForeignKey("TrialId")] public Trial Trial { get; set; } [JsonIgnore] public TrialSite TrialSite { get; set; } [JsonIgnore] public List StudyList { get; set; } = new List(); [JsonIgnore] [ForeignKey("LatestSubjectVisitId")] public SubjectVisit LatestSubjectVisit { get; set; } [JsonIgnore] public List ClinicalFormList { get; set; } #endregion public int? Age { get; set; } public DateTime? BirthDate { get; set; } [StringLength(400)] public string Code { get; set; } = null!; public Guid? FinalSubjectVisitId { get; set; } public DateTime? FirstGiveMedicineTime { get; set; } [StringLength(400)] public string FirstName { get; set; } = null!; public string Height { get; set; } = null!; public bool IsEnrollment { get; set; } public bool IsEnrollmentConfirm { get; set; } public bool IsMissingImages { get; set; } public bool IsReReadingOrBackInfluenceAnalysis { get; set; } public bool IsUrgent { get; set; } [StringLength(400)] public string LastName { get; set; } = null!; [Comment(" 最新受试者访视")] public Guid? LatestSubjectVisitId { get; set; } [StringLength(400)] public string MedicalNo { get; set; } = null!; public DateTime? OutEnrollmentTime { get; set; } [Comment(" 出组原因")] [MaxLength] public string? Reason { get; set; } [StringLength(400)] public string Sex { get; set; } = null!; [Comment(" 受试者名称缩写")] public string ShortName { get; set; } = null!; [Comment(" 知情同意书签署日期")] public DateTime? SignDate { get; set; } public SubjectStatus Status { get; set; } = SubjectStatus.OnVisit; public Guid TrialId { get; set; } public Guid TrialSiteId { get; set; } public DateTime? VisitOverTime { get; set; } [StringLength(400)] public string Weight { get; set; } = null!; }