暂存修改
parent
a07334ec37
commit
6e6b5bf4af
|
@ -9,6 +9,8 @@ using IRaCIS.Core.Infrastructure;
|
|||
using Microsoft.Extensions.Options;
|
||||
using static IRaCIS.Core.Domain.Share.StaticData;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using MassTransit;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -157,10 +159,8 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var currentYearMaxCodeNext = dbMaxCode + 1;
|
||||
|
||||
//var test = _trialRepository.Where(t => t.CreateTime.Year == DateTime.Now.Year + 1).Select(t => t.Code).DefaultIfEmpty(1).ToList();
|
||||
|
||||
var trial = _mapper.Map<Trial>(trialAddModel);
|
||||
//trial.Id = NewId.NextGuid();
|
||||
var yearStr = DateTime.Now.Year.ToString();
|
||||
|
||||
trial.Code = currentYearMaxCodeNext;
|
||||
|
@ -179,8 +179,69 @@ namespace IRaCIS.Application.Services
|
|||
//状态变更详细表
|
||||
trial.ClinicalTrialProjectDetails.Add(new TrialStatusDetail() { TrialId = trial.Id, TrialStatus = (int)TrialEnrollStatus.ChooseDoctor });
|
||||
|
||||
#region 设置默认值
|
||||
|
||||
//临床信息传输
|
||||
trial.ClinicalInformationTransmissionEnum = 0;
|
||||
//影像质控流程
|
||||
trial.QCProcessEnum = TrialQCProcess.NotAudit;
|
||||
|
||||
trial.IsImageConsistencyVerification = false;
|
||||
|
||||
trial.IsTrialProcessConfirmed = true;
|
||||
trial.IsTrialBasicLogicConfirmed = true;
|
||||
trial.IsTrialUrgentConfirmed = true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
trial = await _trialRepository.AddAsync(trial);
|
||||
|
||||
|
||||
|
||||
List<ReadingQuestionCriterionTrial> needAddCriterionList =
|
||||
await _repository.Where<ReadingQuestionCriterionSystem>(x => x.IsEnable && x.CriterionType == CriterionType.RECIST1Pointt1).ProjectTo<ReadingQuestionCriterionTrial>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
needAddCriterionList.ForEach(x =>
|
||||
{
|
||||
x.TrialId = trial.Id;
|
||||
x.ReadingQuestionCriterionSystemId = x.Id;
|
||||
x.Id = NewId.NextGuid();
|
||||
|
||||
//手动选择
|
||||
x.IsConfirm = true;
|
||||
x.IsSigned = true;
|
||||
x.ReadingInfoSignTime = DateTime.Now;
|
||||
|
||||
//阅片平台
|
||||
x.ImagePlatform = ImagePlatform.PACS;
|
||||
x.ReadingTool = ReadingTool.Dicom;
|
||||
x.ReadingType = ReadingMethod.Single;
|
||||
|
||||
x.IsReadingPeriod = false;
|
||||
x.IsGlobalReading = false;
|
||||
x.IsArbitrationReading = false;
|
||||
x.IsOncologyReading = false;
|
||||
x.IsReadingTaskViewInOrder = true;
|
||||
x.ReadingTaskViewEnum = ReadingTaskViewMethod.Subject;
|
||||
x.IsReadingShowSubjectInfo = true;
|
||||
x.IsReadingShowPreviousResults = true;
|
||||
x.DigitPlaces = 1;
|
||||
x.IseCRFShowInDicomReading = false;
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
await _repository.AddRangeAsync(needAddCriterionList);
|
||||
|
||||
//如果是PM, 则需要将该人员添加到 运维人员表
|
||||
//添加运维人员PM
|
||||
await _repository.AddAsync(new TrialUser() { TrialId = trial.Id, UserId = _userInfo.Id, JoinTime = DateTime.Now });
|
||||
|
@ -191,6 +252,13 @@ namespace IRaCIS.Application.Services
|
|||
//添加访视
|
||||
await _repository.AddAsync(new VisitStage { TrialId = trial.Id, VisitNum = 0, BlindName = "B" + 0.ToString("D3"), VisitDay = 0, VisitName = "Baseline", IsBaseLine = true });
|
||||
await _repository.AddAsync(new VisitStage { TrialId = trial.Id, VisitNum = 1, BlindName = "B" + 10.ToString("D3"), VisitDay = 30, VisitName = "Visit 1" });
|
||||
await _repository.AddAsync(new VisitStage { TrialId = trial.Id, VisitNum = 2, BlindName = "B" + 20.ToString("D3"), VisitDay = 60, VisitName = "Visit 2" });
|
||||
await _repository.AddAsync(new VisitStage { TrialId = trial.Id, VisitNum = 3, BlindName = "B" + 30.ToString("D3"), VisitDay = 90, VisitName = "Visit 2" });
|
||||
await _repository.AddAsync(new VisitStage { TrialId = trial.Id, VisitNum = 4, BlindName = "B" + 40.ToString("D3"), VisitDay = 90, VisitName = "Visit 2" });
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var success = await _repository.SaveChangesAsync();
|
||||
|
|
|
@ -147,19 +147,30 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public bool VisitPlanConfirmed { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 受试者编号具体规则
|
||||
/// </summary>
|
||||
public string SubjectCodeRule { get; set; } = "编号由5位数字组成,前2位为中心编号,后3位为顺序号,请与EDC录入的编号保持一致";
|
||||
/// <summary>
|
||||
/// 是否 提醒受试者编号规则
|
||||
/// 受试者编号规则提醒
|
||||
/// </summary>
|
||||
public bool IsNoticeSubjectCodeRule { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 是否 有基准时间(首次给药时间)
|
||||
/// 受试者编号格式
|
||||
/// </summary>
|
||||
public string SubjectCodeRule { get; set; } = "编号由5位数字组成,前2位为中心编号,后3位为顺序号,请与EDC录入的编号保持一致";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 受试者第二编号
|
||||
/// </summary>
|
||||
public bool IsSubjectSecondCodeView { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 扫描日期校验
|
||||
/// </summary>
|
||||
public bool IsVerifyVisitImageDate { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
///访视基准日期 是否 有基准时间(首次给药时间)
|
||||
/// </summary>
|
||||
public bool IsHaveFirstGiveMedicineDate { get; set; } = true;
|
||||
|
||||
|
@ -168,36 +179,43 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public bool IsHaveSubjectAge { get; set; } = false;
|
||||
|
||||
public bool IsSubjectSexView { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否有 入组性确认
|
||||
/// </summary>
|
||||
public bool IsEnrollementQualificationConfirm { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 出组后计划外访视名称
|
||||
/// 计划外的末次访视名称
|
||||
/// </summary>
|
||||
public string OutEnrollmentVisitName { get; set; } = "EOT";
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否 验证拍片日期
|
||||
/// 影像跨项目复制
|
||||
/// </summary>
|
||||
public bool IsVerifyVisitImageDate { get; set; } = true;
|
||||
public bool IsImageReplicationAcrossTrial { get; set; } = false;
|
||||
|
||||
|
||||
|
||||
public string BodyPartTypes { get; set; } = "鼻咽部|脑部|颈部|胸部|上/下腹部|盆腔|全身|其他";
|
||||
|
||||
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 int ChangeDefalutDays { get; set; } = 5;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//阅片方式 1 医学影像 2 视频 3 文档
|
||||
public int ReadingMode { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 临床信息传输 1:系统录入 2:系统录入+PDF 0:无
|
||||
/// </summary>
|
||||
public int ClinicalInformationTransmissionEnum { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 是否审核 临床信息
|
||||
/// </summary>
|
||||
public bool IsCRAAuditClinicalInformation { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// QC流程 0 不审,1 单审,2双审
|
||||
/// </summary>
|
||||
|
@ -208,47 +226,53 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public bool IsImageConsistencyVerification { get; set; } = true;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否 入组确认评估
|
||||
/// </summary>
|
||||
public bool IsEnrollementQualificationConfirm { get; set; } = false;
|
||||
|
||||
//PD 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)
|
||||
public bool IsPDProgressView { get; set; } = false;
|
||||
|
||||
|
||||
//启用项目加急
|
||||
public bool IsUrgent { get; set; } = false;
|
||||
|
||||
|
||||
//配置Suject Edit页面 是否显示 加急
|
||||
public bool IsSubjectExpeditedView { get; set; } = false;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否审核 临床信息
|
||||
/// </summary>
|
||||
public bool IsCRAAuditClinicalInformation { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 影像导出
|
||||
/// </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>
|
||||
/// 跨项目复制
|
||||
/// </summary>
|
||||
public bool IsImageReplicationAcrossTrial { get; set; } = false;
|
||||
|
||||
|
||||
public string BodyPartTypes { get; set; } = "鼻咽部|脑部|颈部|胸部|上/下腹部|盆腔|全身|其他";
|
||||
|
||||
|
||||
|
||||
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 进展是否显示 配置访视 是否显示 PD进展 (从而可以设置状态)
|
||||
public bool IsPDProgressView { get; set; }
|
||||
|
||||
//研究方案号
|
||||
public string ResearchProgramNo { get; set; }
|
||||
|
@ -262,7 +286,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||
// 负责人PI
|
||||
public string HeadPI { get; set; }
|
||||
|
||||
public bool IsUrgent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目类型 1 正式项目、0 非正式项目 2是培训项目
|
||||
|
@ -280,10 +303,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
public DateTime? TrialFinishedTime { get; set; }
|
||||
|
||||
public bool IsSubjectSexView { get; set; } = false;
|
||||
|
||||
//配置Suject Edit页面 是否显示 加急
|
||||
public bool IsSubjectExpeditedView { get; set; } = false;
|
||||
|
||||
|
||||
|
||||
public bool IsTrialStart { get; set; } = false;
|
||||
|
|
Loading…
Reference in New Issue