From d6e5b1bd4671cc0e1820792a28269ef60bd95822 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 29 Jun 2022 13:49:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E5=AD=A6=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 58 ++++++++- .../Allocation/DTO/AllocationListDTO.cs | 2 +- .../DTO/TaskMedicalReviewRuleViewModel.cs | 50 ++++++++ .../DTO/TaskMedicalReviewViewModel.cs | 79 ++++++++++++ .../Allocation/DTO/VisitTaskViewModel.cs | 16 ++- .../ITaskMedicalReviewRuleService.cs | 25 ++++ .../Interface/ITaskMedicalReviewService.cs | 23 ++++ .../Allocation/TaskMedicalReviewService.cs | 112 ++++++++++++++++++ .../TaskTaskMedicalReviewRuleService.cs | 60 ++++++++++ .../Service/Allocation/VisitTaskService.cs | 4 +- .../Service/Allocation/_MapConfig.cs | 19 +++ .../Allocation/TaskMedicalReview.cs | 86 ++++++++++++++ .../Allocation/TaskMedicalReviewRule.cs | 95 +++++++++++++++ .../Context/IRaCISDBContext.cs | 6 + IRaCIS.Core.Test/DbHelper.ttinclude | 2 +- IRaCIS.Core.Test/ModelAuto.ttinclude | 4 +- .../TT_Template/IRaCIS.Core.Dto.cs | 7 ++ 17 files changed, 640 insertions(+), 8 deletions(-) create mode 100644 IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewRuleViewModel.cs create mode 100644 IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs create mode 100644 IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewRuleService.cs create mode 100644 IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewService.cs create mode 100644 IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs create mode 100644 IRaCIS.Core.Application/Service/Allocation/TaskTaskMedicalReviewRuleService.cs create mode 100644 IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs create mode 100644 IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 618069104..b1ed4629e 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -53,6 +53,37 @@ + + + 任务医学审核 + + + + + PM 医学审核(挑选任务生成后的列表) + + + + + + + MIM 医学审核 + + + + + + + 123 分别是 分配,重新分配,取消分配 + + + + + + + 医学审核生成规则 + + 访视读片任务 @@ -93,7 +124,7 @@ - 一致性分析列表 (一致性分析 最后勾选 产生的任务) + 一致性分析列表 (自身 组内 最后勾选 产生的任务) @@ -2172,6 +2203,21 @@ 阅片期 + + TaskTaskMedicalReviewRuleView 列表视图模型 + + + TaskTaskMedicalReviewRuleQuery 列表查询参数模型 + + + TaskTaskMedicalReviewRuleAddOrEdit 列表查询参数模型 + + + TaskMedicalReviewView 列表视图模型 + + + TaskMedicalReviewQuery 列表查询参数模型 + VisitTaskView 列表视图模型 @@ -2392,6 +2438,16 @@ ITaskAllocationRuleService + + + ITaskTaskMedicalReviewRuleService + + + + + ITaskMedicalReviewService + + ICommonDocumentService diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/AllocationListDTO.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/AllocationListDTO.cs index 7d7be92bf..3be6c6710 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/AllocationListDTO.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/AllocationListDTO.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace IRaCIS.Core.Application.Service.Allocation.DTO +namespace IRaCIS.Core.Application.Service.ViewModel { public class AllocationVisitViewModel { diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewRuleViewModel.cs new file mode 100644 index 000000000..8948c7cc9 --- /dev/null +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewRuleViewModel.cs @@ -0,0 +1,50 @@ +//-------------------------------------------------------------------- +// 此代码由T4模板自动生成 byzhouhang 20210918 +// 生成时间 2022-06-29 13:36:46 +// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 +//-------------------------------------------------------------------- +using System; +using IRaCIS.Core.Domain.Share; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; + +namespace IRaCIS.Core.Application.ViewModel +{ + /// TaskTaskMedicalReviewRuleView 列表视图模型 + public class TaskMedicalReviewRuleView : TaskMedicalReviewRuleAddOrEdit + { + public Guid CreateUserId { get; set; } + public DateTime CreateTime { get; set; } + public DateTime UpdateTime { get; set; } + public Guid UpdateUserId { get; set; } + + public UserSimpleInfo DoctorUser { get; set; } + + } + + ///TaskTaskMedicalReviewRuleQuery 列表查询参数模型 + public class TaskMedicalReviewRuleQuery + { + [NotDefault] + public Guid TrialId { get; set; } + + } + + /// TaskTaskMedicalReviewRuleAddOrEdit 列表查询参数模型 + public class TaskMedicalReviewRuleAddOrEdit + { + public Guid? Id { get; set; } + public Guid DoctorUserId { get; set; } + public bool IsEnable { get; set; } + public string Note { get; set; } + public Guid TrialId { get; set; } + public int PlanVisitCount { get; set; } + public int PlanJudgeCount { get; set; } + public int PlanGlobalCount { get; set; } + public int PlanTumorCount { get; set; } + } + + +} + + diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs new file mode 100644 index 000000000..93705db0a --- /dev/null +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs @@ -0,0 +1,79 @@ +//-------------------------------------------------------------------- +// 此代码由T4模板自动生成 byzhouhang 20210918 +// 生成时间 2022-06-29 10:59:50 +// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 +//-------------------------------------------------------------------- +using System; +using IRaCIS.Core.Domain.Share; +using System.Collections.Generic; + +namespace IRaCIS.Core.Application.ViewModel +{ + /// TaskMedicalReviewView 列表视图模型 + public class TaskMedicalReviewView: VisitTaskViewBasic + { + public Guid Id { get; set; } + public Guid CreateUserId { get; set; } + public DateTime CreateTime { get; set; } + public DateTime UpdateTime { get; set; } + public Guid UpdateUserId { get; set; } + public DateTime? AllocateTime { get; set; } + public int AuditState { get; set; } + public DateTime? AuditSignTime { get; set; } + public int DoctorUserIdeaEnum { get; set; } + public Guid? MedicalManagerUserId { get; set; } + public string AuditSuggestion { get; set; } + + + public UserSimpleInfo DoctorUser { get; set; } + + public UserSimpleInfo MedicalManagerUser { get; set; } + } + + ///TaskMedicalReviewQuery 列表查询参数模型 + public class TaskMedicalReviewQuery : PageInput + { + public Guid TrialId { get; set; } + public Guid? SiteId { get; set; } + + public Guid? SubjectId { get; set; } + + public string SubjectCode { get; set; } = String.Empty; + + + public string TaskName { get; set; } = String.Empty; + + public bool? IsUrgent { get; set; } + public Guid? DoctorUserId { get; set; } + + public ReadingCategory? ReadingCategory { get; set; } + + public ReadingTaskState? ReadingTaskState { get; set; } + + + } + + + public class AssignMedicalReviewTaskCommand + { + public Guid Id { get; set; } + + + public Guid? MedicalManagerUserId { get; set; } + + public MedicalReviewTaskOptType TaskOptType { get; set; } + } + + public enum MedicalReviewTaskOptType + { + Assign = 1, + + ReAssign = 2, + + + CancelAssign = 3, + } + +} + + diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 627fce43a..b5dd9b3a7 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -65,6 +65,15 @@ namespace IRaCIS.Core.Application.ViewModel public string UserTypeShortName { get; set; } } + public class UserSimpleInfo + { + public string UserCode { get; set; } + public string UserName { get; set; } + public string FullName { get; set; } + + public string UserTypeShortName { get; set; } + } + public class JudgeVisitTaskView : VisitTaskView { @@ -195,9 +204,9 @@ namespace IRaCIS.Core.Application.ViewModel public ReadingCategory? ReadingCategory { get; set; } + public ReadingTaskState? ReadingTaskState { get; set; } public TaskAllocationState? TaskAllocationState { get; set; } - public ReadingTaskState? ReadingTaskState { get; set; } public DateTime? BeginAllocateDate { get; set; } @@ -242,7 +251,7 @@ namespace IRaCIS.Core.Application.ViewModel public int? VisitValidTaskCount { get; set; } - public int? VisitValidCount => VisitTaskList.Count(); + public int? VisitValidCount => VisitTaskList.Select(t=>t.TaskName).Distinct().Count(); public List VisitTaskList { get; set; } } @@ -252,6 +261,9 @@ namespace IRaCIS.Core.Application.ViewModel public Guid Id { get; set; } public Guid TrialId { get; set; } + public Guid SubjectId { get; set; } + + public Arm ArmEnum { get; set; } public string TaskCode { get; set; } public string TaskName { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewRuleService.cs new file mode 100644 index 000000000..11a544392 --- /dev/null +++ b/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewRuleService.cs @@ -0,0 +1,25 @@ +//-------------------------------------------------------------------- +// 此代码由T4模板自动生成 byzhouhang 20210918 +// 生成时间 2022-06-29 13:37:37 +// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 +//-------------------------------------------------------------------- + +using IRaCIS.Core.Application.ViewModel; +namespace IRaCIS.Core.Application.Interfaces +{ + /// + /// ITaskTaskMedicalReviewRuleService + /// + public interface ITaskMedicalReviewRuleService + { + + + Task> GetTaskMedicalReviewRuleList(TaskMedicalReviewRuleQuery queryTaskTaskMedicalReviewRule); + + Task AddOrUpdateTaskMedicalReviewRule(TaskMedicalReviewRuleAddOrEdit addOrEditTaskTaskMedicalReviewRule); + + Task DeleteTaskMedicalReviewRule(Guid taskTaskMedicalReviewRuleId); + + + } +} diff --git a/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewService.cs new file mode 100644 index 000000000..81a77a470 --- /dev/null +++ b/IRaCIS.Core.Application/Service/Allocation/Interface/ITaskMedicalReviewService.cs @@ -0,0 +1,23 @@ +//-------------------------------------------------------------------- +// 此代码由T4模板自动生成 byzhouhang 20210918 +// 生成时间 2022-06-29 10:59:32 +// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 +//-------------------------------------------------------------------- + + +using IRaCIS.Core.Application.ViewModel; + +namespace IRaCIS.Core.Application.Interfaces +{ + /// + /// ITaskMedicalReviewService + /// + public interface ITaskMedicalReviewService + { + + //Task> GetTaskMedicalReviewList(TaskMedicalReviewQuery queryTaskMedicalReview); + + + + } +} diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs new file mode 100644 index 000000000..7568aec40 --- /dev/null +++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs @@ -0,0 +1,112 @@ +//-------------------------------------------------------------------- +// 此代码由T4模板自动生成 byzhouhang 20210918 +// 生成时间 2022-06-29 10:59:39 +// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 +//-------------------------------------------------------------------- + +using IRaCIS.Core.Domain.Models; +using Microsoft.AspNetCore.Mvc; +using IRaCIS.Core.Application.Interfaces; +using IRaCIS.Core.Application.ViewModel; + +namespace IRaCIS.Core.Application.Service +{ + /// + /// 任务医学审核 + /// + [ApiExplorerSettings(GroupName = "Trial")] + public class TaskMedicalReviewService : BaseService, ITaskMedicalReviewService + { + + private readonly IRepository _taskMedicalReviewRepository; + + public TaskMedicalReviewService(IRepository taskMedicalReviewRepository) + { + _taskMedicalReviewRepository = taskMedicalReviewRepository; + } + + /// + /// PM 医学审核(挑选任务生成后的列表) + /// + /// + /// + [HttpPost] + public async Task> GetMedicalReviewTaskList(TaskMedicalReviewQuery inQuery) + { + + var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId) + .WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId) + .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode)) + .WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent) + .WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId) + .WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory) + .WhereIf(inQuery.ReadingTaskState != null, t => t.VisitTask.ReadingTaskState == inQuery.ReadingTaskState) + .ProjectTo(_mapper.ConfigurationProvider); + + var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TaskMedicalReviewView.Id) : inQuery.SortField, inQuery.Asc); + + return pageList; + } + + + + + + + + /// + /// MIM 医学审核 + /// + /// + /// + [HttpPost] + public async Task> GetMIMMedicalReviewTaskList(TaskMedicalReviewQuery inQuery) + { + + var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.Id) + + .WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId) + .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode)) + .WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent) + .WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId) + .WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory) + .WhereIf(inQuery.ReadingTaskState != null, t => t.VisitTask.ReadingTaskState == inQuery.ReadingTaskState) + .ProjectTo(_mapper.ConfigurationProvider); + + var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TaskMedicalReviewView.Id) : inQuery.SortField, inQuery.Asc); + + return pageList; + } + + + /// + /// 123 分别是 分配,重新分配,取消分配 + /// + /// + /// + public async Task AssignMedicalReviewTask(AssignMedicalReviewTaskCommand command) + { + + var task = await _taskMedicalReviewRepository.FirstOrDefaultAsync(t => t.Id == command.Id); + + if (command.TaskOptType == MedicalReviewTaskOptType.Assign || command.TaskOptType == MedicalReviewTaskOptType.ReAssign) + { + task.MedicalManagerUserId = command.MedicalManagerUserId; + task.AllocateTime = DateTime.Now; + + } + + else if (command.TaskOptType == MedicalReviewTaskOptType.CancelAssign) + { + task.MedicalManagerUserId = null; + task.AllocateTime = null; + } + + await _taskMedicalReviewRepository.SaveChangesAsync(); + + return ResponseOutput.Ok(); + } + + + } +} diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskTaskMedicalReviewRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskTaskMedicalReviewRuleService.cs new file mode 100644 index 000000000..7c10115e2 --- /dev/null +++ b/IRaCIS.Core.Application/Service/Allocation/TaskTaskMedicalReviewRuleService.cs @@ -0,0 +1,60 @@ +//-------------------------------------------------------------------- +// 此代码由T4模板自动生成 byzhouhang 20210918 +// 生成时间 2022-06-29 13:38:40 +// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 +//-------------------------------------------------------------------- + +using IRaCIS.Core.Domain.Models; +using Microsoft.AspNetCore.Mvc; +using IRaCIS.Core.Application.Interfaces; +using IRaCIS.Core.Application.ViewModel; +namespace IRaCIS.Core.Application.Service +{ + /// + /// 医学审核生成规则 + /// + [ApiExplorerSettings(GroupName = "Trial")] + public class TaskMedicalReviewRuleService : BaseService, ITaskMedicalReviewRuleService + { + + private readonly IRepository _taskTaskMedicalReviewRuleRepository; + + public TaskMedicalReviewRuleService(IRepository taskTaskMedicalReviewRuleRepository) + { + _taskTaskMedicalReviewRuleRepository = taskTaskMedicalReviewRuleRepository; + } + + + [HttpPost] + public async Task> GetTaskMedicalReviewRuleList(TaskMedicalReviewRuleQuery inQuery) + { + + + var taskTaskMedicalReviewRuleQueryable = _taskTaskMedicalReviewRuleRepository.Where(t => t.TrialId == inQuery.TrialId) + .ProjectTo(_mapper.ConfigurationProvider); + + return await taskTaskMedicalReviewRuleQueryable.ToListAsync(); + } + + [HttpPost] + public async Task AddOrUpdateTaskMedicalReviewRule(TaskMedicalReviewRuleAddOrEdit addOrEditTaskTaskMedicalReviewRule) + { + + var entity = await _taskTaskMedicalReviewRuleRepository.InsertOrUpdateAsync(addOrEditTaskTaskMedicalReviewRule, true); + + return ResponseOutput.Ok(entity.Id.ToString()); + + } + + + [HttpDelete("{taskMedicalReviewRuleId:guid}")] + public async Task DeleteTaskMedicalReviewRule(Guid taskTaskMedicalReviewRuleId) + { + var success = await _taskTaskMedicalReviewRuleRepository.DeleteFromQueryAsync(t => t.Id == taskTaskMedicalReviewRuleId); + + return ResponseOutput.Ok(); + } + + + } +} diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 4098de072..0f8e9369d 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -197,7 +197,7 @@ namespace IRaCIS.Core.Application.Service /// - /// 一致性分析列表 (一致性分析 最后勾选 产生的任务) + /// 一致性分析列表 (自身 组内 最后勾选 产生的任务) /// /// /// @@ -256,6 +256,8 @@ namespace IRaCIS.Core.Application.Service TaskCode = c.TaskCode, TaskName = c.TaskName, TaskState = c.TaskState, + ArmEnum=c.ArmEnum, + SubjectId=c.SubjectId, TrialId = c.TrialId }).ToList(), diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index b3df35a3b..a6d1d8120 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -165,6 +165,25 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.DoctorUserId, t => t.MapFrom(u => u.Id)) .ForMember(o => o.FullName, t => t.MapFrom(u => u.FullName)); + CreateMap().IncludeMembers(t => t.VisitTask) + .ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.VisitTask.DoctorUser)) + .ForMember(o => o.MedicalManagerUser, t => t.MapFrom(u => u.MedicalManagerUser)); + CreateMap(); + + CreateMap() + .ForMember(o => o.UserCode, t => t.MapFrom(u => u.UserCode)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.FullName)) + .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.UserTypeRole.UserTypeShortName)); + + + + CreateMap(); + + CreateMap(); + + + } } diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs new file mode 100644 index 000000000..bfa6b6145 --- /dev/null +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -0,0 +1,86 @@ + +//-------------------------------------------------------------------- +// 此代码由T4模板自动生成 byzhouhang 20210918 +// 生成时间 2022-06-29 10:56:50 +// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 +using System; +using IRaCIS.Core.Domain.Share; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +namespace IRaCIS.Core.Domain.Models +{ + /// + ///TaskMedicalReview + /// + [Table("TaskMedicalReview")] + public class TaskMedicalReview :Entity, IAuditUpdate, IAuditAdd + { + + + /// + /// CreateUserId + /// + [Required] + public Guid CreateUserId { get; set; } + + /// + /// CreateTime + /// + [Required] + public DateTime CreateTime { get; set; } + + /// + /// UpdateTime + /// + [Required] + public DateTime UpdateTime { get; set; } + + /// + /// UpdateUserId + /// + [Required] + public Guid UpdateUserId { get; set; } + + /// + /// AllocateTime + /// + public DateTime? AllocateTime { get; set; } + + /// + /// AuditState + /// + [Required] + public int AuditState { get; set; } + + /// + /// AuditSuggestion + /// + [Required] + public string AuditSuggestion { get; set; } + + /// + /// AuditSignTime + /// + public DateTime? AuditSignTime { get; set; } + + /// + /// DoctorUserIdeaEnum + /// + public int DoctorUserIdeaEnum { get; set; } + + /// + /// MedicalManagerUserId + /// + public Guid? MedicalManagerUserId { get; set; } + + public User MedicalManagerUser { get; set; } + + public Guid VisitTaskId { get; set; } + + [ForeignKey("VisitTaskId")] + public VisitTask VisitTask { get; set; } + + + } + +} diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs new file mode 100644 index 000000000..057a5e3ee --- /dev/null +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReviewRule.cs @@ -0,0 +1,95 @@ + +//-------------------------------------------------------------------- +// 此代码由T4模板自动生成 byzhouhang 20210918 +// 生成时间 2022-06-29 13:32:34 +// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 +using System; +using IRaCIS.Core.Domain.Share; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +namespace IRaCIS.Core.Domain.Models +{ + /// + ///TaskTaskMedicalReviewRule + /// + [Table("TaskMedicalReviewRule")] + public class TaskMedicalReviewRule : Entity, IAuditUpdate, IAuditAdd + { + + + + /// + /// CreateUserId + /// + [Required] + public Guid CreateUserId { get; set; } + + /// + /// CreateTime + /// + [Required] + public DateTime CreateTime { get; set; } + + /// + /// UpdateTime + /// + [Required] + public DateTime UpdateTime { get; set; } + + /// + /// UpdateUserId + /// + [Required] + public Guid UpdateUserId { get; set; } + + /// + /// DoctorUserId + /// + [Required] + public Guid DoctorUserId { get; set; } + + /// + /// IsEnable + /// + [Required] + public bool IsEnable { get; set; } + + /// + /// Note + /// + [Required] + public string Note { get; set; } + + /// + /// TrialId + /// + [Required] + public Guid TrialId { get; set; } + + /// + /// PlanVisitCount + /// + [Required] + public int PlanVisitCount { get; set; } + + /// + /// PlanJudgeCount + /// + [Required] + public int PlanJudgeCount { get; set; } + + /// + /// PlanGlobalCount + /// + [Required] + public int PlanGlobalCount { get; set; } + + /// + /// PlanTumorCount + /// + [Required] + public int PlanTumorCount { get; set; } + + } + +} diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index 0bb998ef4..0e89c3aa6 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -577,6 +577,12 @@ namespace IRaCIS.Core.Infra.EFCore public virtual DbSet VisitTaskReReading { get; set; } + public virtual DbSet TaskMedicalReview { get; set; } + + public virtual DbSet TaskMedicalReviewRule { get; set; } + + + } diff --git a/IRaCIS.Core.Test/DbHelper.ttinclude b/IRaCIS.Core.Test/DbHelper.ttinclude index c64a83f85..4611c41b3 100644 --- a/IRaCIS.Core.Test/DbHelper.ttinclude +++ b/IRaCIS.Core.Test/DbHelper.ttinclude @@ -4,7 +4,7 @@ public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true"; public static readonly string DbDatabase = "IRaCIS_New_Tet"; //ַ,ƴ - public static readonly string TableName = "ReadingJudgeInfo"; + public static readonly string TableName = "TaskTaskMedicalReviewRule"; //ļ service Ƿҳ } #> diff --git a/IRaCIS.Core.Test/ModelAuto.ttinclude b/IRaCIS.Core.Test/ModelAuto.ttinclude index 5933972f6..b7ab0a374 100644 --- a/IRaCIS.Core.Test/ModelAuto.ttinclude +++ b/IRaCIS.Core.Test/ModelAuto.ttinclude @@ -1,5 +1,5 @@ <#@ assembly name="System.Core"#> -<#@ assembly name="EnvDTE"#> +<#@ assembly name="Microsoft.VisualStudio.Interop"#> <#@ import namespace="System.Collections.Generic"#> <#@ import namespace="System.IO"#> <#@ import namespace="System.Text"#> @@ -91,7 +91,7 @@ class VSManagementStrategy : ManagementStrategy if (hostServiceProvider == null) throw new ArgumentNullException("Could not obtain hostServiceProvider"); - EnvDTE.DTE dte = (EnvDTE.DTE)hostServiceProvider.GetService(typeof(EnvDTE.DTE)); + EnvDTE.DTE dte = (EnvDTE.DTE)hostServiceProvider.GetCOMService(typeof(EnvDTE.DTE)); if (dte == null) throw new ArgumentNullException("Could not obtain DTE from host"); diff --git a/IRaCIS.Core.Test/TT_Template/IRaCIS.Core.Dto.cs b/IRaCIS.Core.Test/TT_Template/IRaCIS.Core.Dto.cs index e02abfc9b..cb03b0051 100644 --- a/IRaCIS.Core.Test/TT_Template/IRaCIS.Core.Dto.cs +++ b/IRaCIS.Core.Test/TT_Template/IRaCIS.Core.Dto.cs @@ -1 +1,8 @@  + + + + + + +