Merge branch 'Test_HIR_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_HIR_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
3ee9703dca
|
|
@ -1713,6 +1713,11 @@
|
||||||
</summary>
|
</summary>
|
||||||
<typeparam name="T">泛型</typeparam>
|
<typeparam name="T">泛型</typeparam>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Inspection.DTO.GetDataInspectionOutDto.CriterionType">
|
||||||
|
<summary>
|
||||||
|
标准枚举
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Inspection.DTO.GetDataInspectionOutDto.ParentIdentification">
|
<member name="P:IRaCIS.Core.Application.Service.Inspection.DTO.GetDataInspectionOutDto.ParentIdentification">
|
||||||
<summary>
|
<summary>
|
||||||
父标识
|
父标识
|
||||||
|
|
@ -14468,6 +14473,11 @@
|
||||||
<member name="T:IRaCIS.Core.Application.ViewModel.FrontAuditConfigAddOrEdit">
|
<member name="T:IRaCIS.Core.Application.ViewModel.FrontAuditConfigAddOrEdit">
|
||||||
<summary> FrontAuditConfigAddOrEdit 列表查询参数模型</summary>
|
<summary> FrontAuditConfigAddOrEdit 列表查询参数模型</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.ViewModel.FrontAuditConfigAddOrEdit.ApplyCriterionList">
|
||||||
|
<summary>
|
||||||
|
适用的标准
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.ViewModel.FrontAuditConfigAddOrEdit.CodeEn">
|
<member name="P:IRaCIS.Core.Application.ViewModel.FrontAuditConfigAddOrEdit.CodeEn">
|
||||||
<summary>
|
<summary>
|
||||||
字段的英文值
|
字段的英文值
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,12 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public class FrontAuditConfigAddOrEdit
|
public class FrontAuditConfigAddOrEdit
|
||||||
{
|
{
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 适用的标准
|
||||||
|
/// </summary>
|
||||||
|
public List<CriterionType> ApplyCriterionList { get; set; } = new List<CriterionType>() { };
|
||||||
|
|
||||||
public string Value { get; set; } = string.Empty;
|
public string Value { get; set; } = string.Empty;
|
||||||
public string ValueCN { get; set; } = string.Empty;
|
public string ValueCN { get; set; } = string.Empty;
|
||||||
public string Description { get; set; } = string.Empty;
|
public string Description { get; set; } = string.Empty;
|
||||||
|
|
|
||||||
|
|
@ -360,7 +360,10 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||||
public string ModuleTypeName { get; set; } = string.Empty;
|
public string ModuleTypeName { get; set; } = string.Empty;
|
||||||
public string ModuleTypeNameCN { get; set; } = string.Empty;
|
public string ModuleTypeNameCN { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 标准枚举
|
||||||
|
/// </summary>
|
||||||
|
public CriterionType? CriterionType { get; set; }
|
||||||
public string SignText { get; set; } = string.Empty;
|
public string SignText { get; set; } = string.Empty;
|
||||||
|
|
||||||
public decimal? VisitNum { get; set; }
|
public decimal? VisitNum { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
IRepository<Dictionary> _dictionaryRepository,
|
IRepository<Dictionary> _dictionaryRepository,
|
||||||
IRepository<IdentityUser> _identityUserRepository,
|
IRepository<IdentityUser> _identityUserRepository,
|
||||||
IRepository<TrialSign> _trialSignRepository,
|
IRepository<TrialSign> _trialSignRepository,
|
||||||
|
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||||
IRepository<UserRole> _userRoleRepository,
|
IRepository<UserRole> _userRoleRepository,
|
||||||
IRepository<TrialSite> _trialSiteRepository,
|
IRepository<TrialSite> _trialSiteRepository,
|
||||||
IRepository<Trial> _trialRepository,
|
IRepository<Trial> _trialRepository,
|
||||||
|
|
@ -43,6 +44,9 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
join trial in _trialRepository.Where().IgnoreQueryFilters() on data.TrialId equals trial.Id into trialtemp
|
join trial in _trialRepository.Where().IgnoreQueryFilters() on data.TrialId equals trial.Id into trialtemp
|
||||||
from leftrial in trialtemp.DefaultIfEmpty()
|
from leftrial in trialtemp.DefaultIfEmpty()
|
||||||
|
|
||||||
|
join readingQuestionCriterionTrial in _readingQuestionCriterionTrialRepository.Where().IgnoreQueryFilters() on data.TrialReadingCriterionId equals readingQuestionCriterionTrial.Id into readingQuestionCriterionTrialtemp
|
||||||
|
from leftreadingQuestionCriterionTrial in readingQuestionCriterionTrialtemp.DefaultIfEmpty()
|
||||||
|
|
||||||
|
|
||||||
join trialSite in _trialSiteRepository.Where().IgnoreQueryFilters() on data.TrialSiteId equals trialSite.Id into trialSitetemp
|
join trialSite in _trialSiteRepository.Where().IgnoreQueryFilters() on data.TrialSiteId equals trialSite.Id into trialSitetemp
|
||||||
from lefttrialSite in trialSitetemp.DefaultIfEmpty()
|
from lefttrialSite in trialSitetemp.DefaultIfEmpty()
|
||||||
|
|
@ -95,6 +99,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
||||||
select new GetDataInspectionOutDto()
|
select new GetDataInspectionOutDto()
|
||||||
{
|
{
|
||||||
CreateTime = data.CreateTime,
|
CreateTime = data.CreateTime,
|
||||||
|
CriterionType= leftreadingQuestionCriterionTrial==null? null: leftreadingQuestionCriterionTrial.CriterionType,
|
||||||
CreateUserId = data.CreateUserId,
|
CreateUserId = data.CreateUserId,
|
||||||
ModuleTypeId = leftmoduleTypec.Id,
|
ModuleTypeId = leftmoduleTypec.Id,
|
||||||
BlindName = data.VisitTask.TaskBlindName,
|
BlindName = data.VisitTask.TaskBlindName,
|
||||||
|
|
|
||||||
|
|
@ -1570,14 +1570,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
QuestionMark.IsLymph,
|
QuestionMark.IsLymph,
|
||||||
};
|
};
|
||||||
|
|
||||||
tableAnswers.ForEach(x =>
|
|
||||||
{
|
|
||||||
x.Id = NewId.NextGuid();
|
|
||||||
x.RowIndex = newRowIndex;
|
|
||||||
x.VisitTaskId = inDto.VisitTaskId;
|
|
||||||
x.RowId = rowAnswer.Id;
|
|
||||||
x.Answer = needSaveMark.Contains(x.QuestionMark) ? x.Answer : string.Empty;
|
|
||||||
});
|
|
||||||
|
|
||||||
switch (taskInfo.TrialReadingCriterion.CriterionType)
|
switch (taskInfo.TrialReadingCriterion.CriterionType)
|
||||||
{
|
{
|
||||||
|
|
@ -1624,7 +1617,27 @@ namespace IRaCIS.Core.Application.Service
|
||||||
x.Answer = needSetNa.Contains(x.QuestionMark) ? "NA" : x.Answer;
|
x.Answer = needSetNa.Contains(x.QuestionMark) ? "NA" : x.Answer;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case CriterionType.mRECISTHCC:
|
||||||
|
needSaveMark = new List<QuestionMark?>()
|
||||||
|
{
|
||||||
|
QuestionMark.Organ,
|
||||||
|
QuestionMark.Location,
|
||||||
|
QuestionMark.Part,
|
||||||
|
QuestionMark.IsLymph,
|
||||||
|
QuestionMark.TypicalIntrahepaticLesion,
|
||||||
|
};
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tableAnswers.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.Id = NewId.NextGuid();
|
||||||
|
x.RowIndex = newRowIndex;
|
||||||
|
x.VisitTaskId = inDto.VisitTaskId;
|
||||||
|
x.RowId = rowAnswer.Id;
|
||||||
|
x.Answer = needSaveMark.Contains(x.QuestionMark) ? x.Answer : string.Empty;
|
||||||
|
});
|
||||||
await _readingTableAnswerRowInfoRepository.AddAsync(rowAnswer);
|
await _readingTableAnswerRowInfoRepository.AddAsync(rowAnswer);
|
||||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(_mapper.Map<List<ReadingTableQuestionAnswer>>(tableAnswers));
|
await _readingTableQuestionAnswerRepository.AddRangeAsync(_mapper.Map<List<ReadingTableQuestionAnswer>>(tableAnswers));
|
||||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.RowId, x => new ReadingTableAnswerRowInfo()
|
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.RowId, x => new ReadingTableAnswerRowInfo()
|
||||||
|
|
@ -1975,7 +1988,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var index = await _readingCalculateService.GetDeleteLesionStatrIndex(inDto);
|
var index = await _readingCalculateService.GetDeleteLesionStatrIndex(inDto);
|
||||||
|
|
||||||
|
|
||||||
await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.RowId == inDto.RowId, x => new ReadingTableQuestionAnswer()
|
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.RowId == inDto.RowId, x => new ReadingTableQuestionAnswer()
|
||||||
{
|
{
|
||||||
|
|
||||||
IsDeleted = true
|
IsDeleted = true
|
||||||
|
|
@ -3020,6 +3033,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == task.VisitTaskId && x.TaskState == TaskState.Effect && x.ReadingTaskState != ReadingTaskState.HaveSigned, x => new VisitTask()
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == task.VisitTaskId && x.TaskState == TaskState.Effect && x.ReadingTaskState != ReadingTaskState.HaveSigned, x => new VisitTask()
|
||||||
{
|
{
|
||||||
|
|
||||||
FirstReadingTime = DateTime.Now,
|
FirstReadingTime = DateTime.Now,
|
||||||
});
|
});
|
||||||
await _visitTaskRepository.SaveChangesAsync();
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
CreateMap<CopyTableAnswerRowInfo, ReadingTableAnswerRowInfo>().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
CreateMap<CopyTableAnswerRowInfo, ReadingTableAnswerRowInfo>().ForMember(dest => dest.CreateUserRole, opt => opt.Ignore());
|
||||||
|
|
||||||
CreateMap<ReadingTableAnswerRowInfo, CopyTableAnswerRowInfo>()
|
CreateMap<ReadingTableAnswerRowInfo, CopyTableAnswerRowInfo>()
|
||||||
.ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id));
|
.ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id))
|
||||||
|
.ForMember(d => d.LesionType, u => u.MapFrom(s => s.ReadingQuestionTrial.LesionType));
|
||||||
|
|
||||||
//.ForMember(dest => dest.Instance, opt => opt.Ignore())
|
//.ForMember(dest => dest.Instance, opt => opt.Ignore())
|
||||||
//.ForMember(dest => dest.ReadingQuestionTrial, opt => opt.Ignore());
|
//.ForMember(dest => dest.ReadingQuestionTrial, opt => opt.Ignore());
|
||||||
|
|
|
||||||
|
|
@ -382,6 +382,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
{
|
{
|
||||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
||||||
{
|
{
|
||||||
|
SubjectCriterionClaimUserId=_userInfo.UserRoleId,
|
||||||
ReadingTaskState = ReadingTaskState.Reading,
|
ReadingTaskState = ReadingTaskState.Reading,
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
using DocumentFormat.OpenXml.Office.SpreadSheetML.Y2023.MsForms;
|
using DocumentFormat.OpenXml.Office.SpreadSheetML.Y2023.MsForms;
|
||||||
|
using IRaCIS.Application.Contracts;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
using IRaCIS.Core.Application.Helper;
|
||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
|
@ -6,7 +9,11 @@ using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using MassTransit;
|
using MassTransit;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using MiniSoftware;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
{
|
{
|
||||||
|
|
@ -14,6 +21,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
[ApiExplorerSettings(GroupName = "Reading")]
|
[ApiExplorerSettings(GroupName = "Reading")]
|
||||||
public class MRECISTHCCCalculateService(IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository,
|
public class MRECISTHCCCalculateService(IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository,
|
||||||
IRepository<VisitTask> _visitTaskRepository,
|
IRepository<VisitTask> _visitTaskRepository,
|
||||||
|
IRepository<Subject> _subjectRepository,
|
||||||
|
IRepository<UserRole> _userRoleRepository,
|
||||||
|
IServiceProvider ServiceProvider,
|
||||||
|
IRepository<HIRHospital> _hIRHospitalRepository,
|
||||||
|
IRepository<DicomInstance> _dicomInstanceRepository,
|
||||||
|
IOptionsMonitor<SystemHospitalOption> _hospital,
|
||||||
|
IRepository<Dictionary> _dictionaryRepository,
|
||||||
|
IRepository<DicomStudy> _dicomStudyRepository,
|
||||||
|
IRepository<SubjectPatient> _subjectPatientRepository,
|
||||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||||
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository,
|
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository,
|
||||||
IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository,
|
IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository,
|
||||||
|
|
@ -26,6 +42,238 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ICriterionCalculateService
|
IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswerRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, ICriterionCalculateService
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取肿瘤评估报告
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<Stream> DownLoadTumorEvaluationStream(DownLoadReadReportInDto inDto)
|
||||||
|
{
|
||||||
|
var downFile = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{inDto.DownLoadGuid}");
|
||||||
|
Directory.CreateDirectory(downFile);
|
||||||
|
|
||||||
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId && x.ReadingCategory == ReadingCategory.Visit)
|
||||||
|
.Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||||
|
var visitInfo = await _subjectVisitRepository.Where(x => x.Id == taskinfo.SourceSubjectVisitId).Include(x => x.StudyList).FirstNotNullAsync();
|
||||||
|
var subjectInfo = await _subjectRepository.Where(x => x.Id == taskinfo.SubjectId).Include(x => x.Trial).Include(x => x.SubjectPatientList).FirstNotNullAsync();
|
||||||
|
var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync();
|
||||||
|
var trialQuestion = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync();
|
||||||
|
var tableQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync();
|
||||||
|
var dicotionCode = trialQuestion.Where(x => x.DictionaryCode != string.Empty).Select(x => x.DictionaryCode).Distinct().ToList();
|
||||||
|
dicotionCode.AddRange(tableQuestion.Where(x => x.DictionaryCode != string.Empty).Select(x => x.DictionaryCode).Distinct());
|
||||||
|
var dictionList = await _dictionaryRepository.Where(x => dicotionCode.Contains(x.Code)).Include(x => x.ChildList).ToListAsync();
|
||||||
|
var unitDictionary = await _dictionaryRepository.Where(x => x.Code == "ValueUnit").Include(x => x.ChildList).ToListAsync();
|
||||||
|
|
||||||
|
var relatedVisitTask = await ServiceProvider.GetService<IReadingImageTaskService>().GetRelatedVisitTask(new GetRelatedVisitTaskInDto()
|
||||||
|
{
|
||||||
|
VisitTaskId = inDto.VisitTaskId
|
||||||
|
});
|
||||||
|
|
||||||
|
var relatedTaskIds = relatedVisitTask.Item1.Select(x => x.VisitTaskId).ToList();
|
||||||
|
|
||||||
|
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => relatedTaskIds.Contains(x.VisitTaskId)).Include(x => x.ReadingQuestionTrial).ToListAsync();
|
||||||
|
|
||||||
|
var rowinfoList = await _readingTableAnswerRowInfoRepository.Where(x => relatedTaskIds.Contains(x.VisitTaskId)).Include(x => x.VisitTask).Include(x => x.ReadingQuestionTrial).ToListAsync();
|
||||||
|
|
||||||
|
var instanceIdList = rowinfoList.Select(x => x.InstanceId).ToList();
|
||||||
|
var instanceList = await _dicomInstanceRepository.Where(x => instanceIdList.Contains(x.Id)).Include(x => x.DicomSerie.DicomStudy).ToListAsync();
|
||||||
|
|
||||||
|
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => relatedTaskIds.Contains(x.VisitTaskId)).Include(x => x.ReadingQuestionTrial).Include(x => x.ReadingTableQuestionTrial).ToListAsync();
|
||||||
|
var taskinfoList = await _visitTaskRepository.Where(x => relatedTaskIds.Contains(x.Id))
|
||||||
|
.Include(x => x.SourceSubjectVisit).Include(x => x.SourceSubjectVisit.StudyList)
|
||||||
|
.Include(x => x.DoctorUser).ToListAsync();
|
||||||
|
|
||||||
|
List<ExportVisitData> exportVisitDatas = taskinfoList
|
||||||
|
.Select(x => new ExportVisitData()
|
||||||
|
{
|
||||||
|
VisitName = x.SourceSubjectVisit.VisitName,
|
||||||
|
VisitNum = x.VisitTaskNum,
|
||||||
|
CheckDate = string.Join(",", x.SourceSubjectVisit.StudyList.Where(x => x.StudyTime != null).Select(x => x.StudyTime.Value.ToString("yyyy-MM-dd"))),
|
||||||
|
CheckInfoList = x.SourceSubjectVisit.StudyList.Select(x => new DicomStudyInfo()
|
||||||
|
{
|
||||||
|
BodyPartExamined = x.BodyPartExamined,
|
||||||
|
Modalities = x.Modalities
|
||||||
|
}).ToList(),
|
||||||
|
HaveNewLesion = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.NewLesions),
|
||||||
|
TargetResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.TargetLesion),
|
||||||
|
NoTargetResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.NoTargetLesion),
|
||||||
|
OverallResult = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, x.Id, QuestionType.Tumor),
|
||||||
|
DoctorName = x.DoctorUser.LastName + x.DoctorUser.FirstName,
|
||||||
|
SignTime = x.SignTime?.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||||
|
VisitTargetInfoList = getLesionInfo(LesionType.TargetLesion, x.Id),
|
||||||
|
VisitNoTargetInfoList = getLesionInfo(LesionType.NonTargetLesions, x.Id),
|
||||||
|
}).OrderBy(x => x.VisitNum).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
#region 两个函数
|
||||||
|
List<VisitLesionInfo> getLesionInfo(LesionType lesionType, Guid Visittaskid)
|
||||||
|
{
|
||||||
|
var targetFocus = rowinfoList.Where(x => x.VisitTaskId == Visittaskid && x.ReadingQuestionTrial.LesionType == lesionType).OrderBy(x => x.RowIndex).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
var targetInfo = new List<VisitLesionInfo>();
|
||||||
|
|
||||||
|
int num = 1;
|
||||||
|
foreach (var item in targetFocus)
|
||||||
|
{
|
||||||
|
|
||||||
|
VisitLesionInfo target = new VisitLesionInfo
|
||||||
|
{
|
||||||
|
RowMark = rowinfoList.Where(x => x.VisitTaskId == Visittaskid && x.RowIndex == item.RowIndex && x.ReadingQuestionTrial.LesionType == lesionType).Select(x => x.RowMark).FirstIsNullReturnEmpty(),
|
||||||
|
Organ = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Organ, item.RowIndex),
|
||||||
|
Part = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, Visittaskid, lesionType, QuestionMark.Part, item.RowIndex),
|
||||||
|
Number = num,
|
||||||
|
StudyCode = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.DicomStudy.Code).FirstOrDefault(),
|
||||||
|
RowId = item.Id,
|
||||||
|
SeriesNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.DicomSerie.SeriesNumber).FirstOrDefault(),
|
||||||
|
InstanceNumber = instanceList.Where(x => x.Id == item.InstanceId).Select(x => x.InstanceNumber).FirstOrDefault(),
|
||||||
|
VisitLength = getStateInfo(item.VisitTaskId, item.RowIndex, lesionType),
|
||||||
|
};
|
||||||
|
targetInfo.Add(target);
|
||||||
|
num++;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (lesionType == LesionType.TargetLesion)
|
||||||
|
{
|
||||||
|
for (int i = num; i <= 5; i++)
|
||||||
|
{
|
||||||
|
VisitLesionInfo target = new VisitLesionInfo
|
||||||
|
{
|
||||||
|
Number = i,
|
||||||
|
};
|
||||||
|
targetInfo.Add(target);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return targetInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
decimal getStateInfo(Guid visitTaskid, decimal item, LesionType lesionType)
|
||||||
|
{
|
||||||
|
// 非淋巴结取长径 淋巴结取长短径
|
||||||
|
var state = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.State, item);
|
||||||
|
var majorAxis = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.MajorAxis, item, false);
|
||||||
|
|
||||||
|
var isLymph = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.IsLymph, item);
|
||||||
|
var shortAxis = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, visitTaskid, lesionType, QuestionMark.ShortAxis, item, false);
|
||||||
|
|
||||||
|
var result = string.Empty;
|
||||||
|
|
||||||
|
if (!majorAxis.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
result = majorAxis;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
result = shortAxis;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result.IsNullOrEmptyReturn0();
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
var researchProgramNo = subjectInfo.Trial.ResearchProgramNo;
|
||||||
|
var subjectName = subjectInfo.ShortName;
|
||||||
|
var subjectCode = subjectPatientList.Select(x => x.Patient).OrderByDescending(x => x.CreateTime).Select(x => x.PatientIdStr).FirstIsNullReturnEmpty();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<ExportTumorEvaluationInfo> resultdata = new List<ExportTumorEvaluationInfo>();
|
||||||
|
List<string> times = new List<string>() { "One", "Two", "Three" };
|
||||||
|
List<string> columns = new List<string>() { "VisitName", "CheckDate", "CheckInfoStr", "HaveNewLesion", "TargetResult", "NoTargetResult", "OverallResult", "DoctorSignTime" };
|
||||||
|
|
||||||
|
var forCount = (int)Math.Ceiling((double)exportVisitDatas.Count() / 3);
|
||||||
|
for (int i = 0; i < forCount; i++)
|
||||||
|
{
|
||||||
|
ExportTumorEvaluationInfo export = new ExportTumorEvaluationInfo
|
||||||
|
{
|
||||||
|
ResearchProgramNo = researchProgramNo,
|
||||||
|
SubjectName = subjectName,
|
||||||
|
SubjectCode = subjectCode,
|
||||||
|
VisitList = exportVisitDatas.Skip(i * 3).Take(3).ToList(),
|
||||||
|
};
|
||||||
|
|
||||||
|
export.Lesion = new ExportData()
|
||||||
|
{
|
||||||
|
OneTargetSum = export.VisitOne.TargetSum.ToString(),
|
||||||
|
TwoTargetSum = export.VisitTwo.VisitTargetInfoList.Count() > 0 ? export.VisitTwo.TargetSum.ToString() : string.Empty,
|
||||||
|
ThreeTargetSum = export.VisitThree.VisitTargetInfoList.Count() > 0 ? export.VisitThree.TargetSum.ToString() : string.Empty,
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
foreach (var time in times)
|
||||||
|
{
|
||||||
|
foreach (var column in columns)
|
||||||
|
{
|
||||||
|
_generalCalculateService.SetPropertyDynamically(export.Lesion, column, export, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i >= forCount - 1)
|
||||||
|
{
|
||||||
|
export.IsLastPage = true;
|
||||||
|
// 之后最后一个任务需要签名
|
||||||
|
var thisVisitListNum = export.VisitList.Count();
|
||||||
|
switch (thisVisitListNum)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
export.Lesion.OneDoctorSign = "签字:";
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
export.Lesion.TwoDoctorSign = "签字:";
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
export.Lesion.ThreeDoctorSign = "签字:";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
resultdata.Add(export);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
var value = new
|
||||||
|
{
|
||||||
|
VisitTaskList = resultdata,
|
||||||
|
IsLastPage = false,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
var templatePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"wwwroot/ReadReoprtTemplate/TumorEvaluation_RECIST1.1_CN_V1.docx");
|
||||||
|
var outputFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{inDto.DownLoadGuid}.docx");
|
||||||
|
|
||||||
|
|
||||||
|
MiniWord.SaveAsByTemplate(outputFilePath, templatePath, value);
|
||||||
|
|
||||||
|
|
||||||
|
//// 获取文件夹中的所有文件路径
|
||||||
|
Directory.Delete(downFile, true);
|
||||||
|
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
|
{
|
||||||
|
Stream stream = _generalCalculateService.ReadAndReturnStream(outputFilePath);
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
var pdfurl = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"wwwroot/ReadReoprtTemplate/downLoad");
|
||||||
|
FileConvertHelper.ConvertWordToPdf(outputFilePath, pdfurl);
|
||||||
|
Stream stream = _generalCalculateService.ReadAndReturnStream(pdfurl + $"/{inDto.DownLoadGuid}.pdf");
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 下载阅片报告
|
/// 下载阅片报告
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -33,12 +281,229 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<Stream> DownLoadReadReportStream(DownLoadReadReportInDto inDto)
|
public async Task<Stream> DownLoadReadReportStream(DownLoadReadReportInDto inDto)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingCalculate_DownLoadReadReport"]);
|
var downFile = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{inDto.DownLoadGuid}");
|
||||||
}
|
Directory.CreateDirectory(downFile);
|
||||||
|
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId && x.ReadingCategory == ReadingCategory.Visit)
|
||||||
|
.Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||||
|
var visitInfo = await _subjectVisitRepository.Where(x => x.Id == taskinfo.SourceSubjectVisitId).Include(x => x.StudyList).FirstNotNullAsync();
|
||||||
|
var subjectInfo = await _subjectRepository.Where(x => x.Id == taskinfo.SubjectId).Include(x => x.SubjectPatientList).FirstNotNullAsync();
|
||||||
|
var doctor = await _userRoleRepository.Where(x => x.Id == taskinfo.DoctorUserId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
public async Task<Stream> DownLoadTumorEvaluationStream(DownLoadReadReportInDto inDto)
|
var trialQuestion = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync();
|
||||||
{
|
var tableQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync();
|
||||||
throw new BusinessValidationFailedException(_localizer["ReadingCalculate_DownLoadReadReport"]);
|
var dicotionCode = trialQuestion.Where(x => x.DictionaryCode != string.Empty).Select(x => x.DictionaryCode).Distinct().ToList();
|
||||||
|
dicotionCode.AddRange(tableQuestion.Where(x => x.DictionaryCode != string.Empty).Select(x => x.DictionaryCode).Distinct());
|
||||||
|
var dictionList = await _dictionaryRepository.Where(x => dicotionCode.Contains(x.Code)).Include(x => x.ChildList).ToListAsync();
|
||||||
|
List<Guid> taskIds = new List<Guid>() { };
|
||||||
|
var relatedVisitTask = await ServiceProvider.GetService<IReadingImageTaskService>().GetRelatedVisitTask(new GetRelatedVisitTaskInDto()
|
||||||
|
{
|
||||||
|
VisitTaskId = inDto.VisitTaskId
|
||||||
|
});
|
||||||
|
|
||||||
|
var relatedCount = relatedVisitTask.Item1.Count();
|
||||||
|
|
||||||
|
if (relatedCount <= 3)
|
||||||
|
{
|
||||||
|
taskIds = relatedVisitTask.Item1.Select(x => x.VisitTaskId).ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var count = relatedVisitTask.Item1.Count();
|
||||||
|
taskIds.Add(relatedVisitTask.Item1[0].VisitTaskId);
|
||||||
|
taskIds.Add(relatedVisitTask.Item1[count - 2].VisitTaskId);
|
||||||
|
taskIds.Add(relatedVisitTask.Item1[count - 1].VisitTaskId);
|
||||||
|
|
||||||
|
}
|
||||||
|
relatedVisitTask.Item1 = relatedVisitTask.Item1.Where(x => taskIds.Contains(x.VisitTaskId)).ToList();
|
||||||
|
// 所有访视问题的答案
|
||||||
|
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => taskIds.Contains(x.VisitTaskId)).Include(x => x.ReadingQuestionTrial).ToListAsync();
|
||||||
|
|
||||||
|
// 单位字典
|
||||||
|
var unitDictionary = await _dictionaryRepository.Where(x => x.Code == "ValueUnit").Include(x => x.ChildList).ToListAsync();
|
||||||
|
var imageProblem = _generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, inDto.VisitTaskId, QuestionType.ImageQualityAssessment);
|
||||||
|
var rowinfoList = await _readingTableAnswerRowInfoRepository.Where(x => taskIds.Contains(x.VisitTaskId)).Include(x => x.VisitTask).Include(x => x.ReadingQuestionTrial).ToListAsync();
|
||||||
|
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => taskIds.Contains(x.VisitTaskId)).Include(x => x.ReadingQuestionTrial).Include(x => x.ReadingTableQuestionTrial).ToListAsync();
|
||||||
|
|
||||||
|
#region 获取各个病灶
|
||||||
|
List<Dictionary<string, object>> getLesionInfo(LesionType lesionType)
|
||||||
|
{
|
||||||
|
List<decimal> targetFocusNum = rowinfoList.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.ReadingQuestionTrial.LesionType == lesionType).Select(x => x.RowIndex).OrderBy(x => x).ToList();
|
||||||
|
|
||||||
|
List<Dictionary<string, object>> targetInfo = new List<Dictionary<string, object>>();
|
||||||
|
|
||||||
|
foreach (var item in targetFocusNum)
|
||||||
|
{
|
||||||
|
var bodyPartDescription = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, inDto.VisitTaskId, lesionType, QuestionMark.BodyPartDescription, item);
|
||||||
|
Dictionary<string, object> target = new Dictionary<string, object>()
|
||||||
|
{
|
||||||
|
{ "RowMark",rowinfoList.Where(x=>x.VisitTaskId == inDto.VisitTaskId &&x.RowIndex==item && x.ReadingQuestionTrial.LesionType == lesionType).Select(x=>x.RowMark).FirstIsNullReturnEmpty() },
|
||||||
|
{ "Organ",_generalCalculateService.GetTaskTableAnswer(tableAnswerList,dictionList,unitDictionary,inDto.VisitTaskId,lesionType,QuestionMark.Organ,item)+":"+_generalCalculateService.GetTaskTableAnswer(tableAnswerList,dictionList,unitDictionary,inDto.VisitTaskId,lesionType,QuestionMark.Part,item)+ (bodyPartDescription==string.Empty?string.Empty:","+bodyPartDescription) },
|
||||||
|
{ "FirstVisit",getStateInfo(0,item, lesionType) },
|
||||||
|
{ "SecondVisit", relatedCount>=2?getStateInfo(1,item,lesionType):string.Empty },
|
||||||
|
{ "ThirdlyVisit", relatedCount>=3?getStateInfo(2,item,lesionType):string.Empty },
|
||||||
|
};
|
||||||
|
targetInfo.Add(target);
|
||||||
|
}
|
||||||
|
return targetInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
string getStateInfo(int index, decimal item, LesionType lesionType)
|
||||||
|
{
|
||||||
|
// 非淋巴结取长径 淋巴结取长短径
|
||||||
|
var state = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, taskIds[index], lesionType, QuestionMark.State, item);
|
||||||
|
var majorAxis = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, taskIds[index], lesionType, QuestionMark.MajorAxis, item);
|
||||||
|
|
||||||
|
var isLymph = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, taskIds[index], lesionType, QuestionMark.IsLymph, item);
|
||||||
|
var shortAxis = _generalCalculateService.GetTaskTableAnswer(tableAnswerList, dictionList, unitDictionary, taskIds[index], lesionType, QuestionMark.ShortAxis, item);
|
||||||
|
|
||||||
|
var result = string.Empty;
|
||||||
|
|
||||||
|
if (!state.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
result = state;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!majorAxis.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
result += result == string.Empty ? $"L:{majorAxis}" : $",L:{majorAxis}";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isLymph.EqEnum(YesOrNoOrNa.Yes) && !shortAxis.IsNullOrEmpty())
|
||||||
|
{
|
||||||
|
result += result == string.Empty ? $"S:{shortAxis}" : $",S:{shortAxis}";
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 外层问题处理
|
||||||
|
|
||||||
|
// 获取外层问题
|
||||||
|
List<Dictionary<string, object>> getQuestionAnswerList(List<ExportReportQuestion> exports)
|
||||||
|
{
|
||||||
|
List<Dictionary<string, object>> questionAnswerList = new List<Dictionary<string, object>>();
|
||||||
|
foreach (var item in exports)
|
||||||
|
{
|
||||||
|
Dictionary<string, object> questionAnswer = new Dictionary<string, object>()
|
||||||
|
{
|
||||||
|
{"Name",item.QuestionName },
|
||||||
|
{"FirstVisit", _generalCalculateService.GetTaskanswer(answerList,dictionList,unitDictionary,taskIds[0],item.QuestionType)},
|
||||||
|
{"SecondVisit", relatedCount>=2? _generalCalculateService.GetTaskanswer(answerList,dictionList,unitDictionary,taskIds[1],item.QuestionType):string.Empty },
|
||||||
|
{"ThirdlyVisit", relatedCount>=3? _generalCalculateService.GetTaskanswer(answerList,dictionList,unitDictionary,taskIds[2],item.QuestionType):string.Empty },
|
||||||
|
};
|
||||||
|
questionAnswerList.Add(questionAnswer);
|
||||||
|
}
|
||||||
|
return questionAnswerList;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
var studyInfo = (await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => new
|
||||||
|
{
|
||||||
|
|
||||||
|
x.Modalities,
|
||||||
|
x.StudyTime,
|
||||||
|
x.BodyPartExamined,
|
||||||
|
x.Description
|
||||||
|
|
||||||
|
}).OrderBy(x => x.StudyTime).ToListAsync()).Select(x => new Dictionary<string, object>() {
|
||||||
|
|
||||||
|
{ "Modalities",x.Modalities},
|
||||||
|
{ "StudyTime",x.StudyTime?.ToString("yyyy-MM-dd")},
|
||||||
|
{ "Description",x.Description},
|
||||||
|
{ "ImageProblem",imageProblem},
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync();
|
||||||
|
|
||||||
|
var assessmentResult = string.Empty;
|
||||||
|
if (visitInfo.IsBaseLine)
|
||||||
|
{
|
||||||
|
var existDisease = answerList.Where(x => x.ReadingQuestionTrial.QuestionType == QuestionType.ExistDisease).Select(x => x.Answer).FirstIsNullReturnEmpty().EqEnum(ExistDisease.No) ? "不" : string.Empty;
|
||||||
|
assessmentResult = $"{existDisease}存在疾病";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
assessmentResult = $"整体肿瘤评估结果为{_generalCalculateService.GetTaskanswer(answerList, dictionList, unitDictionary, inDto.VisitTaskId, QuestionType.Tumor)}";
|
||||||
|
}
|
||||||
|
var hIRHospital = await _hIRHospitalRepository.Where(t => t.IsDefault == true).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var value = new Dictionary<string, object>()
|
||||||
|
{
|
||||||
|
// { "Logo" ,await _generalCalculateService.GetWordPictureMaxWL(_options.CurrentValue.MinIO.viewEndpoint+_hospital.CurrentValue.HospitalLogoPath ,System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{inDto.DownLoadGuid}"),110,100) },
|
||||||
|
|
||||||
|
{ "HospitalName",hIRHospital.HospitalName } ,// 医院名称
|
||||||
|
{ "SubjectName",subjectInfo.ShortName }, //患者姓名
|
||||||
|
{ "SubjectSex", subjectInfo.Sex==string.Empty?string.Empty: subjectInfo.Sex=="M"?"男":"女" }, //患者性别
|
||||||
|
{ "SubjectAge",subjectInfo.Age==null?string.Empty: subjectInfo.Age +"岁" }, //患者年龄
|
||||||
|
{ "SubjectCode",subjectPatientList.Select(x=>x.Patient).OrderByDescending(x=>x.CreateTime).Select(x=>x.PatientIdStr).FirstIsNullReturnEmpty() }, //患者编号
|
||||||
|
{ "VisitName",visitInfo.VisitName }, //访视名称
|
||||||
|
{ "LatestScanDate",visitInfo.StudyList.Min(x=>x.StudyTime)?.ToString("yyyy-MM-dd") }, //随访日期
|
||||||
|
{ "CriterionName",taskinfo.TrialReadingCriterion.CriterionName }, //评估标准
|
||||||
|
{ "AssessmentResult", assessmentResult }, //评估结果
|
||||||
|
{ "DoctorName",doctor.LastName + doctor.FirstName}, //医生姓名
|
||||||
|
{ "SignTime",taskinfo.SignTime?.ToString("yyyy-MM-dd HH:mm:ss") }, //签名时间
|
||||||
|
{ "StudyInfo",studyInfo }, // 检查信息
|
||||||
|
{ "FirstVisit", relatedVisitTask.Item1[0].TaskName},
|
||||||
|
{ "SecondVisit",relatedCount>=2?relatedVisitTask.Item1[1].TaskName:string.Empty},
|
||||||
|
{ "ThirdlyVisit", relatedCount>=3?relatedVisitTask.Item1[2].TaskName:string.Empty},
|
||||||
|
{ "TargetInfo", getLesionInfo(LesionType.TargetLesion)}, // 靶病灶
|
||||||
|
{ "NoTargetInfo", getLesionInfo(LesionType.NonTargetLesions)}, // 非把病灶
|
||||||
|
{ "NewTargetInfo", getLesionInfo(LesionType.NewLesions)},// 新病灶
|
||||||
|
{ "TargetImage", await _generalCalculateService.GetLesionPic(rowinfoList, LesionType.TargetLesion,inDto.DownLoadGuid)}, // 靶病灶图片
|
||||||
|
{ "NoTargetImage",await _generalCalculateService.GetLesionPic(rowinfoList, LesionType.NonTargetLesions,inDto.DownLoadGuid)}, // 非靶病灶图片
|
||||||
|
{ "NewImage", await _generalCalculateService.GetLesionPic(rowinfoList, LesionType.NewLesions,inDto.DownLoadGuid)}, // 新病灶图片
|
||||||
|
{ "Result",getQuestionAnswerList(new List<ExportReportQuestion>()
|
||||||
|
{ new ExportReportQuestion (){ QuestionName="靶病灶径线之和(SOD)",QuestionType=QuestionType.SOD},
|
||||||
|
new ExportReportQuestion (){ QuestionName="非淋巴结靶病灶长径之和",QuestionType=QuestionType.SumOfDiameter},
|
||||||
|
new ExportReportQuestion (){ QuestionName="与基线相比SOD变化量",QuestionType=QuestionType.SODChange},
|
||||||
|
new ExportReportQuestion (){ QuestionName="与基线相比SOD变化百分比",QuestionType=QuestionType.SODPercent},
|
||||||
|
new ExportReportQuestion (){ QuestionName="与最低点相比SOD变化量",QuestionType=QuestionType.LowestIncrease},
|
||||||
|
new ExportReportQuestion (){ QuestionName="与最低点相比SOD变化百分比",QuestionType=QuestionType.LowPercent},
|
||||||
|
new ExportReportQuestion (){ QuestionName="最低点访视",QuestionType=QuestionType.LowVisit},
|
||||||
|
})}, // 评估结果
|
||||||
|
{ "Curative",getQuestionAnswerList(new List<ExportReportQuestion>()
|
||||||
|
{ new ExportReportQuestion (){ QuestionName="靶病灶评估",QuestionType=QuestionType.TargetLesion},
|
||||||
|
new ExportReportQuestion (){ QuestionName="非靶病灶评估",QuestionType=QuestionType.NoTargetLesion},
|
||||||
|
new ExportReportQuestion (){ QuestionName="存在新病灶",QuestionType=QuestionType.NewLesions},
|
||||||
|
new ExportReportQuestion (){ QuestionName="存在疾病",QuestionType=QuestionType.ExistDisease},
|
||||||
|
new ExportReportQuestion (){ QuestionName="整体肿瘤评估",QuestionType=QuestionType.Tumor},
|
||||||
|
})}, // 疗效结果
|
||||||
|
|
||||||
|
{ "ReportNo",await _generalCalculateService.GetReportExportNo(taskinfo) } ,
|
||||||
|
};
|
||||||
|
|
||||||
|
value = _generalCalculateService.StringEmptyTurnedLine(value);
|
||||||
|
|
||||||
|
var templatePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"wwwroot/ReadReoprtTemplate/ReportTemplate_RECIST1.1_CN_V1.docx");
|
||||||
|
var outputFilePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, $@"wwwroot/ReadReoprtTemplate/downLoad/{inDto.DownLoadGuid}.docx");
|
||||||
|
|
||||||
|
|
||||||
|
MiniWord.SaveAsByTemplate(outputFilePath, templatePath, value);
|
||||||
|
|
||||||
|
|
||||||
|
//// 获取文件夹中的所有文件路径
|
||||||
|
Directory.Delete(downFile, true);
|
||||||
|
|
||||||
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
|
{
|
||||||
|
Stream stream = _generalCalculateService.ReadAndReturnStream(outputFilePath);
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
var pdfurl = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"wwwroot/ReadReoprtTemplate/downLoad");
|
||||||
|
FileConvertHelper.ConvertWordToPdf(outputFilePath, pdfurl);
|
||||||
|
Stream stream = _generalCalculateService.ReadAndReturnStream(pdfurl + $"/{inDto.DownLoadGuid}.pdf");
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 阅片导入
|
/// 阅片导入
|
||||||
|
|
@ -726,6 +1191,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
|
var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
if (!(await _readingTableQuestionAnswerRepository.AnyAsync(x => x.VisitTaskId == visitTaskId)))
|
||||||
|
{
|
||||||
|
|
||||||
// 判断当前任务是否是基线
|
// 判断当前任务是否是基线
|
||||||
if (taskinfo.SourceSubjectVisitId != baseLineVisitId)
|
if (taskinfo.SourceSubjectVisitId != baseLineVisitId)
|
||||||
{
|
{
|
||||||
|
|
@ -823,8 +1291,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
x.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Point1 &&
|
x.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Point1 &&
|
||||||
x.SubjectId == taskinfo.SubjectId &&
|
x.SubjectId == taskinfo.SubjectId &&
|
||||||
x.SourceSubjectVisitId == taskinfo.SourceSubjectVisitId
|
x.SourceSubjectVisitId == taskinfo.SourceSubjectVisitId
|
||||||
//&&
|
|
||||||
//x.DoctorUserId==taskinfo.DoctorUserId
|
|
||||||
).FirstOrDefaultAsync();
|
).FirstOrDefaultAsync();
|
||||||
if (recistTask != null)
|
if (recistTask != null)
|
||||||
{
|
{
|
||||||
|
|
@ -886,6 +1352,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
{
|
{
|
||||||
|
|
||||||
item.QuestionId = tableRowAnswers.Where(y => y.OriginalId == item.RowId).Select(x => x.QuestionId).FirstOrDefault();
|
item.QuestionId = tableRowAnswers.Where(y => y.OriginalId == item.RowId).Select(x => x.QuestionId).FirstOrDefault();
|
||||||
|
|
||||||
item.TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == item.QuestionId && x.QuestionMark == item.QuestionMark).Select(x => x.Id).FirstOrDefault();
|
item.TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == item.QuestionId && x.QuestionMark == item.QuestionMark).Select(x => x.Id).FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -946,7 +1413,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return new AddTaskLesionAnswerFromLastTaskOutDto()
|
return new AddTaskLesionAnswerFromLastTaskOutDto()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models;
|
namespace IRaCIS.Core.Domain.Models;
|
||||||
|
|
||||||
[Comment("稽查 - 配置表 (需要同步)")]
|
[Comment("稽查 - 配置表 (需要同步)")]
|
||||||
|
|
@ -117,6 +119,11 @@ public class FrontAuditConfig : BaseFullAuditEntity
|
||||||
|
|
||||||
public string ValueCN { get; set; } = null!;
|
public string ValueCN { get; set; } = null!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 适用的标准
|
||||||
|
/// </summary>
|
||||||
|
public List<CriterionType> ApplyCriterionList { get; set; } = new List<CriterionType>() { };
|
||||||
|
|
||||||
}
|
}
|
||||||
public class UrlConfig
|
public class UrlConfig
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ using MassTransit;
|
||||||
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
using Microsoft.EntityFrameworkCore.ChangeTracking;
|
||||||
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
|
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using static MassTransit.ValidationResultExtensions;
|
||||||
|
|
||||||
|
|
||||||
namespace IRaCIS.Core.Infra.EFCore.Common
|
namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
@ -61,6 +62,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
{
|
{
|
||||||
return new List<Type>()
|
return new List<Type>()
|
||||||
{
|
{
|
||||||
|
typeof(TrialIdentityUser),
|
||||||
typeof(TrialUserRole),
|
typeof(TrialUserRole),
|
||||||
typeof(TrialSiteSurvey),
|
typeof(TrialSiteSurvey),
|
||||||
typeof(TrialSiteUser),
|
typeof(TrialSiteUser),
|
||||||
|
|
@ -1623,12 +1625,19 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
var type = GetEntityAuditOpt(item);
|
var type = GetEntityAuditOpt(item);
|
||||||
|
|
||||||
var entity = item.Entity as TrialUserRole;
|
var entity = item.Entity as TrialUserRole;
|
||||||
|
string extraIndentification = string.Empty;
|
||||||
|
if (type == AuditOpt.Update)
|
||||||
|
{
|
||||||
|
extraIndentification = "/" + entity.IsDeleted.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
//var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId);
|
//var user = await _dbContext.Users.Include(x => x.UserTypeRole).FirstOrDefaultAsync(x => x.Id == entity.UserId);
|
||||||
await InsertInspection<TrialUserRole>(entity, type, x => new InspectionConvertDTO
|
await InsertInspection<TrialUserRole>(entity, type, x => new InspectionConvertDTO
|
||||||
{
|
{
|
||||||
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
|
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
|
||||||
TrialId = x.TrialId,
|
TrialId = x.TrialId,
|
||||||
ObjectRelationParentId = x.TrialId,
|
ObjectRelationParentId = x.TrialId,
|
||||||
|
ExtraIndentification = extraIndentification,
|
||||||
ObjectRelationParentId2 = x.UserId,
|
ObjectRelationParentId2 = x.UserId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -1715,6 +1724,32 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//});
|
//});
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SCPStudySubjectVisit)))
|
||||||
|
{
|
||||||
|
|
||||||
|
var type = GetEntityAuditOpt(item);
|
||||||
|
|
||||||
|
var entity = item.Entity as SCPStudySubjectVisit;
|
||||||
|
|
||||||
|
var sCPStudy=await _dbContext.SCPStudy.Where(x => x.Id == entity.SCPStudyId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
await InsertInspection<SCPStudySubjectVisit>(item.Entity as SCPStudySubjectVisit, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
ObjectRelationParentId = x.SubjectId,
|
||||||
|
ObjectRelationParentId2=x.SubjectVisitId,
|
||||||
|
ObjectRelationParentId3 = x.StudyId,
|
||||||
|
|
||||||
|
|
||||||
|
}, new
|
||||||
|
{
|
||||||
|
StudyTime = sCPStudy!=null? sCPStudy.StudyTime:null,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 访视
|
// 访视
|
||||||
|
|
@ -2953,7 +2988,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
u.ShowOrder
|
u.ShowOrder
|
||||||
}
|
}
|
||||||
).OrderBy(t => t.ShowOrder).ToList()
|
).OrderBy(t => t.ShowOrder).ToList()
|
||||||
});
|
}, _userInfo.AuditIdentification);
|
||||||
|
|
||||||
|
|
||||||
////添加/修改病灶接口 只会对单个病灶进行操作
|
////添加/修改病灶接口 只会对单个病灶进行操作
|
||||||
|
|
@ -3182,6 +3217,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
UserRealName = userRealName,
|
UserRealName = userRealName,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var extraIdentification = string.Empty;
|
||||||
|
var isDistinctionInterface = true;
|
||||||
#region 标识区分
|
#region 标识区分
|
||||||
|
|
||||||
if (type == AuditOpt.Add)
|
if (type == AuditOpt.Add)
|
||||||
|
|
@ -3228,11 +3266,30 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
type = type + "/" + 2;
|
type = type + "/" + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "ReadingImageTask/resetReadingTask":
|
||||||
|
//跳转阅片结果需要该参数
|
||||||
|
|
||||||
|
obj.IsReadingReset = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (obj.IsReadingReset != true)
|
||||||
|
{
|
||||||
|
if (entity.ReadingTaskState == ReadingTaskState.Reading)
|
||||||
|
{
|
||||||
|
if (_dbContext.VisitTask.Where(t => t.Id == entity.Id).Any(t => t.ReadingTaskState == ReadingTaskState.WaitReading))
|
||||||
|
{
|
||||||
|
isDistinctionInterface = false;
|
||||||
|
extraIdentification = "/ChangeToReading";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//访视任务-- 非Dicom 阅片
|
//访视任务-- 非Dicom 阅片
|
||||||
if (_userInfo.RequestUrl == "ReadingImageTask/SubmitVisitTaskQuestions" && entity.ReadingTaskState != ReadingTaskState.HaveSigned && type == AuditOpt.Update)
|
if (_userInfo.RequestUrl == "ReadingImageTask/SubmitVisitTaskQuestions" && entity.ReadingTaskState != ReadingTaskState.HaveSigned && type == AuditOpt.Update)
|
||||||
{
|
{
|
||||||
|
|
@ -3366,8 +3423,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
{
|
{
|
||||||
VisitTaskId = x.Id,
|
VisitTaskId = x.Id,
|
||||||
SubjectVisitId= subjectVisitId,
|
SubjectVisitId= subjectVisitId,
|
||||||
|
ExtraIndentification = extraIdentification,
|
||||||
|
|
||||||
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
|
IsDistinctionInterface = type == AuditOpt.Update && isDistinctionInterface ? true : false,
|
||||||
|
|
||||||
ObjectRelationParentId = entity.SourceSubjectVisitId != null ? entity.SourceSubjectVisitId : entity.SouceReadModuleId,
|
ObjectRelationParentId = entity.SourceSubjectVisitId != null ? entity.SourceSubjectVisitId : entity.SouceReadModuleId,
|
||||||
|
|
||||||
|
|
@ -3394,7 +3452,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
/// <param name="expression">表达式</param>
|
/// <param name="expression">表达式</param>
|
||||||
/// <param name="otherItem">其他对象</param>
|
/// <param name="otherItem">其他对象</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task InsertInspection<T>(T entityObj, string type, Expression<Func<T, InspectionConvertDTO>> expression = null, object otherItem = null) where T : Entity
|
public async Task InsertInspection<T>(T entityObj, string type, Expression<Func<T, InspectionConvertDTO>> expression = null, object otherItem = null, string auditIdentification = "") where T : Entity
|
||||||
{
|
{
|
||||||
|
|
||||||
InspectionConvertDTO inspection = new InspectionConvertDTO();
|
InspectionConvertDTO inspection = new InspectionConvertDTO();
|
||||||
|
|
@ -3411,7 +3469,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
var generalId = (inspection.GeneralId != null && inspection.GeneralId != Guid.Empty) ? inspection.GeneralId : entityObj.Id;
|
var generalId = (inspection.GeneralId != null && inspection.GeneralId != Guid.Empty) ? inspection.GeneralId : entityObj.Id;
|
||||||
inspection.GeneralId = generalId;
|
inspection.GeneralId = generalId;
|
||||||
|
|
||||||
inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine) + inspection.ExtraIndentification;
|
inspection.Identification = GetInspectionRecordIdentification(entityObj, type, inspection.IsDistinctionInterface, inspection.IsSelfDefine, auditIdentification) + inspection.ExtraIndentification;
|
||||||
|
|
||||||
//将实体对象属性 映射到稽查实体
|
//将实体对象属性 映射到稽查实体
|
||||||
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
MapEntityPropertyToAuditEntity(entityObj, inspection);
|
||||||
|
|
@ -3617,11 +3675,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
/// 获取稽查记录的标识符 部分业务会进行特殊处理
|
/// 获取稽查记录的标识符 部分业务会进行特殊处理
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <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, string auditIdentification = "")
|
||||||
{
|
{
|
||||||
var entityTypeName = entityObj.GetType().Name;
|
var entityTypeName = entityObj.GetType().Name;
|
||||||
|
|
||||||
|
var result = string.Empty;
|
||||||
|
|
||||||
//默认规则
|
//默认规则
|
||||||
if (IsDistinctionInterface)
|
if (IsDistinctionInterface)
|
||||||
|
|
@ -3629,11 +3687,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
|
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
|
||||||
if (isSelfDefine)
|
if (isSelfDefine)
|
||||||
{
|
{
|
||||||
return $"{_userInfo.RequestUrl}/{entityTypeName}";
|
result= $"{_userInfo.RequestUrl}/{entityTypeName}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return $"{_userInfo.RequestUrl}/{entityTypeName}/{type}";
|
result = $"{_userInfo.RequestUrl}/{entityTypeName}/{type}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -3643,15 +3701,22 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
|
//自定义 标识后面 补充由代码上层的 extraIdentification 附加
|
||||||
if (isSelfDefine)
|
if (isSelfDefine)
|
||||||
{
|
{
|
||||||
return $"{entityTypeName}";
|
result = $"{entityTypeName}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return $"{entityTypeName}/{type}";
|
result = $"{entityTypeName}/{type}";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (auditIdentification.IsNotNullOrEmpty())
|
||||||
|
{
|
||||||
|
result = result + "/" + auditIdentification;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
public string CutOffVisitName { get; set; }
|
public string CutOffVisitName { get; set; }
|
||||||
|
|
||||||
public string SelectResult { get; set; }
|
public string SelectResult { get; set; }
|
||||||
|
|
||||||
|
public bool? IsReadingReset { get; set; }
|
||||||
}
|
}
|
||||||
public class InspectionConvertDTO : DataInspection
|
public class InspectionConvertDTO : DataInspection
|
||||||
{
|
{
|
||||||
|
|
|
||||||
19072
IRaCIS.Core.Infra.EFCore/Migrations/20250901092654_CriterionType.Designer.cs
generated
Normal file
19072
IRaCIS.Core.Infra.EFCore/Migrations/20250901092654_CriterionType.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,29 @@
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class CriterionType : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "ApplyCriterionList",
|
||||||
|
table: "FrontAuditConfig",
|
||||||
|
type: "nvarchar(max)",
|
||||||
|
nullable: false,
|
||||||
|
defaultValue: "[]");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ApplyCriterionList",
|
||||||
|
table: "FrontAuditConfig");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2493,6 +2493,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||||
b.Property<Guid>("Id")
|
b.Property<Guid>("Id")
|
||||||
.HasColumnType("uniqueidentifier");
|
.HasColumnType("uniqueidentifier");
|
||||||
|
|
||||||
|
b.Property<string>("ApplyCriterionList")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("ChildDataEnLabel")
|
b.Property<string>("ChildDataEnLabel")
|
||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasMaxLength(400)
|
.HasMaxLength(400)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue