diff --git a/IRC.Core.SCP/Properties/launchSettings.json b/IRC.Core.SCP/Properties/launchSettings.json
index 98baafbab..dff3134b7 100644
--- a/IRC.Core.SCP/Properties/launchSettings.json
+++ b/IRC.Core.SCP/Properties/launchSettings.json
@@ -1,14 +1,14 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
- "Test_IRC_SCP": {
+ "Test_HIR_SCP": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:6200",
"environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Test_IRC_SCP"
+ "ASPNETCORE_ENVIRONMENT": "Test_HIR_SCP"
}
},
"Uat_IRC_SCP": {
@@ -18,7 +18,7 @@
"launchUrl": "swagger",
"applicationUrl": "http://localhost:6200",
"environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Uat_IRC_SCP"
+ "ASPNETCORE_ENVIRONMENT": "Test_HIR_SCP"
}
}
}
diff --git a/IRC.Core.SCP/appsettings.Test_HIR_SCP.json b/IRC.Core.SCP/appsettings.Test_HIR_SCP.json
index f85eeb533..af5c8be23 100644
--- a/IRC.Core.SCP/appsettings.Test_HIR_SCP.json
+++ b/IRC.Core.SCP/appsettings.Test_HIR_SCP.json
@@ -8,34 +8,14 @@
},
"ObjectStoreService": {
"ObjectStoreUse": "MinIO",
- "AliyunOSS": {
- "regionId": "cn-shanghai",
- "endpoint": "https://oss-cn-shanghai.aliyuncs.com",
- "accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
- "accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
- "bucketName": "zy-sir-test-store",
- "roleArn": "acs:ram::1899121822495495:role/oss-upload",
- "viewEndpoint": "https://zy-sir-test-store.oss-cn-shanghai.aliyuncs.com",
- "region": "oss-cn-shanghai"
- },
-
"MinIO": {
- "endPoint": "106.14.89.110",
- "port": "9001",
- "useSSL": false,
- "accessKey": "fbStsVYCIPKHQneeqMwD",
- "secretKey": "TzgvyA3zGXMUnpilJNUlyMYHfosl1hBMl6lxPmjy",
- "bucketName": "hir-test",
- "viewEndpoint": "http://106.14.89.110:9001/hir-test/"
- },
-
- "AWS": {
- "endPoint": "s3.us-east-1.amazonaws.com",
- "useSSL": false,
- "accessKey": "AKIAZQ3DRSOHFPJJ6FEU",
- "secretKey": "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",
- "bucketName": "ei-irc-test-store",
- "viewEndpoint": "https://ei-irc-test-store.s3.amazonaws.com/"
+ "EndPoint": "106.14.89.110",
+ "Port": "9001",
+ "UseSSL": false,
+ "AccessKeyId": "fbStsVYCIPKHQneeqMwD",
+ "SecretAccessKey": "TzgvyA3zGXMUnpilJNUlyMYHfosl1hBMl6lxPmjy",
+ "BucketName": "hir-test",
+ "ViewEndpoint": "http://106.14.89.110:9001/hir-test/"
}
},
diff --git a/IRaCIS.Core.API/appsettings.Test_HIR.json b/IRaCIS.Core.API/appsettings.Test_HIR.json
index 632677775..2304c208f 100644
--- a/IRaCIS.Core.API/appsettings.Test_HIR.json
+++ b/IRaCIS.Core.API/appsettings.Test_HIR.json
@@ -8,37 +8,20 @@
},
"ObjectStoreService": {
"ObjectStoreUse": "MinIO",
- "AliyunOSS": {
- "regionId": "cn-shanghai",
- "endpoint": "https://oss-cn-shanghai.aliyuncs.com",
- "accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ",
- "accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio",
- "bucketName": "zy-sir-test-store",
- "roleArn": "acs:ram::1899121822495495:role/oss-upload",
- "viewEndpoint": "https://zy-sir-test-store.oss-cn-shanghai.aliyuncs.com",
- "region": "oss-cn-shanghai"
- },
"MinIO": {
- "endPoint": "hir-oss.test.extimaging.com",
- "port": "443",
- "useSSL": true,
+ "EndPoint": "hir-oss.test.extimaging.com",
+ "Port": "443",
+ "UseSSL": true,
//"endPoint": "106.14.89.110",
//"port": "9001",
//"useSSL": false,
- "accessKey": "fbStsVYCIPKHQneeqMwD",
- "secretKey": "TzgvyA3zGXMUnpilJNUlyMYHfosl1hBMl6lxPmjy",
- "bucketName": "hir-test",
+ "AccessKeyId": "fbStsVYCIPKHQneeqMwD",
+ "SecretAccessKey": "TzgvyA3zGXMUnpilJNUlyMYHfosl1hBMl6lxPmjy",
+ "BucketName": "hir-test",
//"viewEndpoint": "https://hir.test.extimaging.com/oss/hir-test"
- "viewEndpoint": "https://hir-oss.test.extimaging.com/hir-test"
- },
- "AWS": {
- "endPoint": "s3.us-east-1.amazonaws.com",
- "useSSL": false,
- "accessKey": "AKIAZQ3DRSOHFPJJ6FEU",
- "secretKey": "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",
- "bucketName": "ei-irc-test-store",
- "viewEndpoint": "https://ei-irc-test-store.s3.amazonaws.com/"
+ "ViewEndpoint": "https://hir-oss.test.extimaging.com/hir-test"
}
+
},
"ConnectionStrings": {
"RemoteNew": "Server=106.14.89.110,1435;Database=Test_HIR_New;User ID=sa;Password=xc@123456;TrustServerCertificate=true",
diff --git a/IRaCIS.Core.Application/Helper/OSSService.cs b/IRaCIS.Core.Application/Helper/OSSService.cs
index 9cc175465..419369dea 100644
--- a/IRaCIS.Core.Application/Helper/OSSService.cs
+++ b/IRaCIS.Core.Application/Helper/OSSService.cs
@@ -12,6 +12,7 @@ using MassTransit;
using Microsoft.Extensions.Options;
using Minio;
using Minio.DataModel.Args;
+using Newtonsoft.Json;
using System.Reactive.Linq;
using System.Runtime.InteropServices;
@@ -20,9 +21,19 @@ namespace IRaCIS.Core.Application.Helper;
#region 绑定和返回模型
[LowerCamelCaseJson]
-public class MinIOOptions : AWSOptions
+public class MinIOOptions
{
public int Port { get; set; }
+ public string EndPoint { get; set; }
+ public bool UseSSL { get; set; }
+
+ [JsonProperty("accessKey")]
+ public string AccessKeyId { get; set; }
+
+ [JsonProperty("secretKey")]
+ public string SecretAccessKey { get; set; }
+ public string BucketName { get; set; }
+ public string ViewEndpoint { get; set; }
}
@@ -31,8 +42,12 @@ public class AWSOptions
{
public string EndPoint { get; set; }
public bool UseSSL { get; set; }
+
+ [JsonProperty("AccessKey")]
public string AccessKeyId { get; set; }
public string RoleArn { get; set; }
+
+ [JsonProperty("SecretKey")]
public string SecretAccessKey { get; set; }
public string BucketName { get; set; }
public string ViewEndpoint { get; set; }
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index a1622de6d..e5a3e9428 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -2198,15 +2198,6 @@
-
-
- 验证验证码,没问题就返回用户所有的账户
-
-
-
-
-
-
(未登陆) 设置新密码
@@ -2215,12 +2206,6 @@
-
-
- 修改密码,当前支持旧密码修改密码
-
-
-
获取用户列表
@@ -2289,6 +2274,21 @@
+
+
+ 验证验证码,没问题就返回用户所有的账户
+
+
+
+
+
+
+
+
+ 修改密码,当前支持旧密码修改密码
+
+
+
获取数据库的表信息 以及字段信息
@@ -13031,12 +13031,6 @@
-
-
- 测试scp server 是否可以连接
-
-
-
项目外部人员 录入流程相关
diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
index 80ebf133c..9a604e791 100644
--- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
@@ -108,6 +108,8 @@ namespace IRaCIS.Core.Application.ViewModel
public class VisitTaskViewBasic
{
+ public string SubjectShortName { get; set; }
+
public Guid Id { get; set; }
public Guid TrialId { get; set; }
@@ -386,10 +388,26 @@ namespace IRaCIS.Core.Application.ViewModel
public ReReadingApplyState ReReadingApplyState { get; set; }
public DateTime? SuggesteFinishedTime { get; set; }
+
+ #region HIR
+
+ public List PatientList { get; set; }
+
+ #endregion
+
}
public class IRUnReadSubjectView
{
+ #region HIR
+ public Guid? ClaimUserId { get; set; }
+
+ public string? ClaimUserName { get; set; }
+
+ public string SubjectName { get; set; }
+
+ public List PatientList { get; set; }
+ #endregion
public int Index { get; set; } = 0;
public Guid SubjectId { get; set; }
@@ -509,6 +527,13 @@ namespace IRaCIS.Core.Application.ViewModel
public class VisitTaskQuery : PageInput
{
+ #region HIR
+
+ public DateTime? BeginSignDate { get; set; }
+
+ public DateTime? EndSignDate { get; set; }
+ #endregion
+
[NotDefault]
public Guid TrialId { get; set; }
@@ -970,6 +995,8 @@ namespace IRaCIS.Core.Application.ViewModel
[NotDefault]
public Guid TrialReadingCriterionId { get; set; }
+
+ public Guid? VisitTaskId { get; set; }
}
diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs
index 27dcea7f7..14e1c07eb 100644
--- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs
@@ -336,7 +336,10 @@ namespace IRaCIS.Core.Application.Service
ReadingCategory = ReadingCategory.Visit,
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
IsNeedClinicalDataSign = isNeedClinicalDataSign,
- IsClinicalDataSign = isClinicalDataSign
+ IsClinicalDataSign = isClinicalDataSign,
+
+ //HIR
+ SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget)
});
}
@@ -1065,7 +1068,10 @@ namespace IRaCIS.Core.Application.Service
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
IsNeedClinicalDataSign = isNeedClinicalDataSign,
IsClinicalDataSign = isClinicalDataSign,
- IsFrontTaskNeedSignButNotSign = isFrontTaskNeedSignButNotSign
+ IsFrontTaskNeedSignButNotSign = isFrontTaskNeedSignButNotSign,
+
+ //HIR
+ SuggesteFinishedTime = GetSuggessFinishTime(true, UrgentType.NotUrget)
});
diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
index e672be6cf..9b015371f 100644
--- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
@@ -1143,6 +1143,29 @@ public class VisitTaskService(IRepository _visitTaskRepository,
SortField = inQuery.SortField,
});
+ //给出患者编号
+ var currentPageData = result.CurrentPageData;
+ var subjectIdList = currentPageData.Select(t => t.SubjectId).ToList();
+ var list = await _subjectRepository.Where(t => subjectIdList.Contains(t.Id)).Select(t => new
+ {
+ SubjectId = t.Id,
+ PatientList = t.SubjectPatientList.Select(c => new PatientBasicInfo()
+ {
+ PatientId = c.PatientId,
+ PatientAge = c.Patient.PatientAge,
+ PatientBirthDate = c.Patient.PatientBirthDate,
+ PatientIdStr = c.Patient.PatientIdStr,
+ PatientSex = c.Patient.PatientSex,
+ PatientName = c.Patient.PatientName,
+ }).ToList(),
+ }).ToListAsync();
+
+ foreach (var item in currentPageData)
+ {
+ item.PatientList = list.Where(t => t.SubjectId == item.SubjectId).FirstOrDefault()?.PatientList;
+ }
+
+
}
//随机阅片
else
@@ -1162,7 +1185,7 @@ public class VisitTaskService(IRepository _visitTaskRepository,
return ResponseOutput.Ok(result, new
{
- IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
+ IsReadingTaskViewInOrder = isReadingTaskViewInOrder == ReadingOrder.InOrder,
RandomReadInfo = iRUnReadOut,
ReadingTool = readingTool,
IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
@@ -1196,7 +1219,7 @@ public class VisitTaskService(IRepository _visitTaskRepository,
if (critrion.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
{
- var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect)
+ var visitQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId/* && x.DoctorUserId == _userInfo.Id*/ && x.TaskState == TaskState.Effect)
.WhereIf(inQuery.SubjectId != null, t => t.SubjectId == inQuery.SubjectId)
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientIdStr), t => t.Subject.SubjectPatientList.Any(t => t.Patient.PatientIdStr.Contains(inQuery.PatientIdStr)))
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientName), t => t.Subject.SubjectPatientList.Any(t => t.Patient.PatientName.Contains(inQuery.PatientName)))
@@ -1252,12 +1275,16 @@ public class VisitTaskService(IRepository _visitTaskRepository,
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => (t.Subject.Code.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate));
- var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
+ var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode, x.Subject.ShortName, x.SubjectCriterionClaimUserId, x.SubjectCriterionClaimUser.UserName });
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
{
SubjectId = x.Key.SubjectId,
SubjectCode = x.Key.BlindSubjectCode == string.Empty ? x.Key.Code : x.Key.BlindSubjectCode,
+ SubjectName = x.Key.ShortName,
+
+ ClaimUserId = x.Key.SubjectCriterionClaimUserId,
+ ClaimUserName = x.Key.UserName,
SuggesteFinishedTime = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned).Min(x => x.SuggesteFinishedTime),
@@ -1451,10 +1478,16 @@ public class VisitTaskService(IRepository _visitTaskRepository,
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == inQuery.TrialId)
- .Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据
+ .Where(t => /*t.DoctorUserId == _userInfo.Id &&*/ t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据
+ .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI, t => t.DoctorUser.UserTypeEnum == UserTypeEnum.PI)
+ .WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientIdStr), t => t.Subject.SubjectPatientList.Any(t => t.Patient.PatientIdStr.Contains(inQuery.PatientIdStr)))
+ .WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientName), t => t.Subject.SubjectPatientList.Any(t => t.Patient.PatientName.Contains(inQuery.PatientName)))
+ .WhereIf(!string.IsNullOrWhiteSpace(inQuery.PatientSex), t => t.Subject.SubjectPatientList.Any(t => t.Patient.PatientSex.Contains(inQuery.PatientSex)))
+ .WhereIf(inQuery.PIAuditState != null, t => t.PIAuditState == inQuery.PIAuditState)
+ .WhereIf(inQuery.BeginSignDate != null, t => t.SignTime >= inQuery.BeginSignDate)
+ .WhereIf(inQuery.EndSignDate != null, t => t.SignTime <= inQuery.EndSignDate)
-
- .WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId)
+ //.WhereIf(inQuery.TrialSiteId != null, t => t.Subject.TrialSiteId == inQuery.TrialSiteId)
.WhereIf(inQuery.SubjectId != null, t => t.SubjectId == inQuery.SubjectId)
.WhereIf(inQuery.IsUrgent != null, t => t.IsUrgent == inQuery.IsUrgent)
.WhereIf(inQuery.ReadingCategory != null, t => t.ReadingCategory == inQuery.ReadingCategory)
@@ -1483,53 +1516,77 @@ public class VisitTaskService(IRepository _visitTaskRepository,
[UnitOfWork]
public async Task AIRReReading(AIRReReadingCommand command, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
{
- var baseLineTaskList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
- && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.SourceSubjectVisit.IsBaseLine == true).ToListAsync();
-
- var judegeList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
- && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Judge && t.ReadingTaskState == ReadingTaskState.HaveSigned).ToListAsync();
-
- foreach (var item in judegeList)
+ if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR)
{
- if (!baseLineTaskList.Any(t => t.SubjectId == item.SubjectId))
+ var baseLineTaskList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
+ && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned && t.SourceSubjectVisit.IsBaseLine == true).ToListAsync();
+
+ var judegeList = await _visitTaskRepository.Where(t => t.TrialId == command.TrialId && t.TrialReadingCriterionId == command.TrialReadingCriterionId && t.DoctorUserId == _userInfo.Id
+ && t.TaskState == TaskState.Effect && t.ReadingCategory == ReadingCategory.Judge && t.ReadingTaskState == ReadingTaskState.HaveSigned).ToListAsync();
+
+ foreach (var item in judegeList)
{
- baseLineTaskList.Add(item);
+ if (!baseLineTaskList.Any(t => t.SubjectId == item.SubjectId))
+ {
+ baseLineTaskList.Add(item);
+ }
+ }
+
+
+ var baseLineTaskIdList = baseLineTaskList.Select(t => t.Id).ToList();
+
+ if (baseLineTaskIdList.Count == 0)
+ {
+ return ResponseOutput.Ok();
+ }
+
+ //if (baseLineTaskList == null)
+ //{
+ // return ResponseOutput.NotOk("基线任务未阅完,不允许重阅基线任务");
+ //}
+
+ await ApplyReReading(new ApplyReReadingCommand() { IsCopyFollowForms = false, IsCopyOrigenalForms = false, TaskIdList = baseLineTaskIdList, TrialId = command.TrialId, RequestReReadingReason = "AIR自动重阅基线", RequestReReadingType = RequestReReadingType.DocotorApply });
+
+
+
+ var requestRecordList = await _visitTaskReReadingRepository.Where(t => baseLineTaskIdList.Contains(t.OriginalReReadingTaskId) && t.RequestReReadingUserId == _userInfo.Id && t.RequestReReadingReason == "AIR自动重阅基线").ToListAsync();
+
+ if (requestRecordList.Count != baseLineTaskIdList.Count)
+ {
+ //---后台数据有错误
+ return ResponseOutput.NotOk(_localizer["VisitTask_DoctorConfiguration"]);
+ }
+
+ await ConfirmReReading(new ConfirmReReadingCommand()
+ {
+ TrialId = command.TrialId,
+ RequestReReadingResultEnum = RequestReReadingResult.Agree,
+ //ConfirmReReadingList = new List() { new ConfirmReReadingDTO() { Id = requestRecord.Id, OriginalReReadingTaskId = task.Id } }
+ ConfirmReReadingList = requestRecordList.Select(t => new ConfirmReReadingDTO() { Id = t.Id, OriginalReReadingTaskId = t.OriginalReReadingTaskId }).ToList()
+ }, _visitTaskCommonService);
+ }
+ else
+ {
+ if (command.VisitTaskId != null)
+ {
+ var visitTaskId = command.VisitTaskId.Value;
+ var taskIdList = new List();
+
+ taskIdList.Add(visitTaskId);
+
+ await ApplyReReading(new ApplyReReadingCommand() { IsCopyFollowForms = false, IsCopyOrigenalForms = true, TaskIdList = taskIdList, TrialId = command.TrialId, RequestReReadingReason = "阅片人自动重阅阅片任务", RequestReReadingType = RequestReReadingType.DocotorApply });
+
+ var requestRecord = await _visitTaskReReadingRepository.Where(t => visitTaskId == t.OriginalReReadingTaskId && t.RequestReReadingUserId == _userInfo.Id && t.RequestReReadingReason == "阅片人自动重阅阅片任务").FirstAsync();
+
+ await ConfirmReReading(new ConfirmReReadingCommand()
+ {
+ TrialId = command.TrialId,
+ RequestReReadingResultEnum = RequestReReadingResult.Agree,
+ ConfirmReReadingList = new List() { new ConfirmReReadingDTO() { Id = requestRecord.Id, OriginalReReadingTaskId = visitTaskId } }
+ }, _visitTaskCommonService);
}
}
-
- var baseLineTaskIdList = baseLineTaskList.Select(t => t.Id).ToList();
-
- if (baseLineTaskIdList.Count == 0)
- {
- return ResponseOutput.Ok();
- }
-
- //if (baseLineTaskList == null)
- //{
- // return ResponseOutput.NotOk("基线任务未阅完,不允许重阅基线任务");
- //}
-
- await ApplyReReading(new ApplyReReadingCommand() { IsCopyFollowForms = false, IsCopyOrigenalForms = false, TaskIdList = baseLineTaskIdList, TrialId = command.TrialId, RequestReReadingReason = "AIR自动重阅基线", RequestReReadingType = RequestReReadingType.DocotorApply });
-
-
-
- var requestRecordList = await _visitTaskReReadingRepository.Where(t => baseLineTaskIdList.Contains(t.OriginalReReadingTaskId) && t.RequestReReadingUserId == _userInfo.Id && t.RequestReReadingReason == "AIR自动重阅基线").ToListAsync();
-
- if (requestRecordList.Count != baseLineTaskIdList.Count)
- {
- //---后台数据有错误
- return ResponseOutput.NotOk(_localizer["VisitTask_DoctorConfiguration"]);
- }
-
- await ConfirmReReading(new ConfirmReReadingCommand()
- {
- TrialId = command.TrialId,
- RequestReReadingResultEnum = RequestReReadingResult.Agree,
- //ConfirmReReadingList = new List() { new ConfirmReReadingDTO() { Id = requestRecord.Id, OriginalReReadingTaskId = task.Id } }
- ConfirmReReadingList = requestRecordList.Select(t => new ConfirmReReadingDTO() { Id = t.Id, OriginalReReadingTaskId = t.OriginalReReadingTaskId }).ToList()
- }, _visitTaskCommonService);
-
return ResponseOutput.Ok();
}
@@ -1566,7 +1623,7 @@ public class VisitTaskService(IRepository _visitTaskRepository,
throw new BusinessValidationFailedException(_localizer["VisitTask_BackendData"]);
}
- _logger.LogError("重阅申请状态"+ (int)task.ReReadingApplyState);
+ _logger.LogError("重阅申请状态" + (int)task.ReReadingApplyState);
if (task.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed || task.ReReadingApplyState == ReReadingApplyState.Agree)
{
@@ -1710,7 +1767,7 @@ public class VisitTaskService(IRepository _visitTaskRepository,
}
//AIR 不加验证
- if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR)
+ if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR)
{
task.ReReadingApplyState = ReReadingApplyState.DocotorHaveApplyed;
}
@@ -1846,7 +1903,7 @@ public class VisitTaskService(IRepository _visitTaskRepository,
visitTaskReReadingAppply.RequestReReadingRejectReason = agreeReReadingCommand.RequestReReadingRejectReason;
- Expression> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) && t.TaskAllocationState == TaskAllocationState.Allocated;
+ Expression> filterExpression = t => t.TrialId == trialId && t.SubjectId == origenalTask.SubjectId && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze) /*&& t.TaskAllocationState == TaskAllocationState.Allocated*/;
//是否是一致性分析任务 正常申请 会影响一致性分析任务
filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate);
@@ -2012,7 +2069,10 @@ public class VisitTaskService(IRepository _visitTaskRepository,
}
//IR申请 PM 审批 注意这里有一致性分析的申请同意 不会回退访视,在此要生成影响的访视任务
- else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && (IsPMOrAPm() || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR))
+ else if (visitTaskReReadingAppply.RequestReReadingType == RequestReReadingType.DocotorApply && (IsPMOrAPm() ||
+ _userInfo.UserTypeEnumInt == (int)UserTypeEnum.AIR
+ || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR
+ || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.PI))
{
diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
index 82ee8e51f..f0d23f934 100644
--- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs
@@ -132,13 +132,14 @@ namespace IRaCIS.Core.Application.Service
.ForMember(o => o.IsReadingShowPreviousResults, t => t.MapFrom(u => u.TrialReadingCriterion.IsReadingShowPreviousResults))
.ForMember(o => o.DigitPlaces, t => t.MapFrom(u => u.TrialReadingCriterion.DigitPlaces))
.ForMember(o => o.IseCRFShowInDicomReading, t => t.MapFrom(u => u.TrialReadingCriterion.IseCRFShowInDicomReading))
- .ForMember(o => o.CriterionType, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionType));
+ .ForMember(o => o.CriterionType, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionType))
+ .ForMember(o => o.SubjectShortName, t => t.MapFrom(u => u.Subject.ShortName));
CreateMap().IncludeBase()
.ForMember(o => o.TrialSiteId, t => t.MapFrom(u => u.Subject.TrialSiteId))
- .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindTrialSiteCode :*/ u.Subject.TrialSite.TrialSiteCode))
+ //.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindTrialSiteCode :*/ u.Subject.TrialSite.TrialSiteCode))
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => /*u.IsAnalysisCreate == true ? u.BlindSubjectCode :*/ u.Subject.Code))
.ForMember(o => o.MedicalNo, t => t.MapFrom(u => u.Subject.MedicalNo))
@@ -184,8 +185,9 @@ namespace IRaCIS.Core.Application.Service
CreateMap().IncludeBase()
.ForMember(o => o.TrialSiteId, t => t.MapFrom(u => u.Subject.TrialSiteId))
- .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
- .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code));
+ //.ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode))
+ .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code))
+ .ForMember(d => d.PatientList, u => u.MapFrom(s => s.Subject.SubjectPatientList));
diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs
index 6717099d1..9dd548228 100644
--- a/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs
+++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DTO/DicomSeriesModel.cs
@@ -42,6 +42,9 @@ namespace IRaCIS.Core.Application.Contracts.Dicom.DTO
public List InstanceInfoList { get; set; } = new List();
+ public List InstanceList => InstanceInfoList.Select(t => t.Id).ToList();
+ public List InstancePathList => InstanceInfoList.Select(t => t.Path).ToList();
+
public bool IsExistMutiFrames => InstanceInfoList.Any(t => t.NumberOfFrames > 1);
diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs
index b68d648e1..770e09914 100644
--- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs
+++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs
@@ -124,6 +124,7 @@ namespace IRaCIS.Application.Contracts
public class UserInfo
{
+ public string CheckCode { get; set; } = string.Empty;
public Guid Id { get; set; }
public string UserName { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
@@ -194,6 +195,8 @@ namespace IRaCIS.Application.Contracts
public string NewPassWord { get; set; } = string.Empty;
public string OldPassWord { get; set; } = string.Empty;
+
+ public string CheckCode { get; set; } = string.Empty;
}
diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs
index 182ebd63b..415e00642 100644
--- a/IRaCIS.Core.Application/Service/Management/UserService.cs
+++ b/IRaCIS.Core.Application/Service/Management/UserService.cs
@@ -237,8 +237,6 @@ namespace IRaCIS.Core.Application.Service
}
-
-
[HttpGet]
public async Task InitSetUserNameAndPwd(Guid userId, string newUserName, string newPWd)
{
@@ -341,65 +339,7 @@ namespace IRaCIS.Core.Application.Service
}
- ///
- /// 验证验证码,没问题就返回用户所有的账户
- ///
- ///
- ///
- ///
- ///
- [AllowAnonymous]
- [HttpGet("{email}/{verifyCode}")]
- public async Task> VerifyAnonymousVerifyCode(string email, string verifyCode)
- {
- if (_systemHospitalConfig.CurrentValue.IsCanConnectInternet)
- {
- var verificationRecord = await _verificationCodeRepository
- .Where(t => t.UserId == Guid.Empty && t.Code == verifyCode && t.CodeType == VerifyType.Email && t.EmailOrPhone == email).OrderByDescending(t => t.CreateTime).FirstOrDefaultAsync();
-
- //检查数据库是否存在该验证码
- if (verificationRecord == null)
- {
-
- //---验证码错误。
- throw new BusinessValidationFailedException(_localizer["User_VerificationCodeError"]);
- }
- else
- {
- //检查验证码是否失效
- if (verificationRecord.ExpirationTime < DateTime.Now)
- {
-
- //---验证码已经过期。
- throw new BusinessValidationFailedException(_localizer["User_VerificationCodeExpired"]);
- }
- else //验证码正确 并且 没有超时
- {
-
- //删除验证码历史记录
- await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.Id == verificationRecord.Id);
- }
- }
- }
- else
- {
- var isPass = _userRepository.Where(t => t.EMail == email).Any(t => t.CheckCode == verifyCode);
-
- if (!isPass)
- {
- throw new BusinessValidationFailedException(_localizer["User_VerificationCodeError"]);
- }
- }
-
-
-
- var list = await _userRepository.Where(t => t.EMail == email).Select(t => new UserAccountDto() { UserId = t.Id, UserName = t.UserName, UserRealName = t.FullName, UserType = t.UserTypeRole.UserTypeShortName }).ToListAsync();
-
-
-
- return list;
- }
-
+
///
/// (未登陆) 设置新密码
@@ -427,43 +367,7 @@ namespace IRaCIS.Core.Application.Service
}
- ///
- /// 修改密码,当前支持旧密码修改密码
- ///
- ///
- [HttpPost]
- [UnitOfWork]
- public async Task ModifyPassword(EditPasswordCommand editPwModel)
- {
- await VerifyUserPwdAsync(_userInfo.Id, editPwModel.NewPassWord, editPwModel.OldPassWord);
-
-
- if (!string.IsNullOrEmpty(editPwModel.NewUserName))
- {
-
- await VerifyUserNameAsync(_userInfo.Id, editPwModel.NewUserName);
-
- await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.Id, u => new User()
- {
- UserName = editPwModel.NewUserName,
- });
-
- }
-
- var success = await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.Id, u => new User()
- {
- Password = editPwModel.NewPassWord,
- IsFirstAdd = false
- });
-
- await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.LoginModifyPassword }, true);
-
- return ResponseOutput.Result(success);
-
-
-
- }
@@ -862,5 +766,122 @@ namespace IRaCIS.Core.Application.Service
return ResponseOutput.Ok();
}
+
+ #region HIR 修改
+
+ ///
+ /// 验证验证码,没问题就返回用户所有的账户
+ ///
+ ///
+ ///
+ ///
+ ///
+ [AllowAnonymous]
+ [HttpGet("{email}/{verifyCode}")]
+ public async Task> VerifyAnonymousVerifyCode(string email, string verifyCode)
+ {
+ if (_systemHospitalConfig.CurrentValue.IsCanConnectInternet)
+ {
+ var verificationRecord = await _verificationCodeRepository
+ .Where(t => t.UserId == Guid.Empty && t.Code == verifyCode && t.CodeType == VerifyType.Email && t.EmailOrPhone == email).OrderByDescending(t => t.CreateTime).FirstOrDefaultAsync();
+
+ //检查数据库是否存在该验证码
+ if (verificationRecord == null)
+ {
+
+ //---验证码错误。
+ throw new BusinessValidationFailedException(_localizer["User_VerificationCodeError"]);
+ }
+ else
+ {
+ //检查验证码是否失效
+ if (verificationRecord.ExpirationTime < DateTime.Now)
+ {
+
+ //---验证码已经过期。
+ throw new BusinessValidationFailedException(_localizer["User_VerificationCodeExpired"]);
+ }
+ else //验证码正确 并且 没有超时
+ {
+
+ //删除验证码历史记录
+ await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.Id == verificationRecord.Id);
+ }
+ }
+ }
+ else
+ {
+ var isPass = _userRepository.Where(t => t.EMail == email).Any(t => t.CheckCode == verifyCode);
+
+ if (!isPass)
+ {
+ throw new BusinessValidationFailedException(_localizer["User_VerificationCodeError"]);
+ }
+ }
+
+
+
+ var list = await _userRepository.Where(t => t.EMail == email).Select(t => new UserAccountDto() { UserId = t.Id, UserName = t.UserName, UserRealName = t.FullName, UserType = t.UserTypeRole.UserTypeShortName }).ToListAsync();
+
+
+
+ return list;
+ }
+
+
+ [HttpPut("{newCheckCode}")]
+ public async Task SetNewCheckCode(string newCheckCode)
+ {
+ var user = await _userRepository.FirstOrDefaultNoTrackingAsync(t => t.Id == _userInfo.Id);
+
+ await _userRepository.UpdatePartialFromQueryAsync(t => t.EMail == user.EMail, u => new User()
+ {
+ CheckCode = newCheckCode
+ });
+
+ await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.ModifyCheckCode }, true);
+ return ResponseOutput.Ok();
+ }
+
+ ///
+ /// 修改密码,当前支持旧密码修改密码
+ ///
+ ///
+ [HttpPost]
+ [UnitOfWork]
+ public async Task ModifyPassword(EditPasswordCommand editPwModel)
+ {
+
+ await VerifyUserPwdAsync(_userInfo.Id, editPwModel.NewPassWord, editPwModel.OldPassWord);
+
+
+ if (!string.IsNullOrEmpty(editPwModel.NewUserName))
+ {
+
+ await VerifyUserNameAsync(_userInfo.Id, editPwModel.NewUserName);
+
+ await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.Id, u => new User()
+ {
+ UserName = editPwModel.NewUserName,
+ });
+
+ }
+
+ var success = await _userRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.Id, u => new User()
+ {
+ Password = editPwModel.NewPassWord,
+ CheckCode = editPwModel.CheckCode,
+ IsFirstAdd = false
+ });
+
+ await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.LoginModifyPassword }, true);
+
+ return ResponseOutput.Result(success);
+
+
+
+ }
+
+ #endregion
}
}
diff --git a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs
index 924343023..aed7aaa10 100644
--- a/IRaCIS.Core.Application/Service/Management/UserTypeService.cs
+++ b/IRaCIS.Core.Application/Service/Management/UserTypeService.cs
@@ -91,7 +91,7 @@ namespace IRaCIS.Core.Application.Contracts
}
-
+ #region HIR 修改
///
/// 通过传递场景枚举 返回对应的下拉框数据 1:是外部 2:是内部 3:是Site调研 4: 邮件接收人,5:邮件抄送人
@@ -105,49 +105,53 @@ namespace IRaCIS.Core.Application.Contracts
if (userTypeSelectEnum == UserTypeSelectEnum.ExternalUser)
{
- userTypeEnums = new List() { UserTypeEnum.CPM, UserTypeEnum.SPM, UserTypeEnum.CPM, UserTypeEnum.SMM, UserTypeEnum.CMM, UserTypeEnum.EA, UserTypeEnum.MC };
- }
+ if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.TA)
+ {
+ userTypeEnums = new List() { UserTypeEnum.ProjectManager };
+ }
+ else
+ {
+ userTypeEnums = new List() { UserTypeEnum.PI, UserTypeEnum.MIM, UserTypeEnum.IQC };
+ }
-
- if (userTypeSelectEnum == UserTypeSelectEnum.InnerUser)
- {
- userTypeEnums = new List() { UserTypeEnum.ClinicalResearchCoordinator, UserTypeEnum.ProjectManager, UserTypeEnum.CRA, UserTypeEnum.IQC, UserTypeEnum.APM, UserTypeEnum.MIM, UserTypeEnum.QA, UserTypeEnum.MW, UserTypeEnum.MC };
-
- //if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin)
- //{
- // userTypeEnums.Add(UserTypeEnum.ProjectManager);
- //}
}
if (userTypeSelectEnum == UserTypeSelectEnum.SiteSurvey)
{
- userTypeEnums = new List() { UserTypeEnum.CRA, UserTypeEnum.ClinicalResearchCoordinator };
-
+ userTypeEnums = new List() { UserTypeEnum.SR, UserTypeEnum.ClinicalResearchCoordinator, UserTypeEnum.CRA };
}
if (userTypeSelectEnum == UserTypeSelectEnum.EnrollOrPD_EMailCopy)
{
- userTypeEnums = new List() { UserTypeEnum.ProjectManager, UserTypeEnum.APM, UserTypeEnum.CPM, UserTypeEnum.SPM, UserTypeEnum.SMM, UserTypeEnum.CMM };
+ userTypeEnums = new List() { UserTypeEnum.ProjectManager, UserTypeEnum.APM, UserTypeEnum.CPM, UserTypeEnum.SPM };
}
if (userTypeSelectEnum == UserTypeSelectEnum.EnrollOrPD_EmailReceive)
{
userTypeEnums = new List() { UserTypeEnum.CRA, UserTypeEnum.ClinicalResearchCoordinator };
+ }
+ if (userTypeSelectEnum == UserTypeSelectEnum.TrialDoc)
+ {
+ userTypeEnums = new List() { UserTypeEnum.PI, UserTypeEnum.SR, UserTypeEnum.ProjectManager, UserTypeEnum.TA, UserTypeEnum.IQC, UserTypeEnum.IM, UserTypeEnum.MIM };
}
-
- var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
- .WhereIf(userTypeSelectEnum != UserTypeSelectEnum.None, t => userTypeEnums.Contains(t.UserTypeEnum))
- .OrderBy(t => t.UserTypeShortName).ProjectTo(_mapper.ConfigurationProvider);
+ var query = _userTypeRepository/*.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)*/
+ .WhereIf(userTypeSelectEnum != UserTypeSelectEnum.None && userTypeEnums.Count > 0, t => userTypeEnums.Contains(t.UserTypeEnum))
+ .OrderBy(t => t.Order).ProjectTo(_mapper.ConfigurationProvider);
return await query.ToListAsync();
}
+ #endregion
+
+
+
+
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
index 6d714ca4d..ab27fc0e1 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs
@@ -3188,6 +3188,7 @@ namespace IRaCIS.Core.Application.Service
await VerifyTaskIsSign(visitTaskId);
await _visitTaskRepository.UpdatePartialFromQueryAsync(visitTaskId, x => new VisitTask()
{
+ DoctorUserId = _userInfo.Id,
ReadingTaskState = ReadingTaskState.HaveSigned,
SignTime = DateTime.Now,
});
@@ -3238,7 +3239,7 @@ namespace IRaCIS.Core.Application.Service
await _visitTaskRepository.SaveChangesAsync();
- await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(visitTaskId);
+ //await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(visitTaskId);
}
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/DicomAEViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/DicomAEViewModel.cs
index 7c3233b4d..c8b7f18df 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/DicomAEViewModel.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/DicomAEViewModel.cs
@@ -3,7 +3,9 @@
// 生成时间 2024-03-22 15:44:37
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
//--------------------------------------------------------------------
-using System.ComponentModel.DataAnnotations;
+using System;
+using IRaCIS.Core.Domain.Share;
+using System.Collections.Generic;
namespace IRaCIS.Core.Application.ViewModel
{
/// DicomAEView 列表视图模型
@@ -16,18 +18,13 @@ namespace IRaCIS.Core.Application.ViewModel
public DateTime? LatestTestTime { get; set; }
-
- //public bool IsPACSConnect { get; set; }
-
- //public bool IsTrialPACSConfirmed { get; set; }
+ public bool IsTestOK { get; set; }
}
///DicomAEQuery 列表查询参数模型
public class DicomAEQuery : PageInput
{
- public Guid? TrialId { get; set; }
-
public string? CalledAE { get; set; }
public string? IP { get; set; }
@@ -46,26 +43,11 @@ namespace IRaCIS.Core.Application.ViewModel
{
public Guid? Id { get; set; }
- [NotDefault]
- public Guid TrialId { get; set; }
-
- public string CalledAE { get; set; } = string.Empty;
- public string IP { get; set; } = string.Empty;
- public int? Port { get; set; }
+ public string CalledAE { get; set; }
+ public string IP { get; set; }
+ public int Port { get; set; }
public string Modality { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
-
-
- public bool IsPACSConnect { get; set; }
-
- public bool? IsTestOK { get; set; }
- }
-
- public class TestAECommand
- {
- public string CalledAE { get; set; } = string.Empty;
- public string IP { get; set; } = string.Empty;
- public int Port { get; set; }
}
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/IDicomAEService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/IDicomAEService.cs
index 71f56aeb4..679c49f40 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/IDicomAEService.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/IDicomAEService.cs
@@ -15,7 +15,7 @@ namespace IRaCIS.Core.Application.Interfaces
Task>> GetDicomAEList(DicomAEQuery inQuery);
- Task AddOrUpdateDicomAE(DicomAEAddOrEdit addOrEditDicomAE);
+ //Task AddOrUpdateDicomAE(DicomAEAddOrEdit addOrEditDicomAE);
Task DeleteDicomAE(Guid dicomAEId);
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs
index 4e77f55b1..97a8503d4 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialDicomAEService.cs
@@ -56,57 +56,57 @@ namespace IRaCIS.Core.Application.Service
}
- public async Task AddOrUpdateDicomAE(DicomAEAddOrEdit addOrEditDicomAE)
- {
- var verifyExp1 = new EntityVerifyExp()
- {
- VerifyExp = u => u.IP == addOrEditDicomAE.IP && u.Port == addOrEditDicomAE.Port && u.TrialId == addOrEditDicomAE.TrialId,
+ //public async Task AddOrUpdateDicomAE(DicomAEAddOrEdit addOrEditDicomAE)
+ //{
+ // var verifyExp1 = new EntityVerifyExp()
+ // {
+ // VerifyExp = u => u.IP == addOrEditDicomAE.IP && u.Port == addOrEditDicomAE.Port && u.TrialId == addOrEditDicomAE.TrialId,
- //"不允许添加相同的IP和端口的记录"
- VerifyMsg = _localizer["TrialDicomAE_RepeatIPAndPort"]
- };
+ // //"不允许添加相同的IP和端口的记录"
+ // VerifyMsg = _localizer["TrialDicomAE_RepeatIPAndPort"]
+ // };
- var verifyExp2 = new EntityVerifyExp()
- {
- VerifyExp = u => u.CalledAE == addOrEditDicomAE.CalledAE,
+ // var verifyExp2 = new EntityVerifyExp()
+ // {
+ // VerifyExp = u => u.CalledAE == addOrEditDicomAE.CalledAE,
- //"AE名称不能与其他项目相同"
- VerifyMsg = _localizer["TrialDicomAE_RepeatCalledAE"]
- };
+ // //"AE名称不能与其他项目相同"
+ // VerifyMsg = _localizer["TrialDicomAE_RepeatCalledAE"]
+ // };
- var verifyExp3 = new EntityVerifyExp()
- {
- VerifyExp = u => u.TrialId == addOrEditDicomAE.TrialId,
+ // var verifyExp3 = new EntityVerifyExp()
+ // {
+ // VerifyExp = u => u.TrialId == addOrEditDicomAE.TrialId,
- //"AE名称不能与其他项目相同"
- VerifyMsg = "该项目只允许添加一条dicom AE记录(前端对接有bug时出现)"
- };
+ // //"AE名称不能与其他项目相同"
+ // VerifyMsg = "该项目只允许添加一条dicom AE记录(前端对接有bug时出现)"
+ // };
- //var verifyExp2 = new EntityVerifyExp()
- //{
- // VerifyExp = u => u.TrialId == addOrEditDicomAE.TrialId,
+ // //var verifyExp2 = new EntityVerifyExp()
+ // //{
+ // // VerifyExp = u => u.TrialId == addOrEditDicomAE.TrialId,
- // VerifyMsg = "只允许配置一条记录",
- // IsVerify=addOrEditDicomAE.Id==null
- //};
+ // // VerifyMsg = "只允许配置一条记录",
+ // // IsVerify=addOrEditDicomAE.Id==null
+ // //};
- await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == addOrEditDicomAE.TrialId, u => new Trial() { IsPACSConnect = addOrEditDicomAE.IsPACSConnect }, true);
+ // await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == addOrEditDicomAE.TrialId, u => new Trial() { IsPACSConnect = addOrEditDicomAE.IsPACSConnect }, true);
- if (addOrEditDicomAE.IsPACSConnect)
- {
- // 在此处拷贝automapper 映射
- var entity = await _dicomAERepository.InsertOrUpdateAsync(addOrEditDicomAE, true, verifyExp3, verifyExp1, verifyExp2);
+ // if (addOrEditDicomAE.IsPACSConnect)
+ // {
+ // // 在此处拷贝automapper 映射
+ // var entity = await _dicomAERepository.InsertOrUpdateAsync(addOrEditDicomAE, true, verifyExp3, verifyExp1, verifyExp2);
- return ResponseOutput.Ok(entity.Id.ToString());
- }
- else
- {
- return ResponseOutput.Ok();
- }
+ // return ResponseOutput.Ok(entity.Id.ToString());
+ // }
+ // else
+ // {
+ // return ResponseOutput.Ok();
+ // }
- }
+ //}
[HttpDelete("{dicomAEId:guid}")]
@@ -117,41 +117,41 @@ namespace IRaCIS.Core.Application.Service
}
- ///
- /// 测试scp server 是否可以连接
- ///
- ///
- [HttpPost]
- public async Task TestSCPServerConnect(TestAECommand inCommand)
- {
- try
- {
- var client = DicomClientFactory.Create(inCommand.IP, inCommand.Port, false, "test-callingAE", inCommand.CalledAE);
+ /////
+ ///// 测试scp server 是否可以连接
+ /////
+ /////
+ //[HttpPost]
+ //public async Task TestSCPServerConnect(TestAECommand inCommand)
+ //{
+ // try
+ // {
+ // var client = DicomClientFactory.Create(inCommand.IP, inCommand.Port, false, "test-callingAE", inCommand.CalledAE);
- client.NegotiateAsyncOps();
+ // client.NegotiateAsyncOps();
- await client.AddRequestAsync(new DicomCEchoRequest());
+ // await client.AddRequestAsync(new DicomCEchoRequest());
- // 创建一个超时任务,设置超时时间为1秒
- var timeoutTask = Task.Delay(TimeSpan.FromSeconds(3));
+ // // 创建一个超时任务,设置超时时间为1秒
+ // var timeoutTask = Task.Delay(TimeSpan.FromSeconds(3));
- // 发送 DICOM 请求
- var sendTask = client.SendAsync();
+ // // 发送 DICOM 请求
+ // var sendTask = client.SendAsync();
- // 等待任务完成,若超时任务先完成则抛出超时异常
- if (await Task.WhenAny(sendTask, timeoutTask) == timeoutTask)
- {
- throw new TimeoutException("DICOM 请求超时。");
- }
- return true;
- }
- catch (Exception ex)
- {
- return false;
- }
+ // // 等待任务完成,若超时任务先完成则抛出超时异常
+ // if (await Task.WhenAny(sendTask, timeoutTask) == timeoutTask)
+ // {
+ // throw new TimeoutException("DICOM 请求超时。");
+ // }
+ // return true;
+ // }
+ // catch (Exception ex)
+ // {
+ // return false;
+ // }
- }
+ //}
}
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs
index 4d75837ad..a46e6c232 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialMaintenanceService.cs
@@ -84,14 +84,14 @@ namespace IRaCIS.Core.Application.Service
//之前已经选择的用户 不放在列表中,现在又要改回去 废弃
var query = _userRepository.Where(t => t.UserTypeEnum != UserTypeEnum.SuperAdmin)
- //正式或者培训的项目 不能允许测试用户(必须正式用户) 同时必须是内部的用户
- .WhereIf(trialType == TrialType.OfficialTrial || trialType == TrialType.Training, t => t.IsTestUser == false && t.IsZhiZhun)
+ ////正式或者培训的项目 不能允许测试用户(必须正式用户) 同时必须是内部的用户
+ //.WhereIf(trialType == TrialType.OfficialTrial || trialType == TrialType.Training, t => t.IsTestUser == false && t.IsZhiZhun)
- //测试项目 可以加入 测试用户 或者内部正式用户
- .WhereIf(trialType == TrialType.NoneOfficial, t => t.IsTestUser == true || (t.IsTestUser == false && t.IsZhiZhun))
+ ////测试项目 可以加入 测试用户 或者内部正式用户
+ //.WhereIf(trialType == TrialType.NoneOfficial, t => t.IsTestUser == true || (t.IsTestUser == false && t.IsZhiZhun))
- .Where(t => userTypeEnums.Contains(t.UserTypeEnum))
+ //.Where(t => userTypeEnums.Contains(t.UserTypeEnum))
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.UserRealName), t => (t.FullName).Contains(inQuery.UserRealName))
diff --git a/IRaCIS.Core.Application/Service/Visit/DicomAEService.cs b/IRaCIS.Core.Application/Service/Visit/DicomAEService.cs
index ac11e0f0b..2e98625a3 100644
--- a/IRaCIS.Core.Application/Service/Visit/DicomAEService.cs
+++ b/IRaCIS.Core.Application/Service/Visit/DicomAEService.cs
@@ -92,16 +92,27 @@ namespace IRaCIS.Core.Application.Service
{
var client = DicomClientFactory.Create(find.IP, find.Port, false, "test-callingAE", find.CalledAE);
+
client.NegotiateAsyncOps();
- await client.AddRequestAsync(new DicomCEchoRequest());
+ await client.AddRequestAsync(new DicomCEchoRequest());
- await client.SendAsync();
+ // 创建一个超时任务,设置超时时间为1秒
+ var timeoutTask = Task.Delay(TimeSpan.FromSeconds(3));
+
+ // 发送 DICOM 请求
+ var sendTask = client.SendAsync();
+
+ // 等待任务完成,若超时任务先完成则抛出超时异常
+ if (await Task.WhenAny(sendTask, timeoutTask) == timeoutTask)
+ {
+ throw new TimeoutException("DICOM 请求超时。");
+ }
find.IsTestOK = true;
await _dicomAERepository.SaveChangesAsync();
- return true;
+ return true;
}
catch (Exception ex)
{
diff --git a/IRaCIS.Core.Application/Service/Visit/PatientService.cs b/IRaCIS.Core.Application/Service/Visit/PatientService.cs
index 9a36f213a..d178da04a 100644
--- a/IRaCIS.Core.Application/Service/Visit/PatientService.cs
+++ b/IRaCIS.Core.Application/Service/Visit/PatientService.cs
@@ -271,7 +271,7 @@ namespace IRaCIS.Application.Services
var caheInfo = new TrialCacheInfo() { TrialId = trial.Id, TrialStatusStr = trial.TrialStatusStr, CriterionTypes = trial.CriterionTypes, AuthorizationEncrypt = trial.AuthorizationEncrypt, AuthorizationDate = trial.AuthorizationDate, CreateUserId = trial.CreateUserId, TrialCode = trial.TrialCode };
- await _provider.SetAsync(trial.Id.ToString(), JsonConvert.SerializeObject(caheInfo), TimeSpan.FromDays(7));
+ await _provider.SetAsync(trial.Id.ToString(),caheInfo, TimeSpan.FromDays(7));
return ResponseOutput.Ok(trial);
}
@@ -319,7 +319,7 @@ namespace IRaCIS.Application.Services
var caheInfo = new TrialCacheInfo() { TrialId = trial.Id, TrialStatusStr = trial.TrialStatusStr, CriterionTypes = trial.CriterionTypes, AuthorizationEncrypt = trial.AuthorizationEncrypt, AuthorizationDate = trial.AuthorizationDate, CreateUserId = trial.CreateUserId, TrialCode = trial.TrialCode };
- await _provider.SetAsync(trial.Id.ToString(), JsonConvert.SerializeObject(caheInfo), TimeSpan.FromDays(7));
+ await _provider.SetAsync(trial.Id.ToString(), caheInfo, TimeSpan.FromDays(7));
var success = await _trialRepository.SaveChangesAsync();
@@ -736,7 +736,7 @@ namespace IRaCIS.Application.Services
}
- var study = await _studyRepository.FindAsync(scpStudyId);
+ var study = await _studyRepository.FirstOrDefaultAsync(t=>t.Id== scpStudyId);
return ResponseOutput.Ok(seriesList, study);
}
@@ -1807,7 +1807,7 @@ namespace IRaCIS.Application.Services
await _repository.AddAsync(newStuty);
//newStuty.Id = NewId.NextSequentialGuid();
- newStuty.SeqId = Guid.Empty;
+ newStuty.SeqId = NewId.NextSequentialGuid();
newStuty.Code = currentNextCodeInt;
newStuty.StudyCode = AppSettings.GetCodeStr(currentNextCodeInt, nameof(DicomStudy));
newStuty.TrialId = item.TrialId;
@@ -1824,7 +1824,7 @@ namespace IRaCIS.Application.Services
series.Id = seriesId;
series.StudyId = newStuty.Id;
- series.SeqId = Guid.Empty;
+ series.SeqId = NewId.NextSequentialGuid();
series.TrialId = item.TrialId;
series.SubjectId = item.SubjectId;
series.SubjectVisitId = item.SubjectVisitId;
@@ -1843,7 +1843,7 @@ namespace IRaCIS.Application.Services
instance.SeriesId = seriesId;
instance.StudyId = newStuty.Id;
- instance.SeqId = Guid.Empty;
+ instance.SeqId = NewId.NextSequentialGuid();
instance.TrialId = item.TrialId;
instance.SubjectId = item.SubjectId;
instance.SubjectVisitId = item.SubjectVisitId;
diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs
index 5bdac402f..8af068503 100644
--- a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs
+++ b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs
@@ -174,26 +174,21 @@ namespace IRaCIS.Core.Application.Services
[HttpDelete, Route("{trialId:guid}/{id:guid}")]
[TrialGlobalLimit( "AfterStopCannNotOpt" )]
- //[Authorize(Policy = IRaCISPolicy.CRC)]
public async Task DeleteSV(Guid id)
{
- if (await _dicomStudyRepository.AnyAsync(t => t.SubjectVisitId == id))
+ var sv = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == id);
+
+ var maxUnsubmmitVisit = await _subjectVisitRepository.Where(t => t.SubjectId == sv.SubjectId && t.SubmitState == SubmitStateEnum.None).OrderByDescending(t => t.VisitNum).FirstOrDefaultAsync();
+ if (maxUnsubmmitVisit != null && sv.VisitNum == maxUnsubmmitVisit.VisitNum)
{
- //---当前访视已经有影像上传,不允许删除。
- return ResponseOutput.NotOk(_localizer["Visit_UploadedNoDelete"]);
+ await _subjectVisitRepository.DeleteAsync(sv, true);
+
}
- if (await _subjectVisitRepository.AnyAsync(t => t.Id == id && t.InPlan))
+ else
{
- //---计划内的访视不允许删除。
- return ResponseOutput.NotOk(_localizer["Visit_PlanVisitNoDelete"]);
- }
- if (await _subjectVisitRepository.AnyAsync(t => t.OutPlanPreviousVisitId == id))
- {
- //---当前访视已经被设置为另一访视的上一访视,不允许删除。
- return ResponseOutput.NotOk(_localizer["Visit_PreviousVisitNoDelete"]);
+ return ResponseOutput.NotOk("删除访视操作,每次只允许删除该受试者未绑定检查的最后一个访视");
}
- await _subjectVisitRepository.DeleteFromQueryAsync(s => s.Id == id, true);
return ResponseOutput.Ok();
}
diff --git a/IRaCIS.Core.Domain.Share/Reading/ImageFilterState.cs b/IRaCIS.Core.Domain.Share/Reading/ImageFilterState.cs
index 6baea1987..d40bc0898 100644
--- a/IRaCIS.Core.Domain.Share/Reading/ImageFilterState.cs
+++ b/IRaCIS.Core.Domain.Share/Reading/ImageFilterState.cs
@@ -45,7 +45,9 @@ public enum UserOptType
MFALoginFail = 13,
- AddUser = 14
+ AddUser = 14,
+
+ ModifyCheckCode = 15,
}
[Description("影像下载打包状态")]
diff --git a/IRaCIS.Core.Domain.Share/User/UserType.cs b/IRaCIS.Core.Domain.Share/User/UserType.cs
index 2dc5e933c..ee05258e0 100644
--- a/IRaCIS.Core.Domain.Share/User/UserType.cs
+++ b/IRaCIS.Core.Domain.Share/User/UserType.cs
@@ -99,6 +99,9 @@
EnrollOrPD_EmailReceive=4,
EnrollOrPD_EMailCopy=5,
+
+ //HIR
+ TrialDoc = 6,
}
public enum UserMFAType
diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs
index 2a1c049ff..9c9a345b1 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs
@@ -87,10 +87,10 @@ public class ReadingQuestionCriterionTrial : BaseAddAuditEntity
public ImagePlatform ImagePlatform { get; set; } = ImagePlatform.PACS;
[Comment("阅片工具")]
- public ReadingTool? ReadingTool { get; set; }
+ public ReadingTool? ReadingTool { get; set; } = Share.ReadingTool.Dicom;
[Comment("任务组织级别")]
- public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
+ public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; } = ReadingTaskViewMethod.Subject;
[Comment("阅片是否显示受试者信息")]
public bool IsReadingShowSubjectInfo { get; set; } = true;
@@ -100,19 +100,19 @@ public class ReadingQuestionCriterionTrial : BaseAddAuditEntity
public bool IsConfirmMedicineQuestion { get; set; } = false;
[Comment("仲裁对象")]
- public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.Reading;
+ public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.None;
[Comment("阅片模式")]
- public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double;
+ public ReadingMethod ReadingType { get; set; } = ReadingMethod.Single;
[Comment("存在阅片期")]
- public bool IsReadingPeriod { get; set; } = true;
+ public bool IsReadingPeriod { get; set; } = false;
[Comment("是否生成全局阅片任务")]
- public bool IsGlobalReading { get; set; } = true;
+ public bool IsGlobalReading { get; set; } = false;
[Comment("是否签名")]
public bool IsSigned { get; set; } = false;
[Comment("仲裁阅片")]
- public bool IsArbitrationReading { get; set; } = true;
+ public bool IsArbitrationReading { get; set; } = false;
[Comment("肿瘤学阅片 原字段 IsClinicalReading")]
public bool IsOncologyReading { get; set; }
diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs
index 613a6d5aa..7e0ddebca 100644
--- a/IRaCIS.Core.Domain/Trial/Trial.cs
+++ b/IRaCIS.Core.Domain/Trial/Trial.cs
@@ -258,7 +258,7 @@ public partial class Trial : BaseFullDeleteAuditEntity
#endregion
public bool IsPACSConnect { get; set; }
- public bool IsTrialPACSConfirmed { get; set; }
+ public bool IsTrialPACSConfirmed { get; set; } = true;
[Comment("项目术语配置Json字符串")]
[StringLength(2000)]
@@ -294,6 +294,7 @@ public partial class Trial : BaseFullDeleteAuditEntity
public int AuthorizationDuration { get; set; }
+ [MaxLength]
public string AuthorizationEncrypt { get; set; } = string.Empty;
public DateTime? AuthorizationDate { get; set; }
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index 7297f3c80..20d48cc0e 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -3681,7 +3681,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
if (inspection.VisitTaskId != null)
{
- if (generalData.TrialId == null || generalData.TrialSiteId == null || generalData.SubjectId == null || generalData.TrialReadingCriterionId == null)
+ if (generalData.TrialId == null || /*generalData.TrialSiteId == null ||*/ generalData.SubjectId == null || generalData.TrialReadingCriterionId == null)
{
var info = await _dbContext.VisitTask.Where(x => x.Id == inspection.VisitTaskId).Select(x => new { SubjectCode = x.Subject.Code, TrialSiteCode = x.Subject.TrialSite.TrialSiteCode, SubjectId = x.SubjectId, x.Subject.TrialSiteId, x.TrialId, x.SourceSubjectVisitId, ReadModuleSubjectVisitId = (Guid?)x.ReadModule.SubjectVisitId, x.TrialReadingCriterionId }).FirstOrDefaultAsync();
@@ -3712,7 +3712,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
if (inspection.SubjectVisitId != null)
{
- if (generalData.TrialId == null || generalData.TrialSiteId == null || generalData.SubjectId == null)
+ if (generalData.TrialId == null /*|| generalData.TrialSiteId == null*/ || generalData.SubjectId == null)
{
var info = await _dbContext.SubjectVisit.Where(x => x.Id == generalData.SubjectVisitId).Select(x =>
new { x.SubjectId, x.TrialSiteId, x.TrialId, SubjectCode = x.Subject.Code, TrialSiteCode = x.Subject.TrialSite.TrialSiteCode }).FirstOrDefaultAsync();
@@ -3733,9 +3733,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
if (generalData.SubjectId != null)
{
- if (generalData.TrialId == null || generalData.TrialSiteId == null)
+ if (generalData.TrialId == null /*|| generalData.TrialSiteId == null*/)
{
- var info = await _dbContext.Subject.Where(x => x.Id == generalData.SubjectId).Select(x => new { SubjectId = x.Id, x.TrialSiteId, x.TrialId, SubjectCode = x.Code, TrialSiteCode = x.TrialSite.TrialSiteCode }).FirstOrDefaultAsync();
+ var info = await _dbContext.Subject.Where(x => x.Id == generalData.SubjectId).Select(x => new { SubjectId = x.Id, x.TrialSiteId, x.TrialId, SubjectCode = x.Code, /*TrialSiteCode = x.TrialSite.TrialSiteCode*/ }).FirstOrDefaultAsync();
if (info == null)
{
@@ -3757,7 +3757,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//以后移除
- generalData.SiteCode = info?.TrialSiteCode ?? generalData.SiteCode;
+ //generalData.SiteCode = info?.TrialSiteCode ?? generalData.SiteCode;
generalData.SubjectCode = info?.SubjectCode ?? generalData.SubjectCode;
}
diff --git a/IRaCIS.Core.Infra.EFCore/EntityConfigration/ImageConfigration.cs b/IRaCIS.Core.Infra.EFCore/EntityConfigration/ImageConfigration.cs
index 873e12540..dd78d1d62 100644
--- a/IRaCIS.Core.Infra.EFCore/EntityConfigration/ImageConfigration.cs
+++ b/IRaCIS.Core.Infra.EFCore/EntityConfigration/ImageConfigration.cs
@@ -83,6 +83,11 @@ public class SCPStudyConfigration : IEntityTypeConfiguration
builder.HasMany(s => s.SeriesList).WithOne(se => se.SCPStudy).HasForeignKey(se => se.StudyId).HasPrincipalKey(st => st.Id);
+ builder.HasMany(s => s.SCPStudySubjectVisitList).WithOne(se => se.SCPStudy).HasForeignKey(se => se.SCPStudyId).HasPrincipalKey(st => st.Id);
+
+ builder.HasMany(s => s.InstanceList).WithOne(se => se.SCPStudy).HasForeignKey(se => se.StudyId).HasPrincipalKey(st => st.Id);
+
+
}
}
diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241113013510_TrialAuthorizationEncrypt.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241113013510_TrialAuthorizationEncrypt.Designer.cs
new file mode 100644
index 000000000..80ef66365
--- /dev/null
+++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241113013510_TrialAuthorizationEncrypt.Designer.cs
@@ -0,0 +1,18644 @@
+//
+using System;
+using IRaCIS.Core.Infra.EFCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace IRaCIS.Core.Infra.EFCore.Migrations
+{
+ [DbContext(typeof(IRaCISDBContext))]
+ [Migration("20241113013510_TrialAuthorizationEncrypt")]
+ partial class TrialAuthorizationEncrypt
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.10")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("编码");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DoctorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ExpiryDate")
+ .HasColumnType("datetime2")
+ .HasComment("过期时间");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsOfficial")
+ .HasColumnType("bit")
+ .HasComment("是否正式简历");
+
+ b.Property("Language")
+ .HasColumnType("int")
+ .HasComment("1 中文 2为英文");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("文件类型名");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("DoctorId");
+
+ b.ToTable("Attachment", t =>
+ {
+ t.HasComment("医生 - 简历|证书 文档表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CROCode")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CROName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CRONameCN")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsTrialLevel")
+ .HasColumnType("bit")
+ .HasComment("是否是项目级别");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("CROCompany", t =>
+ {
+ t.HasComment("机构 - CRO");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsCRCNeedReply")
+ .HasColumnType("bit")
+ .HasComment("CRC是否需要回复 前端使用");
+
+ b.Property("ParamInfo")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasComment("核查的检查信息Json");
+
+ b.Property("SubjectVisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TalkContent")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("UserTypeEnum")
+ .HasColumnType("int")
+ .HasComment("核查过程中的操作用户类型");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SubjectVisitId");
+
+ b.ToTable("CheckChallengeDialog", t =>
+ {
+ t.HasComment("一致性核查 - 对话记录表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalFormId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("表单Id");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("QuestionId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("问题Id");
+
+ b.Property("RowIndex")
+ .HasColumnType("int");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("ClinicalAnswerRowInfo", t =>
+ {
+ t.HasComment("受试者 - 临床表单表格问题行记录");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalDataLevel")
+ .HasColumnType("int");
+
+ b.Property("ClinicalDataSetEnName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalDataSetEnum")
+ .HasColumnType("int")
+ .HasComment("枚举(字典里面取的)");
+
+ b.Property("ClinicalDataSetName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalUploadType")
+ .HasColumnType("int")
+ .HasComment("上传方式");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionEnumListStr")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsApply")
+ .HasColumnType("bit")
+ .HasComment("是否应用");
+
+ b.Property("IsEnable")
+ .HasColumnType("bit");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("UploadRole")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("ClinicalDataSystemSet", t =>
+ {
+ t.HasComment("系统 - 临床数据配置");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalDataLevel")
+ .HasColumnType("int")
+ .HasComment("临床级别");
+
+ b.Property("ClinicalDataSetEnName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalDataSetName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalUploadType")
+ .HasColumnType("int")
+ .HasComment("上传方式");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionEnumListStr")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsApply")
+ .HasColumnType("bit")
+ .HasComment("是否应用");
+
+ b.Property("IsConfirm")
+ .HasColumnType("bit");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("SystemClinicalDataSetId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UploadRole")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SystemClinicalDataSetId");
+
+ b.HasIndex("TrialId");
+
+ b.ToTable("ClinicalDataTrialSet", t =>
+ {
+ t.HasComment("项目 - 临床数据适应标准配置");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CheckDate")
+ .HasColumnType("datetime2")
+ .HasComment("检查日期");
+
+ b.Property("ClinicalDataTrialSetId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PicturePath")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)")
+ .HasComment("截图地址");
+
+ b.Property("ReadingId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("VisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClinicalDataTrialSetId");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SubjectId");
+
+ b.ToTable("ClinicalForm", t =>
+ {
+ t.HasComment("受试者 - 临床表单");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Answer")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("ClinicalDataTrialSetId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalFormId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("表单Id");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("QuestionId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("问题Id");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClinicalFormId");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("ClinicalQuestionAnswer", t =>
+ {
+ t.HasComment("受试者 - 临床表单问题答案");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Answer")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)")
+ .HasComment("答案");
+
+ b.Property("ClinicalFormId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("表单Id");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("QuestionId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("问题Id");
+
+ b.Property("RowId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("答案行的Id");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.Property("TableQuestionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("RowId");
+
+ b.ToTable("ClinicalTableAnswer", t =>
+ {
+ t.HasComment("受试者 - 临床表单表格问题答案");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BusinessScenarioEnum")
+ .HasColumnType("int")
+ .HasComment("业务场景");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionTypeEnum")
+ .HasColumnType("int")
+ .HasComment("系统标准枚举");
+
+ b.Property("DeleteUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("FileTypeEnum")
+ .HasColumnType("int")
+ .HasComment("类型-上传|导出|邮件附件");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("NameCN")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("CommonDocument", t =>
+ {
+ t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsSystemCriterion")
+ .HasColumnType("bit");
+
+ b.Property("LesionType")
+ .HasColumnType("int")
+ .HasComment("病灶类型");
+
+ b.Property("OrganType")
+ .HasColumnType("int")
+ .HasComment("器官类型");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("CriterionId");
+
+ b.ToTable("CriterionNidusSystem", t =>
+ {
+ t.HasComment("系统标准 - 病灶器官表 (需要同步)");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LesionType")
+ .HasColumnType("int");
+
+ b.Property("OrganType")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("CriterionNidusTrial", t =>
+ {
+ t.HasComment("项目标准 - 病灶器官表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BatchId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("批次Id");
+
+ b.Property("ChildrenTypeId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("子类");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateUserName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("创建人姓名");
+
+ b.Property("CreateUserRealName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("DoctorUserId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("阅片医生");
+
+ b.Property("EntityName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("被稽查实体名");
+
+ b.Property("GeneralId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("要稽查对象Id");
+
+ b.Property("IP")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Identification")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("标识");
+
+ b.Property("IsFrontAdd")
+ .HasColumnType("bit")
+ .HasComment("是否是前端添加");
+
+ b.Property("IsSign")
+ .HasColumnType("bit");
+
+ b.Property("JsonDetail")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastJsonDetail")
+ .HasColumnType("nvarchar(max)")
+ .HasComment("上一条json");
+
+ b.Property("ModuleTypeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ObjectRelationParentId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("被稽查对象外键1");
+
+ b.Property("ObjectRelationParentId2")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ObjectRelationParentId3")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ObjectTypeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OptTypeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("父ID");
+
+ b.Property("Reason")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("RoleName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("角色名称");
+
+ b.Property("SignId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectVisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialReadingCriterionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialSiteId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("VisitStageId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("访视计划ID");
+
+ b.Property("VisitTaskId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("TrialReadingCriterionId");
+
+ b.HasIndex("VisitTaskId");
+
+ b.ToTable("DataInspection", t =>
+ {
+ t.HasComment("稽查 - 记录表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomAE", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CalledAE")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IP")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsTestOK")
+ .HasColumnType("bit");
+
+ b.Property("LatestTestTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Modality")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Port")
+ .HasColumnType("int");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("DicomAE", t =>
+ {
+ t.HasComment("医院dicomAE 配置");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b =>
+ {
+ b.Property("SeqId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Anonymize")
+ .HasColumnType("bit");
+
+ b.Property("CPIStatus")
+ .HasColumnType("bit");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("FileSize")
+ .HasColumnType("bigint");
+
+ b.Property("FrameOfReferenceUID")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("HtmlPath")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ImageColumns")
+ .HasColumnType("int");
+
+ b.Property("ImageRows")
+ .HasColumnType("int");
+
+ b.Property("ImagerPixelSpacing")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("InstanceNumber")
+ .HasColumnType("int");
+
+ b.Property("InstanceTime")
+ .HasColumnType("datetime2");
+
+ b.Property("NumberOfFrames")
+ .HasColumnType("int");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("PixelSpacing")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SeriesId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SeriesInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SliceLocation")
+ .HasColumnType("int");
+
+ b.Property("SliceThickness")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property