增加患者信息查询,和Modality查询

IRC_NewDev
hang 2024-07-17 14:20:36 +08:00
parent 8fedcdaf00
commit c65a484b13
2 changed files with 41 additions and 21 deletions

View File

@ -1031,6 +1031,8 @@ namespace IRaCIS.Application.Contracts
public DateTime? LatestStudyTime { get; set; }
public string? Modalities { get; set; }
public string? PatientInfo { get; set; }
}
public class VisitPatientStudyFilterView
{
@ -1048,6 +1050,11 @@ namespace IRaCIS.Application.Contracts
public string CalledAE { get; set; } = string.Empty;
public string CallingAE { get; set; } = string.Empty;
public string PatientIdStr { get; set; } = string.Empty;
public string PatientName { get; set; } = string.Empty;
public string PatientAge { get; set; } = string.Empty;
public string PatientSex { get; set; } = string.Empty;
}
public class PatientStudySimpleView: VisitPatientStudyFilterView

View File

@ -224,6 +224,13 @@ namespace IRaCIS.Application.Services
return list;
}
public async Task<List<string>> GetDicomModalityList(Guid trialId)
{
var list = await _scpStudyRepository.Where(t => t.TrialId == trialId).SelectMany(t => t.SeriesList).Select(t=>t.Modality).Distinct().ToListAsync();
return list;
}
/// <summary>
/// 影像访视上传 检查列表
/// </summary>
@ -243,6 +250,7 @@ namespace IRaCIS.Application.Services
.WhereIf(inQuery.EarliestStudyTime != null, t => t.StudyTime >= inQuery.EarliestStudyTime)
.WhereIf(inQuery.LatestStudyTime != null, t => t.StudyTime <= inQuery.LatestStudyTime)
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Modalities), t => t.Modalities.Contains(inQuery.Modalities))
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientInfo), t => t.PatientIdStr.Contains(inQuery.PatientInfo) || t.PatientName.Contains(inQuery.PatientInfo) || t.PatientSex.Contains(inQuery.PatientInfo))
select new VisitPatientStudyFilterView()
{
Description = scpStudy.Description,
@ -254,6 +262,11 @@ namespace IRaCIS.Application.Services
SCPStudyId = scpStudy.Id,
SeriesCount = scpStudy.SeriesCount,
StudyTime = scpStudy.StudyTime,
PatientAge = scpStudy.PatientAge,
PatientIdStr = scpStudy.PatientIdStr,
PatientName = scpStudy.PatientName,
PatientSex = scpStudy.PatientSex,
};