修改一版
parent
cb3f6afc81
commit
241e7e93ef
|
@ -427,6 +427,41 @@
|
|||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataQuery.ExpirationVisit">
|
||||
<summary>
|
||||
截止访视
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataQuery.TrialId">
|
||||
<summary>
|
||||
项目ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataQuery.ReadingPeriodName">
|
||||
<summary>
|
||||
阅片期名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataQuery.PageIndex">
|
||||
<summary>
|
||||
页码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataQuery.PageSize">
|
||||
<summary>
|
||||
每页大小
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataQuery.SortField">
|
||||
<summary>
|
||||
排序字段
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataQuery.SortAsc">
|
||||
<summary>
|
||||
排序字段
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadModuleDto.PageIndex">
|
||||
<summary>
|
||||
页码
|
||||
|
@ -2520,6 +2555,27 @@
|
|||
<param name="password"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ClinicalDataService.AddOrUpdateClinicalDataService(IRaCIS.Core.Application.Service.Reading.Dto.ReadingPeriodSetAddOrEdit)">
|
||||
<summary>
|
||||
新增或者修改
|
||||
</summary>
|
||||
<param name="addOrEditReadingPeriodSet"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ClinicalDataService.GetReadingPeriodSetList(IRaCIS.Core.Application.Service.Reading.Dto.ReadingPeriodSetQuery)">
|
||||
<summary>
|
||||
分页获取
|
||||
</summary>
|
||||
<param name="query"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ClinicalDataService.DeleteReadingPeriodSet(System.Guid)">
|
||||
<summary>
|
||||
删除
|
||||
</summary>
|
||||
<param name="readingPeriodSetId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingPeriodSetService.AddOrUpdateReadingPeriodSet(IRaCIS.Core.Application.Service.Reading.Dto.ReadingPeriodSetAddOrEdit)">
|
||||
<summary>
|
||||
新增或者修改
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
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 ClinicalDataService : BaseService
|
||||
{
|
||||
|
||||
public IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<ClinicalData> _clinicalDataRepository;
|
||||
public ClinicalDataService(IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<ClinicalData> clinicalDataRepository
|
||||
)
|
||||
{
|
||||
_subjectVisitRepository = subjectVisitRepository;
|
||||
_clinicalDataRepository = clinicalDataRepository;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增或者修改
|
||||
/// </summary>
|
||||
/// <param name="addOrEditClinicalData"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> AddOrUpdateClinicalDataService(ClinicalDataAddOrEdit addOrEditClinicalData)
|
||||
{
|
||||
var entity = await _repository.InsertOrUpdateAsync<ClinicalData, ClinicalDataAddOrEdit>(addOrEditClinicalData, true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页获取
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<ClinicalDataView>> GetClinicalDataList(ClinicalDataQuery query)
|
||||
{
|
||||
|
||||
var readquery = _clinicalDataRepository.AsQueryable()
|
||||
.WhereIf(query.TrialId!=null,x=>x.TrialId==query.TrialId)
|
||||
|
||||
.ProjectTo<ClinicalDataView>(_mapper.ConfigurationProvider);
|
||||
var pageList= await readquery.ToPagedListAsync(query.PageIndex, query.PageSize, query.SortField == null ? "CreateTime" : query.SortField,
|
||||
query.SortAsc);
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="ClinicalDataId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ClinicalDataId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteClinicalData(Guid clinicalDataId)
|
||||
{
|
||||
var success = await _repository.BatchDeleteAsync<ClinicalData>(t => t.Id == clinicalDataId);
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
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 ClinicalDataAddOrEdit : ClinicalData
|
||||
{
|
||||
public new Guid? Id { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ClinicalDataView : ClinicalData
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class ClinicalDataQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 页码
|
||||
/// </summary>
|
||||
public int PageIndex { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 每页大小
|
||||
/// </summary>
|
||||
public int PageSize { get; set; } = 10;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
/// </summary>
|
||||
public string? SortField { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序字段
|
||||
/// </summary>
|
||||
public bool SortAsc { get; set; } = true;
|
||||
}
|
||||
}
|
|
@ -8,7 +8,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public class ReadingPeriodSetAddOrEdit : ReadingPeriodSet
|
||||
{
|
||||
}
|
||||
public new Guid? Id { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ReadingPeriodSetView : ReadingPeriodSet
|
||||
|
|
|
@ -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>
|
||||
/// 临床资料
|
||||
///</summary>
|
||||
[Table("ClinicalData")]
|
||||
public class ClinicalData : Entity, IAuditAdd
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受试者ID
|
||||
/// </summary>
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 访视或者阅片ID
|
||||
/// </summary>
|
||||
public Guid? VisitOrReadId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组类型
|
||||
/// </summary>
|
||||
public int? ScopeType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据类型
|
||||
/// </summary>
|
||||
public int? DataType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上传方式
|
||||
/// </summary>
|
||||
public int? UploadType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue