Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
957c85d641
|
@ -255,7 +255,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
|
||||
public class TrialVisitQADTO
|
||||
{
|
||||
|
||||
public bool ExistsManual { get; set; }
|
||||
public SubjectClinicalDataDto SubjectClinicalData { get; set; } = new SubjectClinicalDataDto();
|
||||
|
||||
public List<NoneDicomStudyView> NoneDicomStudyList { get; set; } = new List<NoneDicomStudyView>();
|
||||
|
|
|
@ -21,15 +21,19 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
private readonly IRepository<TrialQCQuestion> _trialQCQuestionRepository;
|
||||
private readonly IRepository<ConsistencyCheckFile> _consistencyCheckFileRepository;
|
||||
|
||||
private IReadingImageTaskService _IReadingImageTaskService;
|
||||
|
||||
public QCListService(
|
||||
IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<Trial> trialRepository,
|
||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSet,
|
||||
IRepository<TrialQCQuestionAnswer> trialQCQuestionAnswerRepository,
|
||||
IRepository<TrialQCQuestion> trialQCQuestionRepository,
|
||||
IReadingImageTaskService IReadingImageTaskService,
|
||||
IRepository<ConsistencyCheckFile> consistencyCheckFileRepository
|
||||
)
|
||||
{
|
||||
this._IReadingImageTaskService = IReadingImageTaskService;
|
||||
_subjectVisitRepository = subjectVisitRepository;
|
||||
this._trialQCQuestionAnswerRepository = trialQCQuestionAnswerRepository;
|
||||
this._trialQCQuestionRepository = trialQCQuestionRepository;
|
||||
|
@ -606,6 +610,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
QCQuestionAnswerList = qacheckList,
|
||||
StudyList = temp.StudyList,
|
||||
ExistsManual= (await _IReadingImageTaskService.GetManualList(new GetManualListInDto() { TrialId = sv.TrialId })).Count() > 0,
|
||||
SeriesList = temp.SeriesList,
|
||||
RelationInfo = await GetVisitQCSubjectInfo(subjectVisitId),
|
||||
NoneDicomStudyList = await _repository.Where<NoneDicomStudy>(t => t.SubjectVisitId == subjectVisitId).ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider).ToListAsync(),
|
||||
|
|
|
@ -33,5 +33,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
Task<IResponseOutput> SubmitOncologyReadingInfo(SubmitOncologyReadingInfoInDto inDto);
|
||||
|
||||
Task AddOncologyTask(Guid oncologModuleId);
|
||||
|
||||
Task<List<GetManualListOutDto>> GetManualList(GetManualListInDto inDto);
|
||||
}
|
||||
}
|
|
@ -147,26 +147,36 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<List<GetManualListOutDto>> GetManualList(GetManualListInDto inDto)
|
||||
{
|
||||
UserTypeEnum userType = (UserTypeEnum)_userInfo.UserTypeEnumInt;
|
||||
//_userInfo.UserTypeId
|
||||
|
||||
|
||||
List<UserTypeEnum> canViewUserType = new List<UserTypeEnum>()
|
||||
{
|
||||
UserTypeEnum.IndependentReviewer,
|
||||
UserTypeEnum.IQC,
|
||||
|
||||
};
|
||||
|
||||
return await _trialDocumentRepository.Where(x => x.TrialId == inDto.TrialId
|
||||
&& x.TrialDocConfirmedUserList.Any(y => y.ConfirmUserId == _userInfo.Id)
|
||||
&& x.TrialDocConfirmedUserList.Any(y => y.ConfirmUserId == _userInfo.Id && y.ConfirmTime != null)
|
||||
&& x.NeedConfirmedUserTypeList.Any(y => y.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||
.Where(t => t.FileType.Code == "2" || t.FileType.Code == "6")
|
||||
.Select(x => new GetManualListOutDto()
|
||||
{
|
||||
Id=x.Id,
|
||||
Name = x.Name,
|
||||
Path = x.Path
|
||||
}).ToListAsync();
|
||||
}
|
||||
.WhereIf(userType== UserTypeEnum.IndependentReviewer, t => t.FileType.Code == "2" || t.FileType.Code == "6")
|
||||
.WhereIf(userType == UserTypeEnum.IQC, t => t.FileType.Code == "4" || t.FileType.Code == "5")
|
||||
.WhereIf(!canViewUserType.Contains(userType),t=>false)
|
||||
.IgnoreQueryFilters()
|
||||
.Select(x => new GetManualListOutDto()
|
||||
{
|
||||
Id = x.Id,
|
||||
Name = x.Name,
|
||||
Path = x.Path
|
||||
}).ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取任务附加问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
/// <summary>
|
||||
/// 获取任务附加问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<(List<TrialAdditionaQuestion>, bool)> GetTaskAdditionalQuestion(GetTaskAdditionalQuestionInDto inDto)
|
||||
{
|
||||
|
||||
|
|
|
@ -766,7 +766,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// <returns></returns>
|
||||
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
if (await _readingTaskQuestionAnswerRepository.AnyAsync(x => x.ReadingQuestionTrial.QuestionType == QuestionType.ImageQualityAssessment && x.VisitTaskId == inDto.VisitTaskId && x.Answer == ImageQualityEvaluation.Abnormal.GetEnumInt()))
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Answer == string.Empty || x.Answer == null)
|
||||
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
||||
)
|
||||
|
|
|
@ -1027,6 +1027,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
|
||||
if (await _readingTaskQuestionAnswerRepository.AnyAsync(x => x.ReadingQuestionTrial.QuestionType == QuestionType.ImageQualityAssessment && x.VisitTaskId == inDto.VisitTaskId && x.Answer == ImageQualityEvaluation.Abnormal.GetEnumInt()))
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Answer == string.Empty || x.Answer == null)
|
||||
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
||||
)
|
||||
|
|
|
@ -633,6 +633,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
|
||||
if (await _readingTaskQuestionAnswerRepository.AnyAsync(x => x.ReadingQuestionTrial.QuestionType == QuestionType.ImageQualityAssessment && x.VisitTaskId == inDto.VisitTaskId && x.Answer == ImageQualityEvaluation.Abnormal.GetEnumInt()))
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Answer == string.Empty || x.Answer == null)
|
||||
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
||||
)
|
||||
|
|
|
@ -629,6 +629,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
|
||||
if (await _readingTaskQuestionAnswerRepository.AnyAsync(x => x.ReadingQuestionTrial.QuestionType == QuestionType.ImageQualityAssessment && x.VisitTaskId == inDto.VisitTaskId && x.Answer == ImageQualityEvaluation.Abnormal.GetEnumInt()))
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Answer == string.Empty || x.Answer == null)
|
||||
&& x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State
|
||||
)
|
||||
|
|
|
@ -16,11 +16,26 @@ namespace IRaCIS.Core.Domain.Share
|
|||
public static readonly string Group = "group";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 影像质量评估
|
||||
/// </summary>
|
||||
public enum ImageQualityEvaluation
|
||||
{
|
||||
/// <summary>
|
||||
/// 正常
|
||||
/// </summary>
|
||||
Normal = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public enum LanguageType
|
||||
/// <summary>
|
||||
/// 不正常
|
||||
/// </summary>
|
||||
Abnormal = 2,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public enum LanguageType
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
|
@ -1490,7 +1505,12 @@ namespace IRaCIS.Core.Domain.Share
|
|||
/// </summary>
|
||||
IsBrainMetastasis =43,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 影像质量评估
|
||||
/// </summary>
|
||||
ImageQualityAssessment=44,
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue