修改
This commit is contained in:
@@ -169,8 +169,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
DicomInstance dicomInstance = CreateDicomInstance(dataset, dicomStudy, dicomSeries);
|
||||
|
||||
|
||||
List<DataInspection> datas = new List<DataInspection>();
|
||||
|
||||
|
||||
|
||||
var createtime=DateTime.Now;
|
||||
|
||||
@@ -198,32 +197,32 @@ namespace IRaCIS.Core.Application.Services
|
||||
await _studyRepository.AddAsync(dicomStudy);
|
||||
}
|
||||
|
||||
if (isSeriesNeedAdd) {
|
||||
if (isSeriesNeedAdd)
|
||||
{
|
||||
// 添加序列
|
||||
|
||||
dicomSeries.Id = NewId.NextGuid();
|
||||
await _seriesRepository.AddAsync(dicomSeries);
|
||||
#region 稽查
|
||||
List<DataInspection> datas = new List<DataInspection>();
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
SiteId = dicomStudy.SiteId,
|
||||
SubjectId = dicomStudy.SubjectId,
|
||||
TrialId = dicomStudy.TrialId,
|
||||
GeneralId= dicomSeries.Id,
|
||||
GeneralId = dicomSeries.Id,
|
||||
SubjectVisitId = dicomStudy.SubjectVisitId,
|
||||
CreateTime = createtime.AddMilliseconds(10),
|
||||
Identification = "Add|DICOM Series|Info|Visit-Image Upload",
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
StudyCode=dicomStudy.StudyCode,
|
||||
StudyCode = dicomStudy.StudyCode,
|
||||
Modalities = dicomStudy.Modalities,
|
||||
SeriesNumber= dicomSeries.SeriesNumber,
|
||||
InstanceCount=dicomSeries.InstanceCount,
|
||||
SeriesTime= dicomSeries.SeriesTime,
|
||||
|
||||
SeriesNumber = dicomSeries.SeriesNumber,
|
||||
InstanceCount = dicomSeries.InstanceCount,
|
||||
SeriesTime = dicomSeries.SeriesTime,
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
@@ -241,17 +240,16 @@ namespace IRaCIS.Core.Application.Services
|
||||
SeriesNumber = dicomSeries.SeriesNumber,
|
||||
InstanceCount = dicomSeries.InstanceCount,
|
||||
SeriesTime = dicomSeries.SeriesTime,
|
||||
IsReading= dicomSeries.IsReading,
|
||||
IsReading = dicomSeries.IsReading,
|
||||
|
||||
})
|
||||
});
|
||||
|
||||
await _seriesRepository.AddAsync(dicomSeries);
|
||||
|
||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||
|
||||
await _instanceRepository.AddAsync(dicomInstance);
|
||||
|
||||
|
||||
|
||||
@@ -235,6 +235,13 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||
|
||||
}
|
||||
|
||||
public class SetCheckPassDt
|
||||
{
|
||||
public string ManualPassReason { get; set; } = string.Empty;
|
||||
|
||||
public Guid Id { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class ObtainOrCancelQCTaskDto
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
@@ -13,7 +14,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
Task<IResponseOutput> CheckBack(Guid subjectVisitId);
|
||||
Task<IResponseOutput> SetNeedReupload(Guid trialId, Guid qcChallengeId);
|
||||
Task<IResponseOutput> QCPassedOrFailed(Guid trialId, Guid subjectVisitId, [FromRoute] AuditStateEnum auditState);
|
||||
Task<IResponseOutput> SetCheckPass(Guid subjectVisitId);
|
||||
Task<IResponseOutput> SetCheckPass(SetCheckPassDt data);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ using Newtonsoft.Json;
|
||||
using Magicodes.ExporterAndImporter.Csv;
|
||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||
|
||||
namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
@@ -414,14 +415,14 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
/// <returns></returns>
|
||||
[HttpPut("{trialId:guid}/{signId:guid}/{subjectVisitId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> SetCheckPass(Guid subjectVisitId)
|
||||
public async Task<IResponseOutput> SetCheckPass(SetCheckPassDt data)
|
||||
{
|
||||
if (_userInfo.UserTypeEnumInt != (int)UserTypeEnum.ProjectManager)
|
||||
{
|
||||
ResponseOutput.NotOk("只允许PM 手动设置一致性核查通过");
|
||||
}
|
||||
|
||||
var sv = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == subjectVisitId);
|
||||
var sv = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == data.Id);
|
||||
|
||||
if (sv == null) return Null404NotFound(sv);
|
||||
|
||||
@@ -438,7 +439,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
sv.CheckState = CheckStateEnum.CVPassed;
|
||||
|
||||
sv.ForwardState = ForwardStateEnum.ToForward;
|
||||
|
||||
sv.ManualPassReason = data.ManualPassReason;
|
||||
sv.CheckPassedTime = DateTime.Now;
|
||||
|
||||
await _repository.SaveChangesAsync();
|
||||
@@ -1671,6 +1672,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
var instanceIdList = await _repository.Where<DicomInstance>(t => t.DicomSerie.IsDeleted && t.SubjectVisitId == subjectVisitId)
|
||||
.Select(t => new { InstanceId = t.Id, t.SeriesId, t.StudyId, t.SubjectId, t.SiteId }).ToListAsync();
|
||||
|
||||
// 删除序列
|
||||
List<DataInspection> datas = new List<DataInspection>();
|
||||
var DicomSeriesdata = await _repository.GetQueryable<DicomSeries>().Where(x => x.SubjectVisitId == subjectVisitId).Select(x => new {
|
||||
StudyCode = x.DicomStudy.StudyCode,
|
||||
@@ -1714,6 +1716,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||
instanceIdList.ForEach(t =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user