IRC 迁移HIR 功能初步修改
parent
3603656a1c
commit
8e6125796b
|
@ -74,7 +74,7 @@ namespace IRaCIS.Core.SCP.Service
|
|||
|
||||
//using (@lock.Acquire())
|
||||
{
|
||||
var findPatient = await _patientRepository.FirstOrDefaultAsync(t => t.PatientIdStr == patientIdStr && t.TrialSiteId==trialSiteId );
|
||||
var findPatient = await _patientRepository.FirstOrDefaultAsync(t => t.PatientIdStr == patientIdStr /*&& t.TrialSiteId==trialSiteId*/ );
|
||||
var findStudy = await _studyRepository.FirstOrDefaultAsync(t=>t.Id== studyId);
|
||||
var findSerice = await _seriesRepository.FirstOrDefaultAsync(t => t.Id == seriesId);
|
||||
var findInstance = await _instanceRepository.FirstOrDefaultAsync(t => t.Id == instanceId);
|
||||
|
@ -90,8 +90,8 @@ namespace IRaCIS.Core.SCP.Service
|
|||
findPatient = new SCPPatient()
|
||||
{
|
||||
Id = NewId.NextSequentialGuid(),
|
||||
TrialId=trialId,
|
||||
TrialSiteId=trialSiteId,
|
||||
//TrialId=trialId,
|
||||
//TrialSiteId=trialSiteId,
|
||||
PatientIdStr = dataset.GetSingleValueOrDefault(DicomTag.PatientID, string.Empty),
|
||||
PatientName = dataset.GetSingleValueOrDefault(DicomTag.PatientName, string.Empty),
|
||||
PatientAge = dataset.GetSingleValueOrDefault(DicomTag.PatientAge, string.Empty),
|
||||
|
@ -163,8 +163,8 @@ namespace IRaCIS.Core.SCP.Service
|
|||
|
||||
PatientId = findPatient.Id,
|
||||
Id = studyId,
|
||||
TrialId = trialId,
|
||||
TrialSiteId = trialSiteId,
|
||||
//TrialId = trialId,
|
||||
//TrialSiteId = trialSiteId,
|
||||
StudyInstanceUid = studyInstanceUid,
|
||||
StudyTime = studyTime,
|
||||
Modalities = dataset.GetSingleValueOrDefault(DicomTag.Modality, string.Empty),
|
||||
|
|
|
@ -36,6 +36,8 @@ public class ServiceVerifyConfigOption
|
|||
|
||||
public string ThirdPdfUrl { get; set; }
|
||||
|
||||
public string AESKey { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class SystemEmailSendConfig
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
public class Cryptography
|
||||
{
|
||||
public static string EncryptString(string plainText, string key, string iv)
|
||||
{
|
||||
using (Aes aesAlg = Aes.Create())
|
||||
{
|
||||
aesAlg.Key = GetKeyBytes(key, aesAlg.KeySize / 8);
|
||||
aesAlg.IV = GetKeyBytes(iv, 16);
|
||||
|
||||
ICryptoTransform encryptor = aesAlg.CreateEncryptor(aesAlg.Key, aesAlg.IV);
|
||||
|
||||
using (MemoryStream msEncrypt = new MemoryStream())
|
||||
{
|
||||
using (CryptoStream csEncrypt = new CryptoStream(msEncrypt, encryptor, CryptoStreamMode.Write))
|
||||
{
|
||||
byte[] plainBytes = Encoding.UTF8.GetBytes(plainText);
|
||||
csEncrypt.Write(plainBytes, 0, plainBytes.Length);
|
||||
csEncrypt.FlushFinalBlock();
|
||||
}
|
||||
return Convert.ToBase64String(msEncrypt.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string DecryptString(string cipherText, string key, string iv)
|
||||
{
|
||||
byte[] cipherBytes = Convert.FromBase64String(cipherText);
|
||||
using (Aes aesAlg = Aes.Create())
|
||||
{
|
||||
aesAlg.Key = GetKeyBytes(key, aesAlg.KeySize / 8);
|
||||
aesAlg.IV = GetKeyBytes(iv, 16);
|
||||
|
||||
ICryptoTransform decryptor = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV);
|
||||
|
||||
using (MemoryStream msDecrypt = new MemoryStream(cipherBytes))
|
||||
{
|
||||
using (CryptoStream csDecrypt = new CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read))
|
||||
{
|
||||
using (StreamReader srDecrypt = new StreamReader(csDecrypt))
|
||||
{
|
||||
return srDecrypt.ReadToEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static byte[] GetKeyBytes(string key, int keySize)
|
||||
{
|
||||
|
||||
|
||||
using (var deriveBytes = new PasswordDeriveBytes(key, null))
|
||||
{
|
||||
return deriveBytes.GetBytes(keySize);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -863,23 +863,6 @@
|
|||
<param name="_trialRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetTrialDownloadList_Export(IRaCIS.Core.Application.Contracts.TrialIamgeDownQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialImageDownload},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
<summary>
|
||||
影像下载记录表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<param name="_trialImageDownloadRepository"></param>
|
||||
<param name="_dictionaryService"></param>
|
||||
<param name="_trialRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetSCPImageUploadList_Export(IRaCIS.Application.Contracts.SCPImageUploadQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SCPImageUpload},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
<summary>
|
||||
影像接收记录表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetInternationalizationList_Export(IRaCIS.Core.Application.ViewModel.InternationalizationQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Internationalization},IRaCIS.Application.Interfaces.IDictionaryService)">
|
||||
<summary>
|
||||
国际化导出
|
||||
|
@ -887,25 +870,6 @@
|
|||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetPatientList_Export(IRaCIS.Application.Contracts.PatientTrialQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SCPPatient},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
<summary>
|
||||
影像检查列表-患者为维度组织
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<param name="_patientRepository"></param>
|
||||
<param name="_dictionaryService"></param>
|
||||
<param name="_trialRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetEmailNoticeConfigList_Export(IRaCIS.Core.Application.Contracts.EmailNoticeConfigQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.EmailNoticeConfig},IRaCIS.Application.Interfaces.IDictionaryService)">
|
||||
<summary>
|
||||
邮件导出
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<param name="_emailNoticeConfigrepository"></param>
|
||||
<param name="_dictionaryService"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.Common.ExcelExportService.GetAnalysisTaskList_Export(IRaCIS.Core.Application.ViewModel.VisitTaskQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.CommonDocument},IRaCIS.Application.Interfaces.IDictionaryService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||
<summary>
|
||||
一致性分析结果导出 7 8 分别是自身 和组件一致性
|
||||
|
@ -12824,42 +12788,20 @@
|
|||
TrialSiteDicomAEService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.PatientService.GetSCPImageUploadList(IRaCIS.Application.Contracts.SCPImageUploadQuery)">
|
||||
<member name="T:IRaCIS.Core.Application.Service.DicomAEService">
|
||||
<summary>
|
||||
scp 影像推送记录表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
DicomAEService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.PatientService.GetPatientList(IRaCIS.Application.Contracts.PatientTrialQuery)">
|
||||
<summary>
|
||||
影像检查列表-患者为维度组织
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.PatientService.GetPatientStudyList(IRaCIS.Application.Contracts.PatientStudyInfoQuery)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.DicomAEService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomAE},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo)">
|
||||
<summary>
|
||||
影像检查列表-> 获取患者的检查列表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
DicomAEService
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.PatientService.GetVisitPatientStudyFilterList(IRaCIS.Application.Contracts.VisitPatientStudyFilterQuery)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.DicomAEService.TestSCPServerConnect(System.Guid)">
|
||||
<summary>
|
||||
影像访视上传 检查列表
|
||||
测试scp server 是否可以连接
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.PatientService.SubmitVisitStudyBinding(IRaCIS.Application.Contracts.SubmitVisitStudyBindingCommand,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance})">
|
||||
<summary>
|
||||
提交 患者检查和访视的绑定
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<param name="_dicomstudyRepository"></param>
|
||||
<param name="_dicomSeriesRepository"></param>
|
||||
<param name="_dicomInstanceRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.SubjectService.AddOrUpdateSubject(IRaCIS.Application.Contracts.SubjectCommand)">
|
||||
|
@ -17655,5 +17597,304 @@
|
|||
<member name="M:IRaCIS.Application.Interfaces.ITrialEnrollmentService.ConfirmReviewer(System.Guid,System.Guid[],System.Int32)">
|
||||
<summary>入组流程-向CRO提交医生[Submit]</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetHospitalInfo(Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Application.Contracts.SystemHospitalOption})">
|
||||
<summary>
|
||||
获取医院的配置信息
|
||||
</summary>
|
||||
<param name="options"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.UpdateHospitalInfo(IRaCIS.Application.Contracts.SystemHospitalOption)">
|
||||
<summary>
|
||||
配置医院信息,方便测试邮件和授权码的方式
|
||||
</summary>
|
||||
<param name="systemHospitalOption"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetSystemConfirmedCreiterionList(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionSystem})">
|
||||
<summary>
|
||||
获取系统已确认的标准
|
||||
</summary>
|
||||
<param name="_readingQuestionCriterionSystemRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetTrialList(IRaCIS.Application.Contracts.NewTrialQuery)">
|
||||
<summary>
|
||||
获取项目列表 (PM CRC 共用)
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.AddOrUpdateTrial(IRaCIS.Application.Contracts.AddOrUpdateTrialCommand,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Application.Contracts.SystemHospitalOption},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialDictionary},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUser},ZiggyCreatures.Caching.Fusion.IFusionCache)">
|
||||
<summary>
|
||||
添加更新项目
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<param name="_systemEmailSendConfig"></param>
|
||||
<param name="_provider"></param>
|
||||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetTrialAuthorizationCode(IRaCIS.Application.Contracts.TrialAuthorizationInfo,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Application.Contracts.SystemHospitalOption})">
|
||||
<summary>
|
||||
获取项目授权码
|
||||
</summary>
|
||||
<param name="authInfo"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetAuthorizationCodeInfo(System.String,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Application.Contracts.SystemHospitalOption})">
|
||||
<summary>
|
||||
获取授权码明文信息
|
||||
</summary>
|
||||
<param name="authorizationCode"></param>
|
||||
<param name="_hospitalOption"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetTrialActivationCode(IRaCIS.Application.Contracts.TrialAuthorizationInfo,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption})">
|
||||
<summary>
|
||||
获取项目激活码
|
||||
</summary>
|
||||
<param name="authorizationInfo"></param>
|
||||
<param name="_basicSystemConfigConfig"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetActivationCodeInfo(System.String,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Application.Contracts.SystemHospitalOption},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption})">
|
||||
<summary>
|
||||
激活码获取明文信息
|
||||
</summary>
|
||||
<param name="activationCode"></param>
|
||||
<param name="_hospitalOption"></param>
|
||||
<param name="_basicSystemConfigConfig"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.ActivateTrial(System.Guid,System.String,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption},ZiggyCreatures.Caching.Fusion.IFusionCache,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Application.Contracts.SystemHospitalOption})">
|
||||
<summary>
|
||||
设置项目授权信息
|
||||
</summary>
|
||||
<param name="trialId"></param>
|
||||
<param name="activationCode"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientList(IRaCIS.Application.Contracts.PatientTrialQuery)">
|
||||
<summary>
|
||||
检查管理-> 检查Tab 患者列表 (带加入的项目信息 以及检查统计) 原型标注错误,不是检查列表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientJoinTrialInitList(IRaCIS.Application.Contracts.PatientJoinTrialInitQuery)">
|
||||
<summary>
|
||||
检查管理-> 患者加入项目 初始化勾选列表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientJoinTrialInitSelectList(IRaCIS.Application.Contracts.PatientJoinTrialInitQuery)">
|
||||
<summary>
|
||||
检查管理-> 患者加入项目 下拉框勾选列表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientJoinedTrialList(IRaCIS.Application.Contracts.PatientJoinedTrialQuery)">
|
||||
<summary>
|
||||
检查管理-> 患者已加入的列表(原型有误,应该展示 项目 下的subject 绑定关系)
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientStudyList(IRaCIS.Application.Contracts.PatientStudyInfoQuery)">
|
||||
<summary>
|
||||
检查管理-> 获取患者检查列表(同步影像数据之前的)
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.DeletePatientStudyAllData(System.Guid,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SCPSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SCPInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Application.Helper.IOSSService)">
|
||||
<summary>
|
||||
清除该患者绑定的受试者的所有的数据、(subject subjectVisit visitTask dicom)
|
||||
</summary>
|
||||
<param name="patientId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientSubejctList(IRaCIS.Application.Contracts.PatientSubjectQuery)">
|
||||
<summary>
|
||||
受试者管理-> 受试者列表 (带患者信息,患者信息是数组)
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientInitList(IRaCIS.Application.Contracts.PatientQuery)">
|
||||
<summary>
|
||||
受试者管理-> 患者列表 (subject 列表进入,进行关系绑定初始化列表,排除已绑定的患者和已绑定给其他subject的患者)
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetDicomCalledAEList">
|
||||
<summary>
|
||||
受试者管理->患者列表 Dicom AE 下拉框数据获取
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetTrialSubejctSelectList(IRaCIS.Application.Contracts.SubjectSelectQuery)">
|
||||
<summary>
|
||||
受试者管理-> 患者列表 模糊搜索下拉 选择subject 排除已绑定并提交的
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.AutoBindingPatientStudyVisit(IRaCIS.Application.Contracts.AutoBindingPatientStudyVisitCommand)">
|
||||
<summary>
|
||||
之前患者和subject已绑定后,新来了的检查 可能需要新建访视,或者和已有访视在同一区间,需要自动绑定
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.AddSubjectPatientBinding(IRaCIS.Application.Contracts.AddSubjectPatientCommand,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit})">
|
||||
<summary>
|
||||
建立subject与患者绑定 如果是下拉,则传递SubjectId,如果不存在,创建,那么就传递 SubjectCode
|
||||
|
||||
绑定以后,后台自动创建访视 和检查预先绑定
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.DeleteSubjectPatientBinding(IRaCIS.Application.Contracts.DeleteSubejctPatientCommand,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance})">
|
||||
<summary>
|
||||
删除 受试者 和患者之间的绑定
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.AddSubjectPatientStudyBinding(System.Collections.Generic.List{IRaCIS.Application.Contracts.AddSubjectPatientStudyVisitCommand})">
|
||||
<summary>
|
||||
患者检查 与SubjectVisit 的绑定
|
||||
</summary>
|
||||
<param name="inCommandList"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.UpdateSubjectVisitStudyBinding(IRaCIS.Application.Contracts.UpdateSubjectVisitStudyBindingCommand)">
|
||||
<summary>
|
||||
修改 访视 和检查的绑定关系 IsAdd 区分添加 还是移除
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.SubmitVisitStudyBinding(IRaCIS.Application.Contracts.SubmitVisitStudyBindingCommand,Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.ServiceVerifyConfigOption},IRaCIS.Core.Infra.EFCore.IRepository)">
|
||||
<summary>
|
||||
提交 患者检查和访视的绑定
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetVisitPatientStudyList(IRaCIS.Application.Contracts.PatientStudyQuery)">
|
||||
<summary>
|
||||
绑定访视 初始化患者检查列表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetSubjectVisitSelectList(IRaCIS.Application.Contracts.SubjectVisitSelectQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit})">
|
||||
<summary>
|
||||
访视管理- 获取subject 已存在的访视列表 ,同时获取项目访视的配置 在otherData里
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<param name="_subjectVisitReposiotry"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.AddOrUpdateSubjectVisit(IRaCIS.Application.Contracts.AddOrUpdateSubjectVisitCommand,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit})">
|
||||
<summary>
|
||||
添加或者更新受试者访视
|
||||
</summary>
|
||||
<param name="incommand"></param>
|
||||
<param name="_subjectVisitReposiotry"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetSubjectImageZipInfo(System.Guid,System.Guid)">
|
||||
<summary>
|
||||
前端利用组件打成压缩包,后端返回路径和压缩包的信息
|
||||
</summary>
|
||||
<param name="subjectId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientSubejctVisitList(IRaCIS.Application.Contracts.PatientSubejctVisitQuery)">
|
||||
<summary>
|
||||
访视管理-> 访视列表 (带患者信息,患者信息是数组)
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetCurrentVisitPatientStudyList(IRaCIS.Application.Contracts.SubjectVisitStudyQuery)">
|
||||
<summary>
|
||||
访视管理-> 获取当前访视 已绑定的患者检查 (从访视列表 进入修改绑定)
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientOtherStudyList(IRaCIS.Application.Contracts.PatientStudyOtherQuery)">
|
||||
<summary>
|
||||
访视管理-> 获取可选访视列表 (从访视列表 进入修改绑定)
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientStudyBeforeConfirmList(IRaCIS.Application.Contracts.TrialPatientStudyQuery)">
|
||||
<summary>
|
||||
检查管理-> 检查列表 (同步影像数据之前的)
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetTrialPatientStudyList(IRaCIS.Application.Contracts.TrialPatientStudyQuery,IRaCIS.Core.Infra.EFCore.IRepository)">
|
||||
<summary>
|
||||
检查管理-> 检查列表 (同步影像数据之后的 带患者信息 患者信息是数组)
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetTrialUnbindSubjectVisitStudyList(IRaCIS.Application.Contracts.TrialPatientStudyQuery)">
|
||||
<summary>
|
||||
获取该项目 患者已绑定subject ,新来了的检查 可能需要新建访视 但是新增的检查未绑定访视的检查列表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.DeleteUnSubmittedStudyBind(System.Guid,System.Nullable{System.Guid},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomStudy},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomSeries},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance})">
|
||||
<summary>
|
||||
删除某个项目 未提交的访视检查绑定, 清理数据,方便测试自动绑定
|
||||
</summary>
|
||||
<param name="trialId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetPatientVisitTaskList(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Application.Contracts.PatientVisitTaskQuery)">
|
||||
<summary>
|
||||
阅片管理-> 任务列表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.RequestPackageAndAnonymizImage(System.Guid,System.Guid,IRaCIS.Core.Application.Helper.IOSSService,System.Boolean)">
|
||||
<summary>
|
||||
打包和匿名化影像 默认是匿名化打包,也可以不匿名化打包
|
||||
</summary>
|
||||
<param name="trialId"></param>
|
||||
<param name="subjectVisitId"></param>
|
||||
<param name="isAnonymize"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetTrialSubjectVisitDownloadList(IRaCIS.Application.Contracts.VisitImageDownloadQuery)">
|
||||
<summary>
|
||||
访视影像下载记录表
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.PatientService.GetSCPImageUploadList(IRaCIS.Application.Contracts.SCPImageUploadQuery)">
|
||||
<summary>
|
||||
scp 影像推送记录表
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
|
|
@ -230,7 +230,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
ExperimentName = t.ExperimentName,
|
||||
TrialCode = t.TrialCode,
|
||||
CreateTime = t.CreateTime,
|
||||
Sponsor = _userInfo.IsEn_Us ? t.Sponsor.SponsorName : t.Sponsor.SponsorNameCN,
|
||||
Sponsor = t.Sponsor,
|
||||
TrialStatusStr = t.TrialStatusStr,
|
||||
|
||||
ExpetiedTaskCount = isPM ? t.VisitTaskList.Where(t => t.IsUrgent).Count() : 0,
|
||||
|
@ -1213,78 +1213,8 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 影像下载记录表
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <param name="_trialImageDownloadRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetTrialDownloadList_Export(TrialIamgeDownQuery inQuery,
|
||||
[FromServices] IRepository<TrialImageDownload> _trialImageDownloadRepository,
|
||||
[FromServices] IDictionaryService _dictionaryService,
|
||||
[FromServices] IRepository<Trial> _trialRepository)
|
||||
{
|
||||
var query = _trialImageDownloadRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(inQuery.SubjectCode.IsNotNullOrEmpty(), t => t.SubjectCode.Contains(inQuery.SubjectCode))
|
||||
.WhereIf(inQuery.IP.IsNotNullOrEmpty(), t => t.IP.Contains(inQuery.IP))
|
||||
.WhereIf(inQuery.Name.IsNotNullOrEmpty(), t => t.CreateUser.UserName.Contains(inQuery.Name) || t.CreateUser.FullName.Contains(inQuery.Name))
|
||||
.WhereIf(inQuery.ImageType != null, t => t.ImageType == inQuery.ImageType)
|
||||
.WhereIf(inQuery.UserType != null, t => t.CreateUser.UserTypeEnum == inQuery.UserType)
|
||||
.WhereIf(inQuery.IsSuccess != null, t => t.IsSuccess == inQuery.IsSuccess)
|
||||
.WhereIf(inQuery.DownloadStartTime != null, t => t.DownloadStartTime >= inQuery.DownloadStartTime)
|
||||
.WhereIf(inQuery.DownloadEndTime != null, t => t.DownloadEndTime <= inQuery.DownloadEndTime)
|
||||
|
||||
.ProjectTo<TrialImageDownloadExportDto>(_mapper.ConfigurationProvider);
|
||||
|
||||
var list = await query.SortToListAsync(inQuery);
|
||||
|
||||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialImageDownloadList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialImageDownloadExportDto));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 影像接收记录表
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetSCPImageUploadList_Export(SCPImageUploadQuery inQuery,
|
||||
[FromServices] IRepository<SCPImageUpload> _scpImageUploadRepository,
|
||||
[FromServices] IDictionaryService _dictionaryService,
|
||||
[FromServices] IRepository<Trial> _trialRepository)
|
||||
{
|
||||
var query = _scpImageUploadRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.CalledAE), t => t.CalledAE.Contains(inQuery.CalledAE))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.CallingAEIP), t => t.CallingAEIP.Contains(inQuery.CallingAEIP))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.CallingAE), t => t.CallingAE.Contains(inQuery.CallingAE))
|
||||
.WhereIf(inQuery.StartTime != null, t => t.StartTime >= inQuery.StartTime)
|
||||
.WhereIf(inQuery.EndTime != null, t => t.EndTime <= inQuery.EndTime)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteKeyInfo), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteKeyInfo)
|
||||
|| t.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteKeyInfo) || t.TrialSite.TrialSiteName.Contains(inQuery.TrialSiteKeyInfo))
|
||||
.ProjectTo<SCPImageUploadExportDTO>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
var list = await query.SortToListAsync(inQuery);
|
||||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSCPImageUploadList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SCPImageUploadExportDTO));
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 国际化导出
|
||||
|
@ -1322,110 +1252,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///影像检查列表-患者为维度组织
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <param name="_patientRepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <param name="_trialRepository"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetPatientList_Export(PatientTrialQuery inQuery,
|
||||
[FromServices] IRepository<SCPPatient> _patientRepository,
|
||||
[FromServices] IDictionaryService _dictionaryService,
|
||||
[FromServices] IRepository<Trial> _trialRepository)
|
||||
{
|
||||
|
||||
|
||||
|
||||
var query = _patientRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientIdStr), t => t.PatientIdStr.Contains(inQuery.PatientIdStr))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientName), t => t.PatientName.Contains(inQuery.PatientName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubejctCode), t => t.Subject.Code.Contains(inQuery.SubejctCode))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteKeyInfo), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteKeyInfo)
|
||||
|| t.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteKeyInfo) || t.TrialSite.TrialSiteName.Contains(inQuery.TrialSiteKeyInfo))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.CallingAE), t => t.SCPStudyList.Any(t => t.CallingAE == inQuery.CallingAE))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.CalledAE), t => t.SCPStudyList.Any(t => t.CalledAE == inQuery.CalledAE))
|
||||
.WhereIf(inQuery.BeginPushTime != null, t => t.LatestPushTime >= inQuery.BeginPushTime)
|
||||
.WhereIf(inQuery.EndPushTime != null, t => t.LatestPushTime <= inQuery.EndPushTime);
|
||||
|
||||
|
||||
var resultQuery = from patient in query
|
||||
|
||||
select new SCPPatientSubjectExportDTO()
|
||||
{
|
||||
//CreateUserId = patient.CreateUserId,
|
||||
//UpdateTime = patient.UpdateTime,
|
||||
//UpdateUserId = patient.UpdateUserId,
|
||||
//TrialId = patient.TrialId,
|
||||
//SubejctId = patient.SubjectId,
|
||||
//CreateTime = patient.CreateTime,
|
||||
//PatientId = patient.Id,
|
||||
|
||||
PatientBirthDate = patient.PatientBirthDate,
|
||||
CalledAEList = patient.SCPStudyList.Select(t => t.CalledAE).Distinct().ToList(),
|
||||
CallingAEList = patient.SCPStudyList.Select(t => t.CallingAE).Distinct().ToList(),
|
||||
EarliestStudyTime = patient.EarliestStudyTime,
|
||||
LatestStudyTime = patient.LatestStudyTime,
|
||||
LatestPushTime = patient.LatestPushTime,
|
||||
PatientAge = patient.PatientAge,
|
||||
PatientName = patient.PatientName,
|
||||
PatientIdStr = patient.PatientIdStr,
|
||||
PatientSex = patient.PatientSex,
|
||||
StudyCount = patient.SCPStudyList.Count(),
|
||||
SubjectCode = patient.Subject.Code,
|
||||
TrialSiteAliasName = patient.TrialSite.TrialSiteAliasName,
|
||||
TrialSiteCode = patient.TrialSite.TrialSiteCode,
|
||||
TrialSiteName = patient.TrialSite.TrialSiteName
|
||||
|
||||
};
|
||||
|
||||
var list = await resultQuery.SortToListAsync(inQuery);
|
||||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSCPImageUploadPatientList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SCPPatientSubjectExportDTO));
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 邮件导出
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <param name="_emailNoticeConfigrepository"></param>
|
||||
/// <param name="_dictionaryService"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> GetEmailNoticeConfigList_Export(EmailNoticeConfigQuery inQuery,
|
||||
[FromServices] IRepository<EmailNoticeConfig> _emailNoticeConfigrepository,
|
||||
[FromServices] IDictionaryService _dictionaryService)
|
||||
{
|
||||
var emailNoticeConfigQueryable = _emailNoticeConfigrepository
|
||||
//.WhereIf(inQuery.SystemLevel == null, t => t.SystemLevel == SysEmailLevel.not_sys)
|
||||
//.WhereIf(inQuery.SystemLevel != null, t => t.SystemLevel == inQuery.SystemLevel)
|
||||
//.WhereIf(inQuery.IsDistinguishCriteria != null, t => t.IsDistinguishCriteria == inQuery.IsDistinguishCriteria)
|
||||
.WhereIf(inQuery.CriterionTypeEnum != null, t => t.CriterionTypeEnum == inQuery.CriterionTypeEnum)
|
||||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||
.WhereIf(inQuery.IsReturnRequired != null, t => t.IsReturnRequired == inQuery.IsReturnRequired)
|
||||
.WhereIf(inQuery.IsEnable != null, t => t.IsEnable == inQuery.IsEnable)
|
||||
.ProjectTo<EmailNoticeConfigExportDto>(_mapper.ConfigurationProvider);
|
||||
|
||||
var list = await emailNoticeConfigQueryable.SortToListAsync(inQuery);
|
||||
|
||||
var exportInfo = new ExcelExportInfo();
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.EmailNoticeConfig_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(EmailNoticeConfigExportDto));
|
||||
|
||||
}
|
||||
|
||||
|
||||
#region 导表公用
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
t.Trial.ResearchProgramNo,
|
||||
t.Subject.TrialSite.TrialSiteCode,
|
||||
SubjectCode = t.Subject.Code,
|
||||
t.Trial.Sponsor.SponsorName,
|
||||
t.Trial.Sponsor,
|
||||
t.SourceSubjectVisit.VisitName,
|
||||
t.TrialId,
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
t.Trial.ResearchProgramNo,
|
||||
t.Subject.TrialSite.TrialSiteCode,
|
||||
SubjectCode = t.Subject.Code,
|
||||
t.Trial.Sponsor.SponsorName,
|
||||
t.Trial.Sponsor,
|
||||
t.Trial.IsEnrollementQualificationConfirm,
|
||||
t.Trial.IsPDProgressView,
|
||||
|
||||
|
@ -617,7 +617,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var value = new Dictionary<string, object>()
|
||||
{
|
||||
["SponsorName"] = taskInfo.SponsorName,
|
||||
["SponsorName"] = taskInfo.Sponsor,
|
||||
["ResearchProgramNo"] = taskInfo.ResearchProgramNo,
|
||||
["TrialSiteCode"] = taskInfo.TrialSiteCode,
|
||||
["SubjectCode"] = taskInfo.SubjectCode,
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<TrialPaymentPrice, TrialPaymentPriceDTO>()
|
||||
.ForMember(t => t.TrialCode, u => u.MapFrom(t => t.Trial.Code))
|
||||
.ForMember(t => t.ReviewMode, u => u.MapFrom(t => t.Trial.ReviewMode.Value))
|
||||
.ForMember(t => t.Cro, u => u.MapFrom(t => t.Trial.CRO.CROName))
|
||||
.ForMember(t => t.Cro, u => u.MapFrom(t => t.Trial.CRO))
|
||||
.ForMember(t => t.Indication, u => u.MapFrom(t => t.Trial.Indication))
|
||||
.ForMember(t => t.Expedited, u => u.MapFrom(t => t.Trial.Expedited))
|
||||
.ForMember(t => t.DoctorsNames, u => u.MapFrom(t => string.Join(',', t.Trial.EnrollList.Select(t => t.Doctor.ChineseName))))
|
||||
|
|
|
@ -771,7 +771,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
var succeess2 = await _dicomInstanceRepository.BatchDeleteNoTrackingAsync(t => t.StudyId == id);
|
||||
var success3 = await _dicomSeriesrepository.BatchDeleteNoTrackingAsync(t => t.StudyId == id);
|
||||
|
||||
await _scpStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new SCPStudy() { SubjectVisitId = null });
|
||||
//await _scpStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new SCPStudy() { SubjectVisitId = null });
|
||||
|
||||
|
||||
|
||||
|
@ -797,17 +797,17 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
}
|
||||
|
||||
var subjectId = waitDeleteStudyList.Select(t => t.SubjectId).FirstOrDefault();
|
||||
//var subjectId = waitDeleteStudyList.Select(t => t.SubjectId).FirstOrDefault();
|
||||
|
||||
var patientList = _scpPatientRepository.Where(t => t.SubjectId == subjectId).Select(t => t.Id).ToList();
|
||||
//var patientList = _scpPatientRepository.Where(t => t.SubjectId == subjectId).Select(t => t.Id).ToList();
|
||||
|
||||
foreach (var patientId in patientList)
|
||||
{
|
||||
if (_scpPatientRepository.Where(t => t.Id == patientId).Any(t => t.SCPStudyList.Count() == t.SCPStudyList.Where(t => t.SubjectVisitId == null).Count()))
|
||||
{
|
||||
await _scpPatientRepository.BatchUpdateNoTrackingAsync(t => t.Id == patientId, u => new SCPPatient() { SubjectId = null });
|
||||
}
|
||||
}
|
||||
//foreach (var patientId in patientList)
|
||||
//{
|
||||
// if (_scpPatientRepository.Where(t => t.Id == patientId).Any(t => t.SCPStudyList.Count() == t.SCPStudyList.Where(t => t.SubjectVisitId == null).Count()))
|
||||
// {
|
||||
// await _scpPatientRepository.BatchUpdateNoTrackingAsync(t => t.Id == patientId, u => new SCPPatient() { SubjectId = null });
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace IRaCIS.Core.Application.AutoMapper
|
|||
|
||||
|
||||
CreateMap<Trial, TrialSurveyInitInfo>()
|
||||
.ForMember(d => d.Sponsor, u => u.MapFrom(s => s.Sponsor.SponsorName))
|
||||
.ForMember(d => d.Sponsor, u => u.MapFrom(s => s.Sponsor))
|
||||
.ForMember(d => d.IndicationType, u => u.MapFrom(s => s.IndicationType.Value))
|
||||
.ForMember(d => d.TrialSiteSelectList, u => u.MapFrom(s => s.TrialSiteList))
|
||||
.ForMember(d => d.TrialId, u => u.MapFrom(s => s.Id));
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace IRaCIS.Core.Application.Service.Third_partyProject
|
|||
ExperimentName = t.ExperimentName,
|
||||
TrialCode = t.TrialCode,
|
||||
CreateTime = t.CreateTime,
|
||||
Sponsor = _userInfo.IsEn_Us ? t.Sponsor.SponsorName : t.Sponsor.SponsorNameCN,
|
||||
Sponsor = _userInfo.IsEn_Us ? t.Sponsor : t.Sponsor,
|
||||
TrialStatusStr = t.TrialStatusStr
|
||||
});
|
||||
|
||||
|
|
|
@ -1389,7 +1389,7 @@ namespace IRaCIS.Core.Application
|
|||
ExperimentName = t.ExperimentName,
|
||||
TrialCode = t.TrialCode,
|
||||
CreateTime = t.CreateTime,
|
||||
Sponsor = _userInfo.IsEn_Us ? t.Sponsor.SponsorName : t.Sponsor.SponsorNameCN,
|
||||
Sponsor = t.Sponsor,
|
||||
TrialStatusStr = t.TrialStatusStr,
|
||||
|
||||
ExpetiedTaskCount = isPM ? t.VisitTaskList.Where(t => t.IsUrgent).Count() : 0,
|
||||
|
|
|
@ -67,11 +67,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(x => x.CriterionList, y => y.MapFrom(z => z.TrialReadingCriterionList.Where(n => n.IsConfirm).Select(m => m.CriterionName)))
|
||||
.ForMember(d => d.DictionaryList, u => u.MapFrom(s => s.TrialDicList.Select(t => t.Dictionary).OrderBy(t => t.ShowOrder)))
|
||||
//.ForMember(d => d.Code, u => u.MapFrom(s => s.TrialCode))
|
||||
.ForMember(d => d.Sponsor, u => u.MapFrom(s => s.Sponsor.SponsorName))
|
||||
.ForMember(d => d.Sponsor, u => u.MapFrom(s => s.Sponsor))
|
||||
.ForMember(d => d.Phase, u => u.MapFrom(s => isEn_Us ? s.Phase.Value : s.Phase.ValueCN))
|
||||
//.ForMember(d => d.DeclarationType, u => u.MapFrom(s => s.DeclarationType.MappedValue))
|
||||
.ForMember(d => d.IndicationType, u => u.MapFrom(s => isEn_Us ? s.IndicationType.Value : s.IndicationType.ValueCN))
|
||||
.ForMember(d => d.CRO, u => u.MapFrom(s => s.CRO.CROName))
|
||||
.ForMember(d => d.CRO, u => u.MapFrom(s => s.CRO))
|
||||
.ForMember(d => d.ReviewMode, u => u.MapFrom(s => isEn_Us ? s.ReviewMode.Value : s.ReviewMode.ValueCN))
|
||||
//.ForMember(d => d.ReviewType, u => u.MapFrom(s => s.ReviewType.Value))
|
||||
.ForMember(d => d.IsLocked, u => u.MapFrom(s => s.WorkloadList.Any(u => u.DataFrom == (int)WorkLoadFromStatus.FinalConfirm)))
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Web;
|
||||
|
||||
namespace IRaCIS.Application.Contracts
|
||||
{
|
||||
|
@ -219,83 +222,34 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public class PatientTrialQuery : PageInput
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public string? PatientIdStr { get; set; }
|
||||
public string? PatientName { get; set; }
|
||||
//public List<string> CalledAEList { get; set; } = new List<string>();
|
||||
public List<string> CalledAEList { get; set; } = new List<string>();
|
||||
|
||||
public string? CallingAE { get; set; }
|
||||
public string? CalledAE { get; set; }
|
||||
|
||||
public string? ExperimentName { get; set; } = string.Empty;
|
||||
|
||||
public DateTime? BeginPushTime { get; set; }
|
||||
public DateTime? EndPushTime { get; set; }
|
||||
|
||||
public string SubejctCode { get; set; }
|
||||
|
||||
public string TrialSiteKeyInfo { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class PatientSubjectView : PatientQueryView
|
||||
public class PatientTrialView : PatientQueryView
|
||||
{
|
||||
|
||||
public int? StudyCount { get; set; }
|
||||
|
||||
|
||||
|
||||
public Guid? SubejctId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public string? SubjectCode { get; set; }
|
||||
|
||||
public string? TrialSiteCode { get; set; }
|
||||
|
||||
public string? TrialSiteName { get; set; }
|
||||
|
||||
public string? TrialSiteAliasName { get; set; }
|
||||
|
||||
|
||||
|
||||
public List<PatientTrialStatInfo> TrialList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SCPPatientSubjectExportDTO
|
||||
public class PatientTrialStatInfo
|
||||
{
|
||||
public int? StudyCount { get; set; }
|
||||
public int? VisitCount { get; set; }
|
||||
|
||||
public string? SubjectCode { get; set; }
|
||||
|
||||
public string? TrialSiteCode { get; set; }
|
||||
|
||||
public string? TrialSiteName { get; set; }
|
||||
|
||||
public string? TrialSiteAliasName { get; set; }
|
||||
|
||||
public string PatientIdStr { get; set; } = string.Empty;
|
||||
public string PatientName { get; set; } = string.Empty;
|
||||
public string PatientAge { get; set; } = string.Empty;
|
||||
public string PatientSex { get; set; } = string.Empty;
|
||||
public string PatientBirthDate { get; set; } = string.Empty;
|
||||
|
||||
public DateTime? EarliestStudyTime { get; set; }
|
||||
|
||||
public DateTime? LatestStudyTime { get; set; }
|
||||
|
||||
public DateTime LatestPushTime { get; set; }
|
||||
|
||||
public List<string> CallingAEList { get; set; } = new List<string>();
|
||||
|
||||
public List<string> CalledAEList { get; set; } = new List<string>();
|
||||
|
||||
public string CallingAEListStr => string.Join(",", CallingAEList);
|
||||
|
||||
public string CalledAEListStr => string.Join(",", CalledAEList);
|
||||
public string ExperimentName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class PatientQuery : PageInput
|
||||
{
|
||||
[NotDefault]
|
||||
|
@ -415,9 +369,7 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class VerifyPacsImageCommand
|
||||
public class SubmitVisitStudyBindingCommand
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
@ -425,17 +377,7 @@ namespace IRaCIS.Application.Contracts
|
|||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public List<Guid> SCPStudyIdList { get; set; }
|
||||
}
|
||||
|
||||
public class SubmitVisitStudyBindingCommand : VerifyPacsImageCommand
|
||||
{
|
||||
|
||||
|
||||
public List<Guid> ReUploadSCPStudyIdList { get; set; }
|
||||
public List<Guid> SubjectVisitIdList { get; set; }
|
||||
}
|
||||
|
||||
public class SubjectVisitSelectQuery
|
||||
|
@ -996,10 +938,6 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public class SCPImageUploadQuery : PageInput
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
public string TrialSiteKeyInfo { get; set; }
|
||||
|
||||
public string? CallingAE { get; set; }
|
||||
|
||||
public string? CalledAE { get; set; }
|
||||
|
@ -1028,28 +966,7 @@ namespace IRaCIS.Application.Contracts
|
|||
public long FileSize { get; set; }
|
||||
|
||||
public int StudyCount { get; set; }
|
||||
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid TrialSiteId { get; set; }
|
||||
|
||||
|
||||
public string TrialSiteCode { get; set; }
|
||||
|
||||
public string TrialSiteName { get; set; }
|
||||
|
||||
public string TrialSiteAliasName { get; set; }
|
||||
|
||||
public string UploadIntervalStr
|
||||
{
|
||||
get
|
||||
{
|
||||
var uploadTimeSpan = EndTime - StartTime;
|
||||
|
||||
return $" {uploadTimeSpan.Hours}:{uploadTimeSpan.Minutes}:{uploadTimeSpan.Seconds}.{uploadTimeSpan.Milliseconds}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
public class VisitPatientStudyView : PatientStudySelectDto
|
||||
{
|
||||
|
@ -1073,51 +990,8 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
}
|
||||
|
||||
public class VisitPatientStudyFilterQuery : PageInput
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public DateTime? EarliestStudyTime { get; set; }
|
||||
|
||||
public DateTime? LatestStudyTime { get; set; }
|
||||
public string? Modalities { get; set; }
|
||||
|
||||
public string? PatientInfo { get; set; }
|
||||
}
|
||||
public class VisitPatientStudyFilterView
|
||||
{
|
||||
public Guid SCPStudyId { get; set; }
|
||||
|
||||
public Guid PatientId { get; set; }
|
||||
|
||||
public DateTime? StudyTime { get; set; }
|
||||
public string Modalities { get; set; } = string.Empty;
|
||||
|
||||
public string Description { get; set; } = string.Empty;
|
||||
public int SeriesCount { get; set; } = 0;
|
||||
public int InstanceCount { get; set; } = 0;
|
||||
|
||||
public string CalledAE { get; set; } = string.Empty;
|
||||
|
||||
public string CallingAE { get; set; } = string.Empty;
|
||||
|
||||
public string BodyPartExamined { get; set; } = string.Empty;
|
||||
public string AccessionNumber { get; set; } = string.Empty;
|
||||
public string PatientIdStr { get; set; } = string.Empty;
|
||||
public string PatientName { get; set; } = string.Empty;
|
||||
public string PatientAge { get; set; } = string.Empty;
|
||||
public string PatientSex { get; set; } = string.Empty;
|
||||
|
||||
public string PatientBirthDate { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class PatientStudySimpleView
|
||||
{
|
||||
|
||||
public Guid SCPStudyId { get; set; }
|
||||
|
||||
public Guid PatientId { get; set; }
|
||||
|
@ -1133,25 +1007,8 @@ namespace IRaCIS.Application.Contracts
|
|||
|
||||
public string CallingAE { get; set; } = string.Empty;
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
public string? VisitName { get; set; }
|
||||
|
||||
public string? BlindName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
//public SubjectVisitInfo SubejectVisit { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class SubjectVisitInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public string VisitName { get; set; }
|
||||
|
||||
public decimal VisitNum { get; set; }
|
||||
public string BlindName { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
public class PatientSeriesDTO
|
||||
|
|
|
@ -0,0 +1,120 @@
|
|||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2024-03-22 15:44:31
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using FellowOakDicom.Network.Client;
|
||||
using FellowOakDicom.Network;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// DicomAEService
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Common")]
|
||||
public class DicomAEService (IRepository<DicomAE> _dicomAERepository, IMapper _mapper, IUserInfo _userInfo) : BaseService, IDicomAEService
|
||||
{
|
||||
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput< PageOutput<DicomAEView>>> GetDicomAEList(DicomAEQuery inQuery)
|
||||
{
|
||||
|
||||
var dicomAEQueryable = _dicomAERepository
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.IP), t => t.IP.Contains(inQuery.IP))
|
||||
.WhereIf(inQuery.Port != null, t => t.Port == inQuery.Port)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.CalledAE), t => t.CalledAE.Contains(inQuery.CalledAE))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Description), t => t.Description.Contains(inQuery.Description))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.Modality), t => t.Modality.Contains(inQuery.Modality))
|
||||
.ProjectTo<DicomAEView>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
|
||||
|
||||
var pageList = await dicomAEQueryable.ToPagedListAsync(inQuery, nameof(DicomAEView.CalledAE));
|
||||
|
||||
|
||||
return ResponseOutput.Ok(pageList);
|
||||
}
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateDicomAE(DicomAEAddOrEdit addOrEditDicomAE)
|
||||
{
|
||||
var verifyExp1 = new EntityVerifyExp<DicomAE>()
|
||||
{
|
||||
VerifyExp = u => u.IP == addOrEditDicomAE.IP && u.Port == addOrEditDicomAE.Port,
|
||||
|
||||
VerifyMsg = "不允许添加相同的IP和端口的记录"
|
||||
};
|
||||
|
||||
// 在此处拷贝automapper 映射
|
||||
var entity = await _dicomAERepository.InsertOrUpdateAsync(addOrEditDicomAE, true, verifyExp1);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{dicomAEId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteDicomAE(Guid dicomAEId)
|
||||
{
|
||||
var success = await _dicomAERepository.DeleteFromQueryAsync(t => t.Id == dicomAEId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 测试scp server 是否可以连接
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{dicomAEId:guid}")]
|
||||
public async Task<bool> TestSCPServerConnect(Guid dicomAEId)
|
||||
{
|
||||
var find = await _dicomAERepository.FirstOrDefaultAsync(t => t.Id == dicomAEId);
|
||||
|
||||
if (find == null)
|
||||
{
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
find.LatestTestTime = DateTime.Now;
|
||||
|
||||
try
|
||||
{
|
||||
var client = DicomClientFactory.Create(find.IP, find.Port, false, "test-callingAE", find.CalledAE);
|
||||
|
||||
client.NegotiateAsyncOps();
|
||||
|
||||
await client.AddRequestAsync(new DicomCEchoRequest());
|
||||
|
||||
await client.SendAsync();
|
||||
|
||||
find.IsTestOK = true;
|
||||
await _dicomAERepository.SaveChangesAsync();
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
find.IsTestOK = false;
|
||||
await _dicomAERepository.SaveChangesAsync();
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
|||
using AutoMapper;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.Dicom.DTO;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
|
@ -22,8 +22,20 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.VisitStageId, t => t.MapFrom(u => u.Id));
|
||||
|
||||
|
||||
CreateMap<SubejctVisitDownload, VisitImageDownloadView>()
|
||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code))
|
||||
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
|
||||
.ForMember(d => d.VisitImageFileCount, u => u.MapFrom(s => s.SubjectVisit.VisitImageFileCount))
|
||||
.ForMember(d => d.VisitImageZipPath, u => u.MapFrom(s => s.SubjectVisit.VisitImageZipPath))
|
||||
.ForMember(d => d.VisitImageZipSize, u => u.MapFrom(s => s.SubjectVisit.VisitImageZipSize))
|
||||
.ForMember(d => d.DownloadTime, u => u.MapFrom(s => s.CreateTime))
|
||||
.ForMember(d => d.DownloadUserName, u => u.MapFrom(s => s.CreateUser.UserName))
|
||||
.ForMember(d => d.StudyCount, u => u.MapFrom(s => s.SubjectVisit.StudyList.Count()))
|
||||
.ForMember(d => d.DownLoadUserFullName, u => u.MapFrom(s => s.CreateUser.FullName))
|
||||
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.CreateUser.UserTypeEnum));
|
||||
|
||||
|
||||
CreateMap<SCPImageUpload, SCPImageUploadView>();
|
||||
|
||||
|
||||
CreateMap<VisitPlanInfluenceStat, VisitPlanInfluenceSubjectVisitStatDTO>()
|
||||
.ForMember(d => d.CreateUser, u => u.MapFrom(g => g.CreateUser.LastName + " / " + g.CreateUser.FirstName));
|
||||
|
@ -66,7 +78,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
.ForMember(d => d.MissingSubmmitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.VisitNum < s.LatestSubjectVisit.VisitNum && t.SubmitState != SubmitStateEnum.Submitted && t.IsLostVisit == false)))
|
||||
.ForMember(d => d.IsMissingImages, u => u.MapFrom(s => s.SubjectVisitList.Any(t => t.VisitNum < s.LatestSubjectVisit.VisitNum && t.SubmitState != SubmitStateEnum.Submitted && t.IsLostVisit == false)))
|
||||
.ForMember(d => d.InPlanVisitSubmmitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.SubmitState == SubmitStateEnum.Submitted && t.InPlan == true)))
|
||||
.ForMember(d => d.LostVisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.IsLostVisit)))
|
||||
.ForMember(d => d.InPlanVisitSubmmitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.SubmitState == SubmitStateEnum.Submitted && t.InPlan == true)))
|
||||
|
@ -77,8 +88,6 @@ namespace IRaCIS.Core.Application.Service
|
|||
//.ForMember(d => d.OutPlanVisitUploadCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t => t.VisitExecuted == VisitExecutedEnum.Executed && t.InPlan == false)));
|
||||
|
||||
|
||||
//审计信息 这里不用IncludeMembers 也可以识别 是以导航属性名称开头
|
||||
// 还有 外键? COALESCE([t0].[SubjectId], '00000000-0000-0000-0000-000000000000') 因为destination 是Guid
|
||||
|
||||
|
||||
CreateMap<SubjectVisitCommand, SubjectVisit>().ForAllMembers(opt => opt.Condition((src, dest, srcMember) => srcMember != null));
|
||||
|
@ -90,7 +99,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.SubjectVisitId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
||||
.ForMember(d => d.TrialCode, u => u.MapFrom(s => s.Trial.TrialCode))
|
||||
.ForMember(d => d.Sponsor, u => u.MapFrom(s => s.Trial.Sponsor.SponsorName));
|
||||
.ForMember(d => d.Sponsor, u => u.MapFrom(s => s.Trial.Sponsor));
|
||||
CreateMap<Trial, DicomTrialSiteSubjectInfo>();
|
||||
|
||||
CreateMap<VisitPlanInfluenceStudy, VisitPlanInfluenceSubjectVisitDTO>()
|
||||
|
@ -100,31 +109,99 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.SubjectVisit.TrialSite.TrialSiteCode));
|
||||
|
||||
|
||||
CreateMap<TaskStudy, VisitStudyDTO>()
|
||||
.ForMember(d => d.StudyId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.SeriesList, u => u.MapFrom(s => s.SeriesList));
|
||||
CreateMap<SCPStudy, PatientStudySelectDto>()
|
||||
.ForMember(d => d.SCPStudyId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<TaskSeries, DicomSeriesDTO>()
|
||||
.ForMember(d => d.InstanceInfoList, u => u.MapFrom(s => s.InstanceList));
|
||||
CreateMap<SCPPatient, PatientQueryView>()
|
||||
.ForMember(d => d.CalledAEList, u => u.MapFrom(s => s.SCPStudyList.Select(t => t.CalledAE).Distinct()))
|
||||
.ForMember(d => d.CallingAEList, u => u.MapFrom(s => s.SCPStudyList.Select(t => t.CallingAE).Distinct()))
|
||||
.ForMember(d => d.PatientId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<TaskInstance, InstanceBasicInfo>();
|
||||
CreateMap<SCPStudySubjectVisit, VisitPatientStudyView>().IncludeMembers(t=>t.SCPStudy)
|
||||
.ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName));
|
||||
|
||||
CreateMap<Subject, PatienSubejctView>()
|
||||
.ForMember(d => d.PatientList, u => u.MapFrom(s => s.SubjectPatientList))
|
||||
.ForMember(d => d.VisitCount, u => u.MapFrom(s => s.SubjectVisitList.Count()))
|
||||
.ForMember(d => d.LatestVisitName, u => u.MapFrom(s => s.SubjectVisitList.OrderByDescending(t => t.VisitNum).First().VisitName))
|
||||
;
|
||||
|
||||
CreateMap<SubjectPatient, PatientBasicInfo>()
|
||||
.ForMember(d => d.PatientId, u => u.MapFrom(s => s.Patient.Id))
|
||||
.ForMember(d => d.PatientSex, u => u.MapFrom(s => s.Patient.PatientSex))
|
||||
.ForMember(d => d.PatientIdStr, u => u.MapFrom(s => s.Patient.PatientIdStr))
|
||||
.ForMember(d => d.PatientAge, u => u.MapFrom(s => s.Patient.PatientAge))
|
||||
.ForMember(d => d.PatientName, u => u.MapFrom(s => s.Patient.PatientName))
|
||||
.ForMember(d => d.PatientBirthDate, u => u.MapFrom(s => s.Patient.PatientBirthDate));
|
||||
|
||||
CreateMap<Trial, PatientJoinTrialInitView>()
|
||||
.ForMember(d => d.TrialId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<Trial, NewTrialView>()
|
||||
.ForMember(d => d.TrialId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.UnSubmitCount, u => u.MapFrom(s => s.SubjectVisitList.Count(t=>t.SubmitState==SubmitStateEnum.ToSubmit)))
|
||||
.ForMember(d => d.UnReadCount, u => u.MapFrom(s => s.VisitTaskList.Count(t=>t.TaskState==TaskState.Effect && t.SignTime==null)))
|
||||
;
|
||||
|
||||
CreateMap<Trial, TrialInfoDTO>()
|
||||
.ForMember(d => d.DictionaryList, u => u.MapFrom(s => s.TrialDicList.Select(t => t.Dictionary).OrderBy(t => t.ShowOrder)));
|
||||
|
||||
|
||||
CreateMap<SCPStudy, VisitPatientStudyView>()
|
||||
.ForMember(d => d.SCPStudyId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<DicomAE, DicomAEView>();
|
||||
CreateMap<DicomAE, DicomAEAddOrEdit>().ReverseMap();
|
||||
|
||||
CreateMap<SubjectPatient, PatientJoinedTrialView>().IncludeMembers(t => t.Subject)
|
||||
.ForMember(d => d.TrialId, u => u.MapFrom(s => s.Subject.TrialId))
|
||||
.ForMember(d => d.ResearchProgramNo, u => u.MapFrom(s => s.Subject.Trial.ResearchProgramNo))
|
||||
.ForMember(d => d.TrialStatusStr, u => u.MapFrom(s => s.Subject.Trial.TrialStatusStr))
|
||||
.ForMember(d => d.TrialType, u => u.MapFrom(s => s.Subject.Trial.TrialType))
|
||||
.ForMember(d => d.Sponsor, u => u.MapFrom(s => s.Subject.Trial.Sponsor))
|
||||
.ForMember(d => d.CreateTime, u => u.MapFrom(s => s.CreateTime))
|
||||
.ForMember(d => d.TrialCode, u => u.MapFrom(s => s.Subject.Trial.TrialCode))
|
||||
.ForMember(d => d.ExperimentName, u => u.MapFrom(s => s.Subject.Trial.ExperimentName));
|
||||
|
||||
CreateMap<Subject, PatientJoinedTrialView>();
|
||||
|
||||
|
||||
CreateMap<Trial, PatientJoinedTrialView>();
|
||||
|
||||
CreateMap<VisitTask, PatientVisitTaskDTO>()
|
||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
|
||||
.ForMember(d => d.SubjectShortName, u => u.MapFrom(s => s.Subject.ShortName))
|
||||
.ForMember(d => d.TrialReadingCriterionName, u => u.MapFrom(s => s.TrialReadingCriterion.CriterionName))
|
||||
.ForMember(d => d.CriterionType, u => u.MapFrom(s => s.TrialReadingCriterion.CriterionType))
|
||||
.ForMember(d => d.PatientList, u => u.MapFrom(s => s.Subject.SubjectPatientList))
|
||||
.ForMember(d => d.VisitImageZipPath, u => u.MapFrom(s => s.SourceSubjectVisit.VisitImageZipPath))
|
||||
.ForMember(d => d.PackState, u => u.MapFrom(s => s.SourceSubjectVisit.PackState));
|
||||
|
||||
CreateMap<AddOrUpdateSubjectVisitCommand, SubjectVisit>().ReverseMap();
|
||||
|
||||
CreateMap<SubjectVisitSelectDto, SubjectVisit>();
|
||||
|
||||
|
||||
CreateMap<SCPImageUpload, SCPImageUploadView>()
|
||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
||||
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.TrialSite.TrialSiteAliasName))
|
||||
.ForMember(d => d.TrialSiteName, u => u.MapFrom(s => s.TrialSite.TrialSiteName));
|
||||
CreateMap<SCPStudy, DicomStudy>()
|
||||
.ForMember(d => d.SeriesList, u => u.Ignore())
|
||||
/* .ForMember(d => d.SeriesList, u => u.Ignore())*/;
|
||||
|
||||
CreateMap<SCPImageUpload, SCPImageUploadExportDTO>()
|
||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode))
|
||||
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.TrialSite.TrialSiteAliasName))
|
||||
.ForMember(d => d.TrialSiteName, u => u.MapFrom(s => s.TrialSite.TrialSiteName));
|
||||
|
||||
|
||||
CreateMap<SCPStudy, DicomStudy>();
|
||||
CreateMap<SCPSeries, DicomSeries>();
|
||||
CreateMap<SCPInstance, DicomInstance>();
|
||||
|
||||
CreateMap<Trial, PatientJoinTrialSelectView>()
|
||||
.ForMember(d => d.TrialId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<Trial, AddOrUpdateTrialCommand>().ReverseMap();
|
||||
|
||||
CreateMap<SubjectVisit, SubjectVisitSelectDto>();
|
||||
|
||||
CreateMap<AddOrUpdateSubjectCommand, Subject>().ReverseMap();
|
||||
|
||||
|
||||
CreateMap<SCPSeries, PatientSeriesDTO>();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,12 @@ namespace IRaCIS.Core.Domain.Share
|
|||
|
||||
NoneOfficial = 0,
|
||||
|
||||
Training = 2
|
||||
Training = 2,
|
||||
|
||||
//临床研究
|
||||
ClinicalResearch = 3,
|
||||
|
||||
ScientificResearch = 4
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,43 +4,65 @@
|
|||
|
||||
public enum UserTypeEnum
|
||||
{
|
||||
|
||||
SuperAdmin = 1,
|
||||
|
||||
Admin = 2,
|
||||
|
||||
|
||||
TA = 3,
|
||||
|
||||
|
||||
|
||||
//PM
|
||||
ProjectManager=1,
|
||||
ProjectManager = 4,
|
||||
|
||||
|
||||
|
||||
//CRC
|
||||
ClinicalResearchCoordinator=2,
|
||||
ClinicalResearchCoordinator = 5,
|
||||
|
||||
CRA = 6,
|
||||
|
||||
//IQC
|
||||
IQC = 3,
|
||||
IQC = 7,
|
||||
|
||||
|
||||
ReviewerCoordinator = 4,
|
||||
|
||||
// 大屏展示
|
||||
Dashboard = 6,
|
||||
|
||||
// 超级管理员用户类型,用于取代 SuperAdmin字段 数据库不内置这个用户类型和角色的配置,因为只允许有一个
|
||||
SuperAdmin=7,
|
||||
|
||||
Admin = 8,
|
||||
PI = 8,
|
||||
|
||||
|
||||
CRA =9,
|
||||
SR = 9,
|
||||
|
||||
SPM=10,
|
||||
|
||||
APM=11,
|
||||
|
||||
CPM=12,
|
||||
|
||||
IndependentReviewer=13,
|
||||
|
||||
// 医学影像经理
|
||||
MIM = 14,
|
||||
MIM = 10,
|
||||
|
||||
|
||||
IM = 11,
|
||||
|
||||
|
||||
QA = 12,
|
||||
|
||||
OP = 13,
|
||||
|
||||
OA = 14,
|
||||
|
||||
SPM = 20,
|
||||
APM = 21,
|
||||
CPM = 22,
|
||||
|
||||
IndependentReviewer = 18,
|
||||
|
||||
AIR = 21,
|
||||
|
||||
//医生用户类型暂不处理
|
||||
|
||||
ShareImage = 125,
|
||||
|
||||
|
||||
Undefined = 0,
|
||||
|
||||
|
||||
|
||||
|
||||
QA=15,
|
||||
|
||||
EA=16,
|
||||
|
||||
|
@ -52,7 +74,6 @@
|
|||
CMM=19,
|
||||
|
||||
|
||||
AIR=21,
|
||||
|
||||
ZYSS=26,
|
||||
|
||||
|
@ -60,16 +81,6 @@
|
|||
|
||||
MC=30,
|
||||
|
||||
OP=31,
|
||||
|
||||
//医生用户类型暂不处理
|
||||
|
||||
ShareImage = 125,
|
||||
|
||||
|
||||
|
||||
|
||||
Undefined=0
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -281,4 +281,67 @@ public class VisitTask : BaseFullAuditEntity
|
|||
|
||||
[Comment("通知IR加急阅片时间")]
|
||||
public DateTime? ExpetidEmailNoticeTime { get; set; }
|
||||
|
||||
#region HIR 新增字段
|
||||
|
||||
[JsonIgnore]
|
||||
public User FirstAuditUser { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public User LatestReplyUser { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public User SubjectCriterionClaimUser { get; set; }
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public List<string> PIAuditImagePathList
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
return this.PIAuditImagePath?.Trim().Split('|', StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public string PIAuditNote { get; set; } = string.Empty;
|
||||
|
||||
public string PIAuditImagePath { get; set; } = string.Empty;
|
||||
|
||||
public string NotAgreeReason { get; set; } = string.Empty;
|
||||
|
||||
public PIAuditState PIAuditState { get; set; }
|
||||
|
||||
public bool? IsEnrollment { get; set; }
|
||||
|
||||
public bool? IsPDConfirm { get; set; }
|
||||
|
||||
public Guid? FirstAuditUserId { get; set; }
|
||||
public DateTime? FirstAuditTime { get; set; }
|
||||
|
||||
public Guid? LatestReplyUserId { get; set; }
|
||||
public DateTime? LatestReplyTime { get; set; }
|
||||
|
||||
public Guid? SubjectCriterionClaimUserId { get; set; }
|
||||
|
||||
public DateTime? ReportExportDate { get; set; }
|
||||
|
||||
public int? ReportExportNum { get; set; }
|
||||
|
||||
public string ReportExportUrl { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 是否确认提醒
|
||||
/// </summary>
|
||||
public bool IsConfirmReminder { get; set; } = false;
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2024-03-22 15:44:11
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
|
||||
|
||||
[Comment("医院dicomAE 配置")]
|
||||
[Table("DicomAE")]
|
||||
public class DicomAE : BaseFullAuditEntity
|
||||
{
|
||||
|
||||
public string CalledAE { get; set; }
|
||||
|
||||
|
||||
public string IP { get; set; }
|
||||
|
||||
|
||||
public int Port { get; set; }
|
||||
|
||||
|
||||
public string Modality { get; set; }
|
||||
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
|
||||
public DateTime? LatestTestTime { get; set; }
|
||||
|
||||
public bool IsTestOK { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2023-07-10 15:14:16
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///PIAudit
|
||||
///</summary>
|
||||
[Table("PIAudit")]
|
||||
public class PIAudit : BaseAddAuditEntity
|
||||
{
|
||||
|
||||
[JsonIgnore]
|
||||
public VisitTask VisitTask { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public string ReplyContent { get; set; }=string.Empty;
|
||||
|
||||
public bool? IsEnrollment { get; set; }
|
||||
|
||||
public bool? IsPDConfirm { get; set; }
|
||||
|
||||
public string PIAuditNote { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public string NotAgreeReason { get; set; } = string.Empty;
|
||||
|
||||
public PIAuditState? PIAuditState { get; set; }
|
||||
|
||||
|
||||
public string PIAuditImagePath { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public List<string> PIAuditImagePathList
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
return this.PIAuditImagePath?.Trim().Split('|', StringSplitOptions.RemoveEmptyEntries).ToList();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PI 审核状态
|
||||
/// </summary>
|
||||
public enum PIAuditState
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// PI未审核
|
||||
/// </summary>
|
||||
PInotAutit = 0,
|
||||
|
||||
/// <summary>
|
||||
/// PI不认同
|
||||
/// </summary>
|
||||
PINotAgree = 1,
|
||||
|
||||
/// <summary>
|
||||
/// PI认同
|
||||
/// </summary>
|
||||
PIAgree = 2
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2024-03-21 13:54:49
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
|
||||
[Comment("访视检查关联表")]
|
||||
[Table("SCPStudySubjectVisit")]
|
||||
public class SCPStudySubjectVisit : BaseFullAuditEntity
|
||||
{
|
||||
[ForeignKey("SCPStudyId")]
|
||||
[JsonIgnore]
|
||||
public SCPStudy SCPStudy { get; set; }
|
||||
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
[JsonIgnore]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
|
||||
[ForeignKey("SubjectId")]
|
||||
[JsonIgnore]
|
||||
public Subject Subject { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
[Required]
|
||||
public Guid SCPStudyId { get; set; }
|
||||
|
||||
public Guid? StudyId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2024-05-24 14:31:45
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
|
||||
[Comment("访视下载记录")]
|
||||
[Table("SubejctVisitDownload")]
|
||||
public class SubejctVisitDownload : BaseAddAuditEntity
|
||||
{
|
||||
|
||||
|
||||
[Required]
|
||||
public string IP { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
[JsonIgnore]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2024-03-20 17:53:43
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
[Comment("受试者患者绑定关系")]
|
||||
[Table("SubjectPatient")]
|
||||
public class SubjectPatient : BaseFullDeleteAuditEntity
|
||||
{
|
||||
[JsonIgnore]
|
||||
public SCPPatient Patient { get; set; }
|
||||
[JsonIgnore]
|
||||
public Subject Subject { get; set; }
|
||||
|
||||
[Required]
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
|
||||
[Required]
|
||||
public Guid PatientId { get; set; }
|
||||
|
||||
//检查和访视绑定 已提交
|
||||
public bool IsBinded { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2024-04-16 17:06:22
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
[Comment("受试者患者检查绑定关系")]
|
||||
[Table("SubjectPatientSCPStudy")]
|
||||
public class SubjectPatientSCPStudy : BaseFullDeleteAuditEntity
|
||||
{
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
|
||||
public Guid PatientId { get; set; }
|
||||
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
||||
public Guid SCPStudyId { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -92,4 +92,7 @@ public class DicomStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
public DateTime? UploadedTime { get; set; }
|
||||
|
||||
public string Uploader { get; set; } = null!;
|
||||
|
||||
|
||||
public string PatientIdStr { get; set; } = string.Empty;
|
||||
}
|
||||
|
|
|
@ -5,14 +5,16 @@
|
|||
public class SCPPatient : BaseFullAuditEntity
|
||||
{
|
||||
#region 导航属性
|
||||
|
||||
public List<SubjectPatient> SubjectPatientList { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<SCPStudy> SCPStudyList { get; set; }
|
||||
[JsonIgnore]
|
||||
public Subject Subject { get; set; }
|
||||
[JsonIgnore]
|
||||
public Trial Trial { get; set; }
|
||||
[JsonIgnore]
|
||||
public TrialSite TrialSite { get; set; }
|
||||
//[JsonIgnore]
|
||||
//public Subject Subject { get; set; }
|
||||
//[JsonIgnore]
|
||||
//public Trial Trial { get; set; }
|
||||
//[JsonIgnore]
|
||||
//public TrialSite TrialSite { get; set; }
|
||||
#endregion
|
||||
public string PatientIdStr { get; set; } = string.Empty;
|
||||
public string PatientName { get; set; } = string.Empty;
|
||||
|
@ -25,7 +27,12 @@ public class SCPPatient : BaseFullAuditEntity
|
|||
public DateTime? LatestStudyTime { get; set; }
|
||||
|
||||
public DateTime LatestPushTime { get; set; }
|
||||
public Guid? SubjectId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid TrialSiteId { get; set; }
|
||||
|
||||
|
||||
#region HIR 注释
|
||||
//public Guid TrialId { get; set; }
|
||||
//public Guid TrialSiteId { get; set; }
|
||||
|
||||
//public Guid? SubjectVisitId { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -6,6 +6,9 @@ public class SCPStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
{
|
||||
|
||||
#region 导航属性
|
||||
|
||||
[JsonIgnore]
|
||||
public List<SCPStudySubjectVisit> SCPStudySubjectVisitList { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<SCPInstance> InstanceList { get; set; }
|
||||
|
||||
|
@ -60,8 +63,13 @@ public class SCPStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
public string CalledAE { get; set; } = string.Empty;
|
||||
|
||||
public bool IsUploadFinished { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid TrialSiteId { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
|
||||
#region HIR 注释
|
||||
//public Guid TrialId { get; set; }
|
||||
//public Guid TrialSiteId { get; set; }
|
||||
|
||||
//public Guid? SubjectVisitId { get; set; }
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
|
|
@ -85,4 +85,9 @@ public class User : BaseFullAuditEntity
|
|||
public UserTypeEnum UserTypeEnum { get; set; }
|
||||
|
||||
public Guid UserTypeId { get; set; }
|
||||
|
||||
#region HIR
|
||||
public string CheckCode { get; set; } = string.Empty;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -156,6 +156,10 @@ public class ReadingQuestionCriterionTrial : BaseAddAuditEntity
|
|||
|
||||
[Comment("是否影像筛选")]
|
||||
public bool IsImageFilter { get; set; }
|
||||
|
||||
public ReadingDivisionEnum ReadingDivisionEnum { get; set; } = ReadingDivisionEnum.OnlySR;
|
||||
|
||||
public PIReadingScopenEnum PIReadingScopenEnum { get; set; }
|
||||
}
|
||||
|
||||
public enum ReadingImageDownload
|
||||
|
@ -184,3 +188,41 @@ public enum ReadingOrder
|
|||
|
||||
SubjectRandom = 2,
|
||||
}
|
||||
/// <summary>
|
||||
/// 阅片分工
|
||||
/// </summary>
|
||||
public enum ReadingDivisionEnum
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 仅SR阅片
|
||||
/// </summary>
|
||||
OnlySR = 1,
|
||||
|
||||
/// <summary>
|
||||
/// PI和SR
|
||||
/// </summary>
|
||||
PIandSR = 2
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PI阅片范围
|
||||
/// </summary>
|
||||
public enum PIReadingScopenEnum
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 全部基线
|
||||
/// </summary>
|
||||
AllBaseline = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 全部随访
|
||||
/// </summary>
|
||||
AllVisit = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 全部基线和随访
|
||||
/// </summary>
|
||||
AllBaselineandVisit = 3
|
||||
}
|
|
@ -9,12 +9,12 @@ namespace IRaCIS.Core.Domain.Models;
|
|||
public partial class Trial : BaseFullDeleteAuditEntity
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SponsorId")]
|
||||
public Sponsor Sponsor { get; set; }
|
||||
[JsonIgnore]
|
||||
[ForeignKey("CROId")]
|
||||
public CRO CRO { get; set; }
|
||||
//[JsonIgnore]
|
||||
//[ForeignKey("SponsorId")]
|
||||
//public Sponsor Sponsor { get; set; }
|
||||
//[JsonIgnore]
|
||||
//[ForeignKey("CROId")]
|
||||
//public CRO CRO { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<TrialBodyPart> TrialBodyPartList { get; set; }
|
||||
[JsonIgnore]
|
||||
|
@ -130,7 +130,7 @@ public partial class Trial : BaseFullDeleteAuditEntity
|
|||
[StringLength(1000)]
|
||||
public string TrialExtraConfigJsonStr { get; set; } = string.Empty;
|
||||
|
||||
public bool VisitPlanConfirmed { get; set; }
|
||||
public bool VisitPlanConfirmed { get; set; } = true;
|
||||
|
||||
[Comment("受试者编号具体规则")]
|
||||
public string SubjectCodeRule { get; set; } = I18n.T("Trial_number");
|
||||
|
@ -149,16 +149,16 @@ public partial class Trial : BaseFullDeleteAuditEntity
|
|||
[Comment("是否 验证拍片日期")]
|
||||
public bool IsVerifyVisitImageDate { get; set; } = true;
|
||||
[Comment("临床信息传输 1:系统录入 2:系统录入+PDF 0:无")]
|
||||
public int ClinicalInformationTransmissionEnum { get; set; } = 1;
|
||||
public int ClinicalInformationTransmissionEnum { get; set; } = 0;
|
||||
|
||||
[Comment("是否审核 临床信息")]
|
||||
public bool IsCRAAuditClinicalInformation { get; set; } = false;
|
||||
|
||||
[Comment("QC流程 0 不审,1 单审,2双审")]
|
||||
public TrialQCProcess QCProcessEnum { get; set; } = TrialQCProcess.DoubleAudit;
|
||||
public TrialQCProcess QCProcessEnum { get; set; } = TrialQCProcess.NotAudit;
|
||||
|
||||
[Comment("影像一致性核查")]
|
||||
public bool IsImageConsistencyVerification { get; set; } = true;
|
||||
public bool IsImageConsistencyVerification { get; set; } = false;
|
||||
|
||||
[Comment("影像导出")]
|
||||
public bool IsImageExport { get; set; } = false;
|
||||
|
@ -222,11 +222,11 @@ public partial class Trial : BaseFullDeleteAuditEntity
|
|||
|
||||
public int? DigitPlaces { get; set; } = 1;
|
||||
|
||||
public bool IsTrialProcessConfirmed { get; set; }
|
||||
public bool IsTrialBasicLogicConfirmed { get; set; }
|
||||
public bool IsTrialUrgentConfirmed { get; set; }
|
||||
public bool IsTrialProcessConfirmed { get; set; } = true;
|
||||
public bool IsTrialBasicLogicConfirmed { get; set; } = true;
|
||||
public bool IsTrialUrgentConfirmed { get; set; } = true;
|
||||
|
||||
public bool IsQCQuestionConfirmed { get; set; }
|
||||
public bool IsQCQuestionConfirmed { get; set; } = true;
|
||||
[Comment("同步临床数据时间")]
|
||||
public DateTime? SyncClinicalDataTime { get; set; }
|
||||
public string BlindBaseLineName { get; set; } = "Baseline";
|
||||
|
@ -264,6 +264,47 @@ public partial class Trial : BaseFullDeleteAuditEntity
|
|||
[StringLength(2000)]
|
||||
public List<TrialObjectNameConfig> TrialObjectNameList { get; set; }
|
||||
|
||||
|
||||
#region HIR 增加
|
||||
|
||||
public UserTypeEnum? EnrollConfirmDefaultUserType { get; set; }
|
||||
|
||||
public UserTypeEnum? PDProgressDefaultUserType { get; set; }
|
||||
|
||||
public bool IsDeclaration { get; set; }
|
||||
public bool IsMedicalReview { get; set; } = false;
|
||||
|
||||
public string VisitBaseDataDes { get; set; } = I18n.T("Trial_VisitBaseDataDes");
|
||||
|
||||
public string CRO { get; set; } = string.Empty;
|
||||
|
||||
public string Sponsor { get; set; } = string.Empty;
|
||||
|
||||
//药物名称
|
||||
public string MedicineName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
//阅片标准
|
||||
|
||||
//联系人
|
||||
public string ContactUser { get; set; } = string.Empty;
|
||||
//联系电话
|
||||
public string ContactPhone { get; set; } = string.Empty;
|
||||
|
||||
public int AuthorizationDuration { get; set; }
|
||||
|
||||
public string AuthorizationEncrypt { get; set; } = string.Empty;
|
||||
|
||||
public DateTime? AuthorizationDate { get; set; }
|
||||
|
||||
public string CriterionTypes { get; set; } = string.Empty;
|
||||
|
||||
[NotMapped]
|
||||
public List<CriterionType> CriterionTypeList => CriterionTypes.Split('|', StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(s => Enum.Parse(typeof(CriterionType), s)).Cast<CriterionType>().ToList();
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
[ComplexType]
|
||||
|
|
|
@ -8,6 +8,8 @@ public class Subject : BaseFullDeleteAuditEntity
|
|||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
public List<SubjectPatient> SubjectPatientList { get; set; }
|
||||
[JsonIgnore]
|
||||
public List<TaskStudy> TaskStudyList { get; set; } = new List<TaskStudy>();
|
||||
|
||||
[JsonIgnore]
|
||||
|
|
|
@ -7,6 +7,8 @@ public class SubjectVisit : BaseFullDeleteAuditEntity
|
|||
{
|
||||
#region 导航属性
|
||||
|
||||
[JsonIgnore]
|
||||
public List<SCPStudySubjectVisit> SCPStudySubjectVisitList { get; set; }
|
||||
[JsonIgnore]
|
||||
public TrialSite TrialSite { get; set; }
|
||||
|
||||
|
@ -180,5 +182,19 @@ public class SubjectVisit : BaseFullDeleteAuditEntity
|
|||
|
||||
public Guid? SubmitUserId { get; set; }
|
||||
public ReadingStatusEnum ReadingStatus { get; set; }
|
||||
|
||||
|
||||
#region HIR 废弃
|
||||
//文件数
|
||||
public long VisitImageZipSize { get; set; }
|
||||
|
||||
//文件大小
|
||||
public int VisitImageFileCount { get; set; }
|
||||
|
||||
public string VisitImageZipPath { get; set; } = string.Empty;
|
||||
|
||||
//路径
|
||||
public PackState PackState { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ public class IRaCISDBContextFactory : IDesignTimeDbContextFactory<IRaCISDBContex
|
|||
public IRaCISDBContext CreateDbContext(string[] args)
|
||||
{
|
||||
var optionsBuilder = new DbContextOptionsBuilder<IRaCISDBContext>();
|
||||
optionsBuilder.UseSqlServer("Server=106.14.89.110,1435;Database=Test_IRC;User ID=sa;Password=xc@123456;TrustServerCertificate=true", contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure());
|
||||
optionsBuilder.UseSqlServer("Server=106.14.89.110,1435;Database=Test_HIR_New;User ID=sa;Password=xc@123456;TrustServerCertificate=true", contextOptionsBuilder => contextOptionsBuilder.EnableRetryOnFailure());
|
||||
//迁移的时候,不生成外键
|
||||
optionsBuilder.ReplaceService<IMigrationsSqlGenerator, NoForeignKeyMigrationsSqlGenerator>();
|
||||
return new IRaCISDBContext(optionsBuilder.Options);
|
||||
|
|
Loading…
Reference in New Issue