修改绑定配置
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
592de4deb4
commit
f7bc32ed90
|
|
@ -15963,7 +15963,7 @@
|
||||||
<param name="inQuery"></param>
|
<param name="inQuery"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.PatientService.SubmitVisitStudyBinding(IRaCIS.Application.Contracts.SubmitVisitStudyBindingCommand,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance})">
|
<member name="M:IRaCIS.Core.Application.Service.PatientService.SubmitVisitStudyBinding(IRaCIS.Application.Contracts.SubmitVisitStudyBindingCommand,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.FileUploadRecord})">
|
||||||
<summary>
|
<summary>
|
||||||
提交 患者检查和访视的绑定
|
提交 患者检查和访视的绑定
|
||||||
</summary>
|
</summary>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ using IRaCIS.Core.Application.Contracts.Dicom.DTO;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
|
using MassTransit;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Pipelines.Sockets.Unofficial.Arenas;
|
using Pipelines.Sockets.Unofficial.Arenas;
|
||||||
using System.Linq.Dynamic.Core;
|
using System.Linq.Dynamic.Core;
|
||||||
|
|
@ -382,7 +383,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public async Task<IResponseOutput> SubmitVisitStudyBinding(SubmitVisitStudyBindingCommand inCommand,
|
public async Task<IResponseOutput> SubmitVisitStudyBinding(SubmitVisitStudyBindingCommand inCommand,
|
||||||
[FromServices] IRepository<DicomStudy> _dicomstudyRepository,
|
[FromServices] IRepository<DicomStudy> _dicomstudyRepository,
|
||||||
[FromServices] IRepository<DicomSeries> _dicomSeriesRepository,
|
[FromServices] IRepository<DicomSeries> _dicomSeriesRepository,
|
||||||
[FromServices] IRepository<DicomInstance> _dicomInstanceRepository)
|
[FromServices] IRepository<DicomInstance> _dicomInstanceRepository,
|
||||||
|
[FromServices] IRepository<FileUploadRecord> _fileUploadRecordRepository)
|
||||||
{
|
{
|
||||||
|
|
||||||
//这里要做校验 + 同时验证本地系统里面的影像是否存在pacs推过来的
|
//这里要做校验 + 同时验证本地系统里面的影像是否存在pacs推过来的
|
||||||
|
|
@ -403,6 +405,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var subjectVisitId = inCommand.SubjectVisitId;
|
var subjectVisitId = inCommand.SubjectVisitId;
|
||||||
var trialId = inCommand.TrialId;
|
var trialId = inCommand.TrialId;
|
||||||
|
|
||||||
|
var studyCode = "";
|
||||||
|
var studyUid = "";
|
||||||
|
|
||||||
var @lock = _distributedLockProvider.CreateLock($"StudyCode");
|
var @lock = _distributedLockProvider.CreateLock($"StudyCode");
|
||||||
|
|
||||||
using (await @lock.AcquireAsync())
|
using (await @lock.AcquireAsync())
|
||||||
|
|
@ -430,6 +435,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
newStuty.SubjectId = subjectId;
|
newStuty.SubjectId = subjectId;
|
||||||
newStuty.SubjectVisitId = subjectVisitId;
|
newStuty.SubjectVisitId = subjectVisitId;
|
||||||
|
|
||||||
|
studyCode = newStuty.StudyCode;
|
||||||
|
|
||||||
await _dicomStudyRepository.AddAsync(newStuty);
|
await _dicomStudyRepository.AddAsync(newStuty);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -457,12 +464,22 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
}
|
}
|
||||||
await _dicomInstanceRepository.AddRangeAsync(newInstanceList);
|
await _dicomInstanceRepository.AddRangeAsync(newInstanceList);
|
||||||
|
|
||||||
|
|
||||||
|
//回更StudyCode
|
||||||
|
await _fileUploadRecordRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.Path.Contains(newStuty.StudyInstanceUid), u => new FileUploadRecord() { StudyCode = studyCode });
|
||||||
|
|
||||||
|
|
||||||
|
await _scpPatientRepository.BatchUpdateNoTrackingAsync(t => t.Id == find.SCPStudy.PatientId, u => new SCPPatient() { SubjectId = subjectId });
|
||||||
|
await _scpStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == scpStudyId, u => new SCPStudy() { SubjectVisitId = subjectVisitId });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
currentNextCodeInt++;
|
currentNextCodeInt++;
|
||||||
|
|
||||||
await _scpPatientRepository.BatchUpdateNoTrackingAsync(t => t.Id == find.SCPStudy.PatientId, u => new SCPPatient() { SubjectId = subjectId });
|
|
||||||
await _scpStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == scpStudyId, u => new SCPStudy() { SubjectVisitId = subjectVisitId });
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -549,6 +566,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//回更StudyCode
|
||||||
|
await _fileUploadRecordRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.Path.Contains(studyu.StudyInstanceUid), u => new FileUploadRecord() { StudyCode = studyCode });
|
||||||
|
|
||||||
await _scpPatientRepository.BatchUpdateNoTrackingAsync(t => t.Id == scpStudy.PatientId, u => new SCPPatient() { SubjectId = subjectId });
|
await _scpPatientRepository.BatchUpdateNoTrackingAsync(t => t.Id == scpStudy.PatientId, u => new SCPPatient() { SubjectId = subjectId });
|
||||||
await _scpStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == scpStudyId, u => new SCPStudy() { SubjectVisitId = subjectVisitId });
|
await _scpStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == scpStudyId, u => new SCPStudy() { SubjectVisitId = subjectVisitId });
|
||||||
}
|
}
|
||||||
|
|
@ -557,7 +578,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await _scpStudyRepository.SaveChangesAsync();
|
await _scpStudyRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue