修改用户,项目添加接口增加参数
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
a7db0c2887
commit
29da1ab464
|
|
@ -18220,7 +18220,7 @@
|
|||
<summary>
|
||||
修改检查课题组 1是添加 2是删除
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<param name="incommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.DeletePatientStudyAllData(System.Guid,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SCPSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SCPInstance},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.Application.Helper.IOSSService)">
|
||||
|
|
|
|||
|
|
@ -240,6 +240,8 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public class UserCommand : UserInfo
|
||||
{
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public List<UserAddUserType> UserRoleList { get; set; }
|
||||
|
|
|
|||
|
|
@ -518,6 +518,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
await VerifyUserNameAsync(null, userAddModel.UserName);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var hospitalGroupId = _trialRepository.Where(t => t.Id == userAddModel.TrialId).Select(t => t.HospitalGroupId).FirstOrDefault();
|
||||
|
||||
userAddModel.HospitalGroupIdList = new List<Guid> { hospitalGroupId };
|
||||
}
|
||||
|
||||
await VerifyUserEmailAsync(null, userAddModel.EMail);
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ namespace IRaCIS.Application.Contracts
|
|||
public string AttendedReviewerTypes { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
public Guid HospitalGroupId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -708,7 +708,10 @@ namespace IRaCIS.Application.Services
|
|||
//排除已参与的项目列表
|
||||
var exceptQuery = _subjectPatientRepository.Where(t => t.PatientId == inQuery.PatientId).Select(t => t.Subject.TrialId);
|
||||
|
||||
var trialQuery = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
||||
//患者检查所属的课题组 要和项目进行匹配,否则过滤掉
|
||||
var hospitalGroupIdList = await _studyRepository.Where(t => t.PatientId == inQuery.PatientId).SelectMany(t => t.HospitalGroupList).Select(t => t.HospitalGroupId).Distinct().ToListAsync();
|
||||
|
||||
var trialQuery = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing && hospitalGroupIdList.Contains(t.HospitalGroupId))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Filter), t => t.ResearchProgramNo.Contains(inQuery.Filter) || t.ExperimentName.Contains(inQuery.Filter))
|
||||
.Where(t => t.TrialUserList.Any(c => c.UserId == _userInfo.UserRoleId))
|
||||
.Where(t => !exceptQuery.Any(c => c == t.Id)).ProjectTo<PatientJoinTrialSelectView>(_mapper.ConfigurationProvider);
|
||||
|
|
@ -797,7 +800,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <summary>
|
||||
/// 修改检查课题组 1是添加 2是删除
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <param name="incommand"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> ModifySCPStudyHospitalGroup(SCPStudyHospitalGroupCommand incommand)
|
||||
|
|
@ -1032,7 +1035,10 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<IResponseOutput<PageOutput<PatientQueryView>>> GetPatientInitList(PatientQuery inQuery)
|
||||
{
|
||||
var query = _patientRepository
|
||||
//该患者要匹配该项目的课题组
|
||||
var hospitalGroupId = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.HospitalGroupId).FirstOrDefault();
|
||||
|
||||
var query = _patientRepository.Where(t => t.SCPStudyList.Any(c => c.HospitalGroupList.Any(k => k.HospitalGroupId == hospitalGroupId)))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientIdStr), t => t.PatientIdStr.Contains(inQuery.PatientIdStr))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientName), t => t.PatientName.Contains(inQuery.PatientName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.CallingAE), t => t.SCPStudyList.Any(t => t.CallingAE == inQuery.CallingAE))
|
||||
|
|
@ -2017,7 +2023,11 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<List<PatientStudySelectDto>> GetVisitPatientStudyList(PatientStudyQuery inQuery)
|
||||
{
|
||||
var patientQuery = from scpStudy in _studyRepository
|
||||
var hospitalGroupId = _trialRepository.Where(t => t.Id == inQuery.TrialId).Select(t => t.HospitalGroupId).FirstOrDefault();
|
||||
|
||||
//检查要匹配该项目的课题组
|
||||
|
||||
var patientQuery = from scpStudy in _studyRepository.Where(t => t.HospitalGroupList.Any(c => c.HospitalGroupId == hospitalGroupId))
|
||||
.Where(t => inQuery.PatientIdList.Contains(t.PatientId))
|
||||
.WhereIf(inQuery.EarliestStudyTime != null, t => t.StudyTime >= inQuery.EarliestStudyTime)
|
||||
.WhereIf(inQuery.LatestStudyTime != null, t => t.StudyTime <= inQuery.LatestStudyTime)
|
||||
|
|
|
|||
Loading…
Reference in New Issue