修改查询列表
parent
03810e0093
commit
ef15b96f15
|
@ -61,7 +61,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public bool IsPMSetBack { get; set; }
|
||||
|
||||
public PIAuditState PIAuditState { get; set; }
|
||||
|
||||
|
||||
#region 标准配置
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
@ -76,6 +76,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public bool IsClinicalDataSign { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public CompleteClinicalDataEnum CompleteClinicalDataEnum =>
|
||||
(IsNeedClinicalDataSign && IsClinicalDataSign) ? CompleteClinicalDataEnum.Complete : (IsNeedClinicalDataSign && IsClinicalDataSign == false) ? CompleteClinicalDataEnum.NotComplete : CompleteClinicalDataEnum.NA;
|
||||
|
||||
|
@ -169,6 +171,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public DateTime? LatestReplyTime { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class ReadingTaskView : VisitTaskView
|
||||
|
@ -184,6 +187,16 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public Guid? SouceReadModuleId { get; set; }
|
||||
|
||||
|
||||
public PIAuditState PIAuditState { get; set; }
|
||||
public string NotAgreeReason { get; set; }
|
||||
public string PIAuditNote { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public bool? IsEnrollment { get; set; }
|
||||
|
||||
public bool? IsPDConfirm { get; set; }
|
||||
|
||||
public List<string> PIAuditImagePathList { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
@ -445,6 +458,23 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public class PIAuditDialogListView : PIAuditTaskCommand
|
||||
{
|
||||
|
||||
public string ReplyContent { get; set; } = string.Empty;
|
||||
|
||||
public bool? IsEnrollment { get; set; }
|
||||
|
||||
public bool? IsPDConfirm { get; set; }
|
||||
|
||||
public bool IsCurrentUser { get; set; }
|
||||
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
public string CreateUserName { get; set; }
|
||||
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
|
||||
public UserTypeEnum UserTypeEnum { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -189,9 +189,9 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
|
||||
|
||||
private IQueryable<VisitTask> GetReadingTaskQueryable(VisitTaskQuery queryVisitTask)
|
||||
private IQueryable<VisitTask> GetReadingTaskQueryable(VisitTaskQuery queryVisitTask)
|
||||
{
|
||||
var trialConfig = _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).Select(t => new { t.EnrollConfirmDefaultUserType, t.PDProgressDefaultUserType }).FirstOrDefault() ;
|
||||
var trialConfig = _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).Select(t => new { t.EnrollConfirmDefaultUserType, t.PDProgressDefaultUserType }).FirstOrDefault();
|
||||
|
||||
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId && t.IsAnalysisCreate == false)
|
||||
|
||||
|
@ -215,8 +215,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => (t.Subject.Code.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(queryVisitTask.SubjectCode) && t.IsAnalysisCreate))
|
||||
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
|
||||
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
|
||||
|
||||
.WhereIf(trialConfig?.EnrollConfirmDefaultUserType==UserTypeEnum.MIM && _userInfo.UserTypeEnumInt==(int)UserTypeEnum.MIM,t=>t.SourceSubjectVisit.IsBaseLine==true)
|
||||
|
||||
.WhereIf(trialConfig?.EnrollConfirmDefaultUserType == UserTypeEnum.MIM && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.MIM, t => t.SourceSubjectVisit.IsBaseLine == true)
|
||||
.WhereIf(trialConfig?.PDProgressDefaultUserType == UserTypeEnum.MIM && _userInfo.UserTypeEnumInt == (int)UserTypeEnum.MIM, t => t.SourceSubjectVisit.IsBaseLine == false)
|
||||
.WhereIf(queryVisitTask.IsWaitPIAudit == true, t => t.FirstAuditUserId == null)
|
||||
.WhereIf(queryVisitTask.IsWaitPIAudit == false, t => t.FirstAuditUserId != null)
|
||||
|
@ -325,6 +325,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
var list = await _PIAuditRepository.Where(t => t.VisitTaskId == inQuery.VisitTaskId).OrderBy(t => t.CreateTime).ProjectTo<PIAuditDialogListView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
item.IsCurrentUser = item.CreateUserId == _userInfo.Id;
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
@ -318,7 +318,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<PIAuditTaskCommand, PIAudit>();
|
||||
|
||||
CreateMap<PIAudit, PIAuditDialogListView>();
|
||||
CreateMap<PIAudit, PIAuditDialogListView>()
|
||||
.ForMember(o => o.CreateUserName, t => t.MapFrom(u => u.CreateUser.UserName))
|
||||
.ForMember(o => o.UserTypeEnum, t => t.MapFrom(u => u.CreateUser.UserTypeEnum));
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
|
||||
//只要有系统标准的文档 说明同步过了
|
||||
var trialDocCount = _trialEmailNoticeConfigRepository.Where(t =>/* t.CriterionTypeEnum == criterionTypeEnum &&*/ t.TrialId == trialId && t.TrialReadingCriterionId != null).Count();
|
||||
var trialDocCount = _trialEmailNoticeConfigRepository.Where(t => t.TrialId == trialId ).Count();
|
||||
|
||||
if (trialDocCount == 0)
|
||||
{
|
||||
|
@ -148,7 +148,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var confirmedCriterionTypeList = list.Select(t => (CriterionType?)t.CriterionType).ToList();
|
||||
|
||||
var docmentList = _repository.Where<CommonDocument>(t => confirmedCriterionTypeList.Contains(t.CriterionTypeEnum)).Select(t => new { t.Path, t.Name, t.Code, t.BusinessScenarioEnum, t.CriterionTypeEnum }).ToList();
|
||||
var docmentList = _repository.Where<CommonDocument>(t=> t.BusinessScenarioEnum== CommonDocumentBusinessScenario.EnrollConfirmed|| t.BusinessScenarioEnum == CommonDocumentBusinessScenario.PDConfirmed)
|
||||
.Where(t => (confirmedCriterionTypeList.Contains(t.CriterionTypeEnum))||t.CriterionTypeEnum==null).Select(t => new { t.Path, t.Name, t.Code, t.BusinessScenarioEnum, t.CriterionTypeEnum }).ToList();
|
||||
|
||||
|
||||
foreach (var item in docmentList)
|
||||
|
@ -176,6 +177,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
|
||||
public async Task CommonBusinessScenarioSendEmailAsync()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private async Task<bool> DealMedicalReviewTasKGenerateAndIsSendAsync(Guid trialId, bool? isHandSend, string pdAnswer, List<Guid> taskIdList, List<Guid> minUserIdList)
|
||||
{
|
||||
|
||||
|
|
|
@ -2067,62 +2067,7 @@ namespace IRaCIS.Application.Services
|
|||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> SubmitDicomVisitTask(SubmitDicomVisitTaskInDto inDto)
|
||||
{
|
||||
|
||||
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
|
||||
//// 修改编号
|
||||
//var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
|
||||
//// 获取标准表格外层问题
|
||||
//var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.LesionType != null && x.ReadingTableQuestionTrialList.Any(x => x.QuestionMark == QuestionMark.AutoId))
|
||||
// .SelectMany(x => x.ReadingTableQuestionTrialList).Where(x => x.QuestionMark == QuestionMark.AutoId).Select(x => new
|
||||
// {
|
||||
// x.ReadingQuestionId,
|
||||
// TableQuestionId = x.Id,
|
||||
|
||||
// }).ToListAsync();
|
||||
|
||||
//var questionIds = questionList.Select(x => x.ReadingQuestionId).ToList();
|
||||
|
||||
//var questionMarkList = await _readingQuestionTrialRepository.Where(x => questionIds.Contains(x.Id)).Select(x => new
|
||||
//{
|
||||
// QuestionId = x.Id,
|
||||
// x.OrderMark,
|
||||
|
||||
//}).ToListAsync();
|
||||
|
||||
//var rowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && questionIds.Contains(x.QuestionId)).ToListAsync();
|
||||
//List<ReadingTableQuestionAnswer> questionAnswerList = new List<ReadingTableQuestionAnswer>();
|
||||
//foreach (var item in questionList)
|
||||
//{
|
||||
// await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == item.ReadingQuestionId
|
||||
// && x.TableQuestionId == item.TableQuestionId && x.VisitTaskId == inDto.VisitTaskId);
|
||||
|
||||
// var orderMark = questionMarkList.Where(x => x.QuestionId == item.ReadingQuestionId).Select(x => x.OrderMark).FirstOrDefault();
|
||||
|
||||
// foreach (var row in rowInfo.Where(x => x.QuestionId == item.ReadingQuestionId))
|
||||
// {
|
||||
// questionAnswerList.Add(new ReadingTableQuestionAnswer()
|
||||
// {
|
||||
// Answer = orderMark + row.RowIndex.GetLesionMark(),
|
||||
// Id = NewId.NextGuid(),
|
||||
// QuestionId = item.ReadingQuestionId,
|
||||
// RowId = row.Id,
|
||||
// RowIndex = row.RowIndex,
|
||||
// TableQuestionId = item.TableQuestionId,
|
||||
// TrialId = taskInfo.TrialId,
|
||||
// VisitTaskId = taskInfo.Id,
|
||||
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
//await _readingTableQuestionAnswerRepository.AddRangeAsync(questionAnswerList);
|
||||
//await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
await this.SubmitTaskChangeState(inDto.VisitTaskId);
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
@ -2340,7 +2285,7 @@ namespace IRaCIS.Application.Services
|
|||
if (task != null)
|
||||
{
|
||||
// 有序 自动领取该Subject
|
||||
await ClaimOrCancelSubjectAsync(new ClaimSubjectDto() { IsClaim = true, SubejctId = task.SubjectId, IsInOrder = true });
|
||||
await ClaimOrCancelSubjectAsync(new ClaimSubjectDto() { IsClaim = true, SubejctId = task.SubjectId, VisitTaskId=task.VisitTaskId, IsInOrder = true });
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -2365,7 +2310,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
if (task != null)
|
||||
{
|
||||
// 有序 自动领取该Subject
|
||||
// 无序 自动领取该Subject
|
||||
await ClaimOrCancelSubjectAsync(new ClaimSubjectDto() { IsClaim = true, VisitTaskId = task.VisitTaskId, IsInOrder = false });
|
||||
}
|
||||
}
|
||||
|
@ -2518,8 +2463,9 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
await _subjectRepository.UpdatePartialFromQueryAsync(t => t.Id == claimSubjectDto.SubejctId, u => new Subject() { ClaimUserId = _userInfo.Id }, true);
|
||||
|
||||
}
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.Id == claimSubjectDto.VisitTaskId, u => new VisitTask() { DoctorUserId = _userInfo.Id });
|
||||
|
||||
}
|
||||
|
||||
//定时任务24h取消
|
||||
|
||||
|
@ -2589,6 +2535,7 @@ namespace IRaCIS.Application.Services
|
|||
await VerifyTaskIsSign(visitTaskId);
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(visitTaskId, x => new VisitTask()
|
||||
{
|
||||
DoctorUserId=_userInfo.Id,
|
||||
ReadingTaskState = ReadingTaskState.HaveSigned,
|
||||
SignTime = DateTime.Now,
|
||||
});
|
||||
|
|
|
@ -46,11 +46,7 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
var svList = _mapper.Map<List<SubjectVisit>>(visitPlanList);
|
||||
|
||||
var triconfig = await _trialRepository.Where(t => t.Id == subject.TrialId).Select(u => new { u.IsEnrollementQualificationConfirm,u.IsPDProgressView }).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
svList.ForEach(t =>
|
||||
{
|
||||
t.Subject = subject;
|
||||
|
|
|
@ -44,10 +44,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
SPM=20,
|
||||
APM=21,
|
||||
CPM=22,
|
||||
|
|
|
@ -41,6 +41,9 @@ namespace IRaCIS.Core.Domain.Models
|
|||
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public User CreateUser { get; set; }
|
||||
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue