Compare commits
443 Commits
5660d2e83b
...
c8bc0c4a32
| Author | SHA1 | Date |
|---|---|---|
|
|
c8bc0c4a32 | |
|
|
8ded82fa81 | |
|
|
acd1f47f4a | |
|
|
054827bbae | |
|
|
a5ebe97dc5 | |
|
|
02b2d8f754 | |
|
|
cf5da8f55a | |
|
|
40947de05a | |
|
|
662648691d | |
|
|
29836a9c62 | |
|
|
a2b1a0d64b | |
|
|
87fbd2cb59 | |
|
|
c91e21c23a | |
|
|
0f25c7db0e | |
|
|
e5b5cbb8d8 | |
|
|
9c1af1b8dc | |
|
|
0da09da45e | |
|
|
87aaefadf6 | |
|
|
b5b739a5cb | |
|
|
1315d5dc29 | |
|
|
72b70f5311 | |
|
|
fd15a62148 | |
|
|
e9bd625195 | |
|
|
c37fcf588c | |
|
|
3f8d5027c8 | |
|
|
972fc32eeb | |
|
|
1ba9efe894 | |
|
|
f85ac8a813 | |
|
|
7bf097c127 | |
|
|
fc579d9cf4 | |
|
|
b1c0933428 | |
|
|
bd7dd906fb | |
|
|
3a8e400f33 | |
|
|
c6dd323b80 | |
|
|
dfb45d8391 | |
|
|
0b0df00525 | |
|
|
96fc5ae78c | |
|
|
a4b2d68995 | |
|
|
70ababc2d9 | |
|
|
e57887eba5 | |
|
|
aef7fded18 | |
|
|
e0613c1f2d | |
|
|
f6d323cc31 | |
|
|
aa85562076 | |
|
|
0165688799 | |
|
|
c2aefebedc | |
|
|
1c5e4454da | |
|
|
65e2a45d74 | |
|
|
99026d6483 | |
|
|
9190783ac4 | |
|
|
ae8f50dc14 | |
|
|
2a51de03b7 | |
|
|
2be9daa443 | |
|
|
2778b3ea7b | |
|
|
4cedb9dbcb | |
|
|
ed6a6fb844 | |
|
|
8daf02246e | |
|
|
b3178e6f8d | |
|
|
00cbde90c7 | |
|
|
938175c49f | |
|
|
146fc916d1 | |
|
|
87776513fb | |
|
|
60d462e5f9 | |
|
|
b39d8dd546 | |
|
|
b65635c41c | |
|
|
fe2539afba | |
|
|
d2ff216396 | |
|
|
4c05da8335 | |
|
|
6061cf5d93 | |
|
|
d313b7d8a6 | |
|
|
71c21ccc00 | |
|
|
f415c03daa | |
|
|
2bfef364ec | |
|
|
c822d20d0d | |
|
|
3a996212ed | |
|
|
5a3b6a5f93 | |
|
|
3f7227ce32 | |
|
|
af0df80874 | |
|
|
a163d8a785 | |
|
|
70fbf8d352 | |
|
|
d9a8692be8 | |
|
|
56fb9c14d1 | |
|
|
8bc0cee81f | |
|
|
dc86767184 | |
|
|
e1383445e2 | |
|
|
0a30107859 | |
|
|
ba27925409 | |
|
|
3a52021cdc | |
|
|
aba4fc70c2 | |
|
|
5b89343192 | |
|
|
20f9e90a69 | |
|
|
5c58171ac3 | |
|
|
e98d80eea6 | |
|
|
c14d5be4ac | |
|
|
fea108371f | |
|
|
dd47bf05f8 | |
|
|
3a160c1913 | |
|
|
c42c26d76a | |
|
|
f7117563f7 | |
|
|
39968194b1 | |
|
|
0d5f7e5673 | |
|
|
7f4e111f7d | |
|
|
0c92fcb011 | |
|
|
2f4418e3ed | |
|
|
75a3d7c80f | |
|
|
4605053e50 | |
|
|
a8da0c0b55 | |
|
|
ba984f9263 | |
|
|
451a311142 | |
|
|
f86bc219cf | |
|
|
06bd63b6d1 | |
|
|
be088d8ba2 | |
|
|
c718ec8446 | |
|
|
668e1019f0 | |
|
|
e2f5a7fae1 | |
|
|
f1a141c018 | |
|
|
30a0f428bc | |
|
|
7a8346621d | |
|
|
6d93054d3d | |
|
|
5c53e78aca | |
|
|
1eeb832b0e | |
|
|
c8db9431b2 | |
|
|
ce8e0e3972 | |
|
|
ed4192838d | |
|
|
d900c368e2 | |
|
|
6926bb877c | |
|
|
cb9b54a089 | |
|
|
57c5d14f5a | |
|
|
4f19d1638d | |
|
|
ace39a7f94 | |
|
|
e8e0540cc2 | |
|
|
a98799daaf | |
|
|
f2b53cd359 | |
|
|
960f479b91 | |
|
|
d6dacb93dd | |
|
|
8823656231 | |
|
|
2c859e7186 | |
|
|
99828dd82e | |
|
|
855242e6fe | |
|
|
90a1a920fa | |
|
|
c73968f490 | |
|
|
282368b9e0 | |
|
|
726a2be71e | |
|
|
510104d0ff | |
|
|
12318937f4 | |
|
|
8f17d4b110 | |
|
|
18496246b2 | |
|
|
55f60e897a | |
|
|
dd2d142340 | |
|
|
49a0cf3ece | |
|
|
f0d4a1c075 | |
|
|
5e6db93250 | |
|
|
12adf2f3a9 | |
|
|
b08908b1dc | |
|
|
8f08746377 | |
|
|
045e9346ad | |
|
|
864ab17ff3 | |
|
|
700d111011 | |
|
|
7168d68997 | |
|
|
40ec535e8a | |
|
|
4dfaf29f3d | |
|
|
702cd361fe | |
|
|
b776103328 | |
|
|
381e7b5046 | |
|
|
ebdec8dd62 | |
|
|
6677f2a01e | |
|
|
5aaa9043ff | |
|
|
48874adda3 | |
|
|
0cf5a88d63 | |
|
|
4b92874ca6 | |
|
|
2d81b05fba | |
|
|
78756aa2f4 | |
|
|
a15c91ebcb | |
|
|
4b389c8293 | |
|
|
2313b5e907 | |
|
|
e22941d947 | |
|
|
3efc173056 | |
|
|
6389919cfd | |
|
|
984b840fa7 | |
|
|
2bf01fbf0c | |
|
|
116eeb753d | |
|
|
82a6237323 | |
|
|
6220a96666 | |
|
|
259ab2c569 | |
|
|
efda4e0fdd | |
|
|
968264fe9a | |
|
|
57911cf567 | |
|
|
a61d9ae4d1 | |
|
|
5735383cd7 | |
|
|
e3607895b4 | |
|
|
16a2e0b53f | |
|
|
41e5f9fd78 | |
|
|
64b750b06e | |
|
|
ca90736366 | |
|
|
664b308e31 | |
|
|
8de0671d31 | |
|
|
19d7192842 | |
|
|
c3ed54f05f | |
|
|
ef6655a014 | |
|
|
234e549b22 | |
|
|
903f72989a | |
|
|
3e9900cc45 | |
|
|
78d0cffd3d | |
|
|
658e8d983c | |
|
|
8174237a82 | |
|
|
39a5e8eade | |
|
|
54dea66f5f | |
|
|
86fd9ddc0e | |
|
|
b071d1126b | |
|
|
139e9daec0 | |
|
|
4eeda2b3e7 | |
|
|
fa64b42a84 | |
|
|
ce67f4828f | |
|
|
87e3d953d3 | |
|
|
5d4668eaee | |
|
|
cfce8dba1f | |
|
|
c11e319472 | |
|
|
7c7a0cd20b | |
|
|
a66bb42126 | |
|
|
7d63f3f5cb | |
|
|
b102d23477 | |
|
|
e19c03412d | |
|
|
56cba570bf | |
|
|
c7abcc153e | |
|
|
967a77f371 | |
|
|
2060f2c62e | |
|
|
193c107539 | |
|
|
2fe0851786 | |
|
|
46b68ca2c9 | |
|
|
396797dc0c | |
|
|
5579f543de | |
|
|
ce31ab3097 | |
|
|
daa4764aac | |
|
|
a24c6775e8 | |
|
|
eb9de1769e | |
|
|
d675cc50b3 | |
|
|
350d089c39 | |
|
|
116969f4f2 | |
|
|
112d9f9a63 | |
|
|
5dae9c5d06 | |
|
|
c0a63ecfed | |
|
|
881a5320a8 | |
|
|
22a254890e | |
|
|
0912909b68 | |
|
|
cd7318dd63 | |
|
|
21cc610095 | |
|
|
cc8151caf8 | |
|
|
8cce399430 | |
|
|
99688df446 | |
|
|
de0a278cac | |
|
|
7031ea1a04 | |
|
|
541455a08b | |
|
|
814efc4e35 | |
|
|
f85bbc41c4 | |
|
|
c00e8eb809 | |
|
|
9dd00170af | |
|
|
fdba16de86 | |
|
|
38f319b425 | |
|
|
d35046b277 | |
|
|
bdcaf2f2be | |
|
|
bba622da0e | |
|
|
0d4f694fcf | |
|
|
a41824414e | |
|
|
c54b0abbd7 | |
|
|
d772ea527a | |
|
|
62b76220d4 | |
|
|
6aa8628c0c | |
|
|
7d9f4864d0 | |
|
|
d149d5a5d5 | |
|
|
7572bf9fb0 | |
|
|
40ab925a4e | |
|
|
75a989b4f1 | |
|
|
f98f89a51d | |
|
|
423ea4bc6f | |
|
|
3c60dd9ae8 | |
|
|
f9006be79b | |
|
|
0492563838 | |
|
|
d58089b9ee | |
|
|
e17a33a16f | |
|
|
c935599fcf | |
|
|
efafdc50b8 | |
|
|
8846c1d728 | |
|
|
9bfd89cb9b | |
|
|
35f01818dd | |
|
|
875af7e9f7 | |
|
|
7dfce2db55 | |
|
|
cab5772068 | |
|
|
6319f1e82d | |
|
|
d42c8477aa | |
|
|
b559a7882b | |
|
|
30e1d70099 | |
|
|
84a8d18519 | |
|
|
1fc20e5640 | |
|
|
d8f0fba8e2 | |
|
|
2921404540 | |
|
|
df79b7b57b | |
|
|
0a45638bac | |
|
|
4f725af6cd | |
|
|
44ae7bde56 | |
|
|
cd5e0405de | |
|
|
5bbf2d3c82 | |
|
|
09743f7153 | |
|
|
f88ef2f3fc | |
|
|
ef032b548e | |
|
|
db2f3cc85a | |
|
|
7584f4a5b4 | |
|
|
aac559e221 | |
|
|
aee5c17591 | |
|
|
d8248a7973 | |
|
|
b68d060f85 | |
|
|
74399df5eb | |
|
|
c3b62137d8 | |
|
|
352bd23766 | |
|
|
398344854b | |
|
|
e181c3cc82 | |
|
|
24e4008b72 | |
|
|
50d9ed7e3c | |
|
|
9fd113c95f | |
|
|
5683ced93d | |
|
|
4360f4b2cb | |
|
|
43a873defd | |
|
|
e5d08cdb3e | |
|
|
c78b80c679 | |
|
|
9cd3ba1c67 | |
|
|
dd22b206dc | |
|
|
12b668642c | |
|
|
77fa881d69 | |
|
|
05dcbfed2e | |
|
|
6471041fad | |
|
|
69ab56f878 | |
|
|
97538333c0 | |
|
|
a094e1a2b7 | |
|
|
d0c8df1452 | |
|
|
1b6a31e626 | |
|
|
2c1cde9f69 | |
|
|
1aa5e45694 | |
|
|
9fc04193c7 | |
|
|
b685b9fa13 | |
|
|
59f97d0c2d | |
|
|
8f94460537 | |
|
|
26fe947991 | |
|
|
16829f9075 | |
|
|
246314561b | |
|
|
331a3c4178 | |
|
|
35ba7861d1 | |
|
|
59cb66331e | |
|
|
782bfaa6c4 | |
|
|
830af4a164 | |
|
|
994cb73104 | |
|
|
8e3dc73408 | |
|
|
6792f9e916 | |
|
|
a350c35f49 | |
|
|
fb498b3723 | |
|
|
7b9c90b77c | |
|
|
f4fd16d8fd | |
|
|
5656e66c28 | |
|
|
39882e43ce | |
|
|
e5f2d1cde9 | |
|
|
4f978863e4 | |
|
|
f26aafa8cb | |
|
|
e444354cf7 | |
|
|
0e4ae72016 | |
|
|
c1121a2d3f | |
|
|
1737825506 | |
|
|
437c569617 | |
|
|
9580d77512 | |
|
|
f7fb89313c | |
|
|
721a7d2341 | |
|
|
3529ab6cb6 | |
|
|
484bb3ca5b | |
|
|
121b2d5df1 | |
|
|
472887d627 | |
|
|
03f514d5fe | |
|
|
36d2203e4c | |
|
|
4e11cc7db3 | |
|
|
f23963896d | |
|
|
fd2b13b391 | |
|
|
b90743ded1 | |
|
|
ee499d9352 | |
|
|
d12f0bddad | |
|
|
9eabd9031b | |
|
|
552e7a430d | |
|
|
b97f9f8f12 | |
|
|
8be0cea193 | |
|
|
bce088bcdf | |
|
|
6955c42c8b | |
|
|
07b36279cf | |
|
|
5c1dc0754b | |
|
|
7eaa644028 | |
|
|
1b29312bef | |
|
|
930412bf21 | |
|
|
0e1f4931eb | |
|
|
2e2c4b4397 | |
|
|
7665cc7f73 | |
|
|
c743335d13 | |
|
|
e9aeb1c918 | |
|
|
c092e9a8d0 | |
|
|
a55ec01992 | |
|
|
302e503e02 | |
|
|
f82639cdf3 | |
|
|
9172d8c5f8 | |
|
|
69fd8ec123 | |
|
|
d9c7a512e9 | |
|
|
38383f34ff | |
|
|
b7585fe022 | |
|
|
b7d9009ff4 | |
|
|
9c26745c2a | |
|
|
67f8e57ab6 | |
|
|
b2ef603729 | |
|
|
110ea953c4 | |
|
|
cef07a5bff | |
|
|
a5899023b9 | |
|
|
61530be208 | |
|
|
292bcd7100 | |
|
|
8f4a6fcf80 | |
|
|
dfdb3b5951 | |
|
|
0cc7b373b7 | |
|
|
7e5cbd92b4 | |
|
|
2594ecd27e | |
|
|
edf8af3e4d | |
|
|
5a76275571 | |
|
|
b147ee1c99 | |
|
|
8b7cc8a220 | |
|
|
88931a4a56 | |
|
|
df187bed58 | |
|
|
8b86bc6b3f | |
|
|
f9ac64023a | |
|
|
3a710e1e50 | |
|
|
1d4f58f362 | |
|
|
abfd0a0a2e | |
|
|
98839b15dc | |
|
|
5b885e98cc | |
|
|
58e29608e5 | |
|
|
db71cfd396 | |
|
|
0de9cfb240 | |
|
|
2a8efb246d | |
|
|
071cf4eed8 | |
|
|
87a8d8d490 | |
|
|
d3caa1dda9 | |
|
|
f832d44f3a | |
|
|
103ab700fc | |
|
|
6419fa6e61 | |
|
|
98cf2adf92 |
|
|
@ -419,6 +419,23 @@ namespace IRaCIS.Core.API.Controllers
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 重置并同步项目阅片标准
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Inspection/ReadingCriterion/ResetAndAsyncCriterion")]
|
||||
[UnitOfWork]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
public async Task<IResponseOutput> ResetAndAsyncCriterion(DataInspectionDto<ResetAndAsyncCriterionInDto> opt)
|
||||
{
|
||||
var singid = await _inspectionService.RecordSing(opt.SignInfo);
|
||||
var result = await _trialConfigService.ResetAndAsyncCriterion(opt.Data);
|
||||
await _inspectionService.CompletedSign(singid, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// CRC RequestToQC 批量提交
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ using Microsoft.AspNetCore.SignalR;
|
|||
using Microsoft.AspNetCore.StaticFiles;
|
||||
using Microsoft.AspNetCore.WebUtilities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
using MiniExcelLibs;
|
||||
|
|
@ -235,13 +236,17 @@ namespace IRaCIS.Core.API.Controllers
|
|||
public IUserInfo _userInfo { get; set; }
|
||||
private readonly IMediator _mediator;
|
||||
|
||||
|
||||
public IStringLocalizer _localizer { get; set; }
|
||||
|
||||
|
||||
private readonly IWebHostEnvironment _hostEnvironment;
|
||||
|
||||
private readonly IRepository _repository;
|
||||
|
||||
private readonly IEasyCachingProvider _provider;
|
||||
private readonly QCCommon _qCCommon;
|
||||
public StudyController(IMapper mapper, IUserInfo userInfo, IWebHostEnvironment hostEnvironment, IMediator mediator, IEasyCachingProvider provider,
|
||||
public StudyController(IMapper mapper, IStringLocalizer localizer, IUserInfo userInfo, IWebHostEnvironment hostEnvironment, IMediator mediator, IEasyCachingProvider provider,
|
||||
QCCommon qCCommon,
|
||||
IRepository repository)
|
||||
{
|
||||
|
|
@ -249,7 +254,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
_provider = provider;
|
||||
_hostEnvironment = hostEnvironment;
|
||||
_mediator = mediator;
|
||||
|
||||
_localizer = localizer;
|
||||
_mapper = mapper;
|
||||
_userInfo = userInfo;
|
||||
_repository = repository;
|
||||
|
|
@ -313,7 +318,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
string.IsNullOrEmpty(mediaTypeHeader.Boundary.Value))
|
||||
{
|
||||
//---不支持的MediaType
|
||||
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_UnsupportedMedia"));
|
||||
return ResponseOutput.NotOk(_localizer["UploadDownLoad_UnsupportedMedia"]);
|
||||
}
|
||||
|
||||
var archiveStudyCommand = new ArchiveStudyCommand() { AbandonStudyId = abandonStudyId, StudyInstanceUid = studyInstanceUid, SubjectVisitId = subjectVisitId };
|
||||
|
|
@ -407,7 +412,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
_provider.Remove($"StudyUid_{trialId}_{archiveStudyCommand.StudyInstanceUid}");
|
||||
|
||||
//---请求异常,请重试!
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_RequestError"));
|
||||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_RequestError"]);
|
||||
}
|
||||
|
||||
studyMonitor.FileSize = (decimal)HttpContext.Request.ContentLength;
|
||||
|
|
@ -559,7 +564,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
if (!fileName.EndsWith(".xlsx") && !fileName.EndsWith(".csv") && !fileName.EndsWith(".xls"))
|
||||
{
|
||||
//---支持.xlsx、.xls、.csv格式的文件上传。
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_SupportedFormats"));
|
||||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_SupportedFormats"]);
|
||||
}
|
||||
|
||||
fileStream.CopyTo(templateFileStream);
|
||||
|
|
@ -580,7 +585,6 @@ namespace IRaCIS.Core.API.Controllers
|
|||
var etcCheckList = new List<CheckViewModel>();
|
||||
|
||||
|
||||
|
||||
#region MiniExcel 需要自己验证数据格式规范
|
||||
|
||||
//if (fileName.EndsWith(".csv"))
|
||||
|
|
@ -609,7 +613,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
//if (import.RowErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.RowErrors));
|
||||
|
||||
if (import.TemplateErrors.Count > 0) return ResponseOutput.NotOk(JsonConvert.SerializeObject(import.TemplateErrors));
|
||||
if (import.TemplateErrors.Count > 0) return ResponseOutput.NotOk(_localizer["UploadDownLoad_TemplateErrors"]);
|
||||
|
||||
etcCheckList = import.Data.ToList();
|
||||
}
|
||||
|
|
@ -697,7 +701,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
if (etcCheckList == null || etcCheckList.Count == 0)
|
||||
{
|
||||
//---请保证上传数据符合模板文件中的样式,且存在有效数据。
|
||||
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_InvalidData"));
|
||||
return ResponseOutput.NotOk(_localizer["UploadDownLoad_InvalidData"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -718,7 +722,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
if (etcCheckList.Count == 0)
|
||||
{
|
||||
//---请保证上传数据符合模板文件中的样式,且存在有效数据。
|
||||
return ResponseOutput.NotOk(StaticData.International("UploadDownLoad_InvalidData"));
|
||||
return ResponseOutput.NotOk(_localizer["UploadDownLoad_InvalidData"]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -962,12 +966,13 @@ namespace IRaCIS.Core.API.Controllers
|
|||
public IMapper _mapper { get; set; }
|
||||
public IUserInfo _userInfo { get; set; }
|
||||
private readonly IMediator _mediator;
|
||||
|
||||
public IStringLocalizer _localizer { get; set; }
|
||||
private readonly IWebHostEnvironment _hostEnvironment;
|
||||
|
||||
public UploadDownLoadController(IMapper mapper, IUserInfo userInfo, IMediator mediator, IWebHostEnvironment hostEnvironment)
|
||||
public UploadDownLoadController(IMapper mapper, IUserInfo userInfo, IStringLocalizer localizer, IMediator mediator, IWebHostEnvironment hostEnvironment)
|
||||
{
|
||||
_hostEnvironment = hostEnvironment;
|
||||
_localizer = localizer;
|
||||
_mediator = mediator;
|
||||
_mapper = mapper;
|
||||
_userInfo = userInfo;
|
||||
|
|
@ -994,7 +999,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
if (!realFileName.EndsWith(".xlsx", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// 请用提供格式的模板excel上传需要处理的数据
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_TemplateUploadData"));
|
||||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_TemplateUploadData"]);
|
||||
}
|
||||
|
||||
var ossRelativePath = await oSSService.UploadToOSSAsync(fileStream, "InspectionUpload/SiteSurvey", realFileName);
|
||||
|
|
@ -1015,7 +1020,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
if (excelList.Any(t => string.IsNullOrWhiteSpace(t.TrialSiteCode) || string.IsNullOrWhiteSpace(t.FirstName) || string.IsNullOrWhiteSpace(t.LastName) || string.IsNullOrWhiteSpace(t.Email) || string.IsNullOrWhiteSpace(t.UserTypeStr)))
|
||||
{
|
||||
//请确保Excel中 每一行的 中心编号,姓名,邮箱,用户类型数据记录完整再进行上传
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_EnsureCompleteData"));
|
||||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_EnsureCompleteData"]);
|
||||
}
|
||||
|
||||
var siteCodeList = excelList.Select(t => t.TrialSiteCode.Trim().ToUpper()).Distinct().ToList();
|
||||
|
|
@ -1023,31 +1028,31 @@ namespace IRaCIS.Core.API.Controllers
|
|||
if (_trialSiteRepository.Where(t => t.TrialId == trialId && siteCodeList.Contains(t.TrialSiteCode.ToUpper())).Count() != siteCodeList.Count)
|
||||
{
|
||||
//在项目中未找到该Excel中部分或全部中心
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_InvalidCenters"));
|
||||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_InvalidCenters"]);
|
||||
}
|
||||
|
||||
if (excelList.GroupBy(t => new { t.TrialSiteCode, t.UserTypeStr, t.Email }).Any(g => g.Count() > 1))
|
||||
{
|
||||
// 同一邮箱,同一用户类型,只能生成一个账户,请核查Excel数据
|
||||
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_CheckDuplicateAccounts"));
|
||||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_CheckDuplicateAccounts"]);
|
||||
}
|
||||
|
||||
if (excelList.Any(t => !t.Email.Contains("@")))
|
||||
{
|
||||
//有邮箱不符合邮箱格式,请核查Excel数据
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_InvalidEmail"));
|
||||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_InvalidEmail"]);
|
||||
}
|
||||
var generateUserTypeList = new List<string>() { "CRC", "CRA" };
|
||||
|
||||
if (excelList.Any(t => !generateUserTypeList.Contains(t.UserTypeStr.ToUpper())))
|
||||
{
|
||||
//用户类型仅能为 CRC,SR,CRA 请核查Excel数据
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_InvalidUserType"));
|
||||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_InvalidUserType"]);
|
||||
}
|
||||
if (excelList.Count == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(StaticData.International("UploadDownLoad_NoValiddata"));
|
||||
throw new BusinessValidationFailedException(_localizer["UploadDownLoad_NoValiddata"]);
|
||||
}
|
||||
//处理好 用户类型 和用户类型枚举
|
||||
var sysUserTypeList = _usertypeRepository.Where(t => t.UserTypeEnum == UserTypeEnum.CRA || t.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).Select(t => new { UserTypeId = t.Id, t.UserTypeEnum }).ToList();
|
||||
|
|
|
|||
|
|
@ -63,23 +63,23 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="aliyun-net-sdk-sts" Version="3.1.2" />
|
||||
<PackageReference Include="AspNetCoreRateLimit" Version="5.0.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="9.0.0" />
|
||||
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
|
||||
<PackageReference Include="EasyCaching.Interceptor.Castle" Version="1.9.2" />
|
||||
<PackageReference Include="EasyCaching.Serialization.MessagePack" Version="1.9.2">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.7" />
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.8.11" />
|
||||
<PackageReference Include="Hangfire.Dashboard.BasicAuthorization" Version="1.0.2" />
|
||||
<PackageReference Include="Hangfire.SqlServer" Version="1.8.7" />
|
||||
<PackageReference Include="Hangfire.SqlServer" Version="1.8.11" />
|
||||
<PackageReference Include="Invio.Extensions.Authentication.JwtBearer" Version="2.0.1" />
|
||||
<PackageReference Include="LogDashboard" Version="1.4.8" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.6" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
|
||||
<PackageReference Include="Serilog.Enrichers.ClientInfo" Version="2.0.3" />
|
||||
<PackageReference Include="Serilog.Sinks.Email" Version="2.4.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Email" Version="3.0.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -208,6 +208,12 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.ResetAndAsyncCriterion(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Service.Reading.Dto.ResetAndAsyncCriterionInDto})">
|
||||
<summary>
|
||||
重置并同步项目阅片标准
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.Controllers.InspectionController.CRCRequestToQC(IRaCIS.Core.Application.Service.Inspection.DTO.DataInspectionDto{IRaCIS.Core.Application.Contracts.CRCRequestToQCCommand})">
|
||||
<summary>
|
||||
CRC RequestToQC 批量提交
|
||||
|
|
@ -365,6 +371,11 @@
|
|||
IPLimit限流 启动服务
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.API.JSONTimeZoneConverter">
|
||||
<summary>
|
||||
序列化,反序列化的时候,处理时间 时区转换
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.API.NullToEmptyStringResolver.CreateProperties(System.Type,Newtonsoft.Json.MemberSerialization)">
|
||||
<summary>
|
||||
创建属性
|
||||
|
|
@ -380,6 +391,11 @@
|
|||
<param name="httpContext"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:TimeZoneAdjustmentMiddleware">
|
||||
<summary>
|
||||
废弃,没用
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:ZhaoXi._001.NET5Demo.Practice.WebApi.Utility.Jwt.CustomHSJWTService">
|
||||
<summary>
|
||||
对称可逆加密
|
||||
|
|
|
|||
|
|
@ -0,0 +1,118 @@
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// 废弃,没用
|
||||
/// </summary>
|
||||
public class TimeZoneAdjustmentMiddleware
|
||||
{
|
||||
private readonly RequestDelegate _next;
|
||||
|
||||
public TimeZoneAdjustmentMiddleware(RequestDelegate next)
|
||||
{
|
||||
_next = next;
|
||||
}
|
||||
|
||||
public async Task Invoke(HttpContext context)
|
||||
{
|
||||
if (string.IsNullOrEmpty(context.Request.ContentType))
|
||||
{
|
||||
// 请求没有内容体,可能是一个没有请求体的请求,比如 GET 请求
|
||||
await _next(context);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var timeZoneId = "Asia/Shanghai"; // 客户端默认时区
|
||||
|
||||
var timeZoneIdHeaderValue = context.Request.Headers["TimeZoneId"];
|
||||
|
||||
if (!string.IsNullOrEmpty(timeZoneIdHeaderValue))
|
||||
{
|
||||
timeZoneId = timeZoneIdHeaderValue;
|
||||
}
|
||||
|
||||
var timeZone = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
|
||||
|
||||
|
||||
|
||||
// 处理 JSON 请求体中的时间字段
|
||||
if (context.Request.ContentType.StartsWith("application/json"))
|
||||
{
|
||||
var requestBody = await new StreamReader(context.Request.Body).ReadToEndAsync();
|
||||
|
||||
// 使用 JSON.NET 或 System.Text.Json 解析 JSON 请求体
|
||||
// 假设请求体中有一个名为 "dateTime" 的时间字段
|
||||
dynamic jsonData = JsonConvert.DeserializeObject(requestBody);
|
||||
|
||||
if (jsonData.dateTime != null)
|
||||
{
|
||||
if (DateTime.TryParse((string)jsonData.dateTime, out DateTime dateTime))
|
||||
{
|
||||
// 将 JSON 请求体中的时间字段转换为服务器时区的时间
|
||||
var serverTime = TimeZoneInfo.ConvertTime(dateTime, timeZone);
|
||||
jsonData.dateTime = serverTime;
|
||||
}
|
||||
}
|
||||
|
||||
// 将修改后的 JSON 请求体重新写入请求流中
|
||||
var jsonBytes = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(jsonData));
|
||||
context.Request.Body = new MemoryStream(jsonBytes);
|
||||
context.Request.ContentLength = jsonBytes.Length;
|
||||
}
|
||||
|
||||
|
||||
// 处理 URL 表单参数
|
||||
var modifiedQuery = new Dictionary<string, StringValues>();
|
||||
|
||||
foreach (var key in context.Request.Query.Keys)
|
||||
{
|
||||
if (DateTime.TryParse(context.Request.Query[key], out DateTime dateTime))
|
||||
{
|
||||
// 将 URL 表单参数中的时间转换为服务器时区的时间
|
||||
var serverTime = TimeZoneInfo.ConvertTime(dateTime, timeZone);
|
||||
modifiedQuery[key] = new StringValues(serverTime.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
modifiedQuery[key] = context.Request.Query[key];
|
||||
}
|
||||
}
|
||||
|
||||
context.Request.Query = new QueryCollection(modifiedQuery);
|
||||
|
||||
// 处理Form请求体中的参数
|
||||
if (context.Request.HasFormContentType)
|
||||
{
|
||||
var modifiedForm = new Dictionary<string, StringValues>();
|
||||
|
||||
foreach (var key in context.Request.Form.Keys)
|
||||
{
|
||||
if (DateTime.TryParse(context.Request.Form[key], out DateTime dateTime))
|
||||
{
|
||||
// 将请求体中的时间转换为服务器时区的时间
|
||||
var serverTime = TimeZoneInfo.ConvertTime(dateTime, timeZone);
|
||||
modifiedForm[key] = new StringValues(serverTime.ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
modifiedForm[key] = context.Request.Form[key];
|
||||
}
|
||||
}
|
||||
|
||||
var newFormCollection = new FormCollection(modifiedForm);
|
||||
|
||||
// 将新的表单集合设置回请求对象
|
||||
context.Request.Form = newFormCollection;
|
||||
}
|
||||
|
||||
await _next(context);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -25,7 +25,8 @@ using Microsoft.AspNetCore.HttpOverrides;
|
|||
using IRaCIS.Application.Services.BackGroundJob;
|
||||
using LogDashboard;
|
||||
using OfficeOpenXml.Utils;
|
||||
|
||||
using FellowOakDicom.Network;
|
||||
using IRaCIS.Core.Application.Service.ImageAndDoc;
|
||||
|
||||
|
||||
#region 获取环境变量
|
||||
|
|
@ -109,7 +110,7 @@ builder.Services.AddControllers(options =>
|
|||
}
|
||||
|
||||
})
|
||||
.AddNewtonsoftJsonSetup(); // NewtonsoftJson 序列化 处理
|
||||
.AddNewtonsoftJsonSetup(builder.Services); // NewtonsoftJson 序列化 处理
|
||||
|
||||
builder.Services.AddOptions().Configure<SystemEmailSendConfig>(_configuration.GetSection("SystemEmailSendConfig"));
|
||||
builder.Services.AddOptions().Configure<ServiceVerifyConfigOption>(_configuration.GetSection("BasicSystemConfig"));
|
||||
|
|
@ -256,6 +257,7 @@ var hangfireJobService = app.Services.GetRequiredService<IIRaCISHangfireJob>();
|
|||
await hangfireJobService.InitHangfireJobTaskAsync();
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
try
|
||||
|
|
@ -291,6 +293,11 @@ try
|
|||
//Log.Logger.Warning($"ContentRootPath——GetParent:{Directory.GetParent(env.ContentRootPath).Parent.FullName}");
|
||||
//Log.Logger.Warning($"ContentRootPath——xx:{Path.GetDirectoryName(Path.GetDirectoryName(env.ContentRootPath))}");
|
||||
|
||||
|
||||
|
||||
|
||||
var server = DicomServerFactory.Create<CStoreSCPService>(11112,userState: app.Services);
|
||||
|
||||
app.Run();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
|
||||
namespace IRaCIS.Core.API
|
||||
{
|
||||
public class JSONCustomDateConverter : DateTimeConverterBase
|
||||
{
|
||||
private TimeZoneInfo _timeZoneInfo;
|
||||
private string _dateFormat;
|
||||
|
||||
private IUserInfo _userInfo;
|
||||
public JSONCustomDateConverter(string dateFormat, TimeZoneInfo timeZoneInfo, IUserInfo userInfo)
|
||||
{
|
||||
_dateFormat = dateFormat;
|
||||
_timeZoneInfo = timeZoneInfo;
|
||||
|
||||
_userInfo = userInfo;
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
var timeZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
var needConvertUtcDateTime = Convert.ToDateTime(value);
|
||||
|
||||
|
||||
var tz = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
|
||||
|
||||
|
||||
var dateTimeOffset = new DateTimeOffset(needConvertUtcDateTime);
|
||||
|
||||
var time = TimeZoneInfo.ConvertTimeFromUtc(needConvertUtcDateTime, tz).ToString(_dateFormat);
|
||||
|
||||
writer.WriteValue(time);
|
||||
writer.Flush();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace IRaCIS.Core.API
|
||||
{
|
||||
/// <summary>
|
||||
/// 序列化,反序列化的时候,处理时间 时区转换
|
||||
/// </summary>
|
||||
public class JSONTimeZoneConverter : DateTimeConverterBase
|
||||
{
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
private readonly TimeZoneInfo _clientTimeZone;
|
||||
public JSONTimeZoneConverter(IHttpContextAccessor httpContextAccessor)
|
||||
{
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
|
||||
//默认是UTC
|
||||
//var timeZoneId = "Etc/UTC";
|
||||
var timeZoneId = "Asia/Shanghai";
|
||||
|
||||
var timeZoneIdHeader = _httpContextAccessor?.HttpContext?.Request?.Headers["TimeZoneId"];
|
||||
|
||||
if (timeZoneIdHeader is not null && !string.IsNullOrEmpty(timeZoneIdHeader.Value))
|
||||
{
|
||||
timeZoneId = timeZoneIdHeader.Value;
|
||||
}
|
||||
|
||||
_clientTimeZone = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
|
||||
|
||||
}
|
||||
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
// 仅支持 DateTime 类型的转换
|
||||
return objectType == typeof(DateTime)|| objectType == typeof(DateTime?);
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
if (reader.Value == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
DateTime dateTime;
|
||||
|
||||
if (reader.ValueType == typeof(DateTime) || reader.ValueType == typeof(DateTime?))
|
||||
{
|
||||
DateTime? nullableDateTime = reader.Value as DateTime?;
|
||||
|
||||
|
||||
if (nullableDateTime != null && nullableDateTime.HasValue)
|
||||
{
|
||||
dateTime = nullableDateTime.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (DateTime.TryParse((string)reader.Value, out dateTime) == false)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 将客户端时间转换为服务器时区的时间
|
||||
var serverZoneTime = TimeZoneInfo.ConvertTime(dateTime, _clientTimeZone, TimeZoneInfo.Local);
|
||||
|
||||
return serverZoneTime;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
DateTime? nullableDateTime = value as DateTime?;
|
||||
|
||||
if (nullableDateTime != null && nullableDateTime.HasValue)
|
||||
{
|
||||
//第一个参数默认使用系统本地时区 也就是应用服务器的时区
|
||||
DateTime clientZoneTime = TimeZoneInfo.ConvertTime(nullableDateTime.Value, _clientTimeZone);
|
||||
writer.WriteValue(clientZoneTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteNull();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
using IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
|
@ -8,8 +10,12 @@ namespace IRaCIS.Core.API
|
|||
{
|
||||
public static class NewtonsoftJsonSetup
|
||||
{
|
||||
public static void AddNewtonsoftJsonSetup(this IMvcBuilder builder)
|
||||
public static void AddNewtonsoftJsonSetup(this IMvcBuilder builder, IServiceCollection services)
|
||||
{
|
||||
services.AddHttpContextAccessor();
|
||||
services.AddScoped<JSONTimeZoneConverter>();
|
||||
services.AddScoped<CustomStringConverter>();
|
||||
services.AddScoped<IOSSService,OSSService>();
|
||||
|
||||
builder.AddNewtonsoftJson(options =>
|
||||
{
|
||||
|
|
@ -23,8 +29,15 @@ namespace IRaCIS.Core.API
|
|||
// 设置时间格式
|
||||
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
options.SerializerSettings.DateTimeZoneHandling = DateTimeZoneHandling.RoundtripKind;
|
||||
|
||||
//options.SerializerSettings.Converters.Add(new JSONCustomDateConverter()) ;
|
||||
|
||||
options.SerializerSettings.Converters.Add(services.BuildServiceProvider().GetService<JSONTimeZoneConverter>());
|
||||
|
||||
//options.SerializerSettings.Converters.Add(services.BuildServiceProvider().GetService<CustomStringConverter>());
|
||||
|
||||
|
||||
//IsoDateTimeConverter
|
||||
//options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
using IRaCIS.Core.Application.Helper;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson
|
||||
{
|
||||
public class CustomStringConverter : JsonConverter<string>
|
||||
{
|
||||
//private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
private readonly IOSSService _oSSService;
|
||||
|
||||
// 构造函数
|
||||
public CustomStringConverter(/*IHttpContextAccessor httpContextAccessor*/ IOSSService oSSService)
|
||||
{
|
||||
//_httpContextAccessor = httpContextAccessor;
|
||||
_oSSService = oSSService;
|
||||
}
|
||||
|
||||
public override string ReadJson(JsonReader reader, Type objectType, string existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||
{
|
||||
if (reader.TokenType == JsonToken.String)
|
||||
{
|
||||
return (string)reader.Value;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, string value, JsonSerializer serializer)
|
||||
{
|
||||
if (value != null)
|
||||
{
|
||||
// 在这里对字符串进行处理,例如转换大小写、去除空格等
|
||||
// 这里只是一个示例,您可以根据实际需求进行更改
|
||||
|
||||
// 获取当前正在序列化的属性名
|
||||
string propertyName = writer.Path.Split('.').Last();
|
||||
|
||||
Regex guidRegex = new Regex(@"[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}");
|
||||
|
||||
if (propertyName.IndexOf("Path") > -1 && value.IndexOf('.')>-1 && guidRegex.IsMatch(value))
|
||||
{
|
||||
var tt= _oSSService.GetSignedUrl(value);
|
||||
writer.WriteValue(tt);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 将处理后的字符串写入到 JsonWriter 中
|
||||
writer.WriteValue(value);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.WriteNull();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +41,8 @@
|
|||
"OpenLoginLimit": true,
|
||||
"LoginMaxFailCount": 5,
|
||||
|
||||
"LoginFailLockMinutes": 30
|
||||
"LoginFailLockMinutes": 30,
|
||||
"AutoLoginOutMinutes": 60
|
||||
|
||||
},
|
||||
"SystemEmailSendConfig": {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@
|
|||
"OpenLoginLimit": true,
|
||||
"LoginMaxFailCount": 5,
|
||||
|
||||
"LoginFailLockMinutes": 30
|
||||
"LoginFailLockMinutes": 30,
|
||||
"AutoLoginOutMinutes": 60
|
||||
},
|
||||
|
||||
"SystemEmailSendConfig": {
|
||||
|
|
@ -51,6 +52,10 @@
|
|||
"FromEmail": "IRC@extimaging.com",
|
||||
"FromName": "IRC",
|
||||
"AuthorizationCode": "ExtImg@2022",
|
||||
"SiteUrl": "http://irc.extimaging.com/login"
|
||||
"SiteUrl": "http://irc.extimaging.com/login",
|
||||
"CompanyName": "Extensive Imaging",
|
||||
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||
"CompanyShortName": "Extensive Imaging",
|
||||
"CompanyShortNameCN": "展影医疗"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@
|
|||
|
||||
"LoginMaxFailCount": 5,
|
||||
|
||||
"LoginFailLockMinutes": 1
|
||||
"LoginFailLockMinutes": 1,
|
||||
"AutoLoginOutMinutes": 10
|
||||
},
|
||||
|
||||
"SystemEmailSendConfig": {
|
||||
|
|
@ -69,7 +70,12 @@
|
|||
"FromName": "Test_IRC",
|
||||
"AuthorizationCode": "SHzyyl2021",
|
||||
|
||||
"SiteUrl": "http://irc.test.extimaging.com/login"
|
||||
"SiteUrl": "http://irc.test.extimaging.com/login",
|
||||
|
||||
"CompanyName": "Extensive Imaging",
|
||||
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||
"CompanyShortName": "Extensive Imaging",
|
||||
"CompanyShortNameCN": "展影医疗"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,7 +60,8 @@
|
|||
|
||||
"LoginMaxFailCount": 5,
|
||||
|
||||
"LoginFailLockMinutes": 30
|
||||
"LoginFailLockMinutes": 30,
|
||||
"AutoLoginOutMinutes": 60
|
||||
},
|
||||
|
||||
"SystemEmailSendConfig": {
|
||||
|
|
@ -68,7 +69,11 @@
|
|||
"Host": "smtp.qiye.aliyun.com",
|
||||
"FromEmail": "test@extimaging.com",
|
||||
"FromName": "Test_IRC",
|
||||
"AuthorizationCode": "SHzyyl2021"
|
||||
"AuthorizationCode": "SHzyyl2021",
|
||||
"CompanyName": "Elevate Imaging",
|
||||
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||
"CompanyShortName": "Elevate Imaging",
|
||||
"CompanyShortNameCN": "展影医疗"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@
|
|||
"OpenLoginLimit": true,
|
||||
"LoginMaxFailCount": 5,
|
||||
|
||||
"LoginFailLockMinutes": 30
|
||||
"LoginFailLockMinutes": 30,
|
||||
"AutoLoginOutMinutes": 60
|
||||
|
||||
},
|
||||
"SystemEmailSendConfig": {
|
||||
|
|
@ -53,7 +54,11 @@
|
|||
"FromEmail": "uat@extimaging.com",
|
||||
"FromName": "UAT_IRC",
|
||||
"AuthorizationCode": "SHzyyl2021",
|
||||
"SiteUrl": "http://irc.uat.extimaging.com/login"
|
||||
"SiteUrl": "http://irc.uat.extimaging.com/login",
|
||||
"CompanyName": "Extensive Imaging",
|
||||
"CompanyNameCN": "上海展影医疗科技有限公司",
|
||||
"CompanyShortName": "Extensive Imaging",
|
||||
"CompanyShortNameCN": "展影医疗"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
尊敬的 {0} ,您好:
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
展影医疗为您添加了账户,账户信息如下:
|
||||
{company abbreviation}为您添加了账户,账户信息如下:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
|
|
@ -23,7 +23,7 @@
|
|||
</div>
|
||||
<div>
|
||||
首次登陆前,请通过该链接修改您的账户信息:
|
||||
<a href='{3}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
<a href='{3}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
初始化账号信息
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>祝您顺利!</div>
|
||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,20 +11,20 @@
|
|||
Dear {0} ,
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Extimaging has added an account for you. The account information is as follows:
|
||||
{company abbreviation} has created an account for you. The account information is as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
<div>
|
||||
User name: {1}
|
||||
User ID: {1}
|
||||
</div>
|
||||
<div>
|
||||
Role: {2}
|
||||
</div>
|
||||
<div>
|
||||
Before logging in for the first time, please modify your account information by this link:
|
||||
<a href='{3}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Initialize the account information
|
||||
Before logging in for the first time, please modify the account information through this link:
|
||||
<a href='{3}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Initialize account information
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best regards,</div>
|
||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
尊敬的 {0} ,您好:
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
展影医疗将您的账户密码已重置,账户信息如下:
|
||||
{company abbreviation}将您的账户密码已重置,账户信息如下:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>祝您顺利!</div>
|
||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@
|
|||
Dear {0} ,
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Extimaging has reset your account password, and the account information is as follows:
|
||||
{company abbreviation} has reset your account password, and the account information is as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
<div>
|
||||
User name: {1}
|
||||
User ID: {1}
|
||||
</div>
|
||||
<div>
|
||||
Role: {2}
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best regards,</div>
|
||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>祝您顺利!</div>
|
||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
Dear:
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Thank you for using Extensive Imaging Cloud System.
|
||||
Thank you for using {company abbreviation} Cloud System.
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
{0}。
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best regards,</div>
|
||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
尊敬的 {0} ,您好:
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
展影医疗作为 [{1} (试验方案号:{2 })] 项目的供应商,诚邀您参加该项目阅片相关工作。
|
||||
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的供应商,诚邀您参加该项目阅片相关工作。
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
<div>
|
||||
系统登录地址:
|
||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
点击跳转
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>祝您顺利!</div>
|
||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@
|
|||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
|
||||
As the service provider of {1} trial(Protocol ID is {2}), Extensive Imaging invites you to participate in the independent assessment work of this trial.
|
||||
{company abbreviation} invites you to participate in the IRC work of a trial ({1} , {2}).
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
This project adopts electronic workflow. The system and your account information are as follows:
|
||||
Your account information is as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
|
|
@ -25,23 +25,26 @@
|
|||
Protocol ID: {2}
|
||||
</div>
|
||||
<div>
|
||||
Study name: {1}
|
||||
Study Name: {1}
|
||||
</div>
|
||||
<div>
|
||||
User name: {4}
|
||||
User ID: {4}
|
||||
</div>
|
||||
<div>
|
||||
Role: {5}
|
||||
</div>
|
||||
<div>
|
||||
Login URL: {6}
|
||||
Login URL:
|
||||
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Click to login
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best regards,</div>
|
||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
尊敬的 {0} ,您好:
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
展影医疗作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC阅片相关工作,欢迎您提供指导和建议,非常感谢!
|
||||
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC阅片相关工作,欢迎您提供指导和建议,非常感谢!
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
<div>
|
||||
首次登陆前,请通过该链接修改您的账户信息:
|
||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
初始化账号信息
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>祝您顺利!</div>
|
||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@
|
|||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
|
||||
{company abbreviation} invites you to participate in the IRC work of a trial ({1}, {2}).
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
This project adopts electronic workflow. The system and your account information are as follows:
|
||||
Your account information is as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
|
|
@ -25,18 +25,18 @@
|
|||
Protocol ID: {2}
|
||||
</div>
|
||||
<div>
|
||||
Study name: {1}
|
||||
Study Name: {1}
|
||||
</div>
|
||||
<div>
|
||||
User name: {4}
|
||||
User ID: {4}
|
||||
</div>
|
||||
<div>
|
||||
Role: {5}
|
||||
</div>
|
||||
<div>
|
||||
Before logging in for the first time, please modify your account information by this link:
|
||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Initialize the account information
|
||||
Before logging in for the first time, please modify the account information through this link:
|
||||
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Initialize account information
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best regards,</div>
|
||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
尊敬的 {0} ,您好:
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
您好, 您填写的中心调研表被驳回,详细信息如下:
|
||||
您填写的中心调研表被驳回,详细信息如下:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>祝您顺利!</div>
|
||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
Dear {0} ,
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Hello, the center survey form you filled in has been rejected. The details are as follows:
|
||||
The site survey form you filled in has been rejected. The details are as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
Protocol ID: {2}
|
||||
</div>
|
||||
<div>
|
||||
Study name: {3}
|
||||
Study Name: {3}
|
||||
</div>
|
||||
<div>
|
||||
Site ID: {4}
|
||||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best regards,</div>
|
||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
尊敬的 {0} ,您好:
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
展影医疗作为 [{1} (试验方案号:{2 })] 项目的供应商,诚邀您参加该项目相关工作,欢迎您提供指导和建议,非常感谢!
|
||||
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的供应商,诚邀您参加该项目相关工作,欢迎您提供指导和建议,非常感谢!
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
<div>
|
||||
系统登录地址:
|
||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
<a href='{6}' style='margin-left:5px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
点击跳转
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>祝您顺利!</div>
|
||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@
|
|||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;font-size: 16px'>
|
||||
As the service provider of {1} trial (Protocol ID is {2}), Extensive Imaging invites you to participate in related work of this trial.
|
||||
{company abbreviation} invites you to participate in the IRC work of a trial ({1}, {2}).
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
This project adopts electronic workflow. The system and your account information are as follows:
|
||||
Your account information is as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
|
|
@ -25,23 +25,26 @@
|
|||
Protocol ID: {2}
|
||||
</div>
|
||||
<div>
|
||||
Study name: {1}
|
||||
Study Name: {1}
|
||||
</div>
|
||||
<div>
|
||||
User name: {4}
|
||||
User ID: {4}
|
||||
</div>
|
||||
<div>
|
||||
Role: {5}
|
||||
</div>
|
||||
<div>
|
||||
Login URL: {6}
|
||||
Login URL:
|
||||
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Click to login
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best regards,</div>
|
||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
尊敬的 {0} ,您好:
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
展影医疗作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC相关工作,欢迎您提供指导和建议,非常感谢!
|
||||
{company abbreviation}作为 [{1} (试验方案号:{2 })] 项目的IRC供应商,诚邀您参加该项目IRC相关工作,欢迎您提供指导和建议,非常感谢!
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
该项目采用电子化工作流,系统及您的账号信息如下:
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
</div>
|
||||
<div>
|
||||
首次登陆前,请通过该链接修改您的账户信息:
|
||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
初始化账号信息
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>祝您顺利!</div>
|
||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@
|
|||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
|
||||
{company abbreviation} invites you to participate in the IRC work of a trial ({1}, {2}).
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
This project adopts electronic workflow. The system and your account information are as follows:
|
||||
Your account information is as follows:
|
||||
</div>
|
||||
<span style="color: #00D1B2"></span>
|
||||
<div style='border: 1px solid #eee;box-sizing:border-box;width: 50%;background: #fff;padding: 20px;line-height: 40px;font-size: 14px;border-radius: 5px;margin-left: 60px;margin-bottom: 30px;'>
|
||||
|
|
@ -25,17 +25,17 @@
|
|||
Protocol ID: {2}
|
||||
</div>
|
||||
<div>
|
||||
Study name: {1}
|
||||
Study Name: {1}
|
||||
</div>
|
||||
<div>
|
||||
User name: {4}
|
||||
User ID: {4}
|
||||
</div>
|
||||
<div>
|
||||
Role: {5}
|
||||
</div>
|
||||
<div>
|
||||
Before logging in for the first time, please modify your account information by this link:
|
||||
<a href='{6}' style='margin-left:30px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Before logging in for the first time, please modify the account information through this link:
|
||||
<a href='{6}' style='margin-left:1px;font-size:14px;text-decoration: none;display: inline-block;color:#00D1B2;border-radius: 5px;line-height: 40px;text-align: center;'>
|
||||
Initialize the account information
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best regards,</div>
|
||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Hello {0},
|
||||
{0}您好,
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
感谢您使用展影云平台。
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>祝您顺利!</div>
|
||||
<div style="font-size: 14px;">上海展影医疗科技有限公司</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,21 +8,21 @@
|
|||
<div style='padding-left: 40px;background: #f6f6f6'>
|
||||
<div style='padding-top: 20px;'>
|
||||
<div style='line-height: 40px;font-size: 18px'>
|
||||
Hello {0},
|
||||
Dear {0},
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Thank you for using Extensive Imaging’s cloud system!
|
||||
{1}
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
{1}, and the verification code is <span style="font-weight:bold">{2}</span>.
|
||||
The verification code is <span style="font-weight:bold">{2}</span>.
|
||||
</div>
|
||||
<div style='line-height: 40px;padding-left: 40px;margin-bottom: 10px;'>
|
||||
Please enter this verification code within 3 minutes for subsequent operations.
|
||||
This code will expire in 3 minutes.
|
||||
</div>
|
||||
|
||||
<div style='line-height: 24px;font-size: 14px;color:#333;margin-top: 20px;padding-bottom: 40px;'>
|
||||
<div>Best regards,</div>
|
||||
<div style="font-size: 14px;">Extensive Imaging</div>
|
||||
<div style="font-size: 14px;">{company}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -8,6 +8,7 @@ using IRaCIS.Core.Infrastructure;
|
|||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using SharpCompress.Common;
|
||||
|
||||
namespace IRaCIS.Application.Services.BackGroundJob
|
||||
{
|
||||
|
|
@ -24,6 +25,8 @@ namespace IRaCIS.Application.Services.BackGroundJob
|
|||
{
|
||||
public static string JsonFileFolder = Path.Combine(AppContext.BaseDirectory, StaticData.Folder.Resources);
|
||||
|
||||
public static FileSystemWatcher FileSystemWatcher_US { get; set; }
|
||||
public static FileSystemWatcher FileSystemWatcher_CN { get; set; }
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IEasyCachingProvider _provider;
|
||||
private readonly ILogger<IRaCISCHangfireJob> _logger;
|
||||
|
|
@ -124,29 +127,43 @@ namespace IRaCIS.Application.Services.BackGroundJob
|
|||
|
||||
|
||||
//监测Json文件变更 实时刷新数据
|
||||
WatchJsonFile(usJsonPath);
|
||||
WatchJsonFile(cnJsonPath);
|
||||
|
||||
}
|
||||
|
||||
public void WatchJsonFile(string filePath)
|
||||
{
|
||||
if (!File.Exists(filePath))
|
||||
if (!File.Exists(usJsonPath)|| !File.Exists(cnJsonPath))
|
||||
{
|
||||
throw new BusinessValidationFailedException(StaticData.International("IRaCISCHangfireJob_FileNotFound"));
|
||||
}
|
||||
|
||||
FileSystemWatcher watcher = new FileSystemWatcher(Path.GetDirectoryName(filePath), Path.GetFileName(filePath));
|
||||
watcher.Changed += (sender, e) => LoadJsonFile(filePath);
|
||||
watcher.EnableRaisingEvents = true;
|
||||
FileSystemWatcher_US = new FileSystemWatcher
|
||||
{
|
||||
Path = Path.GetDirectoryName(usJsonPath)!,
|
||||
NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size,
|
||||
Filter = Path.GetFileName(usJsonPath),
|
||||
EnableRaisingEvents = true,
|
||||
|
||||
};
|
||||
// 添加文件更改事件的处理程序
|
||||
FileSystemWatcher_US.Changed += (sender, e) => LoadJsonFile(usJsonPath);
|
||||
|
||||
|
||||
FileSystemWatcher_CN = new FileSystemWatcher
|
||||
{
|
||||
Path = Path.GetDirectoryName(cnJsonPath)!,
|
||||
NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.Size,
|
||||
Filter = Path.GetFileName(cnJsonPath),
|
||||
EnableRaisingEvents = true,
|
||||
|
||||
};
|
||||
FileSystemWatcher_CN.Changed += (sender, e) => LoadJsonFile(cnJsonPath);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void LoadJsonFile(string filePath)
|
||||
{
|
||||
|
||||
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath);
|
||||
Console.WriteLine("刷新json内存数据");
|
||||
IConfigurationBuilder builder = new ConfigurationBuilder().AddJsonFile(filePath,false,true);
|
||||
|
||||
IConfigurationRoot enConfiguration = builder.Build();
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
|
|||
|
||||
public async Task OnAuthorizationAsync(AuthorizationFilterContext context)
|
||||
{
|
||||
var minutes = _verifyConfig.CurrentValue.AutoLoginOutMinutes;
|
||||
|
||||
if (_verifyConfig.CurrentValue.OpenLoginLimit)
|
||||
{
|
||||
if (context.ActionDescriptor.EndpointMetadata.Any(item => item is IAllowAnonymous))
|
||||
|
|
@ -58,22 +60,44 @@ public class LimitUserRequestAuthorization : IAsyncAuthorizationFilter
|
|||
context.Result = new JsonResult(ResponseOutput.NotOk(_localizer["LimitUser_AuthTokenMissing"]));
|
||||
}
|
||||
|
||||
|
||||
|
||||
//2、在这里取缓存 进行比较 看是否有其他人进行了登陆,如果其他人登陆了,就把之前用户挤掉
|
||||
var cacheUserToken = (await _provider.GetAsync<string>(_userInfo.Id.ToString())).Value;
|
||||
|
||||
|
||||
|
||||
//缓存中没有取到Token
|
||||
if (string.IsNullOrWhiteSpace(cacheUserToken))
|
||||
{
|
||||
cacheUserToken = _userInfo.UserToken;
|
||||
|
||||
//设置当前用户最新Token
|
||||
await _provider.SetAsync(_userInfo.Id.ToString(), _userInfo.UserToken, TimeSpan.FromDays(7));
|
||||
|
||||
cacheUserToken = _userInfo.UserToken;
|
||||
//重启应用程序,所有人续期,不一下子踢出所有人
|
||||
await _provider.SetAsync($"{_userInfo.Id.ToString()}_Online", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes));
|
||||
|
||||
}
|
||||
//是同一个人
|
||||
else if (cacheUserToken == _userInfo.UserToken)
|
||||
{
|
||||
|
||||
var cacheTime = (await _provider.GetAsync<string>($"{_userInfo.Id.ToString()}_Online")).Value;
|
||||
|
||||
//过期了 需要自动退出
|
||||
if (string.IsNullOrEmpty(cacheTime))
|
||||
{
|
||||
context.HttpContext.Response.ContentType = "application/json";
|
||||
context.HttpContext.Response.StatusCode = StatusCodes.Status403Forbidden;
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk("登录无操作超时自动退出", ApiResponseCodeEnum.AutoLoginOut));
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
await _provider.SetAsync($"{_userInfo.Id.ToString()}_Online", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(minutes));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ namespace IRaCIS.Core.Application.Filter
|
|||
|
||||
if (context.Exception.GetType() == typeof(BusinessValidationFailedException))
|
||||
{
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(context.Exception.Message,ApiResponseCodeEnum.BusinessValidationFailed));
|
||||
var error = context.Exception as BusinessValidationFailedException;
|
||||
|
||||
context.Result = new JsonResult(ResponseOutput.NotOk(context.Exception.Message, error!.Code));
|
||||
}
|
||||
else if(context.Exception.GetType() == typeof(QueryBusinessObjectNotExistException))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -103,6 +103,8 @@ namespace IRaCIS.Core.Application.Helper
|
|||
|
||||
public ObjectStoreServiceOptions ObjectStoreServiceOptions { get; set; }
|
||||
|
||||
public Task<string> GetSignedUrl(string ossRelativePath);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -337,9 +339,81 @@ namespace IRaCIS.Core.Application.Helper
|
|||
|
||||
}
|
||||
|
||||
public async Task<string> GetSignedUrl(string ossRelativePath)
|
||||
{
|
||||
ossRelativePath = ossRelativePath.TrimStart('/');
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
if (ObjectStoreServiceOptions.ObjectStoreUse == "AliyunOSS")
|
||||
{
|
||||
var aliConfig = ObjectStoreServiceOptions.AliyunOSS;
|
||||
|
||||
var _ossClient = new OssClient(aliConfig.endPoint, aliConfig.accessKeyId, aliConfig.accessKeySecret);
|
||||
|
||||
// 生成签名URL。
|
||||
var req = new GeneratePresignedUriRequest(aliConfig.bucketName, ossRelativePath, SignHttpMethod.Get)
|
||||
{
|
||||
// 设置签名URL过期时间,默认值为3600秒。
|
||||
Expiration = DateTime.Now.AddHours(1),
|
||||
};
|
||||
var uri = _ossClient.GeneratePresignedUri(req);
|
||||
|
||||
return uri.PathAndQuery;
|
||||
|
||||
}
|
||||
else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO")
|
||||
{
|
||||
var minIOConfig = ObjectStoreServiceOptions.MinIO;
|
||||
|
||||
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.endPoint}:{minIOConfig.port}")
|
||||
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
|
||||
.Build();
|
||||
|
||||
//var reqParams = new Dictionary<string, string>(StringComparer.Ordinal)
|
||||
// {
|
||||
// { "response-content-type", "application/json" }
|
||||
// };
|
||||
|
||||
var args = new PresignedGetObjectArgs()
|
||||
.WithBucket(minIOConfig.bucketName)
|
||||
.WithObject(ossRelativePath)
|
||||
.WithExpiry(3600)
|
||||
/*.WithHeaders(reqParams)*/;
|
||||
|
||||
var presignedUrl = await minioClient.PresignedGetObjectAsync(args);
|
||||
|
||||
Uri uri = new Uri(presignedUrl);
|
||||
|
||||
string relativePath = uri.PathAndQuery;
|
||||
|
||||
|
||||
return relativePath;
|
||||
|
||||
}
|
||||
else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS")
|
||||
{
|
||||
var minIOConfig = ObjectStoreServiceOptions.AWS;
|
||||
|
||||
var minioClient = new MinioClient().WithEndpoint($"{minIOConfig.endPoint}")
|
||||
.WithCredentials(minIOConfig.accessKey, minIOConfig.secretKey).WithSSL(minIOConfig.useSSL)
|
||||
.Build();
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException("未定义的存储介质类型");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw new BusinessValidationFailedException("oss授权url失败!" + ex.Message);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -64,8 +64,8 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aliyun.OSS.SDK.NetCore" Version="2.13.0" />
|
||||
<PackageReference Include="FreeSpire.Doc" Version="11.6.0" />
|
||||
<PackageReference Include="Hangfire.Core" Version="1.8.7" />
|
||||
<PackageReference Include="FreeSpire.Doc" Version="12.2.0" />
|
||||
<PackageReference Include="Hangfire.Core" Version="1.8.11" />
|
||||
<PackageReference Include="BeetleX.BNR" Version="1.0.1" />
|
||||
<PackageReference Include="Castle.Core.AsyncInterceptor" Version="2.1.0" />
|
||||
<PackageReference Include="EasyCaching.Redis" Version="1.9.2" />
|
||||
|
|
@ -76,29 +76,29 @@
|
|||
<PackageReference Include="DistributedLock.SqlServer" Version="1.0.3" />
|
||||
<PackageReference Include="fo-dicom" Version="5.1.2" />
|
||||
<PackageReference Include="fo-dicom.Imaging.ImageSharp" Version="5.1.2" />
|
||||
<PackageReference Include="fo-dicom.Codecs" Version="5.11.0" />
|
||||
<PackageReference Include="Magicodes.IE.Core" Version="2.7.4.5" />
|
||||
<PackageReference Include="Magicodes.IE.Csv" Version="2.7.4.5">
|
||||
<PackageReference Include="fo-dicom.Codecs" Version="5.12.0" />
|
||||
<PackageReference Include="Magicodes.IE.Core" Version="2.7.5.1" />
|
||||
<PackageReference Include="Magicodes.IE.Csv" Version="2.7.5.1">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Magicodes.IE.Excel" Version="2.7.4.5">
|
||||
<PackageReference Include="Magicodes.IE.Excel" Version="2.7.5.1">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Magicodes.IE.Excel.AspNetCore" Version="2.7.4.5" />
|
||||
<PackageReference Include="MailKit" Version="4.3.0" />
|
||||
<PackageReference Include="Magicodes.IE.Excel.AspNetCore" Version="2.7.5.1" />
|
||||
<PackageReference Include="MailKit" Version="4.4.0" />
|
||||
<PackageReference Include="MediatR" Version="12.2.0" />
|
||||
<PackageReference Include="MimeKit" Version="4.3.0" />
|
||||
<PackageReference Include="MimeKit" Version="4.4.0" />
|
||||
<PackageReference Include="MiniExcel" Version="1.31.3" />
|
||||
<PackageReference Include="Minio" Version="6.0.1" />
|
||||
<PackageReference Include="MiniWord" Version="0.7.0" />
|
||||
<PackageReference Include="Minio" Version="6.0.2" />
|
||||
<PackageReference Include="MiniWord" Version="0.8.0" />
|
||||
<PackageReference Include="My.Extensions.Localization.Json" Version="3.2.0">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NPOI" Version="2.6.2" />
|
||||
<PackageReference Include="Panda.DynamicWebApi" Version="1.2.1" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.2" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="7.0.12" />
|
||||
<PackageReference Include="WinSCP" Version="6.1.2" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.1" />
|
||||
<PackageReference Include="WinSCP" Version="6.3.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -154,12 +154,11 @@
|
|||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.ConfirmGenerateSelfConsistentTask(IRaCIS.Core.Application.ViewModel.ConsistentConfirmGenerateCommand,IRaCIS.Core.Application.Service.IVisitTaskHelpeService)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.ConfirmGenerateSelfConsistentTask(IRaCIS.Core.Application.ViewModel.ConsistentConfirmGenerateCommand)">
|
||||
<summary>
|
||||
确认生成自身一致性分析任务
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<param name="_visitTaskCommonService"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.GetGroupConsistentRuleSubjectList(IRaCIS.Core.Application.ViewModel.GroupConsistentQuery)">
|
||||
|
|
@ -169,12 +168,11 @@
|
|||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.ConfirmGenerateGroupConsistentTask(IRaCIS.Core.Application.ViewModel.GroupConsistentConfirmGenrateCommand,IRaCIS.Core.Application.Service.IVisitTaskHelpeService)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.ConfirmGenerateGroupConsistentTask(IRaCIS.Core.Application.ViewModel.GroupConsistentConfirmGenrateCommand)">
|
||||
<summary>
|
||||
确认生成组间一致性分析任务
|
||||
</summary>
|
||||
<param name="inCommand"></param>
|
||||
<param name="_visitTaskCommonService"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.GetIQueryableDoctorSelfConsistentSubjectView(IRaCIS.Core.Domain.Models.TaskConsistentRule,System.Guid,System.Collections.Generic.List{System.Guid})">
|
||||
|
|
@ -186,6 +184,14 @@
|
|||
<param name="subejctIdList"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.GetGroupConsistentQueryAsync(IRaCIS.Core.Domain.Models.TaskConsistentRule,System.Collections.Generic.List{System.Guid})">
|
||||
<summary>
|
||||
组间一致性分析 满足条件的subject 筛选
|
||||
</summary>
|
||||
<param name="filterObj"></param>
|
||||
<param name="subejctIdList"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.GetSelfConsistentDoctorStatList(IRaCIS.Core.Application.ViewModel.TaskConsistentRuleQuery)">
|
||||
<summary>
|
||||
自身一致性分配 配置+ 统计已经生成数量统计表
|
||||
|
|
@ -193,6 +199,28 @@
|
|||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.GetSelfConsistentRuleMatchSubjectIdListAsync(IRaCIS.Core.Application.ViewModel.SelfConsistentSimpleQuery)">
|
||||
<summary>
|
||||
获取自身一致性分析 符合条件的subject 数组
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.GetGroupConsistentRuleMatchSubjectIdListAsync(IRaCIS.Core.Application.ViewModel.GroupConsistentSimpleQuery)">
|
||||
<summary>
|
||||
获取组件一致性分析符合条件的subject 数组
|
||||
</summary>
|
||||
<param name="inQuery"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.TaskConsistentRuleService.GetRandomSubjectIdList(System.Collections.Generic.List{System.Guid},System.Int32)">
|
||||
<summary>
|
||||
随机算法,选择指定数量的 subject
|
||||
</summary>
|
||||
<param name="matchSubjectIdList"></param>
|
||||
<param name="countToSelect"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.TaskMedicalReviewRuleService">
|
||||
<summary>
|
||||
医学审核生成规则 废弃
|
||||
|
|
@ -819,6 +847,18 @@
|
|||
<param name="batchAddList"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.ImageAndDoc.CStoreSCPService">
|
||||
<summary>
|
||||
后台托管服务的方式运行
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.StudyService.AddOrUpdateArchiveStudy(IRaCIS.Core.Application.Contracts.NewArchiveStudyCommand)">
|
||||
<summary>
|
||||
上传临床数据
|
||||
</summary>
|
||||
<param name="incommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.StudyService.Preview(System.Guid)">
|
||||
<summary> 指定资源Id,渲染Dicom检查的Jpeg预览图像 </summary>
|
||||
<param name="studyId"> Dicom检查的Id </param>
|
||||
|
|
@ -1284,6 +1324,13 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.ReadingCalculateService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.ReadingCalculateService.AddTaskLesionAnswerFromLastTask(IRaCIS.Core.Application.ViewModel.AddTaskLesionAnswerFromLastTaskInDto)">
|
||||
<summary>
|
||||
将上一次的访视病灶添加到这一次
|
||||
|
|
@ -1310,6 +1357,27 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoCalculateService.CalculateTargetLesionStatus(IRaCIS.Core.Application.ViewModel.CalculateTargetLesionStatusInDto)">
|
||||
<summary>
|
||||
计算靶病灶状态
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.Interface.ILuganoCalculateService.CalculateMergeTargetLesionStatus(IRaCIS.Core.Application.ViewModel.CalculateTargetLesionStatusInDto)">
|
||||
<summary>
|
||||
计算靶病灶融合后状态
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.Service.ReadingCalculate.IRECIST1Point1CalculateService.sODData">
|
||||
<summary>
|
||||
获取Sod的值
|
||||
|
|
@ -1683,6 +1751,13 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.sODData">
|
||||
<summary>
|
||||
获取Sod的值
|
||||
|
|
@ -1693,6 +1768,11 @@
|
|||
基线任务Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.isUnableFuse">
|
||||
<summary>
|
||||
影像是否无法融合
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetDeleteLesionStatrIndex(IRaCIS.Core.Application.Service.Reading.Dto.DeleteReadingRowAnswerInDto)">
|
||||
<summary>
|
||||
删除病灶获取起始病灶序号(RECIST1Point1 固定是1)
|
||||
|
|
@ -1706,6 +1786,20 @@
|
|||
<param name="indto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetIsSuvMaxLesion(IRaCIS.Core.Application.Service.Reading.Dto.GetIsSuvMaxLesionInDto)">
|
||||
<summary>
|
||||
获取是否是最大suvmax 病灶
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetCanChooseNotMerge(IRaCIS.Core.Application.Service.Reading.Dto.GetCanChooseNotMergeInDto)">
|
||||
<summary>
|
||||
获取是否可选择不能融合影像
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.TestCalculate(System.Guid,IRaCIS.Core.Domain.Share.QuestionType)">
|
||||
<summary>
|
||||
测试计算
|
||||
|
|
@ -1743,6 +1837,13 @@
|
|||
<param name="calculateType"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.ImageQualityIsUnableFuse(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
获取影像是否无法融合
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetReportTumor(System.Guid)">
|
||||
<summary>
|
||||
获取报告整体整体评估
|
||||
|
|
@ -1764,9 +1865,16 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.CalculateMergeTargetLesionStatus(IRaCIS.Core.Application.ViewModel.CalculateTargetLesionStatusInDto)">
|
||||
<summary>
|
||||
计算融合靶病灶的状态
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.CalculateTargetLesionStatus(IRaCIS.Core.Application.ViewModel.CalculateTargetLesionStatusInDto)">
|
||||
<summary>
|
||||
计算靶病灶状态
|
||||
计算分裂靶病灶状态
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
|
|
@ -1944,6 +2052,13 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetSpleenLength(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
获取脾脏垂直径
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.CompareBaselineSPD(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
与基线相比SPD变化的百分比
|
||||
|
|
@ -1994,6 +2109,13 @@
|
|||
<param name="visitTaskId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetSplenicStatus(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
获取脾脏状态
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetSplenicEvaluation(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
获取脾脏评估
|
||||
|
|
@ -2036,6 +2158,15 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.CalculationFDGPETOverallAssessment(System.String,System.String,System.String)">
|
||||
<summary>
|
||||
计算FDG-PET总体评估结果【测试】
|
||||
</summary>
|
||||
<param name="pET5PS">PET5PS评分</param>
|
||||
<param name="uptakeChange"> 与基线相比摄取值变化</param>
|
||||
<param name="evidenceFocalFDG">骨髓中是否存在局灶性 FDG亲和病灶的证据</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetEvidenceFocalFDG(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
骨髓中是否存在局灶性 FDG亲和病灶的证据
|
||||
|
|
@ -2078,6 +2209,15 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.CalculationGetImgOncology(System.String,System.String,System.String)">
|
||||
<summary>
|
||||
计算整体肿瘤评估 【测试】
|
||||
</summary>
|
||||
<param name="cTandMRIData"> CT/MRI总体评估</param>
|
||||
<param name="fDGPETData"> FDG-PET总体评估</param>
|
||||
<param name="lastFDGPETData">上一次 FDG-PET总体评估</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.GetBaseLineSpleenLength(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto)">
|
||||
<summary>
|
||||
获取基线脾脏长度
|
||||
|
|
@ -2120,6 +2260,17 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.CalculationCTMRIEvaluation(System.String,System.String,System.String,System.String,System.String)">
|
||||
<summary>
|
||||
计算CTMRI 总体评估 【测试】
|
||||
</summary>
|
||||
<param name="targetEvaluation">靶病灶评估</param>
|
||||
<param name="noTargetEvaluation">非靶病灶评估</param>
|
||||
<param name="existsNewTarget">存在新病灶</param>
|
||||
<param name="liverEvaluation">肝脏评估</param>
|
||||
<param name="spleenEvaluation">脾脏评估</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.LuganoCalculateService.ReserveDecimal(System.Decimal,System.Int32)">
|
||||
<summary>
|
||||
保留小数
|
||||
|
|
@ -2128,6 +2279,13 @@
|
|||
<param name="digitPlaces"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.PCWG3CalculateService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.PCWG3CalculateService.GetDeleteLesionStatrIndex(IRaCIS.Core.Application.Service.Reading.Dto.DeleteReadingRowAnswerInDto)">
|
||||
<summary>
|
||||
删除病灶获取起始病灶序号
|
||||
|
|
@ -2227,6 +2385,13 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.RECIST1Point1CalculateService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.Service.ReadingCalculate.RECIST1Point1CalculateService.sODData">
|
||||
<summary>
|
||||
获取Sod的值
|
||||
|
|
@ -2471,6 +2636,13 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.RECIST1Point1_BMCalculateService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="F:IRaCIS.Core.Application.Service.ReadingCalculate.RECIST1Point1_BMCalculateService.sODData">
|
||||
<summary>
|
||||
获取Sod的值
|
||||
|
|
@ -2775,6 +2947,13 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.SelfDefineCalculateService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.SelfDefineCalculateService.GetDeleteLesionStatrIndex(IRaCIS.Core.Application.Service.Reading.Dto.DeleteReadingRowAnswerInDto)">
|
||||
<summary>
|
||||
删除病灶获取起始病灶序号
|
||||
|
|
@ -2859,6 +3038,13 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ICriterionCalculateService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.IGeneralCalculateService.GetReadingCalculateDto(System.Guid)">
|
||||
<summary>
|
||||
获取ReadingCalculateDto
|
||||
|
|
@ -2931,6 +3117,13 @@
|
|||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.IReadingCalculateService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.SubjectCriteriaEvaluationService">
|
||||
<summary>
|
||||
SubjectCriteriaEvaluationService
|
||||
|
|
@ -3014,9 +3207,23 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.DeleteStudyClinical(IRaCIS.Core.Application.Service.Reading.Dto.DeleteStudyClinicalInDto)">
|
||||
<summary>
|
||||
删除检查级别临床数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.AddStudyClinical(IRaCIS.Core.Application.Service.Reading.Dto.AddStudyClinicalInDto)">
|
||||
<summary>
|
||||
添加检查级别临床数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ClinicalAnswerService.AutoAddCRCClinical(IRaCIS.Core.Application.Service.Reading.Dto.AutoAddClinicalInDto)">
|
||||
<summary>
|
||||
自动添加CRC临床数据
|
||||
自动添加CRC临床数据 (不包括检查级别)
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
|
|
@ -4445,6 +4652,11 @@
|
|||
上传方式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCClinicalDataOutDto.ClinicalDataLevel">
|
||||
<summary>
|
||||
临床级别
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCRCClinicalDataOutDto.UploadRole">
|
||||
<summary>
|
||||
上传角色
|
||||
|
|
@ -4860,11 +5072,81 @@
|
|||
序号标记
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionAnswerInfo.QuestionMark">
|
||||
<summary>
|
||||
问题标识
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionAnswerInfo.QuestionId">
|
||||
<summary>
|
||||
问题Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionAnswerInfo.TableQuestionId">
|
||||
<summary>
|
||||
表格问题Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionAnswerInfo.VisitTaskId">
|
||||
<summary>
|
||||
任务Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionAnswerInfo.TrialId">
|
||||
<summary>
|
||||
项目Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionAnswerInfo.RowIndex">
|
||||
<summary>
|
||||
行号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionAnswerInfo.Answer">
|
||||
<summary>
|
||||
答案
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionAnswerInfo.CreateTime">
|
||||
<summary>
|
||||
创建时间
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionAnswerInfo.CreateUserId">
|
||||
<summary>
|
||||
创建人
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.TableQuestionAnswerInfo.RowId">
|
||||
<summary>
|
||||
RowId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.MergeLesionInDto.MergeMainRowId">
|
||||
<summary>
|
||||
融合的主病灶
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.MergeLesionInDto.MergeRowIdList">
|
||||
<summary>
|
||||
融合的病灶
|
||||
</summary>
|
||||
</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.GetPreviousOtherPicturePathInDto.QuestionType">
|
||||
<summary>
|
||||
问题类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto.VisitTaskId">
|
||||
<summary>
|
||||
任务Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCustomTagDto.VisitTaskId">
|
||||
<summary>
|
||||
任务Id
|
||||
|
|
@ -4920,6 +5202,11 @@
|
|||
问题分类
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableAnswerRowInfoBase.CreateTime">
|
||||
<summary>
|
||||
CreateTime
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableAnswerRowInfoBase.QuestionId">
|
||||
<summary>
|
||||
第一层的Question
|
||||
|
|
@ -4990,11 +5277,6 @@
|
|||
MeasureData
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableAnswerRowInfoBase.CreateTime">
|
||||
<summary>
|
||||
CreateTime
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableAnswerRowInfoBase.IsCurrentTaskAdd">
|
||||
<summary>
|
||||
是否是当前任务添加
|
||||
|
|
@ -5290,6 +5572,11 @@
|
|||
是否显示详情
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetOncologyReadingInfoOutDto.ReadingCategory">
|
||||
<summary>
|
||||
任务类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetRelatedVisitTaskOutDto.IsConvertedTask">
|
||||
<summary>
|
||||
是否是转变的任务(转为IRECIST)
|
||||
|
|
@ -5300,6 +5587,21 @@
|
|||
是否是第一次转化的任务
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetRelatedVisitTaskOutDto.PTSeriesId">
|
||||
<summary>
|
||||
融合的PTSeriesId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetRelatedVisitTaskOutDto.CTSeriesId">
|
||||
<summary>
|
||||
融合的CTSeriesId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetRelatedVisitTaskOutDto.OtherStudyId">
|
||||
<summary>
|
||||
StudyId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetGlobalReadingInfoInDto.UsingOriginalData">
|
||||
<summary>
|
||||
当新答案为空的时候 是否是有原数据
|
||||
|
|
@ -5510,6 +5812,16 @@
|
|||
StudyId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SubmitTableQuestionInDto.PTSeriesId">
|
||||
<summary>
|
||||
融合的PTSeriesId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SubmitTableQuestionInDto.CTSeriesId">
|
||||
<summary>
|
||||
融合的CTSeriesId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.SubmitVisitTaskQuestionsInDto">
|
||||
<summary>
|
||||
|
||||
|
|
@ -5640,6 +5952,11 @@
|
|||
问题标识
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetSystemReadingQuestionOutDto.GroupId">
|
||||
<summary>
|
||||
分组ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetSystemReadingQuestionOutDto.ReadingQuestionCriterionSystemId">
|
||||
<summary>
|
||||
系统标准Id
|
||||
|
|
@ -8076,6 +8393,11 @@
|
|||
排序
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionTrialView.CriterionType">
|
||||
<summary>
|
||||
标准类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionTrialView.IsSystemData">
|
||||
<summary>
|
||||
是否是系统数据
|
||||
|
|
@ -8371,6 +8693,21 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.AddDefaultQuestions(IRaCIS.Core.Application.ViewModel.AddDefaultQuestionsInDto)">
|
||||
<summary>
|
||||
一键添加默认医学审核问题
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.VerifyIsCanConfirm(IRaCIS.Core.Application.ViewModel.VerifyIsCanConfirmInDto)">
|
||||
<summary>
|
||||
验证医学审核问题是否可确认
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService.AddTrialDataFromSystem(IRaCIS.Core.Application.ViewModel.AddTrialDataFromSystemInDto)">
|
||||
<summary>
|
||||
从系统里面选择问题添加到项目里面
|
||||
|
|
@ -8890,7 +9227,7 @@
|
|||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.TaskMedicalReviewQuery.Id">
|
||||
<summary>
|
||||
传了Id 就不查询这条数据
|
||||
传了Id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.ViewModel.VisitTaskViewBasic.TaskUrgentType">
|
||||
|
|
@ -11264,6 +11601,14 @@
|
|||
Financial---项目收入价格验证
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.DicomArchiveService.ArchiveDicomFileAsync(FellowOakDicom.DicomDataset)">
|
||||
<summary>
|
||||
单个文件接收 归档
|
||||
</summary>
|
||||
<param name="dataset"></param>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.NotImplementedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.InstanceService.List(System.Guid)">
|
||||
<summary> 指定资源Id,获取Dicom序列所属的实例信息列表 </summary>
|
||||
<param name="seriesId"> Dicom序列的Id </param>
|
||||
|
|
@ -11329,6 +11674,20 @@
|
|||
<param name="isReading"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.SubjectVisitService.GetDicomSeriesInfo(IRaCIS.Core.Application.Contracts.GetDicomSeriesInfoInDto)">
|
||||
<summary>
|
||||
获取Series信息
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.SubjectVisitService.GetPTAndCtSeries(IRaCIS.Core.Application.Contracts.GetPTAndCtSeriesInDto)">
|
||||
<summary>
|
||||
获取PTAndCtSeries
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.SubjectVisitService.GetReadingVisitStudyList(IRaCIS.Core.Application.Contracts.GetReadingVisitStudyListIndto)">
|
||||
<summary>
|
||||
获取访视下的Dicom 检查信息 分所有的, 阅片的 不阅片 isReading : 0 查询所有 1 查询仅仅阅片的
|
||||
|
|
@ -11679,12 +12038,6 @@
|
|||
映射配置
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetBasicStat">
|
||||
<summary>
|
||||
个人面板 统计值
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.PersonalWorkstation.GetSiteSurveyApprovalList(IRaCIS.Core.Application.Contracts.TrialSiteSurveyStatQuery)">
|
||||
<summary>
|
||||
中心调研 每个项目 需要处理的审批统计
|
||||
|
|
@ -11887,9 +12240,16 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.ResetAndAsyncCriterion(IRaCIS.Core.Application.Service.Reading.Dto.ResetAndAsyncCriterionInDto)">
|
||||
<summary>
|
||||
重置并同步标准
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.AsyncTrialCriterionDictionary(IRaCIS.Core.Application.Contracts.AsyncTrialCriterionDictionaryInDto)">
|
||||
<summary>
|
||||
同步项目标准字典信息
|
||||
同步项目标准所有信息
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
|
|
@ -11998,6 +12358,14 @@
|
|||
<param name="trialConfig"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.ConfigTrialProcessInfoVerification(IRaCIS.Core.Application.Contracts.ConfigTrialProcessInfoVerificationInDto)">
|
||||
<summary>
|
||||
配置流程验证
|
||||
</summary>
|
||||
<param name="trialConfig"></param>
|
||||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.TrialConfigService.ConfigTrialProcessInfo(IRaCIS.Core.Application.Contracts.TrialProcessConfig)">
|
||||
<summary>
|
||||
配置流程
|
||||
|
|
@ -12913,6 +13281,13 @@
|
|||
<param name="id"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingClinicalDataService.GetStudyClinicalData(IRaCIS.Core.Application.Service.Reading.Dto.GetStudyClinicalDataInDto)">
|
||||
<summary>
|
||||
获取检查类型临床数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingClinicalDataService.GetCRCClinicalData(IRaCIS.Core.Application.Service.Reading.Dto.GetCRCClinicalDataInDto)">
|
||||
<summary>
|
||||
获取CRC上传的文件
|
||||
|
|
@ -13220,6 +13595,20 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetPreviousOtherPicturePath(IRaCIS.Core.Application.Service.Reading.Dto.GetPreviousOtherPicturePathInDto)">
|
||||
<summary>
|
||||
获取既往病灶的OtherPicture
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SubmitCustomTag(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCustomTagDto)">
|
||||
<summary>
|
||||
提交自定义标记
|
||||
|
|
@ -13409,10 +13798,17 @@
|
|||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.MergeLesion(IRaCIS.Core.Application.Service.Reading.Dto.MergeLesionInDto)">
|
||||
<summary>
|
||||
合并病灶
|
||||
合并病灶 融合
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.GetCanMergeLesion(IRaCIS.Core.Application.Service.Reading.Dto.GetCanMergeLesionInDto)">
|
||||
<summary>
|
||||
获取可合并的病灶
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SaveImageQuality(IRaCIS.Core.Application.Service.Reading.Dto.ChangeDicomReadingQuestionAnswerInDto)">
|
||||
<summary>
|
||||
保存影像质量
|
||||
|
|
@ -13420,6 +13816,14 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SaveTaskQuestion(IRaCIS.Core.Application.Service.Reading.Dto.ChangeDicomReadingQuestionAnswerInDto,System.String)">
|
||||
<summary>
|
||||
保存任务问题 带动态稽查参数
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<param name="param">请求类型</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.ChangeDicomReadingQuestionAnswer(IRaCIS.Core.Application.Service.Reading.Dto.ChangeDicomReadingQuestionAnswerInDto)">
|
||||
<summary>
|
||||
修改肿瘤学评估结果
|
||||
|
|
@ -13436,7 +13840,7 @@
|
|||
</member>
|
||||
<member name="M:IRaCIS.Application.Services.ReadingImageTaskService.SubmitTableQuestion(IRaCIS.Core.Application.Service.Reading.Dto.SubmitTableQuestionInDto)">
|
||||
<summary>
|
||||
提交表格问题答案 提交病灶
|
||||
提交表格问题答案 提交病灶 保存病灶
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public int? GeneratedSubjectCount { get; set; }
|
||||
|
||||
public int? MatchSubejctCount { get; set; }
|
||||
|
||||
public int? CanGeneratedSubejctCount => MatchSubejctCount - GeneratedSubjectCount;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -34,6 +36,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
}
|
||||
|
||||
public class SubjectGeneratedTask
|
||||
{
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public bool IsHaveGeneratedTask { get; set; }
|
||||
}
|
||||
|
||||
public class ConsistentQuery : PageInput
|
||||
{
|
||||
[NotDefault]
|
||||
|
|
@ -46,6 +55,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
}
|
||||
|
||||
public class GroupConsistentSimpleQuery
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
public class GroupConsistentQuery : PageInput
|
||||
{
|
||||
[NotDefault]
|
||||
|
|
@ -56,13 +74,21 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
public class ConsistentConfirmGenerateCommand
|
||||
public class SelfConsistentSimpleQuery
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TaskConsistentRuleId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid DoctorUserId { get; set; }
|
||||
}
|
||||
|
||||
public class ConsistentConfirmGenerateCommand: SelfConsistentSimpleQuery
|
||||
{
|
||||
|
||||
|
||||
public List<Guid> SubejctIdList { get; set; }
|
||||
|
||||
public bool IsAutoAllocateGenerateTask { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -70,7 +96,13 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
public List<Guid> SubejctIdList { get; set; }
|
||||
|
||||
public bool IsAutoAllocateGenerateTask { get; set; }
|
||||
}
|
||||
|
||||
public class DoctorSelfConsistentSubjectView: ConsistentCommonView
|
||||
|
|
@ -105,6 +137,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public List<VisitTaskGroupSimpleDTO> SubjectTaskVisitList => VisitTaskList.GroupBy(t => new { t.SubjectId, t.VisitTaskNum }).Where(g => g.Count() == 2).Select(g => g.First()).OrderBy(t=>t.VisitTaskNum).ToList();
|
||||
|
||||
public List<VisitTaskGroupSimpleDTO> VisitTaskList { get; set; } = new List<VisitTaskGroupSimpleDTO>();
|
||||
|
||||
public List<UserSimpleInfo> DoctorUserList { get; set; }=new List<UserSimpleInfo>();
|
||||
}
|
||||
|
||||
public class VisitTaskGroupSimpleDTO
|
||||
|
|
@ -287,6 +321,17 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
|
||||
}
|
||||
public class UpdateTrialSiteCodeCommand
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public string VirtualSiteCode { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateTrialSiteCodeCommandView: UpdateTrialSiteCodeCommand
|
||||
{
|
||||
public DateTime Creatime { get; set; }
|
||||
}
|
||||
|
||||
///<summary> TaskConsistentRuleAddOrEdit 列表查询参数模型</summary>
|
||||
public class TaskConsistentRuleAddOrEdit
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
{
|
||||
if (!ReadingDurationTimeSpan.HasValue)
|
||||
return "";
|
||||
else return string.Format("{0}d {1}h {2}min", (SignTime - FirstReadingTime)?.Days, (SignTime - FirstReadingTime)?.Hours, (SignTime - FirstReadingTime)?.Minutes)
|
||||
else return string.Format("{0}h:{1}m:{2}s", (SignTime - FirstReadingTime)?.Hours, (SignTime - FirstReadingTime)?.Minutes, (SignTime - FirstReadingTime)?.Seconds)
|
||||
/*string.Format("{0}分钟", (ReadingDurationTimeSpan)?.TotalMinutes)*/;
|
||||
}
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public Guid? SiteId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 传了Id 就不查询这条数据
|
||||
/// 传了Id
|
||||
/// </summary>
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
|
|
@ -113,6 +113,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public bool IsGetBeRead { get; set; } = false;
|
||||
|
||||
public bool IsGetNextMedicalReviewTask { get; set; } = false;
|
||||
|
||||
public string SubjectCode { get; set; } = String.Empty;
|
||||
|
||||
public string TrialSiteCode { get; set; } = String.Empty;
|
||||
|
|
|
|||
|
|
@ -504,6 +504,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public string SubjectCode { get; set; } = String.Empty;
|
||||
|
||||
public int? SubjectAllocateState { get; set; }
|
||||
|
||||
public List<Arm> ArmList { get; set; }=new List<Arm>() { };
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@ using System.Linq;
|
|||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using Medallion.Threading;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
|
@ -32,9 +35,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
private readonly IRepository<Subject> _subjectRepository;
|
||||
private readonly IRepository<Enroll> _enrollRepository;
|
||||
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<TrialSite> _trialSiteRepository;
|
||||
|
||||
private readonly IRepository<TrialVirtualSiteCodeUpdate> _trialVirtualSiteCodeUpdateRepository;
|
||||
|
||||
private readonly IVisitTaskHelpeService _visitTaskCommonService;
|
||||
|
||||
|
||||
public TaskConsistentRuleService(IRepository<VisitTask> visitTaskRepository, IRepository<Enroll> enrollRepository, IRepository<TaskConsistentRule> taskConsistentRuleRepository, IRepository<SubjectUser> subjectUserRepository, IRepository<Subject> subjectRepository, IDistributedLockProvider distributedLockProvider)
|
||||
public TaskConsistentRuleService(IRepository<VisitTask> visitTaskRepository, IRepository<Enroll> enrollRepository, IRepository<TaskConsistentRule> taskConsistentRuleRepository, IRepository<SubjectUser> subjectUserRepository, IRepository<Subject> subjectRepository, IDistributedLockProvider distributedLockProvider,
|
||||
IRepository<Trial> trialRepository, IRepository<TrialSite> trialSiteRepository, IRepository<TrialVirtualSiteCodeUpdate> trialVirtualSiteCodeUpdateRepository, IVisitTaskHelpeService visitTaskCommonService)
|
||||
{
|
||||
_taskConsistentRuleRepository = taskConsistentRuleRepository;
|
||||
_visitTaskRepository = visitTaskRepository;
|
||||
|
|
@ -42,6 +52,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
_subjectRepository = subjectRepository;
|
||||
_enrollRepository = enrollRepository;
|
||||
_distributedLockProvider = distributedLockProvider;
|
||||
|
||||
_trialRepository = trialRepository;
|
||||
|
||||
_trialSiteRepository = trialSiteRepository;
|
||||
|
||||
_trialVirtualSiteCodeUpdateRepository = trialVirtualSiteCodeUpdateRepository;
|
||||
|
||||
_visitTaskCommonService = visitTaskCommonService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -54,7 +72,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
|
||||
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => taskIdList.Contains(t.Id), u => new VisitTask() { TaskState = TaskState.NotEffect },true);
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => taskIdList.Contains(t.Id), u => new VisitTask() { TaskState = TaskState.Adbandon }, true);
|
||||
|
||||
await _visitTaskRepository.SaveChangesAsync();
|
||||
|
||||
|
|
@ -69,7 +87,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="queryVisitTask"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<AnalysisTaskView>> GetAnalysisTaskList(VisitTaskQuery queryVisitTask)
|
||||
public async Task<IResponseOutput<PageOutput<AnalysisTaskView>>> GetAnalysisTaskList(VisitTaskQuery queryVisitTask)
|
||||
{
|
||||
var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId)
|
||||
.Where(t => t.IsAnalysisCreate)
|
||||
|
|
@ -97,8 +115,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var pageList = await visitTaskQueryable.ToPagedListAsync(queryVisitTask.PageIndex, queryVisitTask.PageSize, queryVisitTask.SortField, queryVisitTask.Asc, string.IsNullOrWhiteSpace(queryVisitTask.SortField), defalutSortArray);
|
||||
|
||||
//var trialTaskConfig = _repository.Where<Trial>(t => t.Id == queryVisitTask.TrialId).ProjectTo<TrialTaskConfigView>(_mapper.ConfigurationProvider).FirstOrDefault();
|
||||
return pageList;
|
||||
var trialTaskConfig = _repository.Where<Trial>(t => t.Id == queryVisitTask.TrialId).Select(t => new { IsHaveDoubleReadCriterion=t.ReadingQuestionCriterionTrialList.Any(t=>t.IsSigned && t.IsConfirm && t.ReadingType==ReadingMethod.Double), t.VitrualSiteCode }).FirstOrDefault();
|
||||
|
||||
return ResponseOutput.Ok(pageList, trialTaskConfig);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -123,13 +142,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// 确认生成自身一致性分析任务
|
||||
/// </summary>
|
||||
/// <param name="inCommand"></param>
|
||||
/// <param name="_visitTaskCommonService"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
//[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
public async Task<IResponseOutput> ConfirmGenerateSelfConsistentTask(ConsistentConfirmGenerateCommand inCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
|
||||
public async Task<IResponseOutput> ConfirmGenerateSelfConsistentTask(ConsistentConfirmGenerateCommand inCommand)
|
||||
{
|
||||
|
||||
|
||||
|
|
@ -137,6 +155,25 @@ namespace IRaCIS.Core.Application.Service
|
|||
var doctorUserId = inCommand.DoctorUserId;
|
||||
var trialReadingCriterionId = filterObj.TrialReadingCriterionId;
|
||||
|
||||
//随机分配
|
||||
if (inCommand.IsAutoAllocateGenerateTask)
|
||||
{
|
||||
var subjectList = (await GetSelfConsistentRuleMatchSubjectIdListAsync(new SelfConsistentSimpleQuery() { TaskConsistentRuleId = inCommand.TaskConsistentRuleId, DoctorUserId = inCommand.DoctorUserId })).ToList();
|
||||
|
||||
if (subjectList.Any(t => t.IsHaveGeneratedTask))
|
||||
{
|
||||
//已手动分配,不允许自动分配
|
||||
throw new BusinessValidationFailedException(_localizer["TaskConsistent_NotAllowedGenerate"]);
|
||||
}
|
||||
|
||||
if (subjectList.Count<2 * filterObj.PlanSubjectCount)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["TaskConsistent_NotAllowedGenerate1"]);
|
||||
}
|
||||
|
||||
inCommand.SubejctIdList = GetRandomSubjectIdList(subjectList.Select(t => t.SubjectId).ToList(), filterObj.PlanSubjectCount);
|
||||
}
|
||||
|
||||
var list = await GetIQueryableDoctorSelfConsistentSubjectView(filterObj, doctorUserId, inCommand.SubejctIdList).ToListAsync();
|
||||
|
||||
//var (group, query) = GetIQueryableDoctorSelfConsistentRuleSubjectView(filterObj, inCommand.SubejctIdList);
|
||||
|
|
@ -245,7 +282,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<DoctorGroupConsistentSubjectView>> GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery)
|
||||
public async Task<IResponseOutput<PageOutput<DoctorGroupConsistentSubjectView>> > GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery)
|
||||
{
|
||||
var trialId = inQuery.TrialId;
|
||||
|
||||
|
|
@ -254,7 +291,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
if (filterObj == null)
|
||||
{
|
||||
return new PageOutput<DoctorGroupConsistentSubjectView>();
|
||||
object tt = null;
|
||||
return ResponseOutput.Ok(new PageOutput<DoctorGroupConsistentSubjectView>(), new { Rule = tt, IsAllowAutoAllocate = false }) ;
|
||||
}
|
||||
|
||||
var query = await GetGroupConsistentQueryAsync(filterObj);
|
||||
|
|
@ -262,7 +300,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var pagedList = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(DoctorSelfConsistentSubjectView.SubjectCode) : inQuery.SortField, inQuery.Asc);
|
||||
|
||||
return pagedList;
|
||||
var rule = await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == false && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo<TaskConsistentRuleBasic>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
var list = await GetGroupConsistentRuleMatchSubjectIdListAsync(new GroupConsistentSimpleQuery() { TrialId = inQuery.TrialId, TrialReadingCriterionId = inQuery.TrialReadingCriterionId });
|
||||
|
||||
var isAllowAutoAllocate = !list.Any(t => t.IsHaveGeneratedTask) && list.Count() > 2*(rule?.PlanSubjectCount??0);
|
||||
|
||||
return ResponseOutput.Ok(pagedList, new {Rule=rule, IsAllowAutoAllocate = isAllowAutoAllocate });
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -271,26 +315,46 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// 确认生成组间一致性分析任务
|
||||
/// </summary>
|
||||
/// <param name="inCommand"></param>
|
||||
/// <param name="_visitTaskCommonService"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
||||
public async Task<IResponseOutput> ConfirmGenerateGroupConsistentTask(GroupConsistentConfirmGenrateCommand inCommand, [FromServices] IVisitTaskHelpeService _visitTaskCommonService)
|
||||
public async Task<IResponseOutput> ConfirmGenerateGroupConsistentTask(GroupConsistentConfirmGenrateCommand inCommand)
|
||||
{
|
||||
var trialId = inCommand.TrialId;
|
||||
|
||||
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.IsSelfAnalysis == false);
|
||||
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.TrialReadingCriterionId == inCommand.TrialReadingCriterionId && t.IsSelfAnalysis == false);
|
||||
|
||||
var trialReadingCriterionId = filterObj.TrialReadingCriterionId;
|
||||
|
||||
//随机分配
|
||||
if (inCommand.IsAutoAllocateGenerateTask)
|
||||
{
|
||||
var subjectSelectList = (await GetGroupConsistentRuleMatchSubjectIdListAsync(new GroupConsistentSimpleQuery() { TrialId = inCommand.TrialId, TrialReadingCriterionId = inCommand.TrialReadingCriterionId })).ToList();
|
||||
|
||||
if (subjectSelectList.Any(t => t.IsHaveGeneratedTask))
|
||||
{
|
||||
//已手动分配过,不允许自动分配
|
||||
throw new BusinessValidationFailedException(_localizer["TaskConsistent_NotAllowedGenerate"]);
|
||||
}
|
||||
|
||||
if (subjectSelectList.Count< 2 * filterObj.PlanSubjectCount)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["TaskConsistent_NotAllowedGenerate1"]);
|
||||
}
|
||||
|
||||
inCommand.SubejctIdList = GetRandomSubjectIdList(subjectSelectList.Select(t => t.SubjectId).ToList(), filterObj.PlanSubjectCount);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var query = await GetGroupConsistentQueryAsync(filterObj, inCommand.SubejctIdList);
|
||||
|
||||
var subjectList = query.ToList();
|
||||
|
||||
var doctorUserIdQuery = from enroll in _repository.Where<Enroll>(t => t.TrialId == trialId).Where(t => t.EnrollReadingCategoryList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(c => c.ReadingCategory == ReadingCategory.Global || c.ReadingCategory == ReadingCategory.Visit))
|
||||
.Where(t => t.EnrollReadingCriteriaList.Any(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsJoinAnalysis == true))
|
||||
join user in _repository.Where<User>() on enroll.DoctorId equals user.DoctorId
|
||||
select user.Id;
|
||||
|
||||
|
|
@ -564,7 +628,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 组间一致性分析 满足条件的subject 筛选
|
||||
/// </summary>
|
||||
/// <param name="filterObj"></param>
|
||||
/// <param name="subejctIdList"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<IQueryable<DoctorGroupConsistentSubjectView>> GetGroupConsistentQueryAsync(TaskConsistentRule filterObj, List<Guid>? subejctIdList = null)
|
||||
{
|
||||
|
||||
|
|
@ -624,6 +693,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
IsHaveGeneratedTask = t.SubjectVisitTaskList.Any(c => c.IsSelfAnalysis == false && c.TrialReadingCriterionId == trialReadingCriterionId),
|
||||
|
||||
DoctorUserList = t.SubjectDoctorList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsConfirmed).Select(t => new UserSimpleInfo()
|
||||
{
|
||||
UserId = t.Id,
|
||||
FullName = t.DoctorUser.FullName,
|
||||
UserCode = t.DoctorUser.UserCode,
|
||||
UserName = t.DoctorUser.UserName
|
||||
}).ToList(),
|
||||
|
||||
ValidVisitCount = t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter).GroupBy(t => new { t.SubjectId, t.VisitTaskNum }).Where(g => g.Count() == 2).Count(),
|
||||
|
||||
|
|
@ -672,12 +748,22 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<TaskConsistentRuleView>> GetSelfConsistentDoctorStatList(TaskConsistentRuleQuery inQuery)
|
||||
public async Task<IResponseOutput<List<TaskConsistentRuleView>>> GetSelfConsistentDoctorStatList(TaskConsistentRuleQuery inQuery)
|
||||
{
|
||||
|
||||
|
||||
var trialId = inQuery.TrialId;
|
||||
|
||||
var taskConsistentRuleQueryable = from enroll in _repository.Where<Enroll>(t => t.TrialId == trialId && t.EnrollStatus==EnrollStatus.ConfirmIntoGroup)
|
||||
join user in _repository.Where<User>() on enroll.DoctorId equals user.DoctorId
|
||||
Expression<Func<VisitTask, bool>> comonTaskFilter = u => u.TrialId == trialId && u.IsAnalysisCreate == false && u.TaskState == TaskState.Effect && u.ReadingTaskState == ReadingTaskState.HaveSigned && (u.ReReadingApplyState == ReReadingApplyState.Default || u.ReReadingApplyState == ReReadingApplyState.Reject);
|
||||
|
||||
//&& u.TrialReadingCriterionId == trialReadingCriterionId &&u.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && u.DoctorUserId == doctorUserId;
|
||||
|
||||
Expression<Func<VisitTask, bool>> visitTaskFilter = comonTaskFilter.And(t => t.ReadingCategory == ReadingCategory.Visit);
|
||||
|
||||
|
||||
var taskConsistentRuleQueryable = from enroll in _repository.Where<Enroll>(t => t.TrialId == trialId && t.EnrollStatus == EnrollStatus.ConfirmIntoGroup
|
||||
&& t.EnrollReadingCriteriaList.Any(c => c.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && c.IsJoinAnalysis))
|
||||
join user in _repository.Where<User>() on enroll.DoctorUserId equals user.Id
|
||||
join taskConsistentRule in _repository.Where<TaskConsistentRule>(t => t.TrialId == trialId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.IsSelfAnalysis) on enroll.TrialId equals taskConsistentRule.TrialId
|
||||
select new TaskConsistentRuleView()
|
||||
{
|
||||
|
|
@ -697,7 +783,20 @@ namespace IRaCIS.Core.Application.Service
|
|||
IsHaveReadingPeriod = taskConsistentRule.IsHaveReadingPeriod,
|
||||
PlanVisitCount = taskConsistentRule.PlanVisitCount,
|
||||
|
||||
GeneratedSubjectCount = taskConsistentRule.Trial.VisitTaskList.Where(t => t.IsAnalysisCreate && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.IsSelfAnalysis == true && t.DoctorUserId == user.Id).Select(t => t.SubjectId).Distinct().Count(),
|
||||
GeneratedSubjectCount = taskConsistentRule.TrialReadingCriterion.VisitTaskList.Where(t => t.IsAnalysisCreate && t.IsSelfAnalysis == true && t.DoctorUserId == user.Id).Select(t => t.SubjectId).Distinct().Count(),
|
||||
|
||||
|
||||
MatchSubejctCount = taskConsistentRule.Trial.SubjectList.AsQueryable()
|
||||
.Where(t => taskConsistentRule.IsHaveReadingPeriod == false ? t.SubjectVisitTaskList.AsQueryable()
|
||||
.Where(visitTaskFilter).Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < DateTime.Now && t.DoctorUserId == user.Id)
|
||||
.Count() >= taskConsistentRule.PlanVisitCount :
|
||||
|
||||
t.SubjectVisitTaskList.AsQueryable().Where(comonTaskFilter)
|
||||
.Where(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.SignTime!.Value.AddDays(taskConsistentRule.IntervalWeeks * 7) < DateTime.Now && t.DoctorUserId == user.Id)
|
||||
.Where(t => t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global).OrderBy(t => t.VisitTaskNum).Take(taskConsistentRule.PlanVisitCount + 1).Any(t => t.ReadingCategory == ReadingCategory.Global))
|
||||
.Count(),
|
||||
|
||||
|
||||
|
||||
AnalysisDoctorUser = new UserSimpleInfo()
|
||||
{
|
||||
|
|
@ -724,10 +823,48 @@ namespace IRaCIS.Core.Application.Service
|
|||
//var taskConsistentRuleQueryable = _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
// .ProjectTo<TaskConsistentRuleView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await taskConsistentRuleQueryable.ToListAsync();
|
||||
var list= await taskConsistentRuleQueryable.ToListAsync();
|
||||
|
||||
var rule= await _taskConsistentRuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis == true && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId).ProjectTo<TaskConsistentRuleBasic>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
return ResponseOutput.Ok(list, rule);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> UpdateTrialVirtualSiteCode(UpdateTrialSiteCodeCommand inCommand)
|
||||
{
|
||||
|
||||
if (_trialSiteRepository.Where(t => t.TrialId == inCommand.TrialId, false, true).Any(t => t.TrialSiteCode == inCommand.VirtualSiteCode))
|
||||
{
|
||||
return ResponseOutput.NotOk(_localizer["TaskConsistent_SiteCodeExists"]);
|
||||
}
|
||||
|
||||
var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == inCommand.TrialId);
|
||||
|
||||
var oldCode = trial.VitrualSiteCode;
|
||||
|
||||
trial.VitrualSiteCode = inCommand.VirtualSiteCode;
|
||||
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trial.Id, u => new VisitTask() { BlindTrialSiteCode = inCommand.VirtualSiteCode });
|
||||
|
||||
await _taskConsistentRuleRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trial.Id, u => new TaskConsistentRule() { BlindTrialSiteCode = inCommand.VirtualSiteCode });
|
||||
|
||||
|
||||
await _visitTaskRepository.ExecuteUpdateAsync(t => t.TrialId == trial.Id, s => s.SetProperty(e => e.BlindSubjectCode, u => u.BlindSubjectCode.Replace(oldCode, inCommand.VirtualSiteCode)));
|
||||
|
||||
await _trialVirtualSiteCodeUpdateRepository.AddAsync(new TrialVirtualSiteCodeUpdate() { VirturalSiteCode = inCommand.VirtualSiteCode, TrialId = inCommand.TrialId });
|
||||
|
||||
await _trialRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
public async Task<List<UpdateTrialSiteCodeCommandView>> GetUpdateVirtualSiteCodeList(Guid trialId)
|
||||
{
|
||||
var list = await _trialVirtualSiteCodeUpdateRepository.Where(t => t.TrialId == trialId).Select(t => new UpdateTrialSiteCodeCommandView() { TrialId = trialId, VirtualSiteCode = t.VirturalSiteCode, Creatime = t.CreateTime }).OrderByDescending(t=>t.Creatime).ToListAsync();
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
|
|
@ -748,6 +885,22 @@ namespace IRaCIS.Core.Application.Service
|
|||
return ResponseOutput.NotOk(_localizer["TaskConsistent_MedicalAuditTaskExists"]);
|
||||
}
|
||||
|
||||
|
||||
if (_trialSiteRepository.Where(t => t.TrialId == addOrEditTaskConsistentRule.TrialId, false, true).Any(t => t.TrialSiteCode == addOrEditTaskConsistentRule.BlindTrialSiteCode))
|
||||
{
|
||||
return ResponseOutput.NotOk(_localizer["TaskConsistent_SiteCodeExists"]);
|
||||
}
|
||||
|
||||
var trial = await _trialRepository.FirstOrDefaultAsync(t => t.Id == addOrEditTaskConsistentRule.TrialId);
|
||||
|
||||
if (string.IsNullOrEmpty(trial.VitrualSiteCode))
|
||||
{
|
||||
await _trialVirtualSiteCodeUpdateRepository.AddAsync(new TrialVirtualSiteCodeUpdate() { VirturalSiteCode = addOrEditTaskConsistentRule.BlindTrialSiteCode, TrialId = addOrEditTaskConsistentRule.TrialId });
|
||||
}
|
||||
|
||||
trial.VitrualSiteCode = addOrEditTaskConsistentRule.BlindTrialSiteCode;
|
||||
|
||||
|
||||
var entity = await _taskConsistentRuleRepository.InsertOrUpdateAsync(addOrEditTaskConsistentRule, true, verifyExp1);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
|
@ -775,8 +928,65 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取自身一致性分析 符合条件的subject 数组
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<SubjectGeneratedTask>> GetSelfConsistentRuleMatchSubjectIdListAsync(SelfConsistentSimpleQuery inQuery)
|
||||
{
|
||||
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.Id == inQuery.TaskConsistentRuleId);
|
||||
|
||||
var subjectList = await GetIQueryableDoctorSelfConsistentSubjectView(filterObj, inQuery.DoctorUserId).Select(t => new SubjectGeneratedTask() { SubjectId = t.SubjectId, IsHaveGeneratedTask = t.IsHaveGeneratedTask }).ToListAsync();
|
||||
|
||||
return subjectList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取组件一致性分析符合条件的subject 数组
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<SubjectGeneratedTask>> GetGroupConsistentRuleMatchSubjectIdListAsync(GroupConsistentSimpleQuery inQuery)
|
||||
{
|
||||
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == inQuery.TrialId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId && t.IsSelfAnalysis == false);
|
||||
|
||||
var subjectList = await (await GetGroupConsistentQueryAsync(filterObj)).Select(t => new SubjectGeneratedTask() { SubjectId = t.SubjectId, IsHaveGeneratedTask = t.IsHaveGeneratedTask }).ToListAsync();
|
||||
|
||||
return subjectList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 随机算法,选择指定数量的 subject
|
||||
/// </summary>
|
||||
/// <param name="matchSubjectIdList"></param>
|
||||
/// <param name="countToSelect"></param>
|
||||
/// <returns></returns>
|
||||
public List<Guid> GetRandomSubjectIdList(List<Guid> matchSubjectIdList, int countToSelect)
|
||||
{
|
||||
|
||||
// 使用 Fisher-Yates 随机置换算法来选择指定数量的 GUID
|
||||
Random random = new Random();
|
||||
|
||||
for (int i = 0; i < countToSelect; i++)
|
||||
{
|
||||
// 生成一个随机索引
|
||||
int randomIndex = random.Next(i, matchSubjectIdList.Count);
|
||||
|
||||
// 将选中的元素与当前元素交换位置
|
||||
Guid temp = matchSubjectIdList[randomIndex];
|
||||
matchSubjectIdList[randomIndex] = matchSubjectIdList[i];
|
||||
matchSubjectIdList[i] = temp;
|
||||
}
|
||||
|
||||
return matchSubjectIdList.Take(countToSelect).ToList();
|
||||
|
||||
// 使用洗牌算法来随机选择指定数量的GUID
|
||||
//Random random = new Random();
|
||||
//return matchSubjectIdList.OrderBy(g => random.Next()).Take(countToSelect).ToList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,11 +67,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<IResponseOutput> DeleteTaskMedicalReviewRule(Guid taskMedicalReviewRuleId)
|
||||
{
|
||||
|
||||
if(await _taskMedicalReviewRuleRepository.Where(t=>t.Id== taskMedicalReviewRuleId).AnyAsync(t => t.TaskMedicalReviewList.Any()))
|
||||
{
|
||||
//"已产生医学审核任务"
|
||||
return ResponseOutput.NotOk(_localizer["TaskMedicalRule_TaskStarted"]);
|
||||
}
|
||||
//if(await _taskMedicalReviewRuleRepository.Where(t=>t.Id== taskMedicalReviewRuleId).AnyAsync(t => t.TaskMedicalReviewList.Any()))
|
||||
//{
|
||||
// //"已产生医学审核任务"
|
||||
// return ResponseOutput.NotOk(_localizer["TaskMedicalRule_TaskStarted"]);
|
||||
//}
|
||||
|
||||
var success = await _taskMedicalReviewRuleRepository.DeleteFromQueryAsync(t => t.Id == taskMedicalReviewRuleId,true);
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using IRaCIS.Core.Application.ViewModel;
|
|||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
|
@ -72,9 +73,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
.WhereIf(inQuery.DoctorUserIdeaEnum != null, t => t.DoctorUserIdeaEnum == inQuery.DoctorUserIdeaEnum)
|
||||
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||
.OrderBy(x => x.AuditState).ThenBy(x => x.VisitTask.SubjectId).ThenBy(x => x.VisitTask.ArmEnum).ThenBy(x => x.VisitTask.VisitTaskNum)
|
||||
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TaskMedicalReviewView.Id) : inQuery.SortField, inQuery.Asc);
|
||||
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, new string[] { });
|
||||
|
||||
return pageList;
|
||||
}
|
||||
|
|
@ -144,44 +146,52 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
var medicalReview = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.MedicalReviewId).Include(x => x.VisitTask).FirstNotNullAsync();
|
||||
|
||||
var subjectReview = (await GetMIMMedicalReviewTaskList(new TaskMedicalReviewQuery()
|
||||
{
|
||||
|
||||
TrialId = medicalReview.TrialId,
|
||||
IsGetBeRead = true,
|
||||
Id=inDto.MedicalReviewId,
|
||||
SubjectId= medicalReview.VisitTask.SubjectId,
|
||||
TrialReadingCriterionId = medicalReview.VisitTask.TrialReadingCriterionId,
|
||||
PageIndex=1,
|
||||
PageSize=1,
|
||||
})).Data;
|
||||
|
||||
if (subjectReview.CurrentPageData.Count == 1)
|
||||
{
|
||||
return subjectReview.CurrentPageData[0];
|
||||
}
|
||||
|
||||
var data = (await GetMIMMedicalReviewTaskList(new TaskMedicalReviewQuery()
|
||||
{
|
||||
|
||||
TrialId = medicalReview.TrialId,
|
||||
IsGetBeRead = true,
|
||||
Id = inDto.MedicalReviewId,
|
||||
TrialReadingCriterionId = medicalReview.VisitTask.TrialReadingCriterionId,
|
||||
IsGetNextMedicalReviewTask = true,
|
||||
PageIndex = 1,
|
||||
PageSize = 1,
|
||||
PageSize = 99999,
|
||||
})).Data;
|
||||
|
||||
if (data.CurrentPageData.Count == 1)
|
||||
|
||||
if (data.CurrentPageData.Count > 0)
|
||||
{
|
||||
return data.CurrentPageData[0];
|
||||
|
||||
var index = data.CurrentPageData.ToList().FindIndex(x => x.Id == inDto.MedicalReviewId);
|
||||
|
||||
var result = new TaskMedicalReviewView() { };
|
||||
|
||||
if (index+1 == data.CurrentPageData.Count()) // 最后一个
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_Finish"]);
|
||||
}
|
||||
else if (index == -1 || data.CurrentPageData.Count == 1) // 第一个或者只有一个
|
||||
{
|
||||
if (data.CurrentPageData[0].Id == inDto.MedicalReviewId)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_Finish"]);
|
||||
}
|
||||
result = data.CurrentPageData[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
result = data.CurrentPageData.Skip(index + 1).Take(1).First();
|
||||
|
||||
}
|
||||
return result;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_Finish"]);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -196,10 +206,20 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
|
||||
var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId && t.MedicalManagerUserId == _userInfo.Id&&t.VisitTask.TrialReadingCriterionId==inQuery.TrialReadingCriterionId)
|
||||
|
||||
.WhereIf(inQuery.IsGetNextMedicalReviewTask,
|
||||
x=>(
|
||||
!x.IsInvalid&& x.AuditState== MedicalReviewAuditState.Auditing &
|
||||
( x.ReadingMedicalReviewDialogList.Count()!=0&&
|
||||
x.ReadingMedicalReviewDialogList.Count()>0&&
|
||||
x.ReadingMedicalReviewDialogList.OrderByDescending(x=>x.CreateTime).FirstOrDefault().UserTypeEnumInt==(int)UserTypeEnum.IndependentReviewer)
|
||||
) // 审核中最新回复为IR的
|
||||
|| (!x.IsInvalid&& x.AuditState==MedicalReviewAuditState.WaitAudit)
|
||||
||x.Id == inQuery.Id // 这里必须找传入id 因为要找到这条的索引 获取下一条
|
||||
)
|
||||
.WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId)
|
||||
.WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode))
|
||||
.WhereIf(inQuery.Id != null, t => t.Id != inQuery.Id)
|
||||
.WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent)
|
||||
.WhereIf(inQuery.AuditState != null, t => t.AuditState == inQuery.AuditState)
|
||||
.WhereIf(inQuery.DoctorUserIdeaEnum != null, t => t.DoctorUserIdeaEnum == inQuery.DoctorUserIdeaEnum)
|
||||
|
|
@ -210,9 +230,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(inQuery.IsInvalid != null, t => t.IsInvalid == inQuery.IsInvalid)
|
||||
.WhereIf(inQuery.IsGetBeRead,x=>!x.IsInvalid&&x.AuditState!= MedicalReviewAuditState.HaveSigned)
|
||||
.WhereIf(inQuery.TrialReadingCriterionId != null, t => t.VisitTask.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||
.OrderBy(x=>x.VisitTask.SubjectId).ThenBy(x=>x.VisitTask.ArmEnum).ThenBy(x=>x.VisitTask.VisitTaskNum)
|
||||
.ProjectTo<TaskMedicalReviewView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TaskMedicalReviewView.Id) : inQuery.SortField, inQuery.Asc);
|
||||
|
||||
var pageList = await taskMedicalReviewQueryable.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize,new string[] { } );
|
||||
|
||||
return ResponseOutput.Ok(pageList, new
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1619,8 +1619,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
IsUrgent = originalTaskInfo.IsUrgent,
|
||||
TaskName = item.ReadingName,
|
||||
//IsConvertedTask = originalTaskInfo.IsConvertedTask,
|
||||
// 原任务是全局任务 加0.03 就好
|
||||
VisitTaskNum = originalTaskInfo.VisitTaskNum + 0.03m,
|
||||
// 这里可能是
|
||||
VisitTaskNum = originalTaskInfo.VisitTaskNum - ReadingCommon.TaskNumDic[originalTaskInfo.ReadingCategory] + ReadingCommon.TaskNumDic[ReadingCategory.Oncology],
|
||||
ArmEnum = Arm.TumorArm, //特殊
|
||||
Code = currentMaxCodeInt + 1,
|
||||
SouceReadModuleId = item.ReadModuleId,
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
var list = await _repository.Where<ReadingQuestionCriterionTrial>(t => t.TrialId == trialId && t.IsConfirm)
|
||||
|
||||
.OrderBy(t => t.ShowOrder)
|
||||
.Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, IsAutoCreate = t.IsAutoCreate, IsAdditionalAssessment = t.IsAdditionalAssessment, TrialReadingCriterionName = t.CriterionName, CriterionType = t.CriterionType, ReadingType = t.ReadingType, ReadingInfoSignTime = t.ReadingInfoSignTime })
|
||||
.Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, IsAutoCreate = t.IsAutoCreate, IsAdditionalAssessment = t.IsAdditionalAssessment, TrialReadingCriterionName = t.CriterionName, CriterionType = t.CriterionType, ReadingType = t.ReadingType, ReadingInfoSignTime = t.ReadingInfoSignTime , IsReadingPeriod= t.IsReadingPeriod })
|
||||
.ToListAsync();
|
||||
|
||||
//if (list.Count == 0)
|
||||
|
|
@ -128,7 +128,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<(PageOutput<SubjectAssignStat>, object?)> GetSubjectAssignAndTaskStatList(SubjectAssignStatQuery querySubjectAssign)
|
||||
public async Task<IResponseOutput<PageOutput<SubjectAssignStat>>> GetSubjectAssignAndTaskStatList(SubjectAssignStatQuery querySubjectAssign)
|
||||
{
|
||||
|
||||
var isAddtinoarlCriterion = await _trialReadingCriterionRepository.AnyAsync(t => t.Id == querySubjectAssign.TrialReadingCriterionId && t.IsAutoCreate == false);
|
||||
|
|
@ -138,6 +138,14 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
.WhereIf(querySubjectAssign.SubjectId != null, t => t.Id == querySubjectAssign.SubjectId)
|
||||
.WhereIf(querySubjectAssign.DoctorUserId != null, t => t.SubjectDoctorList.Any(t => t.DoctorUserId == querySubjectAssign.DoctorUserId && t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId))
|
||||
.WhereIf(!string.IsNullOrEmpty(querySubjectAssign.SubjectCode), t => t.Code.Contains(querySubjectAssign.SubjectCode))
|
||||
//未分配
|
||||
.WhereIf(querySubjectAssign.SubjectAllocateState == 0, t => !t.SubjectDoctorList.Any(t => t.AssignTime!=null && t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId))
|
||||
//已分配
|
||||
.WhereIf(querySubjectAssign.SubjectAllocateState == 1, t => t.SubjectDoctorList.Any(t => t.AssignTime != null && t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId))
|
||||
|
||||
.WhereIf(querySubjectAssign.ArmList.Count >0 , t => !querySubjectAssign.ArmList.Except(t.SubjectDoctorList.Where(t => t.AssignTime != null && t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId).Select(c => c.ArmEnum)).Any() )
|
||||
|
||||
|
||||
.WhereIf(isAddtinoarlCriterion, t => t.SubjectCriteriaEvaluationList.Where(t => t.TrialReadingCriterionId == querySubjectAssign.TrialReadingCriterionId).Any(t => t.IsJoinEvaluation))
|
||||
|
||||
|
||||
|
|
@ -150,7 +158,7 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
|
||||
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == querySubjectAssign.TrialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder, x.ReadingType, x.IsArbitrationReading, x.IsOncologyReading, x.IsGlobalReading }).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
return (pageList, criterionConfig);
|
||||
return ResponseOutput.Ok (pageList, criterionConfig);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -257,27 +257,27 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
CreateMap<TaskMedicalReviewRule, TaskMedicalReviewRuleView>()
|
||||
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser))
|
||||
.ForMember(o => o.ActualVisitTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Visit && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect
|
||||
&& t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
//CreateMap<TaskMedicalReviewRule, TaskMedicalReviewRuleView>()
|
||||
// .ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser))
|
||||
// .ForMember(o => o.ActualVisitTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Visit && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect
|
||||
// && t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.ActualJudgeTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.ActualJudgeTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Judge && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
// t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.ActualGlobalTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.ActualGlobalTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
// t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.ActualTumorTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Oncology && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.ActualTumorTaskList, t => t.MapFrom(u => u.DoctorTrialVisitTaskList.Where(t => t.ReadingCategory == ReadingCategory.Oncology && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect &&
|
||||
// t.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.Id, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.GeneratedGlobalTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Global && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.GeneratedGlobalTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Global && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.GeneratedJudgeTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Judge && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.GeneratedJudgeTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Judge && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.GeneratedTumorTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Oncology && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
// .ForMember(o => o.GeneratedTumorTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Oncology && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })))
|
||||
|
||||
.ForMember(o => o.GeneratedVisitTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Visit && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })));
|
||||
// .ForMember(o => o.GeneratedVisitTaskList, t => t.MapFrom(u => u.TaskMedicalReviewList.Where(t => t.VisitTask.ReadingCategory == ReadingCategory.Visit && t.VisitTask.IsAnalysisCreate == false && t.VisitTask.TaskState == TaskState.Effect && t.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned).OrderBy(t => t.VisitTask.SignTime).Select(t => new TaskBasicIdView() { TaskId = t.VisitTaskId, TrialId = t.TrialId, DoctorUserId = t.DoctorUserId })));
|
||||
|
||||
CreateMap<TaskMedicalReviewRuleAddOrEdit, TaskMedicalReviewRule>();
|
||||
|
||||
|
|
|
|||
|
|
@ -91,6 +91,8 @@ namespace IRaCIS.Application.Contracts
|
|||
public class GetBasicDataAllSelectInDto
|
||||
{
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
|
||||
public Guid? SystemReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<TrialCriterionDictionaryCode> _trialCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingSystemCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystem;
|
||||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrial;
|
||||
|
|
@ -34,6 +34,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||
IRepository<TrialCriterionDictionaryCode> trialCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingSystemCriterionDictionaryRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystem,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrial
|
||||
|
|
@ -49,6 +50,7 @@ namespace IRaCIS.Application.Services
|
|||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||
this._trialCriterionDictionaryCodeRepository = trialCriterionDictionaryCodeRepository;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
this._readingSystemCriterionDictionaryRepository = readingSystemCriterionDictionaryRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._readingQuestionCriterionSystem = readingQuestionCriterionSystem;
|
||||
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
|
||||
|
|
@ -462,11 +464,11 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var result = searchList.GroupBy(t => t.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
||||
|
||||
if (inDto.TrialReadingCriterionId == null)
|
||||
if (inDto.TrialReadingCriterionId == null && inDto.SystemReadingCriterionId == null)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
else
|
||||
else if (inDto.TrialReadingCriterionId != null)
|
||||
{
|
||||
var trialCriterionType = await _readingQuestionCriterionTrial.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
|
||||
if (trialCriterionType == CriterionType.SelfDefine)
|
||||
|
|
@ -520,8 +522,52 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
return result;
|
||||
}
|
||||
else
|
||||
{
|
||||
List<string> selectCode = await _systemCriterionDictionaryCodeRepository.Where(x => x.SystemCriterionId == inDto.SystemReadingCriterionId).Select(x => x.Code).ToListAsync();
|
||||
|
||||
|
||||
var criterionCode = await _dicRepository.Where(x => x.ConfigDictionary.Code == "Reading_eCRF_Criterion").Select(x => x.Code).ToListAsync();
|
||||
|
||||
|
||||
foreach (var item in criterionCode)
|
||||
{
|
||||
if (result.ContainsKey(item))
|
||||
{
|
||||
result[item] = new List<BasicDicSelect>();
|
||||
}
|
||||
}
|
||||
|
||||
var criterionDictionList = await _readingSystemCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.SystemReadingCriterionId).Select(x => new BasicDicSelect()
|
||||
{
|
||||
ChildGroup = x.Dictionary.ChildGroup,
|
||||
Code = x.Dictionary.Code,
|
||||
Description = x.Dictionary.Description,
|
||||
DataTypeEnum = x.Dictionary.DataTypeEnum,
|
||||
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
||||
ShowOrder = x.Dictionary.ShowOrder,
|
||||
ParentCode = x.ParentCode,
|
||||
Id = x.DictionaryId,
|
||||
CrterionDictionaryGroup = x.CrterionDictionaryGroup,
|
||||
ParentId = x.Dictionary.ParentId,
|
||||
Value = x.Dictionary.Value,
|
||||
ValueCN = x.Dictionary.ValueCN
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
criterionDictionList = criterionDictionList.Where(x => selectCode.Contains(x.ParentCode)).ToList();
|
||||
|
||||
var criterionDic = criterionDictionList.GroupBy(x => x.ParentCode).ToDictionary(g => g.Key, g => g.OrderBy(t => t.ShowOrder).ToList());
|
||||
|
||||
foreach (var item in criterionDic)
|
||||
{
|
||||
result[item.Key] = item.Value;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region 稽查相关
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using DocumentFormat.OpenXml.Presentation;
|
|||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
|
|
@ -59,7 +60,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = await _trialUseRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
|
||||
var list = await _trialUseRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
|
||||
.WhereIf(param.UserTypeId != null, t => t.User.UserTypeId == param.UserTypeId)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.UserName), t => t.User.UserName.Contains(param.UserName))
|
||||
|
||||
|
|
@ -70,8 +71,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
t => (t.User.FullName).Contains(param.UserRealName))
|
||||
.ProjectTo<TrialMaintenanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialUserList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialMaintenanceDTO));
|
||||
|
||||
|
|
@ -100,7 +103,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = await _trialSiteUserRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
|
||||
var list = await _trialSiteUserRepository.Where(t => t.TrialId == param.TrialId).IgnoreQueryFilters()
|
||||
.WhereIf(param.IsDeleted != null, t => t.IsDeleted == param.IsDeleted)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.SiteName), t => t.Site.SiteName.Contains(param.SiteName))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.TrialSiteAliasName),
|
||||
|
|
@ -114,7 +117,12 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
.ProjectTo<SiteUserExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteUserList_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SiteUserExportDTO));
|
||||
|
||||
}
|
||||
|
|
@ -161,13 +169,14 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.WhereIf(!string.IsNullOrEmpty(queryParam.OrganizationName), t => t.OrganizationName.Contains(queryParam.OrganizationName))
|
||||
.ProjectTo<TrialSiteUserSummaryDto>(_mapper.ConfigurationProvider);
|
||||
|
||||
data.List = await query.ToListAsync();
|
||||
|
||||
|
||||
var list = await query.ToListAsync();
|
||||
data.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
|
||||
var exportInfo = data;
|
||||
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSiteUserSummary_Export, exportInfo, exportInfo.TrialCode, _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TrialSiteUserSummaryDto));
|
||||
|
||||
}
|
||||
|
|
@ -230,8 +239,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == visitSearchDTO.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialCRCUploadImageList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(CRCVisitExportDTO));
|
||||
|
|
@ -280,8 +290,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == challengeQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialQCImageChanllengeList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(QCChanllengeExportDto));
|
||||
}
|
||||
|
|
@ -317,8 +328,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SubjectExportDTO));
|
||||
|
||||
|
|
@ -425,8 +437,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == dto.TrialId && u.IsConfirm && u.Id == dto.TrialReadingCriterionId).Select(t => t.CriterionName).FirstOrDefaultAsync();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
var (memoryStream, fileName) = await ExcelExportHelper.DataExport_NpoiTestAsync(StaticData.Export.TrialSubjectProgressList_Export, exportInfo, /*"", */_commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SubjectProgressDto));
|
||||
|
||||
|
|
@ -565,8 +578,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == studyQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyUploadMonitor_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyMonitorExportDto));
|
||||
|
|
@ -601,8 +615,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == param.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectReadingPeriodList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadPeriodExportDto));
|
||||
|
||||
|
|
@ -690,8 +705,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == studyQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialStudyList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(UnionStudyExportDTO));
|
||||
}
|
||||
|
|
@ -729,8 +745,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == checkQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSubjectVisitCheckList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PMKCheckEXportDTO));
|
||||
}
|
||||
|
|
@ -780,8 +797,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReadingTaskList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReadingTaskExportDto));
|
||||
}
|
||||
|
|
@ -831,8 +849,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialReReadingTaskList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(ReReadingTaskExportDto));
|
||||
}
|
||||
|
|
@ -873,8 +892,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == inQuery.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialMedicalReviewList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(TaskMedicalReviewExportDto));
|
||||
}
|
||||
|
|
@ -941,7 +961,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
foreach (var item in list)
|
||||
{
|
||||
//找到一致性分析的结果
|
||||
var selfAnalysisTask = allList.Where(t => t.IsSelfAnalysis == true && t.SubjectCode == item.SubjectCode && t.VisitTaskNum == item.VisitTaskNum && t.TaskName == t.TaskName).FirstOrDefault();
|
||||
var selfAnalysisTask = allList.Where(t => t.IsSelfAnalysis == true && t.SubjectCode == item.SubjectCode && t.VisitTaskNum == item.VisitTaskNum && t.TaskName == t.TaskName && t.UserName == item.UserName).FirstOrDefault();
|
||||
|
||||
|
||||
//因为基线的评估结果是 是否存在疾病 而 其他访视的结果是 整体肿瘤评估结果 是用不同的枚举翻译的 所以这里手动翻译 不把翻译逻辑耦合到通用的翻译代码里面 在此特殊处理
|
||||
|
|
@ -957,8 +977,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == queryVisitTask.TrialId && u.IsConfirm && u.Id == queryVisitTask.TrialReadingCriterionId).Select(t => t.CriterionName).FirstOrDefaultAsync();
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialSelfAnalysisList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(SelftAnalysisExport));
|
||||
}
|
||||
|
|
@ -1014,7 +1035,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.ProjectTo<GroupAnalysisExport>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
||||
|
||||
//找到原任务(非组间一致性分析的)
|
||||
var list = allList.Where(t => t.IsSelfAnalysis == null).OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
|
||||
|
||||
|
||||
|
|
@ -1060,8 +1081,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
exportInfo.CriterionName = await _repository.Where<ReadingQuestionCriterionTrial>(u => u.TrialId == queryVisitTask.TrialId && u.IsConfirm && u.Id == queryVisitTask.TrialReadingCriterionId).Select(t => t.CriterionName).FirstOrDefaultAsync();
|
||||
exportInfo.List = newList;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(newList, _userInfo.TimeZoneId); ;
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.TrialGroupAnalysisList_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(GroupAnalysisExport));
|
||||
}
|
||||
|
|
@ -1128,7 +1150,6 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
{
|
||||
//处理裁判标记
|
||||
|
||||
{
|
||||
var resultList = list.Where(t => t.ReadingCategory != ReadingCategory.Judge).ToList();
|
||||
|
||||
if (arbitrationRule == ArbitrationRule.Visit)
|
||||
|
|
@ -1150,10 +1171,22 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
}
|
||||
}
|
||||
|
||||
return resultList;
|
||||
//如果没有产生裁判,默认选择R1
|
||||
|
||||
//找到没有裁判的访视任务
|
||||
var notJudgeList = resultList.GroupBy(t => new { t.SubjectCode, t.VisitTaskNum }).Where(g => g.All(t => t.IsGenerateJudge == false)).Select(g => new { g.Key.SubjectCode, g.Key.VisitTaskNum }).ToList();
|
||||
|
||||
foreach (var item in resultList)
|
||||
{
|
||||
if (notJudgeList.Any(t => t.SubjectCode == item.SubjectCode && t.VisitTaskNum == item.VisitTaskNum) && item.ArmEnum == Arm.DoubleReadingArm1)
|
||||
{
|
||||
item.IsGenerateJudge = true;
|
||||
}
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -1205,7 +1238,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
.WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate!.Value.AddDays(1))
|
||||
.ProjectTo<OverallTumorEvaluationExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType }).ToListAsync();
|
||||
|
||||
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
|
||||
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum).ToList();
|
||||
|
||||
var exportInfo = (await _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).IgnoreQueryFilters().ProjectTo<ExcelExportInfo>(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
exportInfo.CriterionName = criterion.CriterionName;
|
||||
|
|
@ -1213,8 +1246,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
//处理裁判标记
|
||||
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.OverallTumorEvaluation_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(OverallTumorEvaluationExport), criterion.CriterionType);
|
||||
|
|
@ -1267,13 +1301,14 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
{
|
||||
var list = await query.ProjectTo<RECIST1Point1EvaluationOfTumorEfficacyExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType }).ToListAsync();
|
||||
|
||||
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
|
||||
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum).ToList();
|
||||
|
||||
//处理裁判标记
|
||||
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
||||
|
||||
exportInfo.List = list;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(list, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1EvaluationOfTumorEfficacy_Export, exportInfo, $"{exportInfo.ResearchProgramNo}_{exportInfo.CriterionName}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1EvaluationOfTumorEfficacyExport), criterion.CriterionType);
|
||||
|
|
@ -1335,7 +1370,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
{
|
||||
var list = await query.ProjectTo<RECIST1Point1DetailedOfEvaluatedLesionExport>(_mapper.ConfigurationProvider, new { criterionType = criterion.CriterionType, isEn_Us = _userInfo.IsEn_Us }).ToListAsync();
|
||||
|
||||
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.VisitTaskNum).ToList();
|
||||
list = list.OrderBy(t => t.SubjectCode).ThenBy(t => t.ArmEnum).ThenBy(t => t.VisitTaskNum).ToList();
|
||||
|
||||
var exportList = list.SelectMany(c =>
|
||||
{
|
||||
|
|
@ -1345,6 +1380,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
var clone = c.Clone();
|
||||
clone.LessionCode = u.LessionCode;
|
||||
clone.LessionType = u.LessionType;
|
||||
clone.BeforeTranslateLessionTypeValue = u.LessionType;
|
||||
|
||||
clone.IsLymph = u.IsLymph;
|
||||
|
||||
|
|
@ -1363,8 +1399,9 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
//处理裁判标记
|
||||
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
||||
exportInfo.List = exportList;
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(exportList, _userInfo.TimeZoneId);
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.RECIST1Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(RECIST1Point1DetailedOfEvaluatedLesionExport), criterion.CriterionType);
|
||||
|
||||
|
|
@ -1396,8 +1433,10 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
//处理裁判标记
|
||||
list = DealJudgeMark(criterion.ArbitrationRule, list);
|
||||
exportInfo.List = exportList;
|
||||
|
||||
exportInfo.List = ExportExcelConverterDate.ConvertToClientTimeInObject(exportList, _userInfo.TimeZoneId); ;
|
||||
exportInfo.IsEn_US = _userInfo.IsEn_Us;
|
||||
exportInfo.ClientZoneId = _userInfo.TimeZoneId;
|
||||
|
||||
return await ExcelExportHelper.DataExportAsync(StaticData.Export.PCWG3Point1DetailedOfEvaluatedLesion_Export, exportInfo, $"{exportInfo.ResearchProgramNo}", _commonDocumentRepository, _hostEnvironment, _dictionaryService, typeof(PCWG3DetailedOfEvaluatedLesionExport), criterion.CriterionType);
|
||||
|
||||
|
|
|
|||
|
|
@ -144,7 +144,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
await _internationalizationRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
//清理缓存
|
||||
_provider.Set<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front, new List<InternationalizationSimpleDto>(), TimeSpan.FromDays(1));
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
|
@ -164,26 +165,29 @@ namespace IRaCIS.Core.Application.Service
|
|||
VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType,
|
||||
|
||||
VerifyMsg = $"该类型已有{addOrEditInternationalization.Code}名称的国际化标识",
|
||||
IsVerify = internationalizationType == 1
|
||||
IsVerify = true /*internationalizationType == 1*/
|
||||
};
|
||||
|
||||
//前端验证标识重复与否
|
||||
var verifyExp2 = new EntityVerifyExp<Internationalization>()
|
||||
{
|
||||
VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType && t.Description == addOrEditInternationalization.Description,
|
||||
//var verifyExp2 = new EntityVerifyExp<Internationalization>()
|
||||
//{
|
||||
// VerifyExp = t => t.Code == addOrEditInternationalization.Code && t.InternationalizationType == addOrEditInternationalization.InternationalizationType && t.Description == addOrEditInternationalization.Description,
|
||||
|
||||
VerifyMsg = $"该类型已有{addOrEditInternationalization.Description}下的{addOrEditInternationalization.Code}名称的国际化标识",
|
||||
IsVerify = internationalizationType == 0
|
||||
};
|
||||
// VerifyMsg = $"该类型已有{addOrEditInternationalization.Description}下的{addOrEditInternationalization.Code}名称的国际化标识",
|
||||
// IsVerify = internationalizationType == 0
|
||||
//};
|
||||
|
||||
var entity = await _internationalizationRepository.InsertOrUpdateAsync(addOrEditInternationalization, true, verifyExp1, verifyExp2);
|
||||
var entity = await _internationalizationRepository.InsertOrUpdateAsync(addOrEditInternationalization, true, verifyExp1/*, verifyExp2*/);
|
||||
|
||||
if (addOrEditInternationalization.InternationalizationType == 1)
|
||||
{
|
||||
await InternationalizationHelper.AddOrUpdateJsonKeyValueAsync(entity.Code, addOrEditInternationalization.Value, addOrEditInternationalization.ValueCN);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
//清理缓存
|
||||
_provider.Set<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front, new List<InternationalizationSimpleDto>(), TimeSpan.FromDays(1));
|
||||
}
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
|
@ -193,6 +197,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
public async Task<IResponseOutput> DeleteInternationalization(Guid internationalizationId)
|
||||
{
|
||||
var success = await _internationalizationRepository.DeleteFromQueryAsync(t => t.Id == internationalizationId, true);
|
||||
|
||||
//清理缓存
|
||||
_provider.Set<List<InternationalizationSimpleDto>>(StaticData.InternationalData.Front, new List<InternationalizationSimpleDto>(), TimeSpan.FromDays(1));
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using AutoMapper;
|
|||
using IRaCIS.Application.Contracts;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Medallion.Threading;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
|
@ -70,9 +71,6 @@ namespace IRaCIS.Application.Services
|
|||
_systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
_verificationCodeRepository = verificationCodeRepository;
|
||||
_systemBasicDatarepository = systemBasicDatarepository;
|
||||
|
||||
|
||||
|
||||
_tokenService = tokenService;
|
||||
_userRepository = userRepository;
|
||||
_trialRepository = trialRepository;
|
||||
|
|
@ -80,6 +78,17 @@ namespace IRaCIS.Application.Services
|
|||
_userTypeRepository = userTypeRepository;
|
||||
_doctorTypeRepository = doctorTypeRepository;
|
||||
_distributedLockProvider = distributedLockProvider;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
private string ReplaceCompanyName(string needDealtxt)
|
||||
{
|
||||
var str= needDealtxt.Replace("{company}", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyName : _systemEmailConfig.CompanyNameCN)
|
||||
.Replace("{company abbreviation}", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN);
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
//重置邮箱
|
||||
|
|
@ -95,7 +104,7 @@ namespace IRaCIS.Application.Services
|
|||
messageToSend.To.Add(new MailboxAddress(userName, emailAddress));
|
||||
//主题
|
||||
//---[来自展影IRC] 关于重置邮箱的提醒
|
||||
messageToSend.Subject = _localizer["Mail_EmailResetReminder"];
|
||||
messageToSend.Subject = _localizer["Mail_EmailResetReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||
|
||||
var builder = new BodyBuilder();
|
||||
|
||||
|
|
@ -112,10 +121,11 @@ namespace IRaCIS.Application.Services
|
|||
var templateInfo = SourceReader.ReadToEnd();
|
||||
|
||||
|
||||
builder.HtmlBody = string.Format(templateInfo,
|
||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||
|
||||
userName,
|
||||
//---尊敬的
|
||||
_localizer["Mail_Dear", userName],
|
||||
//_localizer["Mail_Dear", userName],
|
||||
//---您正在进行邮箱重置操作
|
||||
_localizer["Mail_ResettingEmail"],
|
||||
verificationCode
|
||||
|
|
@ -161,7 +171,7 @@ namespace IRaCIS.Application.Services
|
|||
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
||||
//主题
|
||||
//---[来自展影IRC] 关于重置密码的提醒
|
||||
messageToSend.Subject = _localizer["Mail_IRCResettingPassword"];
|
||||
messageToSend.Subject = _localizer["Mail_IRCResettingPassword", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||
|
||||
|
||||
|
||||
|
|
@ -179,7 +189,7 @@ namespace IRaCIS.Application.Services
|
|||
var templateInfo = SourceReader.ReadToEnd();
|
||||
|
||||
|
||||
builder.HtmlBody = string.Format(templateInfo,
|
||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||
"",
|
||||
//---您正在进行邮箱重置密码操作
|
||||
_localizer["Mail_ResettingPassword"],
|
||||
|
|
@ -229,7 +239,7 @@ namespace IRaCIS.Application.Services
|
|||
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
||||
//主题
|
||||
//---[来自展影IRC]的提醒
|
||||
messageToSend.Subject = _localizer["Mail_ImagingIRCReminder"];
|
||||
messageToSend.Subject = _localizer["Mail_ImagingIRCReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||
|
||||
|
||||
|
||||
|
|
@ -247,10 +257,10 @@ namespace IRaCIS.Application.Services
|
|||
var templateInfo = SourceReader.ReadToEnd();
|
||||
|
||||
|
||||
builder.HtmlBody = string.Format(templateInfo,
|
||||
"",
|
||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||
"Sir or Madam",
|
||||
//---您正在参与展影医疗IRC项目
|
||||
_localizer["Mail_IRCProject"],
|
||||
_localizer["Mail_IRCProject", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN],
|
||||
verificationCode
|
||||
);
|
||||
}
|
||||
|
|
@ -295,7 +305,7 @@ namespace IRaCIS.Application.Services
|
|||
messageToSend.To.Add(new MailboxAddress(String.Empty, emailAddress));
|
||||
//主题
|
||||
//$"[来自展影IRC] [{researchProgramNo}] 关于中心调研的提醒";
|
||||
messageToSend.Subject = _localizer["Mail_ProjectParticipationReminder", researchProgramNo];
|
||||
messageToSend.Subject = _localizer["Mail_ProjectParticipationReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN, researchProgramNo];
|
||||
|
||||
|
||||
|
||||
|
|
@ -314,10 +324,10 @@ namespace IRaCIS.Application.Services
|
|||
var templateInfo = SourceReader.ReadToEnd();
|
||||
|
||||
|
||||
builder.HtmlBody = string.Format(templateInfo,
|
||||
"",
|
||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||
"Sir or Madam",
|
||||
//---您正在参与展影医疗IRC项目中心调研工作
|
||||
_localizer["Mail_CenterResearchReminder"],
|
||||
_localizer["Mail_CenterResearchReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN],
|
||||
verificationCode
|
||||
);
|
||||
}
|
||||
|
|
@ -375,7 +385,7 @@ namespace IRaCIS.Application.Services
|
|||
messageToSend.To.Add(new MailboxAddress(sysUserInfo.FullName, sysUserInfo.EMail));
|
||||
//主题
|
||||
//---[来自展影IRC] 关于创建账户的提醒
|
||||
messageToSend.Subject = _localizer["Mail_AccountCreationReminder"];
|
||||
messageToSend.Subject = _localizer["Mail_AccountCreationReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||
|
||||
|
||||
|
||||
|
|
@ -403,7 +413,7 @@ namespace IRaCIS.Application.Services
|
|||
var templateInfo = SourceReader.ReadToEnd();
|
||||
|
||||
|
||||
builder.HtmlBody = string.Format(templateInfo,
|
||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||
sysUserInfo.FullName,
|
||||
sysUserInfo.UserName,
|
||||
sysUserInfo.UserTypeRole.UserTypeShortName,
|
||||
|
|
@ -431,7 +441,7 @@ namespace IRaCIS.Application.Services
|
|||
messageToSend.To.Add(new MailboxAddress(sysUserInfo.FullName, sysUserInfo.EMail));
|
||||
//主题
|
||||
//---[来自展影IRC] 关于重置账户密码的提醒
|
||||
messageToSend.Subject = _localizer["Mail_AccountPasswordResetReminder"];
|
||||
messageToSend.Subject = _localizer["Mail_AccountPasswordResetReminder", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN];
|
||||
|
||||
|
||||
|
||||
|
|
@ -450,7 +460,7 @@ namespace IRaCIS.Application.Services
|
|||
var templateInfo = SourceReader.ReadToEnd();
|
||||
|
||||
|
||||
builder.HtmlBody = string.Format(templateInfo,
|
||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||
sysUserInfo.FullName,
|
||||
sysUserInfo.UserName,
|
||||
sysUserInfo.UserTypeRole.UserTypeShortName,
|
||||
|
|
@ -481,7 +491,7 @@ namespace IRaCIS.Application.Services
|
|||
messageToSend.To.Add(new MailboxAddress(sysUserInfo.FullName, sysUserInfo.EMail));
|
||||
//主题
|
||||
// $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信";
|
||||
messageToSend.Subject = _localizer["Mail_InvitationEmail", trialInfo.ResearchProgramNo];
|
||||
messageToSend.Subject = _localizer["Mail_InvitationEmail", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN, trialInfo.ResearchProgramNo];
|
||||
|
||||
|
||||
|
||||
|
|
@ -512,7 +522,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}";
|
||||
|
||||
builder.HtmlBody = string.Format(templateInfo,
|
||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||
sysUserInfo.FullName,
|
||||
trialInfo.ExperimentName,
|
||||
trialInfo.ResearchProgramNo,
|
||||
|
|
@ -545,7 +555,7 @@ namespace IRaCIS.Application.Services
|
|||
messageToSend.To.Add(new MailboxAddress(String.Empty, sysUserInfo.EMail));
|
||||
//主题
|
||||
// $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信";
|
||||
messageToSend.Subject = _localizer["Mail_InvitationEmail", trialInfo.ResearchProgramNo];
|
||||
messageToSend.Subject = _localizer["Mail_InvitationEmail", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN,trialInfo.ResearchProgramNo];
|
||||
|
||||
|
||||
var builder = new BodyBuilder();
|
||||
|
|
@ -574,7 +584,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}";
|
||||
|
||||
builder.HtmlBody = string.Format(templateInfo,
|
||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||
sysUserInfo.FullName,
|
||||
trialInfo.ExperimentName,
|
||||
trialInfo.ResearchProgramNo,
|
||||
|
|
@ -660,7 +670,7 @@ namespace IRaCIS.Application.Services
|
|||
messageToSend.To.Add(new MailboxAddress(doctor.FullName, doctor.EMail));
|
||||
//主题
|
||||
// $"[来自展影IRC] [{trialInfo.ResearchProgramNo}]邀请信";
|
||||
messageToSend.Subject = _localizer["Mail_InvitationEmail", trialInfo.ResearchProgramNo];
|
||||
messageToSend.Subject = _localizer["Mail_InvitationEmail", _userInfo.IsEn_Us ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN, trialInfo.ResearchProgramNo];
|
||||
|
||||
|
||||
var builder = new BodyBuilder();
|
||||
|
|
@ -696,7 +706,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var redirectUrl = $"{domain}/api/User/UserRedirect?url={System.Web.HttpUtility.UrlEncode(routeUrl)}";
|
||||
|
||||
builder.HtmlBody = string.Format(templateInfo,
|
||||
builder.HtmlBody = string.Format(ReplaceCompanyName(templateInfo),
|
||||
sysUserInfo.FullName,
|
||||
trialInfo.ExperimentName,
|
||||
trialInfo.ResearchProgramNo,
|
||||
|
|
|
|||
|
|
@ -35,14 +35,25 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
}
|
||||
|
||||
public class TrialSignDocView:UnionDocumentWithConfirmInfoView
|
||||
{
|
||||
public string TrialCode { get; set; }
|
||||
public string ResearchProgramNo { get; set; }
|
||||
|
||||
public string ExperimentName { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class UnionDocumentWithConfirmInfoView: UnionDocumentView
|
||||
{
|
||||
|
||||
|
||||
public DateTime? ConfirmTime { get; set; }
|
||||
|
||||
public Guid? ConfirmUserId { get; set; }
|
||||
|
||||
public bool IsConfirmed { get; set; }
|
||||
public bool IsConfirmed => ConfirmTime != null;
|
||||
|
||||
public string UserName { get; set; } = string.Empty;
|
||||
|
||||
|
|
@ -101,18 +112,34 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public bool IsSigned { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class GetNextUnSignDocumentInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
public bool Asc { get; set; } = true;
|
||||
public string SortField { get; set; } = "";
|
||||
}
|
||||
|
||||
public class TrialDocQuery : PageInput
|
||||
{
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
public Guid? FileTypeId { get; set; }
|
||||
|
||||
public string TrialCode { get; set;} = string.Empty;
|
||||
|
||||
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
public bool IsSigned { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class TrialUserDocUnionQuery: PageInput
|
||||
{
|
||||
[NotDefault]
|
||||
|
|
|
|||
|
|
@ -108,6 +108,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public bool IsDistinguishCriteria { get; set; }
|
||||
|
||||
public string SortField { get; set; } = string.Empty;
|
||||
|
||||
public bool Asc { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
Task<IResponseOutput> DeleteSystemDocumentAsync(Guid systemDocumentId);
|
||||
|
||||
Task<PageOutput<UnionDocumentWithConfirmInfoView>> getWaitSignSysDocList(SystemDocumentQuery querySystemDocument);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
|
||||
|
||||
public SystemDocumentService( IRepository<SystemDocument> systemDocumentRepository,
|
||||
|
||||
IRepository<SystemDocNeedConfirmedUserType> systemDocNeedConfirmedUserTypeRepository,
|
||||
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository)
|
||||
{
|
||||
|
|
@ -183,7 +184,9 @@ namespace IRaCIS.Core.Application.Services
|
|||
UserTypeShortName = user.UserTypeRole.UserTypeShortName
|
||||
};
|
||||
|
||||
return await query.Where(t=>t.ConfirmTime==null).ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||
return await query.WhereIf(querySystemDocument.IsSigned==true,t=>t.ConfirmTime!=null)
|
||||
.WhereIf(querySystemDocument.IsSigned == false, t => t.ConfirmTime == null)
|
||||
.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
||||
private readonly IRepository<TrialDocConfirmedUser> _trialDocUserTypeConfirmedUserRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly ISystemDocumentService _systemDocumentService;
|
||||
private readonly IRepository<SystemDocConfirmedUser> _systemDocConfirmedUserRepository;
|
||||
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
||||
private readonly IRepository<TrialCriterionAdditionalAssessmentType> _trialCriterionAdditionalAssessmentTypeRepository;
|
||||
|
|
@ -34,6 +35,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
public TrialDocumentService(IRepository<TrialDocument> trialDocumentRepository,
|
||||
IRepository<TrialDocConfirmedUser> trialDocUserTypeConfirmedUserRepository,
|
||||
IRepository<Trial> trialRepository,
|
||||
ISystemDocumentService systemDocumentService,
|
||||
IRepository<SystemDocConfirmedUser> systemDocConfirmedUserRepository,
|
||||
IRepository<TrialCriterionAdditionalAssessmentType> trialCriterionAdditionalAssessmentTypeRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository
|
||||
|
|
@ -42,6 +44,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
_trialDocumentRepository = trialDocumentRepository;
|
||||
this._trialDocUserTypeConfirmedUserRepository = trialDocUserTypeConfirmedUserRepository;
|
||||
this._trialRepository = trialRepository;
|
||||
this._systemDocumentService = systemDocumentService;
|
||||
this._systemDocConfirmedUserRepository = systemDocConfirmedUserRepository;
|
||||
_systemDocumentRepository = systemDocumentRepository;
|
||||
_readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||
|
|
@ -66,6 +69,54 @@ namespace IRaCIS.Core.Application.Services
|
|||
return await trialDocumentQueryable.ToPagedListAsync(queryTrialDocument.PageIndex, queryTrialDocument.PageSize, queryTrialDocument.SortField, queryTrialDocument.Asc);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<TrialSignDocView>> GetTrialSignDocumentList(TrialDocQuery querySystemDocument)
|
||||
{
|
||||
var trialDocQueryable = from trialDoc in _trialDocumentRepository.AsQueryable(true)
|
||||
.WhereIf(querySystemDocument.TrialId!=null,t=>t.TrialId==querySystemDocument.TrialId)
|
||||
.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) )
|
||||
|
||||
join trialUser in _repository.Where<TrialUser>(t=>t.UserId==_userInfo.Id) on trialDoc.TrialId equals trialUser.TrialId
|
||||
join confirm in _repository.Where<TrialDocConfirmedUser>() on
|
||||
new { trialUser.UserId, TrialDocumentId = trialDoc.Id } equals new { UserId = confirm.ConfirmUserId, confirm.TrialDocumentId } into cc
|
||||
|
||||
from confirm in cc.DefaultIfEmpty()
|
||||
select new TrialSignDocView()
|
||||
{
|
||||
TrialCode=trialDoc.Trial.TrialCode,
|
||||
ResearchProgramNo = trialDoc.Trial.ResearchProgramNo,
|
||||
ExperimentName = trialDoc.Trial.ExperimentName,
|
||||
Id = trialDoc.Id,
|
||||
IsSystemDoc = false,
|
||||
CreateTime = trialDoc.CreateTime,
|
||||
FullFilePath = trialDoc.Path,
|
||||
IsDeleted = trialDoc.IsDeleted,
|
||||
Name = trialDoc.Name,
|
||||
Path = trialDoc.Path,
|
||||
FileTypeId = trialDoc.FileTypeId,
|
||||
FileType = _userInfo.IsEn_Us ? trialDoc.FileType.Value : trialDoc.FileType.ValueCN,
|
||||
UpdateTime = trialDoc.UpdateTime,
|
||||
SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes,
|
||||
|
||||
//IsConfirmed = confirm.ConfirmTime != null,
|
||||
ConfirmUserId = confirm.ConfirmUserId,
|
||||
ConfirmTime = confirm.ConfirmTime,
|
||||
RealName = trialUser.User.FullName,
|
||||
UserName = trialUser.User.UserName,
|
||||
UserTypeId = trialUser.User.UserTypeId,
|
||||
UserTypeShortName = trialUser.User.UserTypeRole.UserTypeShortName
|
||||
|
||||
};
|
||||
|
||||
trialDocQueryable = trialDocQueryable.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
||||
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
|
||||
.WhereIf(querySystemDocument.IsSigned == true, t => t.ConfirmTime != null)
|
||||
.WhereIf(querySystemDocument.IsSigned == false, t => t.ConfirmTime == null);
|
||||
|
||||
|
||||
return await trialDocQueryable.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取下一个未签名的文件
|
||||
|
|
@ -75,19 +126,37 @@ namespace IRaCIS.Core.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<UnionDocumentWithConfirmInfoView?> GetNextUnSignDocument(GetNextUnSignDocumentInDto inDto)
|
||||
{
|
||||
var result = await this.GetUserDocumentList(new TrialUserDocUnionQuery()
|
||||
var result = new PageOutput<UnionDocumentWithConfirmInfoView>() { };
|
||||
|
||||
if (inDto.TrialId != null)
|
||||
{
|
||||
result = (await this.GetUserDocumentList(new TrialUserDocUnionQuery()
|
||||
{
|
||||
Asc = inDto.Asc,
|
||||
IsSign = false,
|
||||
SortField = inDto.SortField,
|
||||
TrialId = inDto.TrialId,
|
||||
TrialId = inDto.TrialId.Value,
|
||||
PageIndex = 1,
|
||||
PageSize = 1,
|
||||
})).Data;
|
||||
}
|
||||
else
|
||||
{
|
||||
result = await _systemDocumentService.getWaitSignSysDocList(new SystemDocumentQuery()
|
||||
{
|
||||
PageIndex=1,
|
||||
IsSigned = false,
|
||||
PageSize=1,
|
||||
Asc=false,
|
||||
SortField="UpdateTime",
|
||||
});
|
||||
|
||||
if (result.Data.CurrentPageData.Count > 0)
|
||||
}
|
||||
|
||||
|
||||
if (result.CurrentPageData.Count > 0)
|
||||
{
|
||||
return result.Data.CurrentPageData.First();
|
||||
return result.CurrentPageData.First();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -194,6 +263,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
FullFilePath = needConfirmedUserType.SystemDocument.Path,
|
||||
|
||||
//IsConfirmed = confirm.ConfirmTime != null,
|
||||
ConfirmUserId = confirm.ConfirmUserId,
|
||||
ConfirmTime = confirm.ConfirmTime,
|
||||
RealName = trialUser.User.FullName,
|
||||
|
|
@ -225,6 +295,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
UpdateTime = trialDoc.UpdateTime,
|
||||
SignViewMinimumMinutes = trialDoc.SignViewMinimumMinutes,
|
||||
|
||||
//IsConfirmed = confirm.ConfirmTime != null,
|
||||
ConfirmUserId = confirm.ConfirmUserId,
|
||||
ConfirmTime = confirm.ConfirmTime,
|
||||
RealName = trialUser.User.FullName,
|
||||
|
|
@ -360,7 +431,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId,
|
||||
FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN,
|
||||
UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime,
|
||||
IsConfirmed= confirm.ConfirmTime!=null,
|
||||
//IsConfirmed= confirm.ConfirmTime!=null,
|
||||
|
||||
|
||||
|
||||
|
|
@ -396,7 +467,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN,
|
||||
FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId,
|
||||
UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime,
|
||||
IsConfirmed = confirm.ConfirmTime != null,
|
||||
//IsConfirmed = confirm.ConfirmTime != null,
|
||||
|
||||
ConfirmUserId = confirm.ConfirmUserId,
|
||||
ConfirmTime = confirm.ConfirmTime,
|
||||
|
|
@ -411,7 +482,8 @@ namespace IRaCIS.Core.Application.Services
|
|||
var unionQuery = trialDocQuery.Union(systemDocQuery)
|
||||
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
||||
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
|
||||
.WhereIf(querySystemDocument.IsConfirmed != null, t => t.IsConfirmed == querySystemDocument.IsConfirmed)
|
||||
.WhereIf(querySystemDocument.IsConfirmed == true, t => t.ConfirmTime != null)
|
||||
.WhereIf(querySystemDocument.IsConfirmed == false, t => t.ConfirmTime == null)
|
||||
.WhereIf(querySystemDocument.IsDeleted != null, t => t.IsDeleted == querySystemDocument.IsDeleted)
|
||||
.WhereIf(querySystemDocument.UserTypeId != null, t => t.UserTypeId == querySystemDocument.UserTypeId);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ using System;
|
|||
using System.Runtime.InteropServices;
|
||||
using SharpCompress.Common;
|
||||
using SkiaSharp;
|
||||
using DocumentFormat.OpenXml.Bibliography;
|
||||
using System.Linq.Dynamic.Core;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
|
@ -1355,7 +1357,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
.WhereIf(inQuery.BusinessScenarioEnum != null, t => t.BusinessScenarioEnum == inQuery.BusinessScenarioEnum)
|
||||
.ProjectTo<TrialEmailNoticeConfigView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await trialEmailNoticeConfigQueryable.ToListAsync();
|
||||
var sortField = string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TrialEmailNoticeConfigView.Code) : inQuery.SortField;
|
||||
var orderQuery = inQuery.Asc ? trialEmailNoticeConfigQueryable.OrderBy(sortField) : trialEmailNoticeConfigQueryable.OrderBy(sortField + " desc");
|
||||
return await orderQuery.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,175 @@
|
|||
using FellowOakDicom.Network;
|
||||
using FellowOakDicom;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using IRaCIS.Core.Application.Contracts.Dicom;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
||||
{
|
||||
/// <summary>
|
||||
/// 后台托管服务的方式运行
|
||||
/// </summary>
|
||||
//public class CStoreSCPHostedService : IHostedService
|
||||
//{
|
||||
// private readonly ILogger<CStoreSCPHostedService> _logger;
|
||||
// private readonly IDicomServerFactory _dicomServerFactory;
|
||||
// private IDicomServer? _server;
|
||||
|
||||
// public CStoreSCPHostedService(ILogger<CStoreSCPHostedService> logger, IDicomServerFactory dicomServerFactory)
|
||||
// {
|
||||
// _logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
// _dicomServerFactory = dicomServerFactory ?? throw new ArgumentNullException(nameof(dicomServerFactory));
|
||||
// }
|
||||
|
||||
// public async Task StartAsync(CancellationToken cancellationToken)
|
||||
// {
|
||||
// _logger.LogInformation("Starting DICOM server");
|
||||
// _server = _dicomServerFactory.Create<CStoreSCPService>(104);
|
||||
// _logger.LogInformation("DICOM server is running");
|
||||
// }
|
||||
|
||||
// public Task StopAsync(CancellationToken cancellationToken)
|
||||
// {
|
||||
// if (_server != null)
|
||||
// {
|
||||
// _server.Stop();
|
||||
// _server.Dispose();
|
||||
// _server = null;
|
||||
// }
|
||||
// return Task.CompletedTask;
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
public class CStoreSCPService : DicomService, IDicomServiceProvider, IDicomCStoreProvider, IDicomCEchoProvider
|
||||
{
|
||||
private IServiceProvider _serviceProvider { get; set; }
|
||||
|
||||
|
||||
private static readonly DicomTransferSyntax[] _acceptedTransferSyntaxes = new DicomTransferSyntax[]
|
||||
{
|
||||
DicomTransferSyntax.ExplicitVRLittleEndian,
|
||||
DicomTransferSyntax.ExplicitVRBigEndian,
|
||||
DicomTransferSyntax.ImplicitVRLittleEndian
|
||||
};
|
||||
|
||||
private static readonly DicomTransferSyntax[] _acceptedImageTransferSyntaxes = new DicomTransferSyntax[]
|
||||
{
|
||||
// Lossless
|
||||
DicomTransferSyntax.JPEGLSLossless,
|
||||
DicomTransferSyntax.JPEG2000Lossless,
|
||||
DicomTransferSyntax.JPEGProcess14SV1,
|
||||
DicomTransferSyntax.JPEGProcess14,
|
||||
DicomTransferSyntax.RLELossless,
|
||||
// Lossy
|
||||
DicomTransferSyntax.JPEGLSNearLossless,
|
||||
DicomTransferSyntax.JPEG2000Lossy,
|
||||
DicomTransferSyntax.JPEGProcess1,
|
||||
DicomTransferSyntax.JPEGProcess2_4,
|
||||
// Uncompressed
|
||||
DicomTransferSyntax.ExplicitVRLittleEndian,
|
||||
DicomTransferSyntax.ExplicitVRBigEndian,
|
||||
DicomTransferSyntax.ImplicitVRLittleEndian
|
||||
};
|
||||
|
||||
|
||||
public CStoreSCPService(INetworkStream stream, Encoding fallbackEncoding, ILogger log, DicomServiceDependencies dependencies)
|
||||
: base(stream, fallbackEncoding, log, dependencies)
|
||||
{
|
||||
var tt = base.UserState;
|
||||
//_dicomArchiveService = dicomArchiveService;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Task OnReceiveAssociationRequestAsync(DicomAssociation association)
|
||||
{
|
||||
_serviceProvider =(IServiceProvider) this.UserState;
|
||||
|
||||
if (association.CalledAE != "STORESCP")
|
||||
{
|
||||
return SendAssociationRejectAsync(
|
||||
DicomRejectResult.Permanent,
|
||||
DicomRejectSource.ServiceUser,
|
||||
DicomRejectReason.CalledAENotRecognized);
|
||||
}
|
||||
|
||||
foreach (var pc in association.PresentationContexts)
|
||||
{
|
||||
if (pc.AbstractSyntax == DicomUID.Verification)
|
||||
{
|
||||
pc.AcceptTransferSyntaxes(_acceptedTransferSyntaxes);
|
||||
}
|
||||
else if (pc.AbstractSyntax.StorageCategory != DicomStorageCategory.None)
|
||||
{
|
||||
pc.AcceptTransferSyntaxes(_acceptedImageTransferSyntaxes);
|
||||
}
|
||||
}
|
||||
|
||||
return SendAssociationAcceptAsync(association);
|
||||
}
|
||||
|
||||
|
||||
public Task OnReceiveAssociationReleaseRequestAsync()
|
||||
{
|
||||
return SendAssociationReleaseResponseAsync();
|
||||
}
|
||||
|
||||
|
||||
public void OnReceiveAbort(DicomAbortSource source, DicomAbortReason reason)
|
||||
{
|
||||
/* nothing to do here */
|
||||
}
|
||||
|
||||
|
||||
public void OnConnectionClosed(Exception exception)
|
||||
{
|
||||
/* nothing to do here */
|
||||
}
|
||||
|
||||
|
||||
public async Task<DicomCStoreResponse> OnCStoreRequestAsync(DicomCStoreRequest request)
|
||||
{
|
||||
var tt= _serviceProvider.GetService<IDicomArchiveService>();
|
||||
|
||||
var studyUid = request.Dataset.GetSingleValue<string>(DicomTag.StudyInstanceUID).Trim();
|
||||
var instUid = request.SOPInstanceUID.UID;
|
||||
|
||||
var path = Path.GetFullPath(@".\DICOM-Store");
|
||||
|
||||
path = Path.Combine(path, studyUid);
|
||||
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
|
||||
path = Path.Combine(path, instUid) + ".dcm";
|
||||
|
||||
await request.File.SaveAsync(path);
|
||||
|
||||
return new DicomCStoreResponse(request, DicomStatus.Success);
|
||||
}
|
||||
|
||||
|
||||
public Task OnCStoreRequestExceptionAsync(string tempFileName, Exception e)
|
||||
{
|
||||
// let library handle logging and error response
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
||||
public Task<DicomCEchoResponse> OnCEchoRequestAsync(DicomCEchoRequest request)
|
||||
{
|
||||
return Task.FromResult(new DicomCEchoResponse(request, DicomStatus.Success));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -9,6 +9,9 @@ using IRaCIS.Core.Infrastructure;
|
|||
using Medallion.Threading;
|
||||
using FellowOakDicom;
|
||||
using FellowOakDicom.Imaging.Codec;
|
||||
using System.Data;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using FellowOakDicom.Network;
|
||||
|
||||
namespace IRaCIS.Core.Application.Services
|
||||
{
|
||||
|
|
@ -474,11 +477,205 @@ namespace IRaCIS.Core.Application.Services
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 单个文件接收 归档
|
||||
/// </summary>
|
||||
/// <param name="dataset"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public async Task ArchiveDicomFileAsync(DicomDataset dataset)
|
||||
{
|
||||
string studyInstanceUid = dataset.GetString(DicomTag.StudyInstanceUID);
|
||||
string seriesInstanceUid = dataset.GetString(DicomTag.SeriesInstanceUID);
|
||||
string sopInstanceUid = dataset.GetString(DicomTag.SOPInstanceUID);
|
||||
|
||||
Guid studyId = IdentifierHelper.CreateGuid(studyInstanceUid);
|
||||
Guid seriesId = IdentifierHelper.CreateGuid(studyInstanceUid, seriesInstanceUid);
|
||||
Guid instanceId = IdentifierHelper.CreateGuid(studyInstanceUid, seriesInstanceUid, sopInstanceUid);
|
||||
|
||||
var isStudyNeedAdd = false;
|
||||
var isSeriesNeedAdd = false;
|
||||
var isInstanceNeedAdd = false;
|
||||
|
||||
var @lock = _distributedLockProvider.CreateLock($"StudyInstanceUid");
|
||||
|
||||
using (@lock.Acquire())
|
||||
{
|
||||
var findStudy = await _studyRepository.FirstOrDefaultAsync(t => t.Id == studyId);
|
||||
var findSerice = await _seriesRepository.FirstOrDefaultAsync(t => t.Id == seriesId);
|
||||
var findInstance = await _instanceRepository.FirstOrDefaultAsync(t => t.Id == instanceId);
|
||||
|
||||
|
||||
if (findStudy == null)
|
||||
{
|
||||
isStudyNeedAdd = true;
|
||||
findStudy = new DicomStudy
|
||||
{
|
||||
Id = studyId,
|
||||
StudyInstanceUid = studyInstanceUid,
|
||||
StudyTime = dataset.GetSingleValueOrDefault(DicomTag.StudyDate, string.Empty) == string.Empty ? null : dataset.GetSingleValue<DateTime>(DicomTag.StudyDate).Add(dataset.GetSingleValueOrDefault(DicomTag.StudyTime, string.Empty) == string.Empty ? TimeSpan.Zero : dataset.GetSingleValue<DateTime>(DicomTag.StudyTime).TimeOfDay),
|
||||
//Modalities = modality,
|
||||
//ModalityForEdit = modalityForEdit,
|
||||
Description = dataset.GetSingleValueOrDefault(DicomTag.StudyDescription, string.Empty),
|
||||
InstitutionName = dataset.GetSingleValueOrDefault(DicomTag.InstitutionName, string.Empty),
|
||||
PatientId = dataset.GetSingleValueOrDefault(DicomTag.PatientID, string.Empty),
|
||||
PatientName = dataset.GetSingleValueOrDefault(DicomTag.PatientName, string.Empty),
|
||||
PatientAge = dataset.GetSingleValueOrDefault(DicomTag.PatientAge, string.Empty),
|
||||
PatientSex = dataset.GetSingleValueOrDefault(DicomTag.PatientSex, string.Empty),
|
||||
BodyPartExamined = dataset.GetSingleValueOrDefault(DicomTag.BodyPartExamined, string.Empty),
|
||||
|
||||
StudyId = dataset.GetSingleValueOrDefault(DicomTag.StudyID, string.Empty),
|
||||
AccessionNumber = dataset.GetSingleValueOrDefault(DicomTag.AccessionNumber, string.Empty),
|
||||
|
||||
//需要特殊处理
|
||||
PatientBirthDate = dataset.GetSingleValueOrDefault(DicomTag.PatientBirthDate, string.Empty),
|
||||
|
||||
|
||||
AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionTime, string.Empty),
|
||||
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionNumber, string.Empty),
|
||||
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty),
|
||||
|
||||
|
||||
SiteId = Guid.Empty,
|
||||
TrialId = Guid.Empty,
|
||||
SubjectId = Guid.Empty,
|
||||
SubjectVisitId = Guid.Empty,
|
||||
//IsDoubleReview = addtionalInfo.IsDoubleReview,
|
||||
SeriesCount = 0,
|
||||
InstanceCount = 0
|
||||
};
|
||||
|
||||
//特殊逻辑
|
||||
|
||||
var modality = dataset.GetSingleValueOrDefault(DicomTag.Modality, string.Empty);
|
||||
|
||||
var dicModalityList = _dictionaryRepository.Where(t => t.Code == "Modality").SelectMany(t => t.ChildList.Select(c => c.Value)).ToList();
|
||||
|
||||
var modalityForEdit = dicModalityList.Contains(modality) ? modality : String.Empty;
|
||||
|
||||
if (modality == "MR")
|
||||
{
|
||||
modalityForEdit = "MRI";
|
||||
}
|
||||
|
||||
if (modality == "PT")
|
||||
{
|
||||
modalityForEdit = "PET";
|
||||
}
|
||||
if (modality == "PT、CT")
|
||||
{
|
||||
modalityForEdit = "PET-CT";
|
||||
}
|
||||
|
||||
findStudy.Modalities = modality;
|
||||
findStudy.ModalityForEdit= modalityForEdit;
|
||||
|
||||
if (findStudy.PatientBirthDate.Length == 8)
|
||||
{
|
||||
findStudy.PatientBirthDate = $"{findStudy.PatientBirthDate[0]}{findStudy.PatientBirthDate[1]}{findStudy.PatientBirthDate[2]}{findStudy.PatientBirthDate[3]}-{findStudy.PatientBirthDate[4]}{findStudy.PatientBirthDate[5]}-{findStudy.PatientBirthDate[6]}{findStudy.PatientBirthDate[7]}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (findSerice == null)
|
||||
{
|
||||
isSeriesNeedAdd = true;
|
||||
|
||||
findSerice = new DicomSeries
|
||||
{
|
||||
Id = seriesId,
|
||||
StudyId = findStudy.Id,
|
||||
|
||||
StudyInstanceUid = findStudy.StudyInstanceUid,
|
||||
SeriesInstanceUid = seriesInstanceUid,
|
||||
SeriesNumber = dataset.GetSingleValueOrDefault(DicomTag.SeriesNumber, 1),
|
||||
//SeriesTime = dataset.GetSingleValueOrDefault(DicomTag.SeriesDate, DateTime.Now).Add(dataset.GetSingleValueOrDefault(DicomTag.SeriesTime, DateTime.Now).TimeOfDay),
|
||||
//SeriesTime = DateTime.TryParse(dataset.GetSingleValue<string>(DicomTag.SeriesDate) + dataset.GetSingleValue<string>(DicomTag.SeriesTime), out DateTime dt) ? dt : null,
|
||||
SeriesTime = dataset.GetSingleValueOrDefault(DicomTag.SeriesDate, string.Empty) == string.Empty ? null : dataset.GetSingleValue<DateTime>(DicomTag.SeriesDate).Add(dataset.GetSingleValueOrDefault(DicomTag.SeriesTime, string.Empty) == string.Empty ? TimeSpan.Zero : dataset.GetSingleValue<DateTime>(DicomTag.SeriesTime).TimeOfDay),
|
||||
Modality = dataset.GetSingleValueOrDefault(DicomTag.Modality, string.Empty),
|
||||
Description = dataset.GetSingleValueOrDefault(DicomTag.SeriesDescription, string.Empty),
|
||||
SliceThickness = dataset.GetSingleValueOrDefault(DicomTag.SliceThickness, string.Empty),
|
||||
|
||||
ImagePositionPatient = dataset.GetSingleValueOrDefault(DicomTag.ImagePositionPatient, string.Empty),
|
||||
ImageOrientationPatient = dataset.GetSingleValueOrDefault(DicomTag.ImageOrientationPatient, string.Empty),
|
||||
BodyPartExamined = dataset.GetSingleValueOrDefault(DicomTag.BodyPartExamined, string.Empty),
|
||||
SequenceName = dataset.GetSingleValueOrDefault(DicomTag.SequenceName, string.Empty),
|
||||
ProtocolName = dataset.GetSingleValueOrDefault(DicomTag.ProtocolName, string.Empty),
|
||||
ImagerPixelSpacing = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||
|
||||
AcquisitionTime = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionTime, string.Empty),
|
||||
AcquisitionNumber = dataset.GetSingleValueOrDefault(DicomTag.AcquisitionNumber, string.Empty),
|
||||
TriggerTime = dataset.GetSingleValueOrDefault(DicomTag.TriggerTime, string.Empty),
|
||||
|
||||
SiteId = Guid.Empty,
|
||||
TrialId = Guid.Empty,
|
||||
SubjectId = Guid.Empty,
|
||||
SubjectVisitId = Guid.Empty,
|
||||
|
||||
InstanceCount = 0
|
||||
};
|
||||
|
||||
++findStudy.SeriesCount;
|
||||
}
|
||||
|
||||
|
||||
if (findInstance == null)
|
||||
{
|
||||
isInstanceNeedAdd = true;
|
||||
findInstance = new DicomInstance
|
||||
{
|
||||
Id = instanceId,
|
||||
StudyId = findStudy.Id,
|
||||
SeriesId = findSerice.Id,
|
||||
StudyInstanceUid = findStudy.StudyInstanceUid,
|
||||
SeriesInstanceUid = findSerice.SeriesInstanceUid,
|
||||
|
||||
SiteId = Guid.Empty,
|
||||
TrialId = Guid.Empty,
|
||||
SubjectId = Guid.Empty,
|
||||
SubjectVisitId = Guid.Empty,
|
||||
|
||||
|
||||
|
||||
SopInstanceUid = sopInstanceUid,
|
||||
InstanceNumber = dataset.GetSingleValueOrDefault(DicomTag.InstanceNumber, 1),
|
||||
InstanceTime = dataset.GetSingleValueOrDefault(DicomTag.ContentDate, string.Empty) == string.Empty ? null : dataset.GetSingleValue<DateTime>(DicomTag.ContentDate).Add(dataset.GetSingleValueOrDefault(DicomTag.ContentTime, string.Empty) == string.Empty ? TimeSpan.Zero : dataset.GetSingleValue<DateTime>(DicomTag.ContentTime).TimeOfDay),
|
||||
//InstanceTime = DateTime.TryParse(dataset.GetSingleValue<string>(DicomTag.ContentDate) + dataset.GetSingleValue<string>(DicomTag.ContentTime), out DateTime dt) ? dt : null,
|
||||
//InstanceTime = dataset.GetSingleValueOrDefault(DicomTag.ContentDate,(DateTime?)null)?.Add(dataset.GetSingleValueOrDefault(DicomTag.ContentTime, TimeSpan.Zero)),
|
||||
//dataset.GetSingleValueOrDefault(DicomTag.ContentDate,DateTime.Now);//, DicomTag.ContentTime)
|
||||
CPIStatus = false,
|
||||
ImageRows = dataset.GetSingleValueOrDefault(DicomTag.Rows, 0),
|
||||
ImageColumns = dataset.GetSingleValueOrDefault(DicomTag.Columns, 0),
|
||||
SliceLocation = dataset.GetSingleValueOrDefault(DicomTag.SliceLocation, 0),
|
||||
|
||||
SliceThickness = dataset.GetSingleValueOrDefault(DicomTag.SliceThickness, string.Empty),
|
||||
NumberOfFrames = dataset.GetSingleValueOrDefault(DicomTag.NumberOfFrames, 0),
|
||||
PixelSpacing = dataset.GetSingleValueOrDefault(DicomTag.PixelSpacing, string.Empty),
|
||||
ImagerPixelSpacing = dataset.GetSingleValueOrDefault(DicomTag.ImagerPixelSpacing, string.Empty),
|
||||
FrameOfReferenceUID = dataset.GetSingleValueOrDefault(DicomTag.FrameOfReferenceUID, string.Empty),
|
||||
WindowCenter = dataset.GetSingleValueOrDefault(DicomTag.WindowCenter, string.Empty),
|
||||
WindowWidth = dataset.GetSingleValueOrDefault(DicomTag.WindowWidth, string.Empty),
|
||||
};
|
||||
|
||||
++findStudy.InstanceCount;
|
||||
++findSerice.InstanceCount;
|
||||
}
|
||||
|
||||
if (isStudyNeedAdd)
|
||||
{
|
||||
await _studyRepository.AddAsync(findStudy);
|
||||
}
|
||||
if(isSeriesNeedAdd)
|
||||
{
|
||||
await _seriesRepository.AddAsync(findSerice);
|
||||
}
|
||||
if(isInstanceNeedAdd)
|
||||
{
|
||||
await _instanceRepository.AddAsync(findInstance);
|
||||
}
|
||||
await _studyRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using Microsoft.AspNetCore.Authorization;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using System.Linq.Dynamic.Core;
|
||||
|
||||
namespace IRaCIS.Core.Application.Services
|
||||
{
|
||||
|
|
@ -26,7 +27,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
[HttpGet("{seriesId:guid}")]
|
||||
public async Task<IResponseOutput<List<DicomInstanceDTO>>> List(Guid seriesId)
|
||||
{
|
||||
var list = await _instanceRepository.Where(s => s.SeriesId == seriesId).OrderBy(s => s.InstanceNumber).
|
||||
var list = await _instanceRepository.Where(s => s.SeriesId == seriesId)/*.OrderBy(s => s.SliceLocation)*/.OrderBy(s => s.InstanceNumber).
|
||||
ThenBy(s => s.InstanceTime).ThenBy(s => s.CreateTime)
|
||||
.ProjectTo<DicomInstanceDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
namespace IRaCIS.Core.Application.Contracts.Dicom
|
||||
using FellowOakDicom;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts.Dicom
|
||||
{
|
||||
public interface IDicomArchiveService
|
||||
{
|
||||
|
|
@ -18,7 +20,7 @@
|
|||
////[EasyCachingAble(Expiration = 6000)]
|
||||
//string GetSeriesPreview(Guid seriesId);
|
||||
|
||||
|
||||
Task ArchiveDicomFileAsync(DicomDataset dicomDataset);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,14 +139,21 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传临床数据
|
||||
/// </summary>
|
||||
/// <param name="incommand"></param>
|
||||
/// <returns></returns>
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> AddOrUpdateArchiveStudy(NewArchiveStudyCommand incommand)
|
||||
{
|
||||
var modalitys = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
var trialId = incommand.TrialId;
|
||||
|
||||
|
||||
var studyMonitor = await _studyMonitorRepository.FirstOrDefaultAsync(t => t.Id == incommand.StudyMonitorId);
|
||||
studyMonitor.UploadFinishedTime = DateTime.Now;
|
||||
studyMonitor.ArchiveFinishedTime = DateTime.Now;
|
||||
|
|
@ -190,6 +197,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
//特殊处理逻辑
|
||||
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Distinct());
|
||||
SpecialArchiveStudyDeal(study);
|
||||
modalitys = study.Modalities;
|
||||
|
||||
await _dicomstudyRepository.AddAsync(study);
|
||||
|
||||
|
|
@ -252,7 +260,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
//特殊处理逻辑
|
||||
study.Modalities = string.Join("、", incommand.Study.SeriesList.Select(t => t.Modality).Union(study.Modalities.Split("、", StringSplitOptions.RemoveEmptyEntries)).Distinct());
|
||||
SpecialArchiveStudyDeal(study);
|
||||
|
||||
modalitys = study.Modalities;
|
||||
|
||||
|
||||
// 少了整个序列
|
||||
|
|
@ -336,7 +344,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
return ResponseOutput.Ok(modalitys);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -772,7 +780,7 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc
|
|||
|
||||
var result = new VerifyStudyUploadResult();
|
||||
|
||||
if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}"))
|
||||
if (_provider.Exists($"StudyUid_{trialId}_{studyInstanceUid}") && _provider.Get<Guid>($"StudyUid_{trialId}_{studyInstanceUid}").Value!=_userInfo.Id)
|
||||
{
|
||||
|
||||
result.AllowUpload = false;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
;
|
||||
|
||||
CreateMap<DicomStudy, QAStudyInfoDTO>()
|
||||
.ForMember(o => o.IsCompleteClinicalData, t => t.MapFrom(u => !u.ReadingClinicalDataList.Any(x=>x.ReadingClinicalDataPDFList.Count()==0)))
|
||||
.ForMember(o => o.UploadedTime, t => t.MapFrom(u => u.CreateTime))
|
||||
.ForMember(o => o.Uploader, t => t.MapFrom(u => u.Uploader.LastName + " / " + u.Uploader.FirstName))
|
||||
.ForMember(o => o.StudyId, t => t.MapFrom(u => u.Id))
|
||||
|
|
|
|||
|
|
@ -1078,7 +1078,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
[HttpGet]
|
||||
public async Task<List<string>> GetModuleTypeDescriptionList(Guid moduleTypeId)
|
||||
{
|
||||
var result = await _frontAuditConfigRepository.Where(x => x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length > 0).Select(x => new { x.Description, x.DescriptionCN, x.Sort }).OrderBy(t => t.Sort).Select(t => _userInfo.IsEn_Us? t.Description:t.DescriptionCN).Distinct().ToListAsync();
|
||||
var result =( await _frontAuditConfigRepository.Where(x => x.ModuleTypeId == moduleTypeId && x.ObjectTypeId != null && x.OptTypeId != null && x.Description.Length > 0).Select(x => new { x.Description, x.DescriptionCN, x.Sort }).OrderBy(t => t.Sort).ToListAsync()
|
||||
).Select(t => _userInfo.IsEn_Us? t.Description:t.DescriptionCN).Distinct().ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ namespace IRaCIS.Application.Contracts
|
|||
{
|
||||
public Guid Id { get; set; }
|
||||
public string SiteName { get; set; } = String.Empty;
|
||||
|
||||
public string SiteNameCN { get; set; } = String.Empty;
|
||||
|
||||
public string City { get; set; } = String.Empty;
|
||||
|
||||
public string Province { get; set; } = string.Empty;
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using IRaCIS.Application.Contracts;
|
|||
using IRaCIS.Core.Infra.EFCore;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.Data.Sqlite;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
|
@ -11,11 +12,13 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
private readonly IRepository<Hospital> _hospitalRepository;
|
||||
private readonly IRepository<Doctor> _doctorRepository;
|
||||
private readonly IRepository<Site> _siteRepository;
|
||||
|
||||
public HospitalService(IRepository<Hospital> hospitalRepository, IRepository<Doctor> doctorRepository)
|
||||
public HospitalService(IRepository<Hospital> hospitalRepository, IRepository<Doctor> doctorRepository, IRepository<Site> siteRepository)
|
||||
{
|
||||
_hospitalRepository = hospitalRepository;
|
||||
this._doctorRepository = doctorRepository;
|
||||
_doctorRepository = doctorRepository;
|
||||
_siteRepository = siteRepository;
|
||||
}
|
||||
|
||||
/// <summary> 获取所有医院列表 </summary>
|
||||
|
|
@ -38,13 +41,24 @@ namespace IRaCIS.Application.Services
|
|||
var exp1 = new EntityVerifyExp<Hospital>()
|
||||
{
|
||||
VerifyExp = x => x.SiteId == hospitalCommand.SiteId && hospitalCommand.SiteId != null,
|
||||
//---已经存在同名的医院,请确认。
|
||||
//---当前中心已经添加到其他医院了。
|
||||
VerifyMsg = _localizer["Hospital_SiteAdded"]
|
||||
};
|
||||
|
||||
|
||||
var hospital = await _hospitalRepository.InsertOrUpdateAsync(hospitalCommand, true, exp, exp1);
|
||||
|
||||
//手动解绑医院与site的关系
|
||||
if (hospitalCommand.SiteId == null && hospital.SiteId != null)
|
||||
{
|
||||
await _siteRepository.BatchUpdateNoTrackingAsync(t => t.Id == hospital.SiteId, u => new Site() { HospitalId = null });
|
||||
}
|
||||
|
||||
//手动绑
|
||||
if (hospitalCommand.SiteId != null)
|
||||
{
|
||||
await _siteRepository.BatchUpdateNoTrackingAsync(t => t.Id == hospitalCommand.SiteId, u => new Site() { HospitalId = hospital.Id});
|
||||
}
|
||||
return ResponseOutput.Ok(hospital.Id.ToString());
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using IRaCIS.Core.Infra.EFCore;
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Medallion.Threading;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
|
@ -13,12 +14,14 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<Site> _siteRepository;
|
||||
private readonly IRepository<TrialSiteUser> _trialSiteUserRepository;
|
||||
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||
private readonly IRepository<Hospital> _hospitalRepository;
|
||||
|
||||
public SiteService(IRepository<Site> siteRepository, IRepository<TrialSiteUser> trialSiteUserRepository, IDistributedLockProvider distributedLockProvider)
|
||||
public SiteService(IRepository<Site> siteRepository, IRepository<TrialSiteUser> trialSiteUserRepository, IDistributedLockProvider distributedLockProvider, IRepository<Hospital> hospitalRepository)
|
||||
{
|
||||
_siteRepository = siteRepository;
|
||||
_trialSiteUserRepository = trialSiteUserRepository;
|
||||
_distributedLockProvider = distributedLockProvider;
|
||||
_hospitalRepository= hospitalRepository;
|
||||
}
|
||||
|
||||
/// <summary> 分页获取研究中心列表 </summary>
|
||||
|
|
@ -72,6 +75,18 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var site = await _siteRepository.InsertOrUpdateAsync(siteCommand, true, exp);
|
||||
|
||||
//手动解绑医院与site的关系
|
||||
if (siteCommand.HospitalId == null && site.HospitalId != null)
|
||||
{
|
||||
await _hospitalRepository.BatchUpdateNoTrackingAsync(t => t.Id == site.HospitalId, u => new Hospital() { SiteId = null });
|
||||
}
|
||||
|
||||
//手动绑
|
||||
if(siteCommand.HospitalId != null)
|
||||
{
|
||||
await _hospitalRepository.BatchUpdateNoTrackingAsync(t => t.Id == siteCommand.HospitalId, u => new Hospital() { SiteId = site.Id });
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok(site.Id.ToString());
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
public string? LoginUserName { get; set; }
|
||||
|
||||
public UserTypeEnum? LoginUserTypeEnum { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ using Medallion.Threading;
|
|||
using EasyCaching.Core;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using LoginReturnDTO = IRaCIS.Application.Contracts.LoginReturnDTO;
|
||||
using OfficeOpenXml.FormulaParsing.Utilities;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
|
@ -383,7 +384,7 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
}
|
||||
|
||||
var list = await _userRepository.Where(t => t.EMail == email).Select(t => new UserAccountDto() { UserId = t.Id, UserName = t.UserName, UserRealName = t.FullName, UserType = t.UserTypeRole.UserTypeShortName }).ToListAsync();
|
||||
var list = await _userRepository.Where(t => t.EMail == email && t.Status== UserStateEnum.Enable).Select(t => new UserAccountDto() { UserId = t.Id, UserName = t.UserName, UserRealName = t.FullName, UserType = t.UserTypeRole.UserTypeShortName }).ToListAsync();
|
||||
|
||||
|
||||
|
||||
|
|
@ -691,8 +692,12 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
userLoginReturnModel.BasicInfo = loginUser;
|
||||
|
||||
|
||||
// 登录 清除缓存
|
||||
_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
|
||||
//_cache.Remove(userLoginReturnModel.BasicInfo.Id.ToString());
|
||||
|
||||
var userId = loginUser.Id;
|
||||
await _cache.SetAsync($"{userId.ToString()}_Online", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromMinutes(_verifyConfig.CurrentValue.AutoLoginOutMinutes));
|
||||
|
||||
|
||||
return ResponseOutput.Ok(userLoginReturnModel);
|
||||
|
|
@ -709,6 +714,8 @@ namespace IRaCIS.Application.Services
|
|||
.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(inQuery.LoginUserTypeEnum != null, t => t.LoginUser.UserTypeEnum== inQuery.LoginUserTypeEnum)
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.LoginUserName), t => t.LoginUser.UserName.Contains(inQuery.LoginUserName!))
|
||||
.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);
|
||||
|
|
|
|||
|
|
@ -144,14 +144,13 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
{
|
||||
userTypeEnums = new List<UserTypeEnum>() { UserTypeEnum.CRA, UserTypeEnum.ClinicalResearchCoordinator };
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
.WhereIf(userTypeSelectEnum != UserTypeSelectEnum.None, t => userTypeEnums.Contains(t.UserTypeEnum))
|
||||
.OrderBy(t => t.Order).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
||||
.OrderBy(t => t.UserTypeShortName).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
|
|
@ -168,7 +167,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
{
|
||||
var query = _userTypeRepository.Where(x => x.UserTypeEnum != UserTypeEnum.SuperAdmin)
|
||||
.Where(t => !t.UserTypeGroupList.Any(t=> t.Group.Code=="3"))
|
||||
.OrderBy(t => t.Order).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
||||
.OrderBy(t => t.UserTypeShortName).ProjectTo<TrialUserType>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,6 +256,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
public class TrialVisitQADTO
|
||||
{
|
||||
public bool ExistsManual { get; set; }
|
||||
public bool IsHaveStudyClinicalData { get; set; }
|
||||
public SubjectClinicalDataDto SubjectClinicalData { get; set; } = new SubjectClinicalDataDto();
|
||||
|
||||
public List<NoneDicomStudyView> NoneDicomStudyList { get; set; } = new List<NoneDicomStudyView>();
|
||||
|
|
@ -387,6 +388,9 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
public string ModalityForEdit { get; set; } = string.Empty;
|
||||
|
||||
public bool IsHaveUploadFailed { get; set; }
|
||||
|
||||
public bool IsCompleteClinicalData { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class QASeriesInfoDto
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public class GetNextQCInfoInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid? VisitId { get; set; }
|
||||
}
|
||||
|
||||
public class QCVisitSearchDTO : PageInput
|
||||
|
|
@ -50,6 +52,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public bool? IsUrgent { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid? SiteId { get; set; }
|
||||
|
||||
public Guid? VisitId { get; set; }
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public string SubjectInfo { get; set; } = String.Empty;
|
||||
|
|
@ -119,6 +123,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public bool IsEnrollementQualificationConfirm { get; set; }
|
||||
public bool IsPDProgressView { get; set; }
|
||||
|
||||
public bool IsHaveStudyClinicalData { get; set; }
|
||||
|
||||
|
||||
|
||||
public string OutEnrollmentVisitName { get; set; } = String.Empty;
|
||||
|
||||
|
|
@ -973,7 +980,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
//病灶类型
|
||||
public string LessionType { get; set; }
|
||||
|
||||
|
||||
public string BeforeTranslateLessionTypeValue { get; set; }
|
||||
|
||||
//是否淋巴结
|
||||
[DictionaryTranslateAttribute("IsLymph")]
|
||||
|
|
@ -998,7 +1005,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
//短径
|
||||
public string ShortDiameter { get; set; }
|
||||
|
||||
[DictionaryTranslateAttribute("TargetState")]
|
||||
[DictionaryTranslateAttribute("TargetState", nameof(RECIST1Point1DetailedOfEvaluatedLesionExport.BeforeTranslateLessionTypeValue), "0")]
|
||||
[DictionaryTranslateAttribute("NoTargetState", nameof(RECIST1Point1DetailedOfEvaluatedLesionExport.BeforeTranslateLessionTypeValue), "1")]
|
||||
[DictionaryTranslateAttribute("NewLesionState", nameof(RECIST1Point1DetailedOfEvaluatedLesionExport.BeforeTranslateLessionTypeValue), "2")]
|
||||
//病灶状态
|
||||
public string LessionState { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using IRaCIS.Application.Interfaces;
|
|||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using static Org.BouncyCastle.Math.EC.ECCurve;
|
||||
|
||||
namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
|
|
@ -16,6 +17,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSet;
|
||||
private readonly IRepository<TrialQCQuestionAnswer> _trialQCQuestionAnswerRepository;
|
||||
private readonly IRepository<TrialQCQuestion> _trialQCQuestionRepository;
|
||||
|
|
@ -26,6 +28,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
public QCListService(
|
||||
IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<Trial> trialRepository,
|
||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSet,
|
||||
IRepository<TrialQCQuestionAnswer> trialQCQuestionAnswerRepository,
|
||||
IRepository<TrialQCQuestion> trialQCQuestionRepository,
|
||||
|
|
@ -39,6 +42,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
this._trialQCQuestionRepository = trialQCQuestionRepository;
|
||||
this._consistencyCheckFileRepository = consistencyCheckFileRepository;
|
||||
_trialRepository = trialRepository;
|
||||
this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
|
||||
this._clinicalDataTrialSet = clinicalDataTrialSet;
|
||||
}
|
||||
|
||||
|
|
@ -77,8 +81,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
var pageList = await query.ToPagedListAsync(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc, string.IsNullOrWhiteSpace(visitSearchDTO.SortField), defalutSortArray);
|
||||
|
||||
var config = await _repository.Where<Trial>(t => t.Id == visitSearchDTO.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
|
||||
config.IsHaveSubjectClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.Subject && x.UploadRole == UploadRole.CRC);
|
||||
config.IsHaveVisitClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.SubjectVisit && x.UploadRole == UploadRole.CRC);
|
||||
config.IsHaveSubjectClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && (x.ClinicalDataLevel == ClinicalLevel.Subject ) && x.UploadRole == UploadRole.CRC);
|
||||
config.IsHaveVisitClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && (x.ClinicalDataLevel == ClinicalLevel.SubjectVisit) && x.UploadRole == UploadRole.CRC);
|
||||
return (pageList, config);
|
||||
|
||||
}
|
||||
|
|
@ -252,9 +256,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
var result = await GetQCVisitList(new QCVisitSearchDTO()
|
||||
{
|
||||
|
||||
TrialId = inDto.TrialId,
|
||||
CurrentActionUserId = _userInfo.Id,
|
||||
VisitId = inDto.VisitId,
|
||||
PageIndex = 1,
|
||||
PageSize = 1,
|
||||
});
|
||||
|
|
@ -431,6 +435,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
var svExpression = QCCommon.GetSubjectVisitFilter(visitSearchDTO.VisitPlanArray);
|
||||
var query = _subjectVisitRepository.Where(x => x.TrialId == visitSearchDTO.TrialId)
|
||||
.WhereIf(visitSearchDTO.VisitId != null, t => t.Id == visitSearchDTO.VisitId)
|
||||
.WhereIf(visitSearchDTO.CurrentActionUserId != null, t => t.CurrentActionUserId == visitSearchDTO.CurrentActionUserId)
|
||||
.WhereIf(visitSearchDTO.ChallengeState != null, t => t.ChallengeState == visitSearchDTO.ChallengeState)
|
||||
.WhereIf(visitSearchDTO.SiteId != null, t => t.SiteId == visitSearchDTO.SiteId)
|
||||
|
|
@ -451,7 +456,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
//.WhereIf(visitSearchDTO.ChallengeState != null, t => t.ChallengeState == visitSearchDTO.ChallengeState)
|
||||
.ProjectTo<QCVisitViewModel>(_mapper.ConfigurationProvider);
|
||||
|
||||
var defalutSortArray = new string[] { nameof(SubjectVisit.IsUrgent) + " desc", nameof(QCVisitViewModel.AuditState) +" asc" };
|
||||
var defalutSortArray = new string[] { nameof(QCVisitViewModel.IsUrgent) + " desc", nameof(QCVisitViewModel.SubjectId), nameof(QCVisitViewModel.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);
|
||||
|
||||
|
||||
|
|
@ -609,6 +615,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
return new TrialVisitQADTO
|
||||
{
|
||||
QCQuestionAnswerList = qacheckList,
|
||||
|
||||
IsHaveStudyClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.IsConfirm && x.TrialId == sv.TrialId && x.ClinicalDataLevel == ClinicalLevel.Study),
|
||||
StudyList = temp.StudyList,
|
||||
ExistsManual= (await _IReadingImageTaskService.GetManualList(new GetManualListInDto() { TrialId = sv.TrialId })).Count() > 0,
|
||||
SeriesList = temp.SeriesList,
|
||||
|
|
@ -758,11 +766,16 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
[HttpGet("{subjectVisitId:guid}")]
|
||||
public async Task<(List<QAStudyInfoDTO>,object)> GetSubjectVisitUploadedStudyList(Guid subjectVisitId)
|
||||
{
|
||||
var list= await _repository.Where<DicomStudy>(s => s.SubjectVisitId == subjectVisitId).IgnoreQueryFilters().ProjectTo<QAStudyInfoDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
var visit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).FirstNotNullAsync();
|
||||
var list= await _repository.Where<DicomStudy>(s => s.SubjectVisitId == subjectVisitId).IgnoreQueryFilters().ProjectTo<QAStudyInfoDTO>(_mapper.ConfigurationProvider).OrderBy(t=>t.StudyCode).ToListAsync();
|
||||
|
||||
|
||||
var config = await _repository.Where<SubjectVisit>(t => t.Id == subjectVisitId).Select(t=>t.Trial).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
|
||||
|
||||
config.IsHaveStudyClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.IsConfirm && x.TrialId == visit.TrialId && x.ClinicalDataLevel == ClinicalLevel.Study);
|
||||
|
||||
|
||||
return (list, config);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,8 +28,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
private readonly IRepository<QCChallenge> _qcChallengeRepository;
|
||||
private readonly IRepository<DicomStudy> _dicomStudyRepository;
|
||||
private readonly IRepository<DicomSeries> _dicomSeriesrepository;
|
||||
private readonly IReadingClinicalDataService _readingClinicalDataService;
|
||||
private readonly IRepository<Subject> _subjectRepository;
|
||||
private readonly IRepository<ReadingClinicalData> _readingClinicalDataRepository;
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<QCChallengeDialog> _qCChallengeDialogrepository;
|
||||
private readonly IRepository<CheckChallengeDialog> _checkChallengeDialogrepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
|
|
@ -43,8 +45,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<DicomStudy> dicomStudyRepository,
|
||||
IRepository<DicomSeries> dicomSeriesrepository,
|
||||
IReadingClinicalDataService readingClinicalDataService,
|
||||
IRepository<Subject> subjectRepository,
|
||||
IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
||||
IRepository<QCChallengeDialog> qCChallengeDialogrepository,
|
||||
IRepository<CheckChallengeDialog> checkChallengeDialogrepository,
|
||||
IVisitTaskHelpeService visitTaskHelpeService,
|
||||
|
|
@ -55,8 +59,10 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
_qcChallengeRepository = qcChallengeRepository;
|
||||
_dicomStudyRepository = dicomStudyRepository;
|
||||
this._dicomSeriesrepository = dicomSeriesrepository;
|
||||
this._readingClinicalDataService = readingClinicalDataService;
|
||||
this._subjectRepository = subjectRepository;
|
||||
this._readingClinicalDataRepository = readingClinicalDataRepository;
|
||||
this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
|
||||
this._qCChallengeDialogrepository = qCChallengeDialogrepository;
|
||||
this._checkChallengeDialogrepository = checkChallengeDialogrepository;
|
||||
_trialRepository = trialRepository;
|
||||
|
|
@ -925,9 +931,15 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
return new GetNextIQCQualityOutDto() { };
|
||||
break;
|
||||
case TrialQCProcess.SingleAudit:
|
||||
visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake))).Include(x => x.Subject).ToListAsync();
|
||||
visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted
|
||||
&& x.TrialId == inDto.TrialId && x.PreliminaryAuditUserId!= _userInfo.Id&&(x.CurrentActionUserId == _userInfo.Id || (x.AuditState != AuditStateEnum.PrimaryQCPassed && !x.IsTake)))
|
||||
.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y=>!y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId != _userInfo.Id)
|
||||
.Include(x => x.Subject).ToListAsync();
|
||||
|
||||
subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId).OrderBy(x=>x.VisitNum).FirstOrDefault();
|
||||
subjectVisit = visitList.Where(x => x.SubjectId == inDto.SubjectId)
|
||||
|
||||
|
||||
.OrderBy(x=>x.VisitNum).FirstOrDefault();
|
||||
if(subjectVisit!=null)
|
||||
{
|
||||
return new GetNextIQCQualityOutDto() {
|
||||
|
|
@ -954,7 +966,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
visitList = await _subjectVisitRepository.Where(x => x.SubmitState == SubmitStateEnum.Submitted && x.TrialId == inDto.TrialId &&
|
||||
((x.CurrentActionUserId == _userInfo.Id)||(!x.IsTake&& x.AuditState != AuditStateEnum.QCPassed&& (x.PreliminaryAuditUserId != _userInfo.Id)))
|
||||
).Include(x => x.Subject).ToListAsync();
|
||||
)
|
||||
.Where(x => x.QCChallengeList.Count() == 0 || x.QCChallengeList.Where(y => !y.IsClosed).OrderByDescending(x => x.CreateTime).FirstOrDefault().CreateUserId !=_userInfo.Id)
|
||||
.Include(x => x.Subject).ToListAsync();
|
||||
if (subjectVisit != null)
|
||||
{
|
||||
return new GetNextIQCQualityOutDto()
|
||||
|
|
@ -1172,6 +1186,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
{
|
||||
var dbSubjectVisitList = await _subjectVisitRepository.Where(t => cRCRequestToQCCommand.SubjectVisitIds.Contains(t.Id), true).ProjectTo<QCCRCVisitViewModel>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
var trialinfo = await _trialRepository.Where(x => x.Id == dbSubjectVisitList[0].TrialId).FirstNotNullAsync();
|
||||
//普通提交
|
||||
if (dbSubjectVisitList.Count == 1)
|
||||
{
|
||||
|
|
@ -1199,8 +1214,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
}
|
||||
|
||||
//同时要根据项目有没有配置Subject 级别临床数据
|
||||
if (dbSubjectVisitList.Any(t => t.IsBaseLine && !t.IsHaveClinicalData))
|
||||
if (dbSubjectVisitList.Any(t => t.IsBaseLine && !t.IsHaveClinicalData)&&trialinfo.ClinicalInformationTransmissionEnum!=0)
|
||||
{
|
||||
|
||||
//---基线没有临床数据,确认提交?
|
||||
return ResponseOutput.NotOk(_localizer["QCOperation_NoBaselineData"], 0, ApiResponseCodeEnum.NeedTips);
|
||||
}
|
||||
|
|
@ -1219,6 +1235,34 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
//[Authorize(Policy = IRaCISPolicy.CRC)]
|
||||
public async Task<IResponseOutput> CRCRequestToQC(CRCRequestToQCCommand cRCRequestToQCCommand)
|
||||
{
|
||||
List<string> modalitieTypess = new List<string>() { "PT、CT", "CT、PT", "PET-CT" };
|
||||
// 验证临床数据 是否有Pet类型
|
||||
#region 验证临床数据 是否有Pet类型
|
||||
if (await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == cRCRequestToQCCommand.TrialId && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.Study))
|
||||
{
|
||||
foreach (var item in cRCRequestToQCCommand.SubjectVisitIds)
|
||||
{
|
||||
|
||||
if (await _dicomStudyRepository.AnyAsync(x => x.SubjectVisitId == item && modalitieTypess.Contains(x.Modalities)))
|
||||
{
|
||||
var visit = await _subjectVisitRepository.Where(x => x.Id == item).FirstNotNullAsync();
|
||||
var clinicalData = await this._readingClinicalDataService.GetStudyClinicalData(new Service.Reading.Dto.GetStudyClinicalDataInDto()
|
||||
{
|
||||
SubjectVisitId = item,
|
||||
});
|
||||
|
||||
if (!clinicalData.Any(x => x.ClinicalDataLevel == ClinicalLevel.Study && x.ClinicalUploadType == ClinicalUploadType.PDF && x.PDFFileList.Count() > 0))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_NeedStudyClinical"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
var trialId = cRCRequestToQCCommand.TrialId;
|
||||
|
||||
|
|
@ -1309,11 +1353,14 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
|
||||
// CRC 上传的基线数据签名
|
||||
|
||||
List<ClinicalLevel> clinicalneedSign = new List<ClinicalLevel>() {
|
||||
ClinicalLevel.Subject,
|
||||
ClinicalLevel.SubjectVisit,
|
||||
ClinicalLevel.Study,
|
||||
};
|
||||
|
||||
await _readingClinicalDataRepository.UpdatePartialFromQueryAsync(x =>
|
||||
|
||||
(x.ClinicalDataTrialSet.ClinicalDataLevel== ClinicalLevel.Subject|| x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit)&&
|
||||
|
||||
|
||||
clinicalneedSign.Contains(x.ClinicalDataTrialSet.ClinicalDataLevel)&&
|
||||
x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == dbSubjectVisit.Id && x.IsSign==false, x => new ReadingClinicalData()
|
||||
{
|
||||
IsSign = true,
|
||||
|
|
@ -1918,6 +1965,29 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
throw new BusinessValidationFailedException(_localizer["QCOperation_InvalidCompleteResend"]);
|
||||
}
|
||||
|
||||
List<string> modalitieTypess = new List<string>() { "PT、CT", "CT、PT", "PET-CT" };
|
||||
// 验证临床数据 是否有Pet类型
|
||||
#region 验证临床数据 是否有Pet类型
|
||||
if (await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == cRCReuploadFinishedCommand.TrialId && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.Study))
|
||||
{
|
||||
var item = qcChallenge.SubjectVisitId;
|
||||
if (await _dicomStudyRepository.AnyAsync(x => x.SubjectVisitId == item && modalitieTypess.Contains(x.Modalities)))
|
||||
{
|
||||
var visit = await _subjectVisitRepository.Where(x => x.Id == item).FirstNotNullAsync();
|
||||
var clinicalData = await this._readingClinicalDataService.GetStudyClinicalData(new Service.Reading.Dto.GetStudyClinicalDataInDto()
|
||||
{
|
||||
SubjectVisitId = item,
|
||||
});
|
||||
|
||||
if (!clinicalData.Any(x => x.ClinicalDataLevel == ClinicalLevel.Study && x.ClinicalUploadType == ClinicalUploadType.PDF && x.PDFFileList.Count() > 0))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_NeedStudyClinical"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
var subjectVisitId = qcChallenge.SubjectVisitId;
|
||||
|
||||
|
|
|
|||
|
|
@ -206,8 +206,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
//位置可能是自己填写的
|
||||
.ForMember(o => o.LessionLocation, t =>
|
||||
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault().Answer)
|
||||
t.MapFrom(u => u.OrganInfo.IsCanEditPosition?
|
||||
u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault()!.Answer: isEn_Us ? u.OrganInfo.TULATEN : u.OrganInfo.TULAT)
|
||||
t.MapFrom(u => isEn_Us ? u.OrganInfo.PartEN : u.OrganInfo.Part)
|
||||
|
||||
)
|
||||
.ForMember(o => o.LessionOrgan, t =>
|
||||
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Organ).FirstOrDefault().Answer)
|
||||
|
|
@ -215,11 +215,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
)
|
||||
.ForMember(o => o.BodyPartDescription, t =>
|
||||
//t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Part).FirstOrDefault().Answer)
|
||||
t.MapFrom(u => isEn_Us? u.OrganInfo.PartEN : u.OrganInfo.Part)
|
||||
|
||||
// t.MapFrom(u => u.OrganInfo.IsCanEditPosition ?
|
||||
//u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault()!.Answer : isEn_Us ? u.OrganInfo.TULATEN : u.OrganInfo.TULAT)
|
||||
t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.BodyPartDescription).FirstOrDefault()!.Answer)
|
||||
)
|
||||
|
||||
//.ForMember(o => o.MeasurementResult, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.Location).FirstOrDefault().Answer))
|
||||
.ForMember(o => o.LongDiameter, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.MajorAxis).FirstOrDefault()!.Answer))
|
||||
.ForMember(o => o.ShortDiameter, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.ShortAxis).FirstOrDefault()!.Answer))
|
||||
.ForMember(o => o.LessionState, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State).FirstOrDefault()!.Answer));
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
var questionIdList = addtionalQustionInfoList.Select(t => t.QuestionId).ToList();
|
||||
|
||||
|
||||
var subjectCriteriaEvaluationQueryable = from subject in _subjectRepository.Where(t => t.TrialId == inQuery.TrialId)
|
||||
var subjectCriteriaEvaluationQueryable = from subject in _subjectRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsDeleted==false)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubjectCode), t => t.Code.Contains(inQuery.SubjectCode))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteCode), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode))
|
||||
.WhereIf(inQuery.SubjectStatus != null, t => t.Status == inQuery.SubjectStatus)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ using IRaCIS.Core.Domain.Models;
|
|||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using IRaCIS.Core.Application.Service.Reading.Interface;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using OfficeOpenXml.FormulaParsing.Excel.Functions.Information;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
|
@ -41,6 +42,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
private readonly IRepository<Subject> _subjectRepository;
|
||||
private readonly IRepository<ReadModuleCriterionFrom> _readModuleCriterionFromRepository;
|
||||
private readonly IRepository<ReadModule> _readModuleRepository;
|
||||
private readonly IRepository<DicomStudy> _dicomStudyRepository;
|
||||
private readonly IRepository<ClinicalQuestionAnswer> _clinicalQuestionAnswerRepository;
|
||||
|
||||
private readonly IRepository<ClinicalTableAnswer> _clinicalTableAnswerRepository;
|
||||
|
|
@ -64,6 +66,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IReadingClinicalDataService iReadingClinicalDataService,
|
||||
IRepository<ReadModuleCriterionFrom> readModuleCriterionFromRepository,
|
||||
IRepository<ReadModule> readModuleRepository,
|
||||
IRepository<DicomStudy> dicomStudyRepository,
|
||||
IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<ClinicalTableAnswer> clinicalTableAnswerRepository,
|
||||
IRepository<ClinicalQuestionAnswer> clinicalQuestionAnswerRepository,
|
||||
|
|
@ -87,6 +90,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
this._subjectRepository = subjectRepository;
|
||||
this._readModuleCriterionFromRepository = readModuleCriterionFromRepository;
|
||||
this._readModuleRepository = readModuleRepository;
|
||||
this._dicomStudyRepository = dicomStudyRepository;
|
||||
_clinicalTableAnswerRepository = clinicalTableAnswerRepository;
|
||||
_iClinicalQuestionService = iClinicalQuestionService;
|
||||
}
|
||||
|
|
@ -111,7 +115,52 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自动添加CRC临床数据
|
||||
/// 删除检查级别临床数据
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task DeleteStudyClinical(DeleteStudyClinicalInDto inDto)
|
||||
{
|
||||
await _readingClinicalDataRepository.BatchDeleteNoTrackingAsync(x => x.StudyId == inDto.StudyId);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加检查级别临床数据
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task AddStudyClinical(AddStudyClinicalInDto inDto)
|
||||
{
|
||||
var studyInfo = await _dicomStudyRepository.Where(x => x.Id == inDto.StudyId).FirstNotNullAsync();
|
||||
|
||||
List<ClinicalDataTrialSet> clinicals = await _clinicalDataTrialSetRepository.Where(x =>
|
||||
x.TrialId == studyInfo.TrialId && x.IsConfirm&&x.ClinicalDataLevel== ClinicalLevel.Study).ToListAsync();
|
||||
|
||||
List<ReadingClinicalData> datas = new List<ReadingClinicalData>();
|
||||
|
||||
clinicals.ForEach(x =>
|
||||
{
|
||||
datas.Add(new ReadingClinicalData()
|
||||
{
|
||||
ClinicalDataTrialSetId = x.Id,
|
||||
IsVisit = true,
|
||||
SubjectId = studyInfo.SubjectId,
|
||||
ReadingId = studyInfo.SubjectVisitId,
|
||||
TrialId = studyInfo.TrialId,
|
||||
StudyId = studyInfo.Id
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
await _readingClinicalDataRepository.AddRangeAsync(datas);
|
||||
await _readingClinicalDataRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 自动添加CRC临床数据 (不包括检查级别)
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
|
|
@ -193,6 +242,17 @@ namespace IRaCIS.Core.Application.Service
|
|||
ReadingId = n.VisitId,
|
||||
TrialId = inDto.TrialId
|
||||
}).ToList());
|
||||
|
||||
//readingClinicalDatas.AddRange(
|
||||
// dataTrialSetList.Where(x => x.ClinicalDataLevel == ClinicalLevel.Study).Where(x => clinicalDataList.Where(y => y.ClinicalDataTrialSetId == x.Id && y.ReadingId == n.VisitId).Count() == 0)
|
||||
// .Select(x => new ReadingClinicalData()
|
||||
// {
|
||||
// ClinicalDataTrialSetId = x.Id,
|
||||
// IsVisit = true,
|
||||
// SubjectId = n.SubjectId,
|
||||
// ReadingId = n.VisitId,
|
||||
// TrialId = inDto.TrialId
|
||||
// }).ToList());
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@ using IRaCIS.Core.Domain.Models;
|
|||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System;
|
||||
using MathNet.Numerics.Optimization.LineSearch;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
|
@ -18,6 +22,7 @@ namespace IRaCIS.Application.Services
|
|||
public IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionTrial> _iReadingQuestionCriterionTrialRepository;
|
||||
private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
|
||||
private readonly IRepository<PreviousPDF> _previousPDFRepository;
|
||||
private readonly IRepository<Dictionary> _dictionaryRepository;
|
||||
|
|
@ -29,6 +34,7 @@ namespace IRaCIS.Application.Services
|
|||
public ClinicalDataSetService(IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IClinicalQuestionService iClinicalQuestionService,
|
||||
IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> iReadingQuestionCriterionTrialRepository,
|
||||
IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
|
||||
IRepository<PreviousPDF> previousPDFRepository,
|
||||
IRepository<Dictionary> dictionaryRepository,
|
||||
|
|
@ -45,6 +51,7 @@ namespace IRaCIS.Application.Services
|
|||
_trialClinicalQuestionRepository = trialClinicalQuestionRepository;
|
||||
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
|
||||
_clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
|
||||
this._iReadingQuestionCriterionTrialRepository = iReadingQuestionCriterionTrialRepository;
|
||||
_clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
|
||||
this._previousPDFRepository = previousPDFRepository;
|
||||
this._dictionaryRepository = dictionaryRepository;
|
||||
|
|
@ -271,19 +278,35 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<List<ClinicalDataTrialSetView>> GetTrialClinicalDataTrialSetList(GetTrialClinicalDataTrialIndto inDto)
|
||||
{
|
||||
await this.AddTrialClinicalDataTrialSet(inDto.TrialId);
|
||||
Expression<Func<ClinicalDataTrialSet, bool>> predicate = null;
|
||||
if (inDto.CriterionIds != null)
|
||||
{
|
||||
|
||||
List<string> criterionTypes = (await _iReadingQuestionCriterionTrialRepository.Where(x => inDto.CriterionIds.Contains(x.Id)).Select(x => x.CriterionType).ToListAsync())
|
||||
.Select(x => ((int)x).ToString()).ToList();
|
||||
predicate = x =>x.SystemClinicalDataSetId == null;
|
||||
foreach (var item in criterionTypes)
|
||||
{
|
||||
Expression<Func<ClinicalDataTrialSet, bool>> typeExpression = x =>x.ClinicalDataSystemSet==null|| x.ClinicalDataSystemSet.CriterionEnumListStr.Contains(item);
|
||||
predicate = predicate.Or(typeExpression);
|
||||
|
||||
}
|
||||
}
|
||||
var trialClinicalDataList = await _clinicalDataTrialSetRepository.AsQueryable()
|
||||
.Where(x => x.TrialId == inDto.TrialId)
|
||||
.WhereIf(inDto.CriterionIds != null, predicate)
|
||||
.WhereIf(inDto.ClinicalDataLevel != null, x => x.ClinicalDataLevel == inDto.ClinicalDataLevel)
|
||||
.WhereIf(inDto.ClinicalUploadType != null, x => x.ClinicalUploadType == inDto.ClinicalUploadType)
|
||||
.WhereIf(inDto.ClinicalDataSetName != String.Empty, x => x.ClinicalDataSetName.Contains(inDto.ClinicalDataSetName))
|
||||
.ProjectTo<ClinicalDataTrialSetView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
.ProjectTo<ClinicalDataTrialSetView>(_mapper.ConfigurationProvider, new
|
||||
{
|
||||
CriterionIds = inDto.CriterionIds
|
||||
|
||||
}).ToListAsync();
|
||||
return trialClinicalDataList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除(项目)
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ using Microsoft.Extensions.DependencyInjection;
|
|||
using System.Linq.Expressions;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
|
@ -82,7 +83,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
var existsQuery = _readingClinicalDataRepository
|
||||
.WhereIf(indto.Id != null, x => x.Id != indto.Id)
|
||||
.Where(x => x.ClinicalDataTrialSetId == indto.ClinicalDataTrialSetId && x.ReadingId == indto.ReadingId);
|
||||
.Where(x => x.ClinicalDataTrialSetId == indto.ClinicalDataTrialSetId && x.ReadingId == indto.ReadingId&&x.StudyId==indto.StudyId);
|
||||
|
||||
|
||||
|
||||
|
|
@ -178,6 +179,60 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
#region 临床数据CRC 相关
|
||||
|
||||
/// <summary>
|
||||
/// 获取检查类型临床数据
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<GetCRCClinicalDataOutDto>> GetStudyClinicalData(GetStudyClinicalDataInDto inDto)
|
||||
{
|
||||
|
||||
var cRCClinicalDataList = await _readingClinicalDataRepository.Where(x => x.ReadingId == inDto.SubjectVisitId)
|
||||
.Where(x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Study).Select(x => new GetCRCClinicalDataOutDto()
|
||||
{
|
||||
Id = x.Id,
|
||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName.LanguageName(x.ClinicalDataTrialSet.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
||||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||
ClinicalDataSetEnName = x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
|
||||
FileName = x.ClinicalDataTrialSet.FileName,
|
||||
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
||||
Path = x.ClinicalDataTrialSet.Path,
|
||||
IsBlind = x.IsBlind,
|
||||
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()
|
||||
{
|
||||
Id = y.Id,
|
||||
FileName = y.FileName,
|
||||
Path = y.Path,
|
||||
CreateTime = y.CreateTime,
|
||||
}).ToList(),
|
||||
|
||||
}).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 previousSurgeryList = await _previousSurgeryRepository.Where(x => x.SubjectVisitId == inDto.SubjectVisitId).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
foreach (var item in cRCClinicalDataList)
|
||||
{
|
||||
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 cRCClinicalDataList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取CRC上传的文件
|
||||
/// </summary>
|
||||
|
|
@ -186,15 +241,29 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<List<GetCRCClinicalDataOutDto>> GetCRCClinicalData(GetCRCClinicalDataInDto inDto)
|
||||
{
|
||||
List<GetCRCClinicalDataOutDto> cRCClinicalDataList = await _readingClinicalDataRepository.Where(x => x.ReadingId == inDto.SubjectVisitId)
|
||||
|
||||
var query = _readingClinicalDataRepository.AsQueryable();
|
||||
if (inDto.StudyId != null)
|
||||
{
|
||||
query = query.Where(x => x.StudyId == inDto.StudyId.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
query = query.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.SubjectVisit)
|
||||
.Where(x => x.ClinicalDataTrialSet.TrialId == inDto.TrialId && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||
.Where(x => x.ClinicalDataTrialSet.TrialId == inDto.TrialId && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC);
|
||||
|
||||
}
|
||||
|
||||
|
||||
List<GetCRCClinicalDataOutDto> cRCClinicalDataList = await query
|
||||
.Select(x => new GetCRCClinicalDataOutDto()
|
||||
{
|
||||
Id = x.Id,
|
||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName.LanguageName(x.ClinicalDataTrialSet.ClinicalDataSetEnName, _userInfo.IsEn_Us) ,
|
||||
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
||||
ClinicalDataLevel=x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||
ClinicalDataSetEnName =x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSet.Id,
|
||||
FileName = x.ClinicalDataTrialSet.FileName,
|
||||
|
|
@ -300,7 +369,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var readingId = await _readingClinicalDataRepository.Where(x => x.Id == inDto.ReadingClinicalDataId).Select(x => x.ReadingId).FirstOrDefaultAsync();
|
||||
|
||||
await this.iServiceProvider.GetService<IReadingImageTaskService>().AddOncologyTask(readingId);
|
||||
//await this.iServiceProvider.GetService<IReadingImageTaskService>().AddOncologyTask(readingId);
|
||||
|
||||
await DealVisiTaskClinicalDataSignedAsync(data.TrialId, data.SubjectId, data.ReadingId, data.IsVisit, inDto.TrialReadingCriterionId);
|
||||
|
||||
|
|
@ -602,6 +671,7 @@ namespace IRaCIS.Application.Services
|
|||
{ClinicalLevel.ImageRead,2 },
|
||||
{ClinicalLevel.OncologyRead,3 },
|
||||
{ClinicalLevel.Subject,4 },
|
||||
{ClinicalLevel.Study,5 },
|
||||
};
|
||||
|
||||
result = result.OrderBy(x => keys[x.ClinicalDataLevel]).ToList();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public Guid ReadingClinicalDataId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class DeleteStudyClinicalInDto
|
||||
{
|
||||
public Guid StudyId { get; set; }
|
||||
}
|
||||
|
||||
public class AddStudyClinicalInDto
|
||||
{
|
||||
public Guid StudyId { get; set; }
|
||||
}
|
||||
|
||||
public class AutoAddClinicalInDto
|
||||
{
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
|
|
|||
|
|
@ -311,6 +311,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 上传方式
|
||||
/// </summary>
|
||||
public ClinicalUploadType? ClinicalUploadType { get; set; }
|
||||
|
||||
public List<Guid>? CriterionIds { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public CompleteClinicalDataEnum? CompleteClinicalData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目中心Code
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,27 @@ using System.Reflection.Metadata.Ecma335;
|
|||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
|
||||
public class GetIsSuvMaxLesionInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public Guid RowId { get; set; }
|
||||
}
|
||||
|
||||
public class GetIsSuvMaxLesionOutDto
|
||||
{
|
||||
public bool IsSuvMaxLesion { get; set; }
|
||||
}
|
||||
|
||||
public class GetCanChooseNotMergeInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class GetCanChooseNotMergeOutDto
|
||||
{
|
||||
public bool IsCanChooseNotMerge { get; set; }
|
||||
}
|
||||
|
||||
public class GetPPDInfoInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
|
@ -222,7 +243,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public Arm ArmEnum { get; set; }
|
||||
|
||||
public ComputationTrigger ComputationTrigger { get; set; } = ComputationTrigger.Lesion;
|
||||
public ComputationTrigger ComputationTrigger { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否修改其他任务
|
||||
|
|
@ -353,7 +374,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public QuestionType QuestionType { get; set; }
|
||||
|
||||
|
||||
public ComputationTrigger? ComputationTrigger { get; set; }
|
||||
public List<ComputationTrigger> ComputationTriggerList { get; set; }=new List<ComputationTrigger>();
|
||||
|
||||
public Func<ReadingCalculateDto, Task<decimal>> GetDecimalFun { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public Guid? StudyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
|
|
@ -87,6 +89,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
|
|
@ -134,20 +141,24 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
}
|
||||
|
||||
|
||||
public class GetStudyClinicalDataInDto
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
}
|
||||
|
||||
public class GetCRCClinicalDataInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public bool IsBaseline { get; set; }
|
||||
|
||||
public Guid? StudyId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -297,15 +297,108 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public List<CrterionDictionaryGroup> CrterionDictionaryGroup { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetCanMergeLesionOutDto
|
||||
{
|
||||
public Guid RowId { get; set; }
|
||||
|
||||
public string OrderMarkName { get; set; }
|
||||
|
||||
public Guid? OrganInfoId { get; set; }
|
||||
|
||||
public decimal RowIndex { get; set; }
|
||||
|
||||
public string Part { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetCanMergeLesionInDto
|
||||
{
|
||||
public Guid RowId { get; set; }
|
||||
}
|
||||
|
||||
public class TableQuestionAnswerInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题标识
|
||||
/// </summary>
|
||||
public QuestionMark? QuestionMark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题Id
|
||||
/// </summary>
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表格问题Id
|
||||
/// </summary>
|
||||
public Guid TableQuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务Id
|
||||
/// </summary>
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 行号
|
||||
/// </summary>
|
||||
public decimal RowIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 答案
|
||||
/// </summary>
|
||||
public string Answer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// RowId
|
||||
/// </summary>
|
||||
public Guid RowId { get; set; }
|
||||
|
||||
|
||||
public Guid UpdateUserId { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
public bool IsDeleted { get; set; }
|
||||
|
||||
public DateTime? DeletedTime { get; set; }
|
||||
|
||||
public Guid? DeleteUserId { get; set; }
|
||||
}
|
||||
public class MergeLesionInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public Guid MainRowId { get; set; }
|
||||
|
||||
public Guid MergeRowId { get; set; }
|
||||
/// <summary>
|
||||
/// 融合的主病灶
|
||||
/// </summary>
|
||||
public Guid MergeMainRowId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 融合的病灶
|
||||
/// </summary>
|
||||
public List<Guid> MergeRowIdList { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -341,6 +434,37 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class GetPreviousOtherPicturePathOutDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public string? PicturePath { get; set; }
|
||||
|
||||
public string TaskBlindName { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class GetPreviousOtherPicturePathInDto
|
||||
{
|
||||
public Guid? RowId { get; set; }
|
||||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题类型
|
||||
/// </summary>
|
||||
public QuestionType? QuestionType { get; set; }
|
||||
}
|
||||
|
||||
public class GetReadingCalculationDataInDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 任务Id
|
||||
/// </summary>
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class ReadingCustomTagDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
|
@ -464,6 +588,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public ComputationTrigger ComputationTrigger { get; set; }
|
||||
|
||||
public bool UpdateMark { get; set; } = false;
|
||||
|
||||
|
|
@ -522,6 +647,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第一层的Question
|
||||
/// </summary>
|
||||
|
|
@ -597,11 +728,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public string MeasureData { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// CreateTime
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是当前任务添加
|
||||
/// </summary>
|
||||
|
|
@ -667,6 +793,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public string ReportMark { get; set; } = string.Empty;
|
||||
|
||||
public string RowMark { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
public class CopyTableAnswerRowInfo : ReadingTableAnswerRowInfoBase
|
||||
|
|
@ -986,6 +1113,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public int? OtherNumberOfFrames { get; set; }
|
||||
|
||||
|
||||
public SplitOrMergeType? SplitOrMergeType { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class GetTableAnswerRowInfoInDto
|
||||
|
|
@ -1221,6 +1351,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public bool IsBaseLine { get; set; }
|
||||
|
||||
public decimal VisitNum { get; set; }
|
||||
|
||||
public bool IsHaveChange { get; set; }
|
||||
|
||||
public string VisitRemark { get; set; } = string.Empty;
|
||||
|
|
@ -1263,7 +1395,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
//任务阅片状态
|
||||
public ReadingTaskState ReadingTaskState { get; set; }
|
||||
|
||||
public Guid GlobalTaskId { get; set; }
|
||||
public Guid GlobalOrVisitTaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
/// </summary>
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
|
||||
|
||||
public Guid RelatedTaskId { get; set; }
|
||||
|
||||
|
|
@ -1305,6 +1443,21 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 是否是第一次转化的任务
|
||||
/// </summary>
|
||||
public bool IsFirstChangeTask { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 融合的PTSeriesId
|
||||
/// </summary>
|
||||
public Guid? PTSeriesId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 融合的CTSeriesId
|
||||
/// </summary>
|
||||
public Guid? CTSeriesId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// StudyId
|
||||
/// </summary>
|
||||
public Guid? OtherStudyId { get; set; }
|
||||
}
|
||||
|
||||
public class GetVisitReadingQuestionOutDto
|
||||
|
|
@ -1750,6 +1903,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public string TaskBlindName { get; set; }
|
||||
|
||||
public string VisitName { get; set; }
|
||||
|
||||
public decimal VisitTaskNum { get; set; }
|
||||
|
||||
|
||||
|
|
@ -1932,6 +2087,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public ComputationTrigger ComputationTrigger { get; set; } = ComputationTrigger.CTSave;
|
||||
|
||||
public Guid? OrganInfoId { get; set; }
|
||||
|
||||
public int? NumberOfFrames { get; set; }
|
||||
|
|
@ -2016,6 +2173,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public int? OtherNumberOfFrames { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 融合的PTSeriesId
|
||||
/// </summary>
|
||||
public Guid? PTSeriesId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 融合的CTSeriesId
|
||||
/// </summary>
|
||||
public Guid? CTSeriesId { get; set; }
|
||||
|
||||
public List<SubmitTableQuestionInfo> AnswerList { get; set; }
|
||||
|
||||
}
|
||||
|
|
@ -2288,6 +2455,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组ID
|
||||
/// </summary>
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 系统标准Id
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -89,8 +89,19 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public class TrialDataFromSystem : ReadingMedicineTrialQuestion
|
||||
{
|
||||
public Guid SystemQuestionId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class AddDefaultQuestionsInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public LanguageType LanguageType { get; set; }
|
||||
}
|
||||
|
||||
public class AddTrialDataFromSystemInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
|
@ -252,6 +263,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
public ReadingCategory? ReadingCategory { get; set; }
|
||||
}
|
||||
|
||||
public class VerifyIsCanConfirmInDto
|
||||
{
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
public class GetMedicineQuestionPreviewOutDto
|
||||
{
|
||||
|
|
|
|||
|
|
@ -232,6 +232,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public List<string> CodeList { get; set; }
|
||||
}
|
||||
|
||||
public class ResetAndAsyncCriterionInDto
|
||||
{
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
public class ResetAndAsyncCriterionOutDto
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class SetSystemGlobalInfoInDto
|
||||
{
|
||||
|
|
@ -2193,7 +2201,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public int ShowOrder { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 标准类型
|
||||
/// </summary>
|
||||
public CriterionType CriterionType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Interface
|
|||
{
|
||||
Task<IResponseOutput> CRCSignClinicalData(CRCSignClinicalDataInDto inDto);
|
||||
|
||||
|
||||
Task DeleteStudyClinical(DeleteStudyClinicalInDto inDto);
|
||||
|
||||
Task AddStudyClinical(AddStudyClinicalInDto inDto);
|
||||
|
||||
|
||||
Task AutoAddCRCClinical(AutoAddClinicalInDto inDto);
|
||||
|
||||
Task<IResponseOutput> PMConfirmClinical(CRCConfirmClinicalInDto inDto);
|
||||
|
|
|
|||
|
|
@ -24,6 +24,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
Task<List<GetReadingClinicalDataListOutDto>> GetReadingClinicalList(GetReadingClinicalDataListIndto inDto);
|
||||
|
||||
Task<List<GetCRCClinicalDataOutDto>> GetStudyClinicalData(GetStudyClinicalDataInDto inDto);
|
||||
|
||||
Task<List<GetCRCClinicalDataOutDto>> GetCRCClinicalData(GetCRCClinicalDataInDto inDto);
|
||||
|
||||
|
||||
Task DealVisiTaskClinicalDataSignedAsync(Guid trialId, Guid subjectId, Guid readingId, bool isVisit, Guid trialReadingCritrialId);
|
||||
}
|
||||
}
|
||||
|
|
@ -39,5 +39,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
Task ResetReadingRestTime(Guid? userId);
|
||||
|
||||
Task<List<GetReadingPastResultListOutDto>> GetReadingPastResultList(GetReadingPastResultListInDto inDto);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,8 @@ using IRaCIS.Core.Infrastructure;
|
|||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using DocumentFormat.OpenXml.Office2010.Excel;
|
||||
using System.Linq.Dynamic.Core;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
|
@ -36,6 +38,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
|
||||
#region 系统
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -178,7 +181,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
var questionList = await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField, inDto.Asc);
|
||||
return (questionList, new
|
||||
{
|
||||
|
||||
IsConfirmMedicineQuestion = isConfirmMedicineQuestion,
|
||||
LanguageType=(await _readingMedicineTrialQuestionRepository.FirstOrDefaultAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId&& x.SystemQuestionId != null))?.LanguageType,
|
||||
//QuestionCount = questionList.Count(),
|
||||
});
|
||||
}
|
||||
|
|
@ -491,6 +496,160 @@ namespace IRaCIS.Core.Application.Service
|
|||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 一键添加默认医学审核问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> AddDefaultQuestions(AddDefaultQuestionsInDto inDto)
|
||||
{
|
||||
//if (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && x.LanguageType == inDto.LanguageType && x.SystemQuestionId != null))
|
||||
//{
|
||||
// await _readingMedicineTrialQuestionRepository.BatchDeleteNoTrackingAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && x.LanguageType == inDto.LanguageType && x.SystemQuestionId != null);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// await _readingMedicineTrialQuestionRepository.BatchDeleteNoTrackingAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && x.LanguageType != inDto.LanguageType);
|
||||
//}
|
||||
|
||||
await _readingMedicineTrialQuestionRepository.BatchDeleteNoTrackingAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId);
|
||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
||||
List<ReadingCategory> needAddCategory = new List<ReadingCategory>() { ReadingCategory.Visit };
|
||||
if(criterionInfo.IsGlobalReading)
|
||||
{
|
||||
needAddCategory.Add(ReadingCategory.Global);
|
||||
}
|
||||
if (criterionInfo.IsArbitrationReading)
|
||||
{
|
||||
needAddCategory.Add(ReadingCategory.Judge);
|
||||
}
|
||||
if (criterionInfo.IsOncologyReading)
|
||||
{
|
||||
needAddCategory.Add(ReadingCategory.Oncology);
|
||||
}
|
||||
|
||||
var maxOrder = await _readingMedicineTrialQuestionRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == inDto.TrialReadingCriterionId).OrderByDescending(x => x.ShowOrder).Select(x => x.ShowOrder).FirstOrDefaultAsync();
|
||||
List<TrialDataFromSystem> needList = await _readingMedicineSystemQuestionRepository
|
||||
.Where(x=>x.IsEnable)
|
||||
.Where(x=>x.LanguageType==inDto.LanguageType)
|
||||
.Where(x =>needAddCategory.Contains(x.ReadingCategory) && x.CriterionTypeEnum == criterionInfo.CriterionType)
|
||||
.Select(x => new TrialDataFromSystem()
|
||||
{
|
||||
|
||||
ShowOrder = x.ShowOrder,
|
||||
IsEnable = x.IsEnable,
|
||||
LanguageType = x.LanguageType,
|
||||
IsRequired = x.IsRequired,
|
||||
QuestionName = x.QuestionName,
|
||||
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||
Type = x.Type,
|
||||
ParentId = x.ParentId,
|
||||
SystemQuestionId = x.Id,
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
TypeValue = x.TypeValue,
|
||||
TrialId = inDto.TrialId,
|
||||
}).ToListAsync();
|
||||
|
||||
foreach (var item in needAddCategory.Where(x => x != ReadingCategory.Visit).ToList())
|
||||
{
|
||||
if (!needList.Any(x => x.ReadingCategory == item))
|
||||
{
|
||||
needList.AddRange(await _readingMedicineSystemQuestionRepository
|
||||
.Where(x => x.IsEnable)
|
||||
.Where(x => x.LanguageType == inDto.LanguageType)
|
||||
.Where(x => x.ReadingCategory == item && x.IsGeneral)
|
||||
.Select(x => new TrialDataFromSystem()
|
||||
{
|
||||
|
||||
ShowOrder = x.ShowOrder,
|
||||
IsEnable = x.IsEnable,
|
||||
|
||||
LanguageType = x.LanguageType,
|
||||
IsRequired = x.IsRequired,
|
||||
QuestionName = x.QuestionName,
|
||||
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||
Type = x.Type,
|
||||
ParentId = x.ParentId,
|
||||
SystemQuestionId = x.Id,
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
TypeValue = x.TypeValue,
|
||||
TrialId = inDto.TrialId,
|
||||
}).ToListAsync());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
needList.ForEach(x => {
|
||||
x.Id = NewId.NextGuid();
|
||||
maxOrder++;
|
||||
x.ShowOrder = maxOrder;
|
||||
});
|
||||
|
||||
foreach (var item in needList.Where(x => x.ParentId != null))
|
||||
{
|
||||
var parent = needList.Where(x => x.SystemQuestionId == item.ParentId).FirstOrDefault();
|
||||
if (parent == null)
|
||||
{
|
||||
item.ParentId = null;
|
||||
item.ParentTriggerValue = String.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.ParentId = parent.Id;
|
||||
}
|
||||
}
|
||||
|
||||
await _readingMedicineTrialQuestionRepository.AddRangeAsync(_mapper.Map<List<ReadingMedicineTrialQuestion>>(needList));
|
||||
var result = await _readingMedicineTrialQuestionRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(result);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证医学审核问题是否可确认
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
[HttpPost]
|
||||
public async Task VerifyIsCanConfirm(VerifyIsCanConfirmInDto inDto)
|
||||
{
|
||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstNotNullAsync();
|
||||
|
||||
if (!criterionInfo.IsSigned)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_NoConfirmed"]);
|
||||
}
|
||||
if (!(await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && x.ReadingCategory == ReadingCategory.Visit)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_NoVisitQ"]);
|
||||
}
|
||||
if (criterionInfo.IsGlobalReading && !(await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && x.ReadingCategory == ReadingCategory.Global)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_NoGlobalQ"]);
|
||||
}
|
||||
if (criterionInfo.IsArbitrationReading&&!(await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && x.ReadingCategory == ReadingCategory.Judge)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_NoJudgeQ"]);
|
||||
}
|
||||
if (criterionInfo.IsOncologyReading&& !(await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && x.ReadingCategory == ReadingCategory.Oncology)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_NoOncologyQ"]);
|
||||
}
|
||||
if (!criterionInfo.IsGlobalReading && (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && x.ReadingCategory == ReadingCategory.Global)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_HaveGlobalQ"]);
|
||||
}
|
||||
if (!criterionInfo.IsArbitrationReading && (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && x.ReadingCategory == ReadingCategory.Judge)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_HaveJudgeQ"]);
|
||||
}
|
||||
if (!criterionInfo.IsOncologyReading && (await _readingMedicineTrialQuestionRepository.AnyAsync(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && x.ReadingCategory == ReadingCategory.Oncology)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingMed_HaveOncologyQ"]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从系统里面选择问题添加到项目里面
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ using IRaCIS.Core.Infrastructure;
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.RC
|
||||
{
|
||||
|
|
@ -22,6 +24,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly ITrialConfigService _trialConfigService;
|
||||
private readonly IRepository<SystemCriterionDictionaryCode> _systemCriterionDictionaryCodeRepository;
|
||||
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
||||
private readonly IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository;
|
||||
|
|
@ -35,6 +38,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
ITrialConfigService trialConfigService,
|
||||
IRepository<SystemCriterionDictionaryCode> systemCriterionDictionaryCodeRepository,
|
||||
IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
||||
IRepository<ReadingTableQuestionAnswer> readingTableQuestionAnswerRepository,
|
||||
|
|
@ -50,6 +54,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
this._readingTrialCriterionDictionaryRepository = readingTrialCriterionDictionaryRepository;
|
||||
this._visitTaskRepository = visitTaskRepository;
|
||||
this._trialConfigService = trialConfigService;
|
||||
this._systemCriterionDictionaryCodeRepository = systemCriterionDictionaryCodeRepository;
|
||||
this._readingTableQuestionAnswerRepository = readingTableQuestionAnswerRepository;
|
||||
this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository;
|
||||
|
|
@ -123,6 +128,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
|||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置系统全局阅片阅片信息
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ using Newtonsoft.Json;
|
|||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
|
@ -164,9 +166,15 @@ namespace IRaCIS.Application.Services
|
|||
ReadingTaskState = taskInfo.ReadingTaskState,
|
||||
|
||||
};
|
||||
result.OtherGlobalTaskId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
|
||||
|
||||
var otherGlobalTask = await _visitTaskRepository.Where(x => x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
&& x.IsSelfAnalysis == taskInfo.IsSelfAnalysis && x.TaskState == TaskState.Effect && x.DoctorUserId != taskInfo.DoctorUserId
|
||||
).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
).FirstOrDefaultAsync();
|
||||
if (otherGlobalTask != null)
|
||||
{
|
||||
result.OtherGlobalTaskId = otherGlobalTask.Id;
|
||||
}
|
||||
|
||||
result.TaskBlindName = taskInfo.TaskBlindName;
|
||||
if (taskInfo.IsAnalysisCreate)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ using IRaCIS.Core.Application.Filter;
|
|||
using DocumentFormat.OpenXml.Drawing;
|
||||
using EasyCaching.Core;
|
||||
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
using IRaCIS.Core.Application.Service.ReadingCalculate.Interface;
|
||||
using AutoMapper.QueryableExtensions;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
|
@ -48,6 +52,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
||||
private readonly IRepository<User> _userRepository;
|
||||
private readonly IEasyCachingProvider _provider;
|
||||
private readonly ILuganoCalculateService _luganoCalculateService;
|
||||
private readonly IRepository<ReadingCustomTag> _readingCustomTagRepository;
|
||||
private readonly IRepository<ReadingTaskQuestionMark> _readingTaskQuestionMarkRepository;
|
||||
private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository;
|
||||
|
|
@ -61,6 +66,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
|
||||
private readonly IRepository<ReadingQuestionSystem> _readingQuestionSystem;
|
||||
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileSystem;
|
||||
private readonly IGeneralCalculateService _generalCalculateService;
|
||||
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||
|
||||
private readonly ITrialEmailNoticeConfigService _trialEmailNoticeConfigService;
|
||||
|
|
@ -88,6 +94,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<TrialDocument> trialDocumentRepository,
|
||||
IRepository<User> userRepository,
|
||||
IEasyCachingProvider provider,
|
||||
ILuganoCalculateService luganoCalculateService,
|
||||
IRepository<ReadingCustomTag> readingCustomTagRepository,
|
||||
IRepository<ReadingTaskQuestionMark> readingTaskQuestionMarkRepository,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
|
|
@ -102,6 +109,8 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<ReadingQuestionSystem> ReadingQuestionSystem,
|
||||
ITrialEmailNoticeConfigService trialEmailNoticeConfigService,
|
||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileSystem,
|
||||
|
||||
IGeneralCalculateService generalCalculateService,
|
||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
||||
)
|
||||
{
|
||||
|
|
@ -126,6 +135,7 @@ namespace IRaCIS.Application.Services
|
|||
this._trialDocumentRepository = trialDocumentRepository;
|
||||
this._userRepository = userRepository;
|
||||
this._provider = provider;
|
||||
this._luganoCalculateService = luganoCalculateService;
|
||||
this._readingCustomTagRepository = readingCustomTagRepository;
|
||||
this._readingTaskQuestionMarkRepository = readingTaskQuestionMarkRepository;
|
||||
this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository;
|
||||
|
|
@ -140,10 +150,68 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
this._readingQuestionSystem = ReadingQuestionSystem;
|
||||
this._noneDicomStudyFileSystem = noneDicomStudyFileSystem;
|
||||
this._generalCalculateService = generalCalculateService;
|
||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||
this._trialEmailNoticeConfigService = trialEmailNoticeConfigService;
|
||||
}
|
||||
|
||||
#region 计算
|
||||
|
||||
/// <summary>
|
||||
/// 获取阅片的计算数据
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<object> GetReadingCalculationData(GetReadingCalculationDataInDto inDto)
|
||||
{
|
||||
return await _readingCalculateService.GetReadingCalculationData(inDto);
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 获取既往病灶的OtherPicture
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetPreviousOtherPicturePathOutDto>> GetPreviousOtherPicturePath(GetPreviousOtherPicturePathInDto inDto)
|
||||
{
|
||||
List<GetPreviousOtherPicturePathOutDto> result = new List<GetPreviousOtherPicturePathOutDto>() { };
|
||||
|
||||
if (inDto.RowId != null)
|
||||
{
|
||||
var rowinfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).FirstNotNullAsync();
|
||||
var taskInfoList = await _generalCalculateService.GetReadingReportTaskList(rowinfo.VisitTaskId);
|
||||
var visitTaskIds = taskInfoList.Where(x => x.VisitTaskId != rowinfo.VisitTaskId).Select(x => x.VisitTaskId).ToList();
|
||||
result = await _readingTableAnswerRowInfoRepository.Where(x => x.QuestionId == rowinfo.QuestionId && x.RowIndex == rowinfo.RowIndex && visitTaskIds.Contains(x.VisitTaskId))
|
||||
|
||||
.OrderBy(x => x.VisitTask.VisitTaskNum).Select(x => new GetPreviousOtherPicturePathOutDto()
|
||||
{
|
||||
VisitTaskId = x.VisitTaskId,
|
||||
PicturePath = x.OtherPicturePath,
|
||||
TaskBlindName = x.VisitTask.TaskBlindName
|
||||
}).ToListAsync();
|
||||
}
|
||||
else if(inDto.VisitTaskId!=null&&inDto.QuestionType!=null)
|
||||
{
|
||||
var taskInfoList = await _generalCalculateService.GetReadingReportTaskList(inDto.VisitTaskId.Value);
|
||||
var visitTaskIds = taskInfoList.Where(x=>x.VisitTaskId!= inDto.VisitTaskId.Value).Select(x => x.VisitTaskId).ToList();
|
||||
result = await _readingTaskQuestionMarkRepository.Where(x => x.ReadingQuestionTrial.QuestionType == inDto.QuestionType && visitTaskIds.Contains(x.VisitTaskId))
|
||||
|
||||
.OrderBy(x => x.VisitTask.VisitTaskNum).Select(x => new GetPreviousOtherPicturePathOutDto()
|
||||
{
|
||||
VisitTaskId = x.VisitTaskId,
|
||||
PicturePath = x.OtherPicturePath,
|
||||
TaskBlindName = x.VisitTask.TaskBlindName
|
||||
}).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
return result.Where(x => x.PicturePath != string.Empty && x.PicturePath != null).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交自定义标记
|
||||
/// </summary>
|
||||
|
|
@ -545,6 +613,21 @@ namespace IRaCIS.Application.Services
|
|||
result = result.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToList();
|
||||
}
|
||||
|
||||
|
||||
var visitaskIds = result.Select(x => x.VisitTaskId).ToList();
|
||||
|
||||
var otherStudys = await _readingTableAnswerRowInfoRepository.Where(x => visitaskIds.Contains(x.VisitTaskId))
|
||||
.Where(x=>x.CTSeriesId!=null&&x.PTSeriesId!=null)
|
||||
.Select(x => new
|
||||
{
|
||||
x.OtherStudyId,
|
||||
x.CTSeriesId,
|
||||
x.PTSeriesId,
|
||||
x.VisitTaskId,
|
||||
x.UpdateTime
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
foreach (var item in result)
|
||||
{
|
||||
var clinicalDataList = await _readingClinicalDataService.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto()
|
||||
|
|
@ -556,6 +639,14 @@ namespace IRaCIS.Application.Services
|
|||
});
|
||||
|
||||
item.IsExistsClinicalData = clinicalDataList.Count > 0;
|
||||
var otherStudy = otherStudys.Where(x => x.VisitTaskId == item.VisitTaskId).OrderByDescending(x => x.UpdateTime).FirstOrDefault();
|
||||
if (otherStudy != null)
|
||||
{
|
||||
item.PTSeriesId = otherStudy.PTSeriesId;
|
||||
item.CTSeriesId = otherStudy.CTSeriesId;
|
||||
item.OtherStudyId = otherStudy.OtherStudyId;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -601,6 +692,8 @@ namespace IRaCIS.Application.Services
|
|||
VisitTaskId = x.Id,
|
||||
TaskBlindName = x.TaskBlindName,
|
||||
TaskName = x.TaskName,
|
||||
VisitName = x.SourceSubjectVisit!=null? x.SourceSubjectVisit.VisitName: x.ReadModule==null?string.Empty: x.ReadModule.SubjectVisit.VisitName,
|
||||
|
||||
VisitTaskNum = x.VisitTaskNum,
|
||||
JudgeResultArm = x.JudgeResultTask == null ? null : x.JudgeResultTask.ArmEnum,
|
||||
|
||||
|
|
@ -1365,6 +1458,8 @@ namespace IRaCIS.Application.Services
|
|||
answers.Add("IsFristAdd", (rowInfo.FristAddTaskId== TaskId).ToString());
|
||||
answers.Add("IsCanEditPosition", rowInfo.IsCanEditPosition.ToString());
|
||||
answers.Add("InstanceId", rowInfo == null ? string.Empty : rowInfo.InstanceId.ToString());
|
||||
answers.Add("PTSeriesId", rowInfo == null ? string.Empty : rowInfo.PTSeriesId.ToString());
|
||||
answers.Add("CTSeriesId", rowInfo == null ? string.Empty : rowInfo.CTSeriesId.ToString());
|
||||
answers.Add("SeriesId", rowInfo == null ? string.Empty : rowInfo.SeriesId.ToString());
|
||||
answers.Add("IsCurrentTaskAdd", rowInfo == null ? false.ToString() : rowInfo.IsCurrentTaskAdd.ToString());
|
||||
answers.Add("SplitOrMergeLesionName", rowInfo == null ? string.Empty : rowInfo.SplitName.IsNullOrEmpty() ? rowInfo.MergeName : rowInfo.SplitName);
|
||||
|
|
@ -1407,8 +1502,9 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
await this.VerifyIsBaseLineTask(inDto.VisitTaskId);
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
var rowAnswer = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).AsNoTracking().FirstNotNullAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == rowAnswer.RowIndex && x.QuestionId == inDto.QuestionId).Include(x => x.ReadingTableQuestionTrial).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == rowAnswer.RowIndex && x.QuestionId == inDto.QuestionId).Include(x => x.ReadingTableQuestionTrial).ProjectTo<TableQuestionAnswerInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
var maxRowIndex = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId && x.RowIndex < Math.Floor(rowAnswer.RowIndex + 1)).OrderByDescending(x => x.RowIndex).Select(x => x.RowIndex).FirstOrDefaultAsync();
|
||||
var newRowIndex = maxRowIndex + (decimal)0.01;
|
||||
|
||||
|
|
@ -1426,11 +1522,12 @@ namespace IRaCIS.Application.Services
|
|||
rowAnswer.MeasureData = string.Empty;
|
||||
rowAnswer.OtherMeasureData =null;
|
||||
|
||||
List<QuestionMark?> needRemoveMark = new List<QuestionMark?>()
|
||||
List<QuestionMark?> needSaveMark = new List<QuestionMark?>()
|
||||
{
|
||||
QuestionMark.MajorAxis,
|
||||
QuestionMark.ShortAxis,
|
||||
QuestionMark.State,
|
||||
QuestionMark.Organ,
|
||||
QuestionMark.Location,
|
||||
QuestionMark.Part,
|
||||
QuestionMark.IsLymph,
|
||||
};
|
||||
|
||||
tableAnswers.ForEach(x =>
|
||||
|
|
@ -1439,11 +1536,57 @@ namespace IRaCIS.Application.Services
|
|||
x.RowIndex = newRowIndex;
|
||||
x.VisitTaskId = inDto.VisitTaskId;
|
||||
x.RowId = rowAnswer.Id;
|
||||
x.Answer = needRemoveMark.Contains(x.ReadingTableQuestionTrial.QuestionMark) ? string.Empty : x.Answer;
|
||||
x.ReadingTableQuestionTrial = null;
|
||||
x.Answer = needSaveMark.Contains(x.QuestionMark) ? x.Answer : string.Empty;
|
||||
});
|
||||
|
||||
switch (taskInfo.TrialReadingCriterion.CriterionType)
|
||||
{
|
||||
case CriterionType.Lugano2014:
|
||||
|
||||
List<QuestionMark?> needSetNa = new List<QuestionMark?>()
|
||||
{
|
||||
QuestionMark.LowPPDAddPercent,
|
||||
QuestionMark.NadirPPD,
|
||||
/// <summary>
|
||||
/// PPD最低点所在访视
|
||||
/// </summary>
|
||||
QuestionMark.LowPPDVisit ,
|
||||
|
||||
/// <summary>
|
||||
/// PPD最低点LDi
|
||||
/// </summary>
|
||||
QuestionMark.LowPPDLDi,
|
||||
|
||||
/// <summary>
|
||||
/// PPD最低点SDi
|
||||
/// </summary>
|
||||
QuestionMark.LowPPDSDi,
|
||||
|
||||
/// <summary>
|
||||
/// 相比最低点PPD增加百分比
|
||||
/// </summary>
|
||||
QuestionMark.LowPPDAddPercent,
|
||||
|
||||
/// <summary>
|
||||
/// 相比PPD最低点LDi增加值
|
||||
/// </summary>
|
||||
QuestionMark.LowPPDLDiAdded,
|
||||
|
||||
/// <summary>
|
||||
/// 相比PPD最低点SDi增加值
|
||||
/// </summary>
|
||||
QuestionMark.LowPPDSDiAdded,
|
||||
|
||||
|
||||
};
|
||||
tableAnswers.ForEach(x =>
|
||||
{
|
||||
x.Answer = needSetNa.Contains(x.QuestionMark) ?"NA" :x.Answer;
|
||||
});
|
||||
break;
|
||||
}
|
||||
await _readingTableAnswerRowInfoRepository.AddAsync(rowAnswer);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(_mapper.Map<List<ReadingTableQuestionAnswer>>(tableAnswers));
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.RowId, x => new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
SplitOrMergeType = SplitOrMergeType.SplitMain
|
||||
|
|
@ -1454,64 +1597,131 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 合并病灶
|
||||
/// 合并病灶 融合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task MergeLesion(MergeLesionInDto inDto)
|
||||
{
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
await this.VerifyIsBaseLineTask(inDto.VisitTaskId);
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
var mergeRow = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.MergeMainRowId).Include(x => x.ReadingQuestionTrial).FirstNotNullAsync();
|
||||
|
||||
var rowsInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Id == inDto.MainRowId || x.Id == inDto.MergeRowId)).ToListAsync();
|
||||
var mark = mergeRow.ReadingQuestionTrial.OrderMark + mergeRow.RowIndex.GetLesionMark();
|
||||
|
||||
if (rowsInfo.Count != 2)
|
||||
await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => inDto.MergeRowIdList.Contains(x.RowId) && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State, x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_NotaTask"]);
|
||||
}
|
||||
|
||||
|
||||
var minaid = rowsInfo.Where(x => x.Id == inDto.MainRowId).Select(x => x.Id).FirstOrDefault();
|
||||
var mergeid = rowsInfo.Where(x => x.Id == inDto.MergeRowId).Select(x => x.Id).FirstOrDefault();
|
||||
|
||||
List<QuestionMark?> needRemoveMark = new List<QuestionMark?>()
|
||||
{
|
||||
QuestionMark.MajorAxis,
|
||||
QuestionMark.ShortAxis,
|
||||
};
|
||||
|
||||
var mainAnswer = await _readingTableQuestionAnswerRepository.Where(x => x.RowId == minaid).Include(x => x.ReadingTableQuestionTrial).ToListAsync();
|
||||
|
||||
foreach (var item in mainAnswer)
|
||||
{
|
||||
await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.RowId == mergeid && x.TableQuestionId == item.TableQuestionId, x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = needRemoveMark.Contains(item.ReadingTableQuestionTrial.QuestionMark) ? string.Empty : item.Answer,
|
||||
Answer = TargetState.Loss.GetEnumInt(),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(mergeid, x => new ReadingTableAnswerRowInfo()
|
||||
await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => inDto.MergeRowIdList.Contains(x.RowId) &&( x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.MajorAxis || x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.ShortAxis), x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
MergeRowId = minaid,
|
||||
Answer = "0",
|
||||
});
|
||||
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x=> inDto.MergeRowIdList.Contains(x.Id), x => new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
MergeRowId=inDto.MergeMainRowId,
|
||||
SplitOrMergeType = SplitOrMergeType.Merge,
|
||||
}) ;
|
||||
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(mergeid, x => new ReadingTableAnswerRowInfo()
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(inDto.MergeMainRowId, x => new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
MergeRowId = minaid,
|
||||
SplitOrMergeType = SplitOrMergeType.Merge,
|
||||
SplitOrMergeType = SplitOrMergeType.MergeMain,
|
||||
});
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||
|
||||
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
||||
{
|
||||
IsChangeOtherTask = false,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
ComputationTrigger = ComputationTrigger.MergeLesion,
|
||||
});
|
||||
|
||||
// 保存完了计算疾病进展
|
||||
switch (taskinfo.TrialReadingCriterion.CriterionType)
|
||||
{
|
||||
case CriterionType.Lugano2014:
|
||||
await _luganoCalculateService.CalculateMergeTargetLesionStatus(new CalculateTargetLesionStatusInDto()
|
||||
{
|
||||
QuestionId = inDto.QuestionId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowNumber = mergeRow.RowIndex,
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取可合并的病灶
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetCanMergeLesionOutDto>> GetCanMergeLesion(GetCanMergeLesionInDto inDto)
|
||||
{
|
||||
var rowinfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).Include(x=>x.ReadingQuestionTrial).FirstNotNullAsync();
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == rowinfo.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
// 需要排除的状态
|
||||
var needFilterState = new List<string>();
|
||||
|
||||
var query = _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == rowinfo.VisitTaskId && x.QuestionId == rowinfo.QuestionId && x.Id != rowinfo.Id)
|
||||
.Where(x => x.SplitOrMergeType != SplitOrMergeType.Split && x.SplitOrMergeType != SplitOrMergeType.SplitMain
|
||||
&&x.SplitOrMergeType!=SplitOrMergeType.Merge && x.SplitOrMergeType != SplitOrMergeType.MergeMain
|
||||
&& x.SplitOrMergeType != SplitOrMergeType.Merged);
|
||||
|
||||
switch (taskInfo.TrialReadingCriterion.CriterionType)
|
||||
{
|
||||
|
||||
case CriterionType.Lugano2014:
|
||||
// (无法评估 或者 状态为消失的非靶病灶) 并且不能是无法评估的病灶
|
||||
query = query.Where(x =>
|
||||
(x.MeasureData == string.Empty ||
|
||||
(x.LesionAnswerList.Any(y => y.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && y.Answer == TargetState.Loss.GetEnumInt()) &&
|
||||
x.LesionAnswerList.Any(y => y.ReadingTableQuestionTrial.QuestionMark == QuestionMark.IsLymph && y.Answer == ReadingYesOrNo.No.GetEnumInt())
|
||||
)) && !x.LesionAnswerList.Any(y => y.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && y.Answer == TargetState.UnableEvaluate.GetEnumInt())
|
||||
|
||||
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
var result = await query
|
||||
.Select(x => new GetCanMergeLesionOutDto()
|
||||
{
|
||||
RowId = x.Id,
|
||||
RowIndex = x.RowIndex,
|
||||
OrderMarkName = x.ReadingQuestionTrial.OrderMark + x.RowIndex.GetLesionMark(),
|
||||
OrganInfoId = x.OrganInfoId
|
||||
}).OrderBy(x=>x.RowIndex).ToListAsync();
|
||||
|
||||
var organIds = result.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync();
|
||||
|
||||
result.ForEach(x =>
|
||||
{
|
||||
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
x.Part = organList.Where(y => y.Id == x.OrganInfoId).Select(y => y.PartEN).FirstIsNullReturnEmpty();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
x.Part = organList.Where(y => y.Id == x.OrganInfoId).Select(y => y.Part).FirstIsNullReturnEmpty();
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
@ -1524,6 +1734,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> SaveImageQuality(ChangeDicomReadingQuestionAnswerInDto inDto)
|
||||
{
|
||||
|
|
@ -1531,6 +1742,40 @@ namespace IRaCIS.Application.Services
|
|||
return await ChangeDicomReadingQuestionAnswer(inDto);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存任务问题 带动态稽查参数
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <param name="param">请求类型</param>
|
||||
/// <returns></returns>
|
||||
[Route("/SaveTaskQuestion/{param}")]
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SaveTaskQuestion(ChangeDicomReadingQuestionAnswerInDto inDto, string param)
|
||||
{
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
try
|
||||
{
|
||||
param = param == string.Empty ? "0" : param;
|
||||
|
||||
inDto.ComputationTrigger = (ComputationTrigger)int.Parse(param);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
}
|
||||
var result = await this.SaveImageQuality(inDto);
|
||||
|
||||
// 自动计算
|
||||
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
||||
{
|
||||
IsChangeOtherTask = false,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
ComputationTrigger = inDto.ComputationTrigger,
|
||||
});
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 保存ECRF
|
||||
///// </summary>
|
||||
|
|
@ -1613,7 +1858,29 @@ namespace IRaCIS.Application.Services
|
|||
}).ToListAsync();
|
||||
|
||||
var markquestionId = inDto.QuestionMarkInfoList.Select(y => y.QuestionId).ToList();
|
||||
|
||||
var needDeleteMarkQuestonIds = inDto.Answers.Where(x => x.Answer == string.Empty).Select(x => x.Id).ToList();
|
||||
|
||||
|
||||
await _readingTaskQuestionMarkRepository.BatchUpdateNoTrackingAsync(x =>
|
||||
(x.QuestionType == QuestionType.SplenicTopPosition || x.QuestionType == QuestionType.SplenicBottomPosition) &&
|
||||
x.VisitTaskId == inDto.VisitTaskId && needDeleteMarkQuestonIds.Contains(x.QuestionId), x => new ReadingTaskQuestionMark()
|
||||
{
|
||||
PicturePath = string.Empty,
|
||||
MeasureData = string.Empty,
|
||||
}) ;
|
||||
|
||||
await _readingTaskQuestionMarkRepository.BatchUpdateNoTrackingAsync(x =>
|
||||
(x.QuestionType == QuestionType.LiverSUVmax || x.QuestionType == QuestionType.MediastinumSUVmax) &&
|
||||
x.VisitTaskId == inDto.VisitTaskId && needDeleteMarkQuestonIds.Contains(x.QuestionId), x => new ReadingTaskQuestionMark()
|
||||
{
|
||||
OtherPicturePath = string.Empty,
|
||||
OtherMeasureData=string.Empty,
|
||||
});
|
||||
|
||||
|
||||
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && markquestionId.Contains(x.QuestionId));
|
||||
|
||||
var datetime = DateTime.Now;
|
||||
|
||||
var markList = _mapper.Map<List<QuestionMarkInfo>, List<ReadingTaskQuestionMark>>(inDto.QuestionMarkInfoList);
|
||||
|
|
@ -1647,7 +1914,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
|
||||
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
||||
var deleteRowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).FirstOrDefaultAsync();
|
||||
|
||||
|
|
@ -1666,11 +1933,20 @@ namespace IRaCIS.Application.Services
|
|||
var index = await _readingCalculateService.GetDeleteLesionStatrIndex(inDto);
|
||||
|
||||
|
||||
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.RowId == inDto.RowId, x => new ReadingTableQuestionAnswer()
|
||||
await _readingTableQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.RowId == inDto.RowId, x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
|
||||
IsDeleted = true
|
||||
});
|
||||
if (!(await _readingTableAnswerRowInfoRepository.AnyAsync(x => x.SplitRowId == deleteRowInfo.SplitRowId && x.Id != deleteRowInfo.Id)))
|
||||
{
|
||||
await _readingTableAnswerRowInfoRepository.BatchUpdateNoTrackingAsync(x => x.Id == deleteRowInfo.SplitRowId, x => new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
SplitOrMergeType = null,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.RowId, x => new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
|
||||
|
|
@ -1792,14 +2068,30 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
IsChangeOtherTask = false,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
ComputationTrigger=ComputationTrigger.Lesion,
|
||||
ComputationTrigger=ComputationTrigger.RemoveLesion,
|
||||
});
|
||||
|
||||
|
||||
switch (taskinfo.TrialReadingCriterion.CriterionType)
|
||||
{
|
||||
case CriterionType.Lugano2014:
|
||||
if (deleteRowInfo.RowIndex % 1 != 0)
|
||||
{
|
||||
await _luganoCalculateService.CalculateTargetLesionStatus(new CalculateTargetLesionStatusInDto()
|
||||
{
|
||||
QuestionId = inDto.QuestionId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowNumber = deleteRowInfo.RowIndex
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 提交表格问题答案 提交病灶
|
||||
/// 提交表格问题答案 提交病灶 保存病灶
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
|
|
@ -1808,9 +2100,7 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<SubmitTableQuestionOutDto> SubmitTableQuestion(SubmitTableQuestionInDto inDto)
|
||||
{
|
||||
SubmitTableQuestionOutDto result = new SubmitTableQuestionOutDto();
|
||||
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
|
||||
if (inDto.InstanceId != null && inDto.IsDicomReading)
|
||||
{
|
||||
if (!(await _dicomInstanceRepository.AnyAsync(x => x.Id == inDto.InstanceId && x.SeriesId == inDto.SeriesId)))
|
||||
|
|
@ -1818,7 +2108,7 @@ namespace IRaCIS.Application.Services
|
|||
throw new BusinessValidationFailedException(_localizer["ReadingImage_Idnotcorrespond"]);
|
||||
}
|
||||
}
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).Include(x => x.SourceSubjectVisit).FirstNotNullAsync();
|
||||
inDto.BlindName = taskinfo.TaskBlindName;
|
||||
switch (taskinfo.TrialReadingCriterion.CriterionType)
|
||||
{
|
||||
|
|
@ -1949,7 +2239,7 @@ namespace IRaCIS.Application.Services
|
|||
var targetlymphQuestion = targetTablequestionList.Where(x => x.QuestionMark == QuestionMark.IsLymph).FirstOrDefault();
|
||||
|
||||
// 判断是否存在淋巴结问题
|
||||
if (targetlymphQuestion != null)
|
||||
if (targetlymphQuestion != null && taskinfo.SourceSubjectVisit.VisitNum == 0)
|
||||
{
|
||||
// 判断是否为淋巴结
|
||||
if (inDto.QuestionId == targetTablequestionList[0].ReadingQuestionId && inDto.AnswerList.Any(x => x.TableQuestionId == targetlymphQuestion.Id && x.Answer.EqEnum(ReadingYesOrNo.No)))
|
||||
|
|
@ -1968,24 +2258,20 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
break;
|
||||
}
|
||||
|
||||
var questionInfo = await _readingQuestionTrialRepository.Where(x => x.Id == inDto.QuestionId).FirstNotNullAsync();
|
||||
var criterionId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == criterionId).FirstNotNullAsync();
|
||||
var tableQuestionIds = inDto.AnswerList.Select(x => x.TableQuestionId).ToList();
|
||||
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.RowId == inDto.RowId).ToListAsync();
|
||||
|
||||
var tableQuestionIdGroup = tableQuestionIds.GroupBy(x => new { TableQuestionId = x }).Select(x => new TableQuestionData
|
||||
{
|
||||
TableQuestionId = x.Key.TableQuestionId,
|
||||
Count = x.Count()
|
||||
}).ToList();
|
||||
|
||||
if (tableQuestionIdGroup.Any(x => x.Count > 1))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_Twice"]);
|
||||
}
|
||||
|
||||
if (inDto.RowIndex % 1 == 0)
|
||||
{
|
||||
|
||||
|
|
@ -2105,15 +2391,11 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
isCurrentTaskAdd = isCurrentTaskAddList[0];
|
||||
}
|
||||
|
||||
|
||||
ReadingTableAnswerRowInfo? rowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == (inDto.RowId ?? default(Guid))).IgnoreAutoIncludes().FirstOrDefaultAsync();
|
||||
|
||||
rowInfo = rowInfo == null ? new ReadingTableAnswerRowInfo() : rowInfo;
|
||||
|
||||
//await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.RowId == (inDto.RowId ?? default(Guid)));
|
||||
//await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.Id == (inDto.RowId ?? default(Guid)));
|
||||
|
||||
_mapper.Map(inDto, rowInfo);
|
||||
rowInfo.Id = inDto.RowId == null ? NewId.NextGuid() : inDto.RowId.Value;
|
||||
result.RowId = rowInfo.Id;
|
||||
|
|
@ -2145,7 +2427,6 @@ namespace IRaCIS.Application.Services
|
|||
await _readingTableQuestionAnswerRepository.AddRangeAsync(answerList);
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
await _readingTableAnswerRowInfoRepository.UpdateFromDTOAsync(inDto) ;
|
||||
|
|
@ -2180,17 +2461,29 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
}
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.SaveChangesAsync();
|
||||
await this._readingCalculateService.CalculateTask(new CalculateTaskInDto()
|
||||
{
|
||||
IsChangeOtherTask = false,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
ComputationTrigger = ComputationTrigger.Lesion,
|
||||
ComputationTrigger = inDto.ComputationTrigger,
|
||||
});
|
||||
|
||||
|
||||
|
||||
// 保存完了计算疾病进展
|
||||
switch (taskinfo.TrialReadingCriterion.CriterionType)
|
||||
{
|
||||
case CriterionType.Lugano2014:
|
||||
if (inDto.RowIndex % 1 != 0)
|
||||
{
|
||||
await _luganoCalculateService.CalculateTargetLesionStatus(new CalculateTargetLesionStatusInDto()
|
||||
{
|
||||
QuestionId = inDto.QuestionId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowNumber = inDto.RowIndex
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
@ -2457,7 +2750,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
if (currentSubject == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"]);
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||
}
|
||||
|
||||
task = currentSubject.UnReadCanReadTaskList.Select(x => new GetReadingTaskDto()
|
||||
|
|
@ -2484,7 +2777,7 @@ namespace IRaCIS.Application.Services
|
|||
var count = await query.CountAsync();
|
||||
if (count == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"]);
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||
}
|
||||
Random random = new Random();
|
||||
var skipcount = 0;
|
||||
|
|
@ -2510,7 +2803,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
if (task == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"]);
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingImage_TaskFinish"], ApiResponseCodeEnum.CloseCurrentWindows);
|
||||
}
|
||||
|
||||
if (task.SubjectCode.IsNullOrEmpty())
|
||||
|
|
@ -2906,7 +3199,7 @@ namespace IRaCIS.Application.Services
|
|||
typeChangeDic.Add(ModuleTypeEnum.Referee, ReadingCategory.Judge);
|
||||
typeChangeDic.Add(ModuleTypeEnum.Oncology, ReadingCategory.Oncology);
|
||||
#endregion
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
List<ReadingGenerataTaskDTO> needReadList = new List<ReadingGenerataTaskDTO>();
|
||||
if (!taskInfo.IsAnalysisCreate)
|
||||
{
|
||||
|
|
@ -2916,8 +3209,7 @@ namespace IRaCIS.Application.Services
|
|||
case ReadingCategory.Visit:
|
||||
needReadList = await _readModuleRepository.Where(x => x.SubjectVisitId == taskInfo.SourceSubjectVisitId &&
|
||||
|
||||
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
||||
x.ReadingSetType == ReadingSetType.ImageReading)
|
||||
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId )
|
||||
.Select(x => new ReadingGenerataTaskDTO
|
||||
{
|
||||
IsUrgent = x.IsUrgent ?? false,
|
||||
|
|
@ -2927,11 +3219,12 @@ namespace IRaCIS.Application.Services
|
|||
ReadModuleId = x.Id,
|
||||
ReadingCategory = typeChangeDic[x.ModuleType],
|
||||
}).ToListAsync();
|
||||
if (needReadList.Any(x => x.ReadingCategory == ReadingCategory.Global))
|
||||
|
||||
|
||||
|
||||
if (needReadList.Any(x => x.ReadingCategory == ReadingCategory.Global)&& taskInfo.TrialReadingCriterion.IsGlobalReading)
|
||||
{
|
||||
needReadList = needReadList.Where(x => x.ReadingCategory != ReadingCategory.Oncology).ToList();
|
||||
}
|
||||
//needReadList = needReadList.Where(x => _visitTaskRepository.Where(y => y.SouceReadModuleId == x.ReadModuleId).Count() == 0).ToList();
|
||||
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
||||
{
|
||||
OriginalVisitId = visitTaskId,
|
||||
|
|
@ -2940,6 +3233,17 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
ReadingGenerataTaskList = needReadList
|
||||
});
|
||||
}
|
||||
else if (needReadList.Any(x => x.ReadingCategory == ReadingCategory.Oncology))
|
||||
{
|
||||
// 添加肿瘤学
|
||||
if (await _visitTaskRepository.AnyAsync(x => x.Id == visitTaskId && x.JudgeVisitTaskId == null))
|
||||
{
|
||||
await AddOncologyTask(needReadList.Where(x=> x.ReadingCategory == ReadingCategory.Oncology).First().ReadModuleId);
|
||||
}
|
||||
}
|
||||
//needReadList = needReadList.Where(x => _visitTaskRepository.Where(y => y.SouceReadModuleId == x.ReadModuleId).Count() == 0).ToList();
|
||||
|
||||
break;
|
||||
// 肿瘤学
|
||||
case ReadingCategory.Global:
|
||||
|
|
|
|||
|
|
@ -426,10 +426,22 @@ namespace IRaCIS.Application.Services
|
|||
SignTime = DateTime.Now,
|
||||
JudgeResultImagePath = string.Join(',', inDto.JudgeResultImagePathList),
|
||||
});
|
||||
await _visitTaskRepository.SaveChangesAsync();
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
|
||||
// 需要判断是否添加肿瘤学任务
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
if (taskInfo.ReadingCategory == ReadingCategory.Global)
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
||||
if (taskInfo.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
var oncologModule = await _readModuleRepository
|
||||
.Where(x => x.SubjectVisitId == taskInfo.SourceSubjectVisitId &&x.TrialReadingCriterionId==taskInfo.TrialReadingCriterionId&& x.ModuleType == ModuleTypeEnum.Oncology).FirstOrDefaultAsync();
|
||||
if (!taskInfo.TrialReadingCriterion.IsGlobalReading&&oncologModule != null)
|
||||
{
|
||||
await AddOncologyTask(oncologModule.Id);
|
||||
}
|
||||
}
|
||||
|
||||
else if (taskInfo.ReadingCategory == ReadingCategory.Global)
|
||||
{
|
||||
if (taskInfo.SouceReadModuleId == null)
|
||||
{
|
||||
|
|
@ -438,16 +450,19 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
var visitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
||||
|
||||
var oncologModuleId = await _readModuleRepository.Where(x => x.SubjectVisitId == visitId && x.ModuleType == ModuleTypeEnum.Oncology
|
||||
var oncologModule = await _readModuleRepository.Where(x => x.SubjectVisitId == visitId && x.ModuleType == ModuleTypeEnum.Oncology
|
||||
&&x.TrialReadingCriterionId== taskInfo.TrialReadingCriterionId
|
||||
).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
).FirstOrDefaultAsync();
|
||||
|
||||
await AddOncologyTask(oncologModuleId);
|
||||
if (oncologModule != null)
|
||||
{
|
||||
await AddOncologyTask(oncologModule.Id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
|
||||
// 创建任务关联关系
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using Newtonsoft.Json;
|
|||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
|
@ -31,7 +32,7 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<GetOncologyReadingInfoOutDto> GetOncologyReadingInfo(GetOncologyReadingInfoInDto inDto)
|
||||
{
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x=>x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
||||
if (taskInfo.ReadingCategory != ReadingCategory.Oncology)
|
||||
{
|
||||
|
|
@ -45,14 +46,14 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
//TrialEvaluationResult = trialCriterion.EvaluationResult,
|
||||
IsShowDetail = trialCriterion.IsShowDetail,
|
||||
TrialEvaluationReason = trialCriterion.EvaluationReason.IsNullOrEmpty() ? ReadingCommon.EvaluationReason : trialCriterion.EvaluationReason,
|
||||
TrialEvaluationReason = trialCriterion.EvaluationReason,
|
||||
OncologyTaskId = inDto.VisitTaskId,
|
||||
ReadingTaskState = taskInfo.ReadingTaskState,
|
||||
};
|
||||
|
||||
// 先找到是R1还是R2的阅片 先找到全局阅片
|
||||
|
||||
VisitTask? globalTaskInfo = null;
|
||||
VisitTask? globalOrVisitTaskInfo = null;
|
||||
var relatedVisitTaskIdList = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
Guid? judgeResultTaskId = null;
|
||||
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned && relatedVisitTaskIdList.Count() > 0)
|
||||
|
|
@ -62,30 +63,39 @@ namespace IRaCIS.Application.Services
|
|||
// 说明是裁判 取裁判结果
|
||||
if (judgeResultTaskId != null)
|
||||
{
|
||||
globalTaskInfo = await _visitTaskRepository.Where(x =>x.Id== judgeResultTaskId).FirstNotNullAsync();
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository.Where(x =>x.Id== judgeResultTaskId).FirstNotNullAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
globalTaskInfo = await _visitTaskRepository.Where(x => x.Id == relatedVisitTaskIdList[0]).FirstNotNullAsync();
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository.Where(x => x.Id == relatedVisitTaskIdList[0]).FirstNotNullAsync();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var taskNums = new List<decimal>() {
|
||||
// 全局
|
||||
(decimal) (taskInfo.VisitTaskNum - ReadingCommon.TaskNumDic[ReadingCategory.Oncology] + ReadingCommon.TaskNumDic[ReadingCategory.Global]),
|
||||
|
||||
var taskNum = taskInfo.VisitTaskNum - ReadingCommon.TaskNumDic[ReadingCategory.Oncology] + ReadingCommon.TaskNumDic[ReadingCategory.Global];
|
||||
// 访视
|
||||
(decimal)(taskInfo.VisitTaskNum - ReadingCommon.TaskNumDic[ReadingCategory.Oncology])
|
||||
};
|
||||
|
||||
globalTaskInfo = await _visitTaskRepository
|
||||
|
||||
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository
|
||||
.Where(x => x.SubjectId == taskInfo.SubjectId &&
|
||||
x.TaskState == TaskState.Effect &&
|
||||
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
||||
x.VisitTaskNum== taskNum &&
|
||||
x.ReadingCategory == ReadingCategory.Global &&
|
||||
taskNums.Contains(x.VisitTaskNum) &&
|
||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
||||
x.IsSelfAnalysis == taskInfo.IsSelfAnalysis &&
|
||||
x.VisitTaskNum < taskInfo.VisitTaskNum
|
||||
).OrderByDescending(x=>x.VisitTaskNum).ThenBy(x => x.ArmEnum)
|
||||
)
|
||||
.WhereIf(taskInfo.TrialReadingCriterion.IsGlobalReading, x=>x.ReadingCategory == ReadingCategory.Global)
|
||||
.WhereIf(!taskInfo.TrialReadingCriterion.IsGlobalReading, x => x.ReadingCategory == ReadingCategory.Visit)
|
||||
.OrderByDescending(x=>x.VisitTaskNum).ThenBy(x => x.ArmEnum)
|
||||
.FirstNotNullAsync();
|
||||
}
|
||||
|
||||
|
|
@ -93,44 +103,113 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
// 最后取哪组的数据
|
||||
VisitTask visitTask = new VisitTask();
|
||||
//VisitTask visitTask = new VisitTask();
|
||||
|
||||
List<Guid> visitTaskIdList = new List<Guid>();
|
||||
|
||||
// 判断是否产生裁判
|
||||
|
||||
if (globalTaskInfo!.JudgeVisitTaskId == null)
|
||||
if (globalOrVisitTaskInfo!.JudgeVisitTaskId == null)
|
||||
{
|
||||
visitTask = globalTaskInfo;
|
||||
//visitTask = globalTaskInfo;
|
||||
// 全局的关联访视
|
||||
visitTaskIdList = await _visitTaskRepository.Where(x => x.Id == visitTask.Id).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
visitTaskIdList = await _visitTaskRepository.Where(x => x.Id == globalOrVisitTaskInfo.Id).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (judgeResultTaskId == null)
|
||||
{
|
||||
judgeResultTaskId = await _visitTaskRepository.Where(x => x.Id == globalTaskInfo.JudgeVisitTaskId).Select(x => x.JudgeResultTaskId).FirstOrDefaultAsync();
|
||||
judgeResultTaskId = await _visitTaskRepository.Where(x => x.Id == globalOrVisitTaskInfo.JudgeVisitTaskId).Select(x => x.JudgeResultTaskId).FirstOrDefaultAsync();
|
||||
if (judgeResultTaskId == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingOncology_Abnormal"]);
|
||||
}
|
||||
}
|
||||
|
||||
visitTask = await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).FirstNotNullAsync();
|
||||
//visitTask = await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).FirstNotNullAsync();
|
||||
visitTaskIdList= await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).Select(x=>x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).FirstNotNullAsync();
|
||||
|
||||
}
|
||||
|
||||
result.RelatedTaskId = globalTaskInfo!.JudgeVisitTaskId ?? globalTaskInfo.Id;
|
||||
result.GlobalTaskId = visitTask.Id;
|
||||
result.SubjectId = visitTask.SubjectId;
|
||||
|
||||
// 获取全局阅片信息
|
||||
var globalTaskReadingInfo = await this.GetGlobalReadingInfo(new GetGlobalReadingInfoInDto()
|
||||
|
||||
result.RelatedTaskId = globalOrVisitTaskInfo!.JudgeVisitTaskId ?? globalOrVisitTaskInfo.Id;
|
||||
result.ReadingCategory = globalOrVisitTaskInfo.ReadingCategory;
|
||||
|
||||
result.GlobalOrVisitTaskId = globalOrVisitTaskInfo.Id;
|
||||
result.SubjectId = globalOrVisitTaskInfo.SubjectId;
|
||||
|
||||
|
||||
List<GlobalVisitInfo> globalVisits=new List<GlobalVisitInfo>();
|
||||
|
||||
if (result.ReadingCategory == ReadingCategory.Global)
|
||||
{
|
||||
globalVisits = (await this.GetGlobalReadingInfo(new GetGlobalReadingInfoInDto()
|
||||
{
|
||||
UsingOriginalData = true,
|
||||
VisitTaskId = visitTask.Id
|
||||
});
|
||||
VisitTaskId = result.GlobalOrVisitTaskId
|
||||
})).TaskList;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// 按照全局那边的查询法
|
||||
globalVisits =await _visitTaskRepository.Where(x =>
|
||||
x.TrialId == globalOrVisitTaskInfo.TrialId &&
|
||||
x.SubjectId == globalOrVisitTaskInfo.SubjectId &&
|
||||
x.ReadingCategory == ReadingCategory.Visit &&
|
||||
x.TrialReadingCriterionId == globalOrVisitTaskInfo.TrialReadingCriterionId &&
|
||||
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
||||
x.IsAnalysisCreate == globalOrVisitTaskInfo.IsAnalysisCreate &&
|
||||
x.ArmEnum == globalOrVisitTaskInfo.ArmEnum &&
|
||||
x.IsSelfAnalysis == globalOrVisitTaskInfo.IsSelfAnalysis &&
|
||||
x.DoctorUserId == globalOrVisitTaskInfo.DoctorUserId &&
|
||||
x.TaskState == TaskState.Effect &&
|
||||
x.VisitTaskNum <= globalOrVisitTaskInfo.VisitTaskNum)
|
||||
.OrderBy(x => x.VisitTaskNum).Select(x => new GlobalVisitInfo()
|
||||
{
|
||||
VisitName = x.TaskName,
|
||||
BlindName = x.TaskBlindName,
|
||||
VisitTaskId = x.Id,
|
||||
IsConvertedTask = x.IsConvertedTask,
|
||||
IsFirstChangeTask = x.IsConvertedTask && x.BeforeConvertedTaskId != null,
|
||||
ArmEnum = globalOrVisitTaskInfo.ArmEnum,
|
||||
VisitNum = x.SourceSubjectVisit.VisitNum,
|
||||
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
|
||||
VisitId = x.SourceSubjectVisitId!.Value,
|
||||
LesionCountList = x.LesionList.GroupBy(y => y.ReadingQuestionTrial.LesionType).Select(x => new LesionDto
|
||||
{
|
||||
LesionType = x.Key!.Value,
|
||||
Count = x.ToList().Count()
|
||||
}).ToList(),
|
||||
//CrterionDictionaryGroup= x.CrterionDictionaryGroup,
|
||||
AfterQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.GlobalReadingShowType != GlobalReadingShowType.NotShow).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
|
||||
.Select(y => new GlobalQuestionInfo()
|
||||
{
|
||||
|
||||
QuestionId = y.ReadingQuestionTrialId,
|
||||
QuestionName = y.ReadingQuestionTrial.QuestionName.LanguageName(y.ReadingQuestionTrial.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionEnName = y.ReadingQuestionTrial.QuestionEnName,
|
||||
AnswerGroup = y.ReadingQuestionTrial.AnswerGroup,
|
||||
QuestionType = y.ReadingQuestionTrial.QuestionType,
|
||||
LimitEdit = y.ReadingQuestionTrial.LimitEdit,
|
||||
MaxAnswerLength = y.ReadingQuestionTrial.MaxAnswerLength,
|
||||
FileType = y.ReadingQuestionTrial.FileType,
|
||||
QuestionGenre = y.ReadingQuestionTrial.QuestionGenre,
|
||||
DictionaryCode = y.ReadingQuestionTrial.DictionaryCode,
|
||||
GlobalReadingShowType = y.ReadingQuestionTrial.GlobalReadingShowType,
|
||||
AnswerCombination = y.ReadingQuestionTrial.AnswerCombination,
|
||||
JudgeType = y.ReadingQuestionTrial.JudgeType,
|
||||
ShowOrder = y.ReadingQuestionTrial.ShowOrder,
|
||||
Type = y.ReadingQuestionTrial.Type,
|
||||
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
||||
ValueType = y.ReadingQuestionTrial.ValueType,
|
||||
IsJudgeQuestion = y.ReadingQuestionTrial.IsJudgeQuestion,
|
||||
Answer = y.Answer,
|
||||
}).ToList()
|
||||
}).ToListAsync();
|
||||
}
|
||||
|
||||
// 找到对应的访视
|
||||
List<OncologyVisitTaskInfo> oncologyVisits = await _visitTaskRepository.Where(x => visitTaskIdList.Contains(x.Id))
|
||||
|
|
@ -138,6 +217,8 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
VisitName = x.SourceSubjectVisit.VisitName,
|
||||
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
|
||||
VisitNum=x.SourceSubjectVisit.VisitNum,
|
||||
|
||||
VisitTaskId = x.Id,
|
||||
// QuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.IsJudgeQuestion).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
|
||||
//.Select(y => new OncologyQuestion()
|
||||
|
|
@ -148,7 +229,7 @@ namespace IRaCIS.Application.Services
|
|||
//}).ToList()
|
||||
}).ToListAsync();
|
||||
|
||||
var oncologyReadingQuestions = await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == inDto.VisitTaskId).ToListAsync();
|
||||
var oncologyReadingQuestions = await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == inDto.VisitTaskId).Include(x=>x.VisitTask).ToListAsync();
|
||||
// 上一次肿瘤学阅片
|
||||
|
||||
var lastOncologyTask = await _visitTaskRepository.Where(x =>
|
||||
|
|
@ -164,7 +245,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
if (lastOncologyTask != null&& taskInfo.TaskState==TaskState.Effect&&taskInfo.ReadingTaskState!=ReadingTaskState.HaveSigned)
|
||||
{
|
||||
lastOncologyAnswerList= await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == lastOncologyTask.Id).ToListAsync();
|
||||
lastOncologyAnswerList= await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == lastOncologyTask.Id).Include(x => x.VisitTask).ToListAsync();
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -172,7 +253,8 @@ namespace IRaCIS.Application.Services
|
|||
oncologyVisits.ForEach(x =>
|
||||
{
|
||||
var oncologyData = oncologyReadingQuestions.Where(y => y.VisitTaskId == x.VisitTaskId).FirstOrDefault();
|
||||
var lastOncologyData = lastOncologyAnswerList.Where(y => y.VisitTaskId == x.VisitTaskId).FirstOrDefault();
|
||||
/// 根据任务编号匹配 不区分 r1 r2
|
||||
var lastOncologyData = lastOncologyAnswerList.Where(y => y.VisitTask.VisitTaskNum == x.VisitNum).FirstOrDefault();
|
||||
|
||||
var evaluationResult = string.Empty;
|
||||
var evaluationReason = string.Empty;
|
||||
|
|
@ -199,7 +281,7 @@ namespace IRaCIS.Application.Services
|
|||
x.EvaluationResult = evaluationResult;
|
||||
x.EvaluationReason = evaluationReason;
|
||||
|
||||
x.QuestionList = globalTaskReadingInfo.TaskList.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(x => x.GlobalAnswerType == GlobalAnswerType.Question)
|
||||
x.QuestionList = globalVisits.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(x => x.GlobalAnswerType == GlobalAnswerType.Question)
|
||||
.Select(y => new OncologyQuestion
|
||||
{
|
||||
QuestionId = y.QuestionId ?? default(Guid),
|
||||
|
|
@ -208,8 +290,8 @@ namespace IRaCIS.Application.Services
|
|||
DictionaryCode=y.DictionaryCode,
|
||||
Answer = y.Answer
|
||||
}).ToList();
|
||||
x.IsHaveChange = globalTaskReadingInfo.TaskList.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Any(y => y.IsHaveChange);
|
||||
x.VisitRemark = globalTaskReadingInfo.TaskList.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(y => y.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
|
||||
x.IsHaveChange = result.ReadingCategory == ReadingCategory.Visit?false: globalVisits.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Any(y => y.IsHaveChange);
|
||||
x.VisitRemark = result.ReadingCategory == ReadingCategory.Visit ? string.Empty : globalVisits.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(y => y.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -297,17 +379,28 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
|
||||
|
||||
|
||||
// 如果当前是肿瘤学
|
||||
if (readModuleInfo != null)
|
||||
{
|
||||
// 先找到对应的全局阅片模块Id
|
||||
var globalreadModuleId = await _readModuleRepository.Where(x => x.SubjectVisitId == readModuleInfo.SubjectVisitId &&
|
||||
x.TrialReadingCriterionId== readModuleInfo.TrialReadingCriterionId&&
|
||||
x.ModuleType == ModuleTypeEnum.Global).Include(x=>x.SubjectVisit).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
var isGlobalReading = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModuleInfo.TrialReadingCriterionId).Select(x => x.IsGlobalReading).FirstOrDefaultAsync();
|
||||
|
||||
var globalOrVisitTaskId = default(Guid);
|
||||
var globalreadModule = await _readModuleRepository.Where(x => x.SubjectVisitId == readModuleInfo.SubjectVisitId &&
|
||||
x.TrialReadingCriterionId== readModuleInfo.TrialReadingCriterionId&&
|
||||
x.ModuleType == ModuleTypeEnum.Global).Include(x=>x.SubjectVisit).FirstOrDefaultAsync();
|
||||
// 获取系统配置
|
||||
var readingType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModuleInfo.TrialReadingCriterionId).Select(x => x.ReadingType).FirstOrDefaultAsync();
|
||||
if (globalreadModule != null&& isGlobalReading)
|
||||
{
|
||||
// 找到一个全局阅片任务是否有裁判任务
|
||||
|
||||
var judgeVisitTaskId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModuleId && x.TaskState == TaskState.Effect
|
||||
globalOrVisitTaskId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModule.Id && x.TaskState == TaskState.Effect
|
||||
&& x.ReadingCategory == ReadingCategory.Global
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
|
||||
var judgeVisitTaskId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModule.Id && x.TaskState == TaskState.Effect
|
||||
&& x.ReadingCategory == ReadingCategory.Global
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned).Select(x => x.JudgeVisitTaskId).FirstOrDefaultAsync();
|
||||
|
||||
|
|
@ -321,11 +414,10 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
}
|
||||
|
||||
// 获取系统配置
|
||||
var readingType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModuleInfo.TrialReadingCriterionId).Select(x => x.ReadingType).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
// 判断阅片是否完成
|
||||
if (judgeVisitTaskId == null && (await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModuleId && x.TaskState == TaskState.Effect && x.ReadingCategory == ReadingCategory.Global
|
||||
if (judgeVisitTaskId == null && (await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModule.Id && x.TaskState == TaskState.Effect && x.ReadingCategory == ReadingCategory.Global
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && !x.IsAnalysisCreate && x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId
|
||||
).CountAsync() == (int)readingType))
|
||||
{
|
||||
|
|
@ -336,6 +428,44 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
finishReading = true;
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
var visitTask = await _visitTaskRepository.Where(x => x.SourceSubjectVisitId == readModuleInfo.SubjectVisitId && x.TaskState == TaskState.Effect
|
||||
&& x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId
|
||||
&& x.ReadingCategory==ReadingCategory.Visit
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned).FirstNotNullAsync();
|
||||
|
||||
globalOrVisitTaskId = visitTask.Id;
|
||||
|
||||
var judgeVisitTaskId = visitTask.JudgeVisitTaskId;
|
||||
|
||||
// 要判断是否为老裁判任务的Id
|
||||
if (judgeVisitTaskId != null)
|
||||
{
|
||||
// 如果不存在有效的裁判
|
||||
if (!(await _visitTaskRepository.AnyAsync(x => x.Id == judgeVisitTaskId && x.TaskState == TaskState.Effect)))
|
||||
{
|
||||
judgeVisitTaskId = null;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断阅片是否完成
|
||||
if (judgeVisitTaskId == null && (await _visitTaskRepository.Where(x => x.SourceSubjectVisitId == readModuleInfo.SubjectVisitId && x.TaskState == TaskState.Effect
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && !x.IsAnalysisCreate && x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId
|
||||
).CountAsync() == (int)readingType))
|
||||
{
|
||||
|
||||
finishReading = true;
|
||||
}
|
||||
else if (judgeVisitTaskId != null && (await _visitTaskRepository.AnyAsync(x => x.Id == judgeVisitTaskId.Value && x.JudgeResultTaskId != null && x.ReadingTaskState == ReadingTaskState.HaveSigned)))
|
||||
{
|
||||
finishReading = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (finishReading)
|
||||
{
|
||||
|
|
@ -365,8 +495,7 @@ namespace IRaCIS.Application.Services
|
|||
ReadingCategory = ReadingCategory.Oncology,
|
||||
});
|
||||
|
||||
var originalVisit = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModuleId && x.TaskState == TaskState.Effect && x.ReadingCategory == ReadingCategory.Global
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && !x.IsAnalysisCreate && x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId
|
||||
var originalVisit = await _visitTaskRepository.Where(x =>x.Id==globalOrVisitTaskId
|
||||
).OrderByDescending(x => x.VisitTaskNum).ThenBy(x => x.ArmEnum).FirstNotNullAsync();
|
||||
|
||||
var originalVisitId = default(Guid);
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
//qusetionList = qusetionList.Where(x => x.ParentId == null).ToList();
|
||||
|
||||
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
|
||||
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group ).ToList();
|
||||
groupList.ForEach(x =>
|
||||
{
|
||||
this.FindSystemChildQuestion(x, qusetionList, tableQuestionList);
|
||||
|
|
@ -308,7 +308,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="tableQuestions"></param>
|
||||
public void FindSystemChildQuestion(GetSystemReadingQuestionOutDto item, List<GetSystemReadingQuestionOutDto> questionlists, List<TableQuestionDataInfo> tableQuestions)
|
||||
{
|
||||
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupName == item.GroupName)).ToList();
|
||||
item.Childrens = questionlists.Where(x => x.ParentId == item.Id || (item.Type == ReadingQestionType.Group && x.Type != ReadingQestionType.Group && x.ParentId == null && x.GroupId == item.Id)).ToList();
|
||||
|
||||
item.Childrens.AddRange(tableQuestions.Where(x => x.ReadingQuestionId == item.Id).Select(x => new GetSystemReadingQuestionOutDto
|
||||
{
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue