IRC_NewDev
parent
4a6dfc9a2a
commit
cadaf368ef
|
@ -487,7 +487,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
x.ClinicalFormList = confirmList.Where(y => y.ReadModuleId == x.ReadModuleId).Select(y=>new GetCRCBeConfirmListOutDto() {
|
x.ClinicalFormList = confirmList.Where(y => y.ReadModuleId == x.ReadModuleId).Select(y=>new GetCRCBeConfirmListOutDto() {
|
||||||
CheckDate = y.CheckDate,
|
CheckDate = y.CheckDate,
|
||||||
ClinicalDataSetName= y.ClinicalDataSetName,
|
ClinicalDataSetName= y.ClinicalDataSetName.LanguageName(y.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||||
ClinicalDataSetEnName= y.ClinicalDataSetEnName,
|
ClinicalDataSetEnName= y.ClinicalDataSetEnName,
|
||||||
ClinicalFormId=y.ClinicalFormId,
|
ClinicalFormId=y.ClinicalFormId,
|
||||||
ClinicalDataTrialSetId=y.ClinicalDataTrialSetId,
|
ClinicalDataTrialSetId=y.ClinicalDataTrialSetId,
|
||||||
|
@ -502,7 +502,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.Select(y => new GetCRCBeConfirmListOutDto()
|
.Select(y => new GetCRCBeConfirmListOutDto()
|
||||||
{
|
{
|
||||||
CheckDate = y.CheckDate ?? default(DateTime),
|
CheckDate = y.CheckDate ?? default(DateTime),
|
||||||
ClinicalDataSetName = y.ClinicalDataSetName,
|
ClinicalDataSetName = y.ClinicalDataSetName.LanguageName(y.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||||
ClinicalDataSetEnName = y.ClinicalDataSetEnName,
|
ClinicalDataSetEnName = y.ClinicalDataSetEnName,
|
||||||
ClinicalFormId = y.ClinicalFormId,
|
ClinicalFormId = y.ClinicalFormId,
|
||||||
ClinicalDataTrialSetId = y.ClinicalDataTrialSetId,
|
ClinicalDataTrialSetId = y.ClinicalDataTrialSetId,
|
||||||
|
@ -515,7 +515,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.Select(y => new GetCRCBeConfirmListOutDto()
|
.Select(y => new GetCRCBeConfirmListOutDto()
|
||||||
{
|
{
|
||||||
CheckDate = y.CheckDate ?? default(DateTime),
|
CheckDate = y.CheckDate ?? default(DateTime),
|
||||||
ClinicalDataSetName = y.ClinicalDataSetName,
|
ClinicalDataSetName = y.ClinicalDataSetName.LanguageName(y.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||||
ClinicalDataSetEnName = y.ClinicalDataSetEnName,
|
ClinicalDataSetEnName = y.ClinicalDataSetEnName,
|
||||||
ClinicalFormId = y.ClinicalFormId,
|
ClinicalFormId = y.ClinicalFormId,
|
||||||
ClinicalDataTrialSetId = y.ClinicalDataTrialSetId,
|
ClinicalDataTrialSetId = y.ClinicalDataTrialSetId,
|
||||||
|
@ -543,18 +543,107 @@ namespace IRaCIS.Core.Application.Service
|
||||||
PageSize=9999,
|
PageSize=9999,
|
||||||
|
|
||||||
})).CurrentPageData.SelectMany(x => x.ClinicalFormList).ToList();
|
})).CurrentPageData.SelectMany(x => x.ClinicalFormList).ToList();
|
||||||
|
|
||||||
result.ForEach(x => {
|
|
||||||
|
|
||||||
x.ClinicalDataSetName = _userInfo.IsEn_Us ? x.ClinicalDataSetEnName : x.ClinicalDataSetName;
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
return result.OrderBy(x => x.ClinicalDataSetName).ThenBy(x => x.CheckDate).ToList();
|
return result.OrderBy(x => x.ClinicalDataSetName).ThenBy(x => x.CheckDate).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取临床数据表格信息 查看没有表格问题的列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetClinicalTableListOutDto>> GetClinicalTableList(GetClinicalTableListInDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
var readModule=await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync():
|
||||||
|
|
||||||
|
var confirmList = (await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
|
{
|
||||||
|
ReadModuleId = inDto.ReadModuleId,
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
PageIndex = 1,
|
||||||
|
PageSize = 9999,
|
||||||
|
|
||||||
|
})).CurrentPageData.SelectMany(x => x.ClinicalFormList).ToList();
|
||||||
|
|
||||||
|
var clinicalDataTrialSetIds = confirmList.Select(x => x.ClinicalDataTrialSetId).Distinct().ToList();
|
||||||
|
var questionList = await _trialClinicalQuestionRepository.Where(x => clinicalDataTrialSetIds.Contains( x.TrialClinicalId)
|
||||||
|
&& x.ClinicalQuestionType != ReadingQestionType.Group
|
||||||
|
&& x.ClinicalQuestionType != ReadingQestionType.Table).OrderBy(x=>x.TrialClinicalId).ThenBy(x => x.ShowOrder)
|
||||||
|
.ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
var answers = await _clinicalQuestionAnswerRepository.Where(x => x.SubjectId == readModule.SubjectId && clinicalDataTrialSetIds.Contains( x.ClinicalDataTrialSetId))
|
||||||
|
.Select(x => new
|
||||||
|
{
|
||||||
|
x.ClinicalDataTrialSetId,
|
||||||
|
x.ClinicalFormId,
|
||||||
|
x.ClinicalForm.CheckDate,
|
||||||
|
x.QuestionId,
|
||||||
|
x.Answer
|
||||||
|
})
|
||||||
|
.ToListAsync();
|
||||||
|
List<GetClinicalTableListOutDto> result = new List<GetClinicalTableListOutDto>();
|
||||||
|
clinicalDataTrialSetIds.ForEach(x => {
|
||||||
|
GetClinicalTableListOutDto dto = new GetClinicalTableListOutDto();
|
||||||
|
dto.ClinicalDataSetName = confirmList.Where(y => y.ClinicalDataTrialSetId == x).Select(y => y.ClinicalDataSetName).First();
|
||||||
|
dto.QuestionList = questionList.Where(y => y.TrialClinicalId == x).OrderBy(y => y.ShowOrder).ToList();
|
||||||
|
dto.AnswerList = new List<Dictionary<string, string>>();
|
||||||
|
var ClinicalFormIds= answers.Where(y => y.ClinicalDataTrialSetId == x).OrderBy(x => x.CheckDate).Select(x => x.ClinicalFormId).Distinct().ToList();
|
||||||
|
ClinicalFormIds.ForEach(z =>
|
||||||
|
{
|
||||||
|
var dic = answers.Where(y => y.ClinicalDataTrialSetId == x).OrderBy(y => y.CheckDate).ToDictionary(x => x.QuestionId.ToString(), x => x.Answer);
|
||||||
|
dic.Add("ClinicalFormId", z.ToString());
|
||||||
|
dic.Add("TrialId", inDto.TrialId.ToString());
|
||||||
|
dic.Add("SubjectId", readModule.SubjectId.ToString());
|
||||||
|
dic.Add("ClinicalDataTrialSetId", x.ToString());
|
||||||
|
|
||||||
|
dto.AnswerList.Add(dic);
|
||||||
|
|
||||||
|
});
|
||||||
|
result.Add(dto);
|
||||||
|
});
|
||||||
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取临床数据表格信息 查看有表格问题的列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetClinicalDateListOutDto>> GetClinicalDateList(GetCRCBeConfirmListInDto inDto)
|
||||||
|
{
|
||||||
|
var confirmList = (await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
|
{
|
||||||
|
ReadModuleId = inDto.ReadModuleId,
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
PageIndex = 1,
|
||||||
|
PageSize = 9999,
|
||||||
|
|
||||||
|
})).CurrentPageData.SelectMany(x => x.ClinicalFormList).ToList();
|
||||||
|
|
||||||
|
var clinicalDataTrialSetIds = confirmList.Select(x => x.ClinicalDataTrialSetId).Distinct().ToList();
|
||||||
|
|
||||||
|
List<GetClinicalDateListOutDto> result = new List<GetClinicalDateListOutDto>();
|
||||||
|
|
||||||
|
clinicalDataTrialSetIds.ForEach(x =>
|
||||||
|
{
|
||||||
|
|
||||||
|
result.Add(new GetClinicalDateListOutDto()
|
||||||
|
{
|
||||||
|
|
||||||
|
ClinicalDataSetName = confirmList.Where(y => y.ClinicalDataTrialSetId == x).Select(y => y.ClinicalDataSetName).First(),
|
||||||
|
DateList = confirmList.Where(y => y.ClinicalDataTrialSetId == x).ToList()
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CRC 确认临床数据
|
/// CRC 确认临床数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -118,14 +118,37 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public Guid ReadModuleId { get; set; }
|
public Guid ReadModuleId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetCRCBeConfirmListInDto
|
public class GetClinicalDateListOutDto
|
||||||
|
{
|
||||||
|
public string ClinicalDataSetName { get; set; }
|
||||||
|
|
||||||
|
public List<GetCRCBeConfirmListOutDto> DateList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetCRCBeConfirmListInDto
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public Guid ReadModuleId { get; set; }
|
public Guid ReadModuleId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetCRCBeConfirm: GetCRCBeConfirmListOutDto
|
|
||||||
|
public class GetClinicalTableListInDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetClinicalTableListOutDto: GetClinicalQuestionAnswerListOutDto
|
||||||
|
{
|
||||||
|
public string ClinicalDataSetName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetCRCBeConfirm: GetCRCBeConfirmListOutDto
|
||||||
{
|
{
|
||||||
public Guid ReadModuleId { get; set; }
|
public Guid ReadModuleId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue