IRC_NewDev
he 2023-07-19 13:40:53 +08:00
parent 01c91a6398
commit ec53815bb0
5 changed files with 56 additions and 14 deletions

View File

@ -254,6 +254,24 @@ namespace IRaCIS.Core.API.Controllers
return result; return result;
} }
/// <summary>
/// CRC确认临床数据
/// </summary>
/// <param name="opt"></param>
/// <returns></returns>
[HttpPost, Route("Inspection/ClinicalAnswer/CRCConfirmClinical")]
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
[UnitOfWork]
public async Task<IResponseOutput> CRCConfirmClinical(DataInspectionDto<CRCConfirmClinicalInDto> opt)
{
var singid = await _inspectionService.RecordSing(opt.SignInfo);
var result = await _clinicalAnswerService.CRCConfirmClinical(opt.Data);
await _inspectionService.CompletedSign(singid, result);
return result;
}
/// <summary> /// <summary>
/// CRC撤销临床数据 /// CRC撤销临床数据
/// </summary> /// </summary>

View File

@ -530,6 +530,7 @@ namespace IRaCIS.Core.Application.Service
{ {
SubjectId = x.SubjectId, SubjectId = x.SubjectId,
IsNotNeedPMConfirm=x.IsNotNeedPMConfirm,
IsCRCConfirm = x.IsCRCConfirm, IsCRCConfirm = x.IsCRCConfirm,
IsCRCApplicationRevoke=x.IsCRCApplicationRevoke, IsCRCApplicationRevoke=x.IsCRCApplicationRevoke,
VisitBlindName=x.SubjectVisit.BlindName, VisitBlindName=x.SubjectVisit.BlindName,
@ -792,11 +793,16 @@ namespace IRaCIS.Core.Application.Service
}); });
}); });
var readModuleIds = confirmlist.Select(x => x.ReadModuleId).ToList(); foreach (var item in confirmlist)
{
await _readModuleRepository.UpdatePartialFromQueryAsync(x =>x.Id==item.ReadModuleId , x => new ReadModule()
{
IsCRCConfirm = true,
IsPMConfirm=item.ClinicalFormList.Count()==0?true:false,
IsNotNeedPMConfirm= item.ClinicalFormList.Count() == 0 ? true : false,
});
}
await _readModuleRepository.UpdatePartialFromQueryAsync(x => readModuleIds.Contains(x.Id),x=>new ReadModule() {
IsCRCConfirm=true
});
await _readModuleCriterionFromRepository.AddRangeAsync(needAddList); await _readModuleCriterionFromRepository.AddRangeAsync(needAddList);
await _readModuleCriterionFromRepository.SaveChangesAsync(); await _readModuleCriterionFromRepository.SaveChangesAsync();
@ -835,11 +841,23 @@ namespace IRaCIS.Core.Application.Service
throw new BusinessValidationFailedException("PM已确认,无法取消!"); throw new BusinessValidationFailedException("PM已确认,无法取消!");
} }
if (presentData.IsNotNeedPMConfirm)
{
await _readModuleRepository.UpdatePartialFromQueryAsync(x => presentData.ReadModuleId == x.Id, x => new ReadModule()
{
IsPMConfirm = false,
IsCRCConfirm = false,
IsNotNeedPMConfirm = false,
});
}
else
{
await _readModuleRepository.UpdatePartialFromQueryAsync(x => presentData.ReadModuleId == x.Id, x => new ReadModule()
{
IsCRCApplicationRevoke = true,
});
}
await _readModuleRepository.UpdatePartialFromQueryAsync(x => presentData.ReadModuleId==x.Id, x => new ReadModule()
{
IsCRCApplicationRevoke = true
});
//await _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== presentData.ReadModuleId); //await _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== presentData.ReadModuleId);

View File

@ -270,7 +270,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 受试者ID /// 受试者ID
/// </summary> /// </summary>
public Guid SubjectId { get; set; } public Guid SubjectId { get; set; }
public Guid ReadModuleId { get; set; }
public bool IsNotNeedPMConfirm { get; set; } = false;
public Guid ReadModuleId { get; set; }
/// <summary> /// <summary>
/// 模块名称 /// 模块名称

View File

@ -17,6 +17,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Interface
Task<IResponseOutput> SubmitClinicalForm(SubmitClinicalFormInDto inDto); Task<IResponseOutput> SubmitClinicalForm(SubmitClinicalFormInDto inDto);
Task<IResponseOutput> CRCConfirmClinical(CRCConfirmClinicalInDto inDto);
Task<IResponseOutput> CRCCancelConfirmClinical(CRCCancelConfirmClinicalInDto inDto); Task<IResponseOutput> CRCCancelConfirmClinical(CRCCancelConfirmClinicalInDto inDto);
} }

View File

@ -80,10 +80,12 @@ namespace IRaCIS.Core.Domain.Models
public bool IsPMConfirm { get; set; } = false; public bool IsPMConfirm { get; set; } = false;
/// <summary> public bool IsNotNeedPMConfirm { get; set; } = false;
/// CRC是否正在申请撤回
/// </summary> /// <summary>
public bool IsCRCApplicationRevoke { get; set; } = false; /// CRC是否正在申请撤回
/// </summary>
public bool IsCRCApplicationRevoke { get; set; } = false;
public bool IsDeleted { get; set; } public bool IsDeleted { get; set; }
public DateTime? DeletedTime { get; set; } public DateTime? DeletedTime { get; set; }