Uat_Study
parent
735f9a9534
commit
dee350742f
|
@ -423,6 +423,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public async Task<List<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
|
public async Task<List<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
|
||||||
{
|
{
|
||||||
List<GetCRCConfirmListOutDto> result = await _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
List<GetCRCConfirmListOutDto> result = await _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||||
|
.WhereIf(inDto.ReadModuleId!=null,x=>x.Id==inDto.ReadModuleId)
|
||||||
.Select(x => new GetCRCConfirmListOutDto()
|
.Select(x => new GetCRCConfirmListOutDto()
|
||||||
{
|
{
|
||||||
SubjectId= x.SubjectId,
|
SubjectId= x.SubjectId,
|
||||||
|
@ -430,46 +431,93 @@ namespace IRaCIS.Core.Application.Service
|
||||||
LatestScanDate = x.SubjectVisit.LatestScanDate,
|
LatestScanDate = x.SubjectVisit.LatestScanDate,
|
||||||
ReadingSetType = x.ReadingSetType,
|
ReadingSetType = x.ReadingSetType,
|
||||||
IsPMConfirm = x.IsPMConfirm,
|
IsPMConfirm = x.IsPMConfirm,
|
||||||
|
SubjectCode=x.Subject.Code,
|
||||||
ReadModuleId = x.Id,
|
ReadModuleId = x.Id,
|
||||||
}).OrderBy(x => x.LatestScanDate).ToListAsync();
|
}).OrderBy(x => x.LatestScanDate).ToListAsync();
|
||||||
var formList = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId)
|
var formList = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||||
.Where(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
.Where(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||||
.Where(x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.ImageRead || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
.Where(x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.ImageRead || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
||||||
.Select(x => new CRCClinicalForm
|
.Include(x=>x.ClinicalDataTrialSet)
|
||||||
|
.Select(x => new CRCClinicalForm
|
||||||
{
|
{
|
||||||
CkeckDate = x.CheckDate,
|
CheckDate = x.CheckDate,
|
||||||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||||
ClinicalFormId = x.Id,
|
ClinicalFormId = x.Id,
|
||||||
|
ClinicalDataSetName=x.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||||
|
ClinicalDataSetEnName=x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
var confirmList = await _readModuleCriterionFromRepository.Where(x => x.TrialId == inDto.TrialId).ToListAsync();
|
var confirmList = await _readModuleCriterionFromRepository.Where(x => x.TrialId == inDto.TrialId).Include(x=>x.ClinicalForm).Include(x=>x.ClinicalForm.ClinicalDataTrialSet).ToListAsync();
|
||||||
result.ForEach(x =>
|
result.ForEach(x =>
|
||||||
{
|
{
|
||||||
if (x.IsCRCConfirm)
|
if (x.IsCRCConfirm)
|
||||||
{
|
{
|
||||||
x.ClinicalFormIdList = confirmList.Where(y => y.ReadModuleId == x.ReadModuleId).Select(y=>y.ClinicalFormId).ToList();
|
x.ClinicalFormIdList = confirmList.Where(y => y.ReadModuleId == x.ReadModuleId).Select(y=>new GetCRCBeConfirmListOutDto() {
|
||||||
|
CheckDate = y.ClinicalForm.CheckDate??default(DateTime),
|
||||||
|
ClinicalDataSetName= y.ClinicalForm.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||||
|
ClinicalDataSetEnName= y.ClinicalForm.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||||
|
ClinicalFormId=y.ClinicalFormId,
|
||||||
|
}).ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (x.ReadingSetType == ReadingSetType.ImageReading)
|
if (x.ReadingSetType == ReadingSetType.ImageReading)
|
||||||
{
|
{
|
||||||
x.ClinicalFormIdList = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.ImageRead&&y.CkeckDate<=x.LatestScanDate).Select(y => y.ClinicalFormId).ToList();
|
x.ClinicalFormIdList = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.ImageRead&&y.CheckDate <= x.LatestScanDate)
|
||||||
|
.Select(y => new GetCRCBeConfirmListOutDto()
|
||||||
|
{
|
||||||
|
CheckDate = y.CheckDate ?? default(DateTime),
|
||||||
|
ClinicalDataSetName = y.ClinicalDataSetName,
|
||||||
|
ClinicalDataSetEnName = y.ClinicalDataSetEnName,
|
||||||
|
ClinicalFormId = y.ClinicalFormId,
|
||||||
|
}).ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x.ClinicalFormIdList = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.OncologyRead&&y.CkeckDate <= x.LatestScanDate).Select(y => y.ClinicalFormId).ToList();
|
x.ClinicalFormIdList = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.OncologyRead&&y.CheckDate <= x.LatestScanDate)
|
||||||
|
.Select(y => new GetCRCBeConfirmListOutDto()
|
||||||
|
{
|
||||||
|
CheckDate = y.CheckDate ?? default(DateTime),
|
||||||
|
ClinicalDataSetName = y.ClinicalDataSetName,
|
||||||
|
ClinicalDataSetEnName = y.ClinicalDataSetEnName,
|
||||||
|
ClinicalFormId = y.ClinicalFormId,
|
||||||
|
}).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CRC 确认临床数据
|
/// 获取CRC待确认列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
public async Task<List<GetCRCBeConfirmListOutDto>> GetCRCBeConfirmList(GetCRCBeConfirmListInDto inDto)
|
||||||
|
{
|
||||||
|
var result = (await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
|
{
|
||||||
|
ReadModuleId = inDto.ReadModuleId,
|
||||||
|
TrialId = inDto.TrialId
|
||||||
|
})).SelectMany(x => x.ClinicalFormIdList).ToList();
|
||||||
|
|
||||||
|
result.ForEach(x => {
|
||||||
|
|
||||||
|
x.ClinicalDataSetName = _userInfo.IsEn_Us ? x.ClinicalDataSetEnName : x.ClinicalDataSetName;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
return result.OrderBy(x => x.ClinicalDataSetName).ThenBy(x => x.CheckDate).ToList();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC 确认临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> CRCConfirmClinical(CRCConfirmClinicalInDto inDto)
|
public async Task<IResponseOutput> CRCConfirmClinical(CRCConfirmClinicalInDto inDto)
|
||||||
{
|
{
|
||||||
var dataList =await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
var dataList =await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
|
|
|
@ -102,6 +102,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public class GetCRCConfirmListInDto
|
public class GetCRCConfirmListInDto
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid? ReadModuleId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CRCCancelConfirmClinicalInDto
|
public class CRCCancelConfirmClinicalInDto
|
||||||
|
@ -111,6 +113,25 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public Guid ReadModuleId { get; set; }
|
public Guid ReadModuleId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GetCRCBeConfirmListInDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetCRCBeConfirmListOutDto
|
||||||
|
{
|
||||||
|
public Guid ClinicalFormId { get; set; }
|
||||||
|
|
||||||
|
public string ClinicalDataSetName { get; set; }
|
||||||
|
|
||||||
|
public string ClinicalDataSetEnName { get; set; }
|
||||||
|
|
||||||
|
public DateTime CheckDate { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class CRCConfirmClinicalInDto
|
public class CRCConfirmClinicalInDto
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
@ -121,7 +142,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public class CRCClinicalForm
|
public class CRCClinicalForm
|
||||||
{
|
{
|
||||||
public DateTime? CkeckDate { get; set; }
|
public DateTime? CheckDate { get; set; }
|
||||||
|
|
||||||
public Guid ClinicalFormId { get; set; }
|
public Guid ClinicalFormId { get; set; }
|
||||||
|
|
||||||
|
@ -129,6 +150,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// 临床级别
|
/// 临床级别
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||||
|
|
||||||
|
public string ClinicalDataSetName { get; set; }
|
||||||
|
|
||||||
|
public string ClinicalDataSetEnName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -147,13 +172,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public bool IsCRCConfirm { get; set; } = false;
|
public bool IsCRCConfirm { get; set; } = false;
|
||||||
|
|
||||||
|
public string SubjectCode { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最晚拍片日期
|
/// 最晚拍片日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? LatestScanDate { get; set; }
|
public DateTime? LatestScanDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public List<Guid> ClinicalFormIdList { get; set; }
|
public List<GetCRCBeConfirmListOutDto> ClinicalFormIdList { get; set; }
|
||||||
|
|
||||||
public int FormCount
|
public int FormCount
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,8 +45,13 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
}
|
[JsonIgnore]
|
||||||
|
[ForeignKey("ClinicalFormId")]
|
||||||
|
public ClinicalForm ClinicalForm { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue