Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
850c44b12a
|
@ -1204,7 +1204,12 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
// CRC 上传的基线数据签名
|
||||
|
||||
await _readingClinicalDataRepository.UpdatePartialFromQueryAsync(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == dbSubjectVisit.Id && x.IsSign==false, x => new ReadingClinicalData()
|
||||
await _readingClinicalDataRepository.UpdatePartialFromQueryAsync(x =>
|
||||
|
||||
(x.ClinicalDataTrialSet.ClinicalDataLevel== ClinicalLevel.Subject|| x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit)&&
|
||||
|
||||
|
||||
x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == dbSubjectVisit.Id && x.IsSign==false, x => new ReadingClinicalData()
|
||||
{
|
||||
IsSign = true,
|
||||
ReadingClinicalDataState = ReadingClinicalDataStatus.HaveSigned
|
||||
|
|
|
@ -251,8 +251,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
ClinicalFormIds.ForEach(x =>
|
||||
{
|
||||
var dic = answers.Where(y => y.ClinicalFormId == x).ToDictionary(x => x.QuestionId.ToString(), x => x.Answer);
|
||||
dic.Add("clinicalFormId", x.ToString());
|
||||
result.AnswerList.Add(dic);
|
||||
dic.Add("ClinicalFormId", x.ToString());
|
||||
dic.Add("TrialId", inDto.TrialId.ToString());
|
||||
dic.Add("SubjectId", inDto.SubjectId.ToString());
|
||||
dic.Add("ClinicalDataTrialSetId", inDto.ClinicalDataTrialSetId.ToString());
|
||||
|
||||
result.AnswerList.Add(dic);
|
||||
|
||||
});
|
||||
return result;
|
||||
|
@ -264,7 +268,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<GetClinicalFormInfoOutDto> GetClinicalFormInfo(GetClinicalFormInfoInDto inDto)
|
||||
public async Task<List<ClinicalQuestionPreviewDto>> GetClinicalFormInfo(GetClinicalFormInfoInDto inDto)
|
||||
{
|
||||
var formInfo = await _clinicalFormRepository.Where(x => x.Id == inDto.ClinicalFormId).FirstNotNullAsync();
|
||||
|
||||
|
@ -285,7 +289,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
||||
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
var tableQuestions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
||||
var tableQuestions = await _trialClinicalTableQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
||||
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
||||
|
@ -296,11 +300,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
_iClinicalQuestionService.FindChildQuestion(x, questions, tableQuestions, questionAnswer, tableAnswer);
|
||||
});
|
||||
|
||||
return new GetClinicalFormInfoOutDto()
|
||||
{
|
||||
|
||||
Question = result
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
@ -409,13 +409,34 @@ namespace IRaCIS.Core.Application.Service
|
|||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取CRC确认列表
|
||||
/// 删除表单数据
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> DeleteClinicalForm(DeleteClinicalFormInDto inDto)
|
||||
{
|
||||
|
||||
if (await _readModuleCriterionFromRepository.AnyAsync(x => x.ClinicalFormId == inDto.ClinicalFormId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前表单已确认,无法删除!");
|
||||
}
|
||||
|
||||
await _clinicalFormRepository.BatchDeleteNoTrackingAsync(x => x.Id == inDto.ClinicalFormId);
|
||||
await _clinicalQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
|
||||
await _clinicalAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
|
||||
await _clinicalTableAnswerRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取CRC确认列表
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
|
||||
{
|
||||
List<GetCRCConfirmListOutDto> result = await _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||
|
|
|
@ -57,7 +57,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
@ -161,6 +164,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
}
|
||||
}
|
||||
|
||||
public class DeleteClinicalFormInDto
|
||||
{
|
||||
public Guid ClinicalFormId { get; set; }
|
||||
}
|
||||
public class SubmitClinicalFormInDto
|
||||
{
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue