修改部位使用
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c7a310c1ad
commit
1f67d24abc
|
@ -1184,6 +1184,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
|
|
||||||
public class TrialBodyPartView
|
public class TrialBodyPartView
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public bool IsStudyUse { get; set; }
|
||||||
|
|
||||||
public string Code { get; set; }
|
public string Code { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -503,7 +503,8 @@ namespace IRaCIS.Core.Application
|
||||||
&& x.ReadingCriterionPageId == null)
|
&& x.ReadingCriterionPageId == null)
|
||||||
.ProjectTo<TrialReadQuestion>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
.ProjectTo<TrialReadQuestion>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
return (result, new {
|
return (result, new
|
||||||
|
{
|
||||||
ReadingVersionEnum = trialCriterion.ReadingVersionEnum
|
ReadingVersionEnum = trialCriterion.ReadingVersionEnum
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1334,7 +1335,35 @@ namespace IRaCIS.Core.Application
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<IResponseOutput<List<TrialBodyPartView>>> GetTrialBodyPartList(Guid trialId)
|
public async Task<IResponseOutput<List<TrialBodyPartView>>> GetTrialBodyPartList(Guid trialId)
|
||||||
{
|
{
|
||||||
var list = await _trialRepository.Where(t => t.Id == trialId).SelectMany(t => t.TrialBodyPartList).Select(t => new TrialBodyPartView() { Code = t.Code, Name = _userInfo.IsEn_Us ? t.Name : t.NameCN, Id = t.Id, IsHandAdd = t.IsHandAdd }).OrderBy(t=>t.Name).ToListAsync();
|
var list = await _trialRepository.Where(t => t.Id == trialId)
|
||||||
|
.SelectMany(t => t.TrialBodyPartList)
|
||||||
|
.Select(t => new TrialBodyPartView() { Code = t.Code, Name = _userInfo.IsEn_Us ? t.Name : t.NameCN, Id = t.Id, IsHandAdd = t.IsHandAdd })
|
||||||
|
.OrderBy(t => t.Name).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
var useBodyPart = _trialRepository.Where(t => t.Id == trialId).Select(t => new
|
||||||
|
{
|
||||||
|
DicomBodyPartList = t.StudyList.Where(t => t.BodyPartForEdit != "")
|
||||||
|
.Select(c => c.BodyPartForEdit)
|
||||||
|
.Distinct(),
|
||||||
|
NoneDicomBodyPartList = t.NoneDicomStudyList.Where(t => t.BodyPart != "")
|
||||||
|
.Select(c => c.BodyPart)
|
||||||
|
.Distinct(),
|
||||||
|
|
||||||
|
}).FirstOrDefault();
|
||||||
|
|
||||||
|
foreach (var item in list)
|
||||||
|
{
|
||||||
|
var useBodyPartList = new List<string>();
|
||||||
|
if (useBodyPart != null)
|
||||||
|
{
|
||||||
|
useBodyPartList = useBodyPart.DicomBodyPartList.Union(useBodyPart.NoneDicomBodyPartList).Distinct().ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
item.IsStudyUse = useBodyPartList.Any(t => t == item.Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(list);
|
return ResponseOutput.Ok(list);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,9 @@ public partial class Trial : BaseFullDeleteAuditEntity
|
||||||
public List<Subject> SubjectList { get; set; } = new List<Subject>();
|
public List<Subject> SubjectList { get; set; } = new List<Subject>();
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<SubjectVisit> SubjectVisitList { get; set; } = new List<SubjectVisit>();
|
public List<SubjectVisit> SubjectVisitList { get; set; } = new List<SubjectVisit>();
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public List<NoneDicomStudy> NoneDicomStudyList { get; set; }
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<DicomStudy> StudyList { get; set; } = new List<DicomStudy>();
|
public List<DicomStudy> StudyList { get; set; } = new List<DicomStudy>();
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
|
Loading…
Reference in New Issue