S-84
parent
01c91a6398
commit
ec53815bb0
|
@ -254,6 +254,24 @@ namespace IRaCIS.Core.API.Controllers
|
|||
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>
|
||||
/// CRC撤销临床数据
|
||||
/// </summary>
|
||||
|
|
|
@ -530,6 +530,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
|
||||
SubjectId = x.SubjectId,
|
||||
IsNotNeedPMConfirm=x.IsNotNeedPMConfirm,
|
||||
IsCRCConfirm = x.IsCRCConfirm,
|
||||
IsCRCApplicationRevoke=x.IsCRCApplicationRevoke,
|
||||
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.SaveChangesAsync();
|
||||
|
@ -835,11 +841,23 @@ namespace IRaCIS.Core.Application.Service
|
|||
throw new BusinessValidationFailedException("PM已确认,无法取消!");
|
||||
}
|
||||
|
||||
|
||||
await _readModuleRepository.UpdatePartialFromQueryAsync(x => presentData.ReadModuleId==x.Id, x => new ReadModule()
|
||||
{
|
||||
IsCRCApplicationRevoke = true
|
||||
});
|
||||
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 _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== presentData.ReadModuleId);
|
||||
|
||||
|
|
|
@ -270,7 +270,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 受试者ID
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
public Guid ReadModuleId { get; set; }
|
||||
|
||||
public bool IsNotNeedPMConfirm { get; set; } = false;
|
||||
public Guid ReadModuleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模块名称
|
||||
|
|
|
@ -17,6 +17,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Interface
|
|||
|
||||
Task<IResponseOutput> SubmitClinicalForm(SubmitClinicalFormInDto inDto);
|
||||
|
||||
Task<IResponseOutput> CRCConfirmClinical(CRCConfirmClinicalInDto inDto);
|
||||
|
||||
Task<IResponseOutput> CRCCancelConfirmClinical(CRCCancelConfirmClinicalInDto inDto);
|
||||
|
||||
}
|
||||
|
|
|
@ -80,10 +80,12 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
public bool IsPMConfirm { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// CRC是否正在申请撤回
|
||||
/// </summary>
|
||||
public bool IsCRCApplicationRevoke { get; set; } = false;
|
||||
public bool IsNotNeedPMConfirm { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// CRC是否正在申请撤回
|
||||
/// </summary>
|
||||
public bool IsCRCApplicationRevoke { get; set; } = false;
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
public DateTime? DeletedTime { get; set; }
|
||||
|
|
Loading…
Reference in New Issue