添加接口
This commit is contained in:
@@ -1527,7 +1527,7 @@
|
||||
<param name="setOrCancel"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.SetNeedReupload(System.Guid,System.Guid,System.Guid)">
|
||||
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.SetNeedReupload(System.Guid,System.Guid)">
|
||||
<summary>
|
||||
QA设置 需要重传
|
||||
</summary>
|
||||
|
||||
@@ -169,6 +169,36 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||
public string closeReason { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SetNeedReuploadDto
|
||||
{
|
||||
public Guid trialId { get; set; }
|
||||
public Guid qcChallengeId { get; set; }
|
||||
}
|
||||
|
||||
public class SetVisitUrgentDto
|
||||
{
|
||||
public Guid trialId { get; set; }
|
||||
public Guid subjectVisitId { get; set; }
|
||||
public bool setOrCancel { get; set; }
|
||||
}
|
||||
|
||||
public class QCPassedOrFailedDto
|
||||
{
|
||||
public Guid trialId { get; set; }
|
||||
public Guid subjectVisitId { get; set; }
|
||||
public Guid signId { get; set; }
|
||||
public AuditStateEnum auditState { get; set; }
|
||||
}
|
||||
|
||||
public class SetSeriesStateDto
|
||||
{
|
||||
public Guid subjectVisitId { get; set; }
|
||||
public Guid studyId { get; set; }
|
||||
public Guid seriesId { get; set; }
|
||||
public int state { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateModalityDto
|
||||
{
|
||||
public Guid id { get; set; }
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
public interface IQCOperationService
|
||||
{
|
||||
Task<IResponseOutput> CheckBack(Guid subjectVisitId);
|
||||
Task<IResponseOutput> SetNeedReupload(Guid trialId, Guid signId, Guid qcChallengeId);
|
||||
Task<IResponseOutput> SetNeedReupload(Guid trialId, Guid qcChallengeId);
|
||||
Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, Guid signId, [FromRoute] AuditStateEnum auditState);
|
||||
Task<IResponseOutput> SetCheckPass(Guid subjectVisitId);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
|
||||
Task<IResponseOutput<CheckChallengeDialog>> AddCheckChallengeReply(CheckChallengeDialogCommand checkDialogCommand);
|
||||
Task<IResponseOutput> AddOrUpdateQCChallenge(QCChallengeCommand qaQuestionCommand, Guid trialId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType);
|
||||
Task<QCChallenge> AddOrUpdateQCChallenge(QCChallengeCommand qaQuestionCommand, Guid trialId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType);
|
||||
Task<IResponseOutput> AddOrUpdateQCQuestionAnswerList(QCQuestionAnswerCommand[] qcQuestionAnswerCommands, Guid trialId, Guid subjectVisitId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType);
|
||||
Task<IResponseOutput> AddQCChallengeReply(QADialogCommand qaDialogCommand);
|
||||
Task<IResponseOutput> CloseCheckChallenge(Guid subjectVisitId);
|
||||
@@ -37,5 +37,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
Task<IResponseOutput> UpdateSubjectAndSVInfo(UploadSubjectAndVisitCommand command);
|
||||
Task<IResponseOutput> UploadVisitCheckExcel(IFormFile file, [FromServices] IMediator _mediator, Guid trialId, [FromServices] IWebHostEnvironment _hostEnvironment);
|
||||
Task<IResponseOutput> VerifyCanQCPassedOrFailed(Guid subjectVisitId);
|
||||
|
||||
Task<IResponseOutput> ForwardSVDicomImage(Guid[] subjectVisitIdList);
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ using Magicodes.ExporterAndImporter.Excel;
|
||||
using Newtonsoft.Json;
|
||||
using Magicodes.ExporterAndImporter.Csv;
|
||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
|
||||
namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
@@ -74,14 +75,15 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
[HttpPost("{trialId:guid}/{trialQCProcess:int}/{currentQCType:int}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
[Authorize(Policy = "ImageQCPolicy")]
|
||||
public async Task<IResponseOutput> AddOrUpdateQCChallenge(QCChallengeCommand qaQuestionCommand, Guid trialId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType)
|
||||
public async Task<QCChallenge> AddOrUpdateQCChallenge(QCChallengeCommand qaQuestionCommand, Guid trialId, [FromRoute] TrialQCProcess trialQCProcess, [FromRoute] CurrentQC currentQCType)
|
||||
{
|
||||
|
||||
if (qaQuestionCommand.Id == null)
|
||||
{
|
||||
if (await _repository.AnyAsync<QCChallenge>(t => t.IsClosed == false && t.SubjectVisitId == qaQuestionCommand.SubjectVisitId && t.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload))
|
||||
{
|
||||
return ResponseOutput.NotOk("当前访视有未关闭的 同意CRC上传的质疑,不允许再次添加质疑");
|
||||
throw new BusinessValidationFailedException("当前访视有未关闭的 同意CRC上传的质疑,不允许再次添加质疑");
|
||||
|
||||
}
|
||||
|
||||
QCChallenge? qcChallenge = null;
|
||||
@@ -90,7 +92,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
var trialConfig = _repository.Where<Trial>(t => t.Id == trialId).Select(t => new { TrialId = t.Id, t.QCProcessEnum, t.IsImageConsistencyVerification }).FirstOrDefault();
|
||||
|
||||
if (trialConfig == null) return Null404NotFound(trialConfig);
|
||||
if (trialConfig == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("项目不存在");
|
||||
}
|
||||
|
||||
#region 处理访视状态变更
|
||||
//var dbSubjectVisit = _subjectVisitRepository.FirstOrDefault(t => t.Id == qaQuestionCommand.SubjectVisitId);
|
||||
@@ -148,7 +153,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
//分开两个事务 处理访视质疑状态
|
||||
await DealChallengeState(qcChallenge.SubjectVisitId);
|
||||
|
||||
return ResponseOutput.Result(success, qcChallenge.Id);
|
||||
return qcChallenge;
|
||||
|
||||
#region 添加的时候把记录给留存
|
||||
//var templateItems = _mapper.Map<List<QARecordTemplateItemDetail>>(visitQaCommand.QATrialTemplateItemList);
|
||||
@@ -173,7 +178,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
var qcChallenge = await _repository.FirstOrDefaultAsync<QCChallenge>(t => t.Id == qaQuestionCommand.Id);
|
||||
|
||||
if (qcChallenge == null) return Null404NotFound(qcChallenge);
|
||||
if (qcChallenge == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException("QC问题不存在");
|
||||
};
|
||||
|
||||
_mapper.Map(qaQuestionCommand, qcChallenge);
|
||||
|
||||
@@ -182,7 +190,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
await DealChallengeState(qcChallenge.SubjectVisitId);
|
||||
|
||||
|
||||
return ResponseOutput.Result(success);
|
||||
return qcChallenge;
|
||||
|
||||
}
|
||||
|
||||
@@ -1579,7 +1587,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{qcChallengeId:guid}/{signId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> SetNeedReupload(Guid trialId, Guid signId, Guid qcChallengeId)
|
||||
public async Task<IResponseOutput> SetNeedReupload(Guid trialId, Guid qcChallengeId)
|
||||
{
|
||||
if (_userInfo.UserTypeEnumInt != (int)UserTypeEnum.IQC)
|
||||
{
|
||||
@@ -1654,9 +1662,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
var success = await _repository.SaveChangesAsync();
|
||||
|
||||
var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
||||
//var signSuccess = await _repository.UpdateFromQueryAsync<TrialSign>(t => t.Id == signId, u => new TrialSign() { IsCompleted = true });
|
||||
|
||||
return ResponseOutput.Result(success && signSuccess);
|
||||
return ResponseOutput.Result(success);
|
||||
|
||||
}
|
||||
|
||||
@@ -1817,7 +1825,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
SiteId = data.SiteId,
|
||||
TrialId = data.TrialId,
|
||||
IsSign = false,
|
||||
CreateTime=DateTime.Now.AddSeconds(1),
|
||||
Identification= "Edit|Subject|Info|Subject",
|
||||
CreateTime =DateTime.Now.AddSeconds(1),
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
FirstGiveMedicineTime= command.SubjectFirstGiveMedicineTime.Value.ToString("yyyy-MM-dd")
|
||||
@@ -1863,7 +1872,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
|
||||
[HttpPost("{trialId:guid}")]
|
||||
public async Task<IResponseOutput> ForwardSVDicomImage(Guid[] subjectVisitIdList, [FromServices] DicomFileStoreHelper _dicomFileStoreHelper)
|
||||
public async Task<IResponseOutput> ForwardSVDicomImage(Guid[] subjectVisitIdList)
|
||||
{
|
||||
|
||||
foreach (var subjectVisitId in subjectVisitIdList)
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class IDDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
@@ -110,6 +111,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ForwardSVDicomImageDto
|
||||
{
|
||||
public Guid[] subjectVisitIdList { get; set; }
|
||||
}
|
||||
public class SubjectVisitSearchDTO : PageInput
|
||||
{
|
||||
public string SubjectInfo { get; set; } = String.Empty;
|
||||
|
||||
@@ -130,6 +130,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
SiteId = subject.SiteId,
|
||||
TrialId = subject.TrialId,
|
||||
IsSign = false,
|
||||
Identification= "Edit|Subject|Info|Subject",
|
||||
CreateTime = DateTime.Now.AddSeconds(1),
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
|
||||
@@ -556,11 +556,12 @@ namespace IRaCIS.Application.Services
|
||||
Identification = "Add|Visit|Info|Visit-Image Upload",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
IsBaseLine = x.BlindName,
|
||||
IsBaseLine = x.IsBaseLine,
|
||||
VisitName = x.VisitName,
|
||||
VisitNum = x.VisitNum,
|
||||
VisitDay = x.VisitDay,
|
||||
VisitExecuted=false,
|
||||
BlindName=x.BlindName,
|
||||
VisitWindowLeft = x.VisitWindowLeft,
|
||||
VisitWindowRight = x.VisitWindowRight,
|
||||
IsEnrollment=y.IsEnrollment,
|
||||
@@ -577,15 +578,18 @@ namespace IRaCIS.Application.Services
|
||||
TrialId = x.TrialId,
|
||||
SubjectCode = y.Code,
|
||||
BlindName = x.BlindName,
|
||||
|
||||
SubjectVisitName = x.VisitName,
|
||||
IsSign = false,
|
||||
CreateTime = createtime.AddMilliseconds(500),
|
||||
Identification = "Init|Visit|Status|Visit-Image Upload",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
BlindName = x.BlindName,
|
||||
VisitName = x.VisitName,
|
||||
SubmitState = "",
|
||||
AuditState = "",
|
||||
IsBaseLine = x.IsBaseLine,
|
||||
IsEnrollment = y.IsEnrollment,
|
||||
IsUrgent = y.IsUrgent,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user