添加代码
This commit is contained in:
@@ -175,24 +175,6 @@ namespace IRaCIS.Core.Application.Services
|
||||
|
||||
if (isStudyNeedAdd)
|
||||
{
|
||||
//dicomStudy.Id = NewId.NextGuid();
|
||||
|
||||
//datas.Add(new DataInspection()
|
||||
//{
|
||||
|
||||
// SiteId = dicomStudy.SiteId,
|
||||
// SubjectId = dicomStudy.SubjectId,
|
||||
// TrialId = dicomStudy.TrialId,
|
||||
// SubjectVisitId = dicomStudy.SubjectVisitId,
|
||||
// CreateTime = createtime,
|
||||
// GeneralId= dicomStudy.Id,
|
||||
// Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||
// JsonDetail = JsonConvert.SerializeObject(new
|
||||
// {
|
||||
// SubmitState = "待提交",
|
||||
// })
|
||||
//});
|
||||
|
||||
// 添加检查
|
||||
await _studyRepository.AddAsync(dicomStudy);
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||
|
||||
public async Task SetEnum(DataInspectionAddDTO Data)
|
||||
{
|
||||
Data.JsonDetail= await _dataInspectionRepository.SetEnum(Data.Identification, Data.JsonDetail);
|
||||
Data.JsonDetail= await _dataInspectionRepository.SetEnum(Data.TrialId.Value, Data.Identification, Data.JsonDetail);
|
||||
#region 枚举
|
||||
//try
|
||||
//{
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
private readonly IHttpContextAccessor _httpContext;
|
||||
private readonly IDictionaryService _dictionaryService;
|
||||
private readonly IInspectionService _inspectionService;
|
||||
private readonly IRepository<StudyMonitor> _studyMonitorRepository;
|
||||
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository;
|
||||
|
||||
|
||||
@@ -35,16 +36,18 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
|
||||
public NoneDicomStudyService(IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
||||
IHttpContextAccessor httpContext,
|
||||
IDictionaryService dictionaryService,
|
||||
IInspectionService inspectionService,
|
||||
IHttpContextAccessor httpContext,
|
||||
IDictionaryService dictionaryService,
|
||||
IInspectionService inspectionService,
|
||||
IRepository<StudyMonitor> studyMonitorRepository,
|
||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileRepository)
|
||||
{
|
||||
_noneDicomStudyRepository = noneDicomStudyRepository;
|
||||
|
||||
|
||||
this._httpContext = httpContext;
|
||||
this._dictionaryService = dictionaryService;
|
||||
this._inspectionService = inspectionService;
|
||||
this._studyMonitorRepository = studyMonitorRepository;
|
||||
_noneDicomStudyFileRepository = noneDicomStudyFileRepository;
|
||||
}
|
||||
|
||||
@@ -130,20 +133,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
var subvisit = await _repository.GetQueryable<SubjectVisit>().FirstOrDefaultAsync(x => x.Id == subjectVisitId);
|
||||
|
||||
// 修改访视状态
|
||||
//List<DataInspection> datas = new List<DataInspection>();
|
||||
//datas.Add(new DataInspection()
|
||||
//{
|
||||
|
||||
// SiteId = subvisit.SiteId,
|
||||
// SubjectId = subvisit.SubjectId,
|
||||
// TrialId = subvisit.TrialId,
|
||||
// SubjectVisitId = subvisit.Id,
|
||||
// Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||
// JsonDetail = subvisit.ToJcJson()
|
||||
//});
|
||||
|
||||
//await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
@@ -179,23 +169,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
var data = JsonConvert.DeserializeObject<DataInspectionAddDTO>(fileDto.AuditInfo);
|
||||
data.GeneralId = fileDto.noneDicomStudyId;
|
||||
await _inspectionService.AddInspectionRecordAsync(data);
|
||||
|
||||
var subvisit = await _repository.GetQueryable<SubjectVisit>().FirstOrDefaultAsync(x => x.Id == fileDto.subjectVisitId);
|
||||
|
||||
List<DataInspection> datas = new List<DataInspection>();
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
SiteId = subvisit.SiteId,
|
||||
SubjectId = subvisit.SubjectId,
|
||||
TrialId = subvisit.TrialId,
|
||||
SubjectVisitId = subvisit.Id,
|
||||
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||
JsonDetail = subvisit.ToJcJson()
|
||||
});
|
||||
|
||||
|
||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -265,7 +238,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
// 上传非Dicom 后 将状态改为待提交 分为普通上传 和QC后重传 普通上传时才改为待提交
|
||||
await _repository.BatchUpdateAsync<SubjectVisit>(t => t.Id == subjectVisitId && t.SubmitState == SubmitStateEnum.None, u => new SubjectVisit() { SubmitState = SubmitStateEnum.ToSubmit });
|
||||
|
||||
await _repository.AddAsync(new StudyMonitor()
|
||||
await _studyMonitorRepository.AddAsync(new StudyMonitor()
|
||||
{
|
||||
FileCount = formCollection.Files.Count,
|
||||
FileSize = formCollection.Files.Sum(t => t.Length),
|
||||
@@ -316,7 +289,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
}
|
||||
|
||||
|
||||
await _repository.AddAsync(new NoneDicomStudyFile() { FileName = fileName, Path = relativePath, NoneDicomStudyId = noneDicomStudyId });
|
||||
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = fileName, Path = relativePath, NoneDicomStudyId = noneDicomStudyId });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1043,17 +1043,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
var subvisit = await _repository.GetQueryable<SubjectVisit>().FirstOrDefaultAsync(x => x.Id == subjectVisitId);
|
||||
|
||||
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
|
||||
SiteId = subvisit.SiteId,
|
||||
SubjectId = subvisit.SubjectId,
|
||||
TrialId = subvisit.TrialId,
|
||||
SubjectVisitId = subvisit.Id,
|
||||
Identification = "Edit|Visit|Status|Visit-Image Upload|Add Image",
|
||||
JsonDetail = subvisit.ToJcJson()
|
||||
});
|
||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user