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 failing Details

IRC_NewDev
he 2024-06-06 16:37:29 +08:00
commit a73a79b627
14 changed files with 55 additions and 35 deletions

View File

@ -141,7 +141,7 @@ namespace IRaCIS.Core.Application.ViewModel
public DateTime? EndAuditSignTime { get; set; }
public bool? IsEffect { get; set; }
public bool? IsHaveQuestion { get; set; }
public DateTime? BeginAllocateDate { get; set; }

View File

@ -104,7 +104,7 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState)
.WhereIf(queryVisitTask.IsSelfAnalysis != null, t => t.IsSelfAnalysis == queryVisitTask.IsSelfAnalysis)
.WhereIf(queryVisitTask.ArmEnum != null, t => t.ArmEnum == queryVisitTask.ArmEnum)
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => (t.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) && t.IsAnalysisCreate) || (t.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) && t.IsAnalysisCreate == false))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TrialSiteCode), t => /*(t.BlindTrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) && t.IsAnalysisCreate) ||*/ (t.Subject.TrialSite.TrialSiteCode.Contains(queryVisitTask.TrialSiteCode!) /*&& t.IsAnalysisCreate == false*/))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName))
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => ((t.Subject.Code.Contains(queryVisitTask.SubjectCode)||t.Subject.MedicalNo.Contains(queryVisitTask.SubjectCode)) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate))
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime >= queryVisitTask.BeginAllocateDate)

View File

@ -78,7 +78,8 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.DoctorUserIdeaEnum != null, t => t.DoctorUserIdeaEnum == inQuery.DoctorUserIdeaEnum)
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
.WhereIf(inQuery.IsInvalid != null, t => t.IsInvalid == inQuery.IsInvalid)
.WhereIf(inQuery.IsHaveQuestion != null, t => t.IsHaveQuestion == inQuery.IsHaveQuestion)
.WhereIf(inQuery.BeginAllocateDate != null, t => t.AllocateTime >= inQuery.BeginAllocateDate)
.WhereIf(inQuery.EndAllocateDate != null, t => t.AllocateTime <= inQuery.EndAllocateDate)
.WhereIf(inQuery.BeginAuditSignTime != null, t => t.AuditSignTime >= inQuery.BeginAuditSignTime)
@ -110,7 +111,8 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.ReadingCategory != null, t => t.ReadingCategory == inQuery.ReadingCategory)
.WhereIf(inQuery.ReadingTaskState != null, t => t.ReadingTaskState == inQuery.ReadingTaskState)
.WhereIf(inQuery.IsGeneratedJudge != null, t => t.JudgeVisitTaskId != null)
.WhereIf(inQuery.IsGlobalHaveUpdate != null, t => t.IsGlobalHaveUpdate == inQuery.IsGlobalHaveUpdate)
.WhereIf(inQuery.IsGlobalHaveUpdate != null, t => t.IsGlobalHaveUpdate == inQuery.IsGlobalHaveUpdate)
.WhereIf(inQuery.ArmEnum != null, t => t.ArmEnum == inQuery.ArmEnum)
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
.WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.TaskName.Contains(inQuery.TaskName) || t.TaskBlindName.Contains(inQuery.TaskName))
@ -245,9 +247,15 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
.WhereIf(inQuery.BeginAuditSignTime != null, t => t.AuditSignTime >= inQuery.BeginAuditSignTime)
.WhereIf(inQuery.EndAuditSignTime != null, t => t.AuditSignTime <= inQuery.EndAuditSignTime)
.WhereIf(inQuery.IsInvalid != null, t => t.IsInvalid == inQuery.IsInvalid)
.WhereIf(inQuery.BeginAllocateDate != null, t => t.AllocateTime >= inQuery.BeginAllocateDate)
.WhereIf(inQuery.EndAllocateDate != null, t => t.AllocateTime <= inQuery.EndAllocateDate)
.WhereIf(inQuery.ArmEnum != null, t => t.VisitTask.ArmEnum == inQuery.ArmEnum)
.WhereIf(inQuery.MedicalManagerUserId != null, t => t.MedicalManagerUserId == inQuery.MedicalManagerUserId)
.WhereIf(inQuery.BeginSignTime != null, t => t.VisitTask.SignTime > inQuery.BeginSignTime)
.WhereIf(inQuery.EndSignTime != null, t => t.VisitTask.SignTime < inQuery.EndSignTime)
.WhereIf(inQuery.AuditAdviceEnum != null, t => t.AuditAdviceEnum == inQuery.AuditAdviceEnum)
.WhereIf(inQuery.IsHaveQuestion != null, t => t.IsHaveQuestion == inQuery.IsHaveQuestion)
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);

View File

@ -118,7 +118,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
IsGlobalReading=t.IsGlobalReading,
IsOncologyReading=t.IsOncologyReading,
ImageDownloadEnum=t.ImageDownloadEnum,
ImageUploadEnum=t.ImageUploadEnum
ImageUploadEnum=t.ImageUploadEnum,
IsReadingTaskViewInOrder= t.IsReadingTaskViewInOrder
})
.ToListAsync();

View File

@ -13,6 +13,8 @@ namespace IRaCIS.Application.Contracts
public bool IsTrialLevel { get; set; }
public Guid? TrialId { get; set; }
}
public class CroSelectDTO

View File

@ -19,6 +19,8 @@ namespace IRaCIS.Application.Contracts
public bool IsTrialLevel { get; set; }
public Guid? TrialId { get; set; }
}
public class SponsorQueryDTO : PageInput

View File

@ -67,7 +67,7 @@ namespace IRaCIS.Application.Services
public async Task<IResponseOutput> DeleteSponsor(Guid sponsorId)
{
if (await _trialRepository.AnyAsync(t => t.CROId == sponsorId))
if (await _trialRepository.AnyAsync(t => t.SponsorId == sponsorId))
{
//---该申办方已经加入项目,不允许删除。
return ResponseOutput.NotOk(_localizer["Sponsor_InProject"]);

View File

@ -38,9 +38,11 @@ namespace IRaCIS.Core.Application.Contracts.DTO
public class TrialSiteCommand
{
public Guid TrialId { get; set; }
public Guid SiteId { get; set; }
public Guid? SiteId { get; set; }
public string SiteName { get; set; }
public string TrialSiteName { get; set; } = String.Empty;
public string TrialSiteAliasName { get; set; } = String.Empty;
public bool IsDeleted { get; set; } = true;

View File

@ -56,22 +56,22 @@ namespace IRaCIS.Core.Application
IRepository<TrialQCQuestion> trialQCQuestionRepository,
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCode,
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCode,
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCode,
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCode,
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
IReadingQuestionService iReadingQuestionService,
IEasyCachingProvider provider,
IOrganInfoService iOrganInfoService,
IRepository<TrialCriterionAdditionalAssessmentType> trialCriterionAdditionalAssessmentTypeRepository,
IRepository<VisitTask> visitTaskRepository,
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
IRepository<ReadingTableQuestionAnswer> readingTableQuestionAnswerRepository,
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
IRepository<VisitTask> visitTaskRepository,
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
IRepository<ReadingTableQuestionAnswer> readingTableQuestionAnswerRepository,
IRepository<ReadingTableAnswerRowInfo> readingTableAnswerRowInfoRepository,
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswer
)
@ -317,11 +317,12 @@ namespace IRaCIS.Core.Application
#endregion
var trialModalitys = _readingQuestionCriterionTrialRepository.Where(t => t.Id == inDto.TrialReadingCriterionId).Select(t => t.Trial.Modalitys).FirstOrDefault();
var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == trialCriterion.ReadingQuestionCriterionSystemId).FirstNotNullAsync();
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
{
CriterionModalitys= trialModalitys,
IsOncologyReading = systemCriterion.IsOncologyReading,
IsSystemSetOncology = systemCriterion.IsOncologyReading,
IseCRFShowInDicomReading = systemCriterion.IseCRFShowInDicomReading,

View File

@ -228,11 +228,15 @@ namespace IRaCIS.Application.Services
//维护部位到项目表
var searchList = await _repository.Where<Dictionary>(t => t.Parent.Code == "BodyPart" && t.ParentId != null && t.IsEnable).ProjectTo<BasicDicSelect>(_mapper.ConfigurationProvider).ToListAsync();
var needAddBodyPartList = searchList.Select(t => new TrialBodyPart() { Code = t.Code, Name = t.Value, NameCN = t.ValueCN });
var needAddBodyPartList = searchList.Select(t => new TrialBodyPart() { Code = t.Code, Name = t.Value, NameCN = t.ValueCN }).ToList();
needAddBodyPartList.ForEach(t => t.TrialId = trial.Id);
foreach (var item in needAddBodyPartList)
{
item.TrialId = trial.Id;
}
await _repository.AddRangeAsync(needAddBodyPartList);
await _repository.AddRangeAsync(needAddBodyPartList,true);
_provider.Set(trial.Id.ToString(), StaticData.TrialState.TrialInitializing, TimeSpan.FromDays(7));

View File

@ -38,7 +38,7 @@ namespace IRaCIS.Core.Application.Services
var siteStatQuery = _trialSiteRepository.Where(t => t.TrialId == param.TrialId, ignoreQueryFilters: true)
.WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted)
.WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.Site.SiteName.Contains(param.SiteName))
.WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.TrialSiteName.Contains(param.SiteName))
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode), t => t.TrialSiteCode.Contains(param.TrialSiteCode))
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, t => t.CRCUserList.Any(k => k.UserId == _userInfo.Id))
@ -61,7 +61,7 @@ namespace IRaCIS.Core.Application.Services
var siteStatQuery = _trialSiteRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
.WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted)
.WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.Site.SiteName.Contains(param.SiteName) || t.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
.WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.TrialSiteName.Contains(param.SiteName) || t.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName), t => t.TrialSiteAliasName.Contains(param.TrialSiteAliasName))
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteCode), t => t.TrialSiteCode.Contains(param.TrialSiteCode))
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator, t => t.CRCUserList.Any(k => k.UserId == _userInfo.Id))

View File

@ -42,7 +42,6 @@ namespace IRaCIS.Core.Application.Service
CreateMap<UserTrialCommand, TrialUser>();
CreateMap<TrialSiteCommand, TrialSite>()
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.SiteName))
.ForMember(x => x.Id, x => x.Ignore());
CreateMap<EditTrialSiteCommand, TrialSite>();
@ -132,10 +131,11 @@ namespace IRaCIS.Core.Application.Service
.ForMember(d => d.ContactPhone, u => u.MapFrom(s => s.Site.ContactPhone))
.ForMember(d => d.Address, u => u.MapFrom(s => s.Site.Address))
.ForMember(d => d.Site, u => u.MapFrom(s => s.Site.SiteName))
.ForMember(d => d.VisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count()))
.ForMember(d => d.SubjectCount, u => u.MapFrom(s => s.SubjectList.Count()))
.ForMember(d => d.UserCount, u => u.MapFrom(s => s.CRCUserList.Count()))
.ForMember(d => d.UserNameList, u => u.MapFrom(s => s.CRCUserList.Where(t => t.IsDeleted == false).Select(u => u.User.FullName)));
#endregion

View File

@ -482,7 +482,7 @@ namespace IRaCIS.Core.Application.Services
{
var result = new List<VisitStudyDTO>();
var thisRowinfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new
{
x.ReadingQuestionTrial.ShowOrder,
x.RowIndex,
@ -497,9 +497,9 @@ namespace IRaCIS.Core.Application.Services
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned)
{
var thisStudyIds = thisRowinfo.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.StudyId).Distinct().ToList();
var thisSeriesIdIds = thisRowinfo.Where(x => x.SeriesId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.SeriesId).Distinct().ToList();
if (thisRowinfo.Count > 0)
var thisStudyIds = rowInfoList.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.StudyId).Distinct().ToList();
var thisSeriesIdIds = rowInfoList.Where(x => x.SeriesId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.SeriesId).Distinct().ToList();
if (rowInfoList.Count > 0)
{
var thisVisitTaskStudy = await _repository.Where<DicomStudy>(t => thisStudyIds.Contains(t.Id)).Select(k => new VisitStudyDTO()
{
@ -523,7 +523,7 @@ namespace IRaCIS.Core.Application.Services
{
item.SeriesInstanceUid = string.Empty;
var markInstanceIdList = thisRowinfo.Where(y => y.InstanceId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(y => y.InstanceId!.Value).Distinct().ToList();
var markInstanceIdList = rowInfoList.Where(y => y.InstanceId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(y => y.InstanceId!.Value).Distinct().ToList();
item.InstanceInfoList = await _repository.Where<DicomInstance>(t => markInstanceIdList.Contains(t.Id)).OrderBy(t => t.InstanceNumber).Select(k =>
new InstanceBasicInfo()
@ -539,7 +539,7 @@ namespace IRaCIS.Core.Application.Services
item.InstanceInfoList.ForEach(x =>
{
var item = thisRowinfo.FirstOrDefault(y => y.InstanceId == x.Id);
var item = rowInfoList.FirstOrDefault(y => y.InstanceId == x.Id);
if (item != null)
{
x.ShowOrder = item.ShowOrder;
@ -600,9 +600,8 @@ namespace IRaCIS.Core.Application.Services
List<DicomSeriesDTO> seriesLists = await _repository.Where<DicomSeries>(s => studyIds.Contains(s.StudyId) /*&& s.IsReading*/)
.WhereIf(isManualGenerate == false, t => t.IsReading)
.WhereIf(isManualGenerate, t => t.SubjectCriteriaEvaluationVisitStudyFilterList.Any(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsConfirmed && t.IsReading))
.OrderBy(s => s.SeriesNumber).
ThenBy(s => s.SeriesTime)
.ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).ToListAsync();
.OrderBy(s => s.SeriesNumber). ThenBy(s => s.SeriesTime).ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).ToListAsync();
foreach (var t in studyList)
{
t.SeriesList = seriesLists.Where(s => s.StudyId == t.StudyId).OrderBy(s => s.SeriesNumber).
@ -692,7 +691,7 @@ namespace IRaCIS.Core.Application.Services
{
x.SeriesList.ForEach(y =>
{
y.IsBeMark = thisRowinfo.Any(z => z.SeriesId == y.Id);
y.IsBeMark = rowInfoList.Any(z => z.SeriesId == y.Id);
});
});

View File

@ -351,6 +351,7 @@ namespace IRaCIS.Application.Contracts
public class TrialReadingCriterionDto
{
public ReadingOrder IsReadingTaskViewInOrder { get; set; }
public Guid TrialReadingCriterionId { get; set; }
public string TrialReadingCriterionName { get; set; }