一致性分析
parent
95ebcf2549
commit
5fbaef17ee
|
@ -90,6 +90,13 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.FinishMedicalReview(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.FinishMedicalReviewInDto})">
|
||||
<summary>
|
||||
医学审核完成
|
||||
</summary>
|
||||
<param name="opt"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.ConfirmReadingMedicineQuestion(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.ViewModel.ConfirmReadingMedicineQuestionInDto})">
|
||||
<summary>
|
||||
确认项目医学审核问题
|
||||
|
|
|
@ -1472,9 +1472,44 @@
|
|||
答案
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetMedicalReviewReadingTaskOutDto.IsReviewFinish">
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.IRConfirmMedicalReviewInDto.DoctorUserIdeaEnum">
|
||||
<summary>
|
||||
是否完成
|
||||
阅片人是否认同
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.IRConfirmMedicalReviewInDto.DisagreeReason">
|
||||
<summary>
|
||||
不同意重阅原因
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.IRConfirmMedicalReviewInDto.IsApplyHeavyReading">
|
||||
<summary>
|
||||
是否申请重阅
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetMedicalReviewDialogOutDto.Content">
|
||||
<summary>
|
||||
对话内容
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetMedicalReviewDialogOutDto.UserTypeShortName">
|
||||
<summary>
|
||||
用户角色
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetMedicalReviewDialogOutDto.UserTypeEnumInt">
|
||||
<summary>
|
||||
用户角色枚举
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetMedicalReviewDialogOutDto.CreateUserId">
|
||||
<summary>
|
||||
创建人
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetMedicalReviewDialogOutDto.CreateTime">
|
||||
<summary>
|
||||
创建时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetMedicalReviewReadingTaskOutDto.IsClosedDialog">
|
||||
|
@ -1482,6 +1517,11 @@
|
|||
是否关闭
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClosedMedicalReviewDialogInDto.IsClosedDialog">
|
||||
<summary>
|
||||
是否关闭
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SaveMedicalReviewInfoInDto.IsHaveQuestion">
|
||||
<summary>
|
||||
是否有问题
|
||||
|
@ -1502,11 +1542,6 @@
|
|||
审核建议
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SaveMedicalReviewInfoInDto.IsClosedDialog">
|
||||
<summary>
|
||||
是否关闭
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.MedicalReviewInfo.IsHaveQuestion">
|
||||
<summary>
|
||||
是否有问题
|
||||
|
@ -1527,11 +1562,6 @@
|
|||
审核建议
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.MedicalReviewInfo.IsReviewFinish">
|
||||
<summary>
|
||||
是否完成
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.MedicalReviewInfo.IsClosedDialog">
|
||||
<summary>
|
||||
是否关闭
|
||||
|
@ -2332,6 +2362,12 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.ClosedMedicalReviewDialog(IRaCIS.Core.Application.Service.Reading.Dto.ClosedMedicalReviewDialogInDto)">
|
||||
<summary>
|
||||
关闭医学审核对话
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.SendMedicalReviewDialog(IRaCIS.Core.Application.Service.Reading.Dto.SendMedicalReviewDialogInDto)">
|
||||
<summary>
|
||||
发送对话消息
|
||||
|
@ -2339,6 +2375,27 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.GetMedicalReviewDialog(IRaCIS.Core.Application.Service.Reading.Dto.GetMedicalReviewDialogInDto)">
|
||||
<summary>
|
||||
获取医学审核对话
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.FinishMedicalReview(IRaCIS.Core.Application.Service.Reading.Dto.FinishMedicalReviewInDto)">
|
||||
<summary>
|
||||
完成医学审核
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.IRConfirmMedicalReview(IRaCIS.Core.Application.Service.Reading.Dto.IRConfirmMedicalReviewInDto)">
|
||||
<summary>
|
||||
IR回复确认医学审核
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService">
|
||||
<summary>
|
||||
医学审核问题
|
||||
|
@ -2524,6 +2581,11 @@
|
|||
<member name="T:IRaCIS.Core.Application.ViewModel.TaskMedicalReviewView">
|
||||
<summary> TaskMedicalReviewView 列表视图模型 </summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.TaskMedicalReviewView.AuditAdviceEnum">
|
||||
<summary>
|
||||
审核建议
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.ViewModel.TaskMedicalReviewQuery">
|
||||
<summary>TaskMedicalReviewQuery 列表查询参数模型</summary>
|
||||
</member>
|
||||
|
|
|
@ -59,7 +59,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public Guid SiteId => VisitTaskList.Select(t => t.SiteId).First();
|
||||
|
||||
public String TrialSiteCode => VisitTaskList.Select(t => t.TrialSiteCode).First();
|
||||
public string SubjectCode => VisitTaskList.Select(t => t.TrialSiteCode).First();
|
||||
public string SubjectCode => VisitTaskList.Select(t => t.SubjectCode).First();
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
|
@ -70,7 +70,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public List<VisitTaskSimpleView> VisitTaskList { get; set; }
|
||||
|
||||
//public List<UserSimpleInfo> HistoryDoctorUserList => VisitTaskList.Select(t => t.DoctorUser).Distinct().ToList();
|
||||
public List<UserSimpleInfo> HistoryDoctorUserList => VisitTaskList.SelectMany(t => t.RelationDoctorUserList).DistinctBy(t=>t.UserId).ToList();
|
||||
}
|
||||
|
||||
public class VisitTaskSimpleView
|
||||
|
@ -99,12 +99,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public String TrialSiteCode { get; set; } = String.Empty;
|
||||
public string SubjectCode { get; set; } = String.Empty;
|
||||
|
||||
//public UserSimpleInfo DoctorUser { get; set; }
|
||||
public List<UserSimpleInfo> RelationDoctorUserList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public Guid? DoctorUserId { get; set; }
|
||||
[JsonIgnore]
|
||||
public Guid? TaskConsistentRuleId { get; set; }
|
||||
public bool IsHaveGeneratedTask { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -86,13 +86,17 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public ReadingTaskState ReadingTaskState { get; set; }
|
||||
|
||||
|
||||
|
||||
public ReReadingApplyState ReReadingApplyState { get; set; }
|
||||
public DateTime? SuggesteFinishedTime { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class AnalysisTaskView: ReadingTaskView
|
||||
{
|
||||
public bool IsSelfAnalysis { get; set; }
|
||||
}
|
||||
|
||||
//public class IRReReadingTaskView: ReReadingTaskView
|
||||
//{
|
||||
|
||||
|
|
|
@ -24,12 +24,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
private readonly IRepository<TaskConsistentRule> _taskConsistentRuleRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<SubjectUser> _subjectUserRepository;
|
||||
private readonly IRepository<Subject> _subjectRepository;
|
||||
|
||||
public TaskConsistentRuleService(IRepository<VisitTask> visitTaskRepository, IRepository<TaskConsistentRule> taskConsistentRuleRepository, IRepository<SubjectUser> subjectUserRepository)
|
||||
public TaskConsistentRuleService(IRepository<VisitTask> visitTaskRepository, IRepository<TaskConsistentRule> taskConsistentRuleRepository, IRepository<SubjectUser> subjectUserRepository ,IRepository<Subject> subjectRepository)
|
||||
{
|
||||
_taskConsistentRuleRepository = taskConsistentRuleRepository;
|
||||
_visitTaskRepository = visitTaskRepository;
|
||||
_subjectUserRepository = subjectUserRepository;
|
||||
_subjectRepository = subjectRepository;
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,7 +41,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="queryVisitTask"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<ReadingTaskView>> GetAnalysisTaskList(VisitTaskQuery queryVisitTask)
|
||||
public async Task<PageOutput<AnalysisTaskView>> GetAnalysisTaskList(VisitTaskQuery queryVisitTask)
|
||||
{
|
||||
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId)
|
||||
.Where(t => t.IsAnalysisCreate)
|
||||
|
@ -55,7 +57,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode))
|
||||
.WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
|
||||
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate.Value.AddDays(1))
|
||||
.ProjectTo<ReadingTaskView>(_mapper.ConfigurationProvider);
|
||||
.ProjectTo<AnalysisTaskView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId) };
|
||||
|
||||
|
@ -90,34 +92,36 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var doctorUserId = isSelfAnalysis ? filterObj.AnalysisDoctorUserId : filterObj.CompareDoctorUserId;
|
||||
|
||||
var group = _visitTaskRepository.Where(t => t.TrialId == filterObj.TrialId)
|
||||
// 自身一致性分析
|
||||
.WhereIf(isSelfAnalysis, t => t.DoctorUserId == filterObj.AnalysisDoctorUserId)
|
||||
// 组内一致性分析
|
||||
.WhereIf(isSelfAnalysis == false && subjectfilter !=null, t => t.DoctorUserId == filterObj.AnalysisDoctorUserId && subjectfilter.Contains(t.SubjectId))
|
||||
.Where(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||
.Where(t => t.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7 + 1) > DateTime.Now)
|
||||
//重阅产生的访视任务 要把之前的访视任务去除
|
||||
.Where(t => t.ReReadingApplyState == ReReadingApplyState.Default || t.ReReadingApplyState == ReReadingApplyState.Reject)
|
||||
|
||||
.WhereIf(filterObj.IsHaveReadingPeriod == false, t => t.ReadingCategory == ReadingCategory.Visit)
|
||||
.WhereIf(filterObj.IsHaveReadingPeriod == true, t => t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global)
|
||||
.GroupBy(t => t.SubjectId)
|
||||
.Where(g => g.Count() >= filterObj.PlanVisitCount);
|
||||
#region 以任务为维度
|
||||
var group = _visitTaskRepository.Where(t => t.TrialId == filterObj.TrialId && t.IsAnalysisCreate==false)
|
||||
// 自身一致性分析
|
||||
.WhereIf(isSelfAnalysis, t => t.DoctorUserId == filterObj.AnalysisDoctorUserId)
|
||||
// 组内一致性分析
|
||||
.WhereIf(isSelfAnalysis == false && subjectfilter != null, t => t.DoctorUserId == filterObj.AnalysisDoctorUserId && subjectfilter.Contains(t.SubjectId))
|
||||
.Where(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||
.Where(t => t.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7 + 1) > DateTime.Now)
|
||||
//重阅产生的访视任务 要把之前的访视任务去除
|
||||
.Where(t => t.ReReadingApplyState == ReReadingApplyState.Default || t.ReReadingApplyState == ReReadingApplyState.Reject)
|
||||
|
||||
.WhereIf(filterObj.IsHaveReadingPeriod == false, t => t.ReadingCategory == ReadingCategory.Visit)
|
||||
.WhereIf(filterObj.IsHaveReadingPeriod == true, t => t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global)
|
||||
.GroupBy(t => t.SubjectId)
|
||||
.Where(g => g.Count() >= filterObj.PlanVisitCount);
|
||||
|
||||
var query = group.Select(g => new DoctorConsistentRuleSubjectView()
|
||||
{
|
||||
SubjectId = g.Key,
|
||||
|
||||
IsHaveGeneratedTask = g.Any(t => t.IsAnalysisCreate && t.SubjectId == g.Key && t.DoctorUserId == doctorUserId && t.TaskConsistentRuleId == filterObj.Id),
|
||||
IsHaveGeneratedTask = g.Any(c => c.Subject.SubjectVisitTaskList.Any(t => t.IsAnalysisCreate && t.DoctorUserId == doctorUserId && t.TaskConsistentRuleId == filterObj.Id)),
|
||||
|
||||
VisitTaskList = g.Where(t => t.IsAnalysisCreate == false).OrderBy(t => t.VisitTaskNum)
|
||||
VisitTaskList = g.OrderBy(t => t.VisitTaskNum)
|
||||
|
||||
.Select(c => new VisitTaskSimpleView()
|
||||
{
|
||||
Id = c.Id,
|
||||
ReadingCategory = c.ReadingCategory,
|
||||
ReadingTaskState=c.ReadingTaskState,
|
||||
ReadingTaskState = c.ReadingTaskState,
|
||||
TaskBlindName = c.TaskBlindName,
|
||||
TaskCode = c.TaskCode,
|
||||
TaskName = c.TaskName,
|
||||
|
@ -129,18 +133,24 @@ namespace IRaCIS.Core.Application.Service
|
|||
SubjectCode = c.Subject.Code,
|
||||
TrialSiteCode = c.Subject.TrialSite.TrialSiteCode,
|
||||
|
||||
//DoctorUser=new UserSimpleInfo()
|
||||
//{
|
||||
// FullName=c.DoctorUser.FullName,
|
||||
// UserCode=c.DoctorUser.UserCode,
|
||||
// UserId=c.DoctorUser.Id,
|
||||
// UserName=c.DoctorUser.UserName
|
||||
//}
|
||||
RelationDoctorUserList=c.SameVisitTaskList/*Where(t=>t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)*/.Select(c=> new UserSimpleInfo()
|
||||
{
|
||||
FullName = c.DoctorUser.FullName,
|
||||
UserCode = c.DoctorUser.UserCode,
|
||||
UserId = c.DoctorUser.Id,
|
||||
UserName = c.DoctorUser.UserName
|
||||
}).ToList(),
|
||||
|
||||
IsHaveGeneratedTask = c.Subject.SubjectVisitTaskList.Any(t => t.IsAnalysisCreate && t.DoctorUserId == doctorUserId && t.TaskConsistentRuleId == filterObj.Id),
|
||||
|
||||
}).ToList(),
|
||||
|
||||
ValidTaskCount = g.Count()
|
||||
|
||||
});
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
var count = group.Count();
|
||||
|
||||
|
@ -185,10 +195,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
var group = _visitTaskRepository.Where(t => t.TrialId == filterObj.TrialId && inCommand.SubejctIdList.Contains(t.SubjectId))
|
||||
// 自身一致性分析
|
||||
var group = _visitTaskRepository.Where(t => t.TrialId == filterObj.TrialId && inCommand.SubejctIdList.Contains(t.SubjectId) && t.IsAnalysisCreate == false)
|
||||
// 自身一致性分析
|
||||
.WhereIf(isSelfAnalysis, t => t.DoctorUserId == filterObj.AnalysisDoctorUserId)
|
||||
// 组内一致性分析
|
||||
// 组内一致性分析
|
||||
.WhereIf(isSelfAnalysis == false && subjectfilter != null, t => t.DoctorUserId == filterObj.AnalysisDoctorUserId && subjectfilter.Contains(t.SubjectId))
|
||||
.Where(t => t.ReadingTaskState == ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
|
||||
.Where(t => t.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7 + 1) > DateTime.Now)
|
||||
|
@ -205,9 +215,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
SubjectId = g.Key,
|
||||
|
||||
IsHaveGeneratedTask = g.Any(t => t.IsAnalysisCreate && t.SubjectId == g.Key && t.DoctorUserId == doctorUserId),
|
||||
IsHaveGeneratedTask = g.Any(c => c.Subject.SubjectVisitTaskList.Any(t => t.IsAnalysisCreate && t.DoctorUserId == doctorUserId && t.TaskConsistentRuleId == filterObj.Id)),
|
||||
|
||||
VisitTaskList = g.Where(t => t.IsAnalysisCreate == false).OrderBy(t => t.VisitTaskNum).Select(c => new VisitTaskSimpleView()
|
||||
VisitTaskList = g.OrderBy(t => t.VisitTaskNum).Select(c => new VisitTaskSimpleView()
|
||||
{
|
||||
Id = c.Id,
|
||||
ReadingCategory = c.ReadingCategory,
|
||||
|
@ -217,28 +227,31 @@ namespace IRaCIS.Core.Application.Service
|
|||
TaskState = c.TaskState,
|
||||
ArmEnum = c.ArmEnum,
|
||||
SubjectId = c.SubjectId,
|
||||
SiteId=c.Subject.SiteId,
|
||||
SiteId = c.Subject.SiteId,
|
||||
TrialId = c.TrialId,
|
||||
SubjectCode = c.Subject.Code,
|
||||
TrialSiteCode = c.Subject.TrialSite.TrialSiteCode,
|
||||
}).Take(filterObj.PlanVisitCount).ToList(),
|
||||
|
||||
IsHaveGeneratedTask = c.Subject.SubjectVisitTaskList.Any(t => t.IsAnalysisCreate && t.DoctorUserId == doctorUserId && t.TaskConsistentRuleId == filterObj.Id),
|
||||
|
||||
}).ToList(),
|
||||
|
||||
ValidTaskCount = g.Count()
|
||||
|
||||
});
|
||||
|
||||
var list = query.ToList();
|
||||
var list = query.OrderByDescending(t=>t.IsHaveGeneratedTask).ToList();
|
||||
|
||||
foreach (var subject in list)
|
||||
{
|
||||
subject.VisitTaskList.ForEach(t => { t.DoctorUserId = doctorUserId; t.TaskConsistentRuleId = filterObj.Id; });
|
||||
subject.VisitTaskList.Take(filterObj.PlanVisitCount).ForEach(t => { t.DoctorUserId = doctorUserId; t.TaskConsistentRuleId = filterObj.Id; });
|
||||
|
||||
|
||||
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
||||
{
|
||||
TrialId= filterObj.TrialId,
|
||||
TrialId = filterObj.TrialId,
|
||||
ReadingCategory = ReadingCategory.Consistent,
|
||||
GenerataConsistentTaskList = subject.VisitTaskList
|
||||
GenerataConsistentTaskList = subject.VisitTaskList.Where(t=>t.IsHaveGeneratedTask==false).ToList()
|
||||
});
|
||||
|
||||
}
|
||||
|
|
|
@ -201,11 +201,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PM 重阅追踪
|
||||
/// </summary>
|
||||
|
|
|
@ -83,14 +83,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
CreateMap<VisitTask, JudgeVisitTaskView>().IncludeBase<VisitTask,VisitTaskView>()
|
||||
CreateMap<VisitTask, JudgeVisitTaskView>().IncludeBase<VisitTask, VisitTaskView>()
|
||||
|
||||
|
||||
.ForMember(o => o.HistoryReadingDoctorUserList, t => t.MapFrom(u => u.JudgeVisitList));
|
||||
|
||||
CreateMap<VisitTask, ReadingTaskView>().IncludeBase<VisitTask, VisitTaskView>();
|
||||
|
||||
|
||||
CreateMap<VisitTask, AnalysisTaskView>().IncludeBase<VisitTask, VisitTaskView>()
|
||||
.ForMember(o => o.IsSelfAnalysis, t => t.MapFrom(u => u.TaskConsistentRule.CompareDoctorUserId == null));
|
||||
|
||||
|
||||
|
||||
|
@ -105,8 +106,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<VisitTask, IRHaveReadView>()
|
||||
.ForMember(o => o.SiteId, t => t.MapFrom(u => u.Subject.SiteId))
|
||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate? u.BlindTrialSiteCode: u.Subject.TrialSite.TrialSiteCode))
|
||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate ? u.BlindSubjectCode: u.Subject.Code));
|
||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
|
||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate ? u.BlindSubjectCode : u.Subject.Code));
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace IRaCIS.Application.Services
|
|||
SubjectId=x.SubjectId,
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
|
||||
VisitNum = x.SourceSubjectVisitId != null ? x.SubjectVisit.VisitNum : x.ReadModule.VisitNum,
|
||||
VisitNum = x.SourceSubjectVisitId != null ? x.SourceSubjectVisit.VisitNum : x.ReadModule.VisitNum,
|
||||
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
|
@ -122,7 +122,7 @@ namespace IRaCIS.Application.Services
|
|||
TaskBlindName=x.TaskBlindName,
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
|
||||
VisitNum = x.SourceSubjectVisitId != null ? x.SubjectVisit.VisitNum : x.ReadModule.VisitNum,
|
||||
VisitNum = x.SourceSubjectVisitId != null ? x.SourceSubjectVisit.VisitNum : x.ReadModule.VisitNum,
|
||||
}).OrderBy(x => x.VisitNum).ThenBy(x => x.ReadingCategory);
|
||||
|
||||
task =await taskquery.FirstOrDefaultAsync();
|
||||
|
@ -142,7 +142,7 @@ namespace IRaCIS.Application.Services
|
|||
TaskBlindName = x.TaskBlindName,
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
|
||||
VisitNum = x.SourceSubjectVisitId != null ? x.SubjectVisit.VisitNum : x.ReadModule.VisitNum,
|
||||
VisitNum = x.SourceSubjectVisitId != null ? x.SourceSubjectVisit.VisitNum : x.ReadModule.VisitNum,
|
||||
SubjectId=x.SubjectId,
|
||||
SubjectCode=x.Subject.Code,
|
||||
}).FirstOrDefaultAsync();
|
||||
|
|
|
@ -169,6 +169,16 @@ namespace IRaCIS.Core.Domain.Share
|
|||
|
||||
}
|
||||
|
||||
|
||||
//public enum AnalysisType
|
||||
//{
|
||||
// Default=0,
|
||||
|
||||
// Self=1,
|
||||
|
||||
// InnerGroup=2
|
||||
//}
|
||||
|
||||
//
|
||||
public enum RequestReReadingType
|
||||
{
|
||||
|
|
|
@ -63,6 +63,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public List<VisitTask> DoctorVisitTaskList { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
//[Projectable]
|
||||
//public List<VisitTask> DoctorConsistentTaskList => DoctorVisitTaskList.Where(t => t.IsAnalysisCreate && t.TaskConsistentRuleId == Id).ToList();
|
||||
}
|
||||
|
|
|
@ -78,7 +78,15 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public ReadModule ReadModule { get; set; }
|
||||
|
||||
[ForeignKey("SourceSubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
public SubjectVisit SourceSubjectVisit { get; set; }
|
||||
|
||||
|
||||
//排除一致性分析 因为souceVisitId 没值
|
||||
public List<VisitTask> SameVisitTaskList { get; set; }
|
||||
|
||||
|
||||
|
||||
public TaskConsistentRule TaskConsistentRule { get; set; }
|
||||
|
||||
public TaskAllocationRule DoctorTaskAllocationRule { get; set; }
|
||||
|
||||
|
@ -113,6 +121,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||
//是否是一致性分析产生
|
||||
public bool IsAnalysisCreate { get; set; }
|
||||
|
||||
|
||||
|
||||
public string BlindSubjectCode { get; set; } = string.Empty;
|
||||
public string BlindTrialSiteCode { get; set; } = string.Empty;
|
||||
|
||||
|
|
|
@ -96,6 +96,13 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
modelBuilder.Entity<SubjectUser>().HasMany(t => t.SubjectArmVisitTaskList).WithOne(t=>t.SujectArm).HasForeignKey(t => new { t.SubjectId,t.ArmEnum}).HasPrincipalKey(u => new { u.SubjectId,u.ArmEnum });
|
||||
modelBuilder.Entity<VisitTask>().HasMany(t => t.JudgeVisitList).WithOne(t=>t.JudgeVisitTask);
|
||||
|
||||
modelBuilder.Entity<VisitTask>().HasMany(t => t.SameVisitTaskList).WithOne().HasForeignKey(t=>t.SourceSubjectVisitId).HasPrincipalKey(u=>u.SourceSubjectVisitId);
|
||||
|
||||
//modelBuilder.Entity<VisitTask>().HasMany(t => t.AnalysisVisitTaskList).WithOne().HasForeignKey(t => t.TaskConsistentRuleId).HasPrincipalKey(u => u.SourceSubjectVisitId);
|
||||
|
||||
|
||||
|
||||
modelBuilder.Entity<Dictionary>().HasMany(t => t.ChildList).WithOne(t => t.Parent);
|
||||
modelBuilder.Entity<SubjectUser>().HasMany(t => t.EarlierSubjectUserList).WithOne(t => t.OrignalSubjectUser);
|
||||
if (_userInfo.IsEn_Us)
|
||||
|
|
|
@ -11,19 +11,19 @@ namespace IRaCIS.Core.Infrastructure.Extention
|
|||
public static partial class IEnumerableExtensions
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 按字段去重
|
||||
/// </summary>
|
||||
/// <typeparam name="TSource"></typeparam>
|
||||
/// <typeparam name="TKey"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
/// <param name="keySelector"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
|
||||
{
|
||||
var hash = new HashSet<TKey>();
|
||||
return source.Where(p => hash.Add(keySelector(p)));
|
||||
}
|
||||
///// <summary>
|
||||
///// 按字段去重
|
||||
///// </summary>
|
||||
///// <typeparam name="TSource"></typeparam>
|
||||
///// <typeparam name="TKey"></typeparam>
|
||||
///// <param name="source"></param>
|
||||
///// <param name="keySelector"></param>
|
||||
///// <returns></returns>
|
||||
//public static IEnumerable<TSource> DistinctBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> keySelector)
|
||||
//{
|
||||
// var hash = new HashSet<TKey>();
|
||||
// return source.Where(p => hash.Add(keySelector(p)));
|
||||
//}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue