Merge branch 'Test_IRC_Net8' of http://192.168.3.68:2000/XCKJ/irc-netcore-api into Test_IRC_Net8
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -136,7 +136,7 @@ public static class FileStoreHelper
|
||||
{
|
||||
var doc = await _commonDocumentRepository.FirstOrDefaultAsync(t => t.Code == code);
|
||||
|
||||
var isEn_US = CultureInfo.CurrentCulture.Name!= "zh-CN";
|
||||
var isEn_US = CultureInfo.CurrentCulture.Name!= StaticData.CultureInfo.zh_CN;
|
||||
if (doc == null)
|
||||
{
|
||||
//---数据库没有找到对应的数据模板文件,请联系系统运维人员。
|
||||
|
||||
@@ -14,6 +14,7 @@ using System.Security.AccessControl;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace IRaCIS.Core.Application.Helper
|
||||
{
|
||||
@@ -55,7 +56,10 @@ namespace IRaCIS.Core.Application.Helper
|
||||
public class ObjectStoreServiceOptions
|
||||
{
|
||||
public string ObjectStoreUse { get; set; }
|
||||
|
||||
public AliyunOSSOptions AliyunOSS { get; set; }
|
||||
|
||||
|
||||
public MinIOOptions MinIO { get; set; }
|
||||
|
||||
public AWSOptions AWS { get; set; }
|
||||
@@ -68,6 +72,8 @@ namespace IRaCIS.Core.Application.Helper
|
||||
|
||||
public AliyunOSSOptions AliyunOSS { get; set; }
|
||||
|
||||
public AliyunOSSTempToken AliyunOSSTemp { get; set; }
|
||||
|
||||
public MinIOOptions MinIO { get; set; }
|
||||
|
||||
public AWSOptions AWS { get; set; }
|
||||
|
||||
@@ -268,6 +268,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public string ForeignKeyText { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 英文的翻译
|
||||
/// </summary>
|
||||
public string ForeignKeyEnText { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 接口名
|
||||
/// </summary>
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
||||
public string TaskName { get; set; }
|
||||
|
||||
public bool IsImageFilter { get; set; }
|
||||
public string CriterionModalitys { get; set; }
|
||||
public string CriterionModalitys { get; set; }
|
||||
|
||||
public Guid? SourceSubjectVisitId { get; set; }
|
||||
public PackState PackState { get; set; }
|
||||
@@ -33,7 +33,40 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
||||
|
||||
}
|
||||
|
||||
public class StudyBasicInfo
|
||||
|
||||
|
||||
|
||||
public class StudyBasicInfo : DicomStudyBasicInfo
|
||||
{
|
||||
|
||||
public List<string> SopInstanceUidList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SubjectCRCImageUploadedDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
public string TaskBlindName { get; set; }
|
||||
|
||||
public string TaskName { get; set; }
|
||||
|
||||
public bool IsImageFilter { get; set; }
|
||||
public string CriterionModalitys { get; set; }
|
||||
|
||||
public Guid? SourceSubjectVisitId { get; set; }
|
||||
|
||||
public List<DicomStudyBasicInfo> DicomStudyList { get; set; }
|
||||
|
||||
public List<NoneDicomStudyBasicInfo> NoneDicomStudyList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class DicomStudyBasicInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string StudyInstanceUid { get; set; }
|
||||
@@ -54,8 +87,26 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
||||
public string Description { get; set; }
|
||||
public int SeriesCount { get; set; }
|
||||
public int InstanceCount { get; set; }
|
||||
}
|
||||
|
||||
public List<string> SopInstanceUidList { get; set; }
|
||||
public class NoneDicomStudyBasicInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string StudyCode { get; set; } = string.Empty;
|
||||
|
||||
public int FileCount { get; set; }
|
||||
|
||||
public string BodyPart { get; set; }
|
||||
|
||||
public string Modality { get; set; }
|
||||
|
||||
public DateTime ImageDate { get; set; }
|
||||
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public bool IsDicom { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class UnionStudyMonitorModel : UnionStudyBaseModel
|
||||
@@ -184,7 +184,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public decimal FileSize { get; set; }
|
||||
public long FileSize { get; set; }
|
||||
|
||||
public bool IsDicomReUpload { get; set; }
|
||||
|
||||
@@ -206,7 +206,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
|
||||
public decimal FileSize { get; set; }
|
||||
public long FileSize { get; set; }
|
||||
|
||||
public bool IsDicomReUpload { get; set; }
|
||||
|
||||
@@ -360,5 +360,47 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public string Path { get; set; } = string.Empty;
|
||||
|
||||
public string HtmlPath { get; set; } = string.Empty;
|
||||
|
||||
public decimal FileFize { get; set; }
|
||||
}
|
||||
|
||||
public class CRCUploadedStudyQuqry
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public List<Guid> DicomStudyIdList { get; set; }
|
||||
|
||||
public List<Guid> NoneDicomStudyIdList { get; set; }
|
||||
}
|
||||
|
||||
public class IRReadingDownloadQuery
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class IRDownloadQuery
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
public List<Guid> SubjectVisitIdList { get; set; }
|
||||
|
||||
public List<Guid> DicomStudyIdList { get; set; }
|
||||
|
||||
public List<Guid> NoneDicomStudyIdList { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository,
|
||||
IDistributedLockProvider _distributedLockProvider) : BaseService, IDownloadAndUploadService
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 受试者随机阅片,任务进行随机编号
|
||||
@@ -490,7 +490,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
{
|
||||
|
||||
|
||||
var extralConfig = _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
||||
var extralConfig = _trialRepository.Where(t => t.Id == trialId).Select(t => t.TrialExtraConfigJsonStr).FirstOrDefault() ?? string.Empty;
|
||||
|
||||
var config = JsonConvert.DeserializeObject<TrialExtraConfig>(extralConfig) ?? new TrialExtraConfig();
|
||||
|
||||
@@ -608,7 +608,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
}
|
||||
else if (inQuery.SubejctId != null)
|
||||
{
|
||||
var query = from sv in _subjectRepository.Where(t => t.Id == inQuery.SubejctId).SelectMany(t=>t.SubjectVisitList)
|
||||
var query = from sv in _subjectRepository.Where(t => t.Id == inQuery.SubejctId).SelectMany(t => t.SubjectVisitList)
|
||||
|
||||
|
||||
select new
|
||||
@@ -656,7 +656,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResponseOutput.NotOk("不允许 subjectId subjectId 都不传递");
|
||||
return ResponseOutput.NotOk("不允许 subjectId SubejectVisitId 都不传递");
|
||||
}
|
||||
|
||||
|
||||
@@ -894,5 +894,153 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// IQC 获取CRC 上传到某一个访视的的检查信息 (原始影像信息 包含dicom 非dicom)
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> GetCRCUploadedStudyInfo(CRCUploadedStudyQuqry inQuery)
|
||||
{
|
||||
var isQueryDicom = inQuery.DicomStudyIdList.Count > 0;
|
||||
var isQueryNoneDicom = inQuery.NoneDicomStudyIdList.Count > 0;
|
||||
|
||||
var query = from sv in _subjectVisitRepository.Where(t => t.Id == inQuery.SubjectVisitId)
|
||||
|
||||
|
||||
select new
|
||||
{
|
||||
SubjectCode = sv.Subject.Code,
|
||||
VisitName = sv.VisitName,
|
||||
|
||||
StudyList = sv.StudyList.Where(t => isQueryDicom ? inQuery.DicomStudyIdList.Contains(t.Id) : false)
|
||||
|
||||
.Select(u => new
|
||||
{
|
||||
u.PatientId,
|
||||
u.StudyTime,
|
||||
u.StudyCode,
|
||||
|
||||
SeriesList = u.SeriesList.Select(z => new
|
||||
{
|
||||
z.Modality,
|
||||
|
||||
InstanceList = z.DicomInstanceList.Select(k => new
|
||||
{
|
||||
k.Path,
|
||||
k.FileSize
|
||||
})
|
||||
})
|
||||
|
||||
}).ToList(),
|
||||
|
||||
NoneDicomStudyList = sv.NoneDicomStudyList.Where(t => isQueryNoneDicom ? inQuery.NoneDicomStudyIdList.Contains(t.Id) : false)
|
||||
|
||||
.Select(nd => new
|
||||
{
|
||||
nd.Modality,
|
||||
nd.StudyCode,
|
||||
nd.ImageDate,
|
||||
|
||||
FileList = nd.NoneDicomFileList.Select(file => new
|
||||
{
|
||||
file.FileName,
|
||||
file.Path,
|
||||
file.FileType
|
||||
})
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
var result = query.FirstOrDefault();
|
||||
|
||||
return ResponseOutput.Ok(result);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// IR 阅片页面 和IR 任务列表页面下载 勾选下载列表(后端要考虑到一致性分析 subjectCode的问题)
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<SubjectCRCImageUploadedDto>> GetSubjectImageDownloadSelectList(IRReadingDownloadQuery inQuery)
|
||||
{
|
||||
|
||||
var query = _visitTaskRepository.Where(t => t.SubjectId == inQuery.SubjectId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId
|
||||
&& t.SourceSubjectVisitId != null && t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect)
|
||||
.ProjectTo<SubjectCRCImageUploadedDto>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
var list = await query.Where(t=>t.SubjectCode==inQuery.SubjectCode).ToListAsync();
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IR 阅片页面获取下载检查的信息 会根据标准进行过滤检查,(后端要考虑到一致性分析 subjectCode的问题)
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <param name="_subjectRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> GetIRReadingDownloadStudyInfo(IRDownloadQuery inQuery, [FromServices] IRepository<Subject> _subjectRepository)
|
||||
{
|
||||
var info = await _readingQuestionCriterionTrialRepository.Where(t => t.Id == inQuery.TrialReadingCriterionId)
|
||||
.Select(t => new { t.IsImageFilter, t.CriterionModalitys }).FirstNotNullAsync();
|
||||
|
||||
var isQueryDicom = inQuery.DicomStudyIdList.Count > 0;
|
||||
var isQueryNoneDicom = inQuery.NoneDicomStudyIdList.Count > 0;
|
||||
|
||||
var query = from sv in _subjectRepository.Where(t => t.Id == inQuery.SubjectId).SelectMany(t => t.SubjectVisitList.Where(t=>inQuery.SubjectVisitIdList.Contains(t.Id)))
|
||||
|
||||
select new
|
||||
{
|
||||
SubjectCode = sv.Subject.Code,
|
||||
VisitName = sv.VisitName,
|
||||
StudyList = sv.StudyList.Where(t => isQueryDicom ? inQuery.DicomStudyIdList.Contains(t.Id) : false)
|
||||
.Select(u => new
|
||||
{
|
||||
u.PatientId,
|
||||
u.StudyTime,
|
||||
u.StudyCode,
|
||||
|
||||
SeriesList = u.SeriesList.Select(z => new
|
||||
{
|
||||
z.Modality,
|
||||
|
||||
InstancePathList = z.DicomInstanceList.Select(k => new
|
||||
{
|
||||
k.Path
|
||||
})
|
||||
})
|
||||
|
||||
}),
|
||||
|
||||
NoneDicomStudyList = sv.NoneDicomStudyList.Where(t => isQueryNoneDicom ? inQuery.NoneDicomStudyIdList.Contains(t.Id) : false)
|
||||
.Select(nd => new
|
||||
{
|
||||
nd.Modality,
|
||||
nd.StudyCode,
|
||||
nd.ImageDate,
|
||||
|
||||
FileList = nd.NoneDicomFileList.Select(file => new
|
||||
{
|
||||
file.FileName,
|
||||
file.Path,
|
||||
file.FileType
|
||||
})
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
|
||||
var result = await query.FirstOrDefaultAsync();
|
||||
|
||||
return ResponseOutput.Ok(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.Dicom.DTO;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.Service.ImageAndDoc.DTO;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
||||
@@ -60,17 +61,17 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(o => o.StudyTime, t => t.MapFrom(u => u.DicomStudy.StudyTime))
|
||||
|
||||
.ForMember(o => o.StudyCode, t => t.MapFrom(u => u.DicomStudy.StudyCode))
|
||||
//.ForMember(o => o.InstanceList, t => t.MapFrom(u => u.DicomInstanceList.Select(t=>t.Id).ToArray()))
|
||||
// .ForMember(o => o.InstancePathList, t => t.MapFrom(u => u.DicomInstanceList.OrderBy(t=>t.InstanceNumber).Select(t => t.Path)))
|
||||
//.ForMember(o => o.InstanceList, t => t.MapFrom(u => u.DicomInstanceList.Select(t=>t.Id).ToArray()))
|
||||
// .ForMember(o => o.InstancePathList, t => t.MapFrom(u => u.DicomInstanceList.OrderBy(t=>t.InstanceNumber).Select(t => t.Path)))
|
||||
;
|
||||
|
||||
CreateMap<DicomStudy, QAStudyInfoDTO>()
|
||||
.ForMember(o => o.IsCompleteClinicalData, t => t.MapFrom(u => !u.ReadingClinicalDataList.Any(x=>x.ReadingClinicalDataPDFList.Count()==0)))
|
||||
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
||||
.ForMember(o => o.IsCompleteClinicalData, t => t.MapFrom(u => !u.ReadingClinicalDataList.Any(x => x.ReadingClinicalDataPDFList.Count() == 0)))
|
||||
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
|
||||
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
|
||||
.ForMember(o => o.IsHaveUploadFailed, t => t.MapFrom(u => u.DicomStudyMonitorList.Any(t=>t.FailedFileCount>0)))
|
||||
.ForMember(o => o.Modalities, t => t.MapFrom(u => string.Join('、', u.SeriesList.Select(t => t.Modality).Distinct()) ));
|
||||
.ForMember(o => o.IsHaveUploadFailed, t => t.MapFrom(u => u.DicomStudyMonitorList.Any(t => t.FailedFileCount > 0)))
|
||||
.ForMember(o => o.Modalities, t => t.MapFrom(u => string.Join('、', u.SeriesList.Select(t => t.Modality).Distinct())));
|
||||
|
||||
|
||||
|
||||
@@ -124,10 +125,19 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.VisitNum, u => u.MapFrom(s => s.SubjectVisit.VisitNum))
|
||||
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName));
|
||||
|
||||
|
||||
CreateMap<DicomStudy, DicomStudyBasicInfo>();
|
||||
CreateMap<NoneDicomStudy, NoneDicomStudyBasicInfo>();
|
||||
CreateMap<VisitTask, SubjectCRCImageUploadedDto>()
|
||||
.ForMember(d => d.VisitTaskId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.IsImageFilter, u => u.MapFrom(s => s.TrialReadingCriterion.IsImageFilter))
|
||||
.ForMember(d => d.CriterionModalitys, u => u.MapFrom(s => s.TrialReadingCriterion.CriterionModalitys))
|
||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindSubjectCode : u.Subject.Code))
|
||||
.ForMember(d => d.DicomStudyList, u => u.MapFrom(s => s.SourceSubjectVisit.StudyList))
|
||||
.ForMember(d => d.NoneDicomStudyList, u => u.MapFrom(s => s.SourceSubjectVisit.NoneDicomStudyList))
|
||||
;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -516,6 +516,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
Identification = u.Identification,
|
||||
ForeignKeyValue = p.ForeignKeyValue,
|
||||
ForeignKeyText = p.ForeignKeyText,
|
||||
p.ForeignKeyEnText,
|
||||
ForeignKeyTable = p.ForeignKeyTableName
|
||||
}).ToListAsync();
|
||||
list = list.GroupBy(x => new { x.Key }, (key, lst) => new
|
||||
@@ -524,7 +525,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
Identification = string.Empty,
|
||||
ForeignKeyValue = lst.FirstOrDefault(y => y.Identification == identification)?.ForeignKeyValue ?? lst.Max(x => x.ForeignKeyValue),
|
||||
ForeignKeyText = lst.FirstOrDefault(y => y.Identification == identification)?.ForeignKeyText ?? lst.Max(x => x.ForeignKeyText),
|
||||
ForeignKeyTable = lst.FirstOrDefault(y => y.Identification == identification)?.ForeignKeyTable ?? lst.Max(x => x.ForeignKeyTable),
|
||||
ForeignKeyEnText = lst.FirstOrDefault(y => y.Identification == identification)?.ForeignKeyEnText ?? lst.Max(x => x.ForeignKeyEnText),
|
||||
ForeignKeyTable = lst.FirstOrDefault(y => y.Identification == identification)?.ForeignKeyTable ?? lst.Max(x => x.ForeignKeyTable),
|
||||
|
||||
}).ToList();
|
||||
|
||||
@@ -538,6 +540,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
string Table = item.ForeignKeyTable;
|
||||
string ForeignKeyValue = item.ForeignKeyValue;
|
||||
string ForeignKeyText = item.ForeignKeyText;
|
||||
if (_userInfo.IsEn_Us && !item.ForeignKeyEnText.IsNullOrEmpty())
|
||||
{
|
||||
ForeignKeyText = item.ForeignKeyEnText;
|
||||
|
||||
}
|
||||
if (jsonDataValueDic[item.Key] != null)
|
||||
{
|
||||
string value = jsonDataValueDic[item.Key].ToString();
|
||||
@@ -829,8 +836,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
parent = b
|
||||
}).SelectMany(a => a.parent, (m, n) => new
|
||||
{
|
||||
value = n.ValueCN
|
||||
}).Select(x => x.value).ToListAsync()
|
||||
value = _userInfo.IsEn_Us ? n.Value : n.ValueCN
|
||||
}).Select(x => x.value).ToListAsync()
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -851,6 +858,18 @@ namespace IRaCIS.Core.Application.Service
|
||||
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
|
||||
}).Select(x => x.value).FirstOrDefaultAsync();
|
||||
}
|
||||
//
|
||||
else if (item.Type.ToLower() == FrontAudit.LineSpilt.GetDescription().ToLower())
|
||||
{
|
||||
var data = value.ToString().Split('|').ToList();
|
||||
|
||||
var codeList= await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => data.Contains(x.Code)), a => a.Id, b => b.ParentId, (a, b) => new
|
||||
{
|
||||
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
|
||||
}).Select(x => x.value).ToListAsync();
|
||||
jsonDataDic[item.Key] = string.Join("|", codeList);
|
||||
|
||||
}
|
||||
//通过字典项的code 翻译 枚举或者 bool
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
@@ -8,6 +9,7 @@ using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Web;
|
||||
using static MassTransit.ValidationResultExtensions;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
@@ -36,8 +38,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid? VisitId { get; set; }
|
||||
}
|
||||
public Guid? VisitId { get; set; }
|
||||
}
|
||||
|
||||
public class QCVisitSearchDTO : PageInput
|
||||
{
|
||||
@@ -54,8 +56,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid? TrialSiteId { get; set; }
|
||||
|
||||
public Guid? VisitId { get; set; }
|
||||
public Guid? SubjectId { get; set; }
|
||||
public Guid? VisitId { get; set; }
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public string SubjectInfo { get; set; } = String.Empty;
|
||||
|
||||
@@ -132,7 +134,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
|
||||
|
||||
public string OutEnrollmentVisitName { get; set; } = String.Empty;
|
||||
public string OutEnrollmentVisitName { get; set; } = String.Empty;
|
||||
|
||||
public string BodyPartTypes { get; set; } = String.Empty;
|
||||
|
||||
@@ -211,7 +213,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
//临床数据收集
|
||||
|
||||
public string ClinicalDataCollect => $"{DicomStudyCount},{NoneDicomStudyCount}{(IsBaseLine? (ClinicalInformationTransmissionEnum>0 && IsHaveClinicalData ? ",w/" : ",w/o") :"" )}";
|
||||
public string ClinicalDataCollect => $"{DicomStudyCount},{NoneDicomStudyCount}{(IsBaseLine ? (ClinicalInformationTransmissionEnum > 0 && IsHaveClinicalData ? ",w/" : ",w/o") : "")}";
|
||||
|
||||
public int? DicomStudyCount { get; set; }
|
||||
public int? NoneDicomStudyCount { get; set; }
|
||||
@@ -257,7 +259,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
}
|
||||
|
||||
|
||||
public class QCVisitExportDTO: CRCVisitExportDTO
|
||||
public class QCVisitExportDTO : CRCVisitExportDTO
|
||||
{
|
||||
//上传人
|
||||
public string SubmitUserRealName { get; set; }
|
||||
@@ -309,7 +311,11 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
get
|
||||
{
|
||||
if (!ClosedTime.HasValue)
|
||||
return "";
|
||||
{
|
||||
var now = DateTime.Now;
|
||||
return string.Format("{0}d {1}h {2}m", (now - CreateTime)?.Days, (now - CreateTime)?.Hours, (now - CreateTime)?.Minutes);
|
||||
|
||||
}
|
||||
else return string.Format("{0}d {1}h {2}m", (ClosedTime - CreateTime)?.Days, (ClosedTime - CreateTime)?.Hours, (ClosedTime - CreateTime)?.Minutes);
|
||||
}
|
||||
}
|
||||
@@ -317,10 +323,9 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
[DictionaryTranslateAttribute("ReuploadEnum")]
|
||||
public QCChanllengeReuploadEnum ReuploadEnum { get; set; }
|
||||
public List<DialogInfo> DialogList { get; set; }
|
||||
|
||||
|
||||
|
||||
public string DialogStr { get; set; }
|
||||
public string DialogStr => string.Join("\n\n", DialogList.OrderBy(t => t.CreateTime).Select(c => c.UserName + " (" + ExportExcelConverterDate.DateTimeInternationalToString(c.CreateTime) + ") :" + c.Content));
|
||||
|
||||
//public SubmitStateEnum SubmitState { get; set; }
|
||||
//public string? CurrentActionUserName { get; set; }
|
||||
@@ -341,6 +346,16 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
}
|
||||
|
||||
public class DialogInfo
|
||||
{
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public string UserName { get; set; }
|
||||
|
||||
public string Content { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class SubjectExportDTO
|
||||
{
|
||||
@@ -636,7 +651,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public int FileCount { get; set; }
|
||||
|
||||
[DictionaryTranslateAttribute("YesOrNo")]
|
||||
public bool IsSuccess { get; set; }
|
||||
public bool IsSuccess { get; set; }
|
||||
|
||||
public string Note { get; set; } = string.Empty;
|
||||
|
||||
@@ -717,7 +732,8 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public string CheckResult { get; set; } = String.Empty;
|
||||
|
||||
|
||||
public string CheckDialogStr { get; set; }
|
||||
public List<DialogInfo> CheckDialogList { get; set; }
|
||||
public string CheckDialogStr => string.Join("\n\n", CheckDialogList.OrderBy(t => t.CreateTime).Select(c => c.UserName + " (" + ExportExcelConverterDate.DateTimeInternationalToString(c.CreateTime) + ") :" + c.Content));
|
||||
|
||||
public DateTime? CheckBackTime { get; set; }
|
||||
|
||||
@@ -792,7 +808,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public string? ReReadingNewTaskCode { get; set; }
|
||||
@@ -988,7 +1004,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public string Answer { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1218,17 +1234,17 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public class GetNextCRCChallengeInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// QCChallengeId
|
||||
/// </summary>
|
||||
public Guid QCChallengeId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// QCChallengeId
|
||||
/// </summary>
|
||||
public Guid QCChallengeId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class ChallengeQuery : PageInput
|
||||
public class ChallengeQuery : PageInput
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
@@ -1247,7 +1263,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public Guid? CreateUserId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class QCCRCChallengeViewModel
|
||||
{
|
||||
@@ -1438,7 +1454,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public List<CheckChanllengeDialogDTO> DialogList { get; set; }
|
||||
}
|
||||
|
||||
public class QCCheckWithModalityView: QCCheckViewModel
|
||||
public class QCCheckWithModalityView : QCCheckViewModel
|
||||
{
|
||||
public DateTime? EarliestScanDate { get; set; }
|
||||
|
||||
@@ -1446,7 +1462,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public List<string> ModalityList { get; set; }
|
||||
|
||||
public string Modalitys =>string.Join(',', ModalityList);
|
||||
public string Modalitys => string.Join(',', ModalityList);
|
||||
}
|
||||
|
||||
public class QCCheckViewModel
|
||||
@@ -1589,7 +1605,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
public bool IsLostVisit { get; set; }
|
||||
|
||||
public string VisitImageZipPath { get; set; }
|
||||
public string VisitImageZipPath { get; set; }
|
||||
|
||||
public PackState PackState { get; set; }
|
||||
|
||||
@@ -1599,7 +1615,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public DateTime? PreliminaryAuditTime { get; set; }
|
||||
|
||||
|
||||
public DateTime? AuditTime => QCProcessEnum == TrialQCProcess.SingleAudit ? PreliminaryAuditTime : (QCProcessEnum == TrialQCProcess.DoubleAudit ? ReviewAuditTime : null);
|
||||
public DateTime? AuditTime => QCProcessEnum == TrialQCProcess.SingleAudit ? PreliminaryAuditTime : (QCProcessEnum == TrialQCProcess.DoubleAudit ? ReviewAuditTime : null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,11 +26,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
|
||||
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.FullName))
|
||||
.ForMember(d => d.ClinicalInformationTransmissionEnum, u => u.MapFrom(s => s.Trial.ClinicalInformationTransmissionEnum))
|
||||
|
||||
|
||||
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count > 0)
|
||||
|| t.PreviousSurgeryList.Any() : false))
|
||||
|
||||
|
||||
.ForMember(d => d.DicomStudyCount, u => u.MapFrom(t => t.StudyList.Count()))
|
||||
.ForMember(d => d.NoneDicomStudyCount, u => u.MapFrom(t => t.NoneDicomStudyList.Count(t => t.NoneDicomFileList.Any())));
|
||||
|
||||
@@ -40,9 +40,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(s => s.CurrentActionUser.UserName))
|
||||
.ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.PreliminaryAuditUser.UserName))
|
||||
.ForMember(d => d.ReviewAuditUserName, u => u.MapFrom(s => s.ReviewAuditUser.UserName));
|
||||
|
||||
|
||||
|
||||
CreateMap<QCChallengeDialog, DialogInfo>()
|
||||
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
|
||||
|
||||
CreateMap<QCChallenge, QCChanllengeExportDto>()
|
||||
|
||||
@@ -53,7 +56,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||
.ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName))
|
||||
|
||||
.ForMember(d => d.DialogStr, u => u.MapFrom(t => string.Join("\n\n", t.DialogList.OrderBy(t => t.CreateTime).Select(c => c.CreateUser.UserName + " (" + c.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") + ") :" + c.TalkContent))))
|
||||
.ForMember(d => d.DialogList, u => u.MapFrom(t => t.DialogList))
|
||||
|
||||
//.ForMember(d => d.DialogStr, u => u.MapFrom(t => string.Join("\n\n", t.DialogList.OrderBy(t => t.CreateTime)
|
||||
//.Select(c => c.CreateUser.UserName + " (" + c.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") + ") :" + c.TalkContent))))
|
||||
|
||||
.ForMember(d => d.SubjectState, u => u.MapFrom(s => s.SubjectVisit.Subject.Status));
|
||||
|
||||
@@ -96,7 +102,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
// .ForMember(d => d.ReadingStatus, u => u.MapFrom(s => s.VisitTaskList
|
||||
// .Count(t=>t.TaskState==TaskState.Effect && t.IsAnalysisCreate==false && t.ReadingCategory==ReadingCategory.Visit && t.ReadingTaskState==ReadingTaskState.HaveSigned)==s. s.ReadingStatus))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -111,13 +117,20 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.FirstGiveMedicineTime, u => u.MapFrom(s => s.Subject.FirstGiveMedicineTime))
|
||||
.ForMember(d => d.TrialReadingCriterionName, u => u.MapFrom(s => s.TrialReadingCriterion.CriterionName));
|
||||
|
||||
CreateMap<CheckChallengeDialog, DialogInfo>()
|
||||
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
|
||||
.ForMember(d => d.UserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||
.ForMember(d => d.Content, u => u.MapFrom(s => s.TalkContent));
|
||||
|
||||
CreateMap<SubjectVisit, PMKCheckEXportDTO>()
|
||||
.ForMember(d => d.TalkContent, u => u.MapFrom(s => s.CheckChallengeDialogList.OrderByDescending(y => y.CreateTime).Select(x => x.TalkContent).FirstOrDefault()))
|
||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
|
||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
||||
|
||||
.ForMember(d => d.CheckDialogStr, u => u.MapFrom(t => string.Join("\n\n", t.CheckChallengeDialogList.OrderBy(t => t.CreateTime).Select(c => c.CreateUser.UserName + " (" + c.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") + ") :" + c.TalkContent))))
|
||||
.ForMember(d => d.CheckDialogList, u => u.MapFrom(s => s.CheckChallengeDialogList))
|
||||
//.ForMember(d => d.CheckDialogStr, u => u.MapFrom(t => string.Join("\n\n",
|
||||
//t.CheckChallengeDialogList.OrderBy(t => t.CreateTime).Select(c => c.CreateUser.UserName + " (" + c.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") + ") :" + c.TalkContent))))
|
||||
|
||||
.ForMember(d => d.ModalityList, c => c.MapFrom(s =>
|
||||
(s.NoneDicomStudyList.Select(t => t.Modality)
|
||||
.Union(s.StudyList.Select(k => k.ModalityForEdit))).Distinct()))
|
||||
@@ -155,13 +168,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.VisitTask.Subject.MedicalNo))
|
||||
.ForMember(o => o.DoctorUserName, t => t.MapFrom(u => u.VisitTask.DoctorUser.UserName))
|
||||
.ForMember(o => o.MedicalManagerUserName, t => t.MapFrom(u => u.MedicalManagerUser.UserName))
|
||||
.ForMember(o => o.QuestionContent, t => t.MapFrom(u=> string.Join("\n\n", u.ReadingMedicalReviewDialogList.Where(t => t.IsHaveQuestion).Select(t=>t.Questioning))) );
|
||||
.ForMember(o => o.QuestionContent, t => t.MapFrom(u => string.Join("\n\n", u.ReadingMedicalReviewDialogList.Where(t => t.IsHaveQuestion).Select(t => t.Questioning))));
|
||||
|
||||
CreateMap<VisitTask, TaskMedicalReviewExportDto>()
|
||||
.ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName))
|
||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
|
||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsSelfAnalysis == true ? u.BlindSubjectCode : u.Subject.Code))
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -173,8 +186,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
|
||||
.ForMember(o => o.IsBaseline, t => t.MapFrom(u => u.SourceSubjectVisit.IsBaseLine))
|
||||
.ForMember(o => o.EvaluateResult, t => t.MapFrom(u =>
|
||||
u.SourceSubjectVisit.IsBaseLine? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.ExistDisease).FirstOrDefault()!.Answer
|
||||
: u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).FirstOrDefault()!.Answer ))
|
||||
u.SourceSubjectVisit.IsBaseLine ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.ExistDisease).FirstOrDefault()!.Answer
|
||||
: u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).FirstOrDefault()!.Answer))
|
||||
|
||||
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName));
|
||||
|
||||
@@ -191,15 +204,15 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(o => o.JudgeArmEnum, t => t.MapFrom(u => u.JudgeResultTask.ArmEnum))
|
||||
|
||||
.ForMember(o => o.OverallTumorEvaluationResult, t => t.MapFrom(u =>
|
||||
criterionType == CriterionType.RECIST1Point1 ?( u.SourceSubjectVisit.IsBaseLine==true ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.ExistDisease).FirstOrDefault()!.Answer:
|
||||
u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).Select(t=>t.IsGlobalChange?t.GlobalChangeAnswer:t.Answer).FirstOrDefault())
|
||||
criterionType == CriterionType.RECIST1Point1 ? (u.SourceSubjectVisit.IsBaseLine == true ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.ExistDisease).FirstOrDefault()!.Answer :
|
||||
u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.Tumor).Select(t => t.IsGlobalChange ? t.GlobalChangeAnswer : t.Answer).FirstOrDefault())
|
||||
: criterionType == CriterionType.PCWG3 ? u.ReadingTaskQuestionAnswerList.Where(c => c.ReadingQuestionTrial.QuestionType == QuestionType.SiteVisitForTumorEvaluation).FirstOrDefault()!.Answer : String.Empty
|
||||
))
|
||||
|
||||
.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode))
|
||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code))
|
||||
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
|
||||
//.ForMember(o => o.GlobalTaskAnswerList, t => t.MapFrom(u => u.GlobalVisitResultList.Where(t=>t.GlobalAnswerType== GlobalAnswerType.Question).Select(c=>new GlobalAnswerInfo() { GlobalTaskVisitNum=c.VisitTask.VisitTaskNum,VisitTaskId=c.TaskId ,Answer=c.Answer})))
|
||||
//.ForMember(o => o.GlobalTaskAnswerList, t => t.MapFrom(u => u.GlobalVisitResultList.Where(t=>t.GlobalAnswerType== GlobalAnswerType.Question).Select(c=>new GlobalAnswerInfo() { GlobalTaskVisitNum=c.VisitTask.VisitTaskNum,VisitTaskId=c.TaskId ,Answer=c.Answer})))
|
||||
|
||||
|
||||
;
|
||||
@@ -220,14 +233,14 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
CreateMap<ReadingTableAnswerRowInfo, RECIST1Point1LessionInfo>()
|
||||
.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.RowMark))
|
||||
.ForMember(o => o.LessionType, t => t.MapFrom(u =>(int?) u.ReadingQuestionTrial.LesionType))
|
||||
.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType))
|
||||
.ForMember(o => o.IsLymph, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.IsLymph).FirstOrDefault()!.Answer))
|
||||
|
||||
//位置可能是自己填写的
|
||||
.ForMember(o => o.LessionLocation, t =>
|
||||
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault().Answer)
|
||||
t.MapFrom(u => isEn_Us ? u.OrganInfo.PartEN : u.OrganInfo.Part)
|
||||
|
||||
|
||||
)
|
||||
.ForMember(o => o.LessionOrgan, t =>
|
||||
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Organ).FirstOrDefault().Answer)
|
||||
@@ -239,7 +252,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
//u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault()!.Answer : isEn_Us ? u.OrganInfo.TULATEN : u.OrganInfo.TULAT)
|
||||
t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.BodyPartDescription).FirstOrDefault()!.Answer)
|
||||
)
|
||||
|
||||
|
||||
.ForMember(o => o.LongDiameter, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.MajorAxis).FirstOrDefault()!.Answer))
|
||||
.ForMember(o => o.ShortDiameter, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.ShortAxis).FirstOrDefault()!.Answer))
|
||||
.ForMember(o => o.LessionState, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State).FirstOrDefault()!.Answer));
|
||||
@@ -267,7 +280,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(o => o.BodyPartDescription, t =>
|
||||
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Part).FirstOrDefault().Answer)
|
||||
t.MapFrom(u => isEn_Us ? u.OrganInfo.PartEN : u.OrganInfo.Part)
|
||||
)
|
||||
)
|
||||
.ForMember(o => o.LessionState, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State).FirstOrDefault()!.Answer));
|
||||
|
||||
#endregion
|
||||
@@ -328,8 +341,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
CreateMap<TrialQCQuestion, TrialQCQuestionSelect>();
|
||||
|
||||
CreateMap<TrialQCQuestion, QCQuestionView>();
|
||||
CreateMap<QCQuestion, QCQuestionView>();
|
||||
CreateMap<TrialQCQuestion, QCQuestionView>();
|
||||
CreateMap<QCQuestion, QCQuestionView>();
|
||||
|
||||
|
||||
CreateMap<QCQuestion, QCQuestionConfigureView>()
|
||||
@@ -385,10 +398,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.QCProcessEnum, u => u.MapFrom(s => s.Trial.QCProcessEnum))
|
||||
.ForMember(d => d.SubjectStatus, u => u.MapFrom(s => s.Subject.Status))
|
||||
.ForMember(d => d.StudyCount, u => u.MapFrom(s => s.StudyList.Count()))
|
||||
|
||||
|
||||
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.UserName))
|
||||
.ForMember(d => d.SubmitUserRealName, u => u.MapFrom(s => s.SubmitUser.FullName))
|
||||
|
||||
|
||||
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(s => s.CurrentActionUser.UserName))
|
||||
.ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.PreliminaryAuditUser.UserName))
|
||||
.ForMember(d => d.ReviewAuditUserName, u => u.MapFrom(s => s.ReviewAuditUser.UserName))
|
||||
@@ -412,12 +425,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.Sex, u => u.MapFrom(s => s.Subject.Sex))
|
||||
.ForMember(d => d.Age, u => u.MapFrom(t => t.Subject.Age))
|
||||
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
||||
|| t.Subject.ClinicalFormList.Any(x=>x.ClinicalDataTrialSet.UploadRole==UploadRole.CRC&& x.ReadingId==t.Id)
|
||||
|| t.Subject.ClinicalFormList.Any(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == t.Id)
|
||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count > 0)
|
||||
|| t.PreviousSurgeryList.Any()))
|
||||
|
||||
.ForMember(d => d.IsHaveUploadFailed, u => u.MapFrom(t => t.StudyList.SelectMany(c=>c.DicomStudyMonitorList).Any(h => h.FailedFileCount>0) ))
|
||||
|
||||
.ForMember(d => d.IsHaveUploadFailed, u => u.MapFrom(t => t.StudyList.SelectMany(c => c.DicomStudyMonitorList).Any(h => h.FailedFileCount > 0)))
|
||||
|
||||
//.ForMember(d => d.VisitName, u => u.MapFrom(t =>t.InPlan? t.VisitStage.VisitName : t.VisitName))
|
||||
//.ForMember(d => d.VisitNum, u => u.MapFrom(t => t.InPlan ? t.VisitStage.VisitNum : t.VisitNum))
|
||||
//.ForMember(d => d.VisitDay, u => u.MapFrom(t => t.InPlan ? t.VisitStage.VisitDay : t.VisitDay))
|
||||
@@ -436,7 +449,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.ModalityList, c => c.MapFrom(s =>
|
||||
(s.NoneDicomStudyList.Select(t => t.Modality)
|
||||
.Union(s.StudyList.Select(k => k.ModalityForEdit))).Distinct()));
|
||||
|
||||
|
||||
|
||||
//一致性核查 质疑对话
|
||||
CreateMap<CheckChallengeDialog, CheckChanllengeDialogDTO>()
|
||||
@@ -581,7 +594,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
CreateMap<NoneDicomStudy, NoneDicomStudyView>()
|
||||
//.ForMember(d => d.FileCount, u => u.MapFrom(s => s.NoneDicomFileList.Count))
|
||||
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip? s.NoneDicomFileList.Where(t=>!t.FileType.Contains(StaticData.FileType.Zip)): s.NoneDicomFileList))
|
||||
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s => isFilterZip ? s.NoneDicomFileList.Where(t => !t.FileType.Contains(StaticData.FileType.Zip)) : s.NoneDicomFileList))
|
||||
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user