修改一版
parent
f8958dfc21
commit
24aa7167b7
|
@ -24,6 +24,7 @@ namespace IRaCIS.Core.API
|
||||||
{
|
{
|
||||||
//此处的Name 是控制器上分组的名称 Title是界面的大标题
|
//此处的Name 是控制器上分组的名称 Title是界面的大标题
|
||||||
//分组
|
//分组
|
||||||
|
|
||||||
options.SwaggerDoc("Reviewer", new OpenApiInfo {Title = "医生模块",Version = "Reviewer", });
|
options.SwaggerDoc("Reviewer", new OpenApiInfo {Title = "医生模块",Version = "Reviewer", });
|
||||||
options.SwaggerDoc("Trial", new OpenApiInfo { Title = "项目模块", Version = "Trial" });
|
options.SwaggerDoc("Trial", new OpenApiInfo { Title = "项目模块", Version = "Trial" });
|
||||||
options.SwaggerDoc("Enroll", new OpenApiInfo { Title = "入组模块", Version = "Enroll" });
|
options.SwaggerDoc("Enroll", new OpenApiInfo { Title = "入组模块", Version = "Enroll" });
|
||||||
|
|
|
@ -2431,6 +2431,11 @@
|
||||||
<param name="password"></param>
|
<param name="password"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.ReadModuleService.GetReadModule(IRaCIS.Core.Application.Service.Reading.Dto.GetReadModuleDto)">
|
||||||
|
<summary>
|
||||||
|
添加或更新项目医生项目价格
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Application.Services.StatisticsService">
|
<member name="T:IRaCIS.Application.Services.StatisticsService">
|
||||||
<summary>
|
<summary>
|
||||||
Dashboard统计、全局工作量统计、入组两个维度统计(按照项目、按照人)
|
Dashboard统计、全局工作量统计、入组两个维度统计(按照项目、按照人)
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
using IRaCIS.Core.Domain.Share.Reading;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
{
|
||||||
|
public class GetReadModuleDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetReadModuleOutDto: ReadModule
|
||||||
|
{
|
||||||
|
public string SubjectCode { get; set; }
|
||||||
|
|
||||||
|
public string SiteCode { get; set; }
|
||||||
|
|
||||||
|
public Guid? SiteId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetReadModuleDtoOut
|
||||||
|
{
|
||||||
|
public string SubjectCode { get; set; }
|
||||||
|
|
||||||
|
public string SiteCode { get; set; }
|
||||||
|
|
||||||
|
public Guid? SiteId { get; set; }
|
||||||
|
|
||||||
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
|
public List<GetReadModuleOutDto> Data { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
using IRaCIS.Application.Interfaces;
|
||||||
|
using IRaCIS.Core.Infra.EFCore;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using IRaCIS.Core.Application.Filter;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using IRaCIS.Core.Application.Service.WorkLoad.DTO;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using IRaCIS.Core.Application.Auth;
|
||||||
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
|
using IRaCIS.Core.Domain.Share.Reading;
|
||||||
|
|
||||||
|
namespace IRaCIS.Application.Services
|
||||||
|
{
|
||||||
|
[ApiExplorerSettings(GroupName = "Reading")]
|
||||||
|
public class ReadModuleService : BaseService
|
||||||
|
{
|
||||||
|
|
||||||
|
public IRepository<SubjectVisit> _subjectVisitRepository;
|
||||||
|
public ReadModuleService(IRepository<SubjectVisit> subjectVisitRepository
|
||||||
|
)
|
||||||
|
{
|
||||||
|
_subjectVisitRepository = subjectVisitRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加或更新项目医生项目价格
|
||||||
|
/// </summary>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetReadModuleDtoOut>> GetReadModule(GetReadModuleDto dto)
|
||||||
|
{
|
||||||
|
var visits = await _subjectVisitRepository.Where(x => x.TrialId == dto.TrialId).Include(x=>x.Subject).Include(x => x.Site)
|
||||||
|
.Select(x=>new GetReadModuleOutDto ()
|
||||||
|
{
|
||||||
|
CreateTime=x.CreateTime,
|
||||||
|
Id=x.Id,
|
||||||
|
SubjectId=x.SubjectId,
|
||||||
|
SubjectVisitId=x.Id,
|
||||||
|
IsUrgent=x.IsUrgent,
|
||||||
|
ModuleName= x.InPlan?"计划内访视":"计划外访视",
|
||||||
|
ModuleType= x.InPlan? ModuleTypeEnum.InPlanSubjectVisit: ModuleTypeEnum.OutPlanSubjectVisit,
|
||||||
|
SubjectCode=x.Subject.Code,
|
||||||
|
SiteCode=x.Site.SiteCode,
|
||||||
|
SiteId=x.Site.Id,
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
var data = visits.GroupBy(x => new { x.SiteId, x.SubjectId, x.SiteCode, x.SubjectCode }).Select(x => new GetReadModuleDtoOut()
|
||||||
|
{
|
||||||
|
|
||||||
|
SiteCode = x.Key.SiteCode,
|
||||||
|
SiteId = x.Key.SiteId,
|
||||||
|
SubjectCode = x.Key.SubjectCode,
|
||||||
|
SubjectId = x.Key.SubjectId,
|
||||||
|
Data = x.ToList().OrderBy(y => y.ModuleType).ToList(),
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Domain.Share.Reading
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 模块枚举
|
||||||
|
/// </summary>
|
||||||
|
public enum ModuleTypeEnum
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 计划内访视
|
||||||
|
/// </summary>
|
||||||
|
InPlanSubjectVisit=0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 计划外访视
|
||||||
|
/// </summary>
|
||||||
|
OutPlanSubjectVisit = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 阅片期
|
||||||
|
/// </summary>
|
||||||
|
Read = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 裁判
|
||||||
|
/// </summary>
|
||||||
|
Referee = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 肿瘤学
|
||||||
|
/// </summary>
|
||||||
|
Oncology = 4,
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using IRaCIS.Core.Domain.Share.Reading;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Domain.Models
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///ReadModule
|
||||||
|
///</summary>
|
||||||
|
[Table("ReadModule")]
|
||||||
|
public class ReadModule : Entity, IAuditAdd
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 受试者ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模块类型
|
||||||
|
/// </summary>
|
||||||
|
public ModuleTypeEnum ModuleType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模块名称
|
||||||
|
/// </summary>
|
||||||
|
public string ModuleName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否加急
|
||||||
|
/// </summary>
|
||||||
|
public bool? IsUrgent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 访视ID
|
||||||
|
/// </summary>
|
||||||
|
public Guid? SubjectVisitId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 状态
|
||||||
|
/// </summary>
|
||||||
|
public int? Status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 创建人
|
||||||
|
/// </summary>
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue