修改一版
parent
931f51583d
commit
d40696071b
|
@ -1,90 +0,0 @@
|
|||
//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;
|
||||
//using IRaCIS.Core.Application.Contracts;
|
||||
|
||||
//namespace IRaCIS.Application.Services
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 临床数据 原表
|
||||
// /// </summary>
|
||||
// [ApiExplorerSettings(GroupName = "Reading")]
|
||||
// public class PreviousPDFService : BaseService
|
||||
// {
|
||||
|
||||
// public IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
// private readonly IRepository<PreviousPDF> _previousPDFRepository;
|
||||
|
||||
// public PreviousPDFService(IRepository<SubjectVisit> subjectVisitRepository,
|
||||
// IRepository<PreviousPDF> PreviousPDFRepository
|
||||
// )
|
||||
// {
|
||||
// _subjectVisitRepository = subjectVisitRepository;
|
||||
// _previousPDFRepository = PreviousPDFRepository;
|
||||
|
||||
// }
|
||||
|
||||
// #region 历史 接口名暂未修改
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// 新增或者修改
|
||||
// /// </summary>
|
||||
// /// <param name="addOrEditPreviousPDF"></param>
|
||||
// /// <returns></returns>
|
||||
// [HttpPost]
|
||||
// public async Task<IResponseOutput> AddOrUpdateReadingPreviousPDF(PreviousPDFAddOrEdit addOrEditPreviousPDF)
|
||||
// {
|
||||
// var entity = await _repository.InsertOrUpdateAsync<PreviousPDF, PreviousPDFAddOrEdit>(addOrEditPreviousPDF, true);
|
||||
// return ResponseOutput.Ok(entity.Id.ToString());
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// 获取
|
||||
// /// </summary>
|
||||
// /// <param name="query"></param>
|
||||
// /// <returns></returns>
|
||||
// [HttpPost]
|
||||
// public async Task<dynamic> GetPreviousPDFList(PreviousPDFInDto inDto)
|
||||
// {
|
||||
// var list= await _previousPDFRepository.AsQueryable().Where(x => x.TrialId == inDto.TrialId)
|
||||
// .Where(x => (x.ClinicalLevel == ClinicalLevel.Subject && x.SubjectId == inDto.SubjectId) || x.SubjectVisitId == inDto.VisitOrReadId)
|
||||
// .Select(x=>new {
|
||||
// x.Path,
|
||||
// x.DataType,
|
||||
// x.CreateTime,
|
||||
// x.ClinicalLevel,
|
||||
// x.FileName,
|
||||
// x.UploadType,
|
||||
// x.Id,
|
||||
// }).ToListAsync();
|
||||
// return list;
|
||||
// }
|
||||
|
||||
|
||||
// #endregion
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// 删除
|
||||
// /// </summary>
|
||||
// /// <param name="previousPDFId"></param>
|
||||
// /// <returns></returns>
|
||||
// [HttpDelete("{previousPDFId:guid}")]
|
||||
// public async Task<IResponseOutput> DeletePreviousPDF(Guid previousPDFId)
|
||||
// {
|
||||
// var success = await _previousPDFRepository.DeleteFromQueryAsync(t => t.Id == previousPDFId,true);
|
||||
// return ResponseOutput.Result(true);
|
||||
// }
|
||||
// }
|
||||
//}
|
|
@ -378,7 +378,7 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<List<GetSubjectReadVisitsOutDto>> GetSubjectReadVisitList(GetSubjectReadVisitsInDto inDto)
|
||||
{
|
||||
var maxReadVisit = await _readModuleRepository.Where(x => x.SubjectId == inDto.SubjectId&&x.ReadingSetType==inDto.ReadingSetType).OrderByDescending(x=>x.VisitNum).FirstOrDefaultAsync();
|
||||
var maxReadVisitNum= maxReadVisit==null?0:maxReadVisit.VisitNum;
|
||||
var maxReadVisitNum= maxReadVisit==null?-1:maxReadVisit.VisitNum;
|
||||
var visitQuery = _subjectVisitRepository.Where(x => x.SubjectId == inDto.SubjectId && x.LatestScanDate != null&&!x.IsLostVisit);
|
||||
var finalVisitNum = await visitQuery.Where(x => x.IsFinalVisit).Select(x => x.VisitNum).FirstOrDefaultAsync();
|
||||
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
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;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Application.Service.Reading;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// 阅片问题.标准
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Reading")]
|
||||
public class ReadingQuestionService : BaseService
|
||||
{
|
||||
|
||||
public IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
|
||||
private readonly IRepository<PreviousPDF> _previousPDFRepository;
|
||||
|
||||
public ReadingQuestionService(IRepository<SubjectVisit> subjectVisitRepository,
|
||||
|
||||
IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
|
||||
IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
|
||||
IRepository<PreviousPDF> previousPDFRepository
|
||||
)
|
||||
{
|
||||
_subjectVisitRepository = subjectVisitRepository;
|
||||
|
||||
_clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
|
||||
_clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
|
||||
this._previousPDFRepository = previousPDFRepository;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改
|
||||
/// </summary>
|
||||
/// <param name="indto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> AddOrUpdateReadingQuestionCriterionSystem(AddOrUpdateReadingQuestionCriterionSystemInDto indto)
|
||||
{
|
||||
var entity = await _clinicalDataTrialSetRepository.InsertOrUpdateAsync(indto,true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading
|
||||
{
|
||||
public class AddOrUpdateReadingQuestionCriterionSystemInDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准ID
|
||||
/// </summary>
|
||||
public Guid CriterionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准
|
||||
/// </summary>
|
||||
public string CriterionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
}
|
||||
}
|
|
@ -20,8 +20,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.SiteCodes, u => u.MapFrom(s => s.ReadingPeriodSites.Select(x => x.TrialSite.TrialSiteCode)))
|
||||
.ForMember(d => d.PlanCount, u => u.MapFrom(s => s.ReadingPeriodPlanList.Count));
|
||||
|
||||
|
||||
|
||||
CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
||||
// CreateMap<ReadingClinicalData, GetReadingClinicalDataListOutDto>()
|
||||
//.ForMember(d => d.ClinicalDataLevel, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataLevel))
|
||||
|
@ -29,15 +27,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
//.ForMember(d => d.ClinicalUploadType, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalUploadType));
|
||||
//.ForMember(d => d.FileCount, u => u.MapFrom(s => s.ReadingClinicalDataPDFList.Count()));
|
||||
|
||||
|
||||
|
||||
CreateMap<ReadingClinicalDataPDF, GetReadingClinicalDataPDFListOutDto>();
|
||||
|
||||
|
||||
//.ForMember(d => d.SiteNames, u => u.MapFrom(s => s.ReadingPeriodSites.SelectMany(x => x.Site.SiteName).ToList()));
|
||||
|
||||
|
||||
|
||||
CreateMap<ReadingClinicalData, AddOrUpdateReadingClinicalDataDto>().ReverseMap();
|
||||
|
||||
CreateMap<ReadingClinicalDataPDF, AddOrUpdateReadingClinicalDataPDFDto>().ReverseMap();
|
||||
|
@ -56,6 +50,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<ReadModuleAddOrEdit, ReadModule>();
|
||||
|
||||
#region 阅片问题
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using IRaCIS.Core.Domain.Share.Reading;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
/// 系统阅片标准
|
||||
///</summary>
|
||||
[Table("ReadingQuestionCriterionSystem")]
|
||||
public class ReadingQuestionCriterionSystem : Entity, IAuditAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// 标准ID
|
||||
/// </summary>
|
||||
public Guid CriterionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准
|
||||
/// </summary>
|
||||
public string CriterionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -182,6 +182,8 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
public virtual DbSet<ReadingClinicalData> ReadingClinicalData { get; set; }
|
||||
|
||||
public virtual DbSet<ReadingQuestionCriterionSystem> ReadingQuestionCriterionSystem { get; set; }
|
||||
|
||||
public virtual DbSet<ReadingClinicalDataView> ReadingClinicalDataView { get; set; }
|
||||
|
||||
public virtual DbSet<ReadingClinicalDataPDF> ReadingClinicalDataPDF { get; set; }
|
||||
|
|
Loading…
Reference in New Issue