Compare commits
204 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d876b44cf | |||
| 32af01c8f4 | |||
| 803f7f43b4 | |||
| 2260303876 | |||
| 943058b84a | |||
| 4f8f4fe9b8 | |||
| 92aa223f3f | |||
| 4dafe15386 | |||
| 5e70d2ec36 | |||
| f7f84ef28a | |||
| 1f7ce33643 | |||
| 22a03ff3df | |||
| a256aec1cc | |||
| 8da1ab2413 | |||
| 6b6ab9e406 | |||
| a2c35ba83d | |||
| dfb8757719 | |||
| 65d68a3116 | |||
| 13d709c88d | |||
| 31bbd5295e | |||
| 270bccc432 | |||
| 4915b3c62c | |||
| 8d8f9c166e | |||
| 6be7f3e81b | |||
| a635360c95 | |||
| 2d32a5e0de | |||
| 3cd37c2be6 | |||
| dc63f1c735 | |||
| 94462015f2 | |||
| 689cce246a | |||
| 5d3ed34a31 | |||
| 8099ff0fa9 | |||
| c0fd38b03b | |||
| ab1fd89026 | |||
| b1d357956c | |||
| 045269d88f | |||
| c456045381 | |||
| 54a44991fd | |||
| 975adba203 | |||
| 0d8091b41a | |||
| 41db19ec01 | |||
| 00be8908ef | |||
| 7c5263415f | |||
| d93da5abd9 | |||
| 08a7dd9e85 | |||
| 7476f8a8e9 | |||
| 0c04c845b4 | |||
| b4448df047 | |||
| 74502510db | |||
| c5d94eff03 | |||
| 01501b36b5 | |||
| 5e5913255c | |||
| b1cf4dc592 | |||
| ec53815bb0 | |||
| 01c91a6398 | |||
| 6d1c72718b | |||
| 768d936ba9 | |||
| ef8220c236 | |||
| 47a4403cbe | |||
| 09e0187a7d | |||
| 9d4fea4407 | |||
| df508335a0 | |||
| 6900433496 | |||
| fc5f68bd7c | |||
| e9ee41e1a1 | |||
| e1a63b6da5 | |||
| 45a84a65ec | |||
| 8550612a8b | |||
| cc02e89e1b | |||
| ec808c68f5 | |||
| 644d94ed22 | |||
| b7d50de7d1 | |||
| 6a53aaf010 | |||
| edaab02d0b | |||
| 7a03474d07 | |||
| c810f6165f | |||
| 23673ba60c | |||
| 065be00d43 | |||
| da29b194a7 | |||
| 010a69f7ad | |||
| 242bae10d1 | |||
| b44f79ab60 | |||
| 4f5d817789 | |||
| fd13769010 | |||
| fb94e1cf6c | |||
| b03d539578 | |||
| 9f4582bf27 | |||
| 3a79251b91 | |||
| b4bc39f0d9 | |||
| 2526ac32fa | |||
| fc71dea8e9 | |||
| 27b51e7ede | |||
| 5511d6339e | |||
| 79a4ad8cfd | |||
| a23325584b | |||
| 61cdb2fada | |||
| 8b96163e37 | |||
| d84e246b23 | |||
| 3dd7da5a39 | |||
| 260e29989c | |||
| a08cc44cd0 | |||
| 98cc35e614 | |||
| b5e4b7db86 | |||
| a10a9a2255 | |||
| 18f5bcd62f | |||
| c2cbbba637 | |||
| 8e9b9c54fd | |||
| f0a7af4af1 | |||
| 2c262f27ad | |||
| a4819c4016 | |||
| 52e7166177 | |||
| 581f7fcbf3 | |||
| 65da0b877b | |||
| 06e8dc21fa | |||
| 03c07cf969 | |||
| a52aac876a | |||
| 32d8f8b648 | |||
| bfeb41fea9 | |||
| fb118d88f1 | |||
| aacce0b453 | |||
| cee382651b | |||
| 64633a1d63 | |||
| 63e5880154 | |||
| 5e383cb7b5 | |||
| 163af3b269 | |||
| c1bfa55ea6 | |||
| 5ffcc21917 | |||
| 790b69d0a6 | |||
| 313e07de43 | |||
| 7b27009d31 | |||
| 6b318f94fd | |||
| 7da1b40a5c | |||
| d90a98c1ef | |||
| 8a174711f4 | |||
| 48f386546e | |||
| 24d7912f1f | |||
| 090868b299 | |||
| 6dbfda36ee | |||
| 4c6315f2a5 | |||
| e2cdbb7580 | |||
| 13abd86be0 | |||
| 8364b00d3f | |||
| 274e4fdcce | |||
| 5354d3b9dc | |||
| 560f58a7b3 | |||
| b3697c1e21 | |||
| 051b61b2e8 | |||
| fc229fb645 | |||
| 93517d90ec | |||
| 0611e373b8 | |||
| cadaf368ef | |||
| ddcd9cb0c1 | |||
| d00158fa38 | |||
| 4a6dfc9a2a | |||
| e0829ffecf | |||
| 02ce0c993d | |||
| ac3eaea3f6 | |||
| 891af745bb | |||
| 3e49e78dfe | |||
| c67dcb1d5c | |||
| 0208edb9ed | |||
| 7f966b0a24 | |||
| b6f398bd2b | |||
| cb096a1d9b | |||
| 9913ff67ca | |||
| 9f4b274985 | |||
| 6903ccb3a6 | |||
| 020fbf33e5 | |||
| a7b8cc6307 | |||
| 1e5edd1c4c | |||
| faafc8fdfc | |||
| 75543f9bcf | |||
| 5f158137dd | |||
| e7f281a03d | |||
| 6813b42ae1 | |||
| b20d78c102 | |||
| ec3087efc4 | |||
| bf04562180 | |||
| 2faec8513f | |||
| a8b732abb9 | |||
| fbf90b4efc | |||
| 34aa515344 | |||
| 35f8379d65 | |||
| 9d752286f4 | |||
| 6b854cc9ad | |||
| 58e11f12e1 | |||
| 850c44b12a | |||
| d6a37cbd6b | |||
| f2dee26cdb | |||
| 2ee115a47d | |||
| 849c0be13d | |||
| 9a51c7a3b6 | |||
| e9e083d9ee | |||
| bb871a32fd | |||
| 04811681a3 | |||
| ec3f4cf121 | |||
| e2060a1460 | |||
| 4a70ba0134 | |||
| 630fda3c45 | |||
| 04762b3f7e | |||
| 00b48695f6 | |||
| e996557b51 | |||
| e5faf00df9 | |||
| 4beca9497b |
@@ -11,6 +11,7 @@ using IRaCIS.Core.Application.Service;
|
|||||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||||
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
using IRaCIS.Core.Application.Service.Inspection.Interface;
|
||||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
|
using IRaCIS.Core.Application.Service.Reading.Interface;
|
||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
@@ -36,6 +37,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
private readonly IHttpContextAccessor _httpContext;
|
private readonly IHttpContextAccessor _httpContext;
|
||||||
private readonly ITrialConfigService _trialConfigService;
|
private readonly ITrialConfigService _trialConfigService;
|
||||||
private readonly INoneDicomStudyService _noneDicomStudyService;
|
private readonly INoneDicomStudyService _noneDicomStudyService;
|
||||||
|
private readonly IClinicalAnswerService _clinicalAnswerService;
|
||||||
private readonly ISubjectService _subjectService;
|
private readonly ISubjectService _subjectService;
|
||||||
private readonly IReadingClinicalDataService _readingClinicalDataService;
|
private readonly IReadingClinicalDataService _readingClinicalDataService;
|
||||||
private readonly ISubjectVisitService _subjectVisitService;
|
private readonly ISubjectVisitService _subjectVisitService;
|
||||||
@@ -62,6 +64,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
IReadingMedicineQuestionService readingMedicineQuestionService,
|
IReadingMedicineQuestionService readingMedicineQuestionService,
|
||||||
ITrialConfigService _trialConfigService,
|
ITrialConfigService _trialConfigService,
|
||||||
INoneDicomStudyService noneDicomStudyService,
|
INoneDicomStudyService noneDicomStudyService,
|
||||||
|
IClinicalAnswerService clinicalAnswerService,
|
||||||
ISubjectService _subjectService,
|
ISubjectService _subjectService,
|
||||||
IReadingClinicalDataService _readingClinicalDataService,
|
IReadingClinicalDataService _readingClinicalDataService,
|
||||||
ISubjectVisitService subjectVisitService,
|
ISubjectVisitService subjectVisitService,
|
||||||
@@ -82,6 +85,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
this._httpContext = httpContext;
|
this._httpContext = httpContext;
|
||||||
this._trialConfigService = _trialConfigService;
|
this._trialConfigService = _trialConfigService;
|
||||||
this._noneDicomStudyService = noneDicomStudyService;
|
this._noneDicomStudyService = noneDicomStudyService;
|
||||||
|
this._clinicalAnswerService = clinicalAnswerService;
|
||||||
this._subjectService = _subjectService;
|
this._subjectService = _subjectService;
|
||||||
this._readingClinicalDataService = _readingClinicalDataService;
|
this._readingClinicalDataService = _readingClinicalDataService;
|
||||||
this._subjectVisitService = subjectVisitService;
|
this._subjectVisitService = subjectVisitService;
|
||||||
@@ -233,6 +237,94 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC签名临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="opt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Inspection/ClinicalAnswer/CRCSignClinicalData")]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
|
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> CRCSignClinicalData(DataInspectionDto<CRCSignClinicalDataInDto> opt)
|
||||||
|
{
|
||||||
|
var singid = await _inspectionService.RecordSing(opt.SignInfo);
|
||||||
|
var result = await _clinicalAnswerService.CRCSignClinicalData(opt.Data);
|
||||||
|
await _inspectionService.CompletedSign(singid, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC确认临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="opt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Inspection/ClinicalAnswer/CRCConfirmClinical")]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
|
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> CRCConfirmClinical(DataInspectionDto<CRCConfirmClinicalInDto> opt)
|
||||||
|
{
|
||||||
|
var singid = await _inspectionService.RecordSing(opt.SignInfo);
|
||||||
|
var result = await _clinicalAnswerService.CRCConfirmClinical(opt.Data);
|
||||||
|
await _inspectionService.CompletedSign(singid, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC撤销临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="opt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Inspection/ClinicalAnswer/CRCCancelConfirmClinical")]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
|
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> CRCCancelConfirmClinical(DataInspectionDto<CRCCancelConfirmClinicalInDto> opt)
|
||||||
|
{
|
||||||
|
var singid = await _inspectionService.RecordSing(opt.SignInfo);
|
||||||
|
var result = await _clinicalAnswerService.CRCCancelConfirmClinical(opt.Data);
|
||||||
|
await _inspectionService.CompletedSign(singid, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PM确认临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="opt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Inspection/ClinicalAnswer/PMConfirmClinical")]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
|
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> PMConfirmClinical(DataInspectionDto<CRCConfirmClinicalInDto> opt)
|
||||||
|
{
|
||||||
|
var singid = await _inspectionService.RecordSing(opt.SignInfo);
|
||||||
|
var result = await _clinicalAnswerService.PMConfirmClinical(opt.Data);
|
||||||
|
await _inspectionService.CompletedSign(singid, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 提交结构化录入并签名
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="opt"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost, Route("Inspection/ClinicalAnswer/SubmitClinicalFormAndSign")]
|
||||||
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
|
|
||||||
|
[UnitOfWork]
|
||||||
|
public async Task<IResponseOutput> SubmitClinicalFormAndSign(DataInspectionDto<SubmitClinicalFormInDto> opt)
|
||||||
|
{
|
||||||
|
var singid = await _inspectionService.RecordSing(opt.SignInfo);
|
||||||
|
var result = await _clinicalAnswerService.SubmitClinicalForm(opt.Data);
|
||||||
|
await _inspectionService.CompletedSign(singid, result);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 提交阅片裁判问题
|
/// 提交阅片裁判问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -227,6 +227,8 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
_repository = repository;
|
_repository = repository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[HttpPost, Route("Study/PreArchiveStudy")]
|
[HttpPost, Route("Study/PreArchiveStudy")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
public async Task<IResponseOutput> PreArchiveStudy(PreArchiveStudyCommand preArchiveStudyCommand,
|
public async Task<IResponseOutput> PreArchiveStudy(PreArchiveStudyCommand preArchiveStudyCommand,
|
||||||
@@ -262,6 +264,12 @@ namespace IRaCIS.Core.API.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//public string UploadOOSTest(string filePath, string route)
|
||||||
|
//{
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>Dicom 归档</summary>
|
/// <summary>Dicom 归档</summary>
|
||||||
[HttpPost, Route("Study/ArchiveStudy")]
|
[HttpPost, Route("Study/ArchiveStudy")]
|
||||||
[DisableFormValueModelBinding]
|
[DisableFormValueModelBinding]
|
||||||
|
|||||||
@@ -139,6 +139,41 @@
|
|||||||
<param name="opt"></param>
|
<param name="opt"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.CRCSignClinicalData(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.CRCSignClinicalDataInDto})">
|
||||||
|
<summary>
|
||||||
|
CRC签名临床数据
|
||||||
|
</summary>
|
||||||
|
<param name="opt"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.CRCConfirmClinical(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.CRCConfirmClinicalInDto})">
|
||||||
|
<summary>
|
||||||
|
CRC确认临床数据
|
||||||
|
</summary>
|
||||||
|
<param name="opt"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.CRCCancelConfirmClinical(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.CRCCancelConfirmClinicalInDto})">
|
||||||
|
<summary>
|
||||||
|
CRC撤销临床数据
|
||||||
|
</summary>
|
||||||
|
<param name="opt"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.PMConfirmClinical(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.CRCConfirmClinicalInDto})">
|
||||||
|
<summary>
|
||||||
|
PM确认临床数据
|
||||||
|
</summary>
|
||||||
|
<param name="opt"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.SubmitClinicalFormAndSign(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.SubmitClinicalFormInDto})">
|
||||||
|
<summary>
|
||||||
|
提交结构化录入并签名
|
||||||
|
</summary>
|
||||||
|
<param name="opt"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.SubmitJudgeVisitTaskResult(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.SaveJudgeVisitTaskResult})">
|
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.SubmitJudgeVisitTaskResult(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.SaveJudgeVisitTaskResult})">
|
||||||
<summary>
|
<summary>
|
||||||
提交阅片裁判问题
|
提交阅片裁判问题
|
||||||
|
|||||||
@@ -53,6 +53,14 @@
|
|||||||
"ASPNETCORE_ENVIRONMENT": "CertificateApply"
|
"ASPNETCORE_ENVIRONMENT": "CertificateApply"
|
||||||
},
|
},
|
||||||
"applicationUrl": "http://localhost:6400"
|
"applicationUrl": "http://localhost:6400"
|
||||||
|
},
|
||||||
|
"IRaCIS.CenterImageDev": {
|
||||||
|
"commandName": "Project",
|
||||||
|
"launchBrowser": true,
|
||||||
|
"environmentVariables": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "CenterImageDev"
|
||||||
|
},
|
||||||
|
"applicationUrl": "http://localhost:6500"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,6 +37,7 @@ namespace IRaCIS.Core.API
|
|||||||
triggerOptions.AddTrigger<AddSubjectTrigger>();
|
triggerOptions.AddTrigger<AddSubjectTrigger>();
|
||||||
triggerOptions.AddTrigger<ChallengeStateTrigger>();
|
triggerOptions.AddTrigger<ChallengeStateTrigger>();
|
||||||
triggerOptions.AddTrigger<SubjectStateTrigger>();
|
triggerOptions.AddTrigger<SubjectStateTrigger>();
|
||||||
|
triggerOptions.AddTrigger<AddCRCCliniaclDataTrigger>();
|
||||||
triggerOptions.AddTrigger<SubjectVisitCheckPassedTrigger>();
|
triggerOptions.AddTrigger<SubjectVisitCheckPassedTrigger>();
|
||||||
triggerOptions.AddTrigger<SubjectVisitFinalVisitTrigger>();
|
triggerOptions.AddTrigger<SubjectVisitFinalVisitTrigger>();
|
||||||
triggerOptions.AddTrigger<SubjectVisitTrigger>();
|
triggerOptions.AddTrigger<SubjectVisitTrigger>();
|
||||||
|
|||||||
@@ -17,7 +17,11 @@
|
|||||||
|
|
||||||
"OpenTrialRelationDelete": true,
|
"OpenTrialRelationDelete": true,
|
||||||
|
|
||||||
"OpenLoginLimit": false
|
"OpenLoginLimit": false,
|
||||||
|
|
||||||
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
|
"LoginFailLockMinutes": 30
|
||||||
},
|
},
|
||||||
|
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
|
|||||||
@@ -7,10 +7,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true",
|
"RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Test.IRC;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true",
|
||||||
"Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true"
|
"Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true"
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"AliyunOSS": {
|
||||||
|
"endpoint": "https://zyypacs-code.oss-cn-shanghai.aliyuncs.com",
|
||||||
|
"accessKeyId": "mpXG7Nu6zTpsDrI1",
|
||||||
|
"accessKeySecret": "yNINcEb099SkNfF6vYKaoP8TZNI3xZ",
|
||||||
|
"bucketName": "zyypacs-code"
|
||||||
|
},
|
||||||
"BasicSystemConfig": {
|
"BasicSystemConfig": {
|
||||||
|
|
||||||
"OpenUserComplexPassword": false,
|
"OpenUserComplexPassword": false,
|
||||||
@@ -21,7 +28,7 @@
|
|||||||
|
|
||||||
"OpenLoginLimit": false,
|
"OpenLoginLimit": false,
|
||||||
|
|
||||||
"LoginMaxFailCount": 3,
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
"LoginFailLockMinutes":1
|
"LoginFailLockMinutes":1
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -18,9 +18,9 @@
|
|||||||
"OpenSignDocumentBeforeWork": true,
|
"OpenSignDocumentBeforeWork": true,
|
||||||
|
|
||||||
"OpenLoginLimit": true,
|
"OpenLoginLimit": true,
|
||||||
"LoginMaxFailCount": 3,
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
"LoginFailLockMinutes": 1
|
"LoginFailLockMinutes": 30
|
||||||
},
|
},
|
||||||
//"SystemEmailSendConfig": {
|
//"SystemEmailSendConfig": {
|
||||||
// "Port": 465,
|
// "Port": 465,
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
"OpenSignDocumentBeforeWork": true,
|
"OpenSignDocumentBeforeWork": true,
|
||||||
|
|
||||||
"OpenLoginLimit": true,
|
"OpenLoginLimit": true,
|
||||||
"LoginMaxFailCount": 3,
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
"LoginFailLockMinutes": 1
|
"LoginFailLockMinutes": 30
|
||||||
|
|
||||||
},
|
},
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
|
|||||||
@@ -21,9 +21,9 @@
|
|||||||
|
|
||||||
"OpenLoginLimit": false,
|
"OpenLoginLimit": false,
|
||||||
|
|
||||||
"LoginMaxFailCount": 3,
|
"LoginMaxFailCount": 5,
|
||||||
|
|
||||||
"LoginFailLockMinutes": 1
|
"LoginFailLockMinutes": 30
|
||||||
},
|
},
|
||||||
|
|
||||||
"SystemEmailSendConfig": {
|
"SystemEmailSendConfig": {
|
||||||
|
|||||||
@@ -276,8 +276,10 @@ var abp = abp || {};
|
|||||||
}
|
}
|
||||||
|
|
||||||
var password = document.getElementById('password').value;
|
var password = document.getElementById('password').value;
|
||||||
if (!password) {
|
var pwdMd5 = document.getElementById('pwdMd5').value;
|
||||||
alert('PassWord Can Not Be Null');
|
console.log(pwdMd5);
|
||||||
|
if (!password && !pwdMd5) {
|
||||||
|
alert('PassWord And Md5 Can Not Be Null');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,6 +323,9 @@ var abp = abp || {};
|
|||||||
UserName: usernameOrEmailAddress,
|
UserName: usernameOrEmailAddress,
|
||||||
Password: hex_md5(password),
|
Password: hex_md5(password),
|
||||||
}
|
}
|
||||||
|
if (pwdMd5 != '') {
|
||||||
|
parm.Password = pwdMd5;
|
||||||
|
}
|
||||||
xhr.send(JSON.stringify(parm));
|
xhr.send(JSON.stringify(parm));
|
||||||
//xhr.send("{" + "userName:'" + usernameOrEmailAddress + "'," + "passWord:'" + password + "'}");
|
//xhr.send("{" + "userName:'" + usernameOrEmailAddress + "'," + "passWord:'" + password + "'}");
|
||||||
|
|
||||||
@@ -414,8 +419,9 @@ var abp = abp || {};
|
|||||||
|
|
||||||
//Inputs
|
//Inputs
|
||||||
createInput(modalUxContent, 'tenancyName', 'Tenancy Name (Leave empty for Host)');
|
createInput(modalUxContent, 'tenancyName', 'Tenancy Name (Leave empty for Host)');
|
||||||
createInput(modalUxContent, 'userName', 'Username or email address','text','admin');
|
createInput(modalUxContent, 'userName', 'Username or email address','text','cyldev');
|
||||||
createInput(modalUxContent, 'password', 'Password','password');
|
createInput(modalUxContent, 'password', 'Password', 'password', '123456');
|
||||||
|
createInput(modalUxContent, 'pwdMd5', 'PwdMd5', 'text', '');
|
||||||
|
|
||||||
//Buttons
|
//Buttons
|
||||||
var authBtnWrapper = document.createElement('div');
|
var authBtnWrapper = document.createElement('div');
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
using Aliyun.OSS;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
|
using System.Configuration;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Helper;
|
namespace IRaCIS.Core.Application.Helper;
|
||||||
@@ -12,6 +14,39 @@ namespace IRaCIS.Core.Application.Helper;
|
|||||||
public static class FileStoreHelper
|
public static class FileStoreHelper
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public static string UploadOOS(string filePath,string route)
|
||||||
|
{
|
||||||
|
var endpoint = ConfigurationManager.AppSettings["AliyunOSS:endpoint"];
|
||||||
|
// yourEndpoint填写Bucket所在地域对应的Endpoint。以华东1(杭州)为例,Endpoint填写为https://oss-cn-hangzhou.aliyuncs.com。
|
||||||
|
|
||||||
|
// 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。
|
||||||
|
var accessKeyId = ConfigurationManager.AppSettings["AliyunOSS:accessKeyId"];
|
||||||
|
var accessKeySecret = ConfigurationManager.AppSettings["AliyunOSS:accessKeySecret"];
|
||||||
|
// 填写Bucket名称,例如examplebucket。
|
||||||
|
var bucketName = ConfigurationManager.AppSettings["AliyunOSS:bucketName"];
|
||||||
|
// 填写Object完整路径,完整路径中不能包含Bucket名称,例如exampledir/exampleobject.txt。
|
||||||
|
|
||||||
|
var fileNameList = filePath.Split(',').ToList();
|
||||||
|
var fileName = fileNameList[fileNameList.Count() - 1];
|
||||||
|
|
||||||
|
var objectName = route+ fileName;
|
||||||
|
// 填写本地文件完整路径,例如D:\\localpath\\examplefile.txt。如果未指定本地路径,则默认从示例程序所属项目对应本地路径中上传文件。
|
||||||
|
var localFilename = filePath;
|
||||||
|
// 创建OSSClient实例。
|
||||||
|
var client = new OssClient(endpoint, accessKeyId, accessKeySecret);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 上传文件。
|
||||||
|
var result = client.PutObject(bucketName, objectName, localFilename);
|
||||||
|
|
||||||
|
return result.ETag;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("上传异常!");
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//处理文件名 压缩包,或者目录类的 会带上相对路径
|
//处理文件名 压缩包,或者目录类的 会带上相对路径
|
||||||
public static (string TrustedFileNameForFileStorage, string RealName) GetStoreFileName(string fileName,bool isChangeToPdfFormat=false)
|
public static (string TrustedFileNameForFileStorage, string RealName) GetStoreFileName(string fileName,bool isChangeToPdfFormat=false)
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
||||||
<PackageReference Include="AutoMapper.Collection.EntityFrameworkCore" Version="9.0.0" />
|
<PackageReference Include="AutoMapper.Collection.EntityFrameworkCore" Version="9.0.0" />
|
||||||
<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
|
<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
|
||||||
<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
|
<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
|
||||||
|
|||||||
@@ -2494,6 +2494,13 @@
|
|||||||
临床答案
|
临床答案
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.CRCSignClinicalData(IRaCIS.Core.Application.Service.Reading.Dto.CRCSignClinicalDataInDto)">
|
||||||
|
<summary>
|
||||||
|
CRC签名临床数据
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.AutoAddCRCClinical(IRaCIS.Core.Application.Service.Reading.Dto.AutoAddClinicalInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.AutoAddCRCClinical(IRaCIS.Core.Application.Service.Reading.Dto.AutoAddClinicalInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
自动添加CRC临床数据
|
自动添加CRC临床数据
|
||||||
@@ -2529,6 +2536,21 @@
|
|||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.DeleteClinicalForm(IRaCIS.Core.Application.Service.Reading.Dto.DeleteClinicalFormInDto)">
|
||||||
|
<summary>
|
||||||
|
删除表单数据
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.GetPMConfirmList(IRaCIS.Core.Application.Service.Reading.Dto.GetPMConfirmListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取PM待确认列表
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.GetCRCConfirmList(IRaCIS.Core.Application.Service.Reading.Dto.GetCRCConfirmListInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.GetCRCConfirmList(IRaCIS.Core.Application.Service.Reading.Dto.GetCRCConfirmListInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取CRC确认列表
|
获取CRC确认列表
|
||||||
@@ -2536,11 +2558,68 @@
|
|||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.GetCRCBeConfirmList(IRaCIS.Core.Application.Service.Reading.Dto.GetCRCBeConfirmListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取CRC待确认列表
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.GetClinicalTableList(IRaCIS.Core.Application.Service.Reading.Dto.GetClinicalTableListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取临床数据表格信息 查看没有表格问题的列表
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.GetClinicalDateList(IRaCIS.Core.Application.Service.Reading.Dto.GetCRCBeConfirmListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取临床数据表格信息 查看有表格问题的列表
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.CRCConfirmClinical(IRaCIS.Core.Application.Service.Reading.Dto.CRCConfirmClinicalInDto)">
|
||||||
|
<summary>
|
||||||
|
CRC 确认临床数据
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.CRCCancelConfirmClinical(IRaCIS.Core.Application.Service.Reading.Dto.CRCCancelConfirmClinicalInDto)">
|
||||||
|
<summary>
|
||||||
|
CRC 取消确认
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.PMConfirmClinical(IRaCIS.Core.Application.Service.Reading.Dto.CRCConfirmClinicalInDto)">
|
||||||
|
<summary>
|
||||||
|
PM确认临床数据
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.ClinicalQuestionService">
|
<member name="T:IRaCIS.Core.Application.Service.ClinicalQuestionService">
|
||||||
<summary>
|
<summary>
|
||||||
临床数据问题
|
临床数据问题
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalQuestionService.GetTrialClinicalQuestionCalculateRelation(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalQuestionCalculateRelationInDto)">
|
||||||
|
<summary>
|
||||||
|
获取问题计算关系
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalQuestionService.GetClinicalCalculateQuestions(IRaCIS.Core.Application.Service.Reading.Dto.GetClinicalCalculateQuestionsInDto)">
|
||||||
|
<summary>
|
||||||
|
获取计算问题
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ClinicalQuestionService.GetSystemClinicalQuestionPreview(IRaCIS.Core.Application.Service.Reading.Dto.GetSystemClinicalQuestionPreviewDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ClinicalQuestionService.GetSystemClinicalQuestionPreview(IRaCIS.Core.Application.Service.Reading.Dto.GetSystemClinicalQuestionPreviewDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取系统临床数据预览
|
获取系统临床数据预览
|
||||||
@@ -2682,21 +2761,71 @@
|
|||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.CRCConfirmFormList.ClinicalDataLevel">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCSubjectClinicalOutDto.UploadRole">
|
||||||
|
<summary>
|
||||||
|
上传角色
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCSubjectClinicalOutDto.ReadingId">
|
||||||
|
<summary>
|
||||||
|
访视Id 或者模块Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCSubjectClinicalOutDto.ClinicalDataLevel">
|
||||||
<summary>
|
<summary>
|
||||||
临床级别
|
临床级别
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCSubjectClinicalOutDto.ClinicalUploadType">
|
||||||
|
<summary>
|
||||||
|
上传方式
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetClinicalTableListOutDto.ModuleName">
|
||||||
|
<summary>
|
||||||
|
模块名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.CRCConfirmClinicalInDto.IsClinicalDataComplete">
|
||||||
|
<summary>
|
||||||
|
临床数据是否完整
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.CRCConfirmClinicalInDto.IsClinicalDataBlind">
|
||||||
|
<summary>
|
||||||
|
临床数据是否盲化
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.CRCClinicalForm.SubjectId">
|
||||||
|
<summary>
|
||||||
|
受试者Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.CRCClinicalForm.ClinicalDataLevel">
|
||||||
|
<summary>
|
||||||
|
临床级别
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCConfirmListOutDto.SubjectId">
|
||||||
|
<summary>
|
||||||
|
受试者ID
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCConfirmListOutDto.ModuleName">
|
||||||
|
<summary>
|
||||||
|
模块名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCConfirmListOutDto.IsCRCApplicationRevoke">
|
||||||
|
<summary>
|
||||||
|
CRC是否正在申请撤回
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCConfirmListOutDto.LatestScanDate">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCConfirmListOutDto.LatestScanDate">
|
||||||
<summary>
|
<summary>
|
||||||
最晚拍片日期
|
最晚拍片日期
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SubmitClinicalFormInDto.VisitId">
|
|
||||||
<summary>
|
|
||||||
VisitId
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SubmitClinicalFormInDto.ReadingId">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SubmitClinicalFormInDto.ReadingId">
|
||||||
<summary>
|
<summary>
|
||||||
VisitId
|
VisitId
|
||||||
@@ -2922,6 +3051,46 @@
|
|||||||
是否启用
|
是否启用
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalQuestionCalculateRelationInDto.TrialClinicalId">
|
||||||
|
<summary>
|
||||||
|
项目临床数据Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalQuestionCalculateRelationOutDto.QuestionName">
|
||||||
|
<summary>
|
||||||
|
问题名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalQuestionCalculateRelationOutDto.CustomCalculateMark">
|
||||||
|
<summary>
|
||||||
|
自定义计算标记
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalQuestionCalculateRelationOutDto.ValueType">
|
||||||
|
<summary>
|
||||||
|
数值类型
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalQuestionCalculateRelationOutDto.Unit">
|
||||||
|
<summary>
|
||||||
|
单位
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalQuestionCalculateRelationOutDto.CustomUnit">
|
||||||
|
<summary>
|
||||||
|
自定义单位
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetClinicalCalculateQuestionsInDto.TrialClinicalId">
|
||||||
|
<summary>
|
||||||
|
项目临床数据Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetClinicalCalculateQuestionsInDto.ClinicalQuestionType">
|
||||||
|
<summary>
|
||||||
|
临床问题类型(分组,单选。)
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetSystemClinicalQuestionPreviewDto.SystemClinicalId">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetSystemClinicalQuestionPreviewDto.SystemClinicalId">
|
||||||
<summary>
|
<summary>
|
||||||
系统临床数据Id
|
系统临床数据Id
|
||||||
@@ -2947,6 +3116,11 @@
|
|||||||
子问题
|
子问题
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionPreviewDto.RelationQuestions">
|
||||||
|
<summary>
|
||||||
|
关联问题
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionPreviewDto.TableQuestions">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionPreviewDto.TableQuestions">
|
||||||
<summary>
|
<summary>
|
||||||
表格问题
|
表格问题
|
||||||
@@ -2982,6 +3156,16 @@
|
|||||||
问题英文名称
|
问题英文名称
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionBase.GroupName">
|
||||||
|
<summary>
|
||||||
|
分组名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionBase.GroupEnName">
|
||||||
|
<summary>
|
||||||
|
分组英文名称
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionBase.ClinicalQuestionType">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionBase.ClinicalQuestionType">
|
||||||
<summary>
|
<summary>
|
||||||
临床问题类型(分组,单选。)
|
临床问题类型(分组,单选。)
|
||||||
@@ -2997,6 +3181,11 @@
|
|||||||
最大长度
|
最大长度
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionBase.MaxQuestionCount">
|
||||||
|
<summary>
|
||||||
|
最大行数
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionBase.ClinicalOptionTypeEnum">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionBase.ClinicalOptionTypeEnum">
|
||||||
<summary>
|
<summary>
|
||||||
临床数据选项类型(无,自定义)
|
临床数据选项类型(无,自定义)
|
||||||
@@ -3067,6 +3256,16 @@
|
|||||||
单位
|
单位
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionBase.CustomCalculateMark">
|
||||||
|
<summary>
|
||||||
|
自定义计算标记
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionBase.CalculateQuestions">
|
||||||
|
<summary>
|
||||||
|
自定义计算问题
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionQueryBase">
|
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalQuestionQueryBase">
|
||||||
<summary>
|
<summary>
|
||||||
查询临床数据基类
|
查询临床数据基类
|
||||||
@@ -3097,16 +3296,6 @@
|
|||||||
项目临床数据Id
|
项目临床数据Id
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TrialClinicalQuestionDto.ClinicalCalculateMarkEnum">
|
|
||||||
<summary>
|
|
||||||
自定义计算标记
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TrialClinicalQuestionDto.CalculateQuestions">
|
|
||||||
<summary>
|
|
||||||
自定义计算问题
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.SystemClinicalQuestionQuery">
|
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.SystemClinicalQuestionQuery">
|
||||||
<summary>
|
<summary>
|
||||||
获取系统临床数据
|
获取系统临床数据
|
||||||
@@ -3722,6 +3911,21 @@
|
|||||||
路径
|
路径
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingOrTaskClinicalDataListInDto.ClinicalDataTrialSetId">
|
||||||
|
<summary>
|
||||||
|
临床数据类型Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingOrTaskClinicalDataListInDto.GetClinicalType">
|
||||||
|
<summary>
|
||||||
|
1 PM上传的所有的 2CRC上传的所有已确认的 3 所有已经签名的
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingOrTaskClinicalDataListInDto.IsOnlyGetCRCReadModule">
|
||||||
|
<summary>
|
||||||
|
只获取CRC上传的阅片模块结构化录入
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingOrTaskClinicalDataListInDto.SelectIsSign">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingOrTaskClinicalDataListInDto.SelectIsSign">
|
||||||
<summary>
|
<summary>
|
||||||
只查询已经签名的临床数据
|
只查询已经签名的临床数据
|
||||||
@@ -3732,6 +3936,16 @@
|
|||||||
获取访视列表
|
获取访视列表
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListIndto.ClinicalDataTrialSetId">
|
||||||
|
<summary>
|
||||||
|
临床数据类型Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListIndto.GetClinicalType">
|
||||||
|
<summary>
|
||||||
|
1 PM上传的所有的 2CRC上传的所有已确认的 3 所有已经签名的
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListIndto.IsVisit">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListIndto.IsVisit">
|
||||||
<summary>
|
<summary>
|
||||||
是否是访视
|
是否是访视
|
||||||
@@ -3797,6 +4011,11 @@
|
|||||||
访视Id 或者模块Id
|
访视Id 或者模块Id
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListOutDto.IsCRCApplicationRevoke">
|
||||||
|
<summary>
|
||||||
|
CRC是否正在申请撤回
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListOutDto.ClinicalDataSetName">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListOutDto.ClinicalDataSetName">
|
||||||
<summary>
|
<summary>
|
||||||
项目配置临床类型Name
|
项目配置临床类型Name
|
||||||
@@ -3867,6 +4086,16 @@
|
|||||||
文件数量
|
文件数量
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalFromData.ClinicalFormId">
|
||||||
|
<summary>
|
||||||
|
表单Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalFromData.CheckDate">
|
||||||
|
<summary>
|
||||||
|
检查日期
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetFileDto.Id">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetFileDto.Id">
|
||||||
<summary>
|
<summary>
|
||||||
Id
|
Id
|
||||||
@@ -4057,6 +4286,46 @@
|
|||||||
序号标记
|
序号标记
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCustomTagInDto.VisitTaskId">
|
||||||
|
<summary>
|
||||||
|
任务Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCustomTagDto.VisitTaskId">
|
||||||
|
<summary>
|
||||||
|
任务Id
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCustomTagDto.StudyId">
|
||||||
|
<summary>
|
||||||
|
StudyId
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCustomTagDto.SeriesId">
|
||||||
|
<summary>
|
||||||
|
SeriesId
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCustomTagDto.InstanceId">
|
||||||
|
<summary>
|
||||||
|
InstanceId
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCustomTagDto.MeasureData">
|
||||||
|
<summary>
|
||||||
|
MeasureData
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCustomTagDto.CreateTime">
|
||||||
|
<summary>
|
||||||
|
CreateTime
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCustomTagDto.CreateUserId">
|
||||||
|
<summary>
|
||||||
|
CreateUserId
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetManualListOutDto.Name">
|
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetManualListOutDto.Name">
|
||||||
<summary>
|
<summary>
|
||||||
Name
|
Name
|
||||||
@@ -7257,6 +7526,13 @@
|
|||||||
<param name="id"></param>
|
<param name="id"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.EmptMedicineTrialQuestion(IRaCIS.Core.Application.ViewModel.EmptMedicineTrialQuestionInDto)">
|
||||||
|
<summary>
|
||||||
|
清空医学审核问题
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.GetReadingMedicineTrialQuestionList(IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionQuery)" -->
|
<!-- Badly formed XML comment ignored for member "M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.GetReadingMedicineTrialQuestionList(IRaCIS.Core.Application.ViewModel.ReadingMedicineTrialQuestionQuery)" -->
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.GetReadingMedicineTrialOtherQuestion(IRaCIS.Core.Application.ViewModel.GetReadingMedicineTrialOtherQuestionInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.GetReadingMedicineTrialOtherQuestion(IRaCIS.Core.Application.ViewModel.GetReadingMedicineTrialOtherQuestionInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
@@ -8090,6 +8366,12 @@
|
|||||||
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeAddOrEdit">
|
<member name="T:IRaCIS.Core.Application.ViewModel.SystemNoticeAddOrEdit">
|
||||||
<summary> SystemNoticeAddOrEdit 列表查询参数模型</summary>
|
<summary> SystemNoticeAddOrEdit 列表查询参数模型</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:IRaCIS.Core.Application.ViewModel.UserLogView">
|
||||||
|
<summary> UserLogView 列表视图模型 </summary>
|
||||||
|
</member>
|
||||||
|
<member name="T:IRaCIS.Core.Application.ViewModel.UserLogQuery">
|
||||||
|
<summary>UserLogQuery 列表查询参数模型</summary>
|
||||||
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.ViewModel.TirggerTaskInfo.TargetAssessmentIsIUorIC">
|
<member name="P:IRaCIS.Core.Application.ViewModel.TirggerTaskInfo.TargetAssessmentIsIUorIC">
|
||||||
<summary>
|
<summary>
|
||||||
靶病灶是否为IUPD或者ICPD
|
靶病灶是否为IUPD或者ICPD
|
||||||
@@ -8918,6 +9200,11 @@
|
|||||||
ISystemNoticeService
|
ISystemNoticeService
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:IRaCIS.Core.Application.Interfaces.IUserLogService">
|
||||||
|
<summary>
|
||||||
|
IUserLogService
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Interfaces.ISubjectCriteriaEvaluationService">
|
<member name="T:IRaCIS.Core.Application.Interfaces.ISubjectCriteriaEvaluationService">
|
||||||
<summary>
|
<summary>
|
||||||
ISubjectCriteriaEvaluationService
|
ISubjectCriteriaEvaluationService
|
||||||
@@ -9338,6 +9625,13 @@
|
|||||||
项目QC 问题 管理
|
项目QC 问题 管理
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureService.EmptyQCQuestion(IRaCIS.Core.Application.Contracts.EmptyQCQuestionInDto)">
|
||||||
|
<summary>
|
||||||
|
清空Qc问题
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureService.GetTrialQCQuestionSelectList(IRaCIS.Core.Application.Contracts.TrialQCQuestionFilterSelect)">
|
<member name="M:IRaCIS.Core.Application.Contracts.TrialQCQuestionConfigureService.GetTrialQCQuestionSelectList(IRaCIS.Core.Application.Contracts.TrialQCQuestionFilterSelect)">
|
||||||
<summary>
|
<summary>
|
||||||
父问题 下拉框选项 需要排除自己 、把自己设置为父亲 (互为父亲) 、是自己孙辈的(明明是自己子孙,却设置为自己父亲)
|
父问题 下拉框选项 需要排除自己 、把自己设置为父亲 (互为父亲) 、是自己孙辈的(明明是自己子孙,却设置为自己父亲)
|
||||||
@@ -10042,6 +10336,13 @@
|
|||||||
<param name="queryTrialDocument"></param>
|
<param name="queryTrialDocument"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.GetNextUnSignDocument(IRaCIS.Core.Application.Contracts.GetNextUnSignDocumentInDto)">
|
||||||
|
<summary>
|
||||||
|
获取下一个未签名的文件
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.GetUserDocumentList(IRaCIS.Core.Application.Contracts.TrialUserDocUnionQuery)">
|
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.GetUserDocumentList(IRaCIS.Core.Application.Contracts.TrialUserDocUnionQuery)">
|
||||||
<summary>
|
<summary>
|
||||||
具体用户看到的 系统文件列表 + 项目类型文档
|
具体用户看到的 系统文件列表 + 项目类型文档
|
||||||
@@ -10458,6 +10759,20 @@
|
|||||||
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.ReplaceQCTaskActionUser(System.Guid,System.Guid)">
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.ReplaceQCTaskActionUser(System.Guid,System.Guid)">
|
||||||
<summary>替换当前领取人 </summary>
|
<summary>替换当前领取人 </summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.CollectNextIQCQuality(IRaCIS.Core.Application.Contracts.GetNextIQCQualityInDto)">
|
||||||
|
<summary>
|
||||||
|
领取下一个质控任务
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.GetNextIQCQuality(IRaCIS.Core.Application.Contracts.GetNextIQCQualityInDto)">
|
||||||
|
<summary>
|
||||||
|
获取下一个质控任务
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.ObtainOrCancelQCTask(System.Guid,System.Guid,System.Boolean)">
|
<member name="M:IRaCIS.Core.Application.Image.QA.QCOperationService.ObtainOrCancelQCTask(System.Guid,System.Guid,System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
手动领取 或者取消 QC任务
|
手动领取 或者取消 QC任务
|
||||||
@@ -10567,6 +10882,13 @@
|
|||||||
<param name="_trialRepository"></param>
|
<param name="_trialRepository"></param>
|
||||||
<returns></returns> vvv
|
<returns></returns> vvv
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetPMClinicalDataToBeDoneList(IRaCIS.Core.Application.Contracts.ReviewerSelectToBeDoneQuery)">
|
||||||
|
<summary>
|
||||||
|
获取PM核对临床数据
|
||||||
|
</summary>
|
||||||
|
<param name="inQuery"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetSPM_ReviewerSelectToBeDoneList(IRaCIS.Core.Application.Contracts.ReviewerSelectToBeDoneQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetSPM_ReviewerSelectToBeDoneList(IRaCIS.Core.Application.Contracts.ReviewerSelectToBeDoneQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||||
<summary>
|
<summary>
|
||||||
SPM 阅片人筛选
|
SPM 阅片人筛选
|
||||||
@@ -10576,9 +10898,9 @@
|
|||||||
<param name="_trialRepository"></param>
|
<param name="_trialRepository"></param>
|
||||||
<returns></returns> vvv
|
<returns></returns> vvv
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetReReadingApprovalToBeDoneToBeDoneList(IRaCIS.Core.Application.Contracts.ReReadingApprovalToBeDoneQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTaskReReading},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetSPMReReadingApprovalToBeDoneList(IRaCIS.Core.Application.Contracts.ReReadingApprovalToBeDoneQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTaskReReading},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||||
<summary>
|
<summary>
|
||||||
重阅审批
|
SPM 重阅审批
|
||||||
</summary>
|
</summary>
|
||||||
<param name="inQuery"></param>
|
<param name="inQuery"></param>
|
||||||
<param name="_visitTaskReReadingRepository"></param>
|
<param name="_visitTaskReReadingRepository"></param>
|
||||||
@@ -10593,6 +10915,14 @@
|
|||||||
<param name="_subjectVisitRepository"></param>
|
<param name="_subjectVisitRepository"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetImageClinicalDataToBeConfirmList(IRaCIS.Core.Application.Contracts.ImageClinicalDataToBeDoneQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||||
|
<summary>
|
||||||
|
临床数据 --CRC 待确认
|
||||||
|
</summary>
|
||||||
|
<param name="inQuery"></param>
|
||||||
|
<param name="_subjectVisitRepository"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetCRCImageQuestionToBeDoneList(IRaCIS.Core.Application.Contracts.ImageQuestionToBeDoneQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetCRCImageQuestionToBeDoneList(IRaCIS.Core.Application.Contracts.ImageQuestionToBeDoneQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial})">
|
||||||
<summary>
|
<summary>
|
||||||
CRC影像质疑待处理 --CRC 待办
|
CRC影像质疑待处理 --CRC 待办
|
||||||
@@ -10659,7 +10989,7 @@
|
|||||||
<param name="inQuery"></param>
|
<param name="inQuery"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetMIMMedicalCommentsToBeDoneList(IRaCIS.Core.Application.Contracts.MedicalCommentsToBeDoneQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview})">
|
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetMIMMedicalCommentsToBeDoneList(IRaCIS.Core.Application.Contracts.MedicalCommentsToBeDoneQuery,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TaskMedicalReview},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial})">
|
||||||
<summary>
|
<summary>
|
||||||
MIM医学反馈
|
MIM医学反馈
|
||||||
</summary>
|
</summary>
|
||||||
@@ -12010,6 +12340,27 @@
|
|||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SubmitCustomTag(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCustomTagDto)">
|
||||||
|
<summary>
|
||||||
|
提交自定义标记
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.DeleteCustomTag(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
删除自定义标记
|
||||||
|
</summary>
|
||||||
|
<param name="id"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetCustomTag(IRaCIS.Core.Application.Service.Reading.Dto.GetCustomTagInDto)">
|
||||||
|
<summary>
|
||||||
|
获取自定义标记
|
||||||
|
</summary>
|
||||||
|
<param name="inQuery"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetManualList(IRaCIS.Core.Application.Service.Reading.Dto.GetManualListInDto)">
|
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetManualList(IRaCIS.Core.Application.Service.Reading.Dto.GetManualListInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取手册
|
获取手册
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
public string SubjectCode { get; set; } = String.Empty;
|
public string SubjectCode { get; set; } = String.Empty;
|
||||||
|
|
||||||
public bool IsUrgent => UnReadTaskList.Any(t => t.IsUrgent);
|
public bool IsUrgent => UnReadCanReadTaskList.Any(t => t.IsUrgent);
|
||||||
|
|
||||||
public int UnReadTaskCount { get; set; }
|
public int UnReadTaskCount { get; set; }
|
||||||
|
|
||||||
@@ -271,6 +271,38 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
|
|
||||||
public DateTime? SuggesteFinishedTime { get; set; }
|
public DateTime? SuggesteFinishedTime { get; set; }
|
||||||
|
|
||||||
|
public int? UrgentColor
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (this.SuggesteFinishedTime != null)
|
||||||
|
{
|
||||||
|
var date = DateTime.Now;
|
||||||
|
var timeSpan = SuggesteFinishedTime.Value- date;
|
||||||
|
if (timeSpan.TotalDays <= 2)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (timeSpan.TotalDays <= 5)
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public int UrgentCount => UnReadCanReadTaskList.Count(t => t.IsUrgent);
|
||||||
|
|
||||||
public List<IRUnreadTaskView> UnReadCanReadTaskList => UnReadTaskList.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)).ToList();
|
public List<IRUnreadTaskView> UnReadCanReadTaskList => UnReadTaskList.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)).ToList();
|
||||||
|
|
||||||
public List<IRUnreadTaskView> UnReadTaskList { get; set; } = new List<IRUnreadTaskView>();
|
public List<IRUnreadTaskView> UnReadTaskList { get; set; } = new List<IRUnreadTaskView>();
|
||||||
|
|||||||
@@ -459,6 +459,13 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var haveSignedCount = _readingClinicalDataRepository
|
var haveSignedCount = _readingClinicalDataRepository
|
||||||
.Where(t => t.TrialId == trialId && t.IsSign && t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned && t.ReadingId == readingId && t.ClinicalDataTrialSet.UploadRole == UploadRole.PM).Count();
|
.Where(t => t.TrialId == trialId && t.IsSign && t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned && t.ReadingId == readingId && t.ClinicalDataTrialSet.UploadRole == UploadRole.PM).Count();
|
||||||
|
|
||||||
|
|
||||||
|
var readModule = _readModuleRepository.Where(t => t.Id == readingId).FirstOrDefault();
|
||||||
|
//CRC 阅片期自定义结构化录入是否签名
|
||||||
|
bool crcReadModuleSign = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//访视
|
//访视
|
||||||
if (readingCategory == ReadingCategory.Visit)
|
if (readingCategory == ReadingCategory.Visit)
|
||||||
{
|
{
|
||||||
@@ -478,16 +485,37 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//阅片期
|
//阅片期
|
||||||
else if (readingCategory == ReadingCategory.Global)
|
else if (readingCategory == ReadingCategory.Global)
|
||||||
{
|
{
|
||||||
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCriterionId) && t.ClinicalDataLevel == ClinicalLevel.ImageRead && t.UploadRole == UploadRole.PM).Count();
|
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCriterionId) && t.ClinicalDataLevel == ClinicalLevel.ImageRead && t.UploadRole == UploadRole.PM).Count();
|
||||||
|
|
||||||
|
if (readModule != null)
|
||||||
|
{
|
||||||
|
// 不存在需要CRC上传的临床数据 或者 PM已确认
|
||||||
|
crcReadModuleSign =
|
||||||
|
!trialClinicalDataSetList.Any(x =>
|
||||||
|
x.UploadRole == UploadRole.CRC
|
||||||
|
&& x.ClinicalDataLevel == ClinicalLevel.ImageRead
|
||||||
|
&& x.ClinicalUploadType == ClinicalUploadType.Structuring
|
||||||
|
&& x.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCriterionId)) || readModule.IsPMConfirm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 肿瘤学
|
// 肿瘤学
|
||||||
else if (readingCategory == ReadingCategory.Oncology)
|
else if (readingCategory == ReadingCategory.Oncology)
|
||||||
{
|
{
|
||||||
return trialClinicalDataSetList.Any(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCriterionId) && t.ClinicalDataLevel == ClinicalLevel.OncologyRead);
|
needSignCount= trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCriterionId) && t.ClinicalDataLevel == ClinicalLevel.OncologyRead && t.UploadRole == UploadRole.PM).Count();
|
||||||
|
if (readModule != null)
|
||||||
|
{
|
||||||
|
// 不存在需要CRC上传的临床数据 或者 PM已确认
|
||||||
|
crcReadModuleSign =
|
||||||
|
!trialClinicalDataSetList.Any(x =>
|
||||||
|
x.UploadRole == UploadRole.CRC
|
||||||
|
&& x.ClinicalDataLevel == ClinicalLevel.OncologyRead
|
||||||
|
&& x.ClinicalUploadType == ClinicalUploadType.Structuring
|
||||||
|
&& x.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCriterionId)) || readModule.IsPMConfirm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -495,7 +523,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}
|
}
|
||||||
|
|
||||||
//可能仅仅CRC 基线 没有PM
|
//可能仅仅CRC 基线 没有PM
|
||||||
if (needSignCount == haveSignedCount /*&& needSignCount != 0*/)
|
if (needSignCount == haveSignedCount && crcReadModuleSign )
|
||||||
{
|
{
|
||||||
isClinicalDataSign = true;
|
isClinicalDataSign = true;
|
||||||
|
|
||||||
@@ -620,7 +648,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
foreach (var trialReadingCriterionConfig in trialReadingCriterionConfigList)
|
foreach (var trialReadingCriterionConfig in trialReadingCriterionConfigList)
|
||||||
{
|
{
|
||||||
|
var trialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId;
|
||||||
//var subjectCriteriaEvaluation = _subjectCriteriaEvaluationRepository.Where(t => t.TrialReadingCriterionId == trialReadingCriterionConfig.TrialReadingCriterionId && t.IsJoinEvaluation && t.SubjectId == subjectVisit.SubjectId).FirstOrDefault();
|
//var subjectCriteriaEvaluation = _subjectCriteriaEvaluationRepository.Where(t => t.TrialReadingCriterionId == trialReadingCriterionConfig.TrialReadingCriterionId && t.IsJoinEvaluation && t.SubjectId == subjectVisit.SubjectId).FirstOrDefault();
|
||||||
|
|
||||||
if (trialReadingCriterionConfig.IsAutoCreate == true /*|| (trialReadingCriterionConfig.IsAutoCreate == false && subjectCriteriaEvaluation != null && subjectCriteriaEvaluation?.IsJoinEvaluation == true)*/)
|
if (trialReadingCriterionConfig.IsAutoCreate == true /*|| (trialReadingCriterionConfig.IsAutoCreate == false && subjectCriteriaEvaluation != null && subjectCriteriaEvaluation?.IsJoinEvaluation == true)*/)
|
||||||
@@ -660,7 +688,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
|
|
||||||
var existCurrentVisitTaskList = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId
|
var existCurrentVisitTaskList = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId
|
||||||
&& t.TrialReadingCriterionId == trialReadingCriterionConfig.TrialReadingCriterionId && t.TaskState == TaskState.Effect
|
&& t.TrialReadingCriterionId == trialReadingCriterionId && t.TaskState == TaskState.Effect
|
||||||
&& t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.SourceSubjectVisitId == subjectVisit.Id).ToList();
|
&& t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.SourceSubjectVisitId == subjectVisit.Id).ToList();
|
||||||
|
|
||||||
VisitTask? task1 = null;
|
VisitTask? task1 = null;
|
||||||
@@ -1061,7 +1089,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
|
|
||||||
//该Subject 之前是否有已分配的 如果改变配置 可能会出现 一个Subject 分配的同一个医生 有的在Arm1 有的在Arm2
|
//该Subject 之前是否有已分配的 如果改变配置 可能会出现 一个Subject 分配的同一个医生 有的在Arm1 有的在Arm2
|
||||||
var allocateSubjectArmList = _visitTaskRepository.Where(t => t.SubjectId == subjectVisit.SubjectId && t.TrialId == trialId && t.DoctorUserId != null && t.ArmEnum != Arm.JudgeArm)
|
var allocateSubjectArmList = _visitTaskRepository.Where(t => t.SubjectId == subjectVisit.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.TrialId == trialId && t.DoctorUserId != null && t.ArmEnum != Arm.JudgeArm)
|
||||||
.Select(t => new { t.DoctorUserId, t.ArmEnum }).Distinct().ToList();
|
.Select(t => new { t.DoctorUserId, t.ArmEnum }).Distinct().ToList();
|
||||||
|
|
||||||
//不是初次分配
|
//不是初次分配
|
||||||
@@ -1082,7 +1110,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder)
|
if (trialReadingCriterionConfig.IsReadingTaskViewInOrder)
|
||||||
{
|
{
|
||||||
//之前有回退到影像上传的访视 那么当前访视一致性核查通过的时候,当前访视生成但是不分配出去(排除失访的)
|
//之前有回退到影像上传的访视 那么当前访视一致性核查通过的时候,当前访视生成但是不分配出去(排除失访的)
|
||||||
var beforeBackVisitTask = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.VisitTaskNum < subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.SourceSubjectVisit.CheckState != CheckStateEnum.CVPassed && t.SourceSubjectVisit.IsLostVisit == false).OrderBy(t => t.VisitTaskNum).FirstOrDefaultAsync();
|
var beforeBackVisitTask = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.VisitTaskNum < subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.SourceSubjectVisit.CheckState != CheckStateEnum.CVPassed && t.SourceSubjectVisit.IsLostVisit == false).OrderBy(t => t.VisitTaskNum).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
if (beforeBackVisitTask == null)
|
if (beforeBackVisitTask == null)
|
||||||
@@ -1107,11 +1135,11 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
var followBackVisitTask = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.SourceSubjectVisit.CheckState != CheckStateEnum.CVPassed && t.SourceSubjectVisit.IsLostVisit == false).OrderBy(t => t.VisitTaskNum).FirstOrDefaultAsync();
|
var followBackVisitTask = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.SourceSubjectVisit.CheckState != CheckStateEnum.CVPassed && t.SourceSubjectVisit.IsLostVisit == false).OrderBy(t => t.VisitTaskNum).FirstOrDefaultAsync();
|
||||||
|
|
||||||
//存在退回访视1 又退回基线 这种情况 生成任务 考虑基线先一致性核查通过,但是访视1还未通过时 生成任务
|
//存在退回访视1 又退回基线 这种情况 生成任务 考虑基线先一致性核查通过,但是访视1还未通过时 生成任务
|
||||||
var followVisitTaskList = await _visitTaskRepository
|
var followVisitTaskList = await _visitTaskRepository
|
||||||
.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.VisitTaskNum > subjectVisit.VisitNum && t.SourceSubjectVisit.CheckState == CheckStateEnum.CVPassed && t.ReadingCategory == ReadingCategory.Visit && t.IsAnalysisCreate == false, true)
|
.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionId && t.VisitTaskNum > subjectVisit.VisitNum && t.SourceSubjectVisit.CheckState == CheckStateEnum.CVPassed && t.ReadingCategory == ReadingCategory.Visit && t.IsAnalysisCreate == false, true)
|
||||||
.WhereIf(followBackVisitTask != null, t => t.VisitTaskNum < followBackVisitTask.VisitTaskNum)
|
.WhereIf(followBackVisitTask != null, t => t.VisitTaskNum < followBackVisitTask.VisitTaskNum)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
if (addOrEditInternationalization.InternationalizationType == 1)
|
if (addOrEditInternationalization.InternationalizationType == 1)
|
||||||
{
|
{
|
||||||
await InternationalizationHelper.AddOrUpdateJsonKeyValueAsync(entity.Code, entity.Value, entity.ValueCN);
|
await InternationalizationHelper.AddOrUpdateJsonKeyValueAsync(entity.Code, addOrEditInternationalization.Value, addOrEditInternationalization.ValueCN);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,6 +104,15 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GetNextUnSignDocumentInDto
|
||||||
|
{
|
||||||
|
[NotDefault]
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public bool Asc { get; set; } = true;
|
||||||
|
public string SortField { get; set; } = "";
|
||||||
|
}
|
||||||
|
|
||||||
public class TrialUserDocUnionQuery: PageInput
|
public class TrialUserDocUnionQuery: PageInput
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using User = IRaCIS.Core.Domain.Models.User;
|
using User = IRaCIS.Core.Domain.Models.User;
|
||||||
|
using DocumentFormat.OpenXml.Office2010.Word;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Services
|
namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
@@ -19,14 +20,16 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
|
|
||||||
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
||||||
private readonly IRepository<SystemDocNeedConfirmedUserType> _systemDocNeedConfirmedUserTypeRepository;
|
private readonly IRepository<SystemDocNeedConfirmedUserType> _systemDocNeedConfirmedUserTypeRepository;
|
||||||
|
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
|
||||||
|
|
||||||
public SystemDocumentService( IRepository<SystemDocument> systemDocumentRepository,
|
public SystemDocumentService( IRepository<SystemDocument> systemDocumentRepository,
|
||||||
IRepository<SystemDocNeedConfirmedUserType> systemDocNeedConfirmedUserTypeRepository
|
IRepository<SystemDocNeedConfirmedUserType> systemDocNeedConfirmedUserTypeRepository,
|
||||||
)
|
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository)
|
||||||
{
|
{
|
||||||
_systemDocumentRepository = systemDocumentRepository;
|
_systemDocumentRepository = systemDocumentRepository;
|
||||||
this._systemDocNeedConfirmedUserTypeRepository = systemDocNeedConfirmedUserTypeRepository;
|
this._systemDocNeedConfirmedUserTypeRepository = systemDocNeedConfirmedUserTypeRepository;
|
||||||
}
|
_systemDocConfirmedUserRepository = systemDocConfirmedUserRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -109,6 +112,22 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpDelete("{systemDocumentId:guid}")]
|
||||||
|
public async Task<IResponseOutput> AbandonSystemDocumentAsync(Guid systemDocumentId)
|
||||||
|
{
|
||||||
|
|
||||||
|
await _systemDocumentRepository.UpdatePartialFromQueryAsync(systemDocumentId, u => new SystemDocument() { IsDeleted = true });
|
||||||
|
|
||||||
|
await _systemDocConfirmedUserRepository.UpdatePartialFromQueryAsync(x => x.SystemDocumentId == systemDocumentId, x => new SystemDocConfirmedUser()
|
||||||
|
{
|
||||||
|
IsDeleted = true
|
||||||
|
});
|
||||||
|
|
||||||
|
await _systemDocConfirmedUserRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Result(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[HttpDelete("{systemDocumentId:guid}")]
|
[HttpDelete("{systemDocumentId:guid}")]
|
||||||
public async Task<IResponseOutput> DeleteSystemDocumentAsync(Guid systemDocumentId)
|
public async Task<IResponseOutput> DeleteSystemDocumentAsync(Guid systemDocumentId)
|
||||||
|
|||||||
@@ -66,6 +66,33 @@ namespace IRaCIS.Core.Application.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取下一个未签名的文件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<UnionDocumentWithConfirmInfoView?> GetNextUnSignDocument(GetNextUnSignDocumentInDto inDto)
|
||||||
|
{
|
||||||
|
var result =await this.GetUserDocumentList(new TrialUserDocUnionQuery()
|
||||||
|
{
|
||||||
|
Asc = inDto.Asc,
|
||||||
|
IsSign = false,
|
||||||
|
SortField = inDto.SortField,
|
||||||
|
TrialId= inDto.TrialId,
|
||||||
|
PageIndex = 1,
|
||||||
|
PageSize = 1,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (result.Data.CurrentPageData.Count() > 0)
|
||||||
|
{
|
||||||
|
return result.Data.CurrentPageData.First();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 具体用户看到的 系统文件列表 + 项目类型文档
|
/// 具体用户看到的 系统文件列表 + 项目类型文档
|
||||||
|
|||||||
@@ -35,9 +35,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Site.SiteName))
|
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Site.SiteName))
|
||||||
.ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.Uploader.FirstName))
|
.ForMember(d => d.UploaderFirstName, u => u.MapFrom(s => s.Uploader.FirstName))
|
||||||
.ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.Uploader.LastName))
|
.ForMember(d => d.UploaderLastName, u => u.MapFrom(s => s.Uploader.LastName))
|
||||||
.ForMember(d => d.UploadedTime, u => u.MapFrom(s => s.CreateTime))
|
.ForMember(d => d.UploadedTime, u => u.MapFrom(s => s.CreateTime));
|
||||||
|
|
||||||
.ForMember(d => d.DTFCount, u => u.MapFrom(s => s.StudyDTFList.Count()));
|
|
||||||
|
|
||||||
CreateMap<Subject, StudyDTO>();
|
CreateMap<Subject, StudyDTO>();
|
||||||
|
|
||||||
@@ -61,7 +59,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<DicomStudy, QAStudyInfoDTO>()
|
CreateMap<DicomStudy, QAStudyInfoDTO>()
|
||||||
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
||||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
|
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
|
||||||
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id));
|
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
|
||||||
|
.ForMember(o => o.Modalities, t => t.MapFrom(u => string.Join('、', u.SeriesList.Select(t => t.Modality).Distinct()) ));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace IRaCIS.Application.Services
|
|||||||
/// <summary> 根据CRO 名称查询所有CRO 列表 </summary>
|
/// <summary> 根据CRO 名称查询所有CRO 列表 </summary>
|
||||||
public async Task<IEnumerable<CroSelectDTO>> GetAllCROList()
|
public async Task<IEnumerable<CroSelectDTO>> GetAllCROList()
|
||||||
{
|
{
|
||||||
return await _croRepository.ProjectTo<CroSelectDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
return await _croRepository.ProjectTo<CroSelectDTO>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us }).ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace IRaCIS.Application.Services
|
|||||||
//{
|
//{
|
||||||
// sponsorLambda = sponsorLambda.And(t => t.SponsorName.Contains(sponsorSearchModel.SponsorName.Trim()));
|
// sponsorLambda = sponsorLambda.And(t => t.SponsorName.Contains(sponsorSearchModel.SponsorName.Trim()));
|
||||||
//}
|
//}
|
||||||
var sponsorQueryable = _sponsorRepository.ProjectTo<SponsorSelectDTO>(_mapper.ConfigurationProvider);
|
var sponsorQueryable = _sponsorRepository.ProjectTo<SponsorSelectDTO>(_mapper.ConfigurationProvider,new { isEn_Us= _userInfo.IsEn_Us});
|
||||||
return await sponsorQueryable.ToListAsync();
|
return await sponsorQueryable.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
public InstitutionConfig()
|
public InstitutionConfig()
|
||||||
{
|
{
|
||||||
|
var isEn_Us = false;
|
||||||
|
|
||||||
CreateMap<HospitalCommand, Hospital>();
|
CreateMap<HospitalCommand, Hospital>();
|
||||||
CreateMap<SiteCommand, Site>();
|
CreateMap<SiteCommand, Site>();
|
||||||
CreateMap<SponsorCommand, Sponsor>();
|
CreateMap<SponsorCommand, Sponsor>();
|
||||||
@@ -15,8 +17,11 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<Hospital, HospitalDTO>();
|
CreateMap<Hospital, HospitalDTO>();
|
||||||
CreateMap<CRO, CROCompanyDTO>().ReverseMap();
|
CreateMap<CRO, CROCompanyDTO>().ReverseMap();
|
||||||
CreateMap<Sponsor, SponsorDTO>();
|
CreateMap<Sponsor, SponsorDTO>();
|
||||||
CreateMap<CRO, CroSelectDTO>();
|
CreateMap<CRO, CroSelectDTO>()
|
||||||
CreateMap<Sponsor, SponsorSelectDTO>();
|
.ForMember(t => t.CROName, c => c.MapFrom(d => isEn_Us ? d.CROName : d.CRONameCN));
|
||||||
|
|
||||||
|
CreateMap<Sponsor, SponsorSelectDTO>()
|
||||||
|
.ForMember(t=>t.SponsorName,c=>c.MapFrom(d=> isEn_Us?d.SponsorName:d.SponsorNameCN));
|
||||||
CreateMap<Site, SiteSelectionDTO>();
|
CreateMap<Site, SiteSelectionDTO>();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
//--------------------------------------------------------------------
|
||||||
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
|
// 生成时间 2023-07-04 16:10:46
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
using System;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
{
|
||||||
|
/// <summary> UserLogView 列表视图模型 </summary>
|
||||||
|
public class UserLogView
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
public string IP { get; set; }
|
||||||
|
|
||||||
|
public string LoginFaildName { get; set; }
|
||||||
|
public int OptType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string? LoginUserName { get; set; }
|
||||||
|
|
||||||
|
public UserTypeEnum? LoginUserTypeEnum { get; set; }
|
||||||
|
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public string? OptUserName { get; set; }
|
||||||
|
|
||||||
|
public UserTypeEnum? OptUserTypeEnum { get; set; }
|
||||||
|
|
||||||
|
public Guid? LoginUserId { get; set; }
|
||||||
|
|
||||||
|
public Guid? OptUserId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
///<summary>UserLogQuery 列表查询参数模型</summary>
|
||||||
|
public class UserLogQuery : PageInput
|
||||||
|
{
|
||||||
|
public Guid? TrialId { get; set; }
|
||||||
|
|
||||||
|
public UserOptType? OptType { get; set; }
|
||||||
|
|
||||||
|
public string? IP { get; set; }
|
||||||
|
|
||||||
|
public string? LoginFaildName { get; set; }
|
||||||
|
|
||||||
|
public DateTime? BeginDate { get; set; }
|
||||||
|
|
||||||
|
public DateTime? EndDate { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -9,6 +9,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
/// <summary> UserTypeRoleView 列表视图模型 </summary>
|
/// <summary> UserTypeRoleView 列表视图模型 </summary>
|
||||||
public class UserTypeRoleView : UserTypeMenuAddOrEdit
|
public class UserTypeRoleView : UserTypeMenuAddOrEdit
|
||||||
{
|
{
|
||||||
|
public UserTypeEnum UserTypeEnum { get; set; }
|
||||||
public List<UserTypeGroupInfo> UserTypeGroupList { get; set; } = new List<UserTypeGroupInfo>();
|
public List<UserTypeGroupInfo> UserTypeGroupList { get; set; } = new List<UserTypeGroupInfo>();
|
||||||
|
|
||||||
public new List<Guid> UserTypeGroupIdList => UserTypeGroupList.Select(t=>t.DictionaryId).ToList();
|
public new List<Guid> UserTypeGroupIdList => UserTypeGroupList.Select(t=>t.DictionaryId).ToList();
|
||||||
@@ -37,6 +38,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public class UserTypeMenuAddOrEdit: UserTypeRoleAddOrEdit
|
public class UserTypeMenuAddOrEdit: UserTypeRoleAddOrEdit
|
||||||
{
|
{
|
||||||
|
public UserTypeEnum UserTypeEnum { get; set; }
|
||||||
|
|
||||||
public List<Guid> MenuIds { get; set; } = new List<Guid>();
|
public List<Guid> MenuIds { get; set; } = new List<Guid>();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -52,6 +55,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public int Order { get; set; }
|
public int Order { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<Guid> UserTypeGroupIdList { get; set; } = new List<Guid>();
|
public List<Guid> UserTypeGroupIdList { get; set; } = new List<Guid>();
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
//--------------------------------------------------------------------
|
||||||
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
|
// 生成时间 2023-07-04 16:10:34
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
|
||||||
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
|
namespace IRaCIS.Core.Application.Interfaces
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// IUserLogService
|
||||||
|
/// </summary>
|
||||||
|
public interface IUserLogService
|
||||||
|
{
|
||||||
|
|
||||||
|
Task<PageOutput<UserLogView>> GetUserLogList(UserLogQuery inQuery);
|
||||||
|
|
||||||
|
//Task<IResponseOutput> AddOrUpdateUserLog(UserLogAddOrEdit addOrEditUserLog);
|
||||||
|
|
||||||
|
//Task<IResponseOutput> DeleteUserLog(Guid userLogId);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@ using Microsoft.Extensions.Caching.Memory;
|
|||||||
using IRaCIS.Core.Infra.Common.Cache;
|
using IRaCIS.Core.Infra.Common.Cache;
|
||||||
using Microsoft.Identity.Client;
|
using Microsoft.Identity.Client;
|
||||||
using static IRaCIS.Core.Domain.Share.StaticData;
|
using static IRaCIS.Core.Domain.Share.StaticData;
|
||||||
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
@@ -22,6 +23,8 @@ namespace IRaCIS.Application.Services
|
|||||||
private readonly IRepository<VerificationCode> _verificationCodeRepository;
|
private readonly IRepository<VerificationCode> _verificationCodeRepository;
|
||||||
private readonly IRepository<Doctor> _doctorRepository;
|
private readonly IRepository<Doctor> _doctorRepository;
|
||||||
private readonly IRepository<TrialUser> _userTrialRepository;
|
private readonly IRepository<TrialUser> _userTrialRepository;
|
||||||
|
private readonly IRepository<UserLog> _userLogRepository;
|
||||||
|
|
||||||
|
|
||||||
private readonly IMemoryCache _cache;
|
private readonly IMemoryCache _cache;
|
||||||
|
|
||||||
@@ -35,10 +38,12 @@ namespace IRaCIS.Application.Services
|
|||||||
IRepository<Doctor> doctorRepository,
|
IRepository<Doctor> doctorRepository,
|
||||||
IMemoryCache cache,
|
IMemoryCache cache,
|
||||||
IRepository<TrialUser> userTrialRepository,
|
IRepository<TrialUser> userTrialRepository,
|
||||||
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig
|
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig,
|
||||||
|
IRepository<UserLog> userLogRepository
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
_userLogRepository = userLogRepository;
|
||||||
|
|
||||||
_verifyConfig = verifyConfig;
|
_verifyConfig = verifyConfig;
|
||||||
_cache = cache;
|
_cache = cache;
|
||||||
_userRepository = userRepository;
|
_userRepository = userRepository;
|
||||||
@@ -46,6 +51,7 @@ namespace IRaCIS.Application.Services
|
|||||||
_verificationCodeRepository = verificationCodeRepository;
|
_verificationCodeRepository = verificationCodeRepository;
|
||||||
_doctorRepository = doctorRepository;
|
_doctorRepository = doctorRepository;
|
||||||
_userTrialRepository = userTrialRepository;
|
_userTrialRepository = userTrialRepository;
|
||||||
|
_userLogRepository = userLogRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -167,9 +173,7 @@ namespace IRaCIS.Application.Services
|
|||||||
}
|
}
|
||||||
else //验证码正确 并且 没有超时
|
else //验证码正确 并且 没有超时
|
||||||
{
|
{
|
||||||
//更新密码
|
|
||||||
//var pwd = MD5Helper.Md5(newPwd);
|
|
||||||
//var count = _doctorRepository.Update<Doctor>().Where(t => t.Id == doctor.Id).Set(d => d.Password == pwd).ExecuteAffrows();
|
|
||||||
|
|
||||||
await VerifyUserEmailAsync(_userInfo.Id, _userInfo.UserTypeId, newEmail);
|
await VerifyUserEmailAsync(_userInfo.Id, _userInfo.UserTypeId, newEmail);
|
||||||
|
|
||||||
@@ -182,6 +186,8 @@ namespace IRaCIS.Application.Services
|
|||||||
//删除验证码历史记录
|
//删除验证码历史记录
|
||||||
await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.UserId == _userInfo.Id && t.CodeType == 0);
|
await _verificationCodeRepository.BatchDeleteNoTrackingAsync(t => t.UserId == _userInfo.Id && t.CodeType == 0);
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -200,6 +206,8 @@ namespace IRaCIS.Application.Services
|
|||||||
Phone = newPhone
|
Phone = newPhone
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,19 +223,11 @@ namespace IRaCIS.Application.Services
|
|||||||
UserName = newUserName
|
UserName = newUserName
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true);
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
///// <summary>
|
|
||||||
///// Result 为true 的时候 认为链接没有失效
|
|
||||||
///// </summary>
|
|
||||||
///// <param name="userId"></param>
|
|
||||||
///// <returns></returns>
|
|
||||||
//[HttpGet]
|
|
||||||
//public async Task<IResponseOutput> VerifyCanInitSetUserNameAndPwd(Guid userId)
|
|
||||||
//{
|
|
||||||
// return ResponseOutput.Ok(await _userRepository.AnyAsync(t => t.Id == userId && t.EmailToken == _userInfo.UserToken && t.IsFirstAdd));
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
@@ -235,8 +235,6 @@ namespace IRaCIS.Application.Services
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await VerifyUserPwdAsync(userId, newPWd);
|
await VerifyUserPwdAsync(userId, newPWd);
|
||||||
|
|
||||||
await VerifyUserNameAsync(userId, newUserName);
|
await VerifyUserNameAsync(userId, newUserName);
|
||||||
@@ -253,6 +251,8 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.UpdateUser }, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,6 +292,8 @@ namespace IRaCIS.Application.Services
|
|||||||
IsFirstAdd = true
|
IsFirstAdd = true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId=userId, OptType = UserOptType.ResetPassword }, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok();
|
return ResponseOutput.Ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,6 +404,8 @@ namespace IRaCIS.Application.Services
|
|||||||
IsFirstAdd = false
|
IsFirstAdd = false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = Guid.Empty, OptUserId = userId,LoginPassword=newPwd, OptType = UserOptType.UnloginModifyPasswoed }, true);
|
||||||
|
|
||||||
return ResponseOutput.Result(success);
|
return ResponseOutput.Result(success);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -436,23 +440,11 @@ namespace IRaCIS.Application.Services
|
|||||||
IsFirstAdd = false
|
IsFirstAdd = false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId= _userInfo.Id, OptType = UserOptType.LoginModifyPassword }, true);
|
||||||
|
|
||||||
return ResponseOutput.Result(success);
|
return ResponseOutput.Result(success);
|
||||||
|
|
||||||
|
|
||||||
////医生密码
|
|
||||||
//if (await _doctorRepository.AnyAsync(t => t.Id == _userInfo.Id && t.Password == editPwModel.OldPassWord))
|
|
||||||
//{
|
|
||||||
// var success = await _doctorRepository.BatchUpdateNoTrackingAsync(t => t.Id == _userInfo.Id, u => new Doctor()
|
|
||||||
// {
|
|
||||||
|
|
||||||
// Password = editPwModel.NewPassWord
|
|
||||||
// });
|
|
||||||
|
|
||||||
// return ResponseOutput.Result(success);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//return ResponseOutput.NotOk("Old password is wrong.");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -563,6 +555,9 @@ namespace IRaCIS.Application.Services
|
|||||||
{
|
{
|
||||||
user.OrganizationName = AppSettings.DefaultInternalOrganizationName;
|
user.OrganizationName = AppSettings.DefaultInternalOrganizationName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId= model.Id , OptType = UserOptType.UpdateUser }, true);
|
||||||
|
|
||||||
var success = await _userRepository.SaveChangesAsync();
|
var success = await _userRepository.SaveChangesAsync();
|
||||||
|
|
||||||
return ResponseOutput.Ok(success);
|
return ResponseOutput.Ok(success);
|
||||||
@@ -583,6 +578,8 @@ namespace IRaCIS.Application.Services
|
|||||||
return ResponseOutput.NotOk(_localizer["User_InProject"]);
|
return ResponseOutput.NotOk(_localizer["User_InProject"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId= userId, OptType = UserOptType.DeleteUser }, true);
|
||||||
|
|
||||||
var success = await _userRepository.BatchDeleteNoTrackingAsync(t => t.Id == userId);
|
var success = await _userRepository.BatchDeleteNoTrackingAsync(t => t.Id == userId);
|
||||||
|
|
||||||
return ResponseOutput.Result(success);
|
return ResponseOutput.Result(success);
|
||||||
@@ -598,6 +595,9 @@ namespace IRaCIS.Application.Services
|
|||||||
[HttpPost("{userId:guid}/{state:int}")]
|
[HttpPost("{userId:guid}/{state:int}")]
|
||||||
public async Task<IResponseOutput> UpdateUserState(Guid userId, UserStateEnum state)
|
public async Task<IResponseOutput> UpdateUserState(Guid userId, UserStateEnum state)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = userId, OptType = state==UserStateEnum.Enable? UserOptType.AccountEnable: UserOptType.AccountLocked }, true);
|
||||||
|
|
||||||
var success = await _userRepository.BatchUpdateNoTrackingAsync(u => u.Id == userId, t => new User
|
var success = await _userRepository.BatchUpdateNoTrackingAsync(u => u.Id == userId, t => new User
|
||||||
{
|
{
|
||||||
Status = state
|
Status = state
|
||||||
@@ -639,6 +639,8 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
if (failCount >= maxFailures)
|
if (failCount >= maxFailures)
|
||||||
{
|
{
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = Guid.Empty, OptUserId = Guid.Empty, LoginFaildName = userName,LoginPassword=password, OptType = UserOptType.AccountLocked }, true);
|
||||||
|
|
||||||
throw new BusinessValidationFailedException($"密码连续错误{maxFailures}次,当前账号已被限制登录,请等待 {lockoutMinutes} 分钟后再试。");
|
throw new BusinessValidationFailedException($"密码连续错误{maxFailures}次,当前账号已被限制登录,请等待 {lockoutMinutes} 分钟后再试。");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -650,28 +652,12 @@ namespace IRaCIS.Application.Services
|
|||||||
if (loginUser == null)
|
if (loginUser == null)
|
||||||
{
|
{
|
||||||
|
|
||||||
#region 屏蔽代码,现在没用到
|
|
||||||
////此处下面 代码 为了支持医生也能登录 而且前端不加选择到底是管理用户 还是医生用户 奇怪的需求 无法理解
|
|
||||||
|
|
||||||
//var loginDoctor = await _doctorRepository.Where(u => u.Phone == userName && u.Password == password).ProjectTo<UserBasicInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
//if (loginDoctor == null)
|
|
||||||
//{
|
|
||||||
// return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
|
|
||||||
//}
|
|
||||||
//userLoginReturnModel.BasicInfo = loginDoctor;
|
|
||||||
|
|
||||||
//登录 清除缓存
|
|
||||||
//_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
|
|
||||||
//return ResponseOutput.Ok(userLoginReturnModel);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
//错误次数累加
|
//错误次数累加
|
||||||
failCount++;
|
failCount++;
|
||||||
_cache.Set(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
|
_cache.Set(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = Guid.Empty, OptUserId=Guid.Empty, LoginFaildName = userName, LoginPassword = password, OptType = UserOptType.AccountOrPasswordError }, true);
|
||||||
|
|
||||||
return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
|
return ResponseOutput.NotOk(_localizer["User_CheckNameOrPw"], new LoginReturnDTO());
|
||||||
|
|
||||||
|
|
||||||
@@ -680,6 +666,8 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
if (loginUser.Status == 0)
|
if (loginUser.Status == 0)
|
||||||
{
|
{
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = loginUser.Id, OptUserId = loginUser.Id, LoginFaildName = userName, OptType = UserOptType.LoginLockedAccount }, true);
|
||||||
|
|
||||||
//---该用户已经被禁用。
|
//---该用户已经被禁用。
|
||||||
return ResponseOutput.NotOk(_localizer["User_Disabled"], new LoginReturnDTO());
|
return ResponseOutput.NotOk(_localizer["User_Disabled"], new LoginReturnDTO());
|
||||||
}
|
}
|
||||||
@@ -688,7 +676,7 @@ namespace IRaCIS.Application.Services
|
|||||||
//登录成功 清除缓存
|
//登录成功 清除缓存
|
||||||
_cache.Set(cacheKey, 0, TimeSpan.FromMinutes(lockoutMinutes));
|
_cache.Set(cacheKey, 0, TimeSpan.FromMinutes(lockoutMinutes));
|
||||||
|
|
||||||
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = loginUser.Id, OptUserId = loginUser.Id, OptType = UserOptType.Login }, true);
|
||||||
|
|
||||||
userLoginReturnModel.BasicInfo = loginUser;
|
userLoginReturnModel.BasicInfo = loginUser;
|
||||||
|
|
||||||
@@ -698,35 +686,32 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<PageOutput<UserLogView>> GetUserLogList(UserLogQuery inQuery)
|
||||||
|
{
|
||||||
|
|
||||||
|
var userLogQueryable =
|
||||||
|
_userLogRepository
|
||||||
|
.WhereIf(inQuery.TrialId != null, t => t.LoginUser.UserTrials.Any(c => c.TrialId == inQuery.TrialId && c.UserId == t.CreateUserId))
|
||||||
|
.WhereIf(inQuery.OptType != null, t => t.OptType == inQuery.OptType)
|
||||||
|
.WhereIf(inQuery.BeginDate != null, t => t.CreateTime >= inQuery.BeginDate)
|
||||||
|
.WhereIf(inQuery.EndDate != null, t => t.CreateTime <= inQuery.EndDate)
|
||||||
|
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginFaildName), t => t.LoginFaildName.Contains(inQuery.LoginFaildName))
|
||||||
|
.WhereIf(!string.IsNullOrEmpty(inQuery.IP), t => t.IP.Contains(inQuery.IP))
|
||||||
|
.ProjectTo<UserLogView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
|
var pageList = await userLogQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? "Id" : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
//private bool loginIsLocked(string userName)
|
return pageList;
|
||||||
//{
|
}
|
||||||
|
|
||||||
// //if (failCount == null)
|
[HttpGet]
|
||||||
// //{
|
public async Task<IResponseOutput> LoginOut()
|
||||||
// // failCount = 0;
|
{
|
||||||
// //}
|
await _userLogRepository.AddAsync(new UserLog() { IP = _userInfo.IP, LoginUserId = _userInfo.Id, OptUserId = _userInfo.Id, OptType = UserOptType.LoginOut },true);
|
||||||
// //else
|
|
||||||
// //{
|
|
||||||
// // failCount++;
|
|
||||||
// //}
|
|
||||||
|
|
||||||
// //// 更新缓存中的登录失败次数
|
return ResponseOutput.Ok();
|
||||||
// //_cache.Set(cacheKey, failCount, TimeSpan.FromMinutes(lockoutMinutes));
|
}
|
||||||
|
|
||||||
// //if (failCount >= maxFailures)
|
|
||||||
// //{
|
|
||||||
// // // 如果登录失败次数达到了 3 次,则锁定用户
|
|
||||||
// // _cache.Set(cacheKey + ":locked", true, TimeSpan.FromMinutes(lockoutMinutes));
|
|
||||||
// //}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// //return isLocked;
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using IRaCIS.Core.Infra.EFCore;
|
using IRaCIS.Core.Infra.EFCore;
|
||||||
|
using IRaCIS.Application.Contracts;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Contracts
|
namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
@@ -15,18 +16,18 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
[ApiExplorerSettings(GroupName = "Management")]
|
[ApiExplorerSettings(GroupName = "Management")]
|
||||||
public class UserTypeRoleService : BaseService, IUserTypeService
|
public class UserTypeRoleService : BaseService, IUserTypeService
|
||||||
{
|
{
|
||||||
private readonly IRepository<UserType> userTypeServiceRepository;
|
private readonly IRepository<UserType> _userTypeRepository;
|
||||||
|
|
||||||
public UserTypeRoleService(IRepository<UserType> userTypeServiceRepository)
|
public UserTypeRoleService(IRepository<UserType> userTypeRepository)
|
||||||
{
|
{
|
||||||
this.userTypeServiceRepository = userTypeServiceRepository;
|
_userTypeRepository = userTypeRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<UserTypeRoleView>> GetUserTypeRoleList(UserTypeQuery userTypeQuery)
|
public async Task<List<UserTypeRoleView>> GetUserTypeRoleList(UserTypeQuery userTypeQuery)
|
||||||
{
|
{
|
||||||
|
|
||||||
var userTypeRoleQueryable = userTypeServiceRepository
|
var userTypeRoleQueryable = _userTypeRepository
|
||||||
.WhereIf(!string.IsNullOrWhiteSpace(userTypeQuery.SearchFilter), t => t.Description.Contains(userTypeQuery.SearchFilter!) || t.UserTypeName.Contains(userTypeQuery.SearchFilter!) || t.UserTypeShortName.Contains(userTypeQuery.SearchFilter!))
|
.WhereIf(!string.IsNullOrWhiteSpace(userTypeQuery.SearchFilter), t => t.Description.Contains(userTypeQuery.SearchFilter!) || t.UserTypeName.Contains(userTypeQuery.SearchFilter!) || t.UserTypeShortName.Contains(userTypeQuery.SearchFilter!))
|
||||||
|
|
||||||
.WhereIf(userTypeQuery.GroupId!=null,t=>t.UserTypeGroupList.Any(t=>t.DictionaryId== userTypeQuery.GroupId))
|
.WhereIf(userTypeQuery.GroupId!=null,t=>t.UserTypeGroupList.Any(t=>t.DictionaryId== userTypeQuery.GroupId))
|
||||||
@@ -40,16 +41,22 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public async Task<IResponseOutput> AddOrUpdateUserTypeRole(UserTypeMenuAddOrEdit addOrEditUserTypeRole)
|
public async Task<IResponseOutput> AddOrUpdateUserTypeRole(UserTypeMenuAddOrEdit addOrEditUserTypeRole)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
var verifyExp1 = new EntityVerifyExp<UserType>()
|
||||||
|
{
|
||||||
|
VerifyExp = u => u.UserTypeEnum == addOrEditUserTypeRole.UserTypeEnum ,
|
||||||
|
|
||||||
|
VerifyMsg = "已存在该用户类型的角色。"
|
||||||
|
};
|
||||||
|
|
||||||
var entity = new UserType();
|
var entity = new UserType();
|
||||||
|
|
||||||
if (addOrEditUserTypeRole.Id == null)
|
if (addOrEditUserTypeRole.Id == null)
|
||||||
{
|
{
|
||||||
entity = _mapper.Map<UserType>(addOrEditUserTypeRole);
|
entity = _mapper.Map<UserType>(addOrEditUserTypeRole);
|
||||||
|
|
||||||
entity.UserTypeEnum = userTypeServiceRepository.Select(t => t.UserTypeEnum).DefaultIfEmpty().Max() + 1;
|
//entity.UserTypeEnum = userTypeServiceRepository.Select(t => t.UserTypeEnum).DefaultIfEmpty().Max() + 1;
|
||||||
|
|
||||||
await _repository.AddAsync(entity);
|
|
||||||
|
|
||||||
|
await _userTypeRepository.InsertFromDTOAsync(addOrEditUserTypeRole,false, verifyExp1);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -57,14 +64,17 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
if (addOrEditUserTypeRole.MenuIds.Count > 0)
|
if (addOrEditUserTypeRole.MenuIds.Count > 0)
|
||||||
{
|
{
|
||||||
entity = userTypeServiceRepository.Where(t => t.Id == addOrEditUserTypeRole.Id, true).Include(t => t.UserTypeMenuList).Include(t=>t.UserTypeGroupList).FirstOrDefault().IfNullThrowException();
|
entity = _userTypeRepository.Where(t => t.Id == addOrEditUserTypeRole.Id, true).Include(t => t.UserTypeMenuList).Include(t=>t.UserTypeGroupList).FirstOrDefault().IfNullThrowException();
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
entity = userTypeServiceRepository.Where(t => t.Id == addOrEditUserTypeRole.Id, true).FirstOrDefault().IfNullThrowException();
|
entity = _userTypeRepository.Where(t => t.Id == addOrEditUserTypeRole.Id, true).FirstOrDefault().IfNullThrowException();
|
||||||
}
|
}
|
||||||
_mapper.Map(addOrEditUserTypeRole, entity);
|
_mapper.Map(addOrEditUserTypeRole, entity);
|
||||||
|
|
||||||
|
|
||||||
|
await _userTypeRepository.EntityVerifyAsync(entity.Id, verifyExp1);
|
||||||
}
|
}
|
||||||
|
|
||||||
var success = await _repository.SaveChangesAsync();
|
var success = await _repository.SaveChangesAsync();
|
||||||
@@ -83,7 +93,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
return ResponseOutput.NotOk(_localizer["UserType_InUse"]);
|
return ResponseOutput.NotOk(_localizer["UserType_InUse"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
var success = await userTypeServiceRepository.BatchDeleteNoTrackingAsync(t => t.Id == userTypeId);
|
var success = await _userTypeRepository.BatchDeleteNoTrackingAsync(t => t.Id == userTypeId);
|
||||||
|
|
||||||
return ResponseOutput.Result(success);
|
return ResponseOutput.Result(success);
|
||||||
}
|
}
|
||||||
@@ -139,7 +149,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
var query = userTypeServiceRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||||
.WhereIf(userTypeSelectEnum != UserTypeSelectEnum.None, t => userTypeEnums.Contains(t.UserTypeEnum))
|
.WhereIf(userTypeSelectEnum != UserTypeSelectEnum.None, t => userTypeEnums.Contains(t.UserTypeEnum))
|
||||||
.OrderBy(t => t.Order).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
.OrderBy(t => t.Order).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
@@ -156,7 +166,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<List<TrialUserType>> GetTrialUserTypeList()
|
public async Task<List<TrialUserType>> GetTrialUserTypeList()
|
||||||
{
|
{
|
||||||
var query = userTypeServiceRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||||
.Where(t => !t.UserTypeGroupList.Any(t=> t.Group.Code=="3"))
|
.Where(t => !t.UserTypeGroupList.Any(t=> t.Group.Code=="3"))
|
||||||
.OrderBy(t => t.Order).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
.OrderBy(t => t.Order).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,12 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(d => d.UserTypeId, c => c.MapFrom(t => t));
|
.ForMember(d => d.UserTypeId, c => c.MapFrom(t => t));
|
||||||
|
|
||||||
|
|
||||||
|
CreateMap<UserLog, UserLogView>()
|
||||||
|
.ForMember(d => d.LoginUserName, c => c.MapFrom(t => t.LoginUser.UserName))
|
||||||
|
.ForMember(d => d.LoginUserTypeEnum, c => c.MapFrom(t => t.LoginUser.UserTypeEnum))
|
||||||
|
.ForMember(d => d.OptUserName, c => c.MapFrom(t => t.OptUser.UserName))
|
||||||
|
.ForMember(d => d.OptUserTypeEnum, c => c.MapFrom(t => t.OptUser.UserTypeEnum))
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,6 +60,20 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public Guid? HandleUserId { get; set; }
|
public Guid? HandleUserId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GetNextIQCQualityInDto
|
||||||
|
{
|
||||||
|
[NotDefault]
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid SubjectId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetNextIQCQualityOutDto
|
||||||
|
{
|
||||||
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
|
public Guid? VisitId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class CRCRequestToQCCommand
|
public class CRCRequestToQCCommand
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,6 +71,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public string TypeValue { get; set; }
|
public string TypeValue { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class EmptyQCQuestionInDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
///<summary>TrialQCQuestionQuery 列表查询参数模型</summary>
|
///<summary>TrialQCQuestionQuery 列表查询参数模型</summary>
|
||||||
public class TrialQCQuestionQuery
|
public class TrialQCQuestionQuery
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
private IReadingImageTaskService _IReadingImageTaskService;
|
private IReadingImageTaskService _IReadingImageTaskService;
|
||||||
|
|
||||||
public QCListService(
|
public QCListService(
|
||||||
IRepository<SubjectVisit> subjectVisitRepository,
|
IRepository<SubjectVisit> subjectVisitRepository,
|
||||||
IRepository<Trial> trialRepository,
|
IRepository<Trial> trialRepository,
|
||||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSet,
|
IRepository<ClinicalDataTrialSet> clinicalDataTrialSet,
|
||||||
IRepository<TrialQCQuestionAnswer> trialQCQuestionAnswerRepository,
|
IRepository<TrialQCQuestionAnswer> trialQCQuestionAnswerRepository,
|
||||||
IRepository<TrialQCQuestion> trialQCQuestionRepository,
|
IRepository<TrialQCQuestion> trialQCQuestionRepository,
|
||||||
IReadingImageTaskService IReadingImageTaskService,
|
IReadingImageTaskService IReadingImageTaskService,
|
||||||
@@ -278,7 +278,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
//Expression<Func<DicomStudy, bool>> studyLambda = x => x.TrialId == visitSearchDTO.TrialId;
|
//Expression<Func<DicomStudy, bool>> studyLambda = x => x.TrialId == visitSearchDTO.TrialId;
|
||||||
////Expression<Func<VisitStage, bool>> visitPlanLambda = x => x.TrialId == subjectVisitSearch.TrialId;
|
////Expression<Func<VisitStage, bool>> visitPlanLambda = x => x.TrialId == subjectVisitSearch.TrialId;
|
||||||
|
|
||||||
//if (visitSearchDTO.SiteId != null && visitSearchDTO.SiteId != Guid.Empty)
|
//if (visitSearchDTO.SiteId != null && visitSearchDTO.SiteId != Guid.Empty)shiwu
|
||||||
//{
|
//{
|
||||||
// subjectVisitLambda = subjectVisitLambda.And(t => t.SiteId == visitSearchDTO.SiteId.Value);
|
// subjectVisitLambda = subjectVisitLambda.And(t => t.SiteId == visitSearchDTO.SiteId.Value);
|
||||||
// studyLambda = studyLambda.And(t => t.SiteId == visitSearchDTO.SiteId.Value);
|
// studyLambda = studyLambda.And(t => t.SiteId == visitSearchDTO.SiteId.Value);
|
||||||
@@ -451,7 +451,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
//.WhereIf(visitSearchDTO.ChallengeState != null, t => t.ChallengeState == visitSearchDTO.ChallengeState)
|
//.WhereIf(visitSearchDTO.ChallengeState != null, t => t.ChallengeState == visitSearchDTO.ChallengeState)
|
||||||
.ProjectTo<QCVisitViewModel>(_mapper.ConfigurationProvider);
|
.ProjectTo<QCVisitViewModel>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
var defalutSortArray = new string[] { nameof(SubjectVisit.IsUrgent) + " desc", nameof(SubjectVisit.SubjectId), nameof(SubjectVisit.VisitNum) };
|
var defalutSortArray = new string[] { nameof(SubjectVisit.IsUrgent) + " desc", nameof(QCVisitViewModel.AuditState) +" asc" };
|
||||||
var pageList = await query.ToPagedListAsync(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc, string.IsNullOrWhiteSpace(visitSearchDTO.SortField), defalutSortArray);
|
var pageList = await query.ToPagedListAsync(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc, string.IsNullOrWhiteSpace(visitSearchDTO.SortField), defalutSortArray);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
IRepository<DicomStudy> dicomStudyRepository,
|
IRepository<DicomStudy> dicomStudyRepository,
|
||||||
IRepository<DicomSeries> dicomSeriesrepository,
|
IRepository<DicomSeries> dicomSeriesrepository,
|
||||||
IRepository<Subject> subjectRepository,
|
IRepository<Subject> subjectRepository,
|
||||||
IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
||||||
IRepository<QCChallengeDialog> qCChallengeDialogrepository,
|
IRepository<QCChallengeDialog> qCChallengeDialogrepository,
|
||||||
IRepository<CheckChallengeDialog> checkChallengeDialogrepository,
|
IRepository<CheckChallengeDialog> checkChallengeDialogrepository,
|
||||||
IVisitTaskHelpeService visitTaskHelpeService
|
IVisitTaskHelpeService visitTaskHelpeService
|
||||||
@@ -101,7 +101,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
{
|
{
|
||||||
if (await _qcChallengeRepository.AnyAsync(t => t.IsClosed == false && t.SubjectVisitId == qaQuestionCommand.SubjectVisitId && t.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload))
|
if (await _qcChallengeRepository.AnyAsync(t => t.IsClosed == false && t.SubjectVisitId == qaQuestionCommand.SubjectVisitId && t.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload))
|
||||||
{
|
{
|
||||||
//---当前访视未关闭的质疑已设置了同意CRC重传影像。请在CRC完成影像重传后,先关闭原质疑,再添加新的质疑。
|
//---当前访视未关闭的质疑已设置了同意CRC重传影像。请在CRC完成影像重传后,先关闭原质疑,再添加新的质疑。
|
||||||
throw new BusinessValidationFailedException(_localizer["QCOperation_QuestionExist"]);
|
throw new BusinessValidationFailedException(_localizer["QCOperation_QuestionExist"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -234,7 +234,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("{trialId:guid}")]
|
[HttpPost("{trialId:guid}")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
// [Authorize(Policy = IRaCISPolicy.CRC_IQC)]
|
// [Authorize(Policy = IRaCISPolicy.CRC_IQC)]
|
||||||
public async Task<IResponseOutput> AddQCChallengeReply(QADialogCommand qaDialogCommand)
|
public async Task<IResponseOutput> AddQCChallengeReply(QADialogCommand qaDialogCommand)
|
||||||
{
|
{
|
||||||
var qaReply = _mapper.Map<QCChallengeDialog>(qaDialogCommand);
|
var qaReply = _mapper.Map<QCChallengeDialog>(qaDialogCommand);
|
||||||
@@ -525,7 +525,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
//_qcChallengeRepository.Delete(t => t.SubjectVisitId == subjectVisitId);
|
//_qcChallengeRepository.Delete(t => t.SubjectVisitId == subjectVisitId);
|
||||||
//_qcChallengeDialogRepository.Delete(t => t.SubjectVisitId == subjectVisitId);
|
//_qcChallengeDialogRepository.Delete(t => t.SubjectVisitId == subjectVisitId);
|
||||||
//_checkChallengeDialogRepository.Delete(t => t.SubjectVisitId == subjectVisitId);
|
//_checkChallengeDialogRepository.Delete(t => t.SubjectVisitId == subjectVisitId);
|
||||||
//---PM/APM同意一致性核查回退。
|
//---PM/APM同意一致性核查回退。
|
||||||
await _repository.AddAsync(new CheckChallengeDialog() { SubjectVisitId = subjectVisitId, TalkContent = _localizer["QCOperation_PMAPMConsistency"], UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt });
|
await _repository.AddAsync(new CheckChallengeDialog() { SubjectVisitId = subjectVisitId, TalkContent = _localizer["QCOperation_PMAPMConsistency"], UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt });
|
||||||
|
|
||||||
await _repository.BatchDeleteAsync<TrialQCQuestionAnswer>(t => t.SubjectVisitId == subjectVisitId);
|
await _repository.BatchDeleteAsync<TrialQCQuestionAnswer>(t => t.SubjectVisitId == subjectVisitId);
|
||||||
@@ -689,7 +689,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("{trialId:guid}")]
|
[HttpPost("{trialId:guid}")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
// [Authorize(Policy = IRaCISPolicy.CRC_IQC)]
|
// [Authorize(Policy = IRaCISPolicy.CRC_IQC)]
|
||||||
public async Task<IResponseOutput> UpdateModality(UpdateModalityCommand updateModalityCommand)
|
public async Task<IResponseOutput> UpdateModality(UpdateModalityCommand updateModalityCommand)
|
||||||
{
|
{
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC)
|
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC)
|
||||||
@@ -701,7 +701,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
{
|
{
|
||||||
if (await _subjectVisitRepository.AnyAsync(t => t.Id == updateModalityCommand.SubjectVisitId && t.SubmitState == SubmitStateEnum.Submitted))
|
if (await _subjectVisitRepository.AnyAsync(t => t.Id == updateModalityCommand.SubjectVisitId && t.SubmitState == SubmitStateEnum.Submitted))
|
||||||
{
|
{
|
||||||
//---提交之后,不允许修改!
|
//---提交之后,不允许修改!
|
||||||
throw new BusinessValidationFailedException(_localizer["QCOperation_NoModifyAfterSubmit"]);
|
throw new BusinessValidationFailedException(_localizer["QCOperation_NoModifyAfterSubmit"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -716,7 +716,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
|
|
||||||
|
|
||||||
study.BodyPartForEdit = updateModalityCommand.BodyPart;
|
study.BodyPartForEdit = updateModalityCommand.BodyPart;
|
||||||
|
|
||||||
study.ModalityForEdit = updateModalityCommand.Modality;
|
study.ModalityForEdit = updateModalityCommand.Modality;
|
||||||
|
|
||||||
await _repository.BatchUpdateAsync<DicomSeries>(t => t.StudyId == studyId, r => new DicomSeries() { BodyPartForEdit = updateModalityCommand.BodyPart });
|
await _repository.BatchUpdateAsync<DicomSeries>(t => t.StudyId == studyId, r => new DicomSeries() { BodyPartForEdit = updateModalityCommand.BodyPart });
|
||||||
@@ -770,7 +770,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
[HttpPost, Route("{trialId:guid}/{subjectVisitId:guid}")]
|
[HttpPost, Route("{trialId:guid}/{subjectVisitId:guid}")]
|
||||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
[UnitOfWork]
|
[UnitOfWork]
|
||||||
// [Authorize(Policy = IRaCISPolicy.CRC_IQC)]
|
// [Authorize(Policy = IRaCISPolicy.CRC_IQC)]
|
||||||
public async Task<IResponseOutput> DeleteStudyList(Guid[] ids, Guid subjectVisitId, Guid trialId)
|
public async Task<IResponseOutput> DeleteStudyList(Guid[] ids, Guid subjectVisitId, Guid trialId)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -791,7 +791,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
|
|
||||||
await _dicomStudyRepository.DeleteAsync(study);
|
await _dicomStudyRepository.DeleteAsync(study);
|
||||||
|
|
||||||
|
|
||||||
var succeess2 = await _repository.BatchDeleteAsync<DicomInstance>(t => t.StudyId == id);
|
var succeess2 = await _repository.BatchDeleteAsync<DicomInstance>(t => t.StudyId == id);
|
||||||
var success3 = await _dicomSeriesrepository.BatchDeleteNoTrackingAsync(t => t.StudyId == id);
|
var success3 = await _dicomSeriesrepository.BatchDeleteNoTrackingAsync(t => t.StudyId == id);
|
||||||
|
|
||||||
@@ -814,7 +814,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
await _subjectVisitRepository.SaveChangesAsync();
|
await _subjectVisitRepository.SaveChangesAsync();
|
||||||
@@ -878,6 +878,108 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
return ResponseOutput.Result(success);
|
return ResponseOutput.Result(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 领取下一个质控任务
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<GetNextIQCQualityOutDto> CollectNextIQCQuality(GetNextIQCQualityInDto inDto)
|
||||||
|
{
|
||||||
|
var nextIQCQuality = await this.GetNextIQCQuality(inDto);
|
||||||
|
|
||||||
|
if (nextIQCQuality.VisitId != null)
|
||||||
|
{
|
||||||
|
var visit = await _subjectVisitRepository.Where(x => x.Id == nextIQCQuality.VisitId).FirstOrDefaultAsync();
|
||||||
|
if (!visit.IsTake)
|
||||||
|
{
|
||||||
|
await ObtainOrCancelQCTask(inDto.TrialId, nextIQCQuality.VisitId.Value, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return nextIQCQuality;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取下一个质控任务
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<GetNextIQCQualityOutDto> GetNextIQCQuality(GetNextIQCQualityInDto inDto)
|
||||||
|
{
|
||||||
|
var trialConfig = await _trialRepository
|
||||||
|
.Select(t => new { TrialId = t.Id, t.QCProcessEnum, t.IsImageConsistencyVerification })
|
||||||
|
.FirstOrDefaultAsync(t => t.TrialId == inDto.TrialId)
|
||||||
|
.IfNullThrowException();
|
||||||
|
|
||||||
|
SubjectVisit? subjectVisit = null;
|
||||||
|
List<SubjectVisit>? visitList = null;
|
||||||
|
switch (trialConfig.QCProcessEnum)
|
||||||
|
{
|
||||||
|
case TrialQCProcess.NotAudit:
|
||||||
|
return new GetNextIQCQualityOutDto() { };
|
||||||
|
break;
|
||||||
|
case TrialQCProcess.SingleAudit:
|
||||||
|
visitList = await _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId && (x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed &&!x.IsTake))).Include(x=>x.Subject).ToListAsync();
|
||||||
|
|
||||||
|
subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId).OrderBy(x=>x.VisitNum).FirstOrDefault();
|
||||||
|
if(subjectVisit!=null)
|
||||||
|
{
|
||||||
|
return new GetNextIQCQualityOutDto() {
|
||||||
|
SubjectId= subjectVisit.SubjectId,
|
||||||
|
VisitId= subjectVisit.Id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
subjectVisit= visitList.OrderBy(x => x.Subject.Code).ThenBy(x=>x.VisitNum).FirstOrDefault();
|
||||||
|
if (subjectVisit != null)
|
||||||
|
{
|
||||||
|
return new GetNextIQCQualityOutDto()
|
||||||
|
{
|
||||||
|
SubjectId = subjectVisit.SubjectId,
|
||||||
|
VisitId = subjectVisit.Id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new GetNextIQCQualityOutDto() { };
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TrialQCProcess.DoubleAudit:
|
||||||
|
|
||||||
|
visitList = await _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId && (x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.QCPassed))).Include(x => x.Subject).ToListAsync();
|
||||||
|
if (subjectVisit != null)
|
||||||
|
{
|
||||||
|
return new GetNextIQCQualityOutDto()
|
||||||
|
{
|
||||||
|
SubjectId = subjectVisit.SubjectId,
|
||||||
|
VisitId = subjectVisit.Id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
subjectVisit = visitList.OrderBy(x => x.Subject.Code).ThenBy(x => x.VisitNum).FirstOrDefault();
|
||||||
|
if (subjectVisit != null)
|
||||||
|
{
|
||||||
|
return new GetNextIQCQualityOutDto()
|
||||||
|
{
|
||||||
|
SubjectId = subjectVisit.SubjectId,
|
||||||
|
VisitId = subjectVisit.Id
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new GetNextIQCQualityOutDto() { };
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return new GetNextIQCQualityOutDto() { };
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 手动领取 或者取消 QC任务
|
/// 手动领取 或者取消 QC任务
|
||||||
@@ -1167,8 +1269,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
}
|
}
|
||||||
|
|
||||||
//基线 且配置了临床数据
|
//基线 且配置了临床数据
|
||||||
if (trialConfig.ClinicalInformationTransmissionEnum != 0 /*&& dbSubjectVisit.IsBaseLine*//*&&dbSubjectVisit.ClinicalDataSignUserId==null*/)
|
//if (trialConfig.ClinicalInformationTransmissionEnum != 0 /*&& dbSubjectVisit.IsBaseLine*//*&&dbSubjectVisit.ClinicalDataSignUserId==null*/)
|
||||||
{
|
//{
|
||||||
|
|
||||||
|
|
||||||
////找到需要确认的PDF 临床数据 如果没有CRC 没有上传 那么就添加一条没有文件的记录
|
////找到需要确认的PDF 临床数据 如果没有CRC 没有上传 那么就添加一条没有文件的记录
|
||||||
@@ -1204,7 +1306,12 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
|
|
||||||
// CRC 上传的基线数据签名
|
// CRC 上传的基线数据签名
|
||||||
|
|
||||||
await _readingClinicalDataRepository.UpdatePartialFromQueryAsync(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == dbSubjectVisit.Id && x.IsSign==false, x => new ReadingClinicalData()
|
await _readingClinicalDataRepository.UpdatePartialFromQueryAsync(x =>
|
||||||
|
|
||||||
|
(x.ClinicalDataTrialSet.ClinicalDataLevel== ClinicalLevel.Subject|| x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit)&&
|
||||||
|
|
||||||
|
|
||||||
|
x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == dbSubjectVisit.Id && x.IsSign==false, x => new ReadingClinicalData()
|
||||||
{
|
{
|
||||||
IsSign = true,
|
IsSign = true,
|
||||||
ReadingClinicalDataState = ReadingClinicalDataStatus.HaveSigned
|
ReadingClinicalDataState = ReadingClinicalDataStatus.HaveSigned
|
||||||
@@ -1226,7 +1333,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||||||
//}
|
//}
|
||||||
|
|
||||||
//return ResponseOutput.NotOk("没有签名临床数据,不允许提交");
|
//return ResponseOutput.NotOk("没有签名临床数据,不允许提交");
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,18 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
this._qCQuestionRepository = qCQuestionRepository;
|
this._qCQuestionRepository = qCQuestionRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 清空Qc问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> EmptyQCQuestion(EmptyQCQuestionInDto inDto)
|
||||||
|
{
|
||||||
|
await _trialQcQuestionRepository.DeleteFromQueryAsync(x => x.TrialId == inDto.TrialId);
|
||||||
|
await _trialQcQuestionRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Result(true);
|
||||||
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(List<TrialQCQuestionConfigureView>, object)> GetTrialQCQuestionConfigureList(TrialQCQuestionQuery queryTrialQCQuestionConfigure)
|
public async Task<(List<TrialQCQuestionConfigureView>, object)> GetTrialQCQuestionConfigureList(TrialQCQuestionQuery queryTrialQCQuestionConfigure)
|
||||||
|
|||||||
@@ -367,9 +367,10 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(s => s.CurrentActionUser.UserName))
|
.ForMember(d => d.CurrentActionUserName, u => u.MapFrom(s => s.CurrentActionUser.UserName))
|
||||||
.ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.PreliminaryAuditUser.UserName))
|
.ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.PreliminaryAuditUser.UserName))
|
||||||
.ForMember(d => d.ReviewAuditUserName, u => u.MapFrom(s => s.ReviewAuditUser.UserName))
|
.ForMember(d => d.ReviewAuditUserName, u => u.MapFrom(s => s.ReviewAuditUser.UserName))
|
||||||
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
||||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count() > 0)
|
|| t.Subject.ClinicalFormList.Any(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == t.Id)
|
||||||
|| t.PreviousSurgeryList.Any() : false))
|
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count() > 0)
|
||||||
|
|| t.PreviousSurgeryList.Any()))
|
||||||
.ForMember(d => d.DicomStudyCount, u => u.MapFrom(t => t.StudyList.Count()))
|
.ForMember(d => d.DicomStudyCount, u => u.MapFrom(t => t.StudyList.Count()))
|
||||||
.ForMember(d => d.NoneDicomStudyCount, u => u.MapFrom(t => t.NoneDicomStudyList.Count(t => t.NoneDicomFileList.Any())));
|
.ForMember(d => d.NoneDicomStudyCount, u => u.MapFrom(t => t.NoneDicomStudyList.Count(t => t.NoneDicomFileList.Any())));
|
||||||
|
|
||||||
@@ -385,9 +386,10 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
.ForMember(d => d.MedicalNo, u => u.MapFrom(s => s.Subject.MedicalNo))
|
.ForMember(d => d.MedicalNo, u => u.MapFrom(s => s.Subject.MedicalNo))
|
||||||
.ForMember(d => d.Sex, u => u.MapFrom(s => s.Subject.Sex))
|
.ForMember(d => d.Sex, u => u.MapFrom(s => s.Subject.Sex))
|
||||||
.ForMember(d => d.Age, u => u.MapFrom(t => t.Subject.Age))
|
.ForMember(d => d.Age, u => u.MapFrom(t => t.Subject.Age))
|
||||||
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
||||||
|
|| t.Subject.ClinicalFormList.Any(x=>x.ClinicalDataTrialSet.UploadRole==UploadRole.CRC&& x.ReadingId==t.Id)
|
||||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count() > 0)
|
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count() > 0)
|
||||||
|| t.PreviousSurgeryList.Any() : false))
|
|| t.PreviousSurgeryList.Any()))
|
||||||
|
|
||||||
//.ForMember(d => d.VisitName, u => u.MapFrom(t =>t.InPlan? t.VisitStage.VisitName : t.VisitName))
|
//.ForMember(d => d.VisitName, u => u.MapFrom(t =>t.InPlan? t.VisitStage.VisitName : t.VisitName))
|
||||||
//.ForMember(d => d.VisitNum, u => u.MapFrom(t => t.InPlan ? t.VisitStage.VisitNum : t.VisitNum))
|
//.ForMember(d => d.VisitNum, u => u.MapFrom(t => t.InPlan ? t.VisitStage.VisitNum : t.VisitNum))
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ using MassTransit;
|
|||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Domain.Models;
|
using IRaCIS.Core.Domain.Models;
|
||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
|
using IRaCIS.Core.Application.Service.Reading.Interface;
|
||||||
|
using IRaCIS.Core.Application.Contracts;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
@@ -21,8 +23,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// 临床答案
|
/// 临床答案
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiExplorerSettings(GroupName = "Reading")]
|
[ApiExplorerSettings(GroupName = "Reading")]
|
||||||
public class ClinicalAnswerService : BaseService
|
public class ClinicalAnswerService : BaseService, IClinicalAnswerService
|
||||||
{
|
{
|
||||||
|
|
||||||
private readonly IRepository<TrialClinicalQuestion> _trialClinicalQuestionRepository;
|
private readonly IRepository<TrialClinicalQuestion> _trialClinicalQuestionRepository;
|
||||||
|
|
||||||
@@ -50,6 +52,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
private readonly IClinicalQuestionService _iClinicalQuestionService;
|
private readonly IClinicalQuestionService _iClinicalQuestionService;
|
||||||
|
|
||||||
|
private readonly IReadingClinicalDataService _iReadingClinicalDataService;
|
||||||
|
|
||||||
|
|
||||||
public ClinicalAnswerService(IRepository<TrialClinicalQuestion> trialClinicalQuestionRepository,
|
public ClinicalAnswerService(IRepository<TrialClinicalQuestion> trialClinicalQuestionRepository,
|
||||||
IRepository<SystemClinicalTableQuestion> systemClinicalTableQuestionRepository,
|
IRepository<SystemClinicalTableQuestion> systemClinicalTableQuestionRepository,
|
||||||
@@ -57,7 +61,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
||||||
IRepository<ClinicalForm> clinicalFormRepository,
|
IRepository<ClinicalForm> clinicalFormRepository,
|
||||||
IRepository<Subject> subjectRepository,
|
IRepository<Subject> subjectRepository,
|
||||||
IRepository<ReadModuleCriterionFrom> readModuleCriterionFromRepository,
|
IReadingClinicalDataService iReadingClinicalDataService,
|
||||||
|
IRepository<ReadModuleCriterionFrom> readModuleCriterionFromRepository,
|
||||||
IRepository<ReadModule> readModuleRepository,
|
IRepository<ReadModule> readModuleRepository,
|
||||||
IRepository<SubjectVisit> subjectVisitRepository,
|
IRepository<SubjectVisit> subjectVisitRepository,
|
||||||
IRepository<ClinicalTableAnswer> clinicalTableAnswerRepository,
|
IRepository<ClinicalTableAnswer> clinicalTableAnswerRepository,
|
||||||
@@ -77,8 +82,8 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
_trialClinicalTableQuestionRepository = trialClinicalTableQuestionRepository;
|
_trialClinicalTableQuestionRepository = trialClinicalTableQuestionRepository;
|
||||||
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
|
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
|
||||||
_clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
|
_clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
|
||||||
|
_iReadingClinicalDataService = iReadingClinicalDataService;
|
||||||
_clinicalFormRepository = clinicalFormRepository;
|
_clinicalFormRepository = clinicalFormRepository;
|
||||||
this._subjectRepository = subjectRepository;
|
this._subjectRepository = subjectRepository;
|
||||||
this._readModuleCriterionFromRepository = readModuleCriterionFromRepository;
|
this._readModuleCriterionFromRepository = readModuleCriterionFromRepository;
|
||||||
this._readModuleRepository = readModuleRepository;
|
this._readModuleRepository = readModuleRepository;
|
||||||
@@ -86,6 +91,25 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
_iClinicalQuestionService = iClinicalQuestionService;
|
_iClinicalQuestionService = iClinicalQuestionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC签名临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> CRCSignClinicalData(CRCSignClinicalDataInDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
await _readingClinicalDataRepository.UpdatePartialFromQueryAsync(x =>x.Id==inDto.ReadingClinicalDataId, x => new ReadingClinicalData()
|
||||||
|
{
|
||||||
|
IsSign = true,
|
||||||
|
ReadingClinicalDataState = ReadingClinicalDataStatus.HaveSigned
|
||||||
|
});
|
||||||
|
|
||||||
|
await _readingClinicalDataRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Ok(true);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自动添加CRC临床数据
|
/// 自动添加CRC临床数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -106,7 +130,16 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
x.IsBaseLine,
|
x.IsBaseLine,
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
var clinicalDataList =await _readingClinicalDataRepository.Where(x =>x.TrialId==inDto.TrialId&&x.ClinicalDataTrialSet.UploadRole== UploadRole.CRC).IgnoreAutoIncludes().ToListAsync();
|
var clinicalDataList =await _readingClinicalDataRepository
|
||||||
|
.WhereIf(inDto.SubjectId != null, x => x.SubjectId == inDto.SubjectId)
|
||||||
|
.Where(x =>x.TrialId==inDto.TrialId&&x.ClinicalDataTrialSet.UploadRole== UploadRole.CRC)
|
||||||
|
.Select(x=>new
|
||||||
|
{
|
||||||
|
ClinicalDataTrialSetId=x.ClinicalDataTrialSetId,
|
||||||
|
SubjectId=x.SubjectId,
|
||||||
|
x.ReadingId,
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
List<ReadingClinicalData> readingClinicalDatas = new List<ReadingClinicalData>();
|
List<ReadingClinicalData> readingClinicalDatas = new List<ReadingClinicalData>();
|
||||||
|
|
||||||
@@ -162,12 +195,12 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}).ToList());
|
}).ToList());
|
||||||
});
|
});
|
||||||
|
|
||||||
await _readingClinicalDataRepository.AddRangeAsync(readingClinicalDatas);
|
|
||||||
|
await _readingClinicalDataRepository.AddRangeAsync(readingClinicalDatas);
|
||||||
await _readingClinicalDataRepository.SaveChangesAsync();
|
await _readingClinicalDataRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取CRC受试者临床数据
|
/// 获取CRC受试者临床数据
|
||||||
@@ -175,16 +208,13 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetCRCSubjectClinicalOutDto>> GetCRCSubjectClinicalList(GetCRCSubjectClinicalInDto inDto)
|
public async Task<PageOutput<GetCRCSubjectClinicalOutDto>> GetCRCSubjectClinicalList(GetCRCSubjectClinicalInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
await AutoAddCRCClinical(new AutoAddClinicalInDto()
|
//await AutoAddCRCClinical(new AutoAddClinicalInDto()
|
||||||
{
|
//{
|
||||||
|
// TrialId = inDto.TrialId
|
||||||
TrialId = inDto.TrialId
|
//}) ;
|
||||||
}) ;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var subjects = await _subjectRepository.Where(x => x.TrialId == inDto.TrialId).Select(x => new GetCRCSubjectClinicalResultDto()
|
var subjects = await _subjectRepository.Where(x => x.TrialId == inDto.TrialId).Select(x => new GetCRCSubjectClinicalResultDto()
|
||||||
{
|
{
|
||||||
@@ -193,33 +223,38 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
var clinicalData=await _readingClinicalDataRepository.Where(x=>x.TrialId == inDto.TrialId&&x.ClinicalDataTrialSet.UploadRole==UploadRole.CRC&&x.ClinicalDataTrialSet.ClinicalDataLevel!= ClinicalLevel.SubjectVisit)
|
var clinicalData= _readingClinicalDataRepository.Where(x=>x.TrialId == inDto.TrialId&&x.ClinicalDataTrialSet.UploadRole==UploadRole.CRC&&x.ClinicalDataTrialSet.ClinicalDataLevel!= ClinicalLevel.SubjectVisit)
|
||||||
.Where(x=>!x.IsSign)
|
.Where(x=>!x.IsSign)
|
||||||
|
.WhereIf(inDto.SubjectId!=null,x=>x.SubjectId==inDto.SubjectId)
|
||||||
|
.WhereIf(inDto.SubjectCode != null, x => x.Subject.Code.Contains(inDto.SubjectCode??string.Empty))
|
||||||
|
.Where(x=> x.ClinicalDataTrialSet.ClinicalDataLevel != ClinicalLevel.Subject)
|
||||||
.Include(x=>x.ClinicalDataTrialSet).Select(x=>new GetCRCSubjectClinicalOutDto() {
|
.Include(x=>x.ClinicalDataTrialSet).Select(x=>new GetCRCSubjectClinicalOutDto() {
|
||||||
SubjectId=x.SubjectId,
|
SubjectId=x.SubjectId,
|
||||||
SubjectCode=x.Subject.Code,
|
SubjectCode=x.Subject.Code,
|
||||||
TrialId=inDto.TrialId,
|
TrialId=inDto.TrialId,
|
||||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
|
ReadingId= x.ReadingId,
|
||||||
|
ReadingClinicalDataId=x.Id,
|
||||||
|
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
||||||
|
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||||
|
ClinicalUploadType= x.ClinicalDataTrialSet.ClinicalUploadType,
|
||||||
|
BaseLineVisitId= x.Subject.SubjectVisitList.Where(x=>x.IsBaseLine).Select(x=>x.Id).FirstOrDefault(),
|
||||||
|
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
|
||||||
ClinicalDataSetEnName= x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
ClinicalDataSetEnName= x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||||
}).OrderBy(x=>x.SubjectCode).ToListAsync();
|
});
|
||||||
|
|
||||||
// 一次查询报错 分两次写
|
var pageList = await clinicalData.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, string.IsNullOrWhiteSpace(inDto.SortField) ? nameof(GetCRCSubjectClinicalOutDto.SubjectCode) : inDto.SortField, inDto.Asc);
|
||||||
clinicalData.ForEach(x =>
|
// 一次查询报错 分两次写
|
||||||
|
pageList.CurrentPageData.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.ClinicalDataSetEnName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us);
|
x.ClinicalDataSetEnName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var clinicalFormData = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId).ToListAsync();
|
var clinicalFormData = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId).ToListAsync();
|
||||||
clinicalData.ForEach(n =>
|
pageList.CurrentPageData.ForEach(n =>
|
||||||
{
|
{
|
||||||
n.ClinicalCount = clinicalFormData.Where(y => y.ClinicalDataTrialSetId == n.ClinicalDataTrialSetId && y.SubjectId == n.SubjectId).Count();
|
n.ClinicalCount = clinicalFormData.Where(y => y.ClinicalDataTrialSetId == n.ClinicalDataTrialSetId && y.SubjectId == n.SubjectId).Count();
|
||||||
});
|
});
|
||||||
|
return pageList;
|
||||||
|
|
||||||
return clinicalData;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -234,7 +269,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
result.AnswerList = new List<Dictionary<string, string>>();
|
result.AnswerList = new List<Dictionary<string, string>>();
|
||||||
result.QuestionList=await _trialClinicalQuestionRepository.Where(x=>x.TrialClinicalId==inDto.ClinicalDataTrialSetId
|
result.QuestionList=await _trialClinicalQuestionRepository.Where(x=>x.TrialClinicalId==inDto.ClinicalDataTrialSetId
|
||||||
&&x.ClinicalQuestionType!= ReadingQestionType.Group
|
&&x.ClinicalQuestionType!= ReadingQestionType.Group
|
||||||
&& x.ClinicalQuestionType != ReadingQestionType.Table).OrderBy(x=>x.ShowOrder)
|
&& x.ClinicalQuestionType != ReadingQestionType.Table).OrderByDescending(x=>x.IsCheckDate).ThenBy(x=>x.ShowOrder)
|
||||||
.ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
var answers = await _clinicalQuestionAnswerRepository.Where(x => x.SubjectId == inDto.SubjectId && x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
var answers = await _clinicalQuestionAnswerRepository.Where(x => x.SubjectId == inDto.SubjectId && x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
||||||
@@ -251,8 +286,12 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
ClinicalFormIds.ForEach(x =>
|
ClinicalFormIds.ForEach(x =>
|
||||||
{
|
{
|
||||||
var dic = answers.Where(y => y.ClinicalFormId == x).ToDictionary(x => x.QuestionId.ToString(), x => x.Answer);
|
var dic = answers.Where(y => y.ClinicalFormId == x).ToDictionary(x => x.QuestionId.ToString(), x => x.Answer);
|
||||||
dic.Add("clinicalFormId", x.ToString());
|
dic.Add("ClinicalFormId", x.ToString());
|
||||||
result.AnswerList.Add(dic);
|
dic.Add("TrialId", inDto.TrialId.ToString());
|
||||||
|
dic.Add("SubjectId", inDto.SubjectId.ToString());
|
||||||
|
dic.Add("ClinicalDataTrialSetId", inDto.ClinicalDataTrialSetId.ToString());
|
||||||
|
|
||||||
|
result.AnswerList.Add(dic);
|
||||||
|
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
@@ -264,7 +303,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<GetClinicalFormInfoOutDto> GetClinicalFormInfo(GetClinicalFormInfoInDto inDto)
|
public async Task<List<ClinicalQuestionPreviewDto>> GetClinicalFormInfo(GetClinicalFormInfoInDto inDto)
|
||||||
{
|
{
|
||||||
var formInfo = await _clinicalFormRepository.Where(x => x.Id == inDto.ClinicalFormId).FirstNotNullAsync();
|
var formInfo = await _clinicalFormRepository.Where(x => x.Id == inDto.ClinicalFormId).FirstNotNullAsync();
|
||||||
|
|
||||||
@@ -285,10 +324,10 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
||||||
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
var tableQuestions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
var tableQuestions = await _trialClinicalTableQuestionRepository.Where(x => x.TrialClinicalId == formInfo.ClinicalDataTrialSetId)
|
||||||
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
questions.ForEach(x => x.CreateTime = formInfo.CreateTime);
|
||||||
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
|
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
|
||||||
|
|
||||||
result.ForEach(x =>
|
result.ForEach(x =>
|
||||||
@@ -296,11 +335,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
_iClinicalQuestionService.FindChildQuestion(x, questions, tableQuestions, questionAnswer, tableAnswer);
|
_iClinicalQuestionService.FindChildQuestion(x, questions, tableQuestions, questionAnswer, tableAnswer);
|
||||||
});
|
});
|
||||||
|
|
||||||
return new GetClinicalFormInfoOutDto()
|
return result;
|
||||||
{
|
|
||||||
|
|
||||||
Question = result
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -324,8 +359,24 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
TrialId= inDto.TrialId,
|
TrialId= inDto.TrialId,
|
||||||
Id = inDto.ClinicalFormId ?? NewId.NextGuid(),
|
Id = inDto.ClinicalFormId ?? NewId.NextGuid(),
|
||||||
ReadingId = inDto.ReadingId,
|
ReadingId = inDto.ReadingId,
|
||||||
VisitId = inDto.VisitId,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (inDto.ClinicalFormId!=null&&(await _readModuleCriterionFromRepository.AnyAsync(x => x.ClinicalFormId == inDto.ClinicalFormId.Value)))
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_translation"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
var existsClinical = await _clinicalFormRepository.Where(x =>
|
||||||
|
x.SubjectId == inDto.SubjectId
|
||||||
|
&& x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId
|
||||||
|
).WhereIf(inDto.ReadingId != null, x => x.ReadingId == inDto.ReadingId)
|
||||||
|
.Where(x => x.ClinicalDataTrialSet.UploadRole != UploadRole.CRC && !(x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.ImageRead
|
||||||
|
|| x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)).AnyAsync();
|
||||||
|
|
||||||
|
if (existsClinical)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_duplicateData"]);
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var checkDateQuestionId = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.ClinicalDataTrialSetId && x.IsCheckDate).Select(x => x.Id).FirstNotNullAsync();
|
var checkDateQuestionId = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.ClinicalDataTrialSetId && x.IsCheckDate).Select(x => x.Id).FirstNotNullAsync();
|
||||||
@@ -339,9 +390,9 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
if (clinicalForm.CheckDate != null)
|
if (clinicalForm.CheckDate != null)
|
||||||
{
|
{
|
||||||
if (await _readModuleRepository.AnyAsync(x => x.SubjectVisit.LatestScanDate <= clinicalForm.CheckDate && x.IsCRCConfirm))
|
if (await _readModuleRepository.AnyAsync(x =>x.SubjectId== inDto.SubjectId&& x.SubjectVisit.LatestScanDate <= clinicalForm.CheckDate && x.IsCRCConfirm))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("无法添加和修改当前日期的临床数据,因为CRC已经确认!");
|
throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_unableToAddOrUpdate"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -400,7 +451,13 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
await _clinicalAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
|
await _clinicalAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
|
||||||
await _clinicalTableAnswerRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
|
await _clinicalTableAnswerRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
|
||||||
}
|
}
|
||||||
|
//if(inDto.ReadingId!=null)
|
||||||
|
//{
|
||||||
|
// await _readingClinicalDataRepository.UpdatePartialFromQueryAsync(x => x.ReadingId == inDto.ReadingId && x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId, x => new ReadingClinicalData()
|
||||||
|
// {
|
||||||
|
// IsSign = true
|
||||||
|
// });
|
||||||
|
//}
|
||||||
await _clinicalFormRepository.AddAsync(clinicalForm);
|
await _clinicalFormRepository.AddAsync(clinicalForm);
|
||||||
await _clinicalQuestionAnswerRepository.AddRangeAsync(clinicalQuestionAnswers);
|
await _clinicalQuestionAnswerRepository.AddRangeAsync(clinicalQuestionAnswers);
|
||||||
await _clinicalAnswerRowInfoRepository.AddRangeAsync(clinicalAnswerRowInfos);
|
await _clinicalAnswerRowInfoRepository.AddRangeAsync(clinicalAnswerRowInfos);
|
||||||
@@ -409,6 +466,49 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除表单数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> DeleteClinicalForm(DeleteClinicalFormInDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (await _readModuleCriterionFromRepository.AnyAsync(x => x.ClinicalFormId == inDto.ClinicalFormId))
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_unableToDelete"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
await _clinicalFormRepository.BatchDeleteNoTrackingAsync(x => x.Id == inDto.ClinicalFormId);
|
||||||
|
await _clinicalQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
|
||||||
|
await _clinicalAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
|
||||||
|
await _clinicalTableAnswerRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
|
||||||
|
return ResponseOutput.Ok(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取PM待确认列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<PageOutput<GetCRCConfirmListOutDto>> GetPMConfirmList(GetPMConfirmListInDto inDto)
|
||||||
|
{
|
||||||
|
return await GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
|
{
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
IsCRCConfirm = true,
|
||||||
|
IsPMConfirm = false,
|
||||||
|
PageIndex = inDto.PageIndex,
|
||||||
|
PageSize = inDto.PageSize,
|
||||||
|
Asc = inDto.Asc,
|
||||||
|
SortField = inDto.SortField,
|
||||||
|
TrialReadingCriterionId = inDto.TrialReadingCriterionId
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取CRC确认列表
|
/// 获取CRC确认列表
|
||||||
@@ -416,78 +516,282 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
|
public async Task<PageOutput<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
|
||||||
{
|
{
|
||||||
List<GetCRCConfirmListOutDto> result = await _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
if (inDto.ReadModuleId != null)
|
||||||
.Select(x => new GetCRCConfirmListOutDto()
|
{
|
||||||
{
|
var readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
|
||||||
SubjectId= x.SubjectId,
|
inDto.TrialReadingCriterionId = readModule.TrialReadingCriterionId;
|
||||||
IsCRCConfirm = x.IsCRCConfirm,
|
}
|
||||||
LatestScanDate = x.SubjectVisit.LatestScanDate,
|
var query = _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||||
ReadingSetType = x.ReadingSetType,
|
.WhereIf(inDto.ReadModuleId != null, x => x.Id == inDto.ReadModuleId)
|
||||||
IsPMConfirm = x.IsPMConfirm,
|
.WhereIf(inDto.IsCRCConfirm != null, x => x.IsCRCConfirm == inDto.IsCRCConfirm)
|
||||||
ReadModuleId = x.Id,
|
.WhereIf(inDto.IsPMConfirm != null, x => x.IsPMConfirm == inDto.IsPMConfirm)
|
||||||
}).OrderBy(x => x.LatestScanDate).ToListAsync();
|
.WhereIf(inDto.SubjectCode != null, x => x.Subject.Code.Contains(inDto.SubjectCode??string.Empty))
|
||||||
|
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId)
|
||||||
|
.WhereIf(inDto.SubjectId != null, x => x.SubjectId == inDto.SubjectId)
|
||||||
|
.WhereIf(inDto.StartTime != null, x => x.SubjectVisit.LatestScanDate >= inDto.StartTime)
|
||||||
|
.WhereIf(inDto.EndTime != null, x => x.SubjectVisit.LatestScanDate <= inDto.EndTime)
|
||||||
|
.Select(x => new GetCRCConfirmListOutDto()
|
||||||
|
{
|
||||||
|
|
||||||
|
SubjectId = x.SubjectId,
|
||||||
|
IsNotNeedPMConfirm=x.IsNotNeedPMConfirm,
|
||||||
|
IsCRCConfirm = x.IsCRCConfirm,
|
||||||
|
IsCRCApplicationRevoke=x.IsCRCApplicationRevoke,
|
||||||
|
VisitBlindName=x.SubjectVisit.BlindName,
|
||||||
|
LatestScanDate = x.SubjectVisit.LatestScanDate,
|
||||||
|
ReadingSetType = x.ReadingSetType,
|
||||||
|
IsPMConfirm = x.IsPMConfirm,
|
||||||
|
SubjectCode = x.Subject.Code,
|
||||||
|
ReadModuleId = x.Id,
|
||||||
|
ModuleName=x.ModuleName,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var result = await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, new string[2] { "SubjectCode asc", "LatestScanDate asc" });
|
||||||
|
|
||||||
var formList = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId)
|
var formList = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||||
.Where(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
.Where(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||||
|
.WhereIf(inDto.TrialReadingCriterionId!=null, x=>x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(y=>y.TrialReadingCriterionId== inDto.TrialReadingCriterionId))
|
||||||
.Where(x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.ImageRead || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
.Where(x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.ImageRead || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
||||||
.Select(x => new CRCClinicalForm
|
.Include(x=>x.ClinicalDataTrialSet)
|
||||||
|
.Select(x => new CRCClinicalForm
|
||||||
{
|
{
|
||||||
CkeckDate = x.CheckDate,
|
SubjectId=x.SubjectId,
|
||||||
|
CheckDate = x.CheckDate,
|
||||||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||||
ClinicalFormId = x.Id,
|
ClinicalFormId = x.Id,
|
||||||
|
ClinicalDataTrialSetId= x.ClinicalDataTrialSet.Id,
|
||||||
|
ClinicalDataSetName =x.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||||
|
ClinicalDataSetEnName=x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||||
|
IsHaveTableQuestion=x.ClinicalDataTrialSet.TrialClinicalQuestionList.Any(y=>y.ClinicalQuestionType== ReadingQestionType.Table),
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
var confirmList = await _readModuleCriterionFromRepository.Where(x => x.TrialId == inDto.TrialId).ToListAsync();
|
var confirmList = await _readModuleCriterionFromRepository.Where(x => x.TrialId == inDto.TrialId
|
||||||
result.ForEach(x =>
|
&&x.ClinicalForm.ClinicalDataTrialSet.UploadRole== UploadRole.CRC
|
||||||
|
&&(x.ClinicalForm.ClinicalDataTrialSet.ClinicalDataLevel==ClinicalLevel.ImageRead|| x.ClinicalForm.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead))
|
||||||
|
.Select(x => new GetCRCBeConfirm
|
||||||
|
{
|
||||||
|
CheckDate = x.ClinicalForm.CheckDate ?? default(DateTime),
|
||||||
|
ClinicalDataSetName = x.ClinicalForm.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||||
|
ClinicalDataSetEnName = x.ClinicalForm.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||||
|
ClinicalFormId = x.ClinicalFormId,
|
||||||
|
ClinicalDataTrialSetId = x.ClinicalForm.ClinicalDataTrialSet.Id,
|
||||||
|
ReadModuleId=x.ReadModuleId,
|
||||||
|
IsHaveTableQuestion=x.ClinicalForm.ClinicalDataTrialSet.TrialClinicalQuestionList.Any(y => y.ClinicalQuestionType == ReadingQestionType.Table)
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
result.CurrentPageData.ForEach(x =>
|
||||||
{
|
{
|
||||||
if (x.IsCRCConfirm)
|
if (x.IsCRCConfirm)
|
||||||
{
|
{
|
||||||
x.ClinicalFormIdList = confirmList.Where(y => y.ReadModuleId == x.ReadModuleId).Select(y=>y.ClinicalFormId).ToList();
|
x.ClinicalFormList = confirmList.Where(y => y.ReadModuleId == x.ReadModuleId).Select(y=>new GetCRCBeConfirmListOutDto() {
|
||||||
|
CheckDate = y.CheckDate,
|
||||||
|
ClinicalDataSetName= y.ClinicalDataSetName.LanguageName(y.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||||
|
ClinicalDataSetEnName= y.ClinicalDataSetEnName,
|
||||||
|
ClinicalFormId=y.ClinicalFormId,
|
||||||
|
ClinicalDataTrialSetId=y.ClinicalDataTrialSetId,
|
||||||
|
IsHaveTableQuestion=y.IsHaveTableQuestion,
|
||||||
|
}).ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (x.ReadingSetType == ReadingSetType.ImageReading)
|
if (x.ReadingSetType == ReadingSetType.ImageReading)
|
||||||
{
|
{
|
||||||
x.ClinicalFormIdList = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.ImageRead&&y.CkeckDate<=x.LatestScanDate).Select(y => y.ClinicalFormId).ToList();
|
x.ClinicalFormList = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.ImageRead&&y.CheckDate <= x.LatestScanDate&&y.SubjectId==x.SubjectId)
|
||||||
|
|
||||||
|
.Select(y => new GetCRCBeConfirmListOutDto()
|
||||||
|
{
|
||||||
|
CheckDate = y.CheckDate ?? default(DateTime),
|
||||||
|
ClinicalDataSetName = y.ClinicalDataSetName.LanguageName(y.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||||
|
ClinicalDataSetEnName = y.ClinicalDataSetEnName,
|
||||||
|
ClinicalFormId = y.ClinicalFormId,
|
||||||
|
ClinicalDataTrialSetId = y.ClinicalDataTrialSetId,
|
||||||
|
IsHaveTableQuestion = y.IsHaveTableQuestion,
|
||||||
|
}).ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
x.ClinicalFormIdList = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.OncologyRead&&y.CkeckDate <= x.LatestScanDate).Select(y => y.ClinicalFormId).ToList();
|
x.ClinicalFormList = formList.Where(y => y.ClinicalDataLevel == ClinicalLevel.OncologyRead&&y.CheckDate <= x.LatestScanDate && y.SubjectId == x.SubjectId)
|
||||||
|
.Select(y => new GetCRCBeConfirmListOutDto()
|
||||||
|
{
|
||||||
|
CheckDate = y.CheckDate ?? default(DateTime),
|
||||||
|
ClinicalDataSetName = y.ClinicalDataSetName.LanguageName(y.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||||
|
ClinicalDataSetEnName = y.ClinicalDataSetEnName,
|
||||||
|
ClinicalFormId = y.ClinicalFormId,
|
||||||
|
ClinicalDataTrialSetId = y.ClinicalDataTrialSetId,
|
||||||
|
IsHaveTableQuestion = y.IsHaveTableQuestion,
|
||||||
|
}).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// CRC 确认临床数据
|
/// 获取CRC待确认列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> CRCConfirmClinical(CRCConfirmClinicalInDto inDto)
|
public async Task<List<GetCRCBeConfirmListOutDto>> GetCRCBeConfirmList(GetCRCBeConfirmListInDto inDto)
|
||||||
{
|
{
|
||||||
var dataList =await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
var result = (await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
{
|
{
|
||||||
TrialId = inDto.TrialId
|
ReadModuleId = inDto.ReadModuleId,
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
PageIndex=1,
|
||||||
|
PageSize=9999,
|
||||||
|
|
||||||
|
})).CurrentPageData.SelectMany(x => x.ClinicalFormList).ToList();
|
||||||
|
return result.OrderBy(x => x.ClinicalDataSetName).ThenBy(x => x.CheckDate).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取临床数据表格信息 查看没有表格问题的列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<(List<GetClinicalTableListOutDto>,object)> GetClinicalTableList(GetClinicalTableListInDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
var readModule=await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var confirmList = (await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
|
{
|
||||||
|
ReadModuleId = inDto.ReadModuleId,
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
PageIndex = 1,
|
||||||
|
PageSize = 9999,
|
||||||
|
|
||||||
|
})).CurrentPageData.SelectMany(x => x.ClinicalFormList).ToList();
|
||||||
|
|
||||||
|
var clinicalDataTrialSetIds = confirmList.Select(x => x.ClinicalDataTrialSetId).Distinct().ToList();
|
||||||
|
var clinicalFormIds = confirmList.Select(x => x.ClinicalFormId).ToList();
|
||||||
|
|
||||||
|
var questionList = await _trialClinicalQuestionRepository.Where(x => clinicalDataTrialSetIds.Contains( x.TrialClinicalId)
|
||||||
|
&& x.ClinicalQuestionType != ReadingQestionType.Group
|
||||||
|
&& x.ClinicalQuestionType != ReadingQestionType.Table).OrderBy(x=>x.TrialClinicalId).ThenBy(x => x.ShowOrder)
|
||||||
|
.ProjectTo<TrialClinicalQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
var answers = await _clinicalQuestionAnswerRepository.Where(x => clinicalFormIds.Contains(x.ClinicalFormId))
|
||||||
|
.Select(x => new
|
||||||
|
{
|
||||||
|
x.ClinicalDataTrialSetId,
|
||||||
|
x.ClinicalFormId,
|
||||||
|
x.ClinicalForm.CheckDate,
|
||||||
|
x.QuestionId,
|
||||||
|
x.Answer
|
||||||
|
})
|
||||||
|
.ToListAsync();
|
||||||
|
List<GetClinicalTableListOutDto> result = new List<GetClinicalTableListOutDto>();
|
||||||
|
clinicalDataTrialSetIds.ForEach(x => {
|
||||||
|
GetClinicalTableListOutDto dto = new GetClinicalTableListOutDto();
|
||||||
|
dto.ModuleName = readModule.ModuleName;
|
||||||
|
dto.ClinicalDataSetName = confirmList.Where(y => y.ClinicalDataTrialSetId == x).Select(y => y.ClinicalDataSetName).First();
|
||||||
|
dto.QuestionList = questionList.Where(y => y.TrialClinicalId == x).OrderBy(y => y.ShowOrder).ToList();
|
||||||
|
dto.AnswerList = new List<Dictionary<string, string>>();
|
||||||
|
var ClinicalFormIds= answers.Where(y => y.ClinicalDataTrialSetId == x).OrderBy(x => x.CheckDate).Select(x => x.ClinicalFormId).Distinct().ToList();
|
||||||
|
ClinicalFormIds.ForEach(z =>
|
||||||
|
{
|
||||||
|
var dic = answers.Where(y => y.ClinicalFormId == z).OrderBy(y => y.CheckDate).ToDictionary(x => x.QuestionId.ToString(), x => x.Answer);
|
||||||
|
dic.Add("ClinicalFormId", z.ToString());
|
||||||
|
dic.Add("TrialId", inDto.TrialId.ToString());
|
||||||
|
dic.Add("SubjectId", readModule.SubjectId.ToString());
|
||||||
|
dic.Add("ClinicalDataTrialSetId", x.ToString());
|
||||||
|
|
||||||
|
dto.AnswerList.Add(dic);
|
||||||
|
|
||||||
|
});
|
||||||
|
result.Add(dto);
|
||||||
|
});
|
||||||
|
return (result, new
|
||||||
|
{
|
||||||
|
readModule.ModuleName,
|
||||||
});
|
});
|
||||||
|
|
||||||
var presentData = dataList.Where(x => x.ReadModuleId == inDto.ReadModuleId).First();
|
}
|
||||||
var confirmlist= dataList.Where(x =>(x.LatestScanDate < presentData.LatestScanDate && x.ReadingSetType == presentData.ReadingSetType)
|
|
||||||
|| x.ReadModuleId == presentData.ReadModuleId).Where(x => !x.IsCRCConfirm).ToList();
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取临床数据表格信息 查看有表格问题的列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<(List<GetClinicalDateListOutDto>,object)> GetClinicalDateList(GetCRCBeConfirmListInDto inDto)
|
||||||
|
{
|
||||||
|
var readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
|
||||||
|
var confirmList = (await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
|
{
|
||||||
|
ReadModuleId = inDto.ReadModuleId,
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
PageIndex = 1,
|
||||||
|
PageSize = 9999,
|
||||||
|
|
||||||
|
})).CurrentPageData.SelectMany(x => x.ClinicalFormList).ToList();
|
||||||
|
|
||||||
|
var clinicalDataTrialSetIds = confirmList.Select(x => x.ClinicalDataTrialSetId).Distinct().ToList();
|
||||||
|
|
||||||
|
List<GetClinicalDateListOutDto> result = new List<GetClinicalDateListOutDto>();
|
||||||
|
|
||||||
|
clinicalDataTrialSetIds.ForEach(x =>
|
||||||
|
{
|
||||||
|
|
||||||
|
result.Add(new GetClinicalDateListOutDto()
|
||||||
|
{
|
||||||
|
ClinicalDataSetName = confirmList.Where(y => y.ClinicalDataTrialSetId == x).Select(y => y.ClinicalDataSetName).First(),
|
||||||
|
DateList = confirmList.Where(y => y.ClinicalDataTrialSetId == x).ToList()
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
return (result,new {
|
||||||
|
readModule.ModuleName,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC 确认临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> CRCConfirmClinical(CRCConfirmClinicalInDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
var readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var confirmlist = (await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
|
{
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
SubjectId= readModule.SubjectId,
|
||||||
|
IsCRCConfirm=false,
|
||||||
|
TrialReadingCriterionId = readModule.TrialReadingCriterionId,
|
||||||
|
//ReadModuleId = inDto.ReadModuleId,
|
||||||
|
PageIndex =1,
|
||||||
|
PageSize=9999,
|
||||||
|
})).CurrentPageData.ToList();
|
||||||
|
|
||||||
|
var presentData = confirmlist.Where(x => x.ReadModuleId == inDto.ReadModuleId).First();
|
||||||
|
|
||||||
|
confirmlist = confirmlist.Where(x => x.LatestScanDate <= presentData.LatestScanDate).ToList();
|
||||||
|
|
||||||
|
await _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== inDto.ReadModuleId);
|
||||||
List<ReadModuleCriterionFrom> needAddList = new List<ReadModuleCriterionFrom>()
|
List<ReadModuleCriterionFrom> needAddList = new List<ReadModuleCriterionFrom>()
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
confirmlist.ForEach(x =>
|
confirmlist.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.ClinicalFormIdList.ForEach(y =>
|
x.ClinicalFormList.ForEach(y =>
|
||||||
{
|
{
|
||||||
needAddList.Add(new ReadModuleCriterionFrom()
|
needAddList.Add(new ReadModuleCriterionFrom()
|
||||||
{
|
{
|
||||||
ClinicalFormId = y,
|
ClinicalFormId = y.ClinicalFormId,
|
||||||
ReadModuleId = x.ReadModuleId,
|
ReadModuleId = x.ReadModuleId,
|
||||||
SubjectId = x.SubjectId,
|
SubjectId = x.SubjectId,
|
||||||
TrialId = inDto.TrialId,
|
TrialId = inDto.TrialId,
|
||||||
@@ -495,16 +799,21 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var readModuleIds = confirmlist.Select(x => x.ReadModuleId).ToList();
|
foreach (var item in confirmlist)
|
||||||
|
{
|
||||||
|
await _readModuleRepository.UpdatePartialFromQueryAsync(x =>x.Id==item.ReadModuleId , x => new ReadModule()
|
||||||
|
{
|
||||||
|
IsCRCConfirm = true,
|
||||||
|
IsPMConfirm=item.ClinicalFormList.Count()==0?true:false,
|
||||||
|
IsNotNeedPMConfirm= item.ClinicalFormList.Count() == 0 ? true : false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
await _readModuleRepository.UpdatePartialFromQueryAsync(x => readModuleIds.Contains(x.Id),x=>new ReadModule() {
|
|
||||||
IsCRCConfirm=true
|
|
||||||
});
|
|
||||||
await _readModuleCriterionFromRepository.AddRangeAsync(needAddList);
|
await _readModuleCriterionFromRepository.AddRangeAsync(needAddList);
|
||||||
|
|
||||||
await _readModuleCriterionFromRepository.SaveChangesAsync();
|
await _readModuleCriterionFromRepository.SaveChangesAsync();
|
||||||
|
await _iReadingClinicalDataService.DealVisiTaskClinicalDataSignedAsync(inDto.TrialId, inDto.SubjectId, inDto.ReadModuleId, false, readModule.TrialReadingCriterionId);
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -515,34 +824,51 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> CRCCancelConfirmClinical(CRCCancelConfirmClinicalInDto inDto)
|
public async Task<IResponseOutput> CRCCancelConfirmClinical(CRCCancelConfirmClinicalInDto inDto)
|
||||||
{
|
{
|
||||||
var dataList = await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
|
||||||
|
var readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
|
||||||
|
var dataList = (await this.GetCRCConfirmList(new GetCRCConfirmListInDto()
|
||||||
{
|
{
|
||||||
TrialId = inDto.TrialId
|
TrialId = inDto.TrialId,
|
||||||
});
|
SubjectId = readModule.SubjectId,
|
||||||
|
TrialReadingCriterionId = readModule.TrialReadingCriterionId,
|
||||||
|
PageIndex = 1,
|
||||||
|
PageSize = 9999,
|
||||||
|
})).CurrentPageData;
|
||||||
|
|
||||||
var presentData = dataList.Where(x => x.ReadModuleId == inDto.ReadModuleId).First();
|
var presentData = dataList.Where(x => x.ReadModuleId == inDto.ReadModuleId).First();
|
||||||
|
|
||||||
if (dataList.Any(x => x.IsPMConfirm && x.LatestScanDate > presentData.LatestScanDate && x.ReadingSetType == presentData.ReadingSetType))
|
if (dataList.Any(x => x.IsCRCConfirm && x.LatestScanDate > presentData.LatestScanDate && x.ReadingSetType == presentData.ReadingSetType))
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前数据并非最后一条确认信息,无法取消!");
|
throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_unableToCancel"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(presentData.IsPMConfirm)
|
if(presentData.IsPMConfirm)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("PM已确认,无法取消!");
|
throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_unableToCancelPMConfirmed"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (presentData.IsNotNeedPMConfirm)
|
||||||
|
{
|
||||||
|
await _readModuleRepository.UpdatePartialFromQueryAsync(x => presentData.ReadModuleId == x.Id, x => new ReadModule()
|
||||||
|
{
|
||||||
|
IsPMConfirm = false,
|
||||||
|
IsCRCConfirm = false,
|
||||||
|
IsNotNeedPMConfirm = false,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _readModuleRepository.UpdatePartialFromQueryAsync(x => presentData.ReadModuleId == x.Id, x => new ReadModule()
|
||||||
|
{
|
||||||
|
IsCRCApplicationRevoke = true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
await _readModuleRepository.UpdatePartialFromQueryAsync(x => presentData.ReadModuleId==x.Id, x => new ReadModule()
|
//await _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== presentData.ReadModuleId);
|
||||||
{
|
|
||||||
IsCRCConfirm = false
|
|
||||||
});
|
|
||||||
|
|
||||||
await _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== presentData.ReadModuleId);
|
|
||||||
|
|
||||||
await _readModuleCriterionFromRepository.SaveChangesAsync();
|
await _readModuleCriterionFromRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Ok(true);
|
||||||
return ResponseOutput.Ok(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -557,15 +883,46 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var readModuleData = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
|
var readModuleData = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
|
||||||
if (!readModuleData.IsCRCConfirm)
|
if (!readModuleData.IsCRCConfirm)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("CRC还未确认数据,PM无法确认");
|
throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_PMUnableToOperate"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _readModuleRepository.UpdatePartialFromQueryAsync(x => inDto.ReadModuleId == x.Id, x => new ReadModule()
|
if (readModuleData.IsCRCApplicationRevoke && inDto.IsConfirm)
|
||||||
{
|
{
|
||||||
IsPMConfirm = false
|
throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_PMUnableToConfirm"]);
|
||||||
});
|
}
|
||||||
|
|
||||||
await _readModuleRepository.SaveChangesAsync();
|
if (!readModuleData.IsCRCApplicationRevoke && !inDto.IsConfirm)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_PMUnableToWithdraw"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inDto.IsConfirm)
|
||||||
|
{
|
||||||
|
await _readModuleRepository.UpdatePartialFromQueryAsync(x => inDto.ReadModuleId == x.Id, x => new ReadModule()
|
||||||
|
{
|
||||||
|
IsPMConfirm = true,
|
||||||
|
IsClinicalDataBlind=inDto.IsClinicalDataBlind,
|
||||||
|
IsClinicalDataComplete=inDto.IsClinicalDataComplete,
|
||||||
|
});
|
||||||
|
await _readModuleRepository.SaveChangesAsync();
|
||||||
|
await _iReadingClinicalDataService.DealVisiTaskClinicalDataSignedAsync(inDto.TrialId, inDto.SubjectId, inDto.ReadModuleId, false, readModuleData.TrialReadingCriterionId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _readModuleRepository.UpdatePartialFromQueryAsync(x => inDto.ReadModuleId == x.Id, x => new ReadModule()
|
||||||
|
{
|
||||||
|
IsCRCConfirm = false,
|
||||||
|
IsCRCApplicationRevoke=false,
|
||||||
|
});
|
||||||
|
await _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== inDto.ReadModuleId);
|
||||||
|
|
||||||
|
await _readModuleRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,8 +66,11 @@ namespace IRaCIS.Application.Services
|
|||||||
&& x.ClinicalUploadType == ClinicalUploadType.Structuring && x.UploadRole == UploadRole.CRC
|
&& x.ClinicalUploadType == ClinicalUploadType.Structuring && x.UploadRole == UploadRole.CRC
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (_systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId).Count() == 0)
|
||||||
if (_systemClinicalQuestionRepository.Where(x => isNeedVerify&& x.SystemClinicalId == inDto.SystemClinicalId && x.IsCheckDate).Count() != 1)
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ClinicalComment_dataNotConfigured"]);
|
||||||
|
}
|
||||||
|
if (isNeedVerify&&_systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId && x.IsCheckDate).Count() != 1)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ClinicalDataSet_Apply"]);
|
throw new BusinessValidationFailedException(_localizer["ClinicalDataSet_Apply"]);
|
||||||
|
|
||||||
@@ -98,7 +101,12 @@ namespace IRaCIS.Application.Services
|
|||||||
&& x.ClinicalUploadType == ClinicalUploadType.Structuring && x.UploadRole == UploadRole.CRC
|
&& x.ClinicalUploadType == ClinicalUploadType.Structuring && x.UploadRole == UploadRole.CRC
|
||||||
);
|
);
|
||||||
|
|
||||||
if (_trialClinicalQuestionRepository.Where(x => isNeedVerify&& x.TrialClinicalId == inDto.TrialClinicalId && x.IsCheckDate).Count() != 1)
|
if (_trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId).Count() == 0)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ClinicalComment_dataNotConfigured"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isNeedVerify&&_trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId && x.IsCheckDate).Count() != 1)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException(_localizer["ClinicalDataSet_Apply"]);
|
throw new BusinessValidationFailedException(_localizer["ClinicalDataSet_Apply"]);
|
||||||
|
|
||||||
@@ -136,6 +144,8 @@ namespace IRaCIS.Application.Services
|
|||||||
.WhereIf(indto.Id != null, x => x.Id != indto.Id)
|
.WhereIf(indto.Id != null, x => x.Id != indto.Id)
|
||||||
.Where(x => x.ClinicalDataSetName == indto.ClinicalDataSetName||x.ClinicalDataSetEnName==indto.ClinicalDataSetEnName);
|
.Where(x => x.ClinicalDataSetName == indto.ClinicalDataSetName||x.ClinicalDataSetEnName==indto.ClinicalDataSetEnName);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (await existsQuery.AnyAsync())
|
if (await existsQuery.AnyAsync())
|
||||||
{
|
{
|
||||||
//---存在同类型的临床数据,操作失败
|
//---存在同类型的临床数据,操作失败
|
||||||
@@ -219,6 +229,10 @@ namespace IRaCIS.Application.Services
|
|||||||
//---存在同类型的临床数据,操作失败
|
//---存在同类型的临床数据,操作失败
|
||||||
return ResponseOutput.NotOk(_localizer["ClinicalDataSet_DupTypeFail"]);
|
return ResponseOutput.NotOk(_localizer["ClinicalDataSet_DupTypeFail"]);
|
||||||
}
|
}
|
||||||
|
if (indto.Id != null && indto.IsApply == null)
|
||||||
|
{
|
||||||
|
indto.IsApply = await _clinicalDataTrialSetRepository.Where(x => x.Id == indto.Id).Select(x => x.IsApply).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
//indto.CriterionEnumListStr = $"|{String.Join('|', indto.CriterionEnumList)}|";
|
//indto.CriterionEnumListStr = $"|{String.Join('|', indto.CriterionEnumList)}|";
|
||||||
|
|
||||||
|
|||||||
@@ -118,12 +118,12 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
public async Task<(List<ClinicalQuestionPreviewDto>, bool)> GetSystemClinicalQuestionPreview(GetSystemClinicalQuestionPreviewDto inDto)
|
public async Task<(List<ClinicalQuestionPreviewDto>, bool)> GetSystemClinicalQuestionPreview(GetSystemClinicalQuestionPreviewDto inDto)
|
||||||
{
|
{
|
||||||
var questions = await _systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId)
|
var questions = await _systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId)
|
||||||
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
var tableQuestions= await _systemClinicalTableQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId)
|
var tableQuestions= await _systemClinicalTableQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId)
|
||||||
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
questions.ForEach(x => x.CreateTime = null);
|
||||||
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
|
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
|
||||||
|
|
||||||
result.ForEach(x =>
|
result.ForEach(x =>
|
||||||
@@ -144,13 +144,13 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
public async Task<(List<ClinicalQuestionPreviewDto>, bool)> GetTrialClinicalQuestionPreview(GetTrialClinicalQuestionPreviewDto inDto)
|
public async Task<(List<ClinicalQuestionPreviewDto>, bool)> GetTrialClinicalQuestionPreview(GetTrialClinicalQuestionPreviewDto inDto)
|
||||||
{
|
{
|
||||||
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
|
var questions = await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
|
||||||
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<ClinicalQuestionPreviewDto>(_mapper.ConfigurationProvider).OrderBy(x=>x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
var tableQuestions = await _trialClinicalTableQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
|
var tableQuestions = await _trialClinicalTableQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
|
||||||
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<ClinicalTablePreviewDto>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
|
questions.ForEach(x => x.CreateTime = null);
|
||||||
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).ToList();
|
var result = questions.Where(x => x.ClinicalQuestionType == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).ToList();
|
||||||
|
|
||||||
result.ForEach(x =>
|
result.ForEach(x =>
|
||||||
{
|
{
|
||||||
@@ -170,7 +170,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
/// <param name="tableQuestions"></param>
|
/// <param name="tableQuestions"></param>
|
||||||
public void FindChildQuestion(ClinicalQuestionPreviewDto item, List<ClinicalQuestionPreviewDto> questions, List<ClinicalTablePreviewDto> tableQuestions,List<ClinicalFormQuestionAnswer> answers, List<ClinicalFormTableQuestionAnswer> tableAnswers)
|
public void FindChildQuestion(ClinicalQuestionPreviewDto item, List<ClinicalQuestionPreviewDto> questions, List<ClinicalTablePreviewDto> tableQuestions,List<ClinicalFormQuestionAnswer> answers, List<ClinicalFormTableQuestionAnswer> tableAnswers)
|
||||||
{
|
{
|
||||||
item.Childrens = questions.Where(x => (x.ParentId == item.Id)||(x.GroupId== item.Id&&x.ParentId==null)).ToList();
|
item.Childrens = questions.Where(x => (x.ParentId == item.Id)||(x.GroupId== item.Id&&x.ParentId==null)).OrderBy(x => x.ShowOrder).ToList();
|
||||||
|
|
||||||
item.RelationQuestions = questions.Where(x => x.RelevanceId == item.Id).ToList();
|
item.RelationQuestions = questions.Where(x => x.RelevanceId == item.Id).ToList();
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
item.TableQuestions = tableQuestions.Where(x => x.QuestionId == item.Id).OrderBy(x=>x.ShowOrder).ToList();
|
item.TableQuestions = tableQuestions.Where(x => x.QuestionId == item.Id).OrderBy(x=>x.ShowOrder).OrderBy(x => x.ShowOrder).ToList();
|
||||||
|
|
||||||
item.RelationQuestions.ForEach(x => {
|
item.RelationQuestions.ForEach(x => {
|
||||||
this.FindChildQuestion(x, questions, tableQuestions, answers, tableAnswers);
|
this.FindChildQuestion(x, questions, tableQuestions, answers, tableAnswers);
|
||||||
@@ -228,9 +228,24 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AddOrUpdateTrialClinicalQuestion(TrialClinicalQuestionDto inDto)
|
public async Task<IResponseOutput> AddOrUpdateTrialClinicalQuestion(TrialClinicalQuestionDto inDto)
|
||||||
{
|
{
|
||||||
if (await _trialClinicalQuestionRepository.AnyAsync(x =>x.TrialClinicalId==inDto.TrialClinicalId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
|
if (inDto.IsVerify)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"]);
|
if (await _trialClinicalQuestionRepository.AnyAsync(x => x.TrialClinicalId == inDto.TrialClinicalId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"],string.Empty,ApiResponseCodeEnum.NeedTips);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (await _trialClinicalQuestionRepository.AnyAsync(x => x.TrialClinicalId == inDto.TrialClinicalId && x.Id != inDto.Id && x.ShowOrder == inDto.ShowOrder))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("问题序号存在重复!");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (await _trialClinicalQuestionRepository.AnyAsync(x => x.TrialClinicalId == inDto.TrialClinicalId && x.Id != inDto.Id && x.IsCheckDate == inDto.IsCheckDate&&inDto.IsCheckDate))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("已经添加过类型为检查日期的问题!");
|
||||||
}
|
}
|
||||||
|
|
||||||
var entity = await _trialClinicalQuestionRepository.InsertOrUpdateAsync(inDto, true);
|
var entity = await _trialClinicalQuestionRepository.InsertOrUpdateAsync(inDto, true);
|
||||||
@@ -293,6 +308,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
{
|
{
|
||||||
|
|
||||||
var systemClinicalQuestionQueryable = _systemClinicalQuestionRepository
|
var systemClinicalQuestionQueryable = _systemClinicalQuestionRepository
|
||||||
|
.Where(x=>x.SystemClinicalId==inQuery.SystemClinicalId)
|
||||||
.WhereIf(!inQuery.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inQuery.QuestionName) || x.QuestionEnName.Contains(inQuery.QuestionName))
|
.WhereIf(!inQuery.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inQuery.QuestionName) || x.QuestionEnName.Contains(inQuery.QuestionName))
|
||||||
.ProjectTo<SystemClinicalQuestionDto>(_mapper.ConfigurationProvider);
|
.ProjectTo<SystemClinicalQuestionDto>(_mapper.ConfigurationProvider);
|
||||||
var pageList = await systemClinicalQuestionQueryable
|
var pageList = await systemClinicalQuestionQueryable
|
||||||
@@ -311,9 +327,22 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
public async Task<IResponseOutput> AddOrUpdateSystemClinicalQuestion(SystemClinicalQuestionDto inDto)
|
public async Task<IResponseOutput> AddOrUpdateSystemClinicalQuestion(SystemClinicalQuestionDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (await _systemClinicalQuestionRepository.AnyAsync(x => x.SystemClinicalId == inDto.SystemClinicalId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
|
if (inDto.IsVerify)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"]);
|
if (await _systemClinicalQuestionRepository.AnyAsync(x => x.SystemClinicalId == inDto.SystemClinicalId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"], string.Empty, ApiResponseCodeEnum.NeedTips);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (await _systemClinicalQuestionRepository.AnyAsync(x => x.SystemClinicalId == inDto.SystemClinicalId && x.Id != inDto.Id && x.ShowOrder == inDto.ShowOrder))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("问题序号存在重复!");
|
||||||
|
}
|
||||||
|
if (await _systemClinicalQuestionRepository.AnyAsync(x => x.SystemClinicalId == inDto.SystemClinicalId && x.Id != inDto.Id && x.IsCheckDate == inDto.IsCheckDate && inDto.IsCheckDate))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("已经添加过类型为检查日期的问题!");
|
||||||
}
|
}
|
||||||
var entity = await _systemClinicalQuestionRepository.InsertOrUpdateAsync(inDto, true);
|
var entity = await _systemClinicalQuestionRepository.InsertOrUpdateAsync(inDto, true);
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
@@ -396,9 +425,17 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AddOrUpdateSystemClinicalTableQuestion(SystemClinicalTableQuestionDto inDto)
|
public async Task<IResponseOutput> AddOrUpdateSystemClinicalTableQuestion(SystemClinicalTableQuestionDto inDto)
|
||||||
{
|
{
|
||||||
if (await _systemClinicalTableQuestionRepository.AnyAsync(x => x.QuestionId == inDto.QuestionId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
|
if (inDto.IsVerify)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"]);
|
if (await _systemClinicalTableQuestionRepository.AnyAsync(x => x.QuestionId == inDto.QuestionId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"], string.Empty, ApiResponseCodeEnum.NeedTips);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (await _systemClinicalTableQuestionRepository.AnyAsync(x => x.QuestionId == inDto.QuestionId && x.Id != inDto.Id && x.ShowOrder == inDto.ShowOrder))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("问题序号存在重复!");
|
||||||
}
|
}
|
||||||
|
|
||||||
var entity = await _systemClinicalTableQuestionRepository.InsertOrUpdateAsync(inDto, true);
|
var entity = await _systemClinicalTableQuestionRepository.InsertOrUpdateAsync(inDto, true);
|
||||||
@@ -451,9 +488,17 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AddOrUpdateTrialClinicalTableQuestion(TrialClinicalTableQuestionDto inDto)
|
public async Task<IResponseOutput> AddOrUpdateTrialClinicalTableQuestion(TrialClinicalTableQuestionDto inDto)
|
||||||
{
|
{
|
||||||
if (await _trialClinicalTableQuestionRepository.AnyAsync(x => x.QuestionId == inDto.QuestionId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
|
if (inDto.IsVerify)
|
||||||
{
|
{
|
||||||
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"]);
|
if (await _trialClinicalTableQuestionRepository.AnyAsync(x => x.QuestionId == inDto.QuestionId && x.Id != inDto.Id && x.QuestionName == inDto.QuestionName))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk(_localizer["ClinicalQuestion_Repeat"], string.Empty, ApiResponseCodeEnum.NeedTips);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (await _trialClinicalTableQuestionRepository.AnyAsync(x => x.QuestionId == inDto.QuestionId && x.Id != inDto.Id && x.ShowOrder == inDto.ShowOrder))
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk("问题序号存在重复!");
|
||||||
}
|
}
|
||||||
var entity = await _trialClinicalTableQuestionRepository.InsertOrUpdateAsync(inDto, true);
|
var entity = await _trialClinicalTableQuestionRepository.InsertOrUpdateAsync(inDto, true);
|
||||||
|
|
||||||
|
|||||||
+283
-52
@@ -8,6 +8,7 @@ using Panda.DynamicWebApi.Attributes;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using System.Linq.Expressions;
|
using System.Linq.Expressions;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
|
using System.Linq.Dynamic.Core;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
@@ -24,6 +25,8 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||||
private readonly IRepository<PreviousHistory> _previousHistoryRepository;
|
private readonly IRepository<PreviousHistory> _previousHistoryRepository;
|
||||||
|
private readonly IRepository<ReadModuleCriterionFrom> _readModuleCriterionFromRepository;
|
||||||
|
private readonly IRepository<ClinicalForm> _clinicalFormRepository;
|
||||||
private readonly IRepository<PreviousOther> _previousOtherRepository;
|
private readonly IRepository<PreviousOther> _previousOtherRepository;
|
||||||
private readonly IRepository<PreviousSurgery> _previousSurgeryRepository;
|
private readonly IRepository<PreviousSurgery> _previousSurgeryRepository;
|
||||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
||||||
@@ -37,7 +40,8 @@ namespace IRaCIS.Application.Services
|
|||||||
IRepository<PreviousPDF> previousPDFRepository,
|
IRepository<PreviousPDF> previousPDFRepository,
|
||||||
IRepository<SubjectVisit> subjectVisitRepository,
|
IRepository<SubjectVisit> subjectVisitRepository,
|
||||||
IRepository<PreviousHistory> previousHistoryRepository,
|
IRepository<PreviousHistory> previousHistoryRepository,
|
||||||
|
IRepository<ReadModuleCriterionFrom> readModuleCriterionFromRepository,
|
||||||
|
IRepository<ClinicalForm> clinicalFormRepository,
|
||||||
IRepository<PreviousOther> previousOtherRepository,
|
IRepository<PreviousOther> previousOtherRepository,
|
||||||
IRepository<PreviousSurgery> previousSurgeryRepository,
|
IRepository<PreviousSurgery> previousSurgeryRepository,
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||||
@@ -53,6 +57,8 @@ namespace IRaCIS.Application.Services
|
|||||||
this._previousPDFRepository = previousPDFRepository;
|
this._previousPDFRepository = previousPDFRepository;
|
||||||
this._subjectVisitRepository = subjectVisitRepository;
|
this._subjectVisitRepository = subjectVisitRepository;
|
||||||
this._previousHistoryRepository = previousHistoryRepository;
|
this._previousHistoryRepository = previousHistoryRepository;
|
||||||
|
this._readModuleCriterionFromRepository = readModuleCriterionFromRepository;
|
||||||
|
this._clinicalFormRepository = clinicalFormRepository;
|
||||||
this._previousOtherRepository = previousOtherRepository;
|
this._previousOtherRepository = previousOtherRepository;
|
||||||
this._previousSurgeryRepository = previousSurgeryRepository;
|
this._previousSurgeryRepository = previousSurgeryRepository;
|
||||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||||
@@ -179,12 +185,6 @@ namespace IRaCIS.Application.Services
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetCRCClinicalDataOutDto>> GetCRCClinicalData(GetCRCClinicalDataInDto inDto)
|
public async Task<List<GetCRCClinicalDataOutDto>> GetCRCClinicalData(GetCRCClinicalDataInDto inDto)
|
||||||
{
|
{
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator)
|
|
||||||
{
|
|
||||||
await this.AddCRCClinicalData(inDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
List<GetCRCClinicalDataOutDto> cRCClinicalDataList = await _readingClinicalDataRepository.Where(x => x.ReadingId == inDto.SubjectVisitId)
|
List<GetCRCClinicalDataOutDto> cRCClinicalDataList = await _readingClinicalDataRepository.Where(x => x.ReadingId == inDto.SubjectVisitId)
|
||||||
.WhereIf(inDto.IsBaseline, x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
.WhereIf(inDto.IsBaseline, x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
||||||
.WhereIf(!inDto.IsBaseline, x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
.WhereIf(!inDto.IsBaseline, x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
||||||
@@ -201,29 +201,26 @@ namespace IRaCIS.Application.Services
|
|||||||
Path = x.ClinicalDataTrialSet.Path,
|
Path = x.ClinicalDataTrialSet.Path,
|
||||||
IsBlind = x.IsBlind,
|
IsBlind = x.IsBlind,
|
||||||
IsComplete = x.IsComplete,
|
IsComplete = x.IsComplete,
|
||||||
|
ClinicalFromList=x.Subject.ClinicalFormList.Where(y=>y.ReadingId==x.ReadingId&&y.ClinicalDataTrialSetId==x.ClinicalDataTrialSetId).Select(y=> new ClinicalFromData() {
|
||||||
|
CheckDate=y.CheckDate,
|
||||||
|
ClinicalFormId=y.Id
|
||||||
|
}).ToList(),
|
||||||
PDFFileList = x.ReadingClinicalDataPDFList.Select(y => new GetFileDto()
|
PDFFileList = x.ReadingClinicalDataPDFList.Select(y => new GetFileDto()
|
||||||
{
|
{
|
||||||
Id = y.Id,
|
Id = y.Id,
|
||||||
FileName = y.FileName,
|
FileName = y.FileName,
|
||||||
Path = y.Path,
|
Path = y.Path,
|
||||||
CreateTime = y.CreateTime,
|
CreateTime = y.CreateTime,
|
||||||
}).ToList()
|
}).ToList(),
|
||||||
|
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
List<GetReadingClinicalDataListOutDto> clinicalData = (await this.GetReadingClinicalDataList(new GetReadingClinicalDataListIndto()
|
|
||||||
{
|
|
||||||
SubjectId = inDto.SubjectId,
|
|
||||||
ReadingId = inDto.SubjectVisitId,
|
|
||||||
TrialId = inDto.TrialId,
|
|
||||||
})).Item1;
|
|
||||||
|
|
||||||
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
var previousSurgeryList = await _previousSurgeryRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousSurgeryList = await _previousSurgeryRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
foreach (var item in cRCClinicalDataList)
|
foreach (var item in cRCClinicalDataList)
|
||||||
{
|
{
|
||||||
//item.PDFFileList = clinicalData.Where(y => y.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).SelectMany(x => x.FileList).ToList();
|
|
||||||
item.ClinicalTableData = new ClinicalDataTable()
|
item.ClinicalTableData = new ClinicalDataTable()
|
||||||
{
|
{
|
||||||
PreviousHistoryList = previousHistoryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
PreviousHistoryList = previousHistoryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
||||||
@@ -310,7 +307,7 @@ namespace IRaCIS.Application.Services
|
|||||||
}
|
}
|
||||||
|
|
||||||
//处理 任务 临床数据是否签名
|
//处理 任务 临床数据是否签名
|
||||||
private async Task DealVisiTaskClinicalDataSignedAsync(Guid trialId, Guid subjectId, Guid readingId, bool isVisit, Guid trialReadingCritrialId)
|
public async Task DealVisiTaskClinicalDataSignedAsync(Guid trialId, Guid subjectId, Guid readingId, bool isVisit, Guid trialReadingCritrialId)
|
||||||
{
|
{
|
||||||
//获取确认的临床数据配置
|
//获取确认的临床数据配置
|
||||||
var trialClinicalDataSetList = _clinicalDataTrialSetRepository.Where(t => t.TrialId == trialId && t.IsConfirm).Include(t => t.TrialClinicalDataSetCriteriaList).ToList();
|
var trialClinicalDataSetList = _clinicalDataTrialSetRepository.Where(t => t.TrialId == trialId && t.IsConfirm).Include(t => t.TrialClinicalDataSetCriteriaList).ToList();
|
||||||
@@ -328,6 +325,8 @@ namespace IRaCIS.Application.Services
|
|||||||
{
|
{
|
||||||
var isBaseLine = await _subjectVisitRepository.Where(t => t.Id == readingId).Select(t => t.IsBaseLine).FirstOrDefaultAsync();
|
var isBaseLine = await _subjectVisitRepository.Where(t => t.Id == readingId).Select(t => t.IsBaseLine).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//判断是否基线
|
//判断是否基线
|
||||||
if (isBaseLine)
|
if (isBaseLine)
|
||||||
{
|
{
|
||||||
@@ -356,21 +355,43 @@ namespace IRaCIS.Application.Services
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//判断是影像学 还是肿瘤学阅片
|
//判断是影像学 还是肿瘤学阅片
|
||||||
var readingSetType = await _readModuleRepository.Where(t => t.Id == readingId).Select(t => t.ReadingSetType).FirstOrDefaultAsync();
|
var readModule = await _readModuleRepository.Where(t => t.Id == readingId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
//CRC 阅片期自定义结构化录入是否签名
|
||||||
|
bool crcReadModuleSign = true;
|
||||||
|
|
||||||
//影像学
|
//影像学
|
||||||
if (readingSetType == ReadingSetType.ImageReading)
|
if (readModule.ReadingSetType == ReadingSetType.ImageReading)
|
||||||
{
|
{
|
||||||
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCritrialId) && t.ClinicalDataLevel == ClinicalLevel.ImageRead).Count();
|
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCritrialId) && t.ClinicalDataLevel == ClinicalLevel.ImageRead).Count();
|
||||||
|
|
||||||
|
// 不存在需要CRC上传的临床数据 或者 PM已确认
|
||||||
|
crcReadModuleSign =
|
||||||
|
!trialClinicalDataSetList.Any(x =>
|
||||||
|
x.UploadRole == UploadRole.CRC
|
||||||
|
&& x.ClinicalDataLevel == ClinicalLevel.ImageRead
|
||||||
|
&& x.ClinicalUploadType == ClinicalUploadType.Structuring
|
||||||
|
&& x.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCritrialId)) || readModule.IsPMConfirm;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//肿瘤学
|
//肿瘤学
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCritrialId) && t.ClinicalDataLevel == ClinicalLevel.OncologyRead).Count();
|
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCritrialId) && t.ClinicalDataLevel == ClinicalLevel.OncologyRead).Count();
|
||||||
|
|
||||||
|
// 不存在需要CRC上传的临床数据 或者 PM已确认
|
||||||
|
crcReadModuleSign =
|
||||||
|
!trialClinicalDataSetList.Any(x =>
|
||||||
|
x.UploadRole == UploadRole.CRC
|
||||||
|
&& x.ClinicalDataLevel == ClinicalLevel.OncologyRead
|
||||||
|
&& x.ClinicalUploadType == ClinicalUploadType.Structuring
|
||||||
|
&& x.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCritrialId)) || readModule.IsPMConfirm;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//可能仅仅CRC 基线 没有PM
|
//可能仅仅CRC 基线 没有PM
|
||||||
if (needSignCount == haveSignedCount /*&& needSignCount != 0*/)
|
if (needSignCount == haveSignedCount && crcReadModuleSign/*&& needSignCount != 0*/)
|
||||||
{
|
{
|
||||||
//将该标准 该subject 该阅片期|肿瘤学 任务临床数据状态变更
|
//将该标准 该subject 该阅片期|肿瘤学 任务临床数据状态变更
|
||||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCritrialId && t.SouceReadModuleId == readingId, u => new VisitTask()
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCritrialId && t.SouceReadModuleId == readingId, u => new VisitTask()
|
||||||
@@ -380,6 +401,13 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trialId && t.SubjectId == subjectId && t.TrialReadingCriterionId == trialReadingCritrialId && t.SouceReadModuleId == readingId, u => new VisitTask()
|
||||||
|
{
|
||||||
|
IsClinicalDataSign = false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -606,10 +634,6 @@ namespace IRaCIS.Application.Services
|
|||||||
|
|
||||||
var clinicalDataList = await this.GetTrialClinicalDataSelect(getTrialClinicalDataSelectIndto);
|
var clinicalDataList = await this.GetTrialClinicalDataSelect(getTrialClinicalDataSelectIndto);
|
||||||
|
|
||||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC)
|
|
||||||
{
|
|
||||||
inDto.UploadRole = UploadRole.CRC;
|
|
||||||
}
|
|
||||||
var isBaseLine = await _subjectVisitRepository.AnyAsync(x => x.Id == inDto.ReadingId && x.IsBaseLine);
|
var isBaseLine = await _subjectVisitRepository.AnyAsync(x => x.Id == inDto.ReadingId && x.IsBaseLine);
|
||||||
|
|
||||||
|
|
||||||
@@ -646,23 +670,23 @@ namespace IRaCIS.Application.Services
|
|||||||
inDto.ReadingId = visitTask.SouceReadModuleId ?? visitTask.SourceSubjectVisitId;
|
inDto.ReadingId = visitTask.SouceReadModuleId ?? visitTask.SourceSubjectVisitId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var resultQuery = _readingClinicalDataRepository.Where(x => x.SubjectId == inDto.SubjectId)
|
var resultQuery = _readingClinicalDataRepository.Where(x => x.SubjectId == inDto.SubjectId)
|
||||||
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
||||||
|
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
||||||
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
||||||
.Where(x => x.ReadingId == inDto.ReadingId || (x.SubjectId == inDto.SubjectId && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject))
|
.Where(x => x.ReadingId == inDto.ReadingId)
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
{
|
{
|
||||||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||||
SubjectId = x.SubjectId,
|
SubjectId = x.SubjectId,
|
||||||
ReadingId = x.ReadingId,
|
ReadingId = x.ReadingId,
|
||||||
ClinicalDataSetEnName=x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
ClinicalDataSetEnName = x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName.LanguageName(x.ClinicalDataTrialSet.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName.LanguageName(x.ClinicalDataTrialSet.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSetId,
|
ClinicalDataTrialSetId = x.ClinicalDataTrialSetId,
|
||||||
IsSign = x.IsSign,
|
IsSign = x.IsSign,
|
||||||
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
||||||
CriterionEnumList = x.ClinicalDataTrialSet.CriterionEnumList,
|
CriterionEnumList = x.ClinicalDataTrialSet.CriterionEnumList,
|
||||||
TrialClinicalDataSetCriteriaList=x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList,
|
TrialClinicalDataSetCriteriaList = x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList,
|
||||||
Id = x.Id,
|
Id = x.Id,
|
||||||
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
||||||
IsCRCUpload = x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC,
|
IsCRCUpload = x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC,
|
||||||
@@ -672,33 +696,141 @@ namespace IRaCIS.Application.Services
|
|||||||
FileName = y.FileName,
|
FileName = y.FileName,
|
||||||
Path = y.Path,
|
Path = y.Path,
|
||||||
CreateTime = y.CreateTime,
|
CreateTime = y.CreateTime,
|
||||||
}).ToList()
|
}).ToList(),
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var result = new List<GetReadingClinicalDataListOutDto>();
|
||||||
|
if (!inDto.IsOnlyGetCRCReadModule)
|
||||||
|
{
|
||||||
|
result = await resultQuery.ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
var readingIds = result.Select(x => x.ReadingId).ToList();
|
||||||
|
var clinical = await _clinicalFormRepository.Where(x => readingIds.Contains(x.ReadingId??default(Guid))).ToListAsync();
|
||||||
|
result.Where(x => x.ClinicalUploadType == ClinicalUploadType.Structuring).ForEach(x => {
|
||||||
|
|
||||||
|
x.ClinicalFromList = clinical.Where(y => y.ReadingId == x.ReadingId&&y.ClinicalDataTrialSetId==x.ClinicalDataTrialSetId).Select(y => new ClinicalFromData()
|
||||||
|
{
|
||||||
|
CheckDate = y.CheckDate,
|
||||||
|
ClinicalFormId = y.Id
|
||||||
|
}).ToList();
|
||||||
|
x.FileCount = x.ClinicalFromList.Count();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// 这里处理CRC上传 阅片期的临床数据
|
||||||
|
var readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadingId)
|
||||||
|
.WhereIf(inDto.SelectIsSign,x=>x.IsPMConfirm)
|
||||||
|
.WhereIf(!inDto.SelectIsSign, x => x.IsCRCConfirm)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
|
if (readModule != null)
|
||||||
|
{
|
||||||
|
var moduleCriterionFromList = await _readModuleCriterionFromRepository
|
||||||
|
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalForm.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
||||||
|
.Where(x => x.ReadModuleId == readModule.Id).Select(x => new{
|
||||||
|
ClinicalFormId= x.ClinicalFormId,
|
||||||
|
CheckDate= x.ClinicalForm.CheckDate,
|
||||||
|
ClinicalDataTrialSetId= x.ClinicalForm.ClinicalDataTrialSetId
|
||||||
|
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
var clinicalresult = await _clinicalDataTrialSetRepository.Where(x => x.UploadRole == UploadRole.CRC && x.ClinicalUploadType == ClinicalUploadType.Structuring)
|
||||||
|
.WhereIf(readModule.ReadingSetType == ReadingSetType.ImageReading, x => x.ClinicalDataLevel == ClinicalLevel.ImageRead)
|
||||||
|
.WhereIf(readModule.ReadingSetType == ReadingSetType.TumorReading, x => x.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
||||||
|
.Where(x=>x.TrialClinicalDataSetCriteriaList.Any(y=>y.TrialReadingCriterionId==readModule.TrialReadingCriterionId))
|
||||||
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
|
{
|
||||||
|
|
||||||
|
ClinicalDataLevel = x.ClinicalDataLevel,
|
||||||
|
SubjectId = inDto.SubjectId,
|
||||||
|
ReadingId = default(Guid),
|
||||||
|
IsCRCApplicationRevoke=readModule.IsCRCApplicationRevoke,
|
||||||
|
IsCRCConfirm= readModule.IsCRCConfirm,
|
||||||
|
IsPMConfirm= readModule.IsPMConfirm,
|
||||||
|
ClinicalDataSetName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||||
|
ClinicalDataSetEnName = x.ClinicalDataSetEnName,
|
||||||
|
ClinicalDataTrialSetId = x.Id,
|
||||||
|
IsSign = readModule.IsPMConfirm,
|
||||||
|
ClinicalUploadType = x.ClinicalUploadType,
|
||||||
|
Id = default(Guid),
|
||||||
|
UploadRole = x.UploadRole,
|
||||||
|
IsCRCUpload = x.UploadRole == UploadRole.CRC,
|
||||||
|
IsNeedMerge = true,
|
||||||
|
ReadModuleId = readModule.Id,
|
||||||
|
//FileCount = x.FileCount,
|
||||||
|
|
||||||
|
//ReadingClinicalDataState = x.ReadingClinicalDataState,
|
||||||
|
|
||||||
|
//FileList = x.ReadingClinicalDataPDFList.Select(y => new GetFileDto()
|
||||||
|
//{
|
||||||
|
// Id = y.Id,
|
||||||
|
// FileName = y.FileName,
|
||||||
|
// Path = y.Path,
|
||||||
|
// CreateTime = y.CreateTime,
|
||||||
|
//}).ToList()
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
clinicalresult.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.FileCount = moduleCriterionFromList.Where(y => y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).Count();
|
||||||
|
x.ClinicalFromList = moduleCriterionFromList.Where(y => y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).OrderBy(y => y.CheckDate).Select(x => new ClinicalFromData
|
||||||
|
{
|
||||||
|
CheckDate = x.CheckDate,
|
||||||
|
ClinicalFormId = x.ClinicalFormId
|
||||||
|
|
||||||
|
}).ToList();
|
||||||
|
x.IsSign = readModule.IsPMConfirm ? true : false;
|
||||||
|
x.ReadingClinicalDataState = readModule.IsPMConfirm ? ReadingClinicalDataStatus.HaveSigned : ReadingClinicalDataStatus.HaveChecked;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
result.AddRange(clinicalresult);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var result = await resultQuery.ToListAsync();
|
|
||||||
// 根据标准
|
// 根据标准
|
||||||
if (inDto.VisitTaskId != null)
|
if (inDto.VisitTaskId != null)
|
||||||
{
|
{
|
||||||
var visitTaskInfo = await _visitTaskRepository.FirstOrDefaultAsync(x => x.Id == inDto.VisitTaskId);
|
var visitTaskInfo = await _visitTaskRepository.FirstOrDefaultAsync(x => x.Id == inDto.VisitTaskId);
|
||||||
|
|
||||||
result = result.Where(x => x.TrialClinicalDataSetCriteriaList.Any(z=>z.TrialReadingCriterionId==visitTaskInfo.TrialReadingCriterionId)).ToList();
|
result = result.Where(x => x.TrialClinicalDataSetCriteriaList.Any(z => z.TrialReadingCriterionId == visitTaskInfo.TrialReadingCriterionId)).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
result = result.Where(x => !(x.ClinicalUploadType == ClinicalUploadType.PDF && x.FileList.Count() == 0)).ToList();
|
if (inDto.GetClinicalType != null)
|
||||||
// 需要排除表格为空的数据
|
|
||||||
|
|
||||||
|
|
||||||
var readingIds = result.Select(x => x.ReadingId).ToList();
|
|
||||||
|
|
||||||
var tablecount = (await _previousHistoryRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).CountAsync()) +
|
|
||||||
(await _previousOtherRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).CountAsync()) +
|
|
||||||
(await _previousSurgeryRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).CountAsync());
|
|
||||||
|
|
||||||
if (tablecount == 0)
|
|
||||||
{
|
{
|
||||||
result = result.Where(x => x.ClinicalUploadType != ClinicalUploadType.Table).ToList();
|
switch (inDto.GetClinicalType)
|
||||||
|
{
|
||||||
|
case GetClinicalType.PMUpload:
|
||||||
|
result = result.Where(x => x.UploadRole == UploadRole.PM).ToList();
|
||||||
|
break;
|
||||||
|
case GetClinicalType.CRCConfirm:
|
||||||
|
result = result.Where(x => x.UploadRole == UploadRole.CRC&&x.IsCRCConfirm&&!x.IsPMConfirm).ToList();
|
||||||
|
break;
|
||||||
|
case GetClinicalType.HasSign:
|
||||||
|
result = result.Where(x => x.IsSign).ToList();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
var previousSurgeryList = await _previousSurgeryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
foreach (var item in result)
|
||||||
|
{
|
||||||
|
item.ClinicalTableData = new ClinicalDataTable()
|
||||||
|
{
|
||||||
|
PreviousHistoryList = previousHistoryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
||||||
|
PreviousOtherList = previousOtherList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
||||||
|
PreviousSurgeryList = previousSurgeryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -712,14 +844,9 @@ namespace IRaCIS.Application.Services
|
|||||||
[NonDynamicMethod]
|
[NonDynamicMethod]
|
||||||
public async Task<List<GetReadingClinicalDataListOutDto>> GetReadingClinicalList(GetReadingClinicalDataListIndto inDto)
|
public async Task<List<GetReadingClinicalDataListOutDto>> GetReadingClinicalList(GetReadingClinicalDataListIndto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
//var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.CriterionType).FirstNotNullAsync();
|
|
||||||
|
|
||||||
|
|
||||||
var resultQuery = _readingClinicalDataRepository.Where(x => x.SubjectId == inDto.SubjectId)
|
var resultQuery = _readingClinicalDataRepository.Where(x => x.SubjectId == inDto.SubjectId)
|
||||||
.Where(x => x.ReadingId == inDto.ReadingId || (x.SubjectId == inDto.SubjectId && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject))
|
.Where(x => x.ReadingId == inDto.ReadingId)
|
||||||
//.WhereIf(inDto.UploadRole == UploadRole.CRC, x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
.WhereIf(inDto.ClinicalDataTrialSetId!=null, x=>x.ClinicalDataTrialSetId==inDto.TrialReadingCriterionId)
|
||||||
|
|
||||||
.Where(x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t=>t.TrialReadingCriterionId==inDto.TrialReadingCriterionId))
|
.Where(x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t=>t.TrialReadingCriterionId==inDto.TrialReadingCriterionId))
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
{
|
{
|
||||||
@@ -750,7 +877,111 @@ namespace IRaCIS.Application.Services
|
|||||||
});
|
});
|
||||||
|
|
||||||
var result = await resultQuery.ToListAsync();
|
var result = await resultQuery.ToListAsync();
|
||||||
//result = result.Where(x => !(x.UploadRole == UploadRole.CRC && x.ClinicalUploadType == ClinicalUploadType.PDF && x.FileList.Count() == 0)).ToList();
|
|
||||||
|
|
||||||
|
var readingIds = result.Select(x => x.ReadingId).ToList();
|
||||||
|
var clinical = await _clinicalFormRepository.Where(x => readingIds.Contains(x.ReadingId ?? default(Guid))).ToListAsync();
|
||||||
|
result.Where(x => x.ClinicalUploadType == ClinicalUploadType.Structuring).ForEach(x => {
|
||||||
|
|
||||||
|
x.ClinicalFromList = clinical.Where(y => y.ReadingId == x.ReadingId && y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).Select(y => new ClinicalFromData()
|
||||||
|
{
|
||||||
|
CheckDate = y.CheckDate,
|
||||||
|
ClinicalFormId = y.Id
|
||||||
|
}).ToList();
|
||||||
|
x.FileCount = x.ClinicalFromList.Count();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 这里处理CRC上传 阅片期的临床数据
|
||||||
|
var readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadingId&&x.IsCRCConfirm)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
|
if (readModule != null)
|
||||||
|
{
|
||||||
|
var moduleCriterionFromList = await _readModuleCriterionFromRepository.Where(x => x.ReadModuleId == readModule.Id)
|
||||||
|
|
||||||
|
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalForm.ClinicalDataTrialSetId == inDto.TrialReadingCriterionId)
|
||||||
|
.Select(x => new {
|
||||||
|
ClinicalFormId = x.ClinicalFormId,
|
||||||
|
CheckDate = x.ClinicalForm.CheckDate,
|
||||||
|
ClinicalDataTrialSetId = x.ClinicalForm.ClinicalDataTrialSetId
|
||||||
|
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
|
||||||
|
var clinicalresult = await _clinicalDataTrialSetRepository.Where(x => x.UploadRole == UploadRole.CRC&&x.ClinicalUploadType== ClinicalUploadType.Structuring)
|
||||||
|
.WhereIf(readModule.ReadingSetType == ReadingSetType.ImageReading,x=>x.ClinicalDataLevel== ClinicalLevel.ImageRead)
|
||||||
|
.WhereIf(readModule.ReadingSetType == ReadingSetType.TumorReading, x => x.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
||||||
|
.Where(x => x.TrialClinicalDataSetCriteriaList.Any(y => y.TrialReadingCriterionId == readModule.TrialReadingCriterionId))
|
||||||
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
|
{
|
||||||
|
|
||||||
|
ClinicalDataLevel = x.ClinicalDataLevel,
|
||||||
|
SubjectId = inDto.SubjectId,
|
||||||
|
ReadingId = default(Guid),
|
||||||
|
IsCRCApplicationRevoke= readModule.IsCRCApplicationRevoke,
|
||||||
|
IsCRCConfirm = readModule.IsCRCConfirm,
|
||||||
|
IsPMConfirm=readModule.IsPMConfirm,
|
||||||
|
|
||||||
|
ClinicalDataSetName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||||
|
ClinicalDataSetEnName = x.ClinicalDataSetEnName,
|
||||||
|
ClinicalDataTrialSetId = x.Id,
|
||||||
|
IsSign = readModule.IsPMConfirm,
|
||||||
|
ClinicalUploadType = x.ClinicalUploadType,
|
||||||
|
Id = default(Guid),
|
||||||
|
UploadRole = x.UploadRole,
|
||||||
|
IsCRCUpload = x.UploadRole == UploadRole.CRC,
|
||||||
|
IsNeedMerge = true,
|
||||||
|
ReadModuleId = readModule.Id,
|
||||||
|
//FileCount = x.FileCount,
|
||||||
|
|
||||||
|
//ReadingClinicalDataState = x.ReadingClinicalDataState,
|
||||||
|
|
||||||
|
//FileList = x.ReadingClinicalDataPDFList.Select(y => new GetFileDto()
|
||||||
|
//{
|
||||||
|
// Id = y.Id,
|
||||||
|
// FileName = y.FileName,
|
||||||
|
// Path = y.Path,
|
||||||
|
// CreateTime = y.CreateTime,
|
||||||
|
//}).ToList()
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
clinicalresult.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.FileCount = moduleCriterionFromList.Where(y => y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).Count();
|
||||||
|
x.ClinicalFromList = moduleCriterionFromList.Where(y => y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).OrderBy(y => y.CheckDate).Select(x => new ClinicalFromData
|
||||||
|
{
|
||||||
|
CheckDate = x.CheckDate,
|
||||||
|
ClinicalFormId = x.ClinicalFormId
|
||||||
|
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
x.IsSign = readModule.IsPMConfirm ?true : false;
|
||||||
|
x.ReadingClinicalDataState = readModule.IsPMConfirm ? ReadingClinicalDataStatus.HaveSigned : ReadingClinicalDataStatus.HaveChecked;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
result.AddRange(clinicalresult);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (inDto.GetClinicalType != null)
|
||||||
|
{
|
||||||
|
switch (inDto.GetClinicalType)
|
||||||
|
{
|
||||||
|
case GetClinicalType.PMUpload:
|
||||||
|
result = result.Where(x => x.UploadRole == UploadRole.PM).ToList();
|
||||||
|
break;
|
||||||
|
case GetClinicalType.CRCConfirm:
|
||||||
|
result = result.Where(x => x.UploadRole == UploadRole.CRC&&x.IsCRCConfirm&&!x.IsPMConfirm).ToList();
|
||||||
|
break;
|
||||||
|
case GetClinicalType.HasSign:
|
||||||
|
result = result.Where(x => x.IsSign).ToList();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,10 @@ using System.Threading.Tasks;
|
|||||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public class CRCSignClinicalDataInDto
|
||||||
|
{
|
||||||
|
public Guid ReadingClinicalDataId { get; set; }
|
||||||
|
}
|
||||||
public class AutoAddClinicalInDto
|
public class AutoAddClinicalInDto
|
||||||
{
|
{
|
||||||
public Guid? SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
@@ -18,9 +22,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public class GetCRCSubjectClinicalInDto
|
public class GetCRCSubjectClinicalInDto:PageInput
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
|
public string? SubjectCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -28,9 +36,33 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
{
|
{
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
|
public Guid ReadingClinicalDataId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 上传角色
|
||||||
|
/// </summary>
|
||||||
|
public UploadRole UploadRole { get; set; }
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public string SubjectCode { get; set; }
|
/// <summary>
|
||||||
|
/// 访视Id 或者模块Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid ReadingId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 临床级别
|
||||||
|
/// </summary>
|
||||||
|
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public Guid? BaseLineVisitId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 上传方式
|
||||||
|
/// </summary>
|
||||||
|
public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||||
|
|
||||||
|
public string SubjectCode { get; set; }
|
||||||
public Guid ClinicalDataTrialSetId { get; set; }
|
public Guid ClinicalDataTrialSetId { get; set; }
|
||||||
|
|
||||||
public string ClinicalDataSetName { get; set; }
|
public string ClinicalDataSetName { get; set; }
|
||||||
@@ -57,7 +89,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
{
|
{
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
public Guid ClinicalDataTrialSetId { get; set; }
|
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid ClinicalDataTrialSetId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -96,10 +131,33 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
public string Answer { get; set; } = string.Empty;
|
public string Answer { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetCRCConfirmListInDto
|
public class GetPMConfirmListInDto: PageInput
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
}
|
|
||||||
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetCRCConfirmListInDto:PageInput
|
||||||
|
{
|
||||||
|
|
||||||
|
public bool? IsCRCConfirm { get; set; }
|
||||||
|
|
||||||
|
public bool? IsPMConfirm { get; set; }
|
||||||
|
|
||||||
|
public Guid? TrialReadingCriterionId { get; set; }
|
||||||
|
|
||||||
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
|
public DateTime? StartTime { get; set; }
|
||||||
|
public DateTime? EndTime { get; set; }
|
||||||
|
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid? ReadModuleId { get; set; }
|
||||||
|
|
||||||
|
public string? SubjectCode { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class CRCCancelConfirmClinicalInDto
|
public class CRCCancelConfirmClinicalInDto
|
||||||
{
|
{
|
||||||
@@ -108,17 +166,93 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
public Guid ReadModuleId { get; set; }
|
public Guid ReadModuleId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CRCConfirmClinicalInDto
|
public class GetClinicalDateListOutDto
|
||||||
|
{
|
||||||
|
public string ClinicalDataSetName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public List<GetCRCBeConfirmListOutDto> DateList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetCRCBeConfirmListInDto
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetClinicalTableListInDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
public Guid ReadModuleId { get; set; }
|
public Guid ReadModuleId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetClinicalTableListOutDto: GetClinicalQuestionAnswerListOutDto
|
||||||
|
{
|
||||||
|
public string ClinicalDataSetName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模块名称
|
||||||
|
/// </summary>
|
||||||
|
public string ModuleName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetCRCBeConfirm: GetCRCBeConfirmListOutDto
|
||||||
|
{
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetCRCBeConfirmListOutDto
|
||||||
|
{
|
||||||
|
public Guid ClinicalDataTrialSetId { get; set; }
|
||||||
|
|
||||||
|
public Guid ClinicalFormId { get; set; }
|
||||||
|
|
||||||
|
public string ClinicalDataSetName { get; set; }
|
||||||
|
|
||||||
|
public string ClinicalDataSetEnName { get; set; }
|
||||||
|
|
||||||
|
public DateTime CheckDate { get; set; }
|
||||||
|
|
||||||
|
public bool IsHaveTableQuestion { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CRCConfirmClinicalInDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 临床数据是否完整
|
||||||
|
/// </summary>
|
||||||
|
public bool? IsClinicalDataComplete { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 临床数据是否盲化
|
||||||
|
/// </summary>
|
||||||
|
public bool? IsClinicalDataBlind { get; set; }
|
||||||
|
|
||||||
|
public bool IsConfirm { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class CRCClinicalForm
|
public class CRCClinicalForm
|
||||||
{
|
{
|
||||||
public DateTime? CkeckDate { get; set; }
|
/// <summary>
|
||||||
|
/// 受试者Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid SubjectId { get; set; }
|
||||||
|
public DateTime? CheckDate { get; set; }
|
||||||
|
|
||||||
public Guid ClinicalFormId { get; set; }
|
public Guid ClinicalFormId { get; set; }
|
||||||
|
|
||||||
@@ -126,6 +260,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// 临床级别
|
/// 临床级别
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public Guid ClinicalDataTrialSetId { get; set; }
|
||||||
|
|
||||||
|
public string ClinicalDataSetName { get; set; }
|
||||||
|
|
||||||
|
public bool IsHaveTableQuestion { get; set; }
|
||||||
|
|
||||||
|
public string ClinicalDataSetEnName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -136,38 +279,69 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// 受试者ID
|
/// 受试者ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
public Guid ReadModuleId { get; set; }
|
|
||||||
|
|
||||||
public bool IsPMConfirm { get; set; }
|
public bool IsNotNeedPMConfirm { get; set; } = false;
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 模块名称
|
||||||
|
/// </summary>
|
||||||
|
public string ModuleName { get; set; }
|
||||||
|
|
||||||
|
public string VisitBlindName { get; set; }
|
||||||
|
|
||||||
|
public bool IsPMConfirm { get; set; }
|
||||||
|
|
||||||
public ReadingSetType ReadingSetType { get; set; }
|
public ReadingSetType ReadingSetType { get; set; }
|
||||||
|
|
||||||
public bool IsCRCConfirm { get; set; } = false;
|
public bool IsCRCConfirm { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC是否正在申请撤回
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCRCApplicationRevoke { get; set; } = false;
|
||||||
|
|
||||||
|
public string SubjectCode { get; set; }
|
||||||
|
|
||||||
|
public bool IsHaveTableQuestion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ClinicalFormList.Any(x => x.IsHaveTableQuestion);
|
||||||
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最晚拍片日期
|
/// 最晚拍片日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime? LatestScanDate { get; set; }
|
public DateTime? LatestScanDate { get; set; }
|
||||||
|
|
||||||
|
public List<string> ClinicalNameList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.ClinicalFormList.Select(x => x.ClinicalDataSetName).Distinct().ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public List<Guid> ClinicalFormIdList { get; set; }
|
|
||||||
|
public List<GetCRCBeConfirmListOutDto> ClinicalFormList { get; set; }
|
||||||
|
|
||||||
public int FormCount
|
public int FormCount
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return this.ClinicalFormIdList.Count();
|
return this.ClinicalFormList.Count();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class DeleteClinicalFormInDto
|
||||||
|
{
|
||||||
|
public Guid ClinicalFormId { get; set; }
|
||||||
|
}
|
||||||
public class SubmitClinicalFormInDto
|
public class SubmitClinicalFormInDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// VisitId
|
|
||||||
/// </summary>
|
|
||||||
public Guid? VisitId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// VisitId
|
/// VisitId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否应用
|
/// 是否应用
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsApply { get; set; } = false;
|
public bool? IsApply { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 名称
|
/// 名称
|
||||||
|
|||||||
@@ -111,6 +111,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
|
|
||||||
public string Answer { get; set; } = string.Empty;
|
public string Answer { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 子问题
|
/// 子问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -156,6 +158,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public bool IsVerify { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 问题名称
|
/// 问题名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -166,6 +171,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string QuestionEnName { get; set; } = string.Empty;
|
public string QuestionEnName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分组名称
|
||||||
|
/// </summary>
|
||||||
|
public string? GroupName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分组英文名称
|
||||||
|
/// </summary>
|
||||||
|
public string? GroupEnName { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 临床问题类型(分组,单选。)
|
/// 临床问题类型(分组,单选。)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -181,6 +196,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int? MaxAnswerLength { get; set; }
|
public int? MaxAnswerLength { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最大行数
|
||||||
|
/// </summary>
|
||||||
|
public int? MaxQuestionCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 临床数据选项类型(无,自定义)
|
/// 临床数据选项类型(无,自定义)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -360,6 +380,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
|
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
|
|
||||||
|
public bool IsVerify { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 问题名称
|
/// 问题名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -252,15 +252,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
|
|
||||||
public class GetReadModuleDtoOut
|
public class GetReadModuleDtoOut
|
||||||
{
|
{
|
||||||
public string SubjectCode { get; set; }
|
public string? SubjectCode { get; set; }
|
||||||
|
|
||||||
public string TrialSiteCode { get; set; }
|
public string? TrialSiteCode { get; set; }
|
||||||
|
|
||||||
public string SiteCode { get; set; }
|
public string? SiteCode { get; set; }
|
||||||
|
|
||||||
public Guid SiteId { get; set; }
|
public Guid? SiteId { get; set; }
|
||||||
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
public List<ReadModuleView> Data { get; set; }
|
public List<ReadModuleView> Data { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,39 @@ using System.Collections.Generic;
|
|||||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public class GetPPDInfoInDto
|
||||||
|
{
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
|
public decimal RowIndex { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetPPDInfoOutDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 最低的PPD
|
||||||
|
/// </summary>
|
||||||
|
public decimal? NadirPPD { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最低PPD的访视
|
||||||
|
/// </summary>
|
||||||
|
public string? LowPPDVisit { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 该病灶PPD值最小的访视的长径
|
||||||
|
/// </summary>
|
||||||
|
public decimal? LowPPDLDi { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 该病灶PPD值最小的访视的短径
|
||||||
|
/// </summary>
|
||||||
|
public decimal? LowPPDSDi { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class CalculateTaskInDto
|
public class CalculateTaskInDto
|
||||||
{
|
{
|
||||||
public Guid VisitTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ using System.Threading.Tasks;
|
|||||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
|
|
||||||
public class AddOrUpdateReadingClinicalDataDto
|
public class AddOrUpdateReadingClinicalDataDto
|
||||||
{
|
{
|
||||||
|
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
|
|
||||||
@@ -113,9 +113,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool? IsComplete { get; set; }
|
public bool? IsComplete { get; set; }
|
||||||
|
|
||||||
//public List<GetReadingClinicalDataListOutDto> ReadingClinicalDataList { get; set; }
|
public List<ClinicalFromData> ClinicalFromList { get; set; }
|
||||||
|
|
||||||
public List<GetFileDto> PDFFileList { get; set; } = new List<GetFileDto>();
|
//public List<GetReadingClinicalDataListOutDto> ReadingClinicalDataList { get; set; }
|
||||||
|
|
||||||
|
public List<GetFileDto> PDFFileList { get; set; } = new List<GetFileDto>();
|
||||||
|
|
||||||
public ClinicalDataTable ClinicalTableData { get; set; }
|
public ClinicalDataTable ClinicalTableData { get; set; }
|
||||||
}
|
}
|
||||||
@@ -127,9 +129,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
|
|
||||||
public List<PreviousOtherView> PreviousOtherList { get; set; }
|
public List<PreviousOtherView> PreviousOtherList { get; set; }
|
||||||
|
|
||||||
public List<PreviousSurgeryView> PreviousSurgeryList{ get; set; }
|
public List<PreviousSurgeryView> PreviousSurgeryList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -137,7 +139,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
public class GetCRCClinicalDataInDto
|
public class GetCRCClinicalDataInDto
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
@@ -163,7 +165,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 文件名称
|
/// 文件名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string FileName { get; set; }
|
public string FileName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 路径
|
/// 路径
|
||||||
@@ -182,29 +184,52 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
|
|
||||||
public Guid? ReadingId { get; set; }
|
public Guid? ReadingId { get; set; }
|
||||||
|
|
||||||
public Guid? VisitTaskId { get; set; }
|
/// <summary>
|
||||||
|
/// 临床数据类型Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid? ClinicalDataTrialSetId { get; set; }
|
||||||
|
|
||||||
public Guid? ReadingClinicalDataId { get; set; }
|
public Guid? VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 1 PM上传的所有的 2CRC上传的所有已确认的 3 所有已经签名的
|
||||||
|
/// </summary>
|
||||||
|
public GetClinicalType? GetClinicalType { get; set; }
|
||||||
|
|
||||||
|
public Guid? ReadingClinicalDataId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 只查询已经签名的临床数据
|
/// 只获取CRC上传的阅片模块结构化录入
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SelectIsSign { get; set; } = true;
|
public bool IsOnlyGetCRCReadModule { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 只查询已经签名的临床数据
|
||||||
|
/// </summary>
|
||||||
|
public bool SelectIsSign { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取访视列表
|
/// 获取访视列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetReadingClinicalDataListIndto
|
public class GetReadingClinicalDataListIndto
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid ReadingId { get; set; }
|
public Guid ReadingId { get; set; }
|
||||||
|
|
||||||
public UploadRole? UploadRole { get; set; }
|
/// <summary>
|
||||||
|
/// 临床数据类型Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid? ClinicalDataTrialSetId { get; set; }
|
||||||
|
|
||||||
[NotDefault]
|
/// <summary>
|
||||||
|
/// 1 PM上传的所有的 2CRC上传的所有已确认的 3 所有已经签名的
|
||||||
|
/// </summary>
|
||||||
|
public GetClinicalType? GetClinicalType { get; set; }
|
||||||
|
|
||||||
|
[NotDefault]
|
||||||
public Guid TrialReadingCriterionId { get; set; }
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
|
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
@@ -220,7 +245,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
public bool IsBaseLine { get; set; }
|
public bool IsBaseLine { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetReadingClinicalDataPDFListIndto:PageInput
|
public class GetReadingClinicalDataPDFListIndto : PageInput
|
||||||
{
|
{
|
||||||
public Guid ReadingClinicalDataId { get; set; }
|
public Guid ReadingClinicalDataId { get; set; }
|
||||||
}
|
}
|
||||||
@@ -283,7 +308,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
|
|
||||||
|
|
||||||
public class PMClinicalDataConfirmCommand
|
public class PMClinicalDataConfirmCommand
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -310,11 +335,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid ReadingId { get; set; }
|
public Guid ReadingId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC是否正在申请撤回
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCRCApplicationRevoke { get; set; } = false;
|
||||||
|
public bool IsCRCConfirm { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
public bool IsPMConfirm { get; set; } = false;
|
||||||
/// 项目配置临床类型Name
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
public string ClinicalDataSetName { get; set; }
|
/// 项目配置临床类型Name
|
||||||
|
/// </summary>
|
||||||
|
public string ClinicalDataSetName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 英文名称
|
/// 英文名称
|
||||||
@@ -363,11 +395,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsCRCUpload { get; set; }
|
public bool IsCRCUpload { get; set; }
|
||||||
|
|
||||||
|
public bool IsNeedMerge { get; set; } = false;
|
||||||
|
|
||||||
|
public Guid ReadModuleId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否签名
|
/// 是否签名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsSign { get; set; }
|
public bool IsSign { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -395,6 +431,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
public List<ClinicalFromData> ClinicalFromList { get; set; }
|
||||||
|
|
||||||
public List<GetFileDto> FileList { get; set; } = new List<GetFileDto>();
|
public List<GetFileDto> FileList { get; set; } = new List<GetFileDto>();
|
||||||
|
|
||||||
|
|
||||||
@@ -404,6 +442,19 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class ClinicalFromData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 表单Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid ClinicalFormId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 检查日期
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? CheckDate { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class GetFileDto
|
public class GetFileDto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -332,6 +332,54 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
public List<AdditionalQuestionAnswer> AnswerList { get; set; } = new List<AdditionalQuestionAnswer>();
|
public List<AdditionalQuestionAnswer> AnswerList { get; set; } = new List<AdditionalQuestionAnswer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GetCustomTagInDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 任务Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ReadingCustomTagDto
|
||||||
|
{
|
||||||
|
public Guid? Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 任务Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// StudyId
|
||||||
|
/// </summary>
|
||||||
|
public Guid? StudyId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SeriesId
|
||||||
|
/// </summary>
|
||||||
|
public Guid? SeriesId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// InstanceId
|
||||||
|
/// </summary>
|
||||||
|
public Guid? InstanceId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MeasureData
|
||||||
|
/// </summary>
|
||||||
|
public string MeasureData { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CreateTime
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CreateUserId
|
||||||
|
/// </summary>
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class GetManualListInDto
|
public class GetManualListInDto
|
||||||
{
|
{
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
|||||||
@@ -319,6 +319,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||||||
public List<GetMedicineQuestionPreviewOutDto> Childrens { get; set; }
|
public List<GetMedicineQuestionPreviewOutDto> Childrens { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class EmptMedicineTrialQuestionInDto
|
||||||
|
{
|
||||||
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
///<summary>ReadingMedicineTrialQuestionQuery 列表查询参数模型</summary>
|
///<summary>ReadingMedicineTrialQuestionQuery 列表查询参数模型</summary>
|
||||||
public class ReadingMedicineTrialQuestionQuery:PageInput
|
public class ReadingMedicineTrialQuestionQuery:PageInput
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -514,11 +514,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string QuestionEnName { get; set; } = string.Empty;
|
public string QuestionEnName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
public List<string> ParentTriggerValueList { get; set; }
|
||||||
|
public List<string> RelevanceValueList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public class ReadingCriterionPageView
|
public class ReadingCriterionPageView
|
||||||
{
|
{
|
||||||
@@ -1038,10 +1039,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ValueOfType? ValueType { get; set; }
|
public ValueOfType? ValueType { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
public List<string> ParentTriggerValueList { get; set; }
|
||||||
/// 备注
|
public List<string> RelevanceValueList { get; set; }
|
||||||
/// </summary>
|
|
||||||
public string Remark { get; set; }
|
/// <summary>
|
||||||
|
/// 备注
|
||||||
|
/// </summary>
|
||||||
|
public string Remark { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数据来源
|
/// 数据来源
|
||||||
@@ -1730,7 +1734,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||||||
/// 问题英文分组
|
/// 问题英文分组
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GroupEnName { get; set; } = string.Empty;
|
public string GroupEnName { get; set; } = string.Empty;
|
||||||
}
|
|
||||||
|
public List<string> ParentTriggerValueList { get; set; }
|
||||||
|
public List<string> RelevanceValueList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Service.Reading.Interface
|
||||||
|
{
|
||||||
|
public interface IClinicalAnswerService
|
||||||
|
{
|
||||||
|
Task<IResponseOutput> CRCSignClinicalData(CRCSignClinicalDataInDto inDto);
|
||||||
|
|
||||||
|
Task AutoAddCRCClinical(AutoAddClinicalInDto inDto);
|
||||||
|
|
||||||
|
Task<IResponseOutput> PMConfirmClinical(CRCConfirmClinicalInDto inDto);
|
||||||
|
|
||||||
|
Task<IResponseOutput> SubmitClinicalForm(SubmitClinicalFormInDto inDto);
|
||||||
|
|
||||||
|
Task<IResponseOutput> CRCConfirmClinical(CRCConfirmClinicalInDto inDto);
|
||||||
|
|
||||||
|
Task<IResponseOutput> CRCCancelConfirmClinical(CRCCancelConfirmClinicalInDto inDto);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,5 +23,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
// Task<(List<GetReadingClinicalDataListOutDto>, object)> GetReadingClinicalDataList(GetReadingClinicalDataListIndto inDto);
|
// Task<(List<GetReadingClinicalDataListOutDto>, object)> GetReadingClinicalDataList(GetReadingClinicalDataListIndto inDto);
|
||||||
|
|
||||||
Task<List<GetReadingClinicalDataListOutDto>> GetReadingClinicalList(GetReadingClinicalDataListIndto inDto);
|
Task<List<GetReadingClinicalDataListOutDto>> GetReadingClinicalList(GetReadingClinicalDataListIndto inDto);
|
||||||
|
|
||||||
|
Task DealVisiTaskClinicalDataSignedAsync(Guid trialId, Guid subjectId, Guid readingId, bool isVisit, Guid trialReadingCritrialId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+20
-7
@@ -138,16 +138,29 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
return ResponseOutput.Result(result);
|
return ResponseOutput.Result(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 项目
|
#region 项目
|
||||||
|
|
||||||
/// 获取项目的医学审核问题
|
/// <summary>
|
||||||
/// </summary>
|
/// 清空医学审核问题
|
||||||
/// <param name="inDto"></param>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <param name="inDto"></param>
|
||||||
[HttpPost]
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> EmptMedicineTrialQuestion(EmptMedicineTrialQuestionInDto inDto)
|
||||||
|
{
|
||||||
|
await _readingMedicineTrialQuestionRepository.DeleteFromQueryAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId);
|
||||||
|
await _readingMedicineTrialQuestionRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Result(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 获取项目的医学审核问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
public async Task<(PageOutput<ReadingMedicineTrialQuestionView>, object)> GetReadingMedicineTrialQuestionList(ReadingMedicineTrialQuestionQuery inDto)
|
public async Task<(PageOutput<ReadingMedicineTrialQuestionView>, object)> GetReadingMedicineTrialQuestionList(ReadingMedicineTrialQuestionQuery inDto)
|
||||||
{
|
{
|
||||||
var query = _readingMedicineTrialQuestionRepository.AsQueryable()
|
var query = _readingMedicineTrialQuestionRepository.AsQueryable()
|
||||||
|
|||||||
@@ -271,6 +271,8 @@ namespace IRaCIS.Application.Services
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AddOrUpdateReadingQuestionSystem(AddOrUpdateReadingQuestionSystemInDto indto)
|
public async Task<IResponseOutput> AddOrUpdateReadingQuestionSystem(AddOrUpdateReadingQuestionSystemInDto indto)
|
||||||
{
|
{
|
||||||
|
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||||
|
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
||||||
if (indto.Id != null)
|
if (indto.Id != null)
|
||||||
{
|
{
|
||||||
var trialIdList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionSystemId == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None)
|
var trialIdList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionSystemId == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None)
|
||||||
@@ -371,10 +373,11 @@ namespace IRaCIS.Application.Services
|
|||||||
/// <param name="addOrEditReadingTableQuestionSystem"></param>
|
/// <param name="addOrEditReadingTableQuestionSystem"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AddOrUpdateReadingTableQuestionSystem(ReadingTableQuestionSystemAddOrEdit addOrEditReadingTableQuestionSystem)
|
public async Task<IResponseOutput> AddOrUpdateReadingTableQuestionSystem(ReadingTableQuestionSystemAddOrEdit indto)
|
||||||
{
|
{
|
||||||
|
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||||
var entity = await _readingTableQuestionSystemRepository.InsertOrUpdateAsync(addOrEditReadingTableQuestionSystem, true);
|
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
||||||
|
var entity = await _readingTableQuestionSystemRepository.InsertOrUpdateAsync(indto, true);
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
|
|||||||
+3
-1
@@ -113,7 +113,7 @@ namespace IRaCIS.Application.Services
|
|||||||
foreach (var item in inDto.QuestionList)
|
foreach (var item in inDto.QuestionList)
|
||||||
{
|
{
|
||||||
|
|
||||||
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId && x.TaskId == visitTaskId && x.GlobalAnswerType == item.GlobalAnswerType && x.QuestionId == item.QuestionId);
|
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId && x.TaskId == item.VisitTaskId && x.GlobalAnswerType == item.GlobalAnswerType && x.QuestionId == item.QuestionId);
|
||||||
|
|
||||||
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == item.QuestionId
|
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == item.QuestionId
|
||||||
&& x.Answer != item.Answer && item.Answer != string.Empty && item.Answer != null
|
&& x.Answer != item.Answer && item.Answer != string.Empty && item.Answer != null
|
||||||
@@ -124,6 +124,7 @@ namespace IRaCIS.Application.Services
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var createtime = DateTime.Now;
|
||||||
await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()
|
await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()
|
||||||
{
|
{
|
||||||
Answer = x.Answer,
|
Answer = x.Answer,
|
||||||
@@ -133,6 +134,7 @@ namespace IRaCIS.Application.Services
|
|||||||
GlobalAnswerType = x.GlobalAnswerType,
|
GlobalAnswerType = x.GlobalAnswerType,
|
||||||
TaskId = x.VisitTaskId,
|
TaskId = x.VisitTaskId,
|
||||||
TrialId = inDto.TrialId,
|
TrialId = inDto.TrialId,
|
||||||
|
CreateTime= createtime,
|
||||||
}).ToList());
|
}).ToList());
|
||||||
|
|
||||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == inDto.GlobalTaskId, u => new VisitTask() { ReadingTaskState = ReadingTaskState.Reading });
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == inDto.GlobalTaskId, u => new VisitTask() { ReadingTaskState = ReadingTaskState.Reading });
|
||||||
|
|||||||
+57
-3
@@ -45,6 +45,7 @@ namespace IRaCIS.Application.Services
|
|||||||
private readonly IRepository<OrganInfo> _organInfoRepository;
|
private readonly IRepository<OrganInfo> _organInfoRepository;
|
||||||
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
||||||
private readonly IRepository<User> _userRepository;
|
private readonly IRepository<User> _userRepository;
|
||||||
|
private readonly IRepository<ReadingCustomTag> _readingCustomTagRepository;
|
||||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||||
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
|
private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository;
|
||||||
@@ -84,6 +85,7 @@ namespace IRaCIS.Application.Services
|
|||||||
IRepository<OrganInfo> organInfoRepository,
|
IRepository<OrganInfo> organInfoRepository,
|
||||||
IRepository<TrialDocument> trialDocumentRepository,
|
IRepository<TrialDocument> trialDocumentRepository,
|
||||||
IRepository<User> userRepository,
|
IRepository<User> userRepository,
|
||||||
|
IRepository<ReadingCustomTag> readingCustomTagRepository,
|
||||||
IMemoryCache cache,
|
IMemoryCache cache,
|
||||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||||
@@ -121,6 +123,7 @@ namespace IRaCIS.Application.Services
|
|||||||
this._organInfoRepository = organInfoRepository;
|
this._organInfoRepository = organInfoRepository;
|
||||||
this._trialDocumentRepository = trialDocumentRepository;
|
this._trialDocumentRepository = trialDocumentRepository;
|
||||||
this._userRepository = userRepository;
|
this._userRepository = userRepository;
|
||||||
|
this._readingCustomTagRepository = readingCustomTagRepository;
|
||||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||||
this._tumorAssessmentRepository = tumorAssessmentRepository;
|
this._tumorAssessmentRepository = tumorAssessmentRepository;
|
||||||
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
||||||
@@ -138,6 +141,43 @@ namespace IRaCIS.Application.Services
|
|||||||
this._trialEmailNoticeConfigService = trialEmailNoticeConfigService;
|
this._trialEmailNoticeConfigService = trialEmailNoticeConfigService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 提交自定义标记
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> SubmitCustomTag(ReadingCustomTagDto inDto)
|
||||||
|
{
|
||||||
|
var entity = await _readingCustomTagRepository.InsertOrUpdateAsync(inDto, true);
|
||||||
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除自定义标记
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost("{id:guid}")]
|
||||||
|
public async Task<IResponseOutput> DeleteCustomTag(Guid id)
|
||||||
|
{
|
||||||
|
var success = await _readingCustomTagRepository.DeleteFromQueryAsync(t => t.Id == id, true);
|
||||||
|
return ResponseOutput.Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取自定义标记
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inQuery"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<ReadingCustomTagDto>> GetCustomTag(GetCustomTagInDto inQuery)
|
||||||
|
{
|
||||||
|
var result= await _readingCustomTagRepository.Where(x => x.VisitTaskId == inQuery.VisitTaskId).ProjectTo<ReadingCustomTagDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取手册
|
/// 获取手册
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2211,6 +2251,7 @@ namespace IRaCIS.Application.Services
|
|||||||
SubjectId = taskInfo.SubjectId,
|
SubjectId = taskInfo.SubjectId,
|
||||||
TrialId = taskInfo.TrialId,
|
TrialId = taskInfo.TrialId,
|
||||||
VisitTaskId = taskInfo.Id,
|
VisitTaskId = taskInfo.Id,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var isBaseLine = false;
|
var isBaseLine = false;
|
||||||
@@ -2331,9 +2372,22 @@ namespace IRaCIS.Application.Services
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
task = await _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id
|
var query = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id
|
||||||
&& x.TrialReadingCriterionId == trialReadingCriterionId
|
&& x.TrialReadingCriterionId == trialReadingCriterionId
|
||||||
&& x.TaskState == TaskState.Effect).Select(x => new GetReadingTaskDto()
|
&& x.TaskState == TaskState.Effect);
|
||||||
|
var count = await query.CountAsync();
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"]);
|
||||||
|
}
|
||||||
|
Random random = new Random();
|
||||||
|
var skipcount = 0;
|
||||||
|
if (count >= 2)
|
||||||
|
{
|
||||||
|
skipcount = random.Next(0, count - 1);
|
||||||
|
}
|
||||||
|
task = await query
|
||||||
|
.Select(x => new GetReadingTaskDto()
|
||||||
{
|
{
|
||||||
VisitTaskId = x.Id,
|
VisitTaskId = x.Id,
|
||||||
ArmEnum = x.ArmEnum,
|
ArmEnum = x.ArmEnum,
|
||||||
@@ -2344,7 +2398,7 @@ namespace IRaCIS.Application.Services
|
|||||||
SubjectId = x.SubjectId,
|
SubjectId = x.SubjectId,
|
||||||
SubjectCode = x.Subject.Code,
|
SubjectCode = x.Subject.Code,
|
||||||
TrialReadingCriterionId = x.TrialReadingCriterionId,
|
TrialReadingCriterionId = x.TrialReadingCriterionId,
|
||||||
}).FirstOrDefaultAsync();
|
}).Skip(skipcount).FirstOrDefaultAsync();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using IRaCIS.Core.Application.Service;
|
|||||||
using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
using IRaCIS.Core.Application.Filter;
|
using IRaCIS.Core.Application.Filter;
|
||||||
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
@@ -25,6 +26,7 @@ namespace IRaCIS.Application.Services
|
|||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
private readonly IVisitTaskHelpeService _visitTaskHelpeService;
|
private readonly IVisitTaskHelpeService _visitTaskHelpeService;
|
||||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
|
private readonly IRepository<ReadModuleCriterionFrom> _readModuleCriterionFromRepository;
|
||||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||||
private readonly IRepository<ReadModuleView> _readModuleViewRepository;
|
private readonly IRepository<ReadModuleView> _readModuleViewRepository;
|
||||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
||||||
@@ -41,6 +43,7 @@ namespace IRaCIS.Application.Services
|
|||||||
IRepository<Trial> trialRepository,
|
IRepository<Trial> trialRepository,
|
||||||
IVisitTaskHelpeService visitTaskHelpeService,
|
IVisitTaskHelpeService visitTaskHelpeService,
|
||||||
IRepository<VisitTask> visitTaskRepository,
|
IRepository<VisitTask> visitTaskRepository,
|
||||||
|
IRepository<ReadModuleCriterionFrom> readModuleCriterionFromRepository,
|
||||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
||||||
IRepository<ReadModuleView> readModuleViewRepository,
|
IRepository<ReadModuleView> readModuleViewRepository,
|
||||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||||
@@ -57,6 +60,7 @@ namespace IRaCIS.Application.Services
|
|||||||
this._trialRepository = trialRepository;
|
this._trialRepository = trialRepository;
|
||||||
this._visitTaskHelpeService = visitTaskHelpeService;
|
this._visitTaskHelpeService = visitTaskHelpeService;
|
||||||
this._visitTaskRepository = visitTaskRepository;
|
this._visitTaskRepository = visitTaskRepository;
|
||||||
|
this._readModuleCriterionFromRepository = readModuleCriterionFromRepository;
|
||||||
this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
|
this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
|
||||||
this._readModuleViewRepository = readModuleViewRepository;
|
this._readModuleViewRepository = readModuleViewRepository;
|
||||||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||||
@@ -115,6 +119,13 @@ namespace IRaCIS.Application.Services
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<bool> ChangeCutOffVisit(ChangeCutOffVisitInDto inDto)
|
public async Task<bool> ChangeCutOffVisit(ChangeCutOffVisitInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (await _readModuleRepository.AnyAsync(x => x.Id == inDto.Id && x.IsCRCConfirm))
|
||||||
|
{
|
||||||
|
//---CRC已经确认临床数据 不允许编辑
|
||||||
|
throw new BusinessValidationFailedException(_localizer["ReadModule_CRCConfirmCanNtoEdit"]);
|
||||||
|
}
|
||||||
|
|
||||||
await _readModuleRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new ReadModule() {
|
await _readModuleRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new ReadModule() {
|
||||||
SubjectVisitId=inDto.SubjectVisitIdId,
|
SubjectVisitId=inDto.SubjectVisitIdId,
|
||||||
ModuleName=inDto.Name,
|
ModuleName=inDto.Name,
|
||||||
@@ -137,16 +148,16 @@ namespace IRaCIS.Application.Services
|
|||||||
dto.SortField = nameof(ReadModuleView.SubjectCode);
|
dto.SortField = nameof(ReadModuleView.SubjectCode);
|
||||||
dto.Asc = true;
|
dto.Asc = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
dto.SortField = dto.Asc ? dto.SortField : dto.SortField + " desc";
|
dto.SortField = dto.Asc ? dto.SortField : dto.SortField + " desc";
|
||||||
var subjectQuery = _readModuleViewRepository.Where(x => x.TrialReadingCriterionId == dto.TrialReadingCriterionId)
|
var subjectQuery = _readModuleViewRepository.Where(x => x.TrialReadingCriterionId == dto.TrialReadingCriterionId)
|
||||||
.WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId)
|
.WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId)
|
||||||
.WhereIf(dto.SubjectId != null, x => x.SubjectId == dto.SubjectId)
|
.WhereIf(dto.SubjectId != null, x => x.SubjectId == dto.SubjectId)
|
||||||
.WhereIf(dto.TrialSiteCode != null && dto.TrialSiteCode != string.Empty, x => x.TrialSiteCode.Contains(dto.TrialSiteCode))
|
.WhereIf(dto.TrialSiteCode != null && dto.TrialSiteCode != string.Empty, x => x.TrialSiteCode.Contains(dto.TrialSiteCode))
|
||||||
.WhereIf(dto.SubjectCode != null && dto.SubjectCode != string.Empty, x => x.SubjectCode.Contains(dto.SubjectCode))
|
.WhereIf(dto.SubjectCode != null && dto.SubjectCode != string.Empty, x => x.SubjectCode.Contains(dto.SubjectCode))
|
||||||
.WhereIf(dto.ModuleType != null, x => x.ModuleType == dto.ModuleType)
|
.WhereIf(dto.ModuleType != null, x => x.ModuleType == dto.ModuleType)
|
||||||
.WhereIf(dto.ReadingStatus != null, x => x.ReadingStatus == dto.ReadingStatus)
|
.WhereIf(dto.ReadingStatus != null, x => x.ReadingStatus == dto.ReadingStatus)
|
||||||
.WhereIf(dto.Name != null, x => x.Name.Contains(dto.Name!)).OrderBy(x => x.SiteCode);
|
.WhereIf(dto.Name != null, x => x.Name.Contains(dto.Name!)).OrderBy(x => x.SiteCode);
|
||||||
|
|
||||||
var subjectIds = await subjectQuery.OrderBy(dto.SortField).Select(x => x.SubjectId).Distinct().Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
var subjectIds = await subjectQuery.OrderBy(dto.SortField).Select(x => x.SubjectId).Distinct().Skip((dto.PageIndex - 1) * dto.PageSize).Take(dto.PageSize).ToListAsync();
|
||||||
|
|
||||||
@@ -480,6 +491,14 @@ namespace IRaCIS.Application.Services
|
|||||||
return ResponseOutput.NotOk(_localizer["ReadModule_SignedDataCannotDelete"]);
|
return ResponseOutput.NotOk(_localizer["ReadModule_SignedDataCannotDelete"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (await _readModuleRepository.AnyAsync(x => x.Id == readModuleId&&x.IsCRCConfirm))
|
||||||
|
{
|
||||||
|
//---CRC已经确认临床数据 不允许删除
|
||||||
|
return ResponseOutput.NotOk(_localizer["ReadModule_CRCConfirmClinicalData"]);
|
||||||
|
}
|
||||||
|
|
||||||
//增加标准
|
//增加标准
|
||||||
if (readModule.ModuleType==ModuleTypeEnum.Global&&(await _readModuleRepository.AnyAsync(x=>x.ModuleType==ModuleTypeEnum.Oncology&&x.SubjectVisitId== readModule.SubjectVisitId && x.TrialReadingCriterionId==readModule.TrialReadingCriterionId)))
|
if (readModule.ModuleType==ModuleTypeEnum.Global&&(await _readModuleRepository.AnyAsync(x=>x.ModuleType==ModuleTypeEnum.Oncology&&x.SubjectVisitId== readModule.SubjectVisitId && x.TrialReadingCriterionId==readModule.TrialReadingCriterionId)))
|
||||||
{
|
{
|
||||||
@@ -499,6 +518,7 @@ namespace IRaCIS.Application.Services
|
|||||||
TaskState = TaskState.Adbandon
|
TaskState = TaskState.Adbandon
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await _readModuleRepository.UpdatePartialFromQueryAsync(t => t.Id == readModuleId, x => new ReadModule()
|
await _readModuleRepository.UpdatePartialFromQueryAsync(t => t.Id == readModuleId, x => new ReadModule()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,10 +18,15 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
var isEn_Us=false;
|
var isEn_Us=false;
|
||||||
|
|
||||||
#region 临床问题
|
#region 临床问题
|
||||||
CreateMap<TrialClinicalQuestion, TrialClinicalQuestionDto>();
|
CreateMap<TrialClinicalQuestion, TrialClinicalQuestionDto>()
|
||||||
|
.ForMember(d => d.GroupName, opt => opt.MapFrom(src => src.GroupQuestin.QuestionName))
|
||||||
|
.ForMember(d => d.GroupEnName, opt => opt.MapFrom(src => src.GroupQuestin.QuestionEnName));
|
||||||
|
|
||||||
CreateMap<TrialClinicalQuestionDto, TrialClinicalQuestion>();
|
CreateMap<TrialClinicalQuestionDto, TrialClinicalQuestion>();
|
||||||
|
|
||||||
CreateMap<SystemClinicalQuestion, SystemClinicalQuestionDto>();
|
CreateMap<SystemClinicalQuestion, SystemClinicalQuestionDto>()
|
||||||
|
.ForMember(d => d.GroupName, opt => opt.MapFrom(src => src.GroupQuestin.QuestionName))
|
||||||
|
.ForMember(d => d.GroupEnName, opt => opt.MapFrom(src => src.GroupQuestin.QuestionEnName));
|
||||||
CreateMap<SystemClinicalQuestionDto, SystemClinicalQuestion>();
|
CreateMap<SystemClinicalQuestionDto, SystemClinicalQuestion>();
|
||||||
|
|
||||||
CreateMap<SystemClinicalTableQuestion, SystemClinicalTableQuestionDto>();
|
CreateMap<SystemClinicalTableQuestion, SystemClinicalTableQuestionDto>();
|
||||||
@@ -54,7 +59,10 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<ShortcutKey, DefaultShortcutKeyView>();
|
CreateMap<ShortcutKey, DefaultShortcutKeyView>();
|
||||||
|
|
||||||
|
|
||||||
CreateMap<UserWLTemplate, UserWLTemplateView>();
|
CreateMap<ReadingCustomTag, ReadingCustomTagDto>();
|
||||||
|
CreateMap<ReadingCustomTagDto, ReadingCustomTag>();
|
||||||
|
|
||||||
|
CreateMap<UserWLTemplate, UserWLTemplateView>();
|
||||||
CreateMap<UserWLTemplate,UserWLTemplateAddOrEdit>().ReverseMap();
|
CreateMap<UserWLTemplate,UserWLTemplateAddOrEdit>().ReverseMap();
|
||||||
|
|
||||||
CreateMap<ReadingPeriodSetAddOrEdit, ReadingPeriodSet>();
|
CreateMap<ReadingPeriodSetAddOrEdit, ReadingPeriodSet>();
|
||||||
@@ -137,6 +145,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
// 忽略列
|
// 忽略列
|
||||||
CreateMap<ReadingQuestionTrial, DicomReadingQuestionAnswer>()
|
CreateMap<ReadingQuestionTrial, DicomReadingQuestionAnswer>()
|
||||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us?s.QuestionEnName:s.QuestionName))
|
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us?s.QuestionEnName:s.QuestionName))
|
||||||
|
.ForMember(d => d.GroupName, u => u.MapFrom(s => isEn_Us ? s.GroupEnName : s.GroupName))
|
||||||
.ForMember(dest => dest.ReadingCriterionPage, opt => opt.Ignore())
|
.ForMember(dest => dest.ReadingCriterionPage, opt => opt.Ignore())
|
||||||
.ForMember(dest => dest.ParentReadingQuestionTrial, opt => opt.Ignore())
|
.ForMember(dest => dest.ParentReadingQuestionTrial, opt => opt.Ignore())
|
||||||
.ForMember(dest => dest.RelevanceReadingQuestionTrial, opt => opt.Ignore())
|
.ForMember(dest => dest.RelevanceReadingQuestionTrial, opt => opt.Ignore())
|
||||||
@@ -161,6 +170,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
|
|
||||||
CreateMap<ReadingQuestionTrial, TrialReadQuestionData>()
|
CreateMap<ReadingQuestionTrial, TrialReadQuestionData>()
|
||||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName))
|
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName))
|
||||||
|
.ForMember(d => d.GroupName, u => u.MapFrom(s => isEn_Us ? s.GroupEnName : s.GroupName))
|
||||||
.ForMember(d => d.PageShowOrder, u => u.MapFrom(s => s.ReadingCriterionPage.ShowOrder))
|
.ForMember(d => d.PageShowOrder, u => u.MapFrom(s => s.ReadingCriterionPage.ShowOrder))
|
||||||
.ForMember(d => d.PageName, u => u.MapFrom(s => s.ReadingCriterionPage.PageName))
|
.ForMember(d => d.PageName, u => u.MapFrom(s => s.ReadingCriterionPage.PageName))
|
||||||
.ForMember(d => d.IsPublicPage, u => u.MapFrom(s => s.ReadingCriterionPage.IsPublicPage));
|
.ForMember(d => d.IsPublicPage, u => u.MapFrom(s => s.ReadingCriterionPage.IsPublicPage));
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
{CriterionType.PCWG3,typeof(PCWG3CalculateService) },
|
{CriterionType.PCWG3,typeof(PCWG3CalculateService) },
|
||||||
{CriterionType.SelfDefine,typeof(SelfDefineCalculateService) },
|
{CriterionType.SelfDefine,typeof(SelfDefineCalculateService) },
|
||||||
{CriterionType.RECIST1Pointt1_MB,typeof(RECIST1Point1_BMCalculateService) },
|
{CriterionType.RECIST1Pointt1_MB,typeof(RECIST1Point1_BMCalculateService) },
|
||||||
{CriterionType.IRECIST1Point1,typeof(IRECIST1Point1CalculateService) }
|
{CriterionType.IRECIST1Point1,typeof(IRECIST1Point1CalculateService) },
|
||||||
|
{CriterionType.Lugano2014,typeof(LuganoCalculateService) }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -136,7 +136,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||||
{
|
{
|
||||||
QuestionId = x.Id,
|
QuestionId = x.Id,
|
||||||
GroupName = x.GroupName,
|
GroupName = x.GroupName.LanguageName(x.GroupEnName, _userInfo.IsEn_Us),
|
||||||
IsShowInDicom = x.IsShowInDicom,
|
IsShowInDicom = x.IsShowInDicom,
|
||||||
Type = x.Type,
|
Type = x.Type,
|
||||||
GroupId=x.GroupId,
|
GroupId=x.GroupId,
|
||||||
@@ -163,7 +163,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||||||
{
|
{
|
||||||
item.Childrens = questionList.Where(x => x.GroupId==item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
item.Childrens = questionList.Where(x => x.GroupId==item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||||
{
|
{
|
||||||
GroupName = x.GroupName,
|
GroupName = x.GroupName.LanguageName(x.GroupEnName, _userInfo.IsEn_Us),
|
||||||
QuestionId = x.Id,
|
QuestionId = x.Id,
|
||||||
IsShowInDicom = x.IsShowInDicom,
|
IsShowInDicom = x.IsShowInDicom,
|
||||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
|
|
||||||
public string TrialRoleName { get; set; }
|
public string TrialRoleName { get; set; }
|
||||||
|
|
||||||
|
public string TrialRoleCode { get; set; }
|
||||||
|
|
||||||
|
public UserTypeEnum? UserTypeEnum { get; set; }
|
||||||
|
|
||||||
public Guid? SystemUserId { get; set; }
|
public Guid? SystemUserId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
var trialSiteUserSurveyQueryable = _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId)
|
var trialSiteUserSurveyQueryable = _trialSiteUserSurveyRepository.Where(t => t.TrialSiteSurveyId == trialSiteSurveyId)
|
||||||
//.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM, t => t.TrialSiteSurvey.State >= TrialSiteSurveyEnum.CRCSubmitted)
|
//.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM, t => t.TrialSiteSurvey.State >= TrialSiteSurveyEnum.CRCSubmitted)
|
||||||
//.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM|| _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM, t => t.TrialSiteSurvey.State >= TrialSiteSurveyEnum.SPMApproved)
|
//.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM|| _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM, t => t.TrialSiteSurvey.State >= TrialSiteSurveyEnum.SPMApproved)
|
||||||
.ProjectTo<TrialSiteUserSurveyView>(_mapper.ConfigurationProvider);
|
.ProjectTo<TrialSiteUserSurveyView>(_mapper.ConfigurationProvider, new { isEn_Us = _userInfo.IsEn_Us });
|
||||||
|
|
||||||
return await trialSiteUserSurveyQueryable.ToListAsync();
|
return await trialSiteUserSurveyQueryable.ToListAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,9 +33,13 @@ namespace IRaCIS.Core.Application.AutoMapper
|
|||||||
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Site.SiteName))
|
.ForMember(d => d.SiteName, u => u.MapFrom(s => s.Site.SiteName))
|
||||||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode));
|
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode));
|
||||||
|
|
||||||
|
|
||||||
|
var isEn_Us = false;
|
||||||
CreateMap<TrialSiteUserSurvey, TrialSiteUserSurveyView>()
|
CreateMap<TrialSiteUserSurvey, TrialSiteUserSurveyView>()
|
||||||
.ForMember(t => t.TrialRoleName, u => u.MapFrom(d => d.TrialRoleName.Value))
|
.ForMember(t => t.TrialRoleName, u => u.MapFrom(d => isEn_Us? d.TrialRoleName.Value:d.TrialRoleName.ValueCN))
|
||||||
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName));
|
.ForMember(t => t.TrialRoleCode, u => u.MapFrom(d => d.TrialRoleName.Code))
|
||||||
|
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
||||||
|
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.UserTypeRole.UserTypeEnum));
|
||||||
|
|
||||||
|
|
||||||
CreateMap<Trial, TrialSurveyInitInfo>()
|
CreateMap<Trial, TrialSurveyInitInfo>()
|
||||||
@@ -67,7 +71,8 @@ namespace IRaCIS.Core.Application.AutoMapper
|
|||||||
CreateMap<TrialSiteUserSurvey, TrialSiteUserSurveyAllDTO>()
|
CreateMap<TrialSiteUserSurvey, TrialSiteUserSurveyAllDTO>()
|
||||||
.ForMember(t=>t.TrialSiteSurvey,u=>u.MapFrom(c=>c.TrialSiteSurvey))
|
.ForMember(t=>t.TrialSiteSurvey,u=>u.MapFrom(c=>c.TrialSiteSurvey))
|
||||||
.ForMember(t => t.TrialRoleName, u => u.MapFrom(d => d.TrialRoleName.Value))
|
.ForMember(t => t.TrialRoleName, u => u.MapFrom(d => d.TrialRoleName.Value))
|
||||||
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName));
|
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
||||||
|
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.UserTypeRole.UserTypeEnum));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -105,10 +105,13 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public int? ToBeApprovalCount { get; set; }
|
public int? ToBeApprovalCount { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GetPMClinicalDataToBeDoneListOutDto: TrialBaseInfoDto
|
||||||
|
{
|
||||||
|
public int? ToBeApprovalCount { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class ReviewerSelectToBeDoneQuery : PageInput
|
public class ReviewerSelectToBeDoneQuery : PageInput
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ReviewerSelectToBeDoneDto : TrialBaseInfoDto
|
public class ReviewerSelectToBeDoneDto : TrialBaseInfoDto
|
||||||
@@ -253,6 +256,12 @@ namespace IRaCIS.Core.Application.Contracts
|
|||||||
public int? UrgentCount { get; set; }
|
public int? UrgentCount { get; set; }
|
||||||
|
|
||||||
public int? ToBeDealedCount { get; set; }
|
public int? ToBeDealedCount { get; set; }
|
||||||
|
|
||||||
|
public int? ToAllCount { get; set; }
|
||||||
|
|
||||||
|
public int? ToBeVisitCount { get; set; }
|
||||||
|
|
||||||
|
public int? ReadModuleCount { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class TrialToBeDoneQuery : PageInput
|
public class TrialToBeDoneQuery : PageInput
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using IRaCIS.Core.Infrastructure;
|
|||||||
using IRaCIS.Core.Infrastructure.Extention;
|
using IRaCIS.Core.Infrastructure.Extention;
|
||||||
using MathNet.Numerics;
|
using MathNet.Numerics;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Linq.Dynamic.Core;
|
using System.Linq.Dynamic.Core;
|
||||||
|
|
||||||
@@ -20,15 +21,19 @@ namespace IRaCIS.Core.Application
|
|||||||
private readonly IRepository<TrialUser> _trialUserRepository;
|
private readonly IRepository<TrialUser> _trialUserRepository;
|
||||||
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
||||||
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
||||||
|
private readonly IRepository<ReadModule> _readModuleRepository;
|
||||||
private readonly IRepository<SystemNotice> _systemNoticeRepository;
|
private readonly IRepository<SystemNotice> _systemNoticeRepository;
|
||||||
|
|
||||||
public PersonalWorkstation(IRepository<Trial> trialRepository, IRepository<TrialUser> trialUserRepository, IRepository<TrialDocument> trialDocumentRepository,
|
public PersonalWorkstation(IRepository<Trial> trialRepository, IRepository<TrialUser> trialUserRepository, IRepository<TrialDocument> trialDocumentRepository,
|
||||||
IRepository<SystemDocument> systemDocumentRepository, IRepository<SystemNotice> systemNoticeRepository)
|
IRepository<SystemDocument> systemDocumentRepository,
|
||||||
|
IRepository<ReadModule> readModuleRepository,
|
||||||
|
IRepository<SystemNotice> systemNoticeRepository)
|
||||||
{
|
{
|
||||||
_trialRepository = trialRepository;
|
_trialRepository = trialRepository;
|
||||||
_trialUserRepository = trialUserRepository;
|
_trialUserRepository = trialUserRepository;
|
||||||
_trialDocumentRepository = trialDocumentRepository;
|
_trialDocumentRepository = trialDocumentRepository;
|
||||||
_systemDocumentRepository = systemDocumentRepository;
|
_systemDocumentRepository = systemDocumentRepository;
|
||||||
|
this._readModuleRepository = readModuleRepository;
|
||||||
_systemNoticeRepository = systemNoticeRepository;
|
_systemNoticeRepository = systemNoticeRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -200,7 +205,7 @@ namespace IRaCIS.Core.Application
|
|||||||
|
|
||||||
ToBeRepliedCount = t.SubjectVisitList.Where(u => u.CheckState == CheckStateEnum.CVIng &&
|
ToBeRepliedCount = t.SubjectVisitList.Where(u => u.CheckState == CheckStateEnum.CVIng &&
|
||||||
u.CheckChallengeDialogList.OrderByDescending(t => t.CreateTime).First().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count(),
|
u.CheckChallengeDialogList.OrderByDescending(t => t.CreateTime).First().UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count(),
|
||||||
});
|
}).Where(x => x.ToBeRepliedCount > 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -243,7 +248,7 @@ namespace IRaCIS.Core.Application
|
|||||||
UrgentCount = g.Where(u => u.OriginalReReadingTask.IsUrgent == true).Count(),
|
UrgentCount = g.Where(u => u.OriginalReReadingTask.IsUrgent == true).Count(),
|
||||||
ToBeApprovalCount = g.Count(),
|
ToBeApprovalCount = g.Count(),
|
||||||
|
|
||||||
});
|
}).Where(x => x.ToBeApprovalCount > 0);
|
||||||
|
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReReadingApplyToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReReadingApplyToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
@@ -281,7 +286,7 @@ namespace IRaCIS.Core.Application
|
|||||||
|
|
||||||
IsUrgent = t.IsUrgent || t.IsSubjectExpeditedView,
|
IsUrgent = t.IsUrgent || t.IsSubjectExpeditedView,
|
||||||
ToBeApprovalCount = t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.InviteIntoGroup).Count()
|
ToBeApprovalCount = t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.InviteIntoGroup).Count()
|
||||||
});
|
}).Where(x => x.ToBeApprovalCount > 0);
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReviewerSelectToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReviewerSelectToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
@@ -293,6 +298,43 @@ namespace IRaCIS.Core.Application
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取PM核对临床数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inQuery"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput<PageOutput<GetPMClinicalDataToBeDoneListOutDto>>> GetPMClinicalDataToBeDoneList(ReviewerSelectToBeDoneQuery inQuery)
|
||||||
|
{
|
||||||
|
|
||||||
|
var query = _trialRepository
|
||||||
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
|
.Select(t => new GetPMClinicalDataToBeDoneListOutDto()
|
||||||
|
{
|
||||||
|
TrialId = t.Id,
|
||||||
|
ResearchProgramNo = t.ResearchProgramNo,
|
||||||
|
ExperimentName = t.ExperimentName,
|
||||||
|
TrialCode = t.TrialCode,
|
||||||
|
|
||||||
|
|
||||||
|
ToBeApprovalCount = t.ReadModuleList.Where(u => u.IsCRCConfirm&&!u.IsPMConfirm).Count()
|
||||||
|
}).Where(x => x.ToBeApprovalCount > 0);
|
||||||
|
|
||||||
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReviewerSelectToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
|
|
||||||
|
var all =await _trialRepository
|
||||||
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
|
.Select(t => new GetPMClinicalDataToBeDoneListOutDto()
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
ToBeApprovalCount = t.ReadModuleList.Where(u => u.IsCRCConfirm && !u.IsPMConfirm).Count()
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(result, new { ToBeApprovalCount = all.Sum(x=>x.ToBeApprovalCount) }); ;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
@@ -321,7 +363,7 @@ namespace IRaCIS.Core.Application
|
|||||||
|
|
||||||
IsUrgent = t.IsUrgent || t.IsSubjectExpeditedView,
|
IsUrgent = t.IsUrgent || t.IsSubjectExpeditedView,
|
||||||
ToBeApprovalCount = t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count()
|
ToBeApprovalCount = t.EnrollList.Where(u => u.EnrollStatus == EnrollStatus.HasCommittedToCRO).Count()
|
||||||
});
|
}).Where(x => x.ToBeApprovalCount > 0) ;
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReviewerSelectToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReviewerSelectToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
@@ -333,14 +375,14 @@ namespace IRaCIS.Core.Application
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 重阅审批
|
/// SPM 重阅审批
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inQuery"></param>
|
/// <param name="inQuery"></param>
|
||||||
/// <param name="_visitTaskReReadingRepository"></param>
|
/// <param name="_visitTaskReReadingRepository"></param>
|
||||||
/// <param name="_trialRepository"></param>
|
/// <param name="_trialRepository"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput<PageOutput<ReReadingApprovalToBeDoneDto>>> GetReReadingApprovalToBeDoneToBeDoneList(ReReadingApprovalToBeDoneQuery inQuery,
|
public async Task<IResponseOutput<PageOutput<ReReadingApprovalToBeDoneDto>>> GetSPMReReadingApprovalToBeDoneList(ReReadingApprovalToBeDoneQuery inQuery,
|
||||||
[FromServices] IRepository<VisitTaskReReading> _visitTaskReReadingRepository,
|
[FromServices] IRepository<VisitTaskReReading> _visitTaskReReadingRepository,
|
||||||
[FromServices] IRepository<Trial> _trialRepository)
|
[FromServices] IRepository<Trial> _trialRepository)
|
||||||
|
|
||||||
@@ -358,7 +400,7 @@ namespace IRaCIS.Core.Application
|
|||||||
UrgentCount = g.Where(u => u.OriginalReReadingTask.IsUrgent == true).Count(),
|
UrgentCount = g.Where(u => u.OriginalReReadingTask.IsUrgent == true).Count(),
|
||||||
ToBeApprovalCount = g.Count(),
|
ToBeApprovalCount = g.Count(),
|
||||||
|
|
||||||
});
|
}).Where(x => x.ToBeApprovalCount > 0);
|
||||||
|
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReReadingApprovalToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ReReadingApprovalToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
@@ -399,9 +441,50 @@ namespace IRaCIS.Core.Application
|
|||||||
ExperimentName = t.ExperimentName,
|
ExperimentName = t.ExperimentName,
|
||||||
TrialCode = t.TrialCode,
|
TrialCode = t.TrialCode,
|
||||||
UrgentCount = t.SubjectVisitList.Where(u => u.IsBaseLine && u.SubmitState != SubmitStateEnum.Submitted && u.IsUrgent).Count(),
|
UrgentCount = t.SubjectVisitList.Where(u => u.IsBaseLine && u.SubmitState != SubmitStateEnum.Submitted && u.IsUrgent).Count(),
|
||||||
ToBeDealedCount = t.SubjectVisitList.Where(u => u.IsBaseLine && u.SubmitState != SubmitStateEnum.Submitted).Count(),
|
ToBeDealedCount = t.ReadingClinicalDataList.Where(x=>!x.IsSign&& x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ClinicalDataTrialSet.ClinicalDataLevel != ClinicalLevel.SubjectVisit&& x.ClinicalDataTrialSet.ClinicalDataLevel != ClinicalLevel.Subject).Count(),
|
||||||
|
ToBeVisitCount= t.ReadingClinicalDataList.Where(x => !x.IsSign && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit).Count(),
|
||||||
|
ToAllCount= t.ReadingClinicalDataList.Where(x => !x.IsSign && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC ).Count(),
|
||||||
|
ReadModuleCount =t.ReadModuleList.Where(x=>!x.IsPMConfirm).Count(),
|
||||||
|
}).Where(x=>x.ToBeDealedCount > 0);
|
||||||
|
|
||||||
});
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageClinicalDataToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
|
var toBeDealedCount = _subjectVisitRepository
|
||||||
|
//.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.Trial.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
|
||||||
|
.Where(u => u.IsBaseLine && u.SubmitState != SubmitStateEnum.Submitted).Count();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(result, new { TotalToBeDealedCount = toBeDealedCount });
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 临床数据 --CRC 待确认
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inQuery"></param>
|
||||||
|
/// <param name="_subjectVisitRepository"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput<PageOutput<ImageClinicalDataToBeDoneDto>>> GetImageClinicalDataToBeConfirmList(ImageClinicalDataToBeDoneQuery inQuery,
|
||||||
|
[FromServices] IRepository<SubjectVisit> _subjectVisitRepository,
|
||||||
|
[FromServices] IRepository<Trial> _trialRepository)
|
||||||
|
{
|
||||||
|
|
||||||
|
var query = _trialRepository
|
||||||
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
|
//.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
|
||||||
|
.Select(t => new ImageClinicalDataToBeDoneDto()
|
||||||
|
{
|
||||||
|
TrialId = t.Id,
|
||||||
|
ResearchProgramNo = t.ResearchProgramNo,
|
||||||
|
ExperimentName = t.ExperimentName,
|
||||||
|
TrialCode = t.TrialCode,
|
||||||
|
UrgentCount = t.SubjectVisitList.Where(u => u.IsBaseLine && u.SubmitState != SubmitStateEnum.Submitted && u.IsUrgent).Count(),
|
||||||
|
ToBeDealedCount = t.ReadingClinicalDataList.Where(x => !x.IsSign && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ClinicalDataTrialSet.ClinicalDataLevel != ClinicalLevel.SubjectVisit && x.ClinicalDataTrialSet.ClinicalDataLevel != ClinicalLevel.Subject).Count(),
|
||||||
|
ToBeVisitCount = t.ReadingClinicalDataList.Where(x => !x.IsSign && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit).Count(),
|
||||||
|
ToAllCount = t.ReadingClinicalDataList.Where(x => !x.IsSign && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC).Count(),
|
||||||
|
ReadModuleCount = t.ReadModuleList.Where(x => !x.IsPMConfirm).Count(),
|
||||||
|
}).Where(x => x.ReadModuleCount > 0);
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageClinicalDataToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageClinicalDataToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
@@ -448,7 +531,7 @@ namespace IRaCIS.Core.Application
|
|||||||
|
|
||||||
.Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC).Count(),
|
.Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC).Count(),
|
||||||
|
|
||||||
});
|
}).Where(x => x.ToBeDealedCount > 0); ;
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageQuestionToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageQuestionToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
@@ -489,7 +572,7 @@ namespace IRaCIS.Core.Application
|
|||||||
ToBeReplyedCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
ToBeReplyedCount = t.SubjectVisitList.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||||
.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count()
|
.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count()
|
||||||
|
|
||||||
});
|
}).Where(x => x.ToBeReplyedCount > 0);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -535,7 +618,7 @@ namespace IRaCIS.Core.Application
|
|||||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||||
.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading).Count(),
|
.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading).Count(),
|
||||||
|
|
||||||
});
|
}).Where(x => x.ToBeReUploadCount > 0);
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageReUploadToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageReUploadToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
@@ -579,7 +662,7 @@ namespace IRaCIS.Core.Application
|
|||||||
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
.Where(c => c.TrialSite.CRCUserList.Any(u => u.UserId == _userInfo.Id))
|
||||||
.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count(),
|
.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count(),
|
||||||
|
|
||||||
});
|
}).Where(x => x.ToBeDealedCount > 0); ;
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageSubmittedToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageSubmittedToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
@@ -632,7 +715,7 @@ namespace IRaCIS.Core.Application
|
|||||||
//待审核通过,统计从已领取到QC提交之间的 已领取 待审核 审核中 (审核完成 领取人就会清理 所以只用查询当前领取人是自己的就好了)
|
//待审核通过,统计从已领取到QC提交之间的 已领取 待审核 审核中 (审核完成 领取人就会清理 所以只用查询当前领取人是自己的就好了)
|
||||||
ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id).Count()
|
ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id).Count()
|
||||||
|
|
||||||
});
|
}).Where(x => x.UrgentCount > 0);
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageQualityToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageQualityToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
@@ -677,7 +760,7 @@ namespace IRaCIS.Core.Application
|
|||||||
ToBeDealedCount = t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
|
ToBeDealedCount = t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
|
||||||
.Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count(),
|
.Where(u => u.CreateUserId == _userInfo.Id && u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Count(),
|
||||||
|
|
||||||
});
|
}).Where(x => x.ToBeDealedCount > 0); ;
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageQuestionToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(ImageQuestionToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
@@ -749,9 +832,9 @@ namespace IRaCIS.Core.Application
|
|||||||
|
|
||||||
HaveSignedCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze)
|
HaveSignedCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze)
|
||||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
|
&& t.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
|
||||||
})
|
}).Where(x => x.UnReadCount > 0);
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
#region 废弃
|
#region 废弃
|
||||||
//var query = _trialRepository
|
//var query = _trialRepository
|
||||||
@@ -871,11 +954,15 @@ namespace IRaCIS.Core.Application
|
|||||||
TrialCode = g.Key.TrialCode,
|
TrialCode = g.Key.TrialCode,
|
||||||
CriterionName = g.Key.CriterionName,
|
CriterionName = g.Key.CriterionName,
|
||||||
TrialReadingCriterionId = g.Key.TrialReadingCriterionId,
|
TrialReadingCriterionId = g.Key.TrialReadingCriterionId,
|
||||||
UrgentCount = g.Where(u => u.VisitTask.IsUrgent
|
|
||||||
&& u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.MIM).Count(),
|
|
||||||
|
|
||||||
ToBeReplyedCount = g.Where(u =>
|
#region 不能对包含聚合或子查询的表达式执行聚合函数
|
||||||
u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.MIM).Count(),
|
|
||||||
|
#endregion
|
||||||
|
//UrgentCount = g.Where(u => u.VisitTask.IsUrgent
|
||||||
|
//&& u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.MIM).Count(),
|
||||||
|
|
||||||
|
//ToBeReplyedCount = g.Where(u =>
|
||||||
|
// u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.MIM).Count(),
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -906,38 +993,43 @@ namespace IRaCIS.Core.Application
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput<PageOutput<MedicalCommentsToBeDoneDto>>> GetMIMMedicalCommentsToBeDoneList(MedicalCommentsToBeDoneQuery inQuery,
|
public async Task<IResponseOutput<PageOutput<MedicalCommentsToBeDoneDto>>> GetMIMMedicalCommentsToBeDoneList(MedicalCommentsToBeDoneQuery inQuery,
|
||||||
[FromServices] IRepository<TaskMedicalReview> _taskMedicalReviewRepository)
|
[FromServices] IRepository<TaskMedicalReview> _taskMedicalReviewRepository,
|
||||||
|
[FromServices] IRepository<ReadingQuestionCriterionTrial> _trialReadingCriterionRepository)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
#region 废弃不能对包含聚合或子查询的表达式执行聚合函数
|
||||||
var query = _taskMedicalReviewRepository
|
var query = _taskMedicalReviewRepository
|
||||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
.Where(t => t.IsClosedDialog == false)
|
.Where(t => t.IsClosedDialog == false)
|
||||||
.GroupBy(t => new
|
.GroupBy(t => new
|
||||||
{
|
{
|
||||||
t.TrialId,
|
t.TrialId,
|
||||||
t.Trial.ResearchProgramNo,
|
t.Trial.ResearchProgramNo,
|
||||||
t.Trial.ExperimentName,
|
t.Trial.ExperimentName,
|
||||||
t.Trial.TrialCode,
|
t.Trial.TrialCode,
|
||||||
t.VisitTask.TrialReadingCriterionId,
|
t.VisitTask.TrialReadingCriterionId,
|
||||||
t.VisitTask.TrialReadingCriterion.CriterionName
|
t.VisitTask.TrialReadingCriterion.CriterionName
|
||||||
})
|
})
|
||||||
.Select(g => new MedicalCommentsToBeDoneDto()
|
.Select(g => new MedicalCommentsToBeDoneDto()
|
||||||
{
|
{
|
||||||
TrialId = g.Key.TrialId,
|
TrialId = g.Key.TrialId,
|
||||||
ResearchProgramNo = g.Key.ResearchProgramNo,
|
ResearchProgramNo = g.Key.ResearchProgramNo,
|
||||||
ExperimentName = g.Key.ExperimentName,
|
ExperimentName = g.Key.ExperimentName,
|
||||||
TrialCode = g.Key.TrialCode,
|
TrialCode = g.Key.TrialCode,
|
||||||
CriterionName = g.Key.CriterionName,
|
CriterionName = g.Key.CriterionName,
|
||||||
|
|
||||||
UrgentCount = g.Where(u => u.VisitTask.IsUrgent
|
//UrgentCount = g.Where(u => u.VisitTask.IsUrgent).Select(u => u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First()).Count(t => t.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer),
|
||||||
&& u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer).Count(),
|
|
||||||
|
|
||||||
ToBeReplyedCount = g.Where(u =>
|
//ToBeReplyedCount = g.Select(t => t.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First()).Count(t => t.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer),
|
||||||
u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer).Count(),
|
|
||||||
|
ToBeReviewedCount = g.Where(u => !u.IsInvalid && u.AuditState != MedicalReviewAuditState.HaveSigned).Count()
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
ToBeReviewedCount=g.Where(u => !u.IsInvalid && u.AuditState != MedicalReviewAuditState.HaveSigned).Count()
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(MedicalCommentsToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ? nameof(MedicalCommentsToBeDoneDto.TrialId) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
@@ -1172,11 +1264,11 @@ namespace IRaCIS.Core.Application
|
|||||||
.Where(t => t.IsClosedDialog == false)
|
.Where(t => t.IsClosedDialog == false)
|
||||||
.Where(u => u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer).Count() : 0,
|
.Where(u => u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer).Count() : 0,
|
||||||
|
|
||||||
Medical_MIM_ToBeReviewedCount=
|
Medical_MIM_ToBeReviewedCount =
|
||||||
(t.User.UserTypeEnum == UserTypeEnum.MIM) ?
|
(t.User.UserTypeEnum == UserTypeEnum.MIM) ?
|
||||||
t.Trial.TaskMedicalReviewList
|
t.Trial.TaskMedicalReviewList
|
||||||
.Where(t => t.IsClosedDialog == false)
|
.Where(t => t.IsClosedDialog == false)
|
||||||
.Where(u => !u.IsInvalid && u.AuditState != MedicalReviewAuditState.HaveSigned).Count():0
|
.Where(u => !u.IsInvalid && u.AuditState != MedicalReviewAuditState.HaveSigned).Count() : 0
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ namespace IRaCIS.Core.Application
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> AsyncTrialCriterionDictionary(AsyncTrialCriterionDictionaryInDto inDto)
|
public async Task<IResponseOutput> AsyncTrialCriterionDictionary(AsyncTrialCriterionDictionaryInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
|
||||||
if (trialCriterion.ReadingQuestionCriterionSystemId != null)
|
if (trialCriterion.ReadingQuestionCriterionSystemId != null)
|
||||||
@@ -1041,9 +1042,17 @@ namespace IRaCIS.Core.Application
|
|||||||
//}); ;
|
//}); ;
|
||||||
|
|
||||||
|
|
||||||
|
var result = await _repository.SaveChangesAsync();
|
||||||
|
|
||||||
|
var criterionTrialList = await _readingQuestionCriterionTrialRepository.Where(x =>x.IsConfirm&& x.TrialId == trialConfig.TrialId&&x.ReadingQuestionCriterionSystemId!=null&&x.SynchronizeOriginalTime==null).ToListAsync();
|
||||||
return ResponseOutput.Ok(await _repository.SaveChangesAsync());
|
foreach (var item in criterionTrialList)
|
||||||
|
{
|
||||||
|
await AsyncTrialCriterionDictionary(new AsyncTrialCriterionDictionaryInDto()
|
||||||
|
{
|
||||||
|
TrialReadingCriterionId = item.Id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return ResponseOutput.Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -159,12 +159,7 @@ namespace IRaCIS.Application.Services
|
|||||||
public virtual async Task<IResponseOutput<Trial>> AddOrUpdateTrial(TrialCommand trialAddModel)
|
public virtual async Task<IResponseOutput<Trial>> AddOrUpdateTrial(TrialCommand trialAddModel)
|
||||||
{
|
{
|
||||||
|
|
||||||
// 到时候 策略授权 统一改 归类
|
|
||||||
if (!(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin))
|
|
||||||
{
|
|
||||||
//---只有PM/APM拥有操作权限!
|
|
||||||
throw new BusinessValidationFailedException(_localizer["Trial_PMApmPermission"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//测试用户 只能创建非正式项目
|
//测试用户 只能创建非正式项目
|
||||||
if (_userInfo.IsTestUser && trialAddModel.TrialType != TrialType.NoneOfficial)
|
if (_userInfo.IsTestUser && trialAddModel.TrialType != TrialType.NoneOfficial)
|
||||||
|
|||||||
@@ -287,6 +287,7 @@ namespace IRaCIS.Core.Application.Service
|
|||||||
CreateMap<TrialSiteUserSurvey, TrialSiteUserSummaryDto>()
|
CreateMap<TrialSiteUserSurvey, TrialSiteUserSummaryDto>()
|
||||||
.ForMember(t => t.TrialRoleName, u => u.MapFrom(d => d.TrialRoleName.Value))
|
.ForMember(t => t.TrialRoleName, u => u.MapFrom(d => d.TrialRoleName.Value))
|
||||||
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
.ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName))
|
||||||
|
.ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.UserTypeRole.UserTypeEnum))
|
||||||
.ForMember(t => t.TrialSiteCode, u => u.MapFrom(d => d.TrialSiteSurvey.TrialSite.TrialSiteCode))
|
.ForMember(t => t.TrialSiteCode, u => u.MapFrom(d => d.TrialSiteSurvey.TrialSite.TrialSiteCode))
|
||||||
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.TrialSiteSurvey.TrialSite.TrialSiteAliasName));
|
.ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.TrialSiteSurvey.TrialSite.TrialSiteAliasName));
|
||||||
|
|
||||||
|
|||||||
@@ -147,8 +147,7 @@ namespace IRaCIS.Application.Services
|
|||||||
//var list1 = await _repository.Where<Dictionary>().Select(t => t.TranslateValue(t.Value, t.ValueCN, true)).ToListAsync();
|
//var list1 = await _repository.Where<Dictionary>().Select(t => t.TranslateValue(t.Value, t.ValueCN, true)).ToListAsync();
|
||||||
//var list2 = await _repository.Where<Dictionary>().Select(t => t.TranslateValue(t.Value, t.ValueCN, false)).ToListAsync();
|
//var list2 = await _repository.Where<Dictionary>().Select(t => t.TranslateValue(t.Value, t.ValueCN, false)).ToListAsync();
|
||||||
|
|
||||||
await _repository.SaveChangesAsync();
|
return "测试自动发布--再次提交";
|
||||||
return _userInfo.LocalIp;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
using EntityFrameworkCore.Triggered;
|
||||||
|
using IRaCIS.Core.Application.Service.Reading.Interface;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Application.Triggers
|
||||||
|
{
|
||||||
|
public class AddCRCCliniaclDataTrigger : IAfterSaveTrigger<SubjectVisit>
|
||||||
|
{
|
||||||
|
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||||
|
private readonly IRepository _repository;
|
||||||
|
private readonly IClinicalAnswerService _iClinicalAnswerService;
|
||||||
|
|
||||||
|
public AddCRCCliniaclDataTrigger(IRepository<SubjectVisit> subjectVisitRepository, IRepository repository, IClinicalAnswerService iClinicalAnswerService)
|
||||||
|
{
|
||||||
|
_subjectVisitRepository = subjectVisitRepository;
|
||||||
|
|
||||||
|
_repository = repository;
|
||||||
|
this._iClinicalAnswerService = iClinicalAnswerService;
|
||||||
|
}
|
||||||
|
|
||||||
|
//注意删除不能用扩展方法,必须用EF跟踪的实体 否则不能取到 SubjectVisitId
|
||||||
|
public async Task AfterSave(ITriggerContext<SubjectVisit> context, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var subjectVisit = context.Entity;
|
||||||
|
|
||||||
|
await _iClinicalAnswerService.AutoAddCRCClinical(new Service.Reading.Dto.AutoAddClinicalInDto()
|
||||||
|
{
|
||||||
|
TrialId = subjectVisit.TrialId,
|
||||||
|
SubjectId = subjectVisit.SubjectId,
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -98,36 +98,36 @@ namespace IRaCIS.Core.Application.Triggers
|
|||||||
|
|
||||||
}
|
}
|
||||||
// 触发临床数据
|
// 触发临床数据
|
||||||
if (context.ChangeType == ChangeType.Added)
|
//if (context.ChangeType == ChangeType.Added)
|
||||||
{
|
//{
|
||||||
var cRCClinicalDatas = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == context.Entity.TrialId && x.UploadRole == UploadRole.CRC && x.IsConfirm)
|
// var cRCClinicalDatas = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == context.Entity.TrialId && x.UploadRole == UploadRole.CRC && x.IsConfirm)
|
||||||
|
|
||||||
.Select(x => new
|
// .Select(x => new
|
||||||
{
|
// {
|
||||||
x.Id,
|
// x.Id,
|
||||||
x.ClinicalDataLevel,
|
// x.ClinicalDataLevel,
|
||||||
}).ToListAsync();
|
// }).ToListAsync();
|
||||||
|
|
||||||
List<ReadingClinicalData> readingClinicals = new List<ReadingClinicalData>();
|
// List<ReadingClinicalData> readingClinicals = new List<ReadingClinicalData>();
|
||||||
readingClinicals.AddRange(
|
// readingClinicals.AddRange(
|
||||||
|
|
||||||
cRCClinicalDatas.WhereIf(!context.Entity.IsBaseLine, x => x.ClinicalDataLevel == ClinicalLevel.SubjectVisit).Select(x => new ReadingClinicalData()
|
// cRCClinicalDatas.WhereIf(!context.Entity.IsBaseLine, x => x.ClinicalDataLevel == ClinicalLevel.SubjectVisit).Select(x => new ReadingClinicalData()
|
||||||
{
|
// {
|
||||||
ClinicalDataTrialSetId = x.Id,
|
// ClinicalDataTrialSetId = x.Id,
|
||||||
IsVisit = true,
|
// IsVisit = true,
|
||||||
SubjectId = context.Entity.SubjectId,
|
// SubjectId = context.Entity.SubjectId,
|
||||||
ReadingId = context.Entity.Id,
|
// ReadingId = context.Entity.Id,
|
||||||
TrialId = context.Entity.TrialId
|
// TrialId = context.Entity.TrialId
|
||||||
|
|
||||||
}).ToList()
|
// }).ToList()
|
||||||
|
|
||||||
);
|
// );
|
||||||
|
|
||||||
|
|
||||||
await _readingClinicalDataRepository.AddRangeAsync(readingClinicals);
|
// await _readingClinicalDataRepository.AddRangeAsync(readingClinicals);
|
||||||
await _readingClinicalDataRepository.SaveChangesAsync();
|
// await _readingClinicalDataRepository.SaveChangesAsync();
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,29 @@ namespace IRaCIS.Core.Domain.Share
|
|||||||
public static readonly string Group = "group";
|
public static readonly string Group = "group";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// GetClinicalType
|
||||||
|
/// </summary>
|
||||||
|
public enum GetClinicalType
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PM上传
|
||||||
|
/// </summary>
|
||||||
|
PMUpload = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC 上传 过确认
|
||||||
|
/// </summary>
|
||||||
|
CRCConfirm = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 已审核
|
||||||
|
/// </summary>
|
||||||
|
HasSign = 3
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 临床表格问题标识
|
/// 临床表格问题标识
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1510,10 +1533,66 @@ namespace IRaCIS.Core.Domain.Share
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
Part = 8,
|
Part = 8,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 首次标记访视
|
||||||
|
/// </summary>
|
||||||
|
FirstMarkingVisit = 9,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 部位描述
|
||||||
|
/// </summary>
|
||||||
|
BodyPartDescription = 10,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 病灶数量
|
/// 病灶数量
|
||||||
/// </summary>
|
/// </summary>
|
||||||
LesionNumber=11,
|
LesionNumber =11,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PPD
|
||||||
|
/// </summary>
|
||||||
|
PPD = 12,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最低点PPD
|
||||||
|
/// </summary>
|
||||||
|
NadirPPD = 13,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PPD最低点所在访视
|
||||||
|
/// </summary>
|
||||||
|
LowPPDVisit = 14,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PPD最低点LDi
|
||||||
|
/// </summary>
|
||||||
|
LowPPDLDi = 15,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PPD最低点SDi
|
||||||
|
/// </summary>
|
||||||
|
LowPPDSDi = 16,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 相比最低点PPD增加百分比
|
||||||
|
/// </summary>
|
||||||
|
LowPPDAddPercent = 17,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 相比PPD最低点LDi增加值
|
||||||
|
/// </summary>
|
||||||
|
LowPPDLDiAdded = 18,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 相比PPD最低点SDi增加值
|
||||||
|
/// </summary>
|
||||||
|
LowPPDSDiAdded = 19,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SUVmax
|
||||||
|
/// </summary>
|
||||||
|
SUVmax = 20
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1924,6 +2003,9 @@ namespace IRaCIS.Core.Domain.Share
|
|||||||
|
|
||||||
HaveUploaded = 1,
|
HaveUploaded = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 待核查
|
||||||
|
/// </summary>
|
||||||
HaveChecked = 2,
|
HaveChecked = 2,
|
||||||
|
|
||||||
HaveSigned = 3
|
HaveSigned = 3
|
||||||
|
|||||||
@@ -13,7 +13,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<StudyMonitor> DicomStudyMonitorList { get; set; } = new List<StudyMonitor>();
|
public List<StudyMonitor> DicomStudyMonitorList { get; set; } = new List<StudyMonitor>();
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List <StudyDTF> StudyDTFList { get; set;} = new List<StudyDTF>();
|
public List<DicomSeries> SeriesList { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public TrialSite TrialSite { get; set; }
|
public TrialSite TrialSite { get; set; }
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
|
// 生成时间 2023-07-04 16:10:43
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
using System;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
namespace IRaCIS.Core.Domain.Models
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///UserLog
|
||||||
|
///</summary>
|
||||||
|
[Table("UserLog")]
|
||||||
|
public class UserLog : Entity, IAuditAdd
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public string IP { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string LoginFaildName { get; set; }=string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
public UserOptType OptType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string LoginPassword { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
public Guid? LoginUserId { get;set; }
|
||||||
|
|
||||||
|
public Guid? OptUserId { get;set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public User LoginUser { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public User OptUser { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 登录或者登出 锁定类型
|
||||||
|
/// </summary>
|
||||||
|
public enum UserOptType
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户登录
|
||||||
|
/// </summary>
|
||||||
|
Login = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 用户登出
|
||||||
|
/// </summary>
|
||||||
|
LoginOut = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///账号或者密码错误
|
||||||
|
/// </summary>
|
||||||
|
AccountOrPasswordError = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 账号锁定
|
||||||
|
/// </summary>
|
||||||
|
AccountLocked = 4,
|
||||||
|
|
||||||
|
//账号启用
|
||||||
|
AccountEnable = 5,
|
||||||
|
|
||||||
|
//登录锁定账户
|
||||||
|
LoginLockedAccount=6,
|
||||||
|
|
||||||
|
//修改密码
|
||||||
|
LoginModifyPassword =7,
|
||||||
|
|
||||||
|
UnloginModifyPasswoed=8,
|
||||||
|
|
||||||
|
//admin 重置密码
|
||||||
|
ResetPassword=9,
|
||||||
|
|
||||||
|
DeleteUser=10,
|
||||||
|
|
||||||
|
UpdateUser=11
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -100,8 +100,11 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<TrialClinicalDataSetCriterion> TrialClinicalDataSetCriteriaList { get; set; }
|
public List<TrialClinicalDataSetCriterion> TrialClinicalDataSetCriteriaList { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public List<TrialClinicalQuestion> TrialClinicalQuestionList { get; set; }
|
||||||
|
|
||||||
public string CriterionEnumListStr { get; set; } = String.Empty;
|
|
||||||
|
public string CriterionEnumListStr { get; set; } = String.Empty;
|
||||||
|
|
||||||
public List<int> CriterionEnumList => CriterionEnumListStr.Split('|', StringSplitOptions.RemoveEmptyEntries).Where(t => !string.IsNullOrEmpty(t) && int.TryParse(t.Trim(), out var s)).Select(t => int.Parse(t.Trim())).ToList();
|
public List<int> CriterionEnumList => CriterionEnumListStr.Split('|', StringSplitOptions.RemoveEmptyEntries).Where(t => !string.IsNullOrEmpty(t) && int.TryParse(t.Trim(), out var s)).Select(t => int.Parse(t.Trim())).ToList();
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,14 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
|
|
||||||
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("TrialId")]
|
||||||
|
|
||||||
|
public Trial Trial { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
[ForeignKey("ReadingId")]
|
[ForeignKey("ReadingId")]
|
||||||
|
|
||||||
public SubjectVisit SubjectVisit { get; set; }
|
public SubjectVisit SubjectVisit { get; set; }
|
||||||
@@ -96,8 +103,10 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<ReadingClinicalDataPDF> ReadingClinicalDataPDFList { get; set; }
|
public List<ReadingClinicalDataPDF> ReadingClinicalDataPDFList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public int? MaxAnswerLength { get; set; }
|
public int? MaxAnswerLength { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最大行数
|
||||||
|
/// </summary>
|
||||||
|
public int? MaxQuestionCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 临床数据选项类型(无,自定义)
|
/// 临床数据选项类型(无,自定义)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -138,7 +143,14 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string CalculateQuestions { get; set; } = "[]";
|
public string CalculateQuestions { get; set; } = "[]";
|
||||||
|
|
||||||
[NotMapped]
|
/// <summary>
|
||||||
|
/// 分组
|
||||||
|
/// </summary>
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("GroupId")]
|
||||||
|
public SystemClinicalQuestion GroupQuestin { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
public List<CalculateInfo> CalculateQuestionList
|
public List<CalculateInfo> CalculateQuestionList
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -47,6 +47,11 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// 最大长度
|
/// 最大长度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? MaxAnswerLength { get; set; }
|
public int? MaxAnswerLength { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 最大行数
|
||||||
|
/// </summary>
|
||||||
|
public int? MaxQuestionCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 临床数据选项类型(无,自定义)
|
/// 临床数据选项类型(无,自定义)
|
||||||
@@ -128,6 +133,13 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 分组
|
||||||
|
/// </summary>
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("GroupId")]
|
||||||
|
public TrialClinicalQuestion GroupQuestin { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 自定义计算问题
|
/// 自定义计算问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -162,7 +174,11 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// 单位
|
/// 单位
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Unit { get; set; } = string.Empty;
|
public string Unit { get; set; } = string.Empty;
|
||||||
}
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("TrialClinicalId")]
|
||||||
|
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,11 +44,6 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid ClinicalDataTrialSetId { get; set; }
|
public Guid ClinicalDataTrialSetId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// VisitId
|
|
||||||
/// </summary>
|
|
||||||
public Guid? VisitId { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// VisitId
|
/// VisitId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -59,6 +54,10 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
[ForeignKey("ClinicalDataTrialSetId")]
|
[ForeignKey("ClinicalDataTrialSetId")]
|
||||||
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
||||||
|
|
||||||
}
|
[JsonIgnore]
|
||||||
|
[ForeignKey("SubjectId")]
|
||||||
|
public Subject Subject { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,8 +45,13 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
}
|
[JsonIgnore]
|
||||||
|
[ForeignKey("ClinicalFormId")]
|
||||||
|
public ClinicalForm ClinicalForm { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using IRaCIS.Core.Domain.Share;
|
|||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
@@ -221,9 +222,44 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
[ForeignKey("RelevanceId")]
|
[ForeignKey("RelevanceId")]
|
||||||
public ReadingQuestionSystem RelevanceReadingQuestionSystem { get; set; }
|
public ReadingQuestionSystem RelevanceReadingQuestionSystem { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<string> ParentTriggerValueList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return this.ParentTriggerValue.Split(',').ToList();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
[NotMapped]
|
||||||
|
public List<string> RelevanceValueList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return this.RelevanceValue.Split(',').ToList();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ using System;
|
|||||||
using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Domain.Models
|
namespace IRaCIS.Core.Domain.Models
|
||||||
{
|
{
|
||||||
///<summary>
|
///<summary>
|
||||||
@@ -176,7 +179,44 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
[ForeignKey("DependParentId")]
|
[ForeignKey("DependParentId")]
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public ReadingTableQuestionSystem DependParentQuestion { get; set; }
|
public ReadingTableQuestionSystem DependParentQuestion { get; set; }
|
||||||
}
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<string> ParentTriggerValueList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return this.ParentTriggerValue.Split(',').ToList();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public List<string> RelevanceValueList
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return this.RelevanceValue.Split(',').ToList();
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
return new List<string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
|
||||||
|
//--------------------------------------------------------------------
|
||||||
|
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||||
|
// 生成时间 2023-07-31 11:12:15
|
||||||
|
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||||
|
using System;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
namespace IRaCIS.Core.Domain.Models
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///ReadingCustomTag
|
||||||
|
///</summary>
|
||||||
|
[Table("ReadingCustomTag")]
|
||||||
|
public class ReadingCustomTag : Entity, IAuditAdd
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 任务Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// StudyId
|
||||||
|
/// </summary>
|
||||||
|
public Guid? StudyId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// SeriesId
|
||||||
|
/// </summary>
|
||||||
|
public Guid? SeriesId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// InstanceId
|
||||||
|
/// </summary>
|
||||||
|
public Guid? InstanceId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MeasureData
|
||||||
|
/// </summary>
|
||||||
|
public string MeasureData { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CreateTime
|
||||||
|
/// </summary>
|
||||||
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CreateUserId
|
||||||
|
/// </summary>
|
||||||
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -79,25 +79,42 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
public bool IsCRCConfirm { get; set; } = false;
|
public bool IsCRCConfirm { get; set; } = false;
|
||||||
|
|
||||||
public bool IsPMConfirm { get; set; } = false;
|
public bool IsPMConfirm { get; set; } = false;
|
||||||
public bool IsDeleted { get; set; }
|
|
||||||
|
public bool IsNotNeedPMConfirm { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// CRC是否正在申请撤回
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCRCApplicationRevoke { get; set; } = false;
|
||||||
|
public bool IsDeleted { get; set; }
|
||||||
|
|
||||||
public DateTime? DeletedTime { get; set; }
|
public DateTime? DeletedTime { get; set; }
|
||||||
|
|
||||||
public Guid? DeleteUserId { get; set; }
|
public Guid? DeleteUserId { get; set; }
|
||||||
|
|
||||||
///// <summary>
|
/// <summary>
|
||||||
/////
|
/// 临床数据是否完整
|
||||||
///// </summary>
|
/// </summary>
|
||||||
//public decimal VisitNum { get; set; }
|
public bool? IsClinicalDataComplete { get; set; }
|
||||||
|
|
||||||
// [JsonIgnore]
|
/// <summary>
|
||||||
///// <summary>
|
/// 临床数据是否盲化
|
||||||
///// 对应
|
/// </summary>
|
||||||
///// </summary>
|
public bool? IsClinicalDataBlind { get; set; }
|
||||||
//[ForeignKey("ReadModuleId")]
|
|
||||||
//public ReadModule ReadModuleModel { get; set; }
|
|
||||||
|
|
||||||
[JsonIgnore]
|
///// <summary>
|
||||||
|
/////
|
||||||
|
///// </summary>
|
||||||
|
//public decimal VisitNum { get; set; }
|
||||||
|
|
||||||
|
// [JsonIgnore]
|
||||||
|
///// <summary>
|
||||||
|
///// 对应
|
||||||
|
///// </summary>
|
||||||
|
//[ForeignKey("ReadModuleId")]
|
||||||
|
//public ReadModule ReadModuleModel { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 受试者
|
/// 受试者
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -119,11 +136,15 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
[ForeignKey("SubjectVisitId")]
|
[ForeignKey("SubjectVisitId")]
|
||||||
public SubjectVisit SubjectVisit { get; set; }
|
public SubjectVisit SubjectVisit { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("TrialId")]
|
||||||
|
public Trial Trial { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 阅片配置的类型
|
/// <summary>
|
||||||
/// </summary>
|
/// 阅片配置的类型
|
||||||
public ReadingSetType ReadingSetType { get; set; }
|
/// </summary>
|
||||||
|
public ReadingSetType ReadingSetType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,17 +18,17 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 项目ID
|
/// 项目ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid TrialId { get; set; }
|
public Guid? TrialId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 名称
|
/// 名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public string? Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 受试者ID
|
/// 受试者ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid SubjectId { get; set; }
|
public Guid? SubjectId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 模块类型
|
/// 模块类型
|
||||||
@@ -43,18 +43,18 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否可改截止访视
|
/// 是否可改截止访视
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsCanChangeCutOffVisit { get; set; }
|
public bool? IsCanChangeCutOffVisit { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 访视ID
|
/// 访视ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid? SubjectVisitId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 访视名称
|
/// 访视名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SubjectVisitName { get; set; }
|
public string? SubjectVisitName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -76,34 +76,34 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 对应Name
|
/// 对应Name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ReadModuleName { get; set; }
|
public string? ReadModuleName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime? CreateTime { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 受试者Code
|
/// 受试者Code
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SubjectCode { get; set; }
|
public string? SubjectCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 中心Id
|
/// 中心Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SiteCode { get; set; }
|
public string? SiteCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 项目中心Id
|
/// 项目中心Id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string TrialSiteCode { get; set; }
|
public string? TrialSiteCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为末次访视
|
/// 是否为末次访视
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsFinalVisit { get; set; } = false;
|
public bool? IsFinalVisit { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上一访视
|
/// 上一访视
|
||||||
@@ -113,17 +113,17 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上一访视名称
|
/// 上一访视名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string OutPlanPreviousVisitName { get; set; }
|
public string? OutPlanPreviousVisitName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 中心ID
|
/// 中心ID
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid SiteId { get; set; }
|
public Guid? SiteId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为访视
|
/// 是否为访视
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsVisit { get; set; }
|
public bool? IsVisit { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 访视Num
|
/// 访视Num
|
||||||
@@ -133,12 +133,12 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否为PD进展
|
/// 是否为PD进展
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public PDStateEnum PDState { get; set; } = PDStateEnum.None;
|
public PDStateEnum? PDState { get; set; } = PDStateEnum.None;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 入组确认评估
|
/// 入组确认评估
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsEnrollmentConfirm { get; set; } = false;
|
public bool? IsEnrollmentConfirm { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -149,7 +149,7 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否是基线
|
/// 是否是基线
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsBaseLine { get; set; } = false;
|
public bool? IsBaseLine { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -161,11 +161,11 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标准名称
|
/// 标准名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string CriterionName { get; set; }
|
public string? CriterionName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 阅片配置的类型
|
/// 阅片配置的类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ReadingSetType ReadingSetType { get; set; }
|
public ReadingSetType? ReadingSetType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
public List<TrialSite> TrialSiteList { get; set; } = new List<TrialSite>();
|
public List<TrialSite> TrialSiteList { get; set; } = new List<TrialSite>();
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public List<TrialSiteUser> TrialSiteUserList { get; set; } = new List<TrialSiteUser>();
|
public List<TrialSiteUser> TrialSiteUserList { get; set; } = new List<TrialSiteUser>();
|
||||||
|
[JsonIgnore]
|
||||||
|
public List<ReadModule> ReadModuleList { get; set; } = new List<ReadModule>();
|
||||||
|
|
||||||
|
|
||||||
public Guid IndicationTypeId { get; set; } = Guid.Empty;
|
public Guid IndicationTypeId { get; set; } = Guid.Empty;
|
||||||
@@ -83,8 +85,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
public virtual ICollection<TrialStatusDetail> ClinicalTrialProjectDetails { get; set; }
|
public virtual ICollection<TrialStatusDetail> ClinicalTrialProjectDetails { get; set; }
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public virtual ICollection<TrialDictionary> TrialDicList { get; set; }
|
public virtual ICollection<TrialDictionary> TrialDicList { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public List<ReadingClinicalData> ReadingClinicalDataList { get; set; }
|
||||||
|
|
||||||
[StringLength(100)]
|
[StringLength(100)]
|
||||||
public string TrialCode { get; set; } = string.Empty;
|
public string TrialCode { get; set; } = string.Empty;
|
||||||
|
|||||||
@@ -121,6 +121,8 @@ namespace IRaCIS.Core.Domain.Models
|
|||||||
public Guid? DeleteUserId { get; set; }
|
public Guid? DeleteUserId { get; set; }
|
||||||
|
|
||||||
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
||||||
|
[JsonIgnore]
|
||||||
|
public List<ClinicalForm> ClinicalFormList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
//是否分配了读片医生
|
//是否分配了读片医生
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||||||
#region Reading
|
#region Reading
|
||||||
public virtual DbSet<TrialCriterionDictionaryCode> TrialCriterionDictionaryCode { get; set; }
|
public virtual DbSet<TrialCriterionDictionaryCode> TrialCriterionDictionaryCode { get; set; }
|
||||||
|
|
||||||
|
public virtual DbSet<ReadingCustomTag> ReadingCustomTag { get; set; }
|
||||||
public virtual DbSet<SystemCriterionDictionaryCode> SystemCriterionDictionaryCode { get; set; }
|
public virtual DbSet<SystemCriterionDictionaryCode> SystemCriterionDictionaryCode { get; set; }
|
||||||
public virtual DbSet<ReadingTaskRelation> ReadingTaskRelation { get; set; }
|
public virtual DbSet<ReadingTaskRelation> ReadingTaskRelation { get; set; }
|
||||||
public virtual DbSet<OrganInfo> OrganInfo { get; set; }
|
public virtual DbSet<OrganInfo> OrganInfo { get; set; }
|
||||||
@@ -508,6 +509,8 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||||||
public virtual DbSet<ReadingTableQuestionAnswer> ReadingTableQuestionAnswer { get; set; }
|
public virtual DbSet<ReadingTableQuestionAnswer> ReadingTableQuestionAnswer { get; set; }
|
||||||
|
|
||||||
public virtual DbSet<PublishLog> PublishLog { get; set; }
|
public virtual DbSet<PublishLog> PublishLog { get; set; }
|
||||||
|
public virtual DbSet<UserLog> UserLog { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using IRaCIS.Core.Domain.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
|
||||||
|
{
|
||||||
|
//public class ClinicalFromConfigration : IEntityTypeConfiguration<ClinicalForm>
|
||||||
|
//{
|
||||||
|
|
||||||
|
|
||||||
|
// public void Configure(EntityTypeBuilder<ClinicalForm> builder)
|
||||||
|
// {
|
||||||
|
// builder
|
||||||
|
// .HasOne(s => s.ReadingClinicalData)
|
||||||
|
// .WithMany(c => c.ClinicalFormList)
|
||||||
|
// .HasForeignKey(s => new { s.SubjectId, s.ReadingId })
|
||||||
|
// .HasPrincipalKey(c => new { c.SubjectId, c.ReadingId });
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
//}
|
||||||
|
}
|
||||||
@@ -83,6 +83,43 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async Task EntityVerifyAsync<T>(this IRepository<T> _entityRepository, Guid? entitydId = null,params EntityVerifyExp<T>[] verify) where T : Entity
|
||||||
|
{
|
||||||
|
|
||||||
|
if (entitydId==null)
|
||||||
|
{
|
||||||
|
foreach (var verifyItem in verify.Where(t => t.verifyType != VerifyEnum.OnlyUpdate && t.IsVerify))
|
||||||
|
{
|
||||||
|
if (await _entityRepository.AnyAsync(verifyItem.VerifyExp).ConfigureAwait(false))
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(verifyItem.VerifyMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach (var verifyItem in verify.Where(t => t.verifyType != VerifyEnum.OnlyAdd && t.IsVerify))
|
||||||
|
{
|
||||||
|
if (verifyItem.verifyType == VerifyEnum.OnlyUpdate)
|
||||||
|
{
|
||||||
|
if (await _entityRepository.AnyAsync(verifyItem.VerifyExp).ConfigureAwait(false))
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(verifyItem.VerifyMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (verifyItem.verifyType == VerifyEnum.Both)
|
||||||
|
{
|
||||||
|
if (await _entityRepository.AnyAsync(verifyItem.VerifyExp.And(t => t.Id != entitydId)).ConfigureAwait(false))
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException(verifyItem.VerifyMsg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///注意 模型标注了 ConcurrencyCheck的属性,这样的实体,不适合用部分字段更新,ef生成的更新sql会自动带上ConcurrencyCheck的属性条件
|
///注意 模型标注了 ConcurrencyCheck的属性,这样的实体,不适合用部分字段更新,ef生成的更新sql会自动带上ConcurrencyCheck的属性条件
|
||||||
/// <summary>EntityState.Detached的实体 修改 部分字段</summary>
|
/// <summary>EntityState.Detached的实体 修改 部分字段</summary>
|
||||||
public static void EntityModifyPartialFiled<T>(this IRaCISDBContext _dbContext,T waitModifyEntity, Expression<Func<T, T>> updateFactory) where T : Entity
|
public static void EntityModifyPartialFiled<T>(this IRaCISDBContext _dbContext,T waitModifyEntity, Expression<Func<T, T>> updateFactory) where T : Entity
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
using System;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace IRaCIS.Core.Infrastructure
|
||||||
|
{
|
||||||
|
public class SymmetricEncryption
|
||||||
|
{
|
||||||
|
public static string Encrypt(string plainText, string key)
|
||||||
|
{
|
||||||
|
byte[] keyBytes = Encoding.UTF8.GetBytes(key);
|
||||||
|
byte[] ivBytes = new byte[16]; // Initialization vector (IV)
|
||||||
|
|
||||||
|
using (Aes aes = Aes.Create())
|
||||||
|
{
|
||||||
|
aes.Key = keyBytes;
|
||||||
|
aes.IV = ivBytes;
|
||||||
|
ICryptoTransform encryptor = aes.CreateEncryptor(aes.Key, aes.IV);
|
||||||
|
|
||||||
|
byte[] plainBytes = Encoding.UTF8.GetBytes(plainText);
|
||||||
|
byte[] encryptedBytes = encryptor.TransformFinalBlock(plainBytes, 0, plainBytes.Length);
|
||||||
|
return Convert.ToBase64String(encryptedBytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Decrypt(string cipherText, string key)
|
||||||
|
{
|
||||||
|
byte[] keyBytes = Encoding.UTF8.GetBytes(key);
|
||||||
|
byte[] ivBytes = new byte[16]; // Initialization vector (IV)
|
||||||
|
|
||||||
|
using (Aes aes = Aes.Create())
|
||||||
|
{
|
||||||
|
aes.Key = keyBytes;
|
||||||
|
aes.IV = ivBytes;
|
||||||
|
ICryptoTransform decryptor = aes.CreateDecryptor(aes.Key, aes.IV);
|
||||||
|
|
||||||
|
byte[] cipherBytes = Convert.FromBase64String(cipherText);
|
||||||
|
byte[] decryptedBytes = decryptor.TransformFinalBlock(cipherBytes, 0, cipherBytes.Length);
|
||||||
|
return Encoding.UTF8.GetString(decryptedBytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true";
|
||||||
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
public static readonly string DbDatabase = "IRaCIS_New_Tet";
|
||||||
//表名称用字符串,拼接
|
//表名称用字符串,拼接
|
||||||
public static readonly string TableName = "ReadModuleCriterionFrom";
|
public static readonly string TableName = "ReadingCustomTag";
|
||||||
//具体文件里面 例如service 可以配置是否分页
|
//具体文件里面 例如service 可以配置是否分页
|
||||||
}
|
}
|
||||||
#>
|
#>
|
||||||
|
|||||||
@@ -0,0 +1,105 @@
|
|||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: irc-netcore-api
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: docker-build
|
||||||
|
image: docker
|
||||||
|
pull: if-not-exists
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
- name: cached_nuget_packages
|
||||||
|
path: /drone/nuget_packages
|
||||||
|
commands:
|
||||||
|
- date +%H:%M:%S
|
||||||
|
- pwd
|
||||||
|
- docker build -t Test.Study .
|
||||||
|
- date +%H:%M:%S
|
||||||
|
|
||||||
|
- name: docker-deploy
|
||||||
|
image: docker
|
||||||
|
pull: if-not-exists
|
||||||
|
depends_on:
|
||||||
|
- docker-build
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- date +%H:%M:%S
|
||||||
|
- docker rm -f test-study-container
|
||||||
|
- docker run -itd -e TZ=Asia/Shanghai -e ASPNETCORE_ENVIRONMENT=Test_Study --restart=always --name test-study-container -p 8030:80 Test.Study
|
||||||
|
- date +%H:%M:%S
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: cached_nuget_packages
|
||||||
|
host:
|
||||||
|
path: /mnt/f/docker_publish/nuget_packages
|
||||||
|
- name: dockersock
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: ssh-windows-test-study-publish
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: windows
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true #禁用默认克隆
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: 123.56.94.154
|
||||||
|
user: Administrator
|
||||||
|
password: WHxckj2019
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: publish-test-study
|
||||||
|
commands:
|
||||||
|
- Start-Process "C:\CICD\Test.Study\netcore_Publish.bat" -Wait
|
||||||
|
- cd C:\CICD\Test.Study\netcore_repo
|
||||||
|
- dotnet restore .\IRaCIS.Core.API\IRaCIS.Core.API.csproj --packages C:\Users\Administrator\.nuget\packages
|
||||||
|
- dotnet publish .\IRaCIS.Core.API\IRaCIS.Core.API.csproj -c Release --no-restore --packages C:\Users\Administrator\.nuget\packages -o D:\Develop\Test_Study_PublishSite\IRaCIS.NetCore.API
|
||||||
|
- Start-Service -Name "Test_Study_API"
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- Test.Study
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
type: ssh
|
||||||
|
name: ssh-windows-test-irc-publish
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: windows
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true #禁用默认克隆
|
||||||
|
|
||||||
|
server:
|
||||||
|
host: 123.56.94.154
|
||||||
|
user: Administrator
|
||||||
|
password: WHxckj2019
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: publish-test-irc
|
||||||
|
commands:
|
||||||
|
- C:\CICD\Test.IRC\netcore_Publish.ps1
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- Test.IRC
|
||||||
Reference in New Issue
Block a user