添加dicom删除稽查
parent
8f3c5d6b71
commit
005bbf8419
|
@ -20,6 +20,7 @@ using WinSCP;
|
|||
using Magicodes.ExporterAndImporter.Excel;
|
||||
using Newtonsoft.Json;
|
||||
using Magicodes.ExporterAndImporter.Csv;
|
||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||
|
||||
namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
|
@ -30,16 +31,19 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
private readonly DicomFileStoreHelper _dicomFileStoreHelper;
|
||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IInspectionService _sinspectionService;
|
||||
private object _locker = new object();
|
||||
|
||||
public QCOperationService(DicomFileStoreHelper dicomFileStoreHelper, IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<Trial> trialRepository,
|
||||
IInspectionService sinspectionService,
|
||||
IRepository<DicomStudy> _trialRepository
|
||||
)
|
||||
{
|
||||
_dicomFileStoreHelper = dicomFileStoreHelper;
|
||||
_subjectVisitRepository = subjectVisitRepository;
|
||||
this._trialRepository = trialRepository;
|
||||
this._sinspectionService = sinspectionService;
|
||||
}
|
||||
|
||||
#region QC质疑 以及回复 关闭
|
||||
|
@ -935,7 +939,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
/// <param name="ids"></param>
|
||||
/// <param name="subjectVisitId"></param>
|
||||
/// <param name="trialId"></param>
|
||||
/// <returns></returns>
|
||||
/// <returns></returns>SeriesCount
|
||||
[HttpPost, Route("{trialId:guid}/{subjectVisitId:guid}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> DeleteStudyList(Guid[] ids, Guid subjectVisitId, Guid trialId)
|
||||
|
@ -946,8 +950,32 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
return ResponseOutput.NotOk("CRC Has Submited Image,can not delete");
|
||||
}
|
||||
var DicomStudys = await _repository.GetQueryable<DicomStudy>().Where(x => ids.Contains(x.Id)).ToListAsync();
|
||||
|
||||
List<DataInspection> datas = new List<DataInspection>();
|
||||
|
||||
DicomStudys.ForEach(x =>
|
||||
{
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
SiteId = x.SiteId,
|
||||
SubjectId = x.SubjectId,
|
||||
TrialId = x.TrialId,
|
||||
SubjectVisitId=x.SubjectVisitId,
|
||||
JsonDetail = JsonConvert.SerializeObject(new
|
||||
{
|
||||
studyUid=x.StudyCode,
|
||||
modality=x.Modalities,
|
||||
bodyPart=x.BodyPartForEdit,
|
||||
seriesNum=x.SeriesCount,
|
||||
fileNum = x.InstanceCount,
|
||||
studyTime=x.StudyTime.ToString("yyyy-MM-dd")
|
||||
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
var DicomStudys=
|
||||
|
||||
#region will calls error wried
|
||||
//ids.ToList().ForEach(async id =>
|
||||
|
@ -1015,7 +1043,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
LatestScanDate = maxArray.Max()
|
||||
});
|
||||
|
||||
await _sinspectionService.AddListInspectionRecordAsync(datas);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue