修改影像下载检查过滤
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b2bcc37dab
commit
49e4980fd0
|
|
@ -3303,6 +3303,18 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> GetDownloadPatientStudyInfo(PatientImageDownloadCommand inCommand)
|
public async Task<IResponseOutput> GetDownloadPatientStudyInfo(PatientImageDownloadCommand inCommand)
|
||||||
{
|
{
|
||||||
|
var isAdminOrOA = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.Admin || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.OA || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin;
|
||||||
|
|
||||||
|
|
||||||
|
var currentUserHospitalGroupIdList = new List<Guid>();
|
||||||
|
|
||||||
|
if (!isAdminOrOA)
|
||||||
|
{
|
||||||
|
currentUserHospitalGroupIdList = _identityUserRepository.Where(t => t.Id == _userInfo.IdentityUserId).SelectMany(t => t.IdentityUserHospitalGroupList)
|
||||||
|
.Where(t => t.IsDisabled == false && t.HospitalGroup.IsEnable).Select(t => t.HospitalGroupId).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var patientIdList = inCommand.PatientIdList.Distinct().ToList();
|
var patientIdList = inCommand.PatientIdList.Distinct().ToList();
|
||||||
|
|
||||||
var studyIdList = inCommand.SCPStudyIdList.Distinct().ToList();
|
var studyIdList = inCommand.SCPStudyIdList.Distinct().ToList();
|
||||||
|
|
@ -3316,6 +3328,7 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
var list = _patientRepository.Where(t => patientIdList.Contains(t.Id))
|
var list = _patientRepository.Where(t => patientIdList.Contains(t.Id))
|
||||||
.SelectMany(t => t.SCPStudyList.Where(t => studyIdList.Count > 0 ? studyIdList.Contains(t.Id) : true))
|
.SelectMany(t => t.SCPStudyList.Where(t => studyIdList.Count > 0 ? studyIdList.Contains(t.Id) : true))
|
||||||
|
.Where(t => isAdminOrOA ? true : t.HospitalGroupList.Any(c => currentUserHospitalGroupIdList.Contains(c.HospitalGroupId)))
|
||||||
.SelectMany(t => t.InstanceList)
|
.SelectMany(t => t.InstanceList)
|
||||||
.Select(t => new StudyDIRInfo()
|
.Select(t => new StudyDIRInfo()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue