Merge branch 'Test_HIR_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_HIR_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
4f7e73c990
|
|
@ -1,5 +1,4 @@
|
||||||
using DocumentFormat.OpenXml.Bibliography;
|
using IP2Region.Net.Abstractions;
|
||||||
using IP2Region.Net.Abstractions;
|
|
||||||
using IRaCIS.Application.Contracts;
|
using IRaCIS.Application.Contracts;
|
||||||
using IRaCIS.Core.Application.Auth;
|
using IRaCIS.Core.Application.Auth;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
|
@ -924,6 +923,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
newIdentityUser.UserRoleList = addRoleList;
|
newIdentityUser.UserRoleList = addRoleList;
|
||||||
|
|
||||||
|
await _identityUserRepository.AddAsync(newIdentityUser);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -952,7 +953,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
await _userRoleRepository.SaveChangesAsync();
|
await _identityUserRepository.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1072,6 +1072,8 @@ namespace IRaCIS.Application.Contracts
|
||||||
|
|
||||||
public string AccessionNumber { get; set; }
|
public string AccessionNumber { get; set; }
|
||||||
|
|
||||||
|
public string StudyIdStr { get; set; } = string.Empty;
|
||||||
|
|
||||||
public DateTime? StudyTime { get; set; }
|
public DateTime? StudyTime { get; set; }
|
||||||
public string Modalities { get; set; } = string.Empty;
|
public string Modalities { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
@ -1097,6 +1099,13 @@ namespace IRaCIS.Application.Contracts
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class PatientStudyDto
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public class PatientSeriesDTO
|
public class PatientSeriesDTO
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -840,6 +840,7 @@ namespace IRaCIS.Application.Services
|
||||||
SCPStudyId = scpStudy.Id,
|
SCPStudyId = scpStudy.Id,
|
||||||
SeriesCount = scpStudy.SeriesCount,
|
SeriesCount = scpStudy.SeriesCount,
|
||||||
StudyTime = scpStudy.StudyTime,
|
StudyTime = scpStudy.StudyTime,
|
||||||
|
StudyIdStr=scpStudy.StudyId
|
||||||
|
|
||||||
HospitalGroupList = scpStudy.HospitalGroupList.Select(t => new SCPStudyHospitalGroupInfo()
|
HospitalGroupList = scpStudy.HospitalGroupList.Select(t => new SCPStudyHospitalGroupInfo()
|
||||||
{
|
{
|
||||||
|
|
@ -875,6 +876,8 @@ namespace IRaCIS.Application.Services
|
||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 修改检查课题组 1是添加 2是删除,3是更新
|
/// 修改检查课题组 1是添加 2是删除,3是更新
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -952,6 +955,13 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 患者 检查预览
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="scpStudyId"></param>
|
||||||
|
/// <param name="_seriesRepository"></param>
|
||||||
|
/// <param name="_instanceRepository"></param>
|
||||||
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput<List<PatientSeriesDTO>>> GetPatientSeriesList(Guid scpStudyId,
|
public async Task<IResponseOutput<List<PatientSeriesDTO>>> GetPatientSeriesList(Guid scpStudyId,
|
||||||
[FromServices] IRepository<SCPSeries> _seriesRepository,
|
[FromServices] IRepository<SCPSeries> _seriesRepository,
|
||||||
[FromServices] IRepository<SCPInstance> _instanceRepository
|
[FromServices] IRepository<SCPInstance> _instanceRepository
|
||||||
|
|
@ -986,6 +996,9 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.Ok(seriesList, study);
|
return ResponseOutput.Ok(seriesList, study);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
[HttpDelete]
|
[HttpDelete]
|
||||||
public async Task<IResponseOutput> DeletePatientStudy(Guid patiendId, Guid scpStudyId,
|
public async Task<IResponseOutput> DeletePatientStudy(Guid patiendId, Guid scpStudyId,
|
||||||
|
|
|
||||||
|
|
@ -288,32 +288,47 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[FromServices] IRepository<SCPStudy> _SCPStudyRepository, Guid hospitalGroupId)
|
[FromServices] IRepository<SCPStudy> _SCPStudyRepository, Guid hospitalGroupId)
|
||||||
{
|
{
|
||||||
|
|
||||||
var scpStudyIdList = _SCPStudyRepository.Where().Select(t => t.Id).ToList();
|
if ((await _SCPStudyHospitalGroupRepository.FirstOrDefaultAsync()) == null)
|
||||||
|
|
||||||
foreach (var item in scpStudyIdList)
|
|
||||||
{
|
{
|
||||||
await _SCPStudyHospitalGroupRepository.AddAsync(new SCPStudyHospitalGroup() { SCPStudyId = item, HospitalGroupId = hospitalGroupId });
|
var scpStudyIdList = _SCPStudyRepository.Where().Select(t => t.Id).ToList();
|
||||||
}
|
|
||||||
|
|
||||||
await _SCPStudyRepository.SaveChangesAsync();
|
foreach (var item in scpStudyIdList)
|
||||||
|
{
|
||||||
|
await _SCPStudyHospitalGroupRepository.AddAsync(new SCPStudyHospitalGroup() { SCPStudyId = item, HospitalGroupId = hospitalGroupId });
|
||||||
|
}
|
||||||
|
|
||||||
|
await _SCPStudyRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 给所有的账户加上默认课题组
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="_hospitalGroupIdentityUserRepository"></param>
|
||||||
|
/// <param name="_identityUserRepository"></param>
|
||||||
|
/// <param name="hospitalGroupId"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
public async Task<IResponseOutput> NewUserHospitalGroup(
|
public async Task<IResponseOutput> NewUserHospitalGroup(
|
||||||
[FromServices] IRepository<SCPStudyHospitalGroup> _SCPStudyHospitalGroupRepository,
|
[FromServices] IRepository<HospitalGroupIdentityUser> _hospitalGroupIdentityUserRepository,
|
||||||
[FromServices] IRepository<SCPStudy> _SCPStudyRepository, Guid hospitalGroupId)
|
[FromServices] IRepository<IdentityUser> _identityUserRepository, Guid hospitalGroupId)
|
||||||
{
|
{
|
||||||
|
|
||||||
var scpStudyIdList = _SCPStudyRepository.Where().Select(t => t.Id).ToList();
|
if ((await _hospitalGroupIdentityUserRepository.FirstOrDefaultAsync()) == null)
|
||||||
|
|
||||||
foreach (var item in scpStudyIdList)
|
|
||||||
{
|
{
|
||||||
await _SCPStudyHospitalGroupRepository.AddAsync(new SCPStudyHospitalGroup() { SCPStudyId = item, HospitalGroupId = hospitalGroupId });
|
var identityUserIdList = _identityUserRepository.Where().Select(t => t.Id).ToList();
|
||||||
|
|
||||||
|
foreach (var item in identityUserIdList)
|
||||||
|
{
|
||||||
|
await _hospitalGroupIdentityUserRepository.AddAsync(new HospitalGroupIdentityUser() { IdentityUserId = item, HospitalGroupId = hospitalGroupId });
|
||||||
|
}
|
||||||
|
|
||||||
|
await _hospitalGroupIdentityUserRepository.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
await _SCPStudyRepository.SaveChangesAsync();
|
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue