Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
commit
31aca49f1a
|
@ -52,7 +52,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitOncologyReadingInfo")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SetOncologyReadingInfo(DataInspectionDto<SubmitOncologyReadingInfoInDto> opt)
|
||||
|
@ -69,7 +69,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitDicomVisitTask")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SubmitDicomVisitTask(DataInspectionDto<SubmitDicomVisitTaskInDto> opt)
|
||||
|
@ -88,7 +88,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitGlobalReadingInfo")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SubmitGlobalReadingInfo(DataInspectionDto<SubmitGlobalReadingInfoInDto> opt)
|
||||
|
@ -107,7 +107,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/configTrialBasicInfo/TrialReadingInfoSign")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> TrialReadingInfoSign(DataInspectionDto<TrialReadingInfoSignInDto> opt)
|
||||
|
@ -126,7 +126,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingMedicalReview/FinishMedicalReview")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> FinishMedicalReview(DataInspectionDto<FinishMedicalReviewInDto> opt)
|
||||
|
@ -143,7 +143,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingMedicineQuestion/ConfirmReadingMedicineQuestion")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> ConfirmReadingMedicineQuestion(DataInspectionDto<ConfirmReadingMedicineQuestionInDto> opt)
|
||||
|
@ -161,7 +161,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitVisitTaskQuestions")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SubmitVisitTaskQuestions(DataInspectionDto<SubmitVisitTaskQuestionsInDto> opt)
|
||||
|
@ -179,7 +179,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ClinicalAnswer/CRCSignClinicalData")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> CRCSignClinicalData(DataInspectionDto<CRCSignClinicalDataInDto> opt)
|
||||
|
@ -197,7 +197,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ClinicalAnswer/CRCConfirmClinical")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> CRCConfirmClinical(DataInspectionDto<CRCConfirmClinicalInDto> opt)
|
||||
|
@ -214,7 +214,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ClinicalAnswer/CRCCancelConfirmClinical")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> CRCCancelConfirmClinical(DataInspectionDto<CRCCancelConfirmClinicalInDto> opt)
|
||||
|
@ -232,7 +232,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ClinicalAnswer/PMConfirmClinical")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> PMConfirmClinical(DataInspectionDto<CRCConfirmClinicalInDto> opt)
|
||||
|
@ -250,7 +250,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingClinicalData/SignConsistencyAnalysisReadingClinicalData")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SignConsistencyAnalysisReadingClinicalData(DataInspectionDto<SignConsistencyAnalysisReadingClinicalDataInDto> opt)
|
||||
|
@ -267,7 +267,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ClinicalAnswer/SubmitClinicalFormAndSign")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SubmitClinicalFormAndSign(DataInspectionDto<SubmitClinicalFormInDto> opt)
|
||||
|
@ -284,7 +284,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingImageTask/SubmitJudgeVisitTaskResult")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SubmitJudgeVisitTaskResult(DataInspectionDto<SaveJudgeVisitTaskResult> opt)
|
||||
|
@ -303,7 +303,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialBasicInfoConfirm")]
|
||||
[UnitOfWork]
|
||||
[TrialGlobalLimit( "BeforeOngoingCantOpt" )]
|
||||
[TrialGlobalLimit("BeforeOngoingCantOpt")]
|
||||
public async Task<IResponseOutput> ConfigTrialBasicInfoConfirm(DataInspectionDto<BasicTrialConfig> opt)
|
||||
{
|
||||
|
||||
|
@ -345,7 +345,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialUrgentInfoConfirm")]
|
||||
[UnitOfWork]
|
||||
[TrialGlobalLimit( "BeforeOngoingCantOpt" )]
|
||||
[TrialGlobalLimit("BeforeOngoingCantOpt")]
|
||||
public async Task<IResponseOutput> ConfigTrialUrgentInfoConfirm(DataInspectionDto<TrialUrgentConfig> opt)
|
||||
{
|
||||
opt.Data.IsTrialUrgentConfirmed = true;
|
||||
|
@ -358,7 +358,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
[HttpPost, Route("Inspection/configTrialBasicInfo/ConfigTrialPACSInfoConfirm")]
|
||||
[UnitOfWork]
|
||||
[TrialGlobalLimit( "BeforeOngoingCantOpt" )]
|
||||
[TrialGlobalLimit("BeforeOngoingCantOpt")]
|
||||
public async Task<IResponseOutput> ConfigTrialPACSInfoConfirm(DataInspectionDto<TrialPACSConfig> opt)
|
||||
{
|
||||
opt.Data.IsTrialPACSConfirmed = true;
|
||||
|
@ -374,7 +374,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/configTrialBasicInfo/TrialConfigSignatureConfirm")]
|
||||
[UnitOfWork]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
public async Task<IResponseOutput> TrialConfigSignatureConfirm(DataInspectionDto<SignConfirmDTO> opt)
|
||||
{
|
||||
|
@ -391,7 +391,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingCriterion/ResetAndAsyncCriterion")]
|
||||
[UnitOfWork]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
|
||||
public async Task<IResponseOutput> ResetAndAsyncCriterion(DataInspectionDto<ResetAndAsyncCriterionInDto> opt)
|
||||
{
|
||||
|
@ -409,7 +409,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/QCOperation/CRCRequestToQC")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> CRCRequestToQC(DataInspectionDto<CRCRequestToQCCommand> opt)
|
||||
{
|
||||
|
@ -424,21 +424,31 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// 设置QC 通过或者不通过 7:QC failed 8:QC passed
|
||||
/// </summary>
|
||||
[HttpPost, Route("Inspection/QCOperation/QCPassedOrFailed")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> QCPassedOrFailed(DataInspectionDto<QCPassedOrFailedDto> opt)
|
||||
{
|
||||
var singid = await _inspectionService.RecordSing(opt.SignInfo);
|
||||
var result = await _qCOperationService.QCPassedOrFailed(opt.Data.trialId, opt.Data.subjectVisitId, opt.Data.auditState);
|
||||
await _inspectionService.CompletedSign(singid, result);
|
||||
return result;
|
||||
if (opt.Data.IsSecondPass != null)
|
||||
{
|
||||
var result = await _qCOperationService.QCSecondReviewPassedOrFailed(opt.Data.trialId, opt.Data.subjectVisitId, (bool)opt.Data.IsSecondPass);
|
||||
await _inspectionService.CompletedSign(singid, result);
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
var result = await _qCOperationService.QCPassedOrFailed(opt.Data.trialId, opt.Data.subjectVisitId, opt.Data.auditState);
|
||||
await _inspectionService.CompletedSign(singid, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 一致性核查 回退 对话记录不清除 只允许PM回退
|
||||
/// </summary>
|
||||
[HttpPost, Route("Inspection/QCOperation/CheckBack")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> CheckBack(DataInspectionDto<IDDto> opt)
|
||||
{
|
||||
|
@ -455,7 +465,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadClinicalData/ReadClinicalDataSign")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> ReadClinicalDataSign(DataInspectionDto<ReadingClinicalDataSignIndto> opt)
|
||||
{
|
||||
|
@ -470,7 +480,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// CRC 设置已经重传完成
|
||||
/// </summary>
|
||||
[HttpPost, Route("Inspection/QCOperation/SetReuploadFinished")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SetReuploadFinished(DataInspectionDto<CRCReuploadFinishedCommand> opt)
|
||||
{
|
||||
|
@ -486,7 +496,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// <param name="opt"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/TrialConfig/updateTrialState")]
|
||||
[TrialGlobalLimit( "BeforeOngoingCantOpt")]
|
||||
[TrialGlobalLimit("BeforeOngoingCantOpt")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> UpdateTrialState(DataInspectionDto<UpdateTrialStateDto> opt)
|
||||
{
|
||||
|
@ -502,7 +512,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/TrialDocument/userConfirm")]
|
||||
[TrialGlobalLimit( "BeforeOngoingCantOpt", "SignSystemDocNoTrialId", "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("BeforeOngoingCantOpt", "SignSystemDocNoTrialId", "AfterStopCannNotOpt")]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> UserConfirm(DataInspectionDto<UserConfirmCommand> opt)
|
||||
{
|
||||
|
@ -519,10 +529,10 @@ namespace IRaCIS.Core.API.Controllers
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/VisitTask/ConfirmReReading")]
|
||||
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
|
||||
[TrialGlobalLimit("AfterStopCannNotOpt")]
|
||||
[UnitOfWork]
|
||||
|
||||
public async Task<IResponseOutput> ConfirmReReading(DataInspectionDto<ConfirmReReadingCommand> opt, [FromServices] IVisitTaskService _visitTaskService)
|
||||
public async Task<IResponseOutput> ConfirmReReading(DataInspectionDto<ConfirmReReadingCommand> opt, [FromServices] IVisitTaskService _visitTaskService)
|
||||
{
|
||||
var singId = await _inspectionService.RecordSing(opt.SignInfo);
|
||||
var result = await _visitTaskService.ConfirmReReading(opt.Data);
|
||||
|
|
|
@ -1118,7 +1118,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
HtmlPath = k.HtmlPath,
|
||||
Path = k.Path,
|
||||
InstanceNumber = k.InstanceNumber,
|
||||
|
||||
FileSize=k.FileSize,
|
||||
}).ToList()
|
||||
})
|
||||
});
|
||||
|
|
|
@ -199,6 +199,8 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
|||
public Guid subjectVisitId { get; set; }
|
||||
|
||||
public AuditStateEnum auditState { get; set; }
|
||||
|
||||
public bool? IsSecondPass { get; set; }
|
||||
}
|
||||
|
||||
public class SetSeriesStateDto
|
||||
|
|
|
@ -251,7 +251,13 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
}
|
||||
|
||||
|
||||
|
||||
public class SecondReviewDto
|
||||
{
|
||||
public DateTime? SecondReviewTime { get; set; }
|
||||
public string FullName { get; set; }
|
||||
public string UserName { get; set; }
|
||||
public DateTime? SignTime { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class TrialVisitQADTO
|
||||
|
@ -270,6 +276,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
|
||||
public QARelationInfo RelationInfo { get; set; } = new QARelationInfo();
|
||||
|
||||
public List<SecondReviewDto> SecondReviewList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2013,6 +2013,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
// 1代表第一个人QC数据 2 代表第二个人QC数据
|
||||
public CurrentQC CurrentQCEnum { get; set; }
|
||||
|
||||
public DateTime? SecondReviewTime { get; set; }
|
||||
}
|
||||
|
||||
public class ForwardQuery : PageInput
|
||||
|
@ -2167,6 +2169,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public class QCVisitBasicListViewModel
|
||||
{
|
||||
public SecondReviewState SecondReviewState { get; set; }
|
||||
public bool IsSubjectQuit { get; set; }
|
||||
public ChallengeStateEnum ChallengeState { get; set; }
|
||||
public bool? IsConfirmedClinicalData { get; set; }
|
||||
|
|
|
@ -35,6 +35,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public DateTime UpdateTime { get; set; }
|
||||
public Guid UpdateUserId { get; set; }
|
||||
|
||||
public bool IsQuestionQCAuditPassed { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class QCQuestionFilterSelect
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, [FromRoute] AuditStateEnum auditState);
|
||||
Task<IResponseOutput> SetCheckPass(SetCheckPassDt data);
|
||||
|
||||
|
||||
Task<IResponseOutput> QCSecondReviewPassedOrFailed(Guid trialId, Guid subjectVisitId, bool isSecondPass);
|
||||
|
||||
|
||||
Task<IResponseOutput> AddCheckChallengeReply(CheckChallengeDialogCommand checkDialogCommand);
|
||||
|
|
|
@ -7,6 +7,7 @@ using IRaCIS.Core.Infrastructure;
|
|||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using MassTransit.Initializers;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Linq;
|
||||
|
||||
namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
|
@ -409,11 +410,49 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
var temp = await GetVisitQCStudyAndSeriesList(subjectVisitId);
|
||||
|
||||
var qacheckList = await GetQCQuestionAnswerList(subjectVisitId, sv.TrialId, trialQCProcess, currentQCType);
|
||||
//var qacheckList = await GetQCQuestionAnswerList(subjectVisitId, sv.TrialId, trialQCProcess, currentQCType);
|
||||
|
||||
List<SecondReviewDto> secondReviewList = new List<SecondReviewDto>();
|
||||
|
||||
|
||||
if (sv.SecondReviewState != SecondReviewState.None)
|
||||
{
|
||||
var trialConfirmTime = _trialRepository.Where(t => t.Id == sv.TrialId).Select(t => t.QCQuestionConfirmedTime).FirstOrDefault();
|
||||
|
||||
secondReviewList = _trialQCQuestionAnswerRepository.Where(t => t.SubjectVisitId == subjectVisitId && t.CurrentQCEnum == CurrentQC.SecondReview).Where(t => t.SecondReviewTime != null)
|
||||
.Select(t => new SecondReviewDto { SecondReviewTime = t.SecondReviewTime, SignTime = t.UpdateTime, FullName = t.UpdateUserRole.FullName, UserName = t.UpdateUserRole.UserName }).Distinct().ToList();
|
||||
|
||||
var secondReviewTimeList = secondReviewList.Select(t => t.SecondReviewTime).Distinct().ToList();
|
||||
|
||||
//首次加入
|
||||
if (!secondReviewTimeList.Contains(trialConfirmTime))
|
||||
{
|
||||
secondReviewList.Add(new SecondReviewDto() { SecondReviewTime = trialConfirmTime });
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sv.SecondReviewState == SecondReviewState.WaitAudit)
|
||||
{
|
||||
foreach (var item in secondReviewList)
|
||||
{
|
||||
if (item.SecondReviewTime == trialConfirmTime)
|
||||
{
|
||||
item.SignTime = null;
|
||||
item.FullName = "";
|
||||
item.UserName = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
secondReviewList = secondReviewList.OrderByDescending(t => t.SecondReviewTime).ToList();
|
||||
}
|
||||
|
||||
|
||||
return new TrialVisitQADTO
|
||||
{
|
||||
QCQuestionAnswerList = qacheckList,
|
||||
//QCQuestionAnswerList = qacheckList,
|
||||
|
||||
SecondReviewList = secondReviewList,
|
||||
|
||||
IsHaveStudyClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.IsConfirm && x.TrialId == sv.TrialId && x.ClinicalDataLevel == ClinicalLevel.Study),
|
||||
StudyList = temp.StudyList,
|
||||
|
@ -434,8 +473,45 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
[HttpPost]
|
||||
public async Task<List<QCQuestionAnswer>> GetQCQuestionAnswer(GetQCQuestionAnswerInDto inDto)
|
||||
{
|
||||
var questionAnswerlist = await (from data in _trialQCQuestionRepository.Where(x => x.TrialId == inDto.TrialId && x.IsEnable)
|
||||
join answer in _trialQCQuestionAnswerRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId && x.QCProcessEnum == inDto.QCProcessEnum && x.CurrentQCEnum == inDto.CurrentQCEnum).AsQueryable() on data.Id equals answer.TrialQCQuestionConfigureId into answertemp
|
||||
var subjectVisitId = inDto.SubjectVisitId;
|
||||
|
||||
List<QCQuestionAnswer> questionAnswerlist = new List<QCQuestionAnswer>();
|
||||
|
||||
//判断当前访视质控是否完成,再判断复审是完成查看,还是添加编辑
|
||||
|
||||
var sv = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).FirstNotNullAsync();
|
||||
|
||||
if (sv.SecondReviewState == SecondReviewState.None && sv.AuditState == AuditStateEnum.QCPassed)
|
||||
{
|
||||
|
||||
//现在之前历史质控的展示要从答案为主表取数据,添加和编辑按照之前方式
|
||||
|
||||
questionAnswerlist = await _trialQCQuestionAnswerRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId && x.QCProcessEnum == inDto.QCProcessEnum && x.CurrentQCEnum == inDto.CurrentQCEnum)
|
||||
.Select(data => new QCQuestionAnswer()
|
||||
{
|
||||
Answer = data.Answer,
|
||||
ShowOrder = data.TrialQCQuestionConfigure.ShowOrder,
|
||||
QuestionName = data.TrialQCQuestionConfigure.QuestionName,
|
||||
Id = data.TrialQCQuestionConfigure.Id,
|
||||
IsRequired = data.TrialQCQuestionConfigure.IsRequired,
|
||||
ParentId = data.TrialQCQuestionConfigure.ParentId,
|
||||
ParentTriggerValue = data.TrialQCQuestionConfigure.ParentTriggerValue,
|
||||
Type = data.TrialQCQuestionConfigure.Type,
|
||||
TypeValue = data.TrialQCQuestionConfigure.TypeValue
|
||||
}).OrderBy(t => t.ShowOrder).ToListAsync();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var secondReviewTime = inDto.SecondReviewTime != null ? (DateTime)inDto.SecondReviewTime : DateTime.Now;
|
||||
|
||||
#region 之前编辑和审核通过后展示都是通过这个接口
|
||||
|
||||
questionAnswerlist = await (from data in _trialQCQuestionRepository.Where(x => x.TrialId == inDto.TrialId && x.IsEnable)
|
||||
join answer in _trialQCQuestionAnswerRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId && x.QCProcessEnum == inDto.QCProcessEnum && x.CurrentQCEnum == inDto.CurrentQCEnum)
|
||||
.Where(t => inDto.CurrentQCEnum == CurrentQC.SecondReview ? t.SecondReviewTime >= secondReviewTime && t.SecondReviewTime <= secondReviewTime.AddSeconds(1) : true)
|
||||
on data.Id equals answer.TrialQCQuestionConfigureId into answertemp
|
||||
from leftanswer in answertemp.DefaultIfEmpty()
|
||||
select new QCQuestionAnswer()
|
||||
{
|
||||
|
@ -449,6 +525,17 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
Type = data.Type,
|
||||
TypeValue = data.TypeValue
|
||||
}).OrderBy(t => t.ShowOrder).ToListAsync();
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var result = questionAnswerlist.Where(x => x.ParentId == null).OrderBy(t => t.ShowOrder).ToList();
|
||||
result.ForEach(x =>
|
||||
|
|
|
@ -727,9 +727,17 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
//[Authorize(Policy = IRaCISPolicy.IQC)]
|
||||
public async Task<IResponseOutput> AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType)
|
||||
{
|
||||
if (currentQCType == CurrentQC.SecondReview)
|
||||
{
|
||||
//二次复核自动领取,如果有人先领取了,那么后续不能操作
|
||||
await _subjectVisitRepository.UpdatePartialFromQueryAsync(t => t.Id == subjectVisitId && t.CurrentActionUserId == null, u => new SubjectVisit() { CurrentActionUserId = _userInfo.UserRoleId });
|
||||
}
|
||||
//验证是否能操作
|
||||
await VerifyIsCanQCAsync(null, subjectVisitId);
|
||||
|
||||
|
||||
var trialConfirmTime = _trialRepository.Where(t => t.Id == trialId).Select(t => t.QCQuestionConfirmedTime).FirstOrDefault();
|
||||
|
||||
//更新
|
||||
if (qcQuestionAnswerCommands.Any(t => t.Id != null))
|
||||
{
|
||||
|
@ -774,7 +782,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
var addlist = _mapper.Map<List<TrialQCQuestionAnswer>>(qcQuestionAnswerCommands);
|
||||
|
||||
addlist.ForEach(t => { t.TrialId = trialId; t.SubjectVisitId = subjectVisitId; t.CurrentQCEnum = currentQCType; t.QCProcessEnum = trialQCProcess; });
|
||||
|
||||
|
||||
addlist.ForEach(t => { t.TrialId = trialId; t.SubjectVisitId = subjectVisitId; t.CurrentQCEnum = currentQCType; t.QCProcessEnum = trialQCProcess; t.SecondReviewTime = currentQCType == CurrentQC.SecondReview ? trialConfirmTime : null; });
|
||||
|
||||
await _trialQCQuestionAnswerRepository.AddRangeAsync(addlist);
|
||||
|
||||
|
@ -2077,8 +2087,43 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
}
|
||||
|
||||
public async Task<IResponseOutput> QCSecondReviewPassedOrFailed(Guid trialId, Guid subjectVisitId, bool isSecondPass)
|
||||
{
|
||||
if (!await _trialUserRoleRepository.AnyAsync(t => t.TrialId == trialId && t.UserId == _userInfo.UserRoleId))
|
||||
{
|
||||
//---您已经被移出项目,没有操作权限。
|
||||
return ResponseOutput.NotOk(_localizer["QCOperation_RemoveItem"]);
|
||||
}
|
||||
|
||||
|
||||
var sv = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
|
||||
|
||||
await VerifyIsCanQCAsync(sv);
|
||||
|
||||
var trialConfirmTime = _trialRepository.Where(t => t.Id == sv.TrialId).Select(t => t.QCQuestionConfirmedTime).FirstOrDefault();
|
||||
|
||||
if (sv.SecondReviewState == SecondReviewState.WaitAudit)
|
||||
{
|
||||
if (isSecondPass)
|
||||
{
|
||||
sv.SecondReviewState = SecondReviewState.AuditPassed;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
sv.SecondReviewState = SecondReviewState.AuditFailed;
|
||||
}
|
||||
|
||||
await _trialQCQuestionAnswerRepository.BatchUpdateNoTrackingAsync(t => t.SubjectVisitId == sv.Id && t.CurrentQCEnum == CurrentQC.SecondReview && t.SecondReviewTime == trialConfirmTime, u => new TrialQCQuestionAnswer()
|
||||
{
|
||||
UpdateUserId = _userInfo.UserRoleId,
|
||||
UpdateTime = DateTime.Now
|
||||
});
|
||||
}
|
||||
await _subjectVisitRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置、取消 访视紧急
|
||||
|
|
|
@ -479,6 +479,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<TrialQCQuestion, TrialQCQuestionAddOrEdit>();
|
||||
|
||||
CreateMap<TrialQCQuestion, TrialQCQuestionConfigureView>()
|
||||
.ForMember(d => d.IsQuestionQCAuditPassed, u => u.MapFrom(s => s.TrialQCQuestionAnswerList.Any(c => c.TrialQCQuestionConfigureId == s.Id && c.SubjectVisit.AuditState == AuditStateEnum.QCPassed)))
|
||||
.ForMember(d => d.ParentShowOrder, u => u.MapFrom(s => s.ParentQCQuestion.ShowOrder));
|
||||
|
||||
CreateMap<TrialQCQuestionSelect, TrialQCQuestionConfigureView>();
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace IRaCIS.Core.Application
|
|||
IRepository<SystemBasicData> _systemBasicDataRepository,
|
||||
IRepository<SubjectVisit> _subjectVisitRepository,
|
||||
IRepository<Enroll> _enrollRepository,
|
||||
IRepository<TrialQCQuestionAnswer> _qcQuestionAnswerRepository,
|
||||
IRepository<TrialStateChange> _trialStateChangeRepository,
|
||||
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository, IRepository<TrialDicomAE> _dicomAERepository,
|
||||
IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer, IFusionCache _fusionCache) : BaseService, ITrialConfigService
|
||||
|
@ -861,9 +862,18 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { IsTrialUrgentConfirmed = true });
|
||||
}
|
||||
else
|
||||
else if (signConfirmDTO.SignCode == ((int)SignEnum.TrialQCQuestionConfirmUpdate).ToString())
|
||||
{
|
||||
await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = null, QCQuestionConfirmedUserId = null, IsQCQuestionConfirmed = false });
|
||||
}
|
||||
else if (signConfirmDTO.SignCode == ((int)SignEnum.SecondReviewConfirm).ToString())
|
||||
{
|
||||
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(t => t.Id == signConfirmDTO.TrialId && t.AuditState == AuditStateEnum.QCPassed, u => new SubjectVisit() { SecondReviewState = SecondReviewState.WaitAudit });
|
||||
|
||||
if (signConfirmDTO.SignCode == ((int)SignEnum.TrialQCQuestionConfirm).ToString())
|
||||
//删除复审中间临时数据
|
||||
await _qcQuestionAnswerRepository.BatchDeleteNoTrackingAsync(t => t.SubjectVisit.TrialId == signConfirmDTO.TrialId && t.SubjectVisit.AuditState != AuditStateEnum.QCPassed && t.CurrentQCEnum == CurrentQC.SecondReview);
|
||||
}
|
||||
else if (signConfirmDTO.SignCode == ((int)SignEnum.TrialQCQuestionConfirm).ToString())
|
||||
{
|
||||
|
||||
var trialConfig = (await _trialRepository
|
||||
|
@ -909,9 +919,9 @@ namespace IRaCIS.Core.Application
|
|||
IsConfirm = true
|
||||
});
|
||||
await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.UserRoleId, IsQCQuestionConfirmed = true });
|
||||
await _trialRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
await _trialRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
|
|
@ -29,6 +29,13 @@ namespace IRaCIS.Core.Domain.Share
|
|||
|
||||
TrialQCQuestionConfirm=107,
|
||||
|
||||
|
||||
//重置质控问题配置
|
||||
|
||||
TrialQCQuestionConfirmUpdate=112,
|
||||
|
||||
SecondReviewConfirm = 219,
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,4 +19,14 @@ namespace IRaCIS.Core.Domain.Share
|
|||
|
||||
}
|
||||
|
||||
public enum SecondReviewState
|
||||
{
|
||||
None = 0,
|
||||
|
||||
WaitAudit=1,
|
||||
|
||||
AuditPassed=2,
|
||||
|
||||
AuditFailed=3,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,11 @@
|
|||
|
||||
First = 1,
|
||||
|
||||
Second = 2
|
||||
Second = 2,
|
||||
|
||||
|
||||
//二次复核,只会一个人
|
||||
SecondReview=3,
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -108,6 +108,11 @@ public abstract class BaseFullAuditEntity : Entity, IAuditUpdate, IAuditAdd
|
|||
[ForeignKey("CreateUserId")]
|
||||
[JsonIgnore]
|
||||
public UserRole CreateUserRole { get; set; }
|
||||
|
||||
|
||||
[ForeignKey("CreateUserId")]
|
||||
[JsonIgnore]
|
||||
public UserRole UpdateUserRole { get; set; }
|
||||
}
|
||||
public abstract class BaseFullDeleteAuditEntity : Entity, IAuditUpdate, IAuditAdd, ISoftDelete
|
||||
{
|
||||
|
|
|
@ -8,6 +8,9 @@ public class TrialQCQuestionAnswer : BaseFullAuditEntity
|
|||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
public TrialQCQuestion TrialQCQuestionConfigure { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
#endregion
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
@ -20,4 +23,7 @@ public class TrialQCQuestionAnswer : BaseFullAuditEntity
|
|||
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
public Guid TrialQCQuestionConfigureId { get; set; }
|
||||
|
||||
|
||||
public DateTime? SecondReviewTime { get; set; }
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class SubjectVisit : BaseFullDeleteAuditEntity
|
|||
public List<SubjectCriteriaEvaluationVisitFilter> SubjectCriteriaEvaluationVisitFilterList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<SubjectVisitImageBackRecord> SubjectVisitImageBackRecordList { get; set; }
|
||||
public List<SubjectVisitImageBackRecord> SubjectVisitImageBackRecordList { get; set; }
|
||||
#endregion
|
||||
|
||||
public Guid TrialSiteId { get; set; }
|
||||
|
@ -188,7 +188,7 @@ public class SubjectVisit : BaseFullDeleteAuditEntity
|
|||
public Guid? SubmitUserId { get; set; }
|
||||
public ReadingStatusEnum ReadingStatus { get; set; }
|
||||
|
||||
|
||||
public SecondReviewState SecondReviewState { get; set; }
|
||||
}
|
||||
|
||||
[Comment("受试者访视影像回退记录表")]
|
||||
|
|
|
@ -217,6 +217,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
extraIdentification = oldentity.IsConfigureEmail ? "/EmailUpdate" : "/EmailSave";
|
||||
break;
|
||||
case "configTrialBasicInfo/TrialConfigSignatureConfirm":
|
||||
|
||||
if (entity.IsQCQuestionConfirmed == false)
|
||||
{
|
||||
extraIdentification = $"/ConfirmReset";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
//var trialDicomAE = await _dbContext.TrialDicomAE.Where(t => t.TrialId == entity.Id).FirstOrDefaultAsync();
|
||||
|
@ -1958,7 +1965,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
var isDistinctionInterface = true;
|
||||
|
||||
var reason = string.Empty;
|
||||
var reason = entity.ApplyReason;
|
||||
|
||||
#region 处理标识
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class qcSecond : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "SecondReviewTime",
|
||||
table: "TrialQCQuestionAnswer",
|
||||
type: "datetime2",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "SecondReviewState",
|
||||
table: "SubjectVisit",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_TrialQCQuestionAnswer_SubjectVisitId",
|
||||
table: "TrialQCQuestionAnswer",
|
||||
column: "SubjectVisitId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_TrialQCQuestionAnswer_SubjectVisit_SubjectVisitId",
|
||||
table: "TrialQCQuestionAnswer",
|
||||
column: "SubjectVisitId",
|
||||
principalTable: "SubjectVisit",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_TrialQCQuestionAnswer_SubjectVisit_SubjectVisitId",
|
||||
table: "TrialQCQuestionAnswer");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_TrialQCQuestionAnswer_SubjectVisitId",
|
||||
table: "TrialQCQuestionAnswer");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SecondReviewTime",
|
||||
table: "TrialQCQuestionAnswer");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SecondReviewState",
|
||||
table: "SubjectVisit");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9034,6 +9034,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<int>("SecondReviewState")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid>("SubjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
|
@ -12882,6 +12885,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<int>("QCProcessEnum")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("SecondReviewTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("SubjectVisitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
|
@ -12901,6 +12907,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.HasIndex("SubjectVisitId");
|
||||
|
||||
b.HasIndex("TrialQCQuestionConfigureId");
|
||||
|
||||
b.ToTable("TrialQCQuestionAnswer", t =>
|
||||
|
@ -18650,6 +18658,12 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
||||
.WithMany()
|
||||
.HasForeignKey("SubjectVisitId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.TrialQCQuestion", "TrialQCQuestionConfigure")
|
||||
.WithMany("TrialQCQuestionAnswerList")
|
||||
.HasForeignKey("TrialQCQuestionConfigureId")
|
||||
|
@ -18658,6 +18672,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("SubjectVisit");
|
||||
|
||||
b.Navigation("TrialQCQuestionConfigure");
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue