上传Dicom影像
parent
046c13ecf4
commit
977d83924d
|
@ -18,6 +18,9 @@ using EasyCaching.Core;
|
|||
using IRaCIS.Core.Infra.EFCore;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||
|
||||
namespace IRaCIS.Api.Controllers
|
||||
{
|
||||
|
@ -31,7 +34,7 @@ namespace IRaCIS.Api.Controllers
|
|||
private readonly IStudyService _studyService;
|
||||
private readonly IDicomArchiveService _dicomArchiveService;
|
||||
private readonly ILogger<StudyController> _logger;
|
||||
|
||||
private readonly IInspectionService _inspectionService;
|
||||
private IEasyCachingProvider _provider;
|
||||
private IUserInfo _userInfo;
|
||||
private static object _locker = new object();
|
||||
|
@ -40,6 +43,7 @@ namespace IRaCIS.Api.Controllers
|
|||
public StudyController(IStudyService studyService,
|
||||
IDicomArchiveService dicomArchiveService,
|
||||
ILogger<StudyController> logger,
|
||||
IInspectionService inspectionService,
|
||||
IEasyCachingProvider provider, IUserInfo userInfo
|
||||
)
|
||||
{
|
||||
|
@ -48,7 +52,7 @@ namespace IRaCIS.Api.Controllers
|
|||
_studyService = studyService;
|
||||
_dicomArchiveService = dicomArchiveService;
|
||||
_logger = logger;
|
||||
|
||||
this._inspectionService = inspectionService;
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,6 +67,8 @@ namespace IRaCIS.Api.Controllers
|
|||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
public async Task<IResponseOutput> ArchiveStudy([FromForm] ArchiveStudyCommand archiveStudyCommand)
|
||||
{
|
||||
|
||||
|
||||
//Stopwatch sw = new Stopwatch();
|
||||
var startTime = DateTime.Now;
|
||||
//sw.Start();
|
||||
|
@ -205,6 +211,8 @@ namespace IRaCIS.Api.Controllers
|
|||
return ResponseOutput.NotOk("未完成该检查的归档", archiveResult);
|
||||
}
|
||||
|
||||
await _inspectionService.AddInspectionRecordAsync(JsonConvert.DeserializeObject<DataInspectionAddDTO>(archiveStudyCommand.AuditInfo))
|
||||
|
||||
return ResponseOutput.Ok(archiveResult);
|
||||
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@ using IRaCIS.Core.Infra.EFCore;
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -16,7 +19,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<DicomInstance> _dicomInstanceRepository;
|
||||
private readonly IRepository<DicomSeries> _dicomSeriesRepository;
|
||||
|
||||
private readonly IInspectionService _inspectionService;
|
||||
private readonly IUserInfo _userInfo;
|
||||
|
||||
private readonly IMapper _mapper;
|
||||
|
@ -34,7 +37,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<DicomInstance> dicomInstanceRepository,
|
||||
IRepository<DicomSeries> dicomSeriesRepository,
|
||||
|
||||
IInspectionService inspectionService,
|
||||
IUserInfo userInfo,
|
||||
|
||||
IRepository<StudyMonitor> dicomStudyMonitorRepository,
|
||||
|
@ -50,6 +53,7 @@ namespace IRaCIS.Application.Services
|
|||
_subjectVisitRepository = subjectVisitRepository;
|
||||
_dicomInstanceRepository = dicomInstanceRepository;
|
||||
_dicomSeriesRepository = dicomSeriesRepository;
|
||||
this._inspectionService = inspectionService;
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
|
@ -77,7 +81,7 @@ namespace IRaCIS.Application.Services
|
|||
sopInstanceUidList = _dicomInstanceRepository.Where(t => t.StudyId == studyId).Select(t => t.SopInstanceUid).ToList();
|
||||
}
|
||||
|
||||
public void UploadOrReUploadNeedTodo(ArchiveStudyCommand archiveStudyCommand, List<Guid> archiveStudyIds, ref DicomArchiveResult result,StudyMonitor monitor)
|
||||
public void UploadOrReUploadNeedTodo(ArchiveStudyCommand archiveStudyCommand, List<Guid> archiveStudyIds, ref DicomArchiveResult result,StudyMonitor monitor)
|
||||
{
|
||||
|
||||
|
||||
|
@ -98,6 +102,9 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
subjectVisit.VisitExecuted = VisitExecutedEnum.Executed;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//处理拍片日期
|
||||
|
@ -144,6 +151,23 @@ namespace IRaCIS.Application.Services
|
|||
_ = _dicomStudyMonitorRepository.AddAsync(monitor).Result;
|
||||
_ = _studyRepository.SaveChangesAsync().Result;
|
||||
|
||||
// 这里上传dicom影像之后修改之后修改访视的状态
|
||||
_inspectionService.AddInspectionRecordAsync(new DataInspectionAddDTO()
|
||||
{
|
||||
SiteId = subjectVisit.SiteId,
|
||||
SubjectId = subjectVisit.SubjectId,
|
||||
IsSign = false,
|
||||
VisitStageId = subjectVisit.VisitStageId,
|
||||
SubjectVisitName = subjectVisit.VisitName,
|
||||
BlindName = subjectVisit.BlindName,
|
||||
SubjectVisitId = subjectVisit.Id,
|
||||
Identification = "Edit|Visit|Status|Visit-Image Uplo",
|
||||
JsonDetail= JsonConvert.SerializeObject(new {
|
||||
SubmitState= subjectVisit.SubmitState,
|
||||
VisitExecuted= subjectVisit.VisitExecuted,
|
||||
})
|
||||
|
||||
}).Wait();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ using IRaCIS.Core.Domain.Share;
|
|||
using IRaCIS.Core.Application.Contracts.Dicom.DTO;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
|
@ -193,6 +194,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public string StudyInstanceUid { get; set; } = String.Empty;
|
||||
|
||||
|
||||
public string AuditInfo { get; set; }=string.Empty;
|
||||
|
||||
|
||||
|
||||
//public Guid TrialId { get; set; }
|
||||
//public Guid SiteId { get; set; }
|
||||
//public Guid SubjectId { get; set; }
|
||||
|
|
Loading…
Reference in New Issue