一致性核查文件名修改

Uat_Study
hang 2023-08-31 16:04:19 +08:00
parent 3c9b87ba01
commit 1912e1cfcd
10 changed files with 85 additions and 40 deletions

View File

@ -772,7 +772,7 @@ namespace IRaCIS.Core.API.Controllers
(serverFilePath, relativePath) = FileStoreHelper.GetTrialCheckFilePath(_hostEnvironment, fileName, trialId);
await _repository.AddAsync(new ConsistencyCheckFile()
await _repository.AddAsync(new UserUploadFile()
{
TrialId = trialId,
CreateTime = DateTime.Now,

View File

@ -212,6 +212,13 @@
<member name="M:IRaCIS.Core.API.Controllers.StudyController.ArchiveStudyNew(System.Guid,System.Guid,System.String,System.Nullable{System.Guid},System.Guid,Microsoft.Extensions.Logging.ILogger{IRaCIS.Core.API.Controllers.UploadDownLoadController},EasyCaching.Core.IEasyCachingProvider,IRaCIS.Core.Application.Contracts.IStudyService,Microsoft.AspNetCore.SignalR.IHubContext{IRaCIS.Core.API.UploadHub,IRaCIS.Core.API.IUploadClient},IRaCIS.Core.Application.Contracts.Dicom.IDicomArchiveService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.StudyMonitor})">
<summary>Dicom 归档</summary>
</member>
<member name="M:IRaCIS.Core.API.Controllers.StudyController.UploadNoneDicomFile(IRaCIS.Core.API.Controllers.StudyController.UploadNoneDicomFileCommand,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.StudyMonitor})">
<summary>
上传非Dicom 文件 支持压缩包 多文件上传
</summary>
<param name="_noneDicomStudyRepository"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.API.Controllers.StudyController.UploadVisitCheckExcel(System.Guid)">
<summary>
一致性核查 excel上传 支持三种格式

View File

@ -9251,37 +9251,37 @@
受试者ID
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetConsistencyCheckFileDto.FileName">
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetUserUploadFileDto.FileName">
<summary>
文件名称
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetConsistencyCheckFileDto.FilePath">
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetUserUploadFileDto.FilePath">
<summary>
文件路径
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetConsistencyCheckFileDto.RelativePath">
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetUserUploadFileDto.RelativePath">
<summary>
相对路径
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetConsistencyCheckFileDto.CreateUserId">
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetUserUploadFileDto.CreateUserId">
<summary>
创建人
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetConsistencyCheckFileDto.CreateTime">
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetUserUploadFileDto.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetConsistencyCheckFileDto.TrialId">
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetUserUploadFileDto.TrialId">
<summary>
项目ID
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetConsistencyCheckFileDto.CreateUserName">
<member name="P:IRaCIS.Core.Application.Contracts.DTO.GetUserUploadFileDto.CreateUserName">
<summary>
创建者名称
</summary>
@ -10412,7 +10412,7 @@
<param name="trialId"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Image.QA.QCListService.GetConsistencyCheckFile(IRaCIS.Core.Application.Contracts.DTO.GetConsistencyCheckFileInDto)">
<member name="M:IRaCIS.Core.Application.Image.QA.QCListService.GetUserUploadFile(IRaCIS.Core.Application.Contracts.DTO.GetUserUploadFileInDto)">
<summary>
获取一致性核查文件上传记录
</summary>

View File

@ -129,7 +129,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
}
public class GetConsistencyCheckFileDto/*: ConsistencyCheckFile*/
public class GetUserUploadFileDto/*: UserUploadFile*/
{
/// <summary>
/// 文件名称
@ -170,7 +170,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
}
public class GetConsistencyCheckFileInDto
public class GetUserUploadFileInDto
{
public Guid TrialId { get; set; }

View File

@ -19,7 +19,7 @@ namespace IRaCIS.Core.Application.Image.QA
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSet;
private readonly IRepository<TrialQCQuestionAnswer> _trialQCQuestionAnswerRepository;
private readonly IRepository<TrialQCQuestion> _trialQCQuestionRepository;
private readonly IRepository<ConsistencyCheckFile> _consistencyCheckFileRepository;
private readonly IRepository<UserUploadFile> _UserUploadFileRepository;
private IReadingImageTaskService _IReadingImageTaskService;
@ -30,14 +30,14 @@ namespace IRaCIS.Core.Application.Image.QA
IRepository<TrialQCQuestionAnswer> trialQCQuestionAnswerRepository,
IRepository<TrialQCQuestion> trialQCQuestionRepository,
IReadingImageTaskService IReadingImageTaskService,
IRepository<ConsistencyCheckFile> consistencyCheckFileRepository
IRepository<UserUploadFile> UserUploadFileRepository
)
{
this._IReadingImageTaskService = IReadingImageTaskService;
_subjectVisitRepository = subjectVisitRepository;
this._trialQCQuestionAnswerRepository = trialQCQuestionAnswerRepository;
this._trialQCQuestionRepository = trialQCQuestionRepository;
this._consistencyCheckFileRepository = consistencyCheckFileRepository;
this._UserUploadFileRepository = UserUploadFileRepository;
_trialRepository = trialRepository;
this._clinicalDataTrialSet = clinicalDataTrialSet;
}
@ -849,10 +849,10 @@ namespace IRaCIS.Core.Application.Image.QA
/// </summary>
/// <returns></returns>
[HttpPost]
public async Task<PageOutput<GetConsistencyCheckFileDto>> GetConsistencyCheckFile(GetConsistencyCheckFileInDto indto)
public async Task<PageOutput<GetUserUploadFileDto>> GetUserUploadFile(GetUserUploadFileInDto indto)
{
var query = _repository.Where<ConsistencyCheckFile>(t => t.TrialId == indto.TrialId)
.ProjectTo<GetConsistencyCheckFileDto>(_mapper.ConfigurationProvider);
var query = _repository.Where<UserUploadFile>(t => t.TrialId == indto.TrialId)
.ProjectTo<GetUserUploadFileDto>(_mapper.ConfigurationProvider);
return await query.ToPagedListAsync(indto.PageIndex, indto.PageSize, "CreateTime", false);
}

View File

@ -494,7 +494,7 @@ namespace IRaCIS.Core.Application.Service
;
// 一致性核查文件
CreateMap<ConsistencyCheckFile, GetConsistencyCheckFileDto>()
CreateMap<UserUploadFile, GetUserUploadFileDto>()
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.User.FirstName + "/" + t.User.LastName));

View File

@ -286,7 +286,7 @@ namespace IRaCIS.Application.Services
await _repository.BatchDeleteAsync<CheckChallengeDialog>(o => o.SubjectVisit.TrialId == trialId);
await _repository.BatchDeleteAsync<ClinicalDataTrialSet>(o => o.TrialId == trialId);
await _repository.BatchDeleteAsync<ConsistencyCheckFile>(o => o.TrialId == trialId);
await _repository.BatchDeleteAsync<UserUploadFile>(o => o.TrialId == trialId);
await _repository.BatchDeleteAsync<CriterionNidusSystem>(o => o.TrialReadingCriterion.TrialId == trialId);
await _repository.BatchDeleteAsync<DataInspection>(o => o.TrialId == trialId);
await _repository.BatchDeleteAsync<DicomStudy>(t => t.TrialId == trialId);

View File

@ -7,8 +7,8 @@ namespace IRaCIS.Core.Domain.Models
///<summary>
/// 一致性核查文件
///</summary>
[Table("ConsistencyCheckFile")]
public class ConsistencyCheckFile : Entity, IAuditAdd
[Table("UserUploadFile")]
public class UserUploadFile : Entity, IAuditAdd
{
/// <summary>
/// 文件名称
@ -42,14 +42,23 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public Guid TrialId { get; set; }
[JsonIgnore]
/// <summary>
[JsonIgnore]
/// <summary>
/// 创建人
/// </summary>
[ForeignKey("CreateUserId")]
public User User { get; set; }
public UploadScenarios UploadScenarios { get;set; }
}
public enum UploadScenarios
{
Check=0,
Site=1,
}
}

View File

@ -14,6 +14,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
namespace IRaCIS.Core.Infra.EFCore.Common
@ -794,7 +795,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
CreateUserName = _userInfo.UserName,
UserType = _userInfo.UserTypeShortName,
IsSigned = entity.ConfirmTime!=null, // 是否签署 添加了就是签署了
IsSigned = entity.ConfirmTime != null, // 是否签署 添加了就是签署了
});
}
@ -935,7 +936,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
ToUserTypes = configUserTypeList.Where(t => t.EmailUserType == EmailUserType.To).Select(t => t.UserType).ToList(),
CopyUserTypes = configUserTypeList.Where(t => t.EmailUserType == EmailUserType.Copy).Select(t => t.UserType).ToList(),
BlackUserIds = blackUserIdList
}) ;
});
}
@ -994,7 +995,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
#region 附加评估
#endregion
#region 医学审核
@ -1011,7 +1012,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var questionIdList = list.Select(t => t.ReadingMedicineQuestionId).ToList();
var questionNameList = await _dbContext.ReadingMedicineTrialQuestion.Where(x => questionIdList.Contains(x.Id)).Select(t => new { t.QuestionName, ReadingMedicineQuestionId = t.Id, t.ShowOrder }).ToListAsync();
var questionNameList = await _dbContext.ReadingMedicineTrialQuestion.Where(x => questionIdList.Contains(x.Id)).Select(t => new { t.QuestionName, ReadingMedicineQuestionId = t.Id, t.ShowOrder }).ToListAsync();
var firstEntity = list.FirstOrDefault();
@ -1160,7 +1161,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var trialQuestionIdList = list.Select(t => t.TrialQCQuestionConfigureId);
var trialQuestionNameList = await _dbContext.TrialQCQuestionConfigure.Where(x => x.TrialId == firstEntity.TrialId).Select(t => new { t.QuestionName, TrialQCQuestionConfigureId = t.Id, t.ShowOrder }).ToListAsync();
var trialQuestionNameList = await _dbContext.TrialQCQuestionConfigure.Where(x => x.TrialId == firstEntity.TrialId).Select(t => new { t.QuestionName, TrialQCQuestionConfigureId = t.Id, t.ShowOrder }).ToListAsync();
var beforeAnswerList = await _dbContext.TrialQCQuestionAnswer.Where(x => x.SubjectVisitId == firstEntity.SubjectVisitId && x.CurrentQCEnum == firstEntity.CurrentQCEnum && x.QCProcessEnum == firstEntity.QCProcessEnum)
.Select(u => new { u.TrialQCQuestionConfigureId, u.Answer }).ToListAsync();
@ -1356,11 +1357,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
// 一致性核查文件 是否需要单独一个表记录?
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ConsistencyCheckFile)))
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(UserUploadFile)))
{
var type = GetEntityAuditOpt(item);
await InsertInspection<ConsistencyCheckFile>(item.Entity as ConsistencyCheckFile, type, x => new InspectionConvertDTO()
await InsertInspection<UserUploadFile>(item.Entity as UserUploadFile, type, x => new InspectionConvertDTO()
{
ObjectRelationParentId = x.TrialId
@ -1840,7 +1841,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
Type = ClinicalFileType.PreviousOther
});
}
#endregion
#region 阅片人入组
@ -1853,6 +1854,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//系统临床数据配置
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ClinicalDataSystemSet)))
@ -1881,6 +1883,33 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{
extraIdentification = "/ConfirmSelect";
}
if (_userInfo.RequestUrl == "ClinicalDataSet/applyTrialClinical" )
{
extraIdentification = "/SaveTemplate";
var list = await _dbContext.TrialClinicalQuestion.Where(x => x.TrialClinicalId == entity.Id)
.Select(t => new
{
t.QuestionEnName,
t.QuestionName,
GroupNameCN = t.GroupQuestin.QuestionName,
GroupName = t.GroupQuestin.QuestionEnName,
t.ClinicalQuestionType,
t.ClinicalQuestionShowEnum,
t.TypeValue,
t.IsRequired
}).ToListAsync();
await InsertInspection<ClinicalDataTrialSet>(entity, type, x => new InspectionConvertDTO()
{
IsDistinctionInterface = false,
ExtraIndentification = extraIdentification
}, new { QuestionList = list });
continue;
}
//获取配置的标准名称
@ -2070,7 +2099,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
case "VisitTask/ConfirmReReading":
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager )
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
{
extraIdentification = "/" + 1;
}
@ -2109,7 +2138,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//一致性分析规则
#endregion
@ -2533,11 +2562,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var type = GetEntityAuditOpt(item);
var entity = item.Entity as PIAudit;
await InsertInspection<PIAudit>(item.Entity as PIAudit, type, x => new InspectionConvertDTO()
{
ObjectRelationParentId = entity.VisitTaskId,
IsDistinctionInterface=true
IsDistinctionInterface = true
});
}
@ -2602,7 +2631,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//同意重阅
case "VisitTask/ConfirmReReading":
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager )
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
{
type = type + "/" + 1;
@ -2780,7 +2809,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var generalId = (inspection.GeneralId != null && inspection.GeneralId != Guid.Empty) ? inspection.GeneralId : entityObj.Id;
inspection.GeneralId = generalId;
inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine) + inspection.ExtraIndentification;
inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine) + inspection.ExtraIndentification;
//将实体对象属性 映射到稽查实体
MapEntityPropertyToAuditEntity(entityObj, inspection);
@ -2989,7 +3018,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
/// 获取稽查记录的标识符 部分业务会进行特殊处理
/// </summary>
/// <returns></returns>
public string GetInspectionRecordIdentification<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false)
public string GetInspectionRecordIdentification<T>(T entityObj, string type, bool IsDistinctionInterface = true, bool isSelfDefine = false)
{
var entityTypeName = entityObj.GetType().Name;

View File

@ -467,7 +467,7 @@ namespace IRaCIS.Core.Infra.EFCore
public virtual DbSet<FrontAuditConfig> FrontAuditConfig { get; set; }
public virtual DbSet<ConsistencyCheckFile> ConsistencyCheckFile { get; set; }
public virtual DbSet<UserUploadFile> UserUploadFile { get; set; }
public virtual DbSet<CommonDocument> CommonDocument { get; set; }