irc-netcore-api/IRaCIS.Core.Domain/Trial/Trial.cs

506 lines
15 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using IRaCIS.Core.Domain.Share;
using Newtonsoft.Json;
namespace IRaCIS.Core.Domain.Models
{
[Table("Trial")]
public partial class Trial : Entity, IAuditUpdate, IAuditAdd, ISoftDelete
{
public Trial()
{
ClinicalTrialProjectDetails = new HashSet<TrialStatusDetail>();
TrialDicList = new List<TrialDictionary>();
}
[JsonIgnore]
public List<TaskMedicalReview> TaskMedicalReviewList { get; set; }
[JsonIgnore]
public List<TaskConsistentRule> TaskConsistentRuleList { get; set; }
[JsonIgnore]
public List<SubjectUser> SubjectDoctorUserList { get; set; } = new List<SubjectUser>();
[JsonIgnore]
public List<VisitTask> VisitTaskList { get; set; } = new List<VisitTask>() { };
[JsonIgnore]
public List<VisitTaskReReading> VisitTaskReReadingList { get; set; }
[JsonIgnore]
public List<TrialSiteSurvey> TrialSiteSurveyList { get; set; } = new List<TrialSiteSurvey>();
[JsonIgnore]
public List<TrialDocument> TrialDocumentList { get; set; }
[JsonIgnore]
public List<Enroll> EnrollList { get; set; } = new List<Enroll>();
[JsonIgnore]
public List<Workload> WorkloadList { get; set; } = new List<Workload>();
[JsonIgnore]
public List<TrialUser> TrialUserList { get; set; } = new List<TrialUser>();
[JsonIgnore]
public List<ReadingQuestionCriterionTrial> ReadingQuestionCriterionTrialList { get; set; } = new List<ReadingQuestionCriterionTrial>();
[JsonIgnore]
public List<Subject> SubjectList { get; set; } = new List<Subject>();
[JsonIgnore]
public List<SubjectVisit> SubjectVisitList { get; set; } = new List<SubjectVisit>();
[JsonIgnore]
public List<DicomStudy> StudyList { get; set; } = new List<DicomStudy>();
[JsonIgnore]
public List<TrialSite> TrialSiteList { get; set; } = new List<TrialSite>();
[JsonIgnore]
public List<TrialSiteUser> TrialSiteUserList { get; set; } = new List<TrialSiteUser>();
public Guid IndicationTypeId { get; set; } = Guid.Empty;
public Guid? PhaseId { get; set; } = Guid.Empty;
[JsonIgnore]
[ForeignKey("IndicationTypeId")]
public Dictionary IndicationType { get; set; }
[JsonIgnore]
[ForeignKey("PhaseId")]
public Dictionary Phase { get; set; }
[JsonIgnore]
[ForeignKey("SponsorId")]
public Sponsor Sponsor { get; set; }
[JsonIgnore]
[ForeignKey("CROId")]
public CRO CRO { get; set; }
[JsonIgnore]
[ForeignKey("ReviewModeId")]
public Dictionary ReviewMode { get; set; }
[JsonIgnore]
public List<ClinicalDataTrialSet> clinicalDataTrialSets { get; set; } = new List<ClinicalDataTrialSet> { };
[JsonIgnore]
public virtual ICollection<TrialStatusDetail> ClinicalTrialProjectDetails { get; set; }
[JsonIgnore]
public virtual ICollection<TrialDictionary> TrialDicList { get; set; }
[StringLength(100)]
public string TrialCode { get; set; } = string.Empty;
public int Code { get; set; }
[StringLength(512)]
public string Indication { get; set; } = string.Empty;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>״̬
//[ConcurrencyCheck]
public int TrialEnrollStatus { get; set; }
//<2F><><EFBFBD><EFBFBD>״̬
[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;
public Guid? ReviewModeId { get; set; } = Guid.Empty;
[StringLength(500)]
public string ProjectCycle { get; set; } = string.Empty;
public int ExpectedPatients { get; set; }
public decimal TimePointsPerPatient { get; set; }
public int GRRReviewers { get; set; }
public int TotalReviewers { get; set; }
[StringLength(500)]
public string ReviewProtocol { get; set; } = string.Empty;
[StringLength(500)]
public string MessageFromClient { get; set; } = string.Empty;
public string Note { get; set; } = string.Empty;
public string ReviewProtocolName { get; set; } = string.Empty;
public string MessageFromClientName { get; set; } = string.Empty;
public int Expedited { get; set; }
public DateTime CreateTime { get; set; }
public Guid CreateUserId { get; set; }
public DateTime UpdateTime { get; set; }
public Guid UpdateUserId { get; set; }
//<2F><><EFBFBD><EFBFBD>
//public AttendedReviewerType AttendedReviewerType { get; set; } = AttendedReviewerType.CN;//0ȫ<30><C8AB><EFBFBD>й<EFBFBD>ҽ<EFBFBD><D2BD> 1<><31><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD> 2<><32><EFBFBD><EFBFBD><EFBFBD>й<EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD><D2BD>
////<2F><><EFBFBD><EFBFBD>
//[JsonIgnore]
//[ForeignKey("DeclarationTypeId")]
//public Dictionary DeclarationType { get; set; }
//<2F><><EFBFBD><EFBFBD>
//public Guid DeclarationTypeId { get; set; } = Guid.Empty;
public string DeclarationTypes { get; set; } = string.Empty;
[NotMapped]
public List<DeclarationType> DeclarationTypeEnumList => DeclarationTypes.Split('|', StringSplitOptions.RemoveEmptyEntries)
.Select(s => Enum.Parse(typeof(DeclarationType), s)).Cast<DeclarationType>().ToList();
[NotMapped]
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 bool VisitPlanConfirmed { get; set; }
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD><DFB1>ž<EFBFBD><C5BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string SubjectCodeRule { get; set; } = StaticData.International("Trial_number");
/// <summary>
/// <20>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD><DFB1>Ź<EFBFBD><C5B9><EFBFBD>
/// </summary>
public bool IsNoticeSubjectCodeRule { get; set; } = true;
/// <summary>
/// <20>Ƿ<EFBFBD> <20>л<EFBFBD>׼ʱ<D7BC><EFBFBD>״θ<D7B4>ҩʱ<D2A9>
/// </summary>
public bool IsHaveFirstGiveMedicineDate { get; set; } = true;
/// <summary>
/// <20>Ƿ<EFBFBD><C7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public bool IsHaveSubjectAge { get; set; } = false;
/// <summary>
/// <20>Ƿ<EFBFBD><C7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>
/// </summary>
public bool IsEnrollementQualificationConfirm { get; set; } = false;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string OutEnrollmentVisitName { get; set; } = "EOT";
/// <summary>
/// <20>Ƿ<EFBFBD> <20><>֤<EFBFBD><D6A4>Ƭ<EFBFBD><C6AC><EFBFBD><EFBFBD>
/// </summary>
public bool IsVerifyVisitImageDate { get; set; } = true;
/// <summary>
/// <20>ٴ<EFBFBD><D9B4><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD> 1<><31>ϵͳ¼<CDB3><C2BC> 2<><32>ϵͳ¼<CDB3><C2BC>+PDF 0<><30><EFBFBD><EFBFBD>
/// </summary>
public int ClinicalInformationTransmissionEnum { get; set; } = 1;
/// <summary>
/// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD> <20>ٴ<EFBFBD><D9B4><EFBFBD>Ϣ
/// </summary>
public bool IsCRAAuditClinicalInformation { get; set; } = false;
/// <summary>
/// QC<51><43><EFBFBD><EFBFBD> 0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><32><CBAB>
/// </summary>
public TrialQCProcess QCProcessEnum { get; set; } = TrialQCProcess.DoubleAudit;
/// <summary>
/// Ӱ<><D3B0>һ<EFBFBD><D2BB><EFBFBD>Ժ˲<D4BA>
/// </summary>
public bool IsImageConsistencyVerification { get; set; } = true;
/// <summary>
/// Ӱ<>񵼳<EFBFBD>
/// </summary>
public bool IsImageExport { get; set; } = false;
public bool IsSubjectSecondCodeView { get; set; }
//<2F><>Ƭ<EFBFBD><C6AC>ʽ
public int ReadingMode { get; set; } = 1;
public int ChangeDefalutDays { get; set; } = 5;
/// <summary>
/// <20><><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>
/// </summary>
public bool IsImageReplicationAcrossTrial { get; set; } = false;
public string BodyPartTypes { get; set; } = "<22><><EFBFBD>ʲ<EFBFBD>|<7C>Բ<EFBFBD>|<7C><><EFBFBD><EFBFBD>|<7C>ز<EFBFBD>|<7C><>/<2F>¸<EFBFBD><C2B8><EFBFBD>|<7C><>ǻ|ȫ<><C8AB>|<7C><><EFBFBD><EFBFBD>";
public string Modalitys { get; set; } = "CT|MRI|BoneScan|Photograph|PET|X-ray|US";
[NotMapped]
public List<string> ModalityList => Modalitys.Split('|', StringSplitOptions.RemoveEmptyEntries).Where(t => !string.IsNullOrEmpty(t)).ToList();
public string PreliminaryAuditReuploadText { get; set; } = string.Empty;
public string ReviewAuditReuploadText { get; set; } = string.Empty;
//PD <20><>չ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ <20><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD> <20>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ PD<50><44>չ (<28>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬)
public bool IsPDProgressView { get; set; }
//<2F>о<EFBFBD><D0BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public string ResearchProgramNo { get; set; }
//ʵ<><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public string ExperimentName { get; set; }
//<2F><><EFBFBD>е<EFBFBD>λ
public string MainResearchUnit { get; set; }
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>PI
public string HeadPI { get; set; }
public bool IsUrgent { get; set; }
/// <summary>
/// <20><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD> 1 <20><>ʽ<EFBFBD><CABD>Ŀ<EFBFBD><C4BF>0 <20><><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>Ŀ 2<><32><EFBFBD><EFBFBD>ѵ<EFBFBD><D1B5>Ŀ
/// </summary>time
public TrialType TrialType { get; set; }
//public string TempCode { get; set; }
public int PlanSiteCount { get; set; }
public int PlanVisitCount { get; set; }
public DateTime? TrialFinishedTime { get; set; }
public bool IsSubjectSexView { get; set; } = false;
//<2F><><EFBFBD><EFBFBD>Suject Editҳ<74><D2B3> <20>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ <20>Ӽ<EFBFBD>
public bool IsSubjectExpeditedView { get; set; } = false;
public bool IsTrialStart { get; set; } = false;
public bool IsDeleted { get; set; }
//QC <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
public User QCQuestionConfirmedUser { get; set; }
public Guid? QCQuestionConfirmedUserId { get; set; }
public DateTime? QCQuestionConfirmedTime { get; set; }
/// <summary>
/// <20><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
/// </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; }
public bool IsQCQuestionConfirmed { get; set; }
public DateTime? DeletedTime { get; set; }
public Guid? DeleteUserId { get; set; }
/// <summary>
/// ͬ<><CDAC><EFBFBD>ٴ<EFBFBD><D9B4><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
/// </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 bool IsDeclaration { get; set; }
public bool IsMedicalReview { get; set; }
public UserTypeEnum? EnrollConfirmDefaultUserType { get; set; }
public UserTypeEnum? PDProgressDefaultUserType { get; set; }
#region <20>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˺<EFBFBD>
/// </summary>
public string EmailFromEmail { get; set; } = string.Empty;
/// <summary>
/// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string EmailFromName { get; set; } = string.Empty;
/// <summary>
/// <20><><EFBFBD><EFBFBD>/<2F><>Ȩ<EFBFBD><C8A8>
/// </summary>
public string EmailAuthorizationCode { get; set; } = string.Empty;
/// <summary>
/// SMTP<54><50><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public string EmailSMTPServerAddress { get; set; } = string.Empty;
/// <summary>
/// SMTP<54>˿<EFBFBD>
/// </summary>
public int? EmailSMTPServerPort { get; set; }
/// <summary>
/// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>ù<EFBFBD><C3B9><EFBFBD><EFBFBD><EFBFBD>
/// </summary>
public bool IsConfigureEmail { get; set; } = false;
#endregion
///// <summary>
///// ͼ<><CDBC><EFBFBD>Ƿ<EFBFBD><C7B7>б<EFBFBD>ע
///// </summary>
//public bool IsImageIabeled { get; set; }
////<2F><>Ƭ<EFBFBD><C6AC><EFBFBD><EFBFBD>
//public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double;
//public bool IsGlobalReading { get; set; } = true;
///// <summary>
///// <20>ٲ<EFBFBD><D9B2><EFBFBD>Ƭ
///// </summary>
//public bool? IsArbitrationReading { get; set; } = true;
//public bool IsClinicalReading { get; set; }
///// <summary>
///// 1 Mint<6E><74>2 PACS
///// </summary>
//public int ImagePlatform { get; set; } = 1;
///// <summary>
///// <20>ٲù<D9B2><C3B9><EFBFBD>
///// </summary>
//public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.None;
////<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
//public TaskAllocateObj TaskAllocateObjEnum { get; set; }
////<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>
//public bool IsFollowVisitAutoAssign { get; set; } = true;
////<2F><><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>
//public bool IsFollowGlobalVisitAutoAssign { get; set; } = true;
//public bool IsFollowJudgeTaskAutoAssign { get; set; } = true;
//public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
////<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><C4AC>״̬
//public TaskAllocateDefaultState FollowVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
////<2F><><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD>Ĭ<EFBFBD><C4AC>״̬
//public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
////<2F><>Ƭ<EFBFBD><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
//public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
////<2F><>Ƭ<EFBFBD><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>Ƿ<EFBFBD>˳<EFBFBD><CBB3>
//public bool IsReadingTaskViewInOrder { get; set; } = true;
///// <summary>
///// <20><>Ƭ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
///// </summary>
//public bool IsReadingShowSubjectInfo { get; set; } = false;
///// <summary>
///// <20><>Ƭ<EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///// </summary>
//public bool IsReadingShowPreviousResults { get; set; } = false;
///// <summary>
///// <20><>ȷ<EFBFBD><C8B7>ҽѧ<D2BD><D1A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
///// </summary>
//public bool IsConfirmMedicineQuestion { get; set; } = false;
///// <summary>
///// <20><>Ƭ<EFBFBD><C6AC>Ϣǩ<CFA2><C7A9>ʱ<EFBFBD><CAB1>
///// </summary>
//public DateTime? ReadingInfoSignTime { get; set; }
///// <summary>
///// <20><>Ƭ<EFBFBD><C6AC><EFBFBD><EFBFBD>
///// </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; }
}
}