Merge branch 'Test_IRC_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
eb0f13c075
|
@ -669,21 +669,22 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var isFrontTaskNeedSignButNotSign = await _visitTaskRepository.AnyAsync(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.VisitTaskNum < subjectVisit.VisitNum && t.IsNeedClinicalDataSign == true && t.IsClinicalDataSign == false);
|
||||
|
||||
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||
{
|
||||
if (visitNumList.IndexOf(subjectVisit.VisitNum) == 0)
|
||||
{
|
||||
blindTaskName = visitBlindConfig.BlindBaseLineName;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||
{
|
||||
blindTaskName = visitBlindConfig.BlindFollowUpPrefix + " " + visitNumList.IndexOf(subjectVisit.VisitNum);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
blindTaskName = visitBlindConfig.BlindFollowUpPrefix;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//每个访视 根据项目配置生成任务 双审生成两个
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace IRaCIS.Application.Contracts
|
|||
{
|
||||
public class SiteDTO: SiteCommand
|
||||
{
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
|
||||
public class SiteCommand
|
||||
|
@ -29,6 +29,8 @@ namespace IRaCIS.Application.Contracts
|
|||
public string DirectorPhone { get; set; } = string.Empty;
|
||||
public string ContactName { get; set; } = string.Empty;
|
||||
public string ContactPhone { get; set; } = string.Empty;
|
||||
|
||||
public Guid? TrialSiteId { get; set; }
|
||||
}
|
||||
|
||||
public class SiteSelectionDTO
|
||||
|
@ -44,6 +46,24 @@ namespace IRaCIS.Application.Contracts
|
|||
public string Country { get; set; } = String.Empty;
|
||||
}
|
||||
|
||||
|
||||
public class TrialSiteInQuery:PageInput
|
||||
{
|
||||
public string? TrialSiteName { get; set; }
|
||||
|
||||
public string? TrialCode { get; set; }
|
||||
}
|
||||
|
||||
public class TrialSiteAddView
|
||||
{
|
||||
public Guid TrialSiteId { get; set; }
|
||||
public string TrialCode { get; set; }
|
||||
|
||||
public string TrialSiteName { get; set; }
|
||||
|
||||
public string TrialSiteAliasName { get; set; } = String.Empty;
|
||||
}
|
||||
|
||||
public class SiteSelectDTO : SiteDTO
|
||||
{
|
||||
public string HospitalName { get; set; } = String.Empty;
|
||||
|
|
|
@ -5,6 +5,8 @@ using Microsoft.AspNetCore.Mvc;
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using Medallion.Threading;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using System.Security.Policy;
|
||||
using Site = IRaCIS.Core.Domain.Models.Site;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -48,6 +50,22 @@ namespace IRaCIS.Application.Services
|
|||
return await _siteRepository.ProjectTo<SiteSelectionDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialSiteAddView>> GetTrialSiteList(TrialSiteInQuery inQuery)
|
||||
{
|
||||
var query = _repository.Where<TrialSite>(t => t.SiteId == null)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialSiteName), t => t.TrialSiteName.Contains(inQuery.TrialSiteName) || t.TrialSiteAliasName.Contains(inQuery.TrialSiteName))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.TrialCode), t => t.Trial.TrialCode.Contains(inQuery.TrialCode))
|
||||
.Select(t => new TrialSiteAddView()
|
||||
{
|
||||
TrialCode = t.Trial.TrialCode,
|
||||
TrialSiteAliasName = t.TrialSiteAliasName,
|
||||
TrialSiteId = t.Id,
|
||||
TrialSiteName = t.TrialSiteName
|
||||
});
|
||||
|
||||
return await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TrialSiteAddView.TrialCode) : inQuery.SortField, inQuery.Asc);
|
||||
}
|
||||
|
||||
/// <summary> 添加研究中心 </summary>
|
||||
|
||||
|
@ -56,7 +74,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var exp = new EntityVerifyExp<Site>()
|
||||
{
|
||||
VerifyExp = h => h.SiteName.Equals(siteCommand.SiteName) || h.SiteCode.Equals(siteCommand.SiteCode),
|
||||
VerifyExp = h => h.SiteName.Equals(siteCommand.SiteName) || h.SiteNameCN.Equals(siteCommand.SiteNameCN),
|
||||
//---已经存在同名的中心,请确认。
|
||||
VerifyMsg = _localizer["Site_DupName"]
|
||||
};
|
||||
|
@ -87,10 +105,17 @@ namespace IRaCIS.Application.Services
|
|||
await _hospitalRepository.BatchUpdateNoTrackingAsync(t => t.Id == siteCommand.HospitalId, u => new Hospital() { SiteId = site.Id });
|
||||
}
|
||||
|
||||
if (siteCommand.TrialSiteId != null)
|
||||
{
|
||||
await _repository.BatchUpdateAsync<TrialSite>(t => t.Id == siteCommand.TrialSiteId, u => new TrialSite() { SiteId = site.Id });
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok(site.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary> 删除研究中心 </summary>
|
||||
|
|
|
@ -19,7 +19,6 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
|
||||
public string UserKeyInfo { get; set; } = String.Empty;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class SiteCRCExportQueryDTO
|
||||
|
|
|
@ -555,8 +555,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
item.Description = "Key Series";
|
||||
|
||||
var modalityList = await _repository.Where<DicomSeries>(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber).
|
||||
ThenBy(s => s.SeriesTime).Select(x => x.Modality).Distinct().ToListAsync(); ;
|
||||
var modalityList = await _repository.Where<DicomSeries>(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).Select(x => x.Modality).Distinct().ToListAsync(); ;
|
||||
item.Modality = string.Join(",", modalityList);
|
||||
thisVisitTaskStudy.SeriesList.Add(item);
|
||||
thisVisitTaskStudy.SeriesCount = thisVisitTaskStudy.SeriesList.Count;
|
||||
|
@ -604,8 +603,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
foreach (var t in studyList)
|
||||
{
|
||||
t.SeriesList = seriesLists.Where(s => s.StudyId == t.StudyId).OrderBy(s => s.SeriesNumber).
|
||||
ThenBy(s => s.SeriesTime).ToList();
|
||||
t.SeriesList = seriesLists.Where(s => s.StudyId == t.StudyId).OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).ToList();
|
||||
|
||||
t.SeriesList.ForEach(series =>
|
||||
{
|
||||
|
|
|
@ -1634,7 +1634,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
var type = GetEntityAuditOpt(item);
|
||||
|
||||
var entity = item.Entity as TrialSite;
|
||||
if (entity.Site == null)
|
||||
if (entity.Site == null && entity.SiteId!=null)
|
||||
{
|
||||
entity.Site = await _dbContext.Site.Where(x => x.Id == entity.SiteId).FirstOrDefaultAsync();
|
||||
}
|
||||
|
@ -1650,9 +1650,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
SiteCode = entity.TrialSiteCode,
|
||||
|
||||
//Site 没记录稽查 必须查询存
|
||||
SiteName = entity.Site.SiteName,
|
||||
City = entity.Site.City,
|
||||
Country = entity.Site.Country,
|
||||
SiteName = entity.TrialSiteName
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue