Compare commits
268 Commits
Test_IRC_N
...
Uat_IRC_Ne
| Author | SHA1 | Date |
|---|---|---|
|
|
6114801959 | |
|
|
0980db438f | |
|
|
85bb7bf306 | |
|
|
58e23d818a | |
|
|
65ae1221b5 | |
|
|
ea84a477fe | |
|
|
c8734dcccc | |
|
|
d42d75edf3 | |
|
|
43019868a1 | |
|
|
da8b086673 | |
|
|
4a67f28ce7 | |
|
|
a9f2f506d3 | |
|
|
8defcae83f | |
|
|
5985e89954 | |
|
|
33aab4e92a | |
|
|
46c1d8a246 | |
|
|
a3249248a8 | |
|
|
0a8813343c | |
|
|
d8aeaedf53 | |
|
|
67fb95555f | |
|
|
cc4475bb18 | |
|
|
1e10f4697c | |
|
|
9168af852b | |
|
|
ae0c7db1f0 | |
|
|
863a7baa29 | |
|
|
5c86460fc1 | |
|
|
dcfb523b87 | |
|
|
9268aa5bc4 | |
|
|
d24d70365d | |
|
|
30b039aaf7 | |
|
|
f73db8cff0 | |
|
|
7685439398 | |
|
|
ce608b8743 | |
|
|
5d722950ce | |
|
|
afe873800d | |
|
|
16712e7b0c | |
|
|
db204ab001 | |
|
|
809d9da387 | |
|
|
0ef6f57689 | |
|
|
309c19542c | |
|
|
247c9c19fa | |
|
|
af5850edb5 | |
|
|
03ca40ffca | |
|
|
25cf2555d4 | |
|
|
55e5fc3ce4 | |
|
|
ac1eaf51eb | |
|
|
e9a73876b1 | |
|
|
e1b716d20b | |
|
|
62d93b2db4 | |
|
|
8fe84cd2ad | |
|
|
dd1da21738 | |
|
|
7185be2ff2 | |
|
|
c1d0bf8914 | |
|
|
64fec97864 | |
|
|
edd562183d | |
|
|
84bf6d9145 | |
|
|
a065f4533c | |
|
|
52d64682cb | |
|
|
5e0513ebcb | |
|
|
f7525942e7 | |
|
|
3971e65482 | |
|
|
4fde957519 | |
|
|
8faa078afc | |
|
|
7f55877688 | |
|
|
84922152bd | |
|
|
a267c52109 | |
|
|
1cad62fe1b | |
|
|
ac284241b7 | |
|
|
efbcdce768 | |
|
|
00d8be6ff5 | |
|
|
152ee46fd6 | |
|
|
0208ffa8f4 | |
|
|
71b765a28b | |
|
|
e72791b0f8 | |
|
|
77f9275d93 | |
|
|
3ba953ac7e | |
|
|
a627be0234 | |
|
|
5eb49ca378 | |
|
|
04954a4b25 | |
|
|
7d08a3d920 | |
|
|
4328862c92 | |
|
|
58e705716e | |
|
|
d786b3bb61 | |
|
|
905f11625a | |
|
|
24c5b3c91f | |
|
|
ad6f593743 | |
|
|
f0369e15c7 | |
|
|
4b7778ee7f | |
|
|
7f970edd52 | |
|
|
d37ab8ee65 | |
|
|
1570731516 | |
|
|
ed004fe54e | |
|
|
cbca0ac08f | |
|
|
a5b5dfb214 | |
|
|
19cd09439d | |
|
|
18f844601f | |
|
|
ea79bb71fc | |
|
|
01783f9a7f | |
|
|
c9573fc610 | |
|
|
270c4abde4 | |
|
|
07270ee83d | |
|
|
64060c125d | |
|
|
c9b998213b | |
|
|
fe79c77285 | |
|
|
72591ee203 | |
|
|
1d180fa83f | |
|
|
9bf639dac0 | |
|
|
11450a973a | |
|
|
bbb361d0cd | |
|
|
7c9959b9ee | |
|
|
d1fb6314db | |
|
|
4047220d53 | |
|
|
d1b45fa56d | |
|
|
4c2c72fe12 | |
|
|
a0d1a39125 | |
|
|
33618e8dfb | |
|
|
1edc52bd76 | |
|
|
2fa0e9e88e | |
|
|
7f5e9f1bfc | |
|
|
9910fb3c8e | |
|
|
aaf8fd62e0 | |
|
|
5df54fd75d | |
|
|
ad00478511 | |
|
|
cd3508da21 | |
|
|
e7a116f228 | |
|
|
82c0d2bcb4 | |
|
|
afba3b073c | |
|
|
4e37c2d53e | |
|
|
c03c739ba0 | |
|
|
65137e585c | |
|
|
e0111a2419 | |
|
|
73b7aae6c0 | |
|
|
14e212c4a8 | |
|
|
344146a46e | |
|
|
cd5a1fcbb7 | |
|
|
424448db2f | |
|
|
629116cb6a | |
|
|
64c3d96807 | |
|
|
d607018832 | |
|
|
0d65625caa | |
|
|
2b82044213 | |
|
|
2769cf7efd | |
|
|
1c84a374a1 | |
|
|
2a59cfe3b5 | |
|
|
0dff3d6e4b | |
|
|
1d6731e3a4 | |
|
|
224318e0c4 | |
|
|
7096062d76 | |
|
|
a0b06fbc28 | |
|
|
4a76705ec7 | |
|
|
7676e3cc4d | |
|
|
234a5706a8 | |
|
|
956e214632 | |
|
|
974adb4367 | |
|
|
00189b992f | |
|
|
f192219621 | |
|
|
4b0d6fe8b9 | |
|
|
bb6dc19924 | |
|
|
ec9af97742 | |
|
|
a5472e1509 | |
|
|
a1bb730cfe | |
|
|
1aa411c0f8 | |
|
|
10de82132d | |
|
|
db11656862 | |
|
|
a47ac76729 | |
|
|
f86a88332c | |
|
|
f6be5e4355 | |
|
|
8deeb0290a | |
|
|
fb6231373b | |
|
|
a407313a95 | |
|
|
b1806d2eff | |
|
|
19351f34e1 | |
|
|
e0f708082d | |
|
|
44464a809d | |
|
|
c7c01b7ba3 | |
|
|
38b71d5267 | |
|
|
3950a3453a | |
|
|
7aa59da586 | |
|
|
9b2fbdb13f | |
|
|
c98b9e1bd4 | |
|
|
9522461508 | |
|
|
5bb99180b6 | |
|
|
62ec1e4955 | |
|
|
58e1af24c9 | |
|
|
a7394e7119 | |
|
|
a93d81de0d | |
|
|
6aafe02c6c | |
|
|
1511ef1608 | |
|
|
1141439c8e | |
|
|
559663082b | |
|
|
3a298518f9 | |
|
|
7f20232401 | |
|
|
20b0849b40 | |
|
|
db951e9195 | |
|
|
d5d78a99d2 | |
|
|
1609a7a88a | |
|
|
289831fce8 | |
|
|
dde058be18 | |
|
|
be8b730ee4 | |
|
|
28360861aa | |
|
|
3e097fa42b | |
|
|
b8a7cd6ebc | |
|
|
a9aefaf240 | |
|
|
266a0c5dd5 | |
|
|
54822ae038 | |
|
|
05203d6716 | |
|
|
2ce8edde80 | |
|
|
3c30f5dc14 | |
|
|
e4ad1c0653 | |
|
|
84df49ca07 | |
|
|
400edd0b70 | |
|
|
c4add1ecc8 | |
|
|
d5879e28d7 | |
|
|
37e083face | |
|
|
290506a060 | |
|
|
1b4bc3690a | |
|
|
6374781d26 | |
|
|
b28013a02f | |
|
|
fe429d2bdc | |
|
|
d63af2ed20 | |
|
|
cebf9875b1 | |
|
|
131681a0b3 | |
|
|
f833adc710 | |
|
|
df80d1e551 | |
|
|
82dc092247 | |
|
|
44894fcaa9 | |
|
|
083bebdc03 | |
|
|
e808764dd6 | |
|
|
77d198cb09 | |
|
|
180b02b28c | |
|
|
c49a74d742 | |
|
|
c76fc8f052 | |
|
|
14875dfacc | |
|
|
0a68788c0f | |
|
|
b17e5d9ff3 | |
|
|
05ce4b7155 | |
|
|
c8bbb3da48 | |
|
|
65de108ecd | |
|
|
d20c306219 | |
|
|
e69991ae37 | |
|
|
e1e2544ee3 | |
|
|
318333bae4 | |
|
|
d569de4dfe | |
|
|
05627ff126 | |
|
|
627618c854 | |
|
|
2711c5eb04 | |
|
|
a6982f79c3 | |
|
|
2a542949cd | |
|
|
a8ccbce76f | |
|
|
df7cf30aed | |
|
|
0664fbdfb7 | |
|
|
0a6ee05417 | |
|
|
f9bd8c3f5c | |
|
|
cb83c2a737 | |
|
|
fdd9afd4f0 | |
|
|
53d26c0445 | |
|
|
40d035e7a7 | |
|
|
a13807ae5f | |
|
|
9d5aaf1e26 | |
|
|
c347d08e2b | |
|
|
87f2d0e429 | |
|
|
89d009fcbf | |
|
|
7d65cf5051 | |
|
|
e74427c45c | |
|
|
e8825c7efa | |
|
|
628e0ad034 | |
|
|
2f3f639918 | |
|
|
87caf24dd1 |
|
|
@ -273,6 +273,7 @@ namespace IRaCIS.Core.API.Controllers
|
|||
|
||||
public List<OSSFileDTO> UploadedFileList { get; set; } = new List<OSSFileDTO>();
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
|
||||
public class OSSFileDTO
|
||||
{
|
||||
|
|
@ -521,7 +522,17 @@ namespace IRaCIS.Core.API.Controllers
|
|||
}
|
||||
else
|
||||
{
|
||||
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = item.FileName, Path = item.FilePath, NoneDicomStudyId = noneDicomStudyId.Value, FileType = item.FileType, FileSize = item.FileFize });
|
||||
if (incommand.IsImageSegmentLabel == true)
|
||||
{
|
||||
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = item.FileName, Path = item.FilePath, ImageLabelNoneDicomStudyId = noneDicomStudyId.Value, FileType = item.FileType, FileSize = item.FileFize });
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = item.FileName, Path = item.FilePath, NoneDicomStudyId = noneDicomStudyId.Value, FileType = item.FileType, FileSize = item.FileFize });
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ namespace IRaCIS.Core.Application.Helper
|
|||
|
||||
public class StudyDIRInfo
|
||||
{
|
||||
public Guid SubjectId { get; set; }
|
||||
public bool IsTaskStudy { get; set; }
|
||||
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
// Study
|
||||
public Guid DicomStudyId { get; set; }
|
||||
|
|
@ -97,11 +100,11 @@ namespace IRaCIS.Core.Application.Helper
|
|||
var dicomFile = new DicomFile(dataset);
|
||||
|
||||
// 文件名递增格式:IM_00001, IM_00002, ...
|
||||
string filename = $@"IMAGE/IM_{index:D5}"; // :D5 表示补足5位
|
||||
string filename = $@"IMAGE\IM_{index:D5}"; // :D5 表示补足5位
|
||||
|
||||
mappings.Add($"{filename} => {item.InstanceId}");
|
||||
|
||||
dic.Add(item.InstanceId.ToString(), Path.GetFileName(filename));
|
||||
dic.Add(item.InstanceId.ToString(), filename.TrimEnd('/', '\\').Split('/', '\\').Last());
|
||||
|
||||
dicomDir.AddFile(dicomFile, filename);
|
||||
|
||||
|
|
|
|||
|
|
@ -60,4 +60,16 @@ namespace IRaCIS.Core.Application.Helper
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
|
||||
public class DateTimeTranaslateAttribute : Attribute
|
||||
{
|
||||
public string Formart { get; set; }
|
||||
|
||||
public DateTimeTranaslateAttribute(string formart)
|
||||
{
|
||||
Formart = formart;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,19 @@
|
|||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using DocumentFormat.OpenXml.Wordprocessing;
|
||||
using FellowOakDicom.Imaging.LUT;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Migrations;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using MiniExcelLibs;
|
||||
using MiniExcelLibs.OpenXml;
|
||||
using Newtonsoft.Json;
|
||||
using NPOI.HSSF.UserModel;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using NPOI.SS.UserModel;
|
||||
|
|
@ -681,13 +685,61 @@ public static class ExcelExportHelper
|
|||
if (itemDicName.IsNotNullOrEmpty())
|
||||
{
|
||||
|
||||
var translatedItemData = dynamicTranslateDataList[itemDicName].Where(t => t.Code.ToLower() == itemValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||
var optionTypeEnumStr = iteObjDic.ContainsKey("OptionTypeEnum") ? iteObjDic["OptionTypeEnum"]?.ToString() : "0";
|
||||
|
||||
var translatedItemData = "";
|
||||
//多选
|
||||
if (optionTypeEnumStr == "1")
|
||||
{
|
||||
int[] enumValues = new int[0];
|
||||
// 1. 反序列化 JSON 数组 (字符串枚举)
|
||||
if (!itemValue.StartsWith("[") || !itemValue.EndsWith("]"))
|
||||
{
|
||||
enumValues = new int[1] { int.Parse(itemValue) };
|
||||
}
|
||||
else
|
||||
{
|
||||
enumValues = JsonConvert.DeserializeObject<int[]>(itemValue) ?? new int[0];
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 2. 翻译每一项并输出逗号拼接字符串
|
||||
translatedItemData = string.Join(",",
|
||||
enumValues.Select(code =>
|
||||
dynamicTranslateDataList[itemDicName]
|
||||
.FirstOrDefault(t =>
|
||||
string.Equals(code.ToString(), t.Code, StringComparison.OrdinalIgnoreCase)
|
||||
) is var r && r != null
|
||||
? (isEn_US ? r.Value : r.ValueCN)
|
||||
: string.Empty
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
translatedItemData = dynamicTranslateDataList[itemDicName].Where(t => t.Code.ToLower() == itemValue?.ToLower()).Select(t => isEn_US ? t.Value : t.ValueCN).FirstOrDefault() ?? String.Empty;
|
||||
|
||||
}
|
||||
|
||||
row.GetCell(writeIndex).SetCellValue(translatedItemData);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
row.GetCell(writeIndex).SetCellValue(itemValue);
|
||||
var unit = iteObjDic.ContainsKey("Unit") ? iteObjDic["Unit"]?.ToString() : null;
|
||||
|
||||
if (unit.IsNotNullOrEmpty() && unit == "9")
|
||||
{
|
||||
row.GetCell(writeIndex).SetCellValue(itemValue + "%");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
row.GetCell(writeIndex).SetCellValue(itemValue);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -498,11 +498,14 @@ public class OSSService : IOSSService
|
|||
|
||||
var result = _ossClient.GetObject(aliConfig.BucketName, ossRelativePath);
|
||||
|
||||
// 将OSS返回的流复制到内存流中并返回
|
||||
var memoryStream = new MemoryStream();
|
||||
await result.Content.CopyToAsync(memoryStream);
|
||||
memoryStream.Position = 0; // 重置位置以便读取
|
||||
return memoryStream;
|
||||
// 直接返回流
|
||||
return result.Content;
|
||||
|
||||
//// 将OSS返回的流复制到内存流中并返回
|
||||
//var memoryStream = new MemoryStream();
|
||||
//await result.Content.CopyToAsync(memoryStream);
|
||||
//memoryStream.Position = 0; // 重置位置以便读取
|
||||
//return memoryStream;
|
||||
}
|
||||
else if (ObjectStoreServiceOptions.ObjectStoreUse == "MinIO")
|
||||
{
|
||||
|
|
@ -513,17 +516,31 @@ public class OSSService : IOSSService
|
|||
.WithCredentials(minIOConfig.AccessKeyId, minIOConfig.SecretAccessKey)
|
||||
.WithSSL(minIOConfig.UseSSL)
|
||||
.Build();
|
||||
|
||||
var pipe = new System.IO.Pipelines.Pipe();
|
||||
|
||||
var memoryStream = new MemoryStream();
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var args = new GetObjectArgs()
|
||||
.WithBucket(minIOConfig.BucketName)
|
||||
.WithObject(ossRelativePath)
|
||||
.WithCallbackStream(stream =>
|
||||
{
|
||||
stream.CopyTo(pipe.Writer.AsStream());
|
||||
});
|
||||
|
||||
var getObjectArgs = new GetObjectArgs()
|
||||
.WithBucket(minIOConfig.BucketName)
|
||||
.WithObject(ossRelativePath)
|
||||
.WithCallbackStream(stream => stream.CopyToAsync(memoryStream));
|
||||
await minioClient.GetObjectAsync(args);
|
||||
await pipe.Writer.CompleteAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
await pipe.Writer.CompleteAsync(ex);
|
||||
}
|
||||
});
|
||||
|
||||
await minioClient.GetObjectAsync(getObjectArgs);
|
||||
memoryStream.Position = 0;
|
||||
return memoryStream;
|
||||
return pipe.Reader.AsStream();
|
||||
}
|
||||
else if (ObjectStoreServiceOptions.ObjectStoreUse == "AWS")
|
||||
{
|
||||
|
|
@ -551,10 +568,13 @@ public class OSSService : IOSSService
|
|||
|
||||
var response = await amazonS3Client.GetObjectAsync(getObjectRequest);
|
||||
|
||||
var memoryStream = new MemoryStream();
|
||||
await response.ResponseStream.CopyToAsync(memoryStream);
|
||||
memoryStream.Position = 0;
|
||||
return memoryStream;
|
||||
// ⭐ 直接返回流
|
||||
return response.ResponseStream;
|
||||
|
||||
//var memoryStream = new MemoryStream();
|
||||
//await response.ResponseStream.CopyToAsync(memoryStream);
|
||||
//memoryStream.Position = 0;
|
||||
//return memoryStream;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -892,7 +912,7 @@ public class OSSService : IOSSService
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除某个目录的文件
|
||||
/// 删除某个目录的文件 (包含单个文件,oss单个文件需要去除前缀/)
|
||||
/// </summary>
|
||||
/// <param name="prefix"></param>
|
||||
/// <returns></returns>
|
||||
|
|
|
|||
|
|
@ -985,6 +985,403 @@
|
|||
<returns></returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.ResearchProgramNo">
|
||||
<summary>
|
||||
方案编号 STUDYID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.Domain">
|
||||
<summary>
|
||||
域 DOMAIN TU TR RS
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.ValueType">
|
||||
<summary>
|
||||
取值类型 TUSPID TRSPID RSSPID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.SubjectCode">
|
||||
<summary>
|
||||
受试者编号 USUBJID 实际展示TrialSiteSubjectCode
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.Vendor">
|
||||
<summary>
|
||||
供应商 TUNAM (Extensive Imaging)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.UserName">
|
||||
<summary>
|
||||
阅片人 TUEVAL TREVAL RSEVAL
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.ArmEnum">
|
||||
<summary>
|
||||
阅片人标识 TUEVALID TREVALID RSEVALID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.VisitNum">
|
||||
<summary>
|
||||
访视编号 VISITNUM
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.VisitName">
|
||||
<summary>
|
||||
访视名称 VISIT
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.LatestScanDate">
|
||||
<summary>
|
||||
拍片日期 TUDTC TRDTC RSDTC
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.VisitTaskId">
|
||||
<summary>
|
||||
eCRF标识 TUREFID TRREFID RSREFID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.CriterionName">
|
||||
<summary>
|
||||
RSCAT 阅片标准
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_TR_RSBaseModel.IsJudgeSelect">
|
||||
<summary>
|
||||
RSACPTFL 裁定标记 TUACPTFL
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_Export.No">
|
||||
<summary>
|
||||
序号 TUSEQ (同一个访视,所有阅片人选择病灶给个顺序号)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_Export.ARM_TumorNo">
|
||||
<summary>
|
||||
链接ID TULNKID (阅片人角色_病灶编号)不同访视可以重复
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_Export.TumorIdentificationSimple">
|
||||
<summary>
|
||||
肿瘤识别简称 TUTESTCD
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_Export.TumorIdentificationFullName">
|
||||
<summary>
|
||||
肿瘤识别全称 TUTEST
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_Export.TumorIdentificationResult">
|
||||
<summary>
|
||||
肿瘤鉴定结果 TUORRES
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_Export.TumorIdentificationResultType">
|
||||
<summary>
|
||||
肿瘤识别结果类型 TUSTRESC
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_Export.BodyPart">
|
||||
<summary>
|
||||
部位 TULOC (对应病灶表的部位,需要国际化)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_Export.IdentificationMethod">
|
||||
<summary>
|
||||
鉴定方法 TUMETHOD (Modality?)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TU_Export.BodyPartDes">
|
||||
<summary>
|
||||
部位描述 LOCTEXT
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.TRSEQ">
|
||||
<summary>
|
||||
每个subject 按照顺序编号 TRSEQ
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.TRGRPID">
|
||||
<summary>
|
||||
TRGRPID 组ID 对应TU表肿瘤鉴定结果 TumorIdentificationResult
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.ARM_TumorNo">
|
||||
<summary>
|
||||
TRLNKID 链接ID 对应TU表的链接ID TumorNo(阅片人角色_病灶编号)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.ARM_VisitName">
|
||||
<summary>
|
||||
TRLNKGRP 链接组 ARM-任务名(访视名) 对应RS的链接组
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.TumorAssessmentSimpleName">
|
||||
<summary>
|
||||
肿瘤评估简称 TRTESTCD
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.TumorAssessmentFullName">
|
||||
<summary>
|
||||
肿瘤评估全称 TRTEST
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.OriginalMeasurements">
|
||||
<summary>
|
||||
原始测量 TRORRES
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.OriginalUnit">
|
||||
<summary>
|
||||
原始单位 TRORRESU
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.StandardResult_Character">
|
||||
<summary>
|
||||
标准结果(字符) TRSTRESC
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.StandardResult_Numeric">
|
||||
<summary>
|
||||
标准结果(数值) TRORRESU
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.StandardUnit">
|
||||
<summary>
|
||||
标准单位 TRSTRESU
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.CompletionStatus">
|
||||
<summary>
|
||||
完成状态 TRSTAT
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.IdentificationMethod">
|
||||
<summary>
|
||||
完成状态 TRMETHOD
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.TR_Export.NotMeasuredReason">
|
||||
<summary>
|
||||
无法测量原因 TRREASND
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.RSSEQ">
|
||||
<summary>
|
||||
RSSEQ 按照subject 的数据顺序编号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.ARM_VisitName">
|
||||
<summary>
|
||||
RSLNKGRP 链接组 ARM_任务名(访视名)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.EfficacyEvaluationSimpleName">
|
||||
<summary>
|
||||
RSTESTCD 疗效评估简称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.EfficacyEvaluationName">
|
||||
<summary>
|
||||
RSTEST 疗效评估全称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.RespondEfficacyAssessment">
|
||||
<summary>
|
||||
RSORRES 响应评估原始结果
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.StandardEfficacyAssessment">
|
||||
<summary>
|
||||
RSSTRESC 标准疗效评估
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.CompletionStatus">
|
||||
<summary>
|
||||
RSSTAT 完成状态
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.NotAssessmentReason">
|
||||
<summary>
|
||||
RSREASND 无法评估原因
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.AssessmentReason">
|
||||
<summary>
|
||||
REASASM 评估原因
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.ReAssessmentReason">
|
||||
<summary>
|
||||
REASOVR 重新评估原因
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.RS_Export.UpdateAssessmentReason">
|
||||
<summary>
|
||||
REASUPD 更新评估原因
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.CO_Export.RDOMAIN">
|
||||
<summary>
|
||||
关联域 RS:(访视点备注) 空:裁判选择原因
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.CO_Export.COSEQ">
|
||||
<summary>
|
||||
COSEQ 序号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.CO_Export.IdentificationVariable">
|
||||
<summary>
|
||||
IDVAR 标识变量 RSSEQ 空:裁判选择原因
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.CO_Export.Identification">
|
||||
<summary>
|
||||
标识 IDVARVAL RSSEQ具体的值 空:裁判选择原因
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.CO_Export.RemarksQuote">
|
||||
<summary>
|
||||
COREF 备注引用
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.CO_Export.Remarks">
|
||||
<summary>
|
||||
备注 COVAL
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.CO_Export.CODTC">
|
||||
<summary>
|
||||
裁决日期 CODTC
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto">
|
||||
<summary>
|
||||
公共影像导表基类(IVUS / OCT 通用)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto.ResearchProgramNo">
|
||||
<summary>研究标识符</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto.TrialSiteCode">
|
||||
<summary>中心编号</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto.SubjectCode">
|
||||
<summary>受试者标识符</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto.USUBJID">
|
||||
<summary>受试者唯一标识</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto.VisitName">
|
||||
<summary>访视名称</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto.ArmEnum">
|
||||
<summary>阅片人角色</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto.LatestScanDate">
|
||||
<summary>拍片日期</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto.SignTime">
|
||||
<summary>阅片完成时间</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto.VisitNum">
|
||||
<summary>
|
||||
访视编号 VISITNUM
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IVUS_OCTBaseDto.VisitNote">
|
||||
<summary>访视点备注</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.Common.IvusExportDto">
|
||||
<summary>
|
||||
IVUS 导表模型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IvusExportDto.TARGETV">
|
||||
<summary>靶段</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IvusExportDto.PLAQUE">
|
||||
<summary>斑块编号</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IvusExportDto.EEM">
|
||||
<summary>外弹力膜面积</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IvusExportDto.LUMEN">
|
||||
<summary>管腔面积</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IvusExportDto.PA">
|
||||
<summary>外弹力膜与管腔面积差值</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IvusExportDto.PFC">
|
||||
<summary>回撤中的图像帧数</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IvusExportDto.FC">
|
||||
<summary>分析图像帧数</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IvusExportDto.TOTALEEM">
|
||||
<summary>总外弹力膜面积 (如无可不填)</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IvusExportDto.TOTALPA">
|
||||
<summary>总 PA (如无可不填)</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.IvusExportDto.PAV">
|
||||
<summary>PAV (如无可不填)</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.Common.OctExportDto">
|
||||
<summary>
|
||||
OCT 导表模型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.DOST">
|
||||
<summary>
|
||||
斑块到血管开口的距离
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.TARGETV">
|
||||
<summary>靶段</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.PLAQUE">
|
||||
<summary>斑块编号</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.TestID">
|
||||
<summary>测量标识</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.TESTCD">
|
||||
<summary>测量参数名称</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.ORRES">
|
||||
<summary>测量参数值</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.ORRESU">
|
||||
<summary>测量值单位</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.PLATYPE">
|
||||
<summary>斑块类型</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.MINFCT">
|
||||
<summary>最小纤维帽厚度</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.AVGMFCT">
|
||||
<summary>平均纤维帽厚度</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.LAMEAN">
|
||||
<summary>脂质角度平均值</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.LAMAX">
|
||||
<summary>脂质角度最大值</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.PLAMACRI">
|
||||
<summary>巨噬细胞浸润</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.PLAMIARC">
|
||||
<summary>巨噬细胞浸润角度</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.PLAMC">
|
||||
<summary>微通道</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Common.OctExportDto.PLACCS">
|
||||
<summary>胆固醇结晶</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.ExploreRecommendService">
|
||||
<summary>
|
||||
ExploreRecommendService
|
||||
|
|
@ -1517,6 +1914,14 @@
|
|||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.MoveSubtreeAsync(System.Guid,System.Nullable{System.Guid})">
|
||||
<summary>
|
||||
GPT 移动子树代码--适合一次提交事务
|
||||
</summary>
|
||||
<param name="subtreeRootId"></param>
|
||||
<param name="newParentId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.AuditDocumentService.AddClosureRelationsAsync(System.Guid,System.Nullable{System.Guid})">
|
||||
<summary>
|
||||
插入闭包表关系
|
||||
|
|
@ -2139,7 +2544,7 @@
|
|||
<param name="_dicomStudyRepository"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.GetIRUploadTaskNoneDicomStudyList(IRaCIS.Core.Application.Contracts.IRUploadStudyQuery)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.GetIRUploadTaskNoneDicomStudyList(IRaCIS.Core.Application.Contracts.INoneDicomStudyService,IRaCIS.Core.Application.Contracts.IRUploadStudyQuery)">
|
||||
<summary>
|
||||
IR 上传任务 nonedicom 列表 后处理的数据UploadedFileCount不能排序 --new
|
||||
</summary>
|
||||
|
|
@ -2211,6 +2616,12 @@
|
|||
<param name="inCommand"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.GetTrialSubjectVisitMarkList(IRaCIS.Core.Application.Contracts.SubjectVisitMarkQuery)">
|
||||
<summary>
|
||||
获取受试者级别 访视标注列表
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ImageAndDoc.DownloadAndUploadService.GetSubejectOrVisitZipInfo(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Application.Contracts.SubejctZipInfoQuery)">
|
||||
<summary>
|
||||
受试者级别所有的影像
|
||||
|
|
@ -3099,6 +3510,22 @@
|
|||
<returns></returns>
|
||||
<exception cref="T:IRaCIS.Core.Infrastructure.BusinessValidationFailedException"></exception>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.GeneralCalculateService.GetReadingReportQuestion(System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingQuestionTrial},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.VisitTaskInfo},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.Globalanswer},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingTaskQuestionAnswer},System.Collections.Generic.List{IRaCIS.Core.Application.Service.Reading.Dto.TableAnsweRowInfo},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingTableQuestionTrial},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingTableAnswerRowInfo},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.ReadingTableQuestionAnswer},System.Collections.Generic.List{IRaCIS.Core.Domain.Models.OrganInfo},System.Collections.Generic.List{System.Nullable{IRaCIS.Core.Domain.Share.QuestionMark}})">
|
||||
<summary>
|
||||
构造阅片报告问题
|
||||
</summary>
|
||||
<param name="questionList"></param>
|
||||
<param name="taskInfoList"></param>
|
||||
<param name="globalanswerList"></param>
|
||||
<param name="answers"></param>
|
||||
<param name="tableAnsweRowInfos"></param>
|
||||
<param name="tableQuestionList"></param>
|
||||
<param name="alltableAnsweRowInfos"></param>
|
||||
<param name="tableAnswers"></param>
|
||||
<param name="organInfos"></param>
|
||||
<param name="needChangeType"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.GeneralCalculateService.GetDataTableFromUpload(Microsoft.AspNetCore.Http.IFormFile,System.String,System.Guid)">
|
||||
<summary>
|
||||
从上传文件中获取Datatable
|
||||
|
|
@ -3141,6 +3568,13 @@
|
|||
标准和服务对应
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.ReadingCalculateService.GetReportsChartData(IRaCIS.Core.Application.Service.Reading.Dto.GetReportsChartDataInDto)">
|
||||
<summary>
|
||||
获取报告图表数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingCalculate.ReadingCalculateService.ReadingImport">
|
||||
<summary>
|
||||
阅片导入
|
||||
|
|
@ -6189,6 +6623,13 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.IReadingCalculateService.GetReportsChartData(IRaCIS.Core.Application.Service.Reading.Dto.GetReportsChartDataInDto)">
|
||||
<summary>
|
||||
获取报告图表数据
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.IReadingCalculateService.VerifyVisitTaskQuestions(IRaCIS.Core.Application.Service.Reading.Dto.VerifyVisitTaskQuestionsInDto)">
|
||||
<summary>
|
||||
验证访视提交
|
||||
|
|
@ -7921,6 +8362,31 @@
|
|||
第三次
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTFCTUploadData.MacrophageInfiltrationMeasurement">
|
||||
<summary>
|
||||
巨噬细胞浸润测量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTFCTUploadData.MacrophageInfiltrationAngle">
|
||||
<summary>
|
||||
巨噬细胞浸润角度测量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTFCTUploadData.MicrochannelMeasurement">
|
||||
<summary>
|
||||
微通道测量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTFCTUploadData.CholesterolCrystalMeasurement">
|
||||
<summary>
|
||||
胆固醇结晶测量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTFCTUploadData.LumenAreaMeasurement">
|
||||
<summary>
|
||||
官腔面积测量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTInfo.PlaqueNum">
|
||||
<summary>
|
||||
斑块编号
|
||||
|
|
@ -7931,6 +8397,26 @@
|
|||
值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTInfo.MacrophageInfiltrationMeasurement">
|
||||
<summary>
|
||||
巨噬细胞浸润测量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTInfo.MacrophageInfiltrationAngle">
|
||||
<summary>
|
||||
巨噬细胞浸润角度测量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTInfo.MicrochannelMeasurement">
|
||||
<summary>
|
||||
微通道测量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OCTInfo.CholesterolCrystalMeasurement">
|
||||
<summary>
|
||||
胆固醇结晶测量
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.ReadingCalculateDto">
|
||||
<summary>
|
||||
阅片计算Dto
|
||||
|
|
@ -8491,6 +8977,16 @@
|
|||
单位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingReportDto.ShowChartTypeEnum">
|
||||
<summary>
|
||||
显示图表类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingReportDto.OptionTypeEnum">
|
||||
<summary>
|
||||
选项类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingReportDto.HighlightAnswer">
|
||||
<summary>
|
||||
高亮问题的答案
|
||||
|
|
@ -8586,6 +9082,11 @@
|
|||
标记的唯一标识符
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReportsChartDataOutDto.Unit">
|
||||
<summary>
|
||||
单位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetPreviousOtherPicturePathInDto.QuestionType">
|
||||
<summary>
|
||||
问题类型
|
||||
|
|
@ -8996,6 +9497,16 @@
|
|||
评估原因
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OncologyQuestion.ValueType">
|
||||
<summary>
|
||||
数值类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OncologyQuestion.CustomUnit">
|
||||
<summary>
|
||||
自定义单位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.OncologyQuestion.QuestionGenre">
|
||||
<summary>
|
||||
问题类型
|
||||
|
|
@ -9141,6 +9652,11 @@
|
|||
数值类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GlobalQuestionInfo.CustomUnit">
|
||||
<summary>
|
||||
自定义单位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GlobalQuestionInfo.Type">
|
||||
<summary>
|
||||
类型
|
||||
|
|
@ -9281,6 +9797,16 @@
|
|||
字典code
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JudgeQuestion.CustomUnit">
|
||||
<summary>
|
||||
自定义单位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JudgeQuestion.ValueType">
|
||||
<summary>
|
||||
数值类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReportVerifyOutDto.IsExistDisease">
|
||||
<summary>
|
||||
是否存在疾病
|
||||
|
|
@ -10196,6 +10722,16 @@
|
|||
问题英文名称
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JudgeQuestionAnswerInfo.ValueType">
|
||||
<summary>
|
||||
数值类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JudgeQuestionAnswerInfo.CustomUnit">
|
||||
<summary>
|
||||
自定义单位
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.JudgeQuestionAnswerInfo.ShowOrder">
|
||||
<summary>
|
||||
排序
|
||||
|
|
@ -10546,6 +11082,11 @@
|
|||
影像标记
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.IsPreinstall">
|
||||
<summary>
|
||||
是否预设
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.ImageTool">
|
||||
<summary>
|
||||
影像工具
|
||||
|
|
@ -10641,6 +11182,16 @@
|
|||
数据来源
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.ShowChartTypeEnum">
|
||||
<summary>
|
||||
显示图表类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.OptionTypeEnum">
|
||||
<summary>
|
||||
选项类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit.DictionaryCode">
|
||||
<summary>
|
||||
字典code
|
||||
|
|
@ -10689,6 +11240,11 @@
|
|||
数值类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.IsPreinstall">
|
||||
<summary>
|
||||
是否预设
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.ClassifyType">
|
||||
<summary>
|
||||
分类问题类型
|
||||
|
|
@ -10719,6 +11275,16 @@
|
|||
数据来源
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.ShowChartTypeEnum">
|
||||
<summary>
|
||||
显示图表类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.OptionTypeEnum">
|
||||
<summary>
|
||||
选项类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionSystemAddOrEdit.Unit">
|
||||
<summary>
|
||||
单位
|
||||
|
|
@ -11162,6 +11728,16 @@
|
|||
数据来源
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.ShowChartTypeEnum">
|
||||
<summary>
|
||||
显示图表类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.OptionTypeEnum">
|
||||
<summary>
|
||||
选项类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionTrialView.QuestionEnName">
|
||||
<summary>
|
||||
问题英文名称
|
||||
|
|
@ -11237,6 +11813,16 @@
|
|||
数据来源
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.ShowChartTypeEnum">
|
||||
<summary>
|
||||
显示图表类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.OptionTypeEnum">
|
||||
<summary>
|
||||
选项类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.Unit">
|
||||
<summary>
|
||||
单位
|
||||
|
|
@ -11492,6 +12078,16 @@
|
|||
默认值
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCalculateTableQuestionsOutDto.ShowChartTypeEnum">
|
||||
<summary>
|
||||
显示图表类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCalculateTableQuestionsOutDto.OptionTypeEnum">
|
||||
<summary>
|
||||
选项类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetCalculateTableQuestionsOutDto.ClassifyEditType">
|
||||
<summary>
|
||||
分类编辑类型 是否可编辑
|
||||
|
|
@ -11672,6 +12268,16 @@
|
|||
数据来源
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.ShowChartTypeEnum">
|
||||
<summary>
|
||||
显示图表类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.OptionTypeEnum">
|
||||
<summary>
|
||||
选项类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.Unit">
|
||||
<summary>
|
||||
单位
|
||||
|
|
@ -12037,6 +12643,16 @@
|
|||
数据来源
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.ShowChartTypeEnum">
|
||||
<summary>
|
||||
显示图表类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.OptionTypeEnum">
|
||||
<summary>
|
||||
选项类型
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionTrialInDto.Unit">
|
||||
<summary>
|
||||
单位
|
||||
|
|
@ -13029,7 +13645,7 @@
|
|||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.AddOrUpdateReadingTableQuestionTrial(IRaCIS.Core.Application.Service.Reading.Dto.ReadingTableQuestionTrialAddOrEdit)">
|
||||
<summary>
|
||||
新增修改想想项目表格问题
|
||||
新增修改项目表格问题
|
||||
</summary>
|
||||
<param name="indto"></param>
|
||||
<returns></returns>
|
||||
|
|
@ -13135,6 +13751,13 @@
|
|||
IR影像阅片
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetReportsChartData(IRaCIS.Core.Application.Service.Reading.Dto.GetReportsChartDataInDto)">
|
||||
<summary>
|
||||
获取报告图表数据
|
||||
</summary>
|
||||
<param name=""></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.GetReadingCalculationData(IRaCIS.Core.Application.Service.Reading.Dto.GetReadingCalculationDataInDto)">
|
||||
<summary>
|
||||
获取阅片的计算数据
|
||||
|
|
@ -14482,7 +15105,7 @@
|
|||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Helper.OSSService.DeleteFromPrefix(System.String,System.Boolean)">
|
||||
<summary>
|
||||
删除某个目录的文件
|
||||
删除某个目录的文件 (包含单个文件,oss单个文件需要去除前缀/)
|
||||
</summary>
|
||||
<param name="prefix"></param>
|
||||
<returns></returns>
|
||||
|
|
@ -14788,7 +15411,7 @@
|
|||
QC 影像质疑
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.QCImageQuestionRecurringEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserRole},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.QCImageQuestionRecurringEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserRole},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
QC 影像质疑
|
||||
</summary>
|
||||
|
|
@ -14798,7 +15421,7 @@
|
|||
CRC 影像质疑
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CRCImageQuestionRecurringEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserRole},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.CRCImageQuestionRecurringEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserRole},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
CRC 影像质疑
|
||||
</summary>
|
||||
|
|
@ -14808,7 +15431,7 @@
|
|||
影像质控 发送给QC的
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.ImageQCRecurringEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserRole},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<member name="M:IRaCIS.Core.Application.MassTransit.Consumer.ImageQCRecurringEventConsumer.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialEmailNoticeConfig},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialUserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.TrialSiteUserRole},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig},Microsoft.Extensions.Options.IOptionsMonitor{IRaCIS.Core.Domain.Share.SystemEmailSendConfig})">
|
||||
<summary>
|
||||
影像质控 发送给QC的
|
||||
</summary>
|
||||
|
|
@ -17681,7 +18304,7 @@
|
|||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Services.TrialDocumentService.TestPush">
|
||||
<summary>
|
||||
测试定时发送
|
||||
测试邮件定时发送
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer
|
|||
|
||||
var noneDicomQuey = from sv in _subjectVisitRepository.Where(subjectVisitLambda)
|
||||
join subject in _subjectRepository.AsQueryable() on sv.SubjectId equals subject.Id
|
||||
join noneDicomStudy in _noneDicomStudyRepository.AsQueryable() on sv.Id equals noneDicomStudy.SubjectVisitId
|
||||
join noneDicomStudy in _noneDicomStudyRepository.Where(t => t.FileCount > 0) on sv.Id equals noneDicomStudy.SubjectVisitId
|
||||
select new CheckDBModel()
|
||||
{
|
||||
SubjectVisitId = sv.Id,
|
||||
|
|
|
|||
|
|
@ -25,9 +25,11 @@ public class QCImageQuestionRecurringEventConsumer(IRepository<Trial> _trialRepo
|
|||
IRepository<TrialEmailNoticeConfig> _trialEmailNoticeConfigRepository,
|
||||
IRepository<TrialUserRole> _trialUserRoleRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
|
||||
IRepository<TrialSiteUserRole> _trialSiteUserRoleRepository,
|
||||
IOptionsMonitor<SystemEmailSendConfig> _SystemEmailSendConfig) : IConsumer<QCImageQuestionRecurringEvent>
|
||||
{
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
public async Task Consume(ConsumeContext<QCImageQuestionRecurringEvent> context)
|
||||
{
|
||||
var trialId = context.Message.TrialId;
|
||||
|
|
@ -64,8 +66,9 @@ public class QCImageQuestionRecurringEventConsumer(IRepository<Trial> _trialRepo
|
|||
Func<TrialEmailNoticeConfig, (string topicStr, string htmlBodyStr, bool isEn_us, Guid? onlyToUserId)> topicAndHtmlFunc = trialEmailConfig =>
|
||||
{
|
||||
var topicStr = string.Format(isEn_us ? trialEmailConfig.EmailTopic : trialEmailConfig.EmailTopicCN, trialInfo.ResearchProgramNo);
|
||||
var htmlBodyStr = string.Format(isEn_us ? trialEmailConfig.EmailHtmlContent : trialEmailConfig.EmailHtmlContentCN,
|
||||
user.FullName, DateTime.Now, sendStat.ToBeDealedCount, _SystemEmailSendConfig.CurrentValue.SiteUrl);
|
||||
var htmlContent = isEn_us ? trialEmailConfig.EmailHtmlContent : trialEmailConfig.EmailHtmlContentCN;
|
||||
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, htmlContent),
|
||||
user.FullName, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), sendStat.ToBeDealedCount, _SystemEmailSendConfig.CurrentValue.SiteUrl);
|
||||
|
||||
return (topicStr, htmlBodyStr, isEn_us, userId);
|
||||
};
|
||||
|
|
@ -91,8 +94,10 @@ public class CRCImageQuestionRecurringEventConsumer(IRepository<Trial> _trialRep
|
|||
IRepository<TrialUserRole> _trialUserRoleRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<TrialSiteUserRole> _trialSiteUserRoleRepository,
|
||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
|
||||
IOptionsMonitor<SystemEmailSendConfig> _SystemEmailSendConfig) : IConsumer<CRCImageQuestionRecurringEvent>
|
||||
{
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
public async Task Consume(ConsumeContext<CRCImageQuestionRecurringEvent> context)
|
||||
{
|
||||
var trialId = context.Message.TrialId;
|
||||
|
|
@ -131,9 +136,10 @@ public class CRCImageQuestionRecurringEventConsumer(IRepository<Trial> _trialRep
|
|||
Func<TrialEmailNoticeConfig, (string topicStr, string htmlBodyStr, bool isEn_us, Guid? onlyToUserId)> topicAndHtmlFunc = trialEmailConfig =>
|
||||
{
|
||||
var topicStr = string.Format(isEn_us ? trialEmailConfig.EmailTopic : trialEmailConfig.EmailTopicCN, trialInfo.ResearchProgramNo);
|
||||
var htmlBodyStr = string.Format(isEn_us ? trialEmailConfig.EmailHtmlContent : trialEmailConfig.EmailHtmlContentCN,
|
||||
var htmlContent = isEn_us ? trialEmailConfig.EmailHtmlContent : trialEmailConfig.EmailHtmlContentCN;
|
||||
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, htmlContent),
|
||||
|
||||
user.FullName, DateTime.Now, sendStat.ToBeDealedCount - sendStat.ReUploadTobeDealedCount, sendStat.ReUploadTobeDealedCount, _SystemEmailSendConfig.CurrentValue.SiteUrl);
|
||||
user.FullName, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), sendStat.ToBeDealedCount - sendStat.ReUploadTobeDealedCount, sendStat.ReUploadTobeDealedCount, _SystemEmailSendConfig.CurrentValue.SiteUrl);
|
||||
|
||||
|
||||
return (topicStr, htmlBodyStr, false, userId);
|
||||
|
|
@ -158,8 +164,11 @@ public class ImageQCRecurringEventConsumer(IRepository<Trial> _trialRepository,
|
|||
IRepository<TrialUserRole> _trialUserRoleRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<TrialSiteUserRole> _trialSiteUserRoleRepository,
|
||||
IOptionsMonitor<SystemEmailSendConfig> systemEmailConfig,
|
||||
IOptionsMonitor<SystemEmailSendConfig> _SystemEmailSendConfig) : IConsumer<ImageQCRecurringEvent>
|
||||
{
|
||||
|
||||
private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
|
||||
public async Task Consume(ConsumeContext<ImageQCRecurringEvent> context)
|
||||
{
|
||||
var trialId=context.Message.TrialId;
|
||||
|
|
@ -199,9 +208,12 @@ public class ImageQCRecurringEventConsumer(IRepository<Trial> _trialRepository,
|
|||
|
||||
Func<TrialEmailNoticeConfig, (string topicStr, string htmlBodyStr, bool isEn_us, Guid? onlyToUserId)> topicAndHtmlFunc = trialEmailConfig =>
|
||||
{
|
||||
|
||||
var topicStr = string.Format(isEn_us ? trialEmailConfig.EmailTopic : trialEmailConfig.EmailTopicCN, trialInfo.ResearchProgramNo);
|
||||
var htmlBodyStr = string.Format(isEn_us ? trialEmailConfig.EmailHtmlContent : trialEmailConfig.EmailHtmlContentCN,
|
||||
user.FullName, DateTime.Now, sendStat.ToBeClaimedCount, sendStat.ToBeReviewedCount, _SystemEmailSendConfig.CurrentValue.SiteUrl);
|
||||
|
||||
var htmlContent = isEn_us ? trialEmailConfig.EmailHtmlContent : trialEmailConfig.EmailHtmlContentCN;
|
||||
var htmlBodyStr = string.Format(CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, htmlContent),
|
||||
user.FullName, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), sendStat.ToBeClaimedCount, sendStat.ToBeReviewedCount, _SystemEmailSendConfig.CurrentValue.SiteUrl);
|
||||
|
||||
return (topicStr, htmlBodyStr, false, userId);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -490,6 +490,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
|||
|
||||
public int? RandomOrder { get; set; }
|
||||
public bool? IsRandomOrderList { get; set; }
|
||||
|
||||
public CriterionType? CriterionType { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1027,8 +1027,8 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
//满足前序访视不存在 需要签署但是未签署 sql 相当复杂 同时想查询所有未读的统计数字 就无法统计 byzhouhang
|
||||
//但是加字段 IsFrontTaskNeedSignButNotSign 那么签名临床数据的时候,要对该subject 该标准的有效的任务 这个字段需要在签名的时候维护 采取这种方式 统计数字灵活
|
||||
//.Where(t => t.Subject.SubjectVisitTaskList.AsQueryable().Where(visitTaskLambda).Any(c => c.IsNeedClinicalDataSign == true && c.IsClinicalDataSign == false && c.VisitTaskNum < t.VisitTaskNum))
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => (t.Subject.Code.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate));
|
||||
|
||||
.WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => (t.Subject.Code.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(inQuery.SubjectCode!) && t.IsAnalysisCreate))
|
||||
;
|
||||
|
||||
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
||||
|
||||
|
|
@ -1171,7 +1171,9 @@ public class VisitTaskService(IRepository<VisitTask> _visitTaskRepository,
|
|||
|
||||
var visitQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.UserRoleId && x.TaskState == TaskState.Effect)
|
||||
.WhereIf(inQuery.SubjectId != null, x => x.SubjectId == inQuery.SubjectId)
|
||||
.WhereIf(!string.IsNullOrEmpty(subjectCode), t => (t.Subject.Code.Contains(subjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(subjectCode!) && t.IsAnalysisCreate));
|
||||
.WhereIf(!string.IsNullOrEmpty(subjectCode), t => (t.Subject.Code.Contains(subjectCode!) && t.IsAnalysisCreate == false) || (t.BlindSubjectCode.Contains(subjectCode!) && t.IsAnalysisCreate))
|
||||
.WhereIf(critrion.CriterionType == CriterionType.OCT, t => t.ReadingCategory == ReadingCategory.Visit ? t.SourceSubjectVisit.NoneDicomStudyList.Where(t=>t.Modality=="OCT").SelectMany(t => t.ImageLabelNoneDicomFileList).Any() : true)
|
||||
.WhereIf(critrion.CriterionType == CriterionType.IVUS, t => t.ReadingCategory == ReadingCategory.Visit ? t.SourceSubjectVisit.NoneDicomStudyList.Where(t => t.Modality == "IVUS").SelectMany(t => t.ImageLabelNoneDicomFileList).Any() : true);
|
||||
|
||||
var visitGroupQuery = visitQuery.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
||||
|
||||
|
|
|
|||
|
|
@ -1619,7 +1619,6 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
exportInfo.CurrentTime = ExportExcelConverterDate.DateTimeInternationalToString(DateTime.Now, _userInfo.TimeZoneId);
|
||||
|
||||
|
||||
if (inQuery.IsRandomOrderList == true)
|
||||
{
|
||||
list = list.OrderBy(t => t.RandomOrder).ToList();
|
||||
|
|
@ -2345,8 +2344,13 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
if (criterion.CriterionType == CriterionType.OCT)
|
||||
{
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.OCT_ReadingLession_Export, ExportCatogory = ExportResult.OCT_ReadingLession_Export });
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.OCT_CDISC_Export, ExportCatogory = ExportResult.OCT_CDISC_Export });
|
||||
}
|
||||
//else if (criterion.CriterionType == CriterionType.SelfDefine)
|
||||
if (criterion.CriterionType == CriterionType.IVUS)
|
||||
{
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.IVUS_CDISC_Export, ExportCatogory = ExportResult.IVUS_CDISC_Export });
|
||||
}
|
||||
if (criterion.CriterionGroup != CriterionGroup.Tumor && criterion.CriterionType != CriterionType.OCT && criterion.CriterionType != CriterionType.IVUS)
|
||||
{
|
||||
list.Add(new ExportDocumentDes() { Code = StaticData.Export.CDISC_Reading_Export, ExportCatogory = ExportResult.CDISC });
|
||||
}
|
||||
|
|
@ -2475,7 +2479,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
//阅片结果表
|
||||
export_Template = StaticData.Export.CommonReading_Export;
|
||||
}
|
||||
|
||||
//斑块表
|
||||
else if (inQuery.ReadingExportType == ExportResult.OCT_ReadingLession_Export)
|
||||
{
|
||||
//OCT
|
||||
|
|
@ -2742,7 +2746,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
addLessionInfoList.Add(new CommonQuesionInfo() { QuestionName = _userInfo.IsEn_Us ? "Lesion Type" : "病灶类型", QuestionValue = lession.LessionType, TranslateDicName = "LesionType" });
|
||||
}
|
||||
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName });
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionName = t.QuestionName, OptionTypeEnum = t.OptionTypeEnum, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName ,Unit=t.Unit});
|
||||
|
||||
//有三部分组成 外层问题+ 没有配置病灶编号和类型+ 动态的表格问题
|
||||
var dynamicLessionInfoList = item.QuestionAnswerList.Union(addLessionInfoList).Union(dynamicPartialLessionInfoList).ToList();
|
||||
|
|
@ -2890,14 +2894,14 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
|
||||
addLessionInfoList.Add(new CommonQuesionInfo() { QuestionId = Guid.Empty, QuestionName = _userInfo.IsEn_Us ? "Table Name" : "表格名称", QuestionValue = firstLessionAnser.TableName });
|
||||
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionId = t.TableQuesionId, QuestionName = t.TableName + "_" + t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode });
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionId = t.TableQuesionId, OptionTypeEnum = t.OptionTypeEnum, QuestionName = t.TableName + "_" + t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode, Unit = t.Unit });
|
||||
|
||||
//有三部分组成 外层问题+ 固定列表格名称 + 动态的表格问题
|
||||
dynamicLessionInfoList = item.QuestionAnswerList.Union(addLessionInfoList).Union(dynamicPartialLessionInfoList).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionId = t.TableQuesionId, QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode });
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionId = t.TableQuesionId, OptionTypeEnum = t.OptionTypeEnum, QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode, Unit = t.Unit });
|
||||
|
||||
//两部分组成 外层问题+ 动态的表格问题
|
||||
dynamicLessionInfoList = item.QuestionAnswerList.Union(dynamicPartialLessionInfoList).ToList();
|
||||
|
|
@ -2944,7 +2948,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
TranslateDicNameList = translateDicNameList
|
||||
};
|
||||
|
||||
if (export_Template == StaticData.Export.ReadingLession_Export || export_Template == StaticData.Export.CommonJudgeReadingDetail_Export)
|
||||
if (export_Template == StaticData.Export.ReadingLession_Export || export_Template == StaticData.Export.CommonJudgeReadingDetail_Export || export_Template== StaticData.Export.OCT_ReadingLession_Export)
|
||||
{
|
||||
dynamicColumnConfig.TempalteLastColumnIndex = 8;
|
||||
}
|
||||
|
|
@ -2963,7 +2967,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
var trialConfigTableQuestionList = _trialReadingTableQuestionRepository.Where(t => t.TrialId == trialId && t.TrialCriterionId == trialReadingCriterionId).Where(t => t.ExportResultStr.Contains(((int)inQuery.ReadingExportType).ToString()))
|
||||
.Select(t => new ExportQuestionBasicInfo()
|
||||
{
|
||||
QuestionId = t.Id,
|
||||
QuestionId = t.Id,
|
||||
TableName = _userInfo.IsEn_Us ? t.ReadingQuestionTrial.QuestionEnName : t.ReadingQuestionTrial.QuestionName,
|
||||
QuestionName = _userInfo.IsEn_Us ? t.QuestionEnName : t.QuestionName,
|
||||
CDISCCode = t.CDISCCode,
|
||||
|
|
@ -3007,7 +3011,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
|||
var dynamicLessionInfoList = new List<CommonQuesionInfo>();
|
||||
|
||||
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionId = t.TableQuesionId, QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode });
|
||||
var dynamicPartialLessionInfoList = lession.LessionAnswerList.Select(t => new CommonQuesionInfo() { QuestionId = t.TableQuesionId,OptionTypeEnum=t.OptionTypeEnum, QuestionName = t.QuestionName, QuestionValue = t.QuestionValue, TranslateDicName = t.TranslateDicName, CDISCCode = t.CDISCCode, Unit = t.Unit });
|
||||
|
||||
//两部分组成 外层问题+ 动态的表格问题
|
||||
dynamicLessionInfoList = item.QuestionAnswerList.Union(dynamicPartialLessionInfoList).ToList();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,517 @@
|
|||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Common;
|
||||
|
||||
public class TumorCommonQustionInfo
|
||||
{
|
||||
//问题标识,肿瘤评估用于区分是什么问题
|
||||
public QuestionType? QuestionType { get; set; }
|
||||
|
||||
public OptionType OptionTypeEnum { get; set; }
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
public string QuestionValue { get; set; }
|
||||
|
||||
public string TranslateDicName { get; set; }
|
||||
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
}
|
||||
|
||||
public class TumorLessionInfo
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public Guid? OrganInfoId { get; set; }
|
||||
//病灶编号
|
||||
public string LessionCode { get; set; }
|
||||
|
||||
public LesionType? LessionType { get; set; }
|
||||
|
||||
public Guid? SplitRowId { get; set; }
|
||||
|
||||
public string? DicomModality { get; set; }
|
||||
|
||||
public string? NoneDicomModality { get; set; }
|
||||
|
||||
//病灶答案
|
||||
public List<TumorLessionAnswerInfo> LessionAnswerList { get; set; }
|
||||
}
|
||||
|
||||
public class TumorLessionAnswerInfo
|
||||
{
|
||||
public QuestionMark? QuestionMark { get; set; }
|
||||
|
||||
public OptionType OptionTypeEnum { get; set; }
|
||||
|
||||
//病灶Id
|
||||
public Guid RowId { get; set; }
|
||||
|
||||
//如果是4 就取CustomUnit 否则就是字典翻译
|
||||
[Comment("单位")]
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
public Guid TableQuesionId { get; set; }
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
public string QuestionValue { get; set; }
|
||||
|
||||
public string TranslateDicName { get; set; }
|
||||
}
|
||||
|
||||
public class TumorGlobalQuestionAnserInfo
|
||||
{
|
||||
[Comment("原任务ID")]
|
||||
public Guid TaskId { get; set; }
|
||||
|
||||
public GlobalAnswerType GlobalAnswerType { get; set; }
|
||||
|
||||
[Comment("问题答案")]
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class TumorExportBaseModel : TU_TR_RSBaseModel
|
||||
{
|
||||
public List<TumorLessionInfo> LesionList { get; set; } = new List<TumorLessionInfo>();
|
||||
|
||||
public List<TumorCommonQustionInfo> QuestionAnswerList { get; set; }
|
||||
|
||||
public List<TumorGlobalQuestionAnserInfo> GlobalResultList { get; set; }
|
||||
|
||||
#region 后续处理额外添加字段
|
||||
|
||||
|
||||
|
||||
public DateTime? JudgeSignTime { get; set; }
|
||||
|
||||
public Guid? SourceSubjectVisitId { get; set; }
|
||||
|
||||
public List<decimal> SubjectCriterionReadingPeriodVisitNumList { get; set; }
|
||||
|
||||
public decimal VisitTaskNum { get; set; }
|
||||
|
||||
public ReadingTaskState ReadingTaskState { get; set; }
|
||||
|
||||
public ReadingCategory ReadingCategory { get; set; }
|
||||
|
||||
//裁判结果选择的访视或者全局任务Id
|
||||
public Arm? JudgeArmEnum { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
//在当前访视触发裁判,或者在截止日期小于等于当前访视的阅片期触发裁判
|
||||
[DictionaryTranslateAttribute("YesOrNoAudit")]
|
||||
public bool? IsTrigerJudge { get; set; }
|
||||
|
||||
//(如果是访视点裁判,则仅在所选阅片人对应访视 显示;如果是阅片期裁判,则在所选阅片人 阅片期内的所有访视 显示此原因)
|
||||
public string JudgeNote { get; set; } = string.Empty;
|
||||
|
||||
public string VisitNote { get; set; }
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class TU_TR_RSBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 方案编号 STUDYID
|
||||
/// </summary>
|
||||
public string ResearchProgramNo { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 域 DOMAIN TU TR RS
|
||||
/// </summary>
|
||||
public string Domain { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 取值类型 TUSPID TRSPID RSSPID
|
||||
/// </summary>
|
||||
public string ValueType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 受试者编号 USUBJID 实际展示TrialSiteSubjectCode
|
||||
/// </summary>
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 供应商 TUNAM (Extensive Imaging)
|
||||
/// </summary>
|
||||
public string Vendor { get; set; } = "Extensive Imaging";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 阅片人 TUEVAL TREVAL RSEVAL
|
||||
/// </summary>
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阅片人标识 TUEVALID TREVALID RSEVALID
|
||||
/// </summary>
|
||||
public Arm ArmEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 访视编号 VISITNUM
|
||||
/// </summary>
|
||||
public decimal? VisitNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 访视名称 VISIT
|
||||
/// </summary>
|
||||
public string? VisitName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 拍片日期 TUDTC TRDTC RSDTC
|
||||
/// </summary>
|
||||
public DateTime? LatestScanDate { get; set; }
|
||||
|
||||
public DateTime? EarliestScanDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// eCRF标识 TUREFID TRREFID RSREFID
|
||||
/// </summary>
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
|
||||
#region 移动位置
|
||||
|
||||
/// <summary>
|
||||
/// RSCAT 阅片标准
|
||||
/// </summary>
|
||||
public string CriterionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// RSACPTFL 裁定标记 TUACPTFL
|
||||
/// </summary>
|
||||
//裁判选择标记
|
||||
//根据裁判的任务结果 设置访视任务的这个字段 该字段表示 裁判认同该任务的结果
|
||||
public bool? IsJudgeSelect { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
public DateTime? SignTime { get; set; }
|
||||
|
||||
public string TaskName { get; set; }
|
||||
|
||||
#region 额外翻译字段
|
||||
|
||||
|
||||
|
||||
public string IsJudgeSelectStr => IsJudgeSelect == true ? "Y" : "";
|
||||
|
||||
public bool IsTargetPD { get; set; } = false;
|
||||
|
||||
public bool IsOverallResponsePD { get; set; } = false;
|
||||
|
||||
//TR表 靶病灶PD了,访视层级的都是最早拍片日期 RS表 整体肿瘤评估PD了,那么疗效评估的拍片日期都给最早的
|
||||
public bool IsPD => Domain == "TR" ? IsTargetPD : IsOverallResponsePD;
|
||||
|
||||
public string ArmEnumStr { get; set; }
|
||||
public string LatestScanDateStr
|
||||
{
|
||||
get
|
||||
{
|
||||
var date = IsPD ? EarliestScanDate : LatestScanDate;
|
||||
return date?.ToString("yyyy-MM-dd") ?? "";
|
||||
}
|
||||
}
|
||||
public string TrialSiteSubjectCode => ResearchProgramNo + SubjectCode;
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
public class TU_Export : TU_TR_RSBaseModel
|
||||
{
|
||||
|
||||
///// <summary>
|
||||
///// 取值类型 TUSPID
|
||||
///// </summary>
|
||||
//public string TUValueType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 序号 TUSEQ (同一个访视,所有阅片人选择病灶给个顺序号)
|
||||
/// </summary>
|
||||
public int No { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 链接ID TULNKID (阅片人角色_病灶编号)不同访视可以重复
|
||||
/// </summary>
|
||||
public string ARM_TumorNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 肿瘤识别简称 TUTESTCD
|
||||
/// </summary>
|
||||
public string TumorIdentificationSimple { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 肿瘤识别全称 TUTEST
|
||||
/// </summary>
|
||||
public string TumorIdentificationFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 肿瘤鉴定结果 TUORRES
|
||||
/// </summary>
|
||||
public string TumorIdentificationResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 肿瘤识别结果类型 TUSTRESC
|
||||
/// </summary>
|
||||
public string TumorIdentificationResultType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 部位 TULOC (对应病灶表的部位,需要国际化)
|
||||
/// </summary>
|
||||
public string BodyPart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 鉴定方法 TUMETHOD (Modality?)
|
||||
/// </summary>
|
||||
public string IdentificationMethod { get; set; }
|
||||
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 裁定标记 TUACPTFL
|
||||
///// </summary>
|
||||
//public bool? IsJudgeSelect { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 部位描述 LOCTEXT
|
||||
/// </summary>
|
||||
public string BodyPartDes { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class TR_Export : TU_TR_RSBaseModel
|
||||
{
|
||||
|
||||
///// <summary>
|
||||
///// 取值类型 TRSPID
|
||||
///// </summary>
|
||||
//public string TRValueType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 每个subject 按照顺序编号 TRSEQ
|
||||
/// </summary>
|
||||
public int TRSEQ { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///TRGRPID 组ID 对应TU表肿瘤鉴定结果 TumorIdentificationResult
|
||||
/// </summary>
|
||||
public string TRGRPID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// TRLNKID 链接ID 对应TU表的链接ID TumorNo(阅片人角色_病灶编号)
|
||||
/// </summary>
|
||||
public string ARM_TumorNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///TRLNKGRP 链接组 ARM-任务名(访视名) 对应RS的链接组
|
||||
/// </summary>
|
||||
public string ARM_VisitName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 肿瘤评估简称 TRTESTCD
|
||||
/// </summary>
|
||||
public string TumorAssessmentSimpleName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 肿瘤评估全称 TRTEST
|
||||
/// </summary>
|
||||
public string TumorAssessmentFullName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 原始测量 TRORRES
|
||||
/// </summary>
|
||||
public string OriginalMeasurements { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 原始单位 TRORRESU
|
||||
/// </summary>
|
||||
public string OriginalUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准结果(字符) TRSTRESC
|
||||
/// </summary>
|
||||
public string StandardResult_Character => OriginalMeasurements;
|
||||
|
||||
/// <summary>
|
||||
/// 标准结果(数值) TRORRESU
|
||||
/// </summary>
|
||||
public string StandardResult_Numeric => double.TryParse(OriginalMeasurements, out _) ||
|
||||
(OriginalMeasurements?.EndsWith("%") == true &&
|
||||
double.TryParse(OriginalMeasurements.TrimEnd('%'), out _))
|
||||
? OriginalMeasurements
|
||||
: "";
|
||||
|
||||
/// <summary>
|
||||
/// 标准单位 TRSTRESU
|
||||
/// </summary>
|
||||
public string StandardUnit => OriginalUnit;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 完成状态 TRSTAT
|
||||
/// </summary>
|
||||
public string CompletionStatus { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 完成状态 TRMETHOD
|
||||
/// </summary>
|
||||
public string IdentificationMethod { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 无法测量原因 TRREASND
|
||||
/// </summary>
|
||||
public string NotMeasuredReason { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class RS_Export : TU_TR_RSBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// RSSEQ 按照subject 的数据顺序编号
|
||||
/// </summary>
|
||||
public int RSSEQ { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// RSLNKGRP 链接组 ARM_任务名(访视名)
|
||||
/// </summary>
|
||||
public string ARM_VisitName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// RSTESTCD 疗效评估简称
|
||||
/// </summary>
|
||||
public string EfficacyEvaluationSimpleName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// RSTEST 疗效评估全称
|
||||
/// </summary>
|
||||
public string EfficacyEvaluationName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// RSORRES 响应评估原始结果
|
||||
/// </summary>
|
||||
public string RespondEfficacyAssessment { get; set; }
|
||||
/// <summary>
|
||||
/// RSSTRESC 标准疗效评估
|
||||
/// </summary>
|
||||
public string StandardEfficacyAssessment => RespondEfficacyAssessment;
|
||||
|
||||
/// <summary>
|
||||
/// RSSTAT 完成状态
|
||||
/// </summary>
|
||||
public string CompletionStatus { get; set; }
|
||||
/// <summary>
|
||||
/// RSREASND 无法评估原因
|
||||
/// </summary>
|
||||
public string NotAssessmentReason { get; set; }
|
||||
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 裁定标记 RSACPTFL
|
||||
///// </summary>
|
||||
//public bool? IsJudgeSelect { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// REASASM 评估原因
|
||||
/// </summary>
|
||||
public string AssessmentReason { get; set; }
|
||||
/// <summary>
|
||||
/// REASOVR 重新评估原因
|
||||
/// </summary>
|
||||
public string ReAssessmentReason { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// REASUPD 更新评估原因
|
||||
/// </summary>
|
||||
public string UpdateAssessmentReason { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public bool? IsOveralResponse { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class CO_Export : TU_TR_RSBaseModel
|
||||
{
|
||||
/// <summary>
|
||||
/// 关联域 RS:(访视点备注) 空:裁判选择原因
|
||||
/// </summary>
|
||||
public string RDOMAIN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// COSEQ 序号
|
||||
/// </summary>
|
||||
public int COSEQ { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// IDVAR 标识变量 RSSEQ 空:裁判选择原因
|
||||
/// </summary>
|
||||
public string IdentificationVariable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标识 IDVARVAL RSSEQ具体的值 空:裁判选择原因
|
||||
/// </summary>
|
||||
public string Identification { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// COREF 备注引用
|
||||
/// </summary>
|
||||
public string RemarksQuote { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注 COVAL
|
||||
/// </summary>
|
||||
public string Remarks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 裁决日期 CODTC
|
||||
/// </summary>
|
||||
public string CODTC { get; set; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,6 +2,7 @@
|
|||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Service.Common;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
|
|
@ -104,6 +105,14 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode));
|
||||
|
||||
|
||||
CreateMap<TumorExportBaseModel , TU_Export>();
|
||||
CreateMap<TumorExportBaseModel, TR_Export>();
|
||||
CreateMap<TumorExportBaseModel, RS_Export>();
|
||||
CreateMap<TumorExportBaseModel, CO_Export>();
|
||||
|
||||
CreateMap<IVUS_OCTBaseDto, IvusExportDto>();
|
||||
CreateMap<IVUS_OCTBaseDto, OctExportDto>();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// 测试定时发送
|
||||
/// 测试邮件定时发送
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> TestPush()
|
||||
|
|
@ -139,6 +139,22 @@ namespace IRaCIS.Core.Application.Services
|
|||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
|
||||
public async Task<IResponseOutput> TestSendEmail()
|
||||
{
|
||||
Task.Run(async () =>
|
||||
{
|
||||
// 创建独立作用域
|
||||
using (var scope = serviceScopeFactory.CreateScope())
|
||||
{
|
||||
// 从新作用域解析服务
|
||||
var mediator = scope.ServiceProvider.GetRequiredService<IMediator>();
|
||||
await mediator.Publish(new ImageQCRecurringEvent { TrialId= Guid.Parse("08de2254-5d7d-581a-0242-0a0001000000") });
|
||||
}
|
||||
});
|
||||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Setting 界面的 项目所有文档列表
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -1763,22 +1763,22 @@ x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.LesionNumber && x.Readi
|
|||
|
||||
await _trialEmailNoticeConfigRepository.SaveChangesAsync();
|
||||
|
||||
var cronInfo = await _trialEmailNoticeConfigRepository.Where(t => t.Id == addOrEditTrialEmailNoticeConfig.Id)
|
||||
.Select(t => new { t.Id, t.Code, TrialCode = t.Trial.TrialCode, t.EmailCron, t.BusinessScenarioEnum, t.TrialId })
|
||||
.FirstAsync();
|
||||
// var cronInfo = await _trialEmailNoticeConfigRepository.Where(t => t.Id == addOrEditTrialEmailNoticeConfig.Id)
|
||||
//.Select(t => new { t.Id, t.Code, TrialCode = t.Trial.TrialCode, t.EmailCron, t.BusinessScenarioEnum, t.TrialId })
|
||||
//.FirstAsync();
|
||||
|
||||
var jobId = $"{cronInfo.TrialId}({cronInfo.TrialCode})_({cronInfo.BusinessScenarioEnum})";
|
||||
// var jobId = $"{cronInfo.TrialId}({cronInfo.TrialCode})_({cronInfo.BusinessScenarioEnum})";
|
||||
|
||||
|
||||
if (addOrEditTrialEmailNoticeConfig.IsAutoSend)
|
||||
{
|
||||
HangfireJobHelper.AddOrUpdateTrialCronJob(jobId, addOrEditTrialEmailNoticeConfig.TrialId, addOrEditTrialEmailNoticeConfig.BusinessScenarioEnum, addOrEditTrialEmailNoticeConfig.EmailCron);
|
||||
// if (addOrEditTrialEmailNoticeConfig.IsAutoSend)
|
||||
// {
|
||||
// HangfireJobHelper.AddOrUpdateTrialCronJob(jobId, addOrEditTrialEmailNoticeConfig.TrialId, addOrEditTrialEmailNoticeConfig.BusinessScenarioEnum, addOrEditTrialEmailNoticeConfig.EmailCron);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
HangfireJobHelper.RemoveCronJob(jobId);
|
||||
}
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// HangfireJobHelper.RemoveCronJob(jobId);
|
||||
// }
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
||||
{
|
||||
|
|
@ -27,6 +28,9 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
|||
|
||||
public List<StudyBasicInfo> UploadStudyList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<StudyBasicInfo> OriginalTaskStudyList { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -116,6 +120,8 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
|||
public int ReadingSeriesCount { get; set; }
|
||||
|
||||
public int ReadingInstanceCount { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
}
|
||||
|
||||
public class NoneDicomStudyBasicInfo
|
||||
|
|
@ -140,5 +146,10 @@ namespace IRaCIS.Core.Application.Service.ImageAndDoc.DTO
|
|||
public int ReadingFileCount { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ImageMarkNoneDicomStudyBasicInfo: NoneDicomStudyBasicInfo
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public int FileCount { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class PreArchiveDicomStudyCommand
|
||||
|
|
@ -237,6 +238,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class TaskStudyArchiveConfirmResult
|
||||
|
|
@ -265,8 +269,9 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public AddOrUpdateStudyDto Study { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
}
|
||||
|
||||
public class NewArchiveStudyCommand
|
||||
|
|
@ -440,12 +445,17 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string? SubjectCode { get; set; }
|
||||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
}
|
||||
|
||||
public class IRTaskUploadedDicomStudyQuery
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
}
|
||||
|
||||
public class IRUploadTaskDicomStudyDto : DicomStudyBasicInfo
|
||||
|
|
@ -519,6 +529,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string TaskBlindName { get; set; }
|
||||
|
||||
public string TaskName { get; set; }
|
||||
|
||||
public string VisitName { get; set; }
|
||||
public Guid? SourceSubjectVisitId { get; set; }
|
||||
|
||||
public ReadingTaskState ReadingTaskState { get; set; }
|
||||
|
|
@ -540,7 +552,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public Guid VisitId { get; set; }
|
||||
|
||||
public List<DownloadDicomStudyDto> StudyList { get; set; }
|
||||
public List<DownloadNoneDicomStudyDto> NoneDicomStudyList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<DownloadDicomStudyDto> TaskStudyList { get; set; }
|
||||
|
||||
public List<DownloadNoneDicomStudyDto> NoneDicomStudyList { get; set; }
|
||||
}
|
||||
|
||||
public class DownloadDicomStudyDto
|
||||
|
|
@ -609,6 +625,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string? SubjectCode { get; set; }
|
||||
|
||||
public Guid? VisitTaskId { get; set; }
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -629,6 +647,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public List<Guid> NoneDicomStudyIdList { get; set; }
|
||||
|
||||
public bool? IsImageSegmentLabel { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class TrialKeyImageExportDTO
|
||||
|
|
@ -878,4 +898,90 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
public Guid TaskId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SubjectVisitMarkQuery:PageInput
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
|
||||
public string? SubjectCode { get; set; }
|
||||
|
||||
public bool? IsUrgent { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class SubjectVisitMarkDTO
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public bool IsUrgent { get; set; }
|
||||
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
public int? VisitCount { get; set; }
|
||||
|
||||
|
||||
public int? MarkIVUSVisitCount { get; set; }
|
||||
|
||||
public int? MarkOCTVisitCount { get; set; }
|
||||
|
||||
|
||||
public int? DicomStudyCount { get; set; }
|
||||
|
||||
public int? MarkDicomStudyCount { get; set; }
|
||||
|
||||
public int? NoneDicomStudyCount { get; set; }
|
||||
|
||||
public int? MarkNoneDicomStudyCount { get; set; }
|
||||
}
|
||||
|
||||
public class SubjectVisitMarkStudyDto
|
||||
{
|
||||
public bool IsDicom => DicomStudyList.Count() > 0;
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
public string VisitName { get; set; }
|
||||
|
||||
public Guid SourceSubjectVisitId { get; set; }
|
||||
|
||||
|
||||
public List<DicomStudyBasicInfo> DicomStudyList { get; set; } = new List<DicomStudyBasicInfo>();
|
||||
|
||||
public List<NoneDicomStudyBasicInfo> NoneDicomStudyList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SubjectVisitMarkUploadDto
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
public Guid TrialSiteId { get; set; }
|
||||
|
||||
public Guid SubejctId { get; set; }
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
public string VisitName { get; set; }
|
||||
|
||||
public Guid? SourceSubjectVisitId => SubjectVisitId;
|
||||
|
||||
//防止前端null 故意返回
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public List<StudyBasicInfo> OrginalStudyList { get; set; }
|
||||
|
||||
public List<StudyBasicInfo> UploadStudyList { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -3,7 +3,9 @@
|
|||
// 生成时间 2021-12-06 10:54:55
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using DocumentFormat.OpenXml.EMMA;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Medallion.Threading;
|
||||
|
|
@ -34,7 +36,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
[FromQuery] Guid? nonedicomStudyId,
|
||||
[FromQuery] bool isFilterZip,
|
||||
[FromQuery] Guid? visitTaskId,
|
||||
[FromQuery] bool isReading)
|
||||
[FromQuery] bool isReading,
|
||||
[FromQuery] bool? isImageSegmentLabel)
|
||||
{
|
||||
var qcAuditState = await _subjectVisitRepository.Where(s => s.Id == subjectVisitId).Select(t => t.AuditState).FirstOrDefaultAsync();
|
||||
|
||||
|
|
@ -44,33 +47,74 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
//质控过程中并且不是IQC时,可以看到删除的(不需要忽略过滤器) 质控中iqc 也需要看到删除的
|
||||
var isViewDelete = !isQCFinished;
|
||||
|
||||
var isFilterIVUSNoneDicom = false;
|
||||
|
||||
CriterionType? criterionType = null;
|
||||
|
||||
IQueryable<NoneDicomStudyView> noneDicomStudyQueryable = default;
|
||||
if (visitTaskId == null)
|
||||
if (visitTaskId == null || visitTaskId == Guid.Empty)
|
||||
{
|
||||
//质控过程中,需要忽略过滤质控设置删除的检查,以及设置删除的文件,质控通过后才
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId, ignoreQueryFilters: isViewDelete)
|
||||
.WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId)
|
||||
.WhereIf(isReading, t => t.IsReading && t.IsDeleted == false)
|
||||
if (visitTaskId == null)
|
||||
{
|
||||
|
||||
//质控过程中,需要忽略过滤质控设置删除的检查,以及设置删除的文件,质控通过后才
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId, ignoreQueryFilters: isViewDelete)
|
||||
.WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId)
|
||||
.WhereIf(isReading, t => t.IsReading && t.IsDeleted == false)
|
||||
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, isReading = isReading });
|
||||
}
|
||||
else
|
||||
{
|
||||
//靶段标注上传后查看影像
|
||||
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId, ignoreQueryFilters: isViewDelete)
|
||||
.WhereIf(isReading, t => t.IsReading && t.IsDeleted == false)
|
||||
.WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId)
|
||||
.ProjectTo<ImageLabelNoneDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, isReading = isReading });
|
||||
|
||||
}
|
||||
|
||||
|
||||
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, isReading = isReading });
|
||||
//ivus-在访视的时候visitTaskId==null 需要过滤掉空检查 ,但是在靶段标注的查看访视级别的时候不能过滤
|
||||
if (_subjectVisitRepository.Where(t => t.Id == subjectVisitId).SelectMany(t => t.Trial.TrialReadingCriterionList)
|
||||
.Where(t => t.CriterionType == CriterionType.IVUS || t.CriterionType == CriterionType.OCT).Distinct().Count() == 2
|
||||
&& visitTaskId == null)
|
||||
{
|
||||
isFilterIVUSNoneDicom = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Select(t => new { t.BlindSubjectCode, t.TrialReadingCriterionId, t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys }).FirstNotNullAsync();
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Select(t => new { t.BlindSubjectCode, t.TrialReadingCriterionId, t.TrialReadingCriterion.CriterionType, t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys }).FirstNotNullAsync();
|
||||
criterionType = taskinfo.CriterionType;
|
||||
|
||||
if ((taskinfo.CriterionType == CriterionType.IVUS || taskinfo.CriterionType == CriterionType.OCT) && isImageSegmentLabel == false)
|
||||
{
|
||||
//后处理原始影像预览
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.SubjectVisitId == subjectVisitId, ignoreQueryFilters: isViewDelete)
|
||||
.WhereIf(isReading, t => t.IsReading && t.IsDeleted == false)
|
||||
.WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId)
|
||||
.Where(t => taskinfo.IsImageFilter ? ("|" + taskinfo.CriterionModalitys + "|").Contains("|" + t.Modality + "|") : true)
|
||||
.ProjectTo<ImageLabelNoneDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, visiTaskId = visitTaskId, isReading = isReading });
|
||||
}
|
||||
else
|
||||
{
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.TaskNoneDicomFileList.Any(t => t.VisitTaskId == visitTaskId), ignoreQueryFilters: isViewDelete)
|
||||
.WhereIf(isReading, t => t.IsReading && t.IsDeleted == false)
|
||||
.Where(t => taskinfo.IsImageFilter ? ("|" + taskinfo.CriterionModalitys + "|").Contains("|" + t.Modality + "|") : true)
|
||||
.WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId)
|
||||
.ProjectTo<TaskDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, visiTaskId = visitTaskId, isReading = isReading });
|
||||
}
|
||||
|
||||
|
||||
noneDicomStudyQueryable = _noneDicomStudyRepository.Where(t => t.TaskNoneDicomFileList.Any(t => t.VisitTaskId == visitTaskId), ignoreQueryFilters: isViewDelete)
|
||||
.WhereIf(isReading, t => t.IsReading && t.IsDeleted == false)
|
||||
.Where(t => taskinfo.IsImageFilter ? ("|" + taskinfo.CriterionModalitys + "|").Contains("|" + t.Modality + "|") : true)
|
||||
.WhereIf(nonedicomStudyId != null, t => t.Id == nonedicomStudyId)
|
||||
.ProjectTo<TaskDicomStudyView>(_mapper.ConfigurationProvider, new { isFilterZip = isFilterZip, visiTaskId = visitTaskId, isReading = isReading });
|
||||
}
|
||||
|
||||
|
||||
var list = await noneDicomStudyQueryable.OrderBy(x => x.ImageDate).ThenBy(x => x.CreateTime).ToListAsync();
|
||||
|
||||
var config = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).Select(t => new { t.Trial.ImageFormatList, t.Trial.StudyNameList, t.Trial.IsShowStudyName, AuditState = qcAuditState }).FirstOrDefaultAsync();
|
||||
var list = await noneDicomStudyQueryable.Where(t => isFilterIVUSNoneDicom ? t.Modality != "IVUS" : true)
|
||||
.OrderBy(x => x.ImageDate).ThenBy(x => x.CreateTime).ToListAsync();
|
||||
|
||||
var config = await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).Select(t => new { t.Trial.ImageFormatList, t.Trial.StudyNameList, t.Trial.IsShowStudyName, AuditState = qcAuditState, CriterionType=criterionType }).FirstOrDefaultAsync();
|
||||
return ResponseOutput.Ok(list, config);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<DicomStudy, DicomStudyDTO>();
|
||||
CreateMap<DicomSeries, DicomSeriesDTO>()
|
||||
.ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.SubjectVisit.Subject.Code))
|
||||
.ForMember(o => o.VisitName, t => t.MapFrom(u => u.SubjectVisit.VisitName));
|
||||
.ForMember(o => o.VisitName, t => t.MapFrom(u => u.SubjectVisit.VisitName));
|
||||
CreateMap<SCPSeries, DicomSeriesDTO>();
|
||||
|
||||
|
||||
|
|
@ -136,6 +136,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.ReadingSeriesCount, u => u.MapFrom(s => s.SeriesList.Where(t => t.IsReading).Count()))
|
||||
.ForMember(d => d.ReadingInstanceCount, u => u.MapFrom(s => s.InstanceList.Where(t => t.IsReading && t.DicomSerie.IsReading).Count()));
|
||||
|
||||
CreateMap<TaskStudy, DicomStudyBasicInfo>()
|
||||
//.ForMember(d => d.SubjectVisitId, u => u.MapFrom(s => s.SubjectVisitId))
|
||||
.ForMember(d => d.ReadingSeriesCount, u => u.MapFrom(s => s.SeriesCount))
|
||||
.ForMember(d => d.ReadingInstanceCount, u => u.MapFrom(s => s.InstanceCount));
|
||||
|
||||
CreateMap<NoneDicomStudy, NoneDicomStudyBasicInfo>()
|
||||
.ForMember(d => d.ReadingFileCount, u => u.MapFrom(s => s.NoneDicomFileList.Where(t => t.IsReading).Count()));
|
||||
|
||||
|
|
@ -145,7 +150,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.CriterionModalitys, u => u.MapFrom(s => s.TrialReadingCriterion.CriterionModalitys))
|
||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code))
|
||||
.ForMember(d => d.DicomStudyList, u => u.MapFrom(s => s.SourceSubjectVisit.StudyList))
|
||||
.ForMember(d => d.NoneDicomStudyList, u => u.MapFrom(s => s.SourceSubjectVisit.NoneDicomStudyList.Where(t => t.IsReading)));
|
||||
.ForMember(d => d.NoneDicomStudyList, u => u.MapFrom(s => s.SourceSubjectVisit.NoneDicomStudyList.Where(t => t.IsReading)));
|
||||
|
||||
CreateMap<TrialImageDownload, TrialImageDownloadView>()
|
||||
.ForMember(d => d.UserFullName, u => u.MapFrom(s => s.CreateUserRole.FullName))
|
||||
|
|
@ -158,7 +163,25 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<SCPSeries, DicomSeriesDTO>();
|
||||
|
||||
CreateMap<NoneDicomEdit, NoneDicomStudy>();
|
||||
|
||||
|
||||
|
||||
CreateMap<SubjectVisit, SubjectVisitMarkStudyDto>()
|
||||
.ForMember(d => d.SourceSubjectVisitId, u => u.MapFrom(u => u.Id))
|
||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(u => u.Subject.Code))
|
||||
.ForMember(d => d.DicomStudyList, u => u.MapFrom(s => s.StudyList))
|
||||
.ForMember(d => d.NoneDicomStudyList, u => u.MapFrom(s => s.NoneDicomStudyList.Where(t => t.IsReading)));
|
||||
|
||||
|
||||
|
||||
CreateMap<NoneDicomStudy, ImageMarkNoneDicomStudyBasicInfo>()
|
||||
.ForMember(d => d.SubjectVisitId, u => u.MapFrom(s => s.SubjectVisitId))
|
||||
.ForMember(d => d.FileCount, u => u.MapFrom(s => s.ImageLabelNoneDicomFileList.Count()))
|
||||
.ForMember(d => d.ReadingFileCount, u => u.MapFrom(s => s.ImageLabelNoneDicomFileList.Count()));
|
||||
|
||||
CreateMap<ImageMarkNoneDicomStudyBasicInfo, NoneDicomStudyBasicInfo>();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -846,10 +846,26 @@ namespace IRaCIS.Core.Application.Service
|
|||
if (jsonObject["DictionaryCode"] != null && jsonObject["DictionaryCode"].ToString() != string.Empty)
|
||||
{
|
||||
|
||||
jsonObject[item.Code] = await _dictionaryRepository.Where(x => x.Code == jsonObject["DictionaryCode"].ToString()).Join(_dictionaryRepository.Where(x => x.Code == jsonObject[item.Code].ToString()), a => a.Id, b => b.ParentId, (a, b) => new
|
||||
|
||||
if (jsonObject[item.Code].ToString().Contains(","))
|
||||
{
|
||||
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
|
||||
}).Select(x => x.value).FirstOrDefaultAsync();
|
||||
var data = jsonObject[item.Code].ToString().Split(',').ToList();
|
||||
|
||||
var codeList = await _dictionaryRepository.Where(x => x.Code == jsonObject["DictionaryCode"].ToString()).Join(_dictionaryRepository.Where(x => data.Contains(x.Code)), a => a.Id, b => b.ParentId, (a, b) => new
|
||||
{
|
||||
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
|
||||
}).Select(x => x.value).ToListAsync();
|
||||
jsonObject[item.Code] = string.Join(",", codeList);
|
||||
}
|
||||
else
|
||||
{
|
||||
jsonObject[item.Code] = await _dictionaryRepository.Where(x => x.Code == jsonObject["DictionaryCode"].ToString()).Join(_dictionaryRepository.Where(x => x.Code == jsonObject[item.Code].ToString()), a => a.Id, b => b.ParentId, (a, b) => new
|
||||
{
|
||||
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
|
||||
}).Select(x => x.value).FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
jsonList.Add(jsonObject);
|
||||
|
|
@ -917,10 +933,25 @@ namespace IRaCIS.Core.Application.Service
|
|||
//通过字典项的code 翻译 枚举或者 bool
|
||||
else
|
||||
{
|
||||
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.Code == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new
|
||||
if (value.ToString().Contains(","))
|
||||
{
|
||||
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
|
||||
}).Select(x => x.value).FirstOrDefaultAsync();
|
||||
var data = value.ToString().Split(',').ToList();
|
||||
|
||||
var codeList = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => data.Contains(x.Code)), a => a.Id, b => b.ParentId, (a, b) => new
|
||||
{
|
||||
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
|
||||
}).Select(x => x.value).ToListAsync();
|
||||
jsonDataDic[item.Key] = string.Join(",", codeList);
|
||||
}
|
||||
else
|
||||
{
|
||||
jsonDataDic[item.Key] = await _dictionaryRepository.Where(x => x.Code == item.Code).Join(_dictionaryRepository.Where(x => x.Code == value.ToString()), a => a.Id, b => b.ParentId, (a, b) => new
|
||||
{
|
||||
value = _userInfo.IsEn_Us ? b.Value : b.ValueCN
|
||||
}).Select(x => x.value).FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,11 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
{
|
||||
}
|
||||
|
||||
public class ImageLabelNoneDicomStudyView : NoneDicomStudyView
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
///<summary>NoneDicomStudyQuery 列表查询参数模型</summary>
|
||||
public class NoneDicomStudyQuery
|
||||
{
|
||||
|
|
@ -55,6 +60,8 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string Modality { get; set; } = string.Empty;
|
||||
public DateTime ImageDate { get; set; }
|
||||
public string ModifyReason { get; set; }
|
||||
|
||||
public string BodyPartForEditOther { get; set; }
|
||||
}
|
||||
|
||||
///<summary> NoneDicomStudyAddOrEdit 列表查询参数模型</summary>
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ namespace IRaCIS.Core.Application.Contracts.DTO
|
|||
public string BodyPart { get; set; } = String.Empty;
|
||||
|
||||
public string ModifyReason { get; set; }
|
||||
|
||||
public string BodyPartForEditOther { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1246,6 +1246,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
//问题标识,肿瘤评估用于区分是什么问题
|
||||
public QuestionType? QuestionType { get; set; }
|
||||
|
||||
public OptionType OptionTypeEnum { get; set; }
|
||||
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
public string QuestionName { get; set; }
|
||||
|
|
@ -1411,6 +1415,7 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
public string TableName { get; set; }
|
||||
#endregion
|
||||
|
||||
public OptionType OptionTypeEnum { get; set; }
|
||||
|
||||
public Guid TableQuesionId { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1050,11 +1050,15 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
}
|
||||
else
|
||||
{
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.Id == updateModalityCommand.SubjectVisitId && t.SubmitState == SubmitStateEnum.Submitted && !t.QCChallengeList.Any(c => c.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload)))
|
||||
if (!_dicomStudyRepository.Where(t => t.Id == updateModalityCommand.Id).Any(t => t.CreateTime > t.SubjectVisit.SubmitTime))
|
||||
{
|
||||
//---提交之后,不允许修改!
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_NoModifyAfterSubmit"]);
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.Id == updateModalityCommand.SubjectVisitId && t.SubmitState == SubmitStateEnum.Submitted && !t.QCChallengeList.Any(c => c.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload)))
|
||||
{
|
||||
//---提交之后,不允许修改!
|
||||
throw new BusinessValidationFailedException(_localizer["QCOperation_NoModifyAfterSubmit"]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1128,13 +1132,19 @@ namespace IRaCIS.Core.Application.Image.QA
|
|||
public async Task<IResponseOutput> DeleteStudyList(Guid[] ids, Guid subjectVisitId, Guid trialId)
|
||||
{
|
||||
|
||||
//提交了 但是IQC同意的时候 是可以删除的 | 普通提交后也不能删除
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.Id == subjectVisitId && t.SubmitState == SubmitStateEnum.Submitted &&
|
||||
(!t.QCChallengeList.Any(u => u.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload))))
|
||||
if (!_dicomStudyRepository.Where(t => ids.Contains(t.Id)).All(t => t.CreateTime > t.SubjectVisit.SubmitTime))
|
||||
{
|
||||
//---CRC已经提交,不允许删除。
|
||||
return ResponseOutput.NotOk(_localizer["QCOperation_CrcNoDelete"]);
|
||||
//提交了 但是IQC同意的时候 是可以删除的 | 普通提交后也不能删除
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.Id == subjectVisitId && t.SubmitState == SubmitStateEnum.Submitted &&
|
||||
(!t.QCChallengeList.Any(u => u.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload))))
|
||||
{
|
||||
//---CRC已经提交,不允许删除。
|
||||
return ResponseOutput.NotOk(_localizer["QCOperation_CrcNoDelete"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var waitDeleteStudyList = await _dicomStudyRepository.Where(x => ids.Contains(x.Id), false, true).ToListAsync();
|
||||
|
||||
foreach (var item in waitDeleteStudyList)
|
||||
|
|
|
|||
|
|
@ -245,6 +245,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
.OrderBy(k => k.ReadingQuestionTrial.ShowOrder)
|
||||
.Select(c => new CommonQuesionInfo()
|
||||
{
|
||||
Unit=c.ReadingQuestionTrial.Unit,
|
||||
OptionTypeEnum=c.ReadingQuestionTrial.OptionTypeEnum,
|
||||
QuestionType = c.ReadingQuestionTrial.QuestionType,
|
||||
QuestionName = isEn_Us ? c.ReadingQuestionTrial.QuestionEnName : c.ReadingQuestionTrial.QuestionName,
|
||||
QuestionValue = c.IsGlobalChange ? c.GlobalChangeAnswer : c.Answer,
|
||||
|
|
@ -284,7 +286,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
.OrderBy(k => k.ReadingQuestionTrial.ShowOrder)
|
||||
.Select(c => new CommonQuesionInfo()
|
||||
{
|
||||
Unit=c.ReadingQuestionTrial.Unit,
|
||||
Group = isEn_Us ? c.ReadingQuestionTrial.GroupEnName : c.ReadingQuestionTrial.GroupName,
|
||||
QuestionType = c.ReadingQuestionTrial.QuestionType,
|
||||
OptionTypeEnum=c.ReadingQuestionTrial.OptionTypeEnum,
|
||||
QuestionId = c.ReadingQuestionTrial.Id,
|
||||
QuestionName = isEn_Us ? c.ReadingQuestionTrial.QuestionEnName : c.ReadingQuestionTrial.QuestionName,
|
||||
QuestionValue = c.IsGlobalChange ? c.GlobalChangeAnswer : c.Answer,
|
||||
|
|
@ -303,9 +308,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(o => o.LessionAnswerList, t => t.MapFrom(u => u.LesionAnswerList.Where(c => c.ReadingTableQuestionTrial.ExportResultStr.Contains(((int)readingExportType).ToString()))));
|
||||
|
||||
CreateMap<ReadingTableQuestionAnswer, CommonLessionQuestionAnswerInfo>()
|
||||
//.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark))
|
||||
//.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType))
|
||||
.ForMember(o => o.ShowOrder, t => t.MapFrom(u => u.ReadingTableQuestionTrial.ShowOrder))
|
||||
//.ForMember(o => o.LessionCode, t => t.MapFrom(u => u.Lesion.RowMark))
|
||||
//.ForMember(o => o.LessionType, t => t.MapFrom(u => (int?)u.ReadingQuestionTrial.LesionType))
|
||||
.ForMember(o => o.OptionTypeEnum, t => t.MapFrom(u => u.ReadingTableQuestionTrial.OptionTypeEnum))
|
||||
.ForMember(o => o.ShowOrder, t => t.MapFrom(u => u.ReadingTableQuestionTrial.ShowOrder))
|
||||
.ForMember(o => o.CustomUnit, t => t.MapFrom(u => u.ReadingTableQuestionTrial.CustomUnit))
|
||||
.ForMember(o => o.Unit, t => t.MapFrom(u => u.ReadingTableQuestionTrial.Unit))
|
||||
.ForMember(o => o.TableQuesionId, t => t.MapFrom(u => u.ReadingTableQuestionTrial.Id))
|
||||
|
|
@ -755,6 +761,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
.OrderBy(t => t.CreateTime).ThenBy(t => t.FileName)))
|
||||
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
|
||||
|
||||
CreateMap<NoneDicomStudy, ImageLabelNoneDicomStudyView>()
|
||||
.ForMember(d => d.NoneDicomStudyFileList, u => u.MapFrom(s =>
|
||||
s.ImageLabelNoneDicomFileList.Where(t => isFilterZip ? !t.FileType.Contains(StaticData.FileType.Zip) : true)
|
||||
.Where(t => isReading ? t.IsReading && t.IsDeleted == false : true)
|
||||
.OrderBy(t => t.CreateTime).ThenBy(t => t.FileName)))
|
||||
.ForMember(d => d.CodeView, u => u.MapFrom(s => s.StudyCode));
|
||||
|
||||
|
||||
CreateMap<SubjectVisitImageBackRecord, ImageBackViewModel>()
|
||||
.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.SubjectVisit.Subject.Code))
|
||||
|
|
|
|||
|
|
@ -252,21 +252,50 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// <summary>
|
||||
/// 第一次
|
||||
/// </summary>
|
||||
public int FirstData { get; set; }
|
||||
public decimal FirstData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第二次
|
||||
/// </summary>
|
||||
public int SecondData { get; set; }
|
||||
public decimal SecondData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第三次
|
||||
/// </summary>
|
||||
public int ThirdData { get; set; }
|
||||
public decimal ThirdData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润测量
|
||||
/// </summary>
|
||||
public string MacrophageInfiltrationMeasurement { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润角度测量
|
||||
/// </summary>
|
||||
public decimal? MacrophageInfiltrationAngle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 微通道测量
|
||||
/// </summary>
|
||||
public string MicrochannelMeasurement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 胆固醇结晶测量
|
||||
/// </summary>
|
||||
public string CholesterolCrystalMeasurement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 官腔面积测量
|
||||
/// </summary>
|
||||
public decimal? LumenAreaMeasurement { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public decimal Avg { get {
|
||||
|
||||
return ( FirstData*1m + SecondData * 1m + ThirdData * 1m) / 3;
|
||||
return ( FirstData + SecondData + ThirdData) / 3;
|
||||
} }
|
||||
}
|
||||
|
||||
|
|
@ -282,6 +311,27 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 值
|
||||
/// </summary>
|
||||
public decimal Data { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润测量
|
||||
/// </summary>
|
||||
public string MacrophageInfiltrationMeasurement { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 巨噬细胞浸润角度测量
|
||||
/// </summary>
|
||||
public decimal? MacrophageInfiltrationAngle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 微通道测量
|
||||
/// </summary>
|
||||
public string MicrochannelMeasurement { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 胆固醇结晶测量
|
||||
/// </summary>
|
||||
public string CholesterolCrystalMeasurement { get; set; }
|
||||
}
|
||||
|
||||
public class FileToDataTableDto
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
public string QuestionEnName { get; set; }
|
||||
|
||||
public bool IsCanEditPosition { get; set; } = false;
|
||||
|
||||
public string BlindName { get; set; }
|
||||
|
|
@ -136,6 +138,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public string? ReportMark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
/// <summary>
|
||||
/// 高亮问题的答案
|
||||
/// </summary>
|
||||
|
|
@ -192,6 +204,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
}
|
||||
|
||||
public class Globalanswer
|
||||
{
|
||||
public Guid TaskId { get; set; }
|
||||
|
||||
public string Answer { get; set; }
|
||||
|
||||
public decimal VisitTaskNum { get; set; }
|
||||
|
||||
public Guid? QuestionId { get; set; }
|
||||
}
|
||||
|
||||
public class LesionDto
|
||||
{
|
||||
|
|
@ -527,6 +549,42 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public new decimal? RowIndex { get; set; }
|
||||
}
|
||||
|
||||
public class GetReportsChartDataOutDto
|
||||
{
|
||||
public List<string> VisitTaskNameList { get; set; }
|
||||
|
||||
public List<DateTime?> LatestScanDateList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
public List<ReportChartData> ChartDataList { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class ReportChartData
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public List<string> Value { get; set; }
|
||||
}
|
||||
|
||||
public class GetReportsChartDataInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid? QuestionId { get; set; }
|
||||
|
||||
public Guid? TableQuestionId { get; set; }
|
||||
|
||||
public decimal? RowIndex { get; set; }
|
||||
|
||||
public ReportChartType? ReportChartTypeEnum { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetPreviousOtherPicturePathInDto
|
||||
|
|
@ -1005,6 +1063,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public int? PageShowOrder { get; set; }
|
||||
|
||||
public bool IsPreinstall { get {
|
||||
return this.TableQuestions.Questions.Any(x => x.IsPreinstall);
|
||||
} }
|
||||
|
||||
|
||||
|
||||
public List<TrialReadQuestionData> Childrens { get; set; }
|
||||
|
|
@ -1448,6 +1510,19 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public string Answer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
/// </summary>
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自定义单位
|
||||
/// </summary>
|
||||
public string? CustomUnit { get; set; }
|
||||
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 问题类型
|
||||
|
|
@ -1789,6 +1864,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自定义单位
|
||||
/// </summary>
|
||||
public string? CustomUnit { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
|
|
@ -2235,6 +2317,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自定义单位
|
||||
/// </summary>
|
||||
public string? CustomUnit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
/// </summary>
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
|
||||
public JudgeReadingQuestionType QuestionType { get; set; } = JudgeReadingQuestionType.Question;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -572,6 +572,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
|
|
@ -697,6 +698,19 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public string Answer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
/// </summary>
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 自定义单位
|
||||
/// </summary>
|
||||
public string? CustomUnit { get; set; }
|
||||
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -324,6 +324,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public ImageMark? ImageMarkEnum { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否预设
|
||||
/// </summary>
|
||||
public bool IsPreinstall { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 影像工具
|
||||
/// </summary>
|
||||
|
|
@ -425,6 +431,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 数据来源
|
||||
/// </summary>
|
||||
public DataSources? DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
|
||||
|
|
@ -513,6 +530,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否预设
|
||||
/// </summary>
|
||||
public bool IsPreinstall { get; set; } = false;
|
||||
|
||||
public bool IsCopy { get; set; } = false;
|
||||
|
||||
|
||||
|
|
@ -550,6 +572,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public DataSources? DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
|
|
@ -1234,6 +1266,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public DataSources? DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// </summary>
|
||||
|
|
@ -1345,6 +1387,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public DataSources? DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
|
|
@ -1692,6 +1744,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
|
|
@ -1809,6 +1862,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
[Comment("数据来源")]
|
||||
public DataSources DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
[Comment("限制编辑")]
|
||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||
|
||||
|
|
@ -2215,6 +2278,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public DataSources? DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
|
|
@ -2627,6 +2700,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public DataSources? DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -243,6 +243,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
var visitTaskAnswer = await _readingTaskQuestionAnswerRepository.Where(x => taskIds.Contains(x.VisitTaskId) && x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo
|
||||
{
|
||||
Answer = x.Answer,
|
||||
Unit=x.ReadingQuestionTrial.Unit,
|
||||
ValueType=x.ReadingQuestionTrial.ValueType,
|
||||
CustomUnit=x.ReadingQuestionTrial.CustomUnit,
|
||||
VisitTaskId = x.VisitTaskId,
|
||||
DictionaryCode = x.ReadingQuestionTrial.DictionaryCode,
|
||||
ShowOrder = x.ReadingQuestionTrial.ShowOrder,
|
||||
|
|
@ -331,6 +334,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
ShowOrder = data.ShowOrder,
|
||||
ParentId = data.ParentId,
|
||||
TypeValue = data.TypeValue,
|
||||
|
||||
Answer = leftquestionAnswer.Answer
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -847,7 +847,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改想想项目表格问题
|
||||
/// 新增修改项目表格问题
|
||||
/// </summary>
|
||||
/// <param name="indto"></param>
|
||||
/// <returns></returns>
|
||||
|
|
@ -861,6 +861,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
//---问题编号重复
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||
}
|
||||
if (indto.IsPreinstall)
|
||||
{
|
||||
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.ReadingQuestionId == indto.ReadingQuestionId && x.Id != indto.Id && x.IsPreinstall))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_OnlyOnePreinstall"]);
|
||||
}
|
||||
}
|
||||
|
||||
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
||||
|
|
|
|||
|
|
@ -269,7 +269,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
ShowOrder = y.ReadingQuestionTrial.ShowOrder,
|
||||
Type = y.ReadingQuestionTrial.Type,
|
||||
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
||||
ValueType = y.ReadingQuestionTrial.ValueType,
|
||||
CustomUnit = y.ReadingQuestionTrial.CustomUnit,
|
||||
Unit = y.ReadingQuestionTrial.Unit,
|
||||
IsJudgeQuestion = y.ReadingQuestionTrial.IsJudgeQuestion,
|
||||
Answer = y.Answer,
|
||||
}).ToList()
|
||||
|
|
@ -313,7 +314,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
ValueType = y.ValueType,
|
||||
IsJudgeQuestion = y.IsJudgeQuestion,
|
||||
Answer = string.Empty,
|
||||
|
||||
CustomUnit = y.CustomUnit,
|
||||
});
|
||||
|
||||
}
|
||||
|
|
@ -399,7 +400,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
JudgeType = lr.question.JudgeType,
|
||||
TypeValue = lr.question.TypeValue,
|
||||
ValueType = lr.question.ValueType,
|
||||
|
||||
CustomUnit = lr.question.CustomUnit,
|
||||
}).ToList();
|
||||
|
||||
|
||||
|
|
@ -524,7 +525,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
ShowOrder = x.Dictionary.ShowOrder,
|
||||
ParentCode = x.Dictionary.Parent.Code,
|
||||
Value = x.Dictionary.Value,
|
||||
ValueCN = x.Dictionary.ValueCN
|
||||
ValueCN = x.Dictionary.ValueCN,
|
||||
}).OrderBy(x => x.ParentCode).ThenBy(x => x.ShowOrder).ToListAsync();
|
||||
result.AssessTypeList = assessTypeList;
|
||||
|
||||
|
|
|
|||
|
|
@ -78,6 +78,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取报告图表数据
|
||||
/// </summary>
|
||||
/// <param name=""></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<GetReportsChartDataOutDto> GetReportsChartData(GetReportsChartDataInDto inDto)
|
||||
{
|
||||
return await _readingCalculateService.GetReportsChartData(inDto);
|
||||
}
|
||||
|
||||
#region 计算
|
||||
|
||||
|
|
@ -3176,7 +3186,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
//验证后处理影像必须传
|
||||
if (_visitTaskRepository.Any(t => t.Id == inDto.VisitTaskId && t.TrialReadingCriterion.ImageUploadEnum != ReadingImageUpload.None))
|
||||
{
|
||||
if (!_taskStudyRepository.Any(t => t.VisitTaskId == inDto.VisitTaskId))
|
||||
// 校验当前访视存在上传的非dicom文件就可以提交了
|
||||
|
||||
if (!_taskStudyRepository.Any(t => t.VisitTaskId == inDto.VisitTaskId) && !_noneDicomStudyFileRepository.Any(t=>t.VisitTaskId==inDto.VisitTaskId) )
|
||||
{
|
||||
return ResponseOutput.NotOk(_localizer["ReadingImage_BackImageNotExist"]);
|
||||
}
|
||||
|
|
@ -3641,7 +3653,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
task.ReadingVersionEnum = criterionInfo.ReadingVersionEnum;
|
||||
task.ReadingToolList = criterionInfo.ReadingToolList;
|
||||
task.IsExistUnprocessedFeedback = await _userFeedBackRepository.AnyAsync(x => x.VisitTaskId == task.VisitTaskId && x.State == 0);
|
||||
task.IsViewStudyPart= visitTaskInfo.IsViewStudyPart;
|
||||
task.IsViewStudyPart = visitTaskInfo.ReadingCategory == ReadingCategory.Judge || visitTaskInfo.IsViewStudyPart;
|
||||
// 添加默认答案
|
||||
if (inDto.VisitTaskId == null && visitTaskInfo.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -265,6 +265,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
Answer = x.Answer,
|
||||
Type = x.ReadingQuestionTrial.Type,
|
||||
Unit = x.ReadingQuestionTrial.Unit,
|
||||
CustomUnit= x.ReadingQuestionTrial.CustomUnit,
|
||||
ValueType=x.ReadingQuestionTrial.ValueType,
|
||||
|
||||
QuestionId = x.ReadingQuestionTrial.Id,
|
||||
QuestionName = x.ReadingQuestionTrial.QuestionName.LanguageName(x.ReadingQuestionTrial.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionGenre = x.ReadingQuestionTrial.QuestionGenre,
|
||||
|
|
@ -314,10 +317,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
Answer = x.Answer,
|
||||
Type = x.Type,
|
||||
Unit = x.Unit,
|
||||
CustomUnit=x.CustomUnit,
|
||||
|
||||
QuestionId = x.QuestionId!.Value,
|
||||
QuestionName = x.QuestionName,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
ValueType=x.ValueType,
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
|
|
@ -358,6 +364,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
QuestionName = x.QuestionName,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
ValueType=x.ValueType,
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
x.CriterionName,
|
||||
x.Id,
|
||||
x.ReadingTool,
|
||||
x.CriterionType,
|
||||
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
|
|
@ -216,7 +217,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
IsReadingShowSubjectInfo = criterionInfo.IsReadingShowSubjectInfo,
|
||||
IsExistsClinicalData = isExistsClinicalData,
|
||||
TrialCriterionName = criterionInfo.CriterionName,
|
||||
TrialCriterionId = criterionInfo.Id
|
||||
TrialCriterionId = criterionInfo.Id,
|
||||
criterionInfo.CriterionType,
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,6 +202,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
||||
ValueType = y.ReadingQuestionTrial.ValueType,
|
||||
IsJudgeQuestion = y.ReadingQuestionTrial.IsJudgeQuestion,
|
||||
Unit = y.ReadingQuestionTrial.Unit,
|
||||
CustomUnit = y.ReadingQuestionTrial.CustomUnit,
|
||||
Answer = y.Answer,
|
||||
}).ToList()
|
||||
}).ToListAsync();
|
||||
|
|
@ -285,6 +287,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
QuestionName = y.QuestionName,
|
||||
QuestionGenre = y.QuestionGenre,
|
||||
DictionaryCode = y.DictionaryCode,
|
||||
Unit=y.Unit,
|
||||
CustomUnit=y.CustomUnit,
|
||||
ValueType = y.ValueType,
|
||||
Answer = y.Answer
|
||||
}).ToList();
|
||||
x.IsHaveChange = result.ReadingCategory == ReadingCategory.Visit ? false : globalVisits.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Any(y => y.IsHaveChange);
|
||||
|
|
|
|||
|
|
@ -15,6 +15,16 @@ namespace IRaCIS.Core.Application.Service
|
|||
//是否英文环境
|
||||
var isEn_Us = false;
|
||||
|
||||
CreateMap<ReadingQuestionTrial, ReadingReportDto>()
|
||||
.ForMember(d => d.QuestionId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
CreateMap<ReadingTableQuestionTrial, ReadingReportDto>()
|
||||
.ForMember(d => d.QuestionId, u => u.MapFrom(s => s.ReadingQuestionId))
|
||||
.ForMember(d => d.TableQuestionId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
|
||||
|
||||
|
||||
//标准Id
|
||||
List<Guid> CriterionIds = new List<Guid>();
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using IRaCIS.Core.Domain.Models;
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
using MassTransit.Saga;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MiniExcelLibs;
|
||||
|
|
@ -27,7 +28,185 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
IOSSService oSSService, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IGeneralCalculateService
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 构造阅片报告问题
|
||||
/// </summary>
|
||||
/// <param name="questionList"></param>
|
||||
/// <param name="taskInfoList"></param>
|
||||
/// <param name="globalanswerList"></param>
|
||||
/// <param name="answers"></param>
|
||||
/// <param name="tableAnsweRowInfos"></param>
|
||||
/// <param name="tableQuestionList"></param>
|
||||
/// <param name="alltableAnsweRowInfos"></param>
|
||||
/// <param name="tableAnswers"></param>
|
||||
/// <param name="organInfos"></param>
|
||||
/// <param name="needChangeType"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<ReadingReportDto>> GetReadingReportQuestion(
|
||||
List<ReadingQuestionTrial>? questionList,
|
||||
List<VisitTaskInfo> taskInfoList,
|
||||
List<Globalanswer>? globalanswerList,
|
||||
List<ReadingTaskQuestionAnswer>? answers,
|
||||
List<TableAnsweRowInfo>? tableAnsweRowInfos,
|
||||
List<ReadingTableQuestionTrial> tableQuestionList,
|
||||
List<ReadingTableAnswerRowInfo> alltableAnsweRowInfos,
|
||||
List<ReadingTableQuestionAnswer> tableAnswers,
|
||||
List<OrganInfo> organInfos,
|
||||
List<QuestionMark?> needChangeType
|
||||
)
|
||||
{
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = _mapper.Map<List<ReadingReportDto>>(questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder));
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.QuestionName = item.QuestionName.LanguageName(item.QuestionEnName, _userInfo.IsEn_Us);
|
||||
item.ReportLayType = ReportLayType.Group;
|
||||
|
||||
item.Childrens = _mapper.Map<List<ReadingReportDto>>(questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder));
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
question.QuestionName = question.QuestionName.LanguageName(question.QuestionEnName, _userInfo.IsEn_Us);
|
||||
question.ReportLayType = ReportLayType.Question;
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
|
||||
question.Childrens = rowlist.Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + x.RowIndex.GetLesionMark(),
|
||||
SplitOrMergeLesionName = x.MergeName.IsNullOrEmpty() ? x.SplitName : x.MergeName,
|
||||
SplitOrMergeType = x.SplitOrMergeType,
|
||||
LesionType = question.LesionType,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
IsCanEditPosition = x.IsCanEditPosition,
|
||||
RowIndex = x.RowIndex,
|
||||
BlindName = x.BlindName,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = _mapper.Map<List<ReadingReportDto>>(tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId));
|
||||
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
tableQuestion.QuestionName = tableQuestion.QuestionName.LanguageName(tableQuestion.QuestionEnName, _userInfo.IsEn_Us);
|
||||
tableQuestion.LesionType = question.LesionType;
|
||||
tableQuestion.RowId = row.RowId;
|
||||
tableQuestion.IsShowInDicom = question.IsShowInDicom;
|
||||
tableQuestion.RowIndex = row.RowIndex;
|
||||
tableQuestion.ReportLayType = ReportLayType.TableQuestion;
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
;
|
||||
}
|
||||
#endregion
|
||||
|
||||
return questions;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using IRaCIS.Core.Application.Service.Reading.Dto;
|
|||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
|
@ -42,7 +43,173 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{CriterionType.mRECISTHCC,typeof(MRECISTHCCCalculateService) },
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// 获取报告图表数据
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<GetReportsChartDataOutDto> GetReportsChartData(GetReportsChartDataInDto inDto)
|
||||
{
|
||||
var criterionId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.TrialReadingCriterionId).FirstNotNullAsync();
|
||||
|
||||
var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == criterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
|
||||
|
||||
var data = await GetReadingReportEvaluation(new GetReadingReportEvaluationInDto()
|
||||
{
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
});
|
||||
|
||||
GetReportsChartDataOutDto result = new GetReportsChartDataOutDto()
|
||||
{
|
||||
VisitTaskNameList = data.VisitTaskList.Select(x => x.BlindName).ToList(),
|
||||
LatestScanDateList = data.VisitTaskList.Select(x => x.LatestScanDate).ToList(),
|
||||
ChartDataList = new List<ReportChartData>() { },
|
||||
};
|
||||
|
||||
|
||||
result.VisitTaskNameList = data.VisitTaskList.Select(x => x.BlindName).ToList();
|
||||
|
||||
if (inDto.ReportChartTypeEnum != null)
|
||||
{
|
||||
switch (inDto.ReportChartTypeEnum)
|
||||
{
|
||||
case ReportChartType.Target:
|
||||
{
|
||||
// 这是病灶
|
||||
var target = data.TaskQuestions.SelectMany(x => x.Childrens)
|
||||
.Where(x => x.LesionType == LesionType.TargetLesion).SelectMany(x => x.Childrens)
|
||||
.ToList();
|
||||
|
||||
|
||||
foreach (var item in target)
|
||||
{
|
||||
ReportChartData chartData = new ReportChartData()
|
||||
{
|
||||
Name = item.QuestionName,
|
||||
Value = new List<string>(),
|
||||
};
|
||||
|
||||
for (var i = 0; i < result.VisitTaskNameList.Count; i++)
|
||||
{
|
||||
|
||||
switch (criterionType)
|
||||
{
|
||||
case CriterionType.RECIST1Point1:
|
||||
case CriterionType.RECIST1Pointt1_MB:
|
||||
case CriterionType.mRECISTHCC:
|
||||
case CriterionType.IRECIST1Point1:
|
||||
// 淋巴结的短径
|
||||
if (item.Childrens.Any(x => x.QuestionMark == QuestionMark.IsLymph && x.Answer[i].Answer.EqEnum(ReadingYesOrNo.Yes)))
|
||||
{
|
||||
chartData.Value.Add(item.Childrens.Where(x => x.QuestionMark == QuestionMark.ShortAxis).Select(x => x.Answer[i].Answer).FirstOrDefault());
|
||||
result.Unit = item.Childrens.Where(x => x.QuestionMark == QuestionMark.ShortAxis).Select(x => x.Unit).FirstOrDefault();
|
||||
}
|
||||
else
|
||||
{
|
||||
chartData.Value.Add(item.Childrens.Where(x => x.QuestionMark == QuestionMark.MajorAxis).Select(x => x.Answer[i].Answer).FirstOrDefault());
|
||||
result.Unit = item.Childrens.Where(x => x.QuestionMark == QuestionMark.ShortAxis).Select(x => x.Unit).FirstOrDefault();
|
||||
}
|
||||
break;
|
||||
|
||||
case CriterionType.Lugano2014:
|
||||
case CriterionType.Lugano2014WithoutPET:
|
||||
chartData.Value.Add(item.Childrens.Where(x => x.QuestionMark == QuestionMark.PPD).Select(x => x.Answer[i].Answer).FirstOrDefault());
|
||||
result.Unit = item.Childrens.Where(x => x.QuestionMark == QuestionMark.PPD).Select(x => x.Unit).FirstOrDefault();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
result.ChartDataList.Add(chartData);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
case ReportChartType.BaseLineTarget:
|
||||
// 这是病灶
|
||||
var baseTarget = data.TaskQuestions.SelectMany(x => x.Childrens)
|
||||
.Where(x => x.LesionType == LesionType.BaselineLesions).SelectMany(x => x.Childrens)
|
||||
.ToList();
|
||||
|
||||
foreach (var item in baseTarget)
|
||||
{
|
||||
ReportChartData chartData = new ReportChartData()
|
||||
{
|
||||
Name = item.QuestionName,
|
||||
Value = new List<string>(),
|
||||
};
|
||||
|
||||
for (var i = 0; i < result.VisitTaskNameList.Count; i++)
|
||||
{
|
||||
|
||||
chartData.Value.Add(item.Childrens.Where(x => x.QuestionMark == QuestionMark.LesionNumber).Select(x => x.Answer[i].Answer).FirstOrDefault());
|
||||
result.Unit = item.Childrens.Where(x => x.QuestionMark == QuestionMark.LesionNumber).Select(x => x.Unit).FirstOrDefault();
|
||||
|
||||
|
||||
}
|
||||
|
||||
result.ChartDataList.Add(chartData);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (inDto.QuestionId != null)
|
||||
{
|
||||
var question = data.TaskQuestions.SelectMany(x => x.Childrens)
|
||||
.Where(x => x.QuestionId == inDto.QuestionId.Value).FirstOrDefault();
|
||||
if (question != null)
|
||||
{
|
||||
result.Unit = question.Unit;
|
||||
ReportChartData chartData = new ReportChartData()
|
||||
{
|
||||
Name = question.QuestionName,
|
||||
Value = new List<string>(),
|
||||
};
|
||||
foreach (var answer in question.Answer)
|
||||
{
|
||||
chartData.Value.Add(answer.Answer);
|
||||
}
|
||||
result.ChartDataList.Add(chartData);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
var lesion = data.TaskQuestions
|
||||
// 问题 靶病灶
|
||||
.SelectMany(x => x.Childrens)
|
||||
// 病灶
|
||||
.SelectMany(x => x.Childrens).Where(x => x.RowIndex == inDto.RowIndex)
|
||||
// 表格问题
|
||||
.SelectMany(x => x.Childrens).Where(x => x.TableQuestionId == inDto.TableQuestionId)
|
||||
|
||||
.FirstOrDefault();
|
||||
|
||||
if (lesion != null)
|
||||
{
|
||||
result.Unit = lesion.Unit;
|
||||
ReportChartData chartData = new ReportChartData()
|
||||
{
|
||||
Name = lesion.QuestionName,
|
||||
Value = new List<string>(),
|
||||
};
|
||||
foreach (var answer in lesion.Answer)
|
||||
{
|
||||
chartData.Value.Add(answer.Answer);
|
||||
}
|
||||
result.ChartDataList.Add(chartData);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 阅片导入
|
||||
|
|
|
|||
|
|
@ -146,12 +146,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new Globalanswer()
|
||||
{
|
||||
x.TaskId,
|
||||
x.GlobalVisitTask.VisitTaskNum,
|
||||
x.QuestionId,
|
||||
x.Answer
|
||||
TaskId= x.TaskId,
|
||||
VisitTaskNum= x.GlobalVisitTask.VisitTaskNum,
|
||||
QuestionId= x.QuestionId,
|
||||
Answer= x.Answer
|
||||
}).ToListAsync();
|
||||
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var organIds = alltableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
|
|
@ -165,217 +165,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
// 第一级
|
||||
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
GroupName = x.GroupName,
|
||||
GroupEnName = x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Group,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
QuestionId = x.Id,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Type = x.Type,
|
||||
QuestionType = x.QuestionType,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
OrderMark = x.OrderMark,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Question,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
question.Childrens = new List<ReadingReportDto>();
|
||||
|
||||
var rowoindexs = lesionsIndexs.Where(x => x.QuestionId == question.QuestionId).Select(x => x.Rowindexs.OrderBy(y => y).ToList()).FirstOrDefault();
|
||||
rowoindexs = rowoindexs == null ? new List<decimal>() : rowoindexs;
|
||||
foreach (var rowoindex in rowoindexs)
|
||||
{
|
||||
var rowinfo = rowlist.Where(x => x.RowIndex == rowoindex).FirstOrDefault();
|
||||
question.Childrens.Add(new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + rowoindex.GetLesionMark(),
|
||||
RowId = rowinfo?.Id,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
SplitOrMergeLesionName = rowinfo != null ? (rowinfo.MergeName.IsNullOrEmpty() ? rowinfo.SplitName : rowinfo.MergeName) : string.Empty,
|
||||
SplitOrMergeType = rowinfo != null ? (rowinfo.SplitOrMergeType) : null,
|
||||
LesionType = question.LesionType,
|
||||
IsCanEditPosition = rowinfo != null ? (rowinfo.IsCanEditPosition) : false,
|
||||
RowIndex = rowoindex,
|
||||
BlindName = rowinfo != null ? rowinfo.BlindName : string.Empty,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
ReportMark = rowinfo != null ? rowinfo.ReportMark : string.Empty,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
Type = x.Type,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
RowId = row.RowId,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionMark = x.QuestionMark,
|
||||
TypeValue = x.TypeValue,
|
||||
RowIndex = row.RowIndex,
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
ReportLayType = ReportLayType.TableQuestion,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
List<ReadingReportDto> questions = await _generalCalculateService.GetReadingReportQuestion
|
||||
(
|
||||
questionList,
|
||||
taskInfoList,
|
||||
globalanswerList,
|
||||
answers,
|
||||
tableAnsweRowInfos,
|
||||
tableQuestionList,
|
||||
alltableAnsweRowInfos,
|
||||
tableAnswers,
|
||||
organInfos,
|
||||
needChangeType
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -166,12 +166,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new Globalanswer()
|
||||
{
|
||||
x.TaskId,
|
||||
x.GlobalVisitTask.VisitTaskNum,
|
||||
x.QuestionId,
|
||||
x.Answer
|
||||
TaskId = x.TaskId,
|
||||
VisitTaskNum = x.GlobalVisitTask.VisitTaskNum,
|
||||
QuestionId = x.QuestionId,
|
||||
Answer = x.Answer
|
||||
}).ToListAsync();
|
||||
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var organIds = alltableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
|
|
@ -185,217 +185,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
// 第一级
|
||||
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
GroupName = x.GroupName,
|
||||
GroupEnName = x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Group,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
QuestionId = x.Id,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Type = x.Type,
|
||||
QuestionType = x.QuestionType,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
OrderMark = x.OrderMark,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Question,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
question.Childrens = new List<ReadingReportDto>();
|
||||
|
||||
var rowoindexs = lesionsIndexs.Where(x => x.QuestionId == question.QuestionId).Select(x => x.Rowindexs.OrderBy(y => y).ToList()).FirstOrDefault();
|
||||
rowoindexs = rowoindexs == null ? new List<decimal>() : rowoindexs;
|
||||
foreach (var rowoindex in rowoindexs)
|
||||
{
|
||||
var rowinfo = rowlist.Where(x => x.RowIndex == rowoindex).FirstOrDefault();
|
||||
question.Childrens.Add(new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + rowoindex.GetLesionMark(),
|
||||
RowId = rowinfo?.Id,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
SplitOrMergeLesionName = rowinfo != null ? (rowinfo.MergeName.IsNullOrEmpty() ? rowinfo.SplitName : rowinfo.MergeName) : string.Empty,
|
||||
SplitOrMergeType = rowinfo != null ? (rowinfo.SplitOrMergeType) : null,
|
||||
LesionType = question.LesionType,
|
||||
IsCanEditPosition = rowinfo != null ? (rowinfo.IsCanEditPosition) : false,
|
||||
RowIndex = rowoindex,
|
||||
BlindName = rowinfo != null ? rowinfo.BlindName : string.Empty,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
ReportMark = rowinfo != null ? rowinfo.ReportMark : string.Empty,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
Type = x.Type,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
RowId = row.RowId,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionMark = x.QuestionMark,
|
||||
TypeValue = x.TypeValue,
|
||||
RowIndex = row.RowIndex,
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
ReportLayType = ReportLayType.TableQuestion,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
List<ReadingReportDto> questions = await _generalCalculateService.GetReadingReportQuestion
|
||||
(
|
||||
questionList,
|
||||
taskInfoList,
|
||||
globalanswerList,
|
||||
answers,
|
||||
tableAnsweRowInfos,
|
||||
tableQuestionList,
|
||||
alltableAnsweRowInfos,
|
||||
tableAnswers,
|
||||
organInfos,
|
||||
needChangeType
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
@ -476,8 +278,18 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var needAddList = new List<ReadingTaskQuestionAnswer>();
|
||||
|
||||
// 计算斑块数据统计和PVA数据
|
||||
await this.CalculatePatchDataStatisticsAndPVA(inDto);
|
||||
inDto = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
|
||||
List<ComputationTrigger> computationTriggers = new List<ComputationTrigger>()
|
||||
{
|
||||
ComputationTrigger.PatchDataStatistics,
|
||||
ComputationTrigger.SaveEICRFQuestions,
|
||||
|
||||
};
|
||||
if (!computationTriggers.Contains(inDto.ComputationTrigger))
|
||||
{
|
||||
// 计算斑块统计数据
|
||||
await this.CalculatePatchDataStatisticsAndPVA(inDto);
|
||||
inDto = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
|
||||
}
|
||||
|
||||
List<ReadingCalculateData> calculateList = new List<ReadingCalculateData>()
|
||||
{
|
||||
|
|
@ -650,33 +462,44 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
};
|
||||
|
||||
List<IVUSMeasuredValue> measuredValueList = new List<IVUSMeasuredValue>();
|
||||
var errorRow = new List<int> { };
|
||||
|
||||
|
||||
for (int i = 3; i < dataTable.Rows.Count; i++)
|
||||
for (int i = 3; i < dataTable.Rows.Count; i++)
|
||||
{
|
||||
IVUSMeasuredValue iVUSMeasuredValue = new IVUSMeasuredValue() { };
|
||||
try
|
||||
{
|
||||
IVUSMeasuredValue iVUSMeasuredValue = new IVUSMeasuredValue() { };
|
||||
try
|
||||
iVUSMeasuredValue = new IVUSMeasuredValue()
|
||||
{
|
||||
iVUSMeasuredValue = new IVUSMeasuredValue()
|
||||
{
|
||||
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
Emm = getdecimalData(dataTable.Rows[i]["B"].ToString()),
|
||||
Lumen = getdecimalData(dataTable.Rows[i]["C"].ToString()),
|
||||
};
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
|
||||
}
|
||||
|
||||
if (iVUSMeasuredValue.Emm <= iVUSMeasuredValue.Lumen)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_EmmBiggerThenLumen"]);
|
||||
}
|
||||
measuredValueList.Add(iVUSMeasuredValue);
|
||||
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
Emm = getdecimalData(dataTable.Rows[i]["B"].ToString()),
|
||||
Lumen = getdecimalData(dataTable.Rows[i]["C"].ToString()),
|
||||
};
|
||||
}
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
errorRow.Add(i+1);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (iVUSMeasuredValue.Emm <= iVUSMeasuredValue.Lumen)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_EmmBiggerThenLumen"]);
|
||||
}
|
||||
measuredValueList.Add(iVUSMeasuredValue);
|
||||
}
|
||||
if (errorRow.Count() > 0)
|
||||
{
|
||||
var errorRows= string.Join(',', errorRow.Select(i => i.ToString()));
|
||||
throw new BusinessValidationFailedException(_localizer["Service_TemplateException", errorRows]);
|
||||
}
|
||||
List<int> nums = new List<int>() { 1, 2, 3 };
|
||||
if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]);
|
||||
}
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
|
||||
|
||||
var questionInfo = await _readingQuestionTrialRepository.Where(x =>x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId&& x.LesionType == LesionType.MatchValues).FirstNotNullAsync();
|
||||
|
|
@ -933,6 +756,21 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
TableQuestionId = pAvTableQuestionList.Where(x => x.QuestionMark == QuestionMark.PAV).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 添加PAV其他问题答案
|
||||
foreach (var otherQuestion in pAvTableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newPAVRowId)))
|
||||
{
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = string.Empty,
|
||||
QuestionId = pAVquestionInfo!.QuestionId,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newPAVRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = otherQuestion.Id,
|
||||
});
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
@ -975,6 +813,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
TableQuestionId = otherQuestion.Id,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => (x.QuestionId == questionInfo.QuestionId || x.QuestionId == pAVquestionInfo.QuestionId) && x.VisitTaskId == inDto.VisitTaskId);
|
||||
|
|
@ -992,6 +832,29 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// <returns></returns>
|
||||
public async Task VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
||||
var question = await _readingQuestionTrialRepository.Where(x => x.LesionType == LesionType.PAV && x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).FirstNotNullAsync();
|
||||
|
||||
|
||||
var tableQuestions = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == question.Id)
|
||||
.Where(x => x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show).ToListAsync();
|
||||
|
||||
var rowinfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == question.Id).Include(x => x.ReadingQuestionTrial).OrderBy(x => x.RowIndex).ToListAsync();
|
||||
|
||||
var tableQuesionAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == question.Id).ToListAsync();
|
||||
|
||||
foreach (var item in rowinfoList)
|
||||
{
|
||||
foreach (var tq in tableQuestions)
|
||||
{
|
||||
var answer = tableQuesionAnswerList.Where(x => x.TableQuestionId == tq.Id && x.RowId == item.Id).FirstOrDefault();
|
||||
if (answer == null || answer.Answer.IsNullOrEmpty())
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["OCTTableRequired", item.ReadingQuestionTrial.OrderMark + item.RowIndex.GetLesionMark()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,19 @@ namespace IRaCIS.Core.Application.Service
|
|||
public interface IGeneralCalculateService
|
||||
{
|
||||
|
||||
Task<List<ReadingReportDto>> GetReadingReportQuestion(
|
||||
List<ReadingQuestionTrial>? questionList,
|
||||
List<VisitTaskInfo> taskInfoList,
|
||||
List<Globalanswer>? globalanswerList,
|
||||
List<ReadingTaskQuestionAnswer>? answers,
|
||||
List<TableAnsweRowInfo>? tableAnsweRowInfos,
|
||||
List<ReadingTableQuestionTrial> tableQuestionList,
|
||||
List<ReadingTableAnswerRowInfo> alltableAnsweRowInfos,
|
||||
List<ReadingTableQuestionAnswer> tableAnswers,
|
||||
List<OrganInfo> organInfos,
|
||||
List<QuestionMark?> needChangeType
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// 获取ReadingCalculateDto
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -14,8 +14,13 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <returns></returns>
|
||||
Task CalculateTask(CalculateTaskInDto inDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取报告图表数据
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<GetReportsChartDataOutDto> GetReportsChartData(GetReportsChartDataInDto inDto);
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 验证访视提交
|
||||
|
|
|
|||
|
|
@ -133,12 +133,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new Globalanswer()
|
||||
{
|
||||
x.TaskId,
|
||||
x.GlobalVisitTask.VisitTaskNum,
|
||||
x.QuestionId,
|
||||
x.Answer
|
||||
TaskId = x.TaskId,
|
||||
VisitTaskNum = x.GlobalVisitTask.VisitTaskNum,
|
||||
QuestionId = x.QuestionId,
|
||||
Answer = x.Answer
|
||||
}).ToListAsync();
|
||||
|
||||
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
|
|
@ -153,207 +153,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
// 第一级
|
||||
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
GroupName = x.GroupName,
|
||||
GroupEnName = x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Group,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
QuestionId = x.Id,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Type = x.Type,
|
||||
QuestionType = x.QuestionType,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
OrderMark = x.OrderMark,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Question,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
|
||||
question.Childrens = rowlist.Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + x.RowIndex.GetLesionMark(),
|
||||
SplitOrMergeLesionName = x.MergeName.IsNullOrEmpty() ? x.SplitName : x.MergeName,
|
||||
SplitOrMergeType = x.SplitOrMergeType,
|
||||
LesionType = question.LesionType,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
IsCanEditPosition = x.IsCanEditPosition,
|
||||
RowIndex = x.RowIndex,
|
||||
BlindName = x.BlindName,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
Type = x.Type,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
RowId = row.RowId,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionMark = x.QuestionMark,
|
||||
TypeValue = x.TypeValue,
|
||||
RowIndex = row.RowIndex,
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
ReportLayType = ReportLayType.TableQuestion,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
List<ReadingReportDto> questions = await _generalCalculateService.GetReadingReportQuestion
|
||||
(
|
||||
questionList,
|
||||
taskInfoList,
|
||||
globalanswerList,
|
||||
answers,
|
||||
tableAnsweRowInfos,
|
||||
tableQuestionList,
|
||||
alltableAnsweRowInfos,
|
||||
tableAnswers,
|
||||
organInfos,
|
||||
needChangeType
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -134,12 +134,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new Globalanswer()
|
||||
{
|
||||
x.TaskId,
|
||||
x.GlobalVisitTask.VisitTaskNum,
|
||||
x.QuestionId,
|
||||
x.Answer
|
||||
TaskId = x.TaskId,
|
||||
VisitTaskNum = x.GlobalVisitTask.VisitTaskNum,
|
||||
QuestionId = x.QuestionId,
|
||||
Answer = x.Answer
|
||||
}).ToListAsync();
|
||||
|
||||
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
|
|
@ -154,207 +154,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
// 第一级
|
||||
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
GroupName = x.GroupName,
|
||||
GroupEnName = x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Group,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
QuestionId = x.Id,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Type = x.Type,
|
||||
QuestionType = x.QuestionType,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
OrderMark = x.OrderMark,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Question,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
|
||||
question.Childrens = rowlist.Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + x.RowIndex.GetLesionMark(),
|
||||
SplitOrMergeLesionName = x.MergeName.IsNullOrEmpty() ? x.SplitName : x.MergeName,
|
||||
SplitOrMergeType = x.SplitOrMergeType,
|
||||
LesionType = question.LesionType,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
IsCanEditPosition = x.IsCanEditPosition,
|
||||
RowIndex = x.RowIndex,
|
||||
BlindName = x.BlindName,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
Type = x.Type,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
RowId = row.RowId,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionMark = x.QuestionMark,
|
||||
TypeValue = x.TypeValue,
|
||||
RowIndex = row.RowIndex,
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
ReportLayType = ReportLayType.TableQuestion,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
List<ReadingReportDto> questions = await _generalCalculateService.GetReadingReportQuestion
|
||||
(
|
||||
questionList,
|
||||
taskInfoList,
|
||||
globalanswerList,
|
||||
answers,
|
||||
tableAnsweRowInfos,
|
||||
tableQuestionList,
|
||||
alltableAnsweRowInfos,
|
||||
tableAnswers,
|
||||
organInfos,
|
||||
needChangeType
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -106,12 +106,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
}).ToList();
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new Globalanswer()
|
||||
{
|
||||
x.TaskId,
|
||||
x.GlobalVisitTask.VisitTaskNum,
|
||||
x.QuestionId,
|
||||
x.Answer
|
||||
TaskId = x.TaskId,
|
||||
VisitTaskNum = x.GlobalVisitTask.VisitTaskNum,
|
||||
QuestionId = x.QuestionId,
|
||||
Answer = x.Answer
|
||||
}).ToListAsync();
|
||||
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var organIds = alltableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
|
|
@ -125,207 +125,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
// 第一级
|
||||
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
GroupName = x.GroupName,
|
||||
GroupEnName = x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Group,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
QuestionId = x.Id,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Type = x.Type,
|
||||
QuestionType = x.QuestionType,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
OrderMark = x.OrderMark,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Question,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
|
||||
question.Childrens = rowlist.Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + x.RowIndex.GetLesionMark(),
|
||||
SplitOrMergeLesionName = x.MergeName.IsNullOrEmpty() ? x.SplitName : x.MergeName,
|
||||
SplitOrMergeType = x.SplitOrMergeType,
|
||||
LesionType = question.LesionType,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
IsCanEditPosition = x.IsCanEditPosition,
|
||||
RowIndex = x.RowIndex,
|
||||
BlindName = x.BlindName,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
Type = x.Type,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
RowId = row.RowId,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionMark = x.QuestionMark,
|
||||
TypeValue = x.TypeValue,
|
||||
RowIndex = row.RowIndex,
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
ReportLayType = ReportLayType.TableQuestion,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
List<ReadingReportDto> questions = await _generalCalculateService.GetReadingReportQuestion
|
||||
(
|
||||
questionList,
|
||||
taskInfoList,
|
||||
globalanswerList,
|
||||
answers,
|
||||
tableAnsweRowInfos,
|
||||
tableQuestionList,
|
||||
alltableAnsweRowInfos,
|
||||
tableAnswers,
|
||||
organInfos,
|
||||
needChangeType
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -108,12 +108,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new Globalanswer()
|
||||
{
|
||||
x.TaskId,
|
||||
x.GlobalVisitTask.VisitTaskNum,
|
||||
x.QuestionId,
|
||||
x.Answer
|
||||
TaskId = x.TaskId,
|
||||
VisitTaskNum = x.GlobalVisitTask.VisitTaskNum,
|
||||
QuestionId = x.QuestionId,
|
||||
Answer = x.Answer
|
||||
}).ToListAsync();
|
||||
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var organIds = alltableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
|
|
@ -127,227 +127,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
// 第一级
|
||||
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
GroupName = x.GroupName.LanguageName(x.GroupEnName, _userInfo.IsEn_Us),
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionType = x.QuestionType,
|
||||
DataSource = x.DataSource,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
LimitEdit = x.LimitEdit,
|
||||
MaxAnswerLength = x.MaxAnswerLength,
|
||||
FileType = x.FileType,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Group,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName.LanguageName(x.GroupEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.Id,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
DataSource = x.DataSource,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
GroupEnName = x.GroupEnName,
|
||||
LimitEdit = x.LimitEdit,
|
||||
MaxAnswerLength = x.MaxAnswerLength,
|
||||
FileType = x.FileType,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Type = x.Type,
|
||||
QuestionType = x.QuestionType,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
OrderMark = x.OrderMark,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Question,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
question.Childrens = new List<ReadingReportDto>();
|
||||
|
||||
var rowoindexs = lesionsIndexs.Where(x => x.QuestionId == question.QuestionId).Select(x => x.Rowindexs.OrderBy(y => y).ToList()).FirstOrDefault();
|
||||
rowoindexs = rowoindexs == null ? new List<decimal>() : rowoindexs;
|
||||
foreach (var rowoindex in rowoindexs)
|
||||
{
|
||||
var rowinfo = rowlist.Where(x => x.RowIndex == rowoindex).FirstOrDefault();
|
||||
question.Childrens.Add(new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + rowoindex.GetLesionMark(),
|
||||
RowId = rowinfo?.Id,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
SplitOrMergeLesionName = rowinfo != null ? (rowinfo.MergeName.IsNullOrEmpty() ? rowinfo.SplitName : rowinfo.MergeName) : string.Empty,
|
||||
SplitOrMergeType = rowinfo != null ? (rowinfo.SplitOrMergeType) : null,
|
||||
LesionType = question.LesionType,
|
||||
IsCanEditPosition = rowinfo != null ? (rowinfo.IsCanEditPosition) : false,
|
||||
RowIndex = rowoindex,
|
||||
BlindName = rowinfo != null ? rowinfo.BlindName : string.Empty,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
Type = x.Type,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
DataSource = x.DataSource,
|
||||
LimitEdit = x.LimitEdit,
|
||||
MaxAnswerLength = x.MaxAnswerLength,
|
||||
FileType = x.FileType,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionMark = x.QuestionMark,
|
||||
TypeValue = x.TypeValue,
|
||||
RowIndex = row.RowIndex,
|
||||
RowId = row.RowId,
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
CustomUnit = x.CustomUnit,
|
||||
Unit = x.Unit,
|
||||
ReportLayType = ReportLayType.TableQuestion,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
List<ReadingReportDto> questions = await _generalCalculateService.GetReadingReportQuestion
|
||||
(
|
||||
questionList,
|
||||
taskInfoList,
|
||||
globalanswerList,
|
||||
answers,
|
||||
tableAnsweRowInfos,
|
||||
tableQuestionList,
|
||||
alltableAnsweRowInfos,
|
||||
tableAnswers,
|
||||
organInfos,
|
||||
needChangeType
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using DocumentFormat.OpenXml.Drawing.Diagrams;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
|
|
@ -160,12 +161,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new Globalanswer()
|
||||
{
|
||||
x.TaskId,
|
||||
x.GlobalVisitTask.VisitTaskNum,
|
||||
x.QuestionId,
|
||||
x.Answer
|
||||
TaskId = x.TaskId,
|
||||
VisitTaskNum = x.GlobalVisitTask.VisitTaskNum,
|
||||
QuestionId = x.QuestionId,
|
||||
Answer = x.Answer
|
||||
}).ToListAsync();
|
||||
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var organIds = alltableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
|
|
@ -177,219 +178,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
QuestionMark.Part,
|
||||
};
|
||||
|
||||
// 第一级
|
||||
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
GroupName = x.GroupName,
|
||||
GroupEnName = x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Group,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
QuestionId = x.Id,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Type = x.Type,
|
||||
QuestionType = x.QuestionType,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
OrderMark = x.OrderMark,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Question,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
question.Childrens = new List<ReadingReportDto>();
|
||||
|
||||
var rowoindexs = lesionsIndexs.Where(x => x.QuestionId == question.QuestionId).Select(x => x.Rowindexs.OrderBy(y => y).ToList()).FirstOrDefault();
|
||||
rowoindexs = rowoindexs == null ? new List<decimal>() : rowoindexs;
|
||||
foreach (var rowoindex in rowoindexs)
|
||||
{
|
||||
var rowinfo = rowlist.Where(x => x.RowIndex == rowoindex).FirstOrDefault();
|
||||
question.Childrens.Add(new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + rowoindex.GetLesionMark(),
|
||||
RowId = rowinfo?.Id,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
SplitOrMergeLesionName = rowinfo != null ? (rowinfo.MergeName.IsNullOrEmpty() ? rowinfo.SplitName : rowinfo.MergeName) : string.Empty,
|
||||
SplitOrMergeType = rowinfo != null ? (rowinfo.SplitOrMergeType) : null,
|
||||
LesionType = question.LesionType,
|
||||
IsCanEditPosition = rowinfo != null ? (rowinfo.IsCanEditPosition) : false,
|
||||
RowIndex = rowoindex,
|
||||
BlindName = rowinfo != null ? rowinfo.BlindName : string.Empty,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
ReportMark = rowinfo != null ? rowinfo.ReportMark : string.Empty,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
Type = x.Type,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
RowId = row.RowId,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionMark = x.QuestionMark,
|
||||
TypeValue = x.TypeValue,
|
||||
RowIndex = row.RowIndex,
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
ReportLayType = ReportLayType.TableQuestion,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
List<ReadingReportDto> questions = await _generalCalculateService.GetReadingReportQuestion
|
||||
(
|
||||
questionList,
|
||||
taskInfoList,
|
||||
globalanswerList,
|
||||
answers,
|
||||
tableAnsweRowInfos,
|
||||
tableQuestionList,
|
||||
alltableAnsweRowInfos,
|
||||
tableAnswers,
|
||||
organInfos,
|
||||
needChangeType
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
@ -513,26 +314,103 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]);
|
||||
}
|
||||
|
||||
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
||||
|
||||
try
|
||||
var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
|
||||
decimal getdecimalData(string value)
|
||||
{
|
||||
for (int i = 3; i < dataTable.Rows.Count; i++)
|
||||
return decimal.Parse(decimal.Round(decimal.Parse(value ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString()));
|
||||
}
|
||||
|
||||
|
||||
decimal? getdecimalEmptyData(string value)
|
||||
{
|
||||
if (value == string.Empty)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return decimal.Parse(decimal.Round(decimal.Parse(value ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString()));
|
||||
}
|
||||
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
||||
var errorRow = new List<int> { };
|
||||
|
||||
for (int i = 3; i < dataTable.Rows.Count; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
measuredValueList.Add(new OCTFCTUploadData()
|
||||
{
|
||||
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
FirstData = int.Parse(dataTable.Rows[i]["B"].ToString()),
|
||||
SecondData = int.Parse(dataTable.Rows[i]["C"].ToString()),
|
||||
ThirdData = int.Parse(dataTable.Rows[i]["D"].ToString()),
|
||||
FirstData = getdecimalData(dataTable.Rows[i]["B"].ToString()),
|
||||
SecondData = getdecimalData(dataTable.Rows[i]["C"].ToString()),
|
||||
ThirdData = getdecimalData(dataTable.Rows[i]["D"].ToString()),
|
||||
MacrophageInfiltrationMeasurement = dataTable.Rows[i]["E"].ToString() ?? string.Empty,
|
||||
MacrophageInfiltrationAngle = getdecimalEmptyData(dataTable.Rows[i]["F"].ToString() ?? string.Empty),
|
||||
MicrochannelMeasurement =dataTable.Rows[i]["G"].ToString() ?? string.Empty,
|
||||
CholesterolCrystalMeasurement = dataTable.Rows[i]["H"].ToString() ?? string.Empty,
|
||||
LumenAreaMeasurement = getdecimalEmptyData(dataTable.Rows[i]["I"].ToString() ?? string.Empty),
|
||||
});
|
||||
}
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
errorRow.Add(i+1);
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
|
||||
|
||||
|
||||
if (errorRow.Count() > 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
|
||||
var errorRows = string.Join(',', errorRow.Select(i => i.ToString()));
|
||||
throw new BusinessValidationFailedException(_localizer["Service_TemplateException", errorRows]);
|
||||
}
|
||||
|
||||
List<int> nums = new List<int>() { 1, 2, 3 };
|
||||
if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]);
|
||||
}
|
||||
|
||||
Dictionary<string, string> isPresent = new Dictionary<string, string>()
|
||||
{
|
||||
{ "有","1"},
|
||||
{ "无","0"},
|
||||
{ "Existence","1"},
|
||||
{ "Non-existence","0"},
|
||||
{ string.Empty,string.Empty},
|
||||
};
|
||||
|
||||
int row = 3;
|
||||
foreach (var item in measuredValueList)
|
||||
{
|
||||
row++;
|
||||
try
|
||||
{
|
||||
if (isPresent[item.MacrophageInfiltrationMeasurement] == "1"&& item.MacrophageInfiltrationAngle==null)
|
||||
{
|
||||
errorRow.Add(row);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((isPresent[item.MacrophageInfiltrationMeasurement] == "0"|| isPresent[item.MacrophageInfiltrationMeasurement]==string.Empty) && item.MacrophageInfiltrationAngle != null)
|
||||
{
|
||||
errorRow.Add(row);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
errorRow.Add(row);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (errorRow.Count() > 0)
|
||||
{
|
||||
var errorRows = string.Join(',', errorRow.Select(i => i.ToString()));
|
||||
throw new BusinessValidationFailedException(_localizer["Service_TemplateException", errorRows]);
|
||||
}
|
||||
|
||||
var questionInfo = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.LesionType == LesionType.FCT).FirstNotNullAsync();
|
||||
|
|
@ -542,6 +420,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var maxnum = 0;
|
||||
|
||||
|
||||
|
||||
foreach (var item in measuredValueList)
|
||||
{
|
||||
|
|
@ -579,7 +458,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
if (taskinfo.TrialReadingCriterion.DigitPlaces != -1)
|
||||
{
|
||||
var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
|
||||
avg = decimal.Round(decimal.Parse(avg ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
||||
|
||||
}
|
||||
|
|
@ -629,6 +507,75 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.AvgFCT).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
try
|
||||
{
|
||||
// 新加的5个问题
|
||||
// 巨噬细胞浸润测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = isPresent[item.MacrophageInfiltrationMeasurement.ToString()],
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = maxnum,
|
||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.MacrophageInfiltrationMeasurement).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 巨噬细胞浸润角度测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = item.MacrophageInfiltrationAngle.ToString(),
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = maxnum,
|
||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.MacrophageInfiltrationAngle).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 微通道测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = isPresent[item.MicrochannelMeasurement.ToString()],
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = maxnum,
|
||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.MicrochannelMeasurement).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 胆固醇结晶测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = isPresent[item.CholesterolCrystalMeasurement.ToString()],
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = maxnum,
|
||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.CholesterolCrystalMeasurement).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 官腔面积测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = item.LumenAreaMeasurement.ToString(),
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = maxnum,
|
||||
TableQuestionId = tableQuestionList.Where(x => x.ReadingQuestionId == questionInfo.Id && x.QuestionMark == QuestionMark.LumenAreaMeasurement).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
|
||||
}
|
||||
|
||||
|
||||
// 添加其他问题答案
|
||||
foreach (var otherQuestion in tableQuestionList.Where(x => !tableAnswers.Any(y => y.TableQuestionId == x.Id && y.RowId == newRowId)))
|
||||
|
|
@ -716,27 +663,51 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
throw new BusinessValidationFailedException(_localizer["IVUS_UploadVisitTaskError"]);
|
||||
}
|
||||
|
||||
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
||||
|
||||
try
|
||||
var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
|
||||
decimal getdecimalData(string value)
|
||||
{
|
||||
for (int i = 3; i < dataTable.Rows.Count; i++)
|
||||
return decimal.Parse(decimal.Round(decimal.Parse(value ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString()));
|
||||
}
|
||||
;
|
||||
|
||||
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
||||
var errorRow = new List<int> { };
|
||||
|
||||
for (int i = 3; i < dataTable.Rows.Count; i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
measuredValueList.Add(new OCTFCTUploadData()
|
||||
{
|
||||
PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
FirstData = int.Parse(dataTable.Rows[i]["B"].ToString()),
|
||||
|
||||
FirstData = getdecimalData(dataTable.Rows[i]["B"].ToString()),
|
||||
|
||||
});
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
errorRow.Add(i+1);
|
||||
}
|
||||
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
measuredValueList = measuredValueList.OrderBy(x => x.PlaqueNum).ToList();
|
||||
|
||||
if (errorRow.Count() > 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUS_UplpadDataError"]);
|
||||
var errorRows = string.Join(',', errorRow.Select(i => i.ToString()));
|
||||
throw new BusinessValidationFailedException(_localizer["Service_TemplateException", errorRows]);
|
||||
}
|
||||
|
||||
|
||||
List<int> nums = new List<int>() { 1, 2, 3 };
|
||||
if (measuredValueList.Any(x => !nums.Contains(x.PlaqueNum)))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["IVUSOCT_PlaqueNum123"]);
|
||||
}
|
||||
|
||||
|
||||
foreach (var item in measuredValueList)
|
||||
{
|
||||
if (item.FirstData > 360)
|
||||
|
|
@ -789,7 +760,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
if (taskinfo.TrialReadingCriterion.DigitPlaces != -1)
|
||||
{
|
||||
var digitPlaces = taskinfo.TrialReadingCriterion.DigitPlaces ?? 0;
|
||||
avg = decimal.Round(decimal.Parse(avg ?? "0"), digitPlaces, MidpointRounding.AwayFromZero).ToString("F" + digitPlaces.ToString());
|
||||
|
||||
}
|
||||
|
|
@ -983,6 +953,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
PlaqueNum = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.PlaqueNumber).Select(x => int.Parse(x.Answer)).FirstOrDefault(),
|
||||
Data = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.AvgFCT).Select(x => decimal.Parse(x.Answer)).FirstOrDefault(),
|
||||
MacrophageInfiltrationMeasurement = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.MacrophageInfiltrationMeasurement).Select(x => x.Answer).FirstOrDefault()??string.Empty,
|
||||
MacrophageInfiltrationAngle = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.MacrophageInfiltrationAngle).Select(x => x.Answer.IsNullOrEmptyReturnNull()).FirstOrDefault(),
|
||||
MicrochannelMeasurement = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.MicrochannelMeasurement).Select(x => x.Answer).FirstOrDefault() ?? string.Empty,
|
||||
CholesterolCrystalMeasurement = item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.CholesterolCrystalMeasurement).Select(x => x.Answer).FirstOrDefault() ?? string.Empty,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1087,6 +1061,66 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.AvgMinFCT).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 巨噬细胞浸润测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = oCTFCTInfos.Any(x => x.PlaqueNum == item && x.MacrophageInfiltrationMeasurement != string.Empty) ?
|
||||
oCTFCTInfos.Any(x => x.PlaqueNum == item&&x.MacrophageInfiltrationMeasurement.EqEnum(IsPresent.Existence))? IsPresent.Existence.GetEnumInt(): IsPresent.NonExistence.GetEnumInt()
|
||||
:string.Empty,
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = patchDataStatisticsInfo.Id,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.MacrophageInfiltration).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 巨噬细胞浸润角度测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = oCTFCTInfos.Where(x => x.PlaqueNum == item&&x.MacrophageInfiltrationAngle!=null).Count() == 0 ? string.Empty : oCTFCTInfos.Where(x => x.PlaqueNum == item).Max(x=>x.MacrophageInfiltrationAngle??0).ToString(),
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = patchDataStatisticsInfo.Id,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.MacrophageExtensionAngle).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 微通道
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = oCTFCTInfos.Any(x => x.PlaqueNum == item && x.MicrochannelMeasurement != string.Empty) ?
|
||||
oCTFCTInfos.Any(x => x.PlaqueNum == item && x.MicrochannelMeasurement.EqEnum(IsPresent.Existence)) ? IsPresent.Existence.GetEnumInt() : IsPresent.NonExistence.GetEnumInt()
|
||||
:string.Empty,
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = patchDataStatisticsInfo.Id,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.Microchannels).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 胆固醇结晶测量
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = oCTFCTInfos.Any(x => x.PlaqueNum == item && x.CholesterolCrystalMeasurement != string.Empty) ?
|
||||
oCTFCTInfos.Any(x => x.PlaqueNum == item && x.CholesterolCrystalMeasurement.EqEnum(IsPresent.Existence)) ? IsPresent.Existence.GetEnumInt() : IsPresent.NonExistence.GetEnumInt()
|
||||
:string.Empty,
|
||||
Id = NewId.NextGuid(),
|
||||
QuestionId = patchDataStatisticsInfo.Id,
|
||||
TrialId = inDto.TrialId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
RowId = newRowId,
|
||||
RowIndex = item,
|
||||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.CholesterolCrystallization).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
|
||||
|
||||
// 脂质角度平均值
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
|
|
@ -1113,7 +1147,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
TableQuestionId = patchDataTableQuestion.Where(x => x.QuestionMark == QuestionMark.MaxAvgLipidAngle).Select(x => x.Id).FirstOrDefault(),
|
||||
});
|
||||
|
||||
// 待定指标
|
||||
// 斑块类型
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = string.Empty,
|
||||
|
|
|
|||
|
|
@ -136,6 +136,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
GroupName = x.GroupName,
|
||||
GroupEnName = x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
ShowChartTypeEnum=x.ShowChartTypeEnum,
|
||||
OptionTypeEnum= x.OptionTypeEnum,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
|
|
@ -163,6 +165,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
GroupName = x.GroupName,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionId = x.Id,
|
||||
ShowChartTypeEnum = x.ShowChartTypeEnum,
|
||||
OptionTypeEnum = x.OptionTypeEnum,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
|
|
@ -230,7 +234,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
|
||||
ShowChartTypeEnum = x.ShowChartTypeEnum,
|
||||
OptionTypeEnum = x.OptionTypeEnum,
|
||||
Type = x.Type,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using DocumentFormat.OpenXml.Drawing.Spreadsheet;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
{
|
||||
|
|
@ -104,12 +107,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
}).ToList();
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new Globalanswer()
|
||||
{
|
||||
x.TaskId,
|
||||
x.GlobalVisitTask.VisitTaskNum,
|
||||
x.QuestionId,
|
||||
x.Answer
|
||||
TaskId = x.TaskId,
|
||||
VisitTaskNum = x.GlobalVisitTask.VisitTaskNum,
|
||||
QuestionId = x.QuestionId,
|
||||
Answer = x.Answer
|
||||
}).ToListAsync();
|
||||
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var organIds = alltableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
|
|
@ -123,207 +126,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
// 第一级
|
||||
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
GroupName = x.GroupName,
|
||||
GroupEnName = x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Group,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
List<ReadingReportDto> questions = await _generalCalculateService.GetReadingReportQuestion
|
||||
(
|
||||
questionList,
|
||||
taskInfoList,
|
||||
globalanswerList,
|
||||
answers,
|
||||
tableAnsweRowInfos,
|
||||
tableQuestionList,
|
||||
alltableAnsweRowInfos,
|
||||
tableAnswers,
|
||||
organInfos,
|
||||
needChangeType
|
||||
);
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
QuestionId = x.Id,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Type = x.Type,
|
||||
QuestionType = x.QuestionType,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
OrderMark = x.OrderMark,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Question,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
|
||||
question.Childrens = rowlist.Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + x.RowIndex.GetLesionMark(),
|
||||
SplitOrMergeLesionName = x.MergeName.IsNullOrEmpty() ? x.SplitName : x.MergeName,
|
||||
SplitOrMergeType = x.SplitOrMergeType,
|
||||
LesionType = question.LesionType,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
IsCanEditPosition = x.IsCanEditPosition,
|
||||
RowIndex = x.RowIndex,
|
||||
BlindName = x.BlindName,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
Type = x.Type,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
RowId = row.RowId,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionMark = x.QuestionMark,
|
||||
TypeValue = x.TypeValue,
|
||||
RowIndex = row.RowIndex,
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
ReportLayType = ReportLayType.TableQuestion,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -100,12 +100,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new Globalanswer()
|
||||
{
|
||||
x.TaskId,
|
||||
x.GlobalVisitTask.VisitTaskNum,
|
||||
x.QuestionId,
|
||||
x.Answer
|
||||
TaskId = x.TaskId,
|
||||
VisitTaskNum = x.GlobalVisitTask.VisitTaskNum,
|
||||
QuestionId = x.QuestionId,
|
||||
Answer = x.Answer
|
||||
}).ToListAsync();
|
||||
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var organIds = alltableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
|
|
@ -119,207 +119,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
// 第一级
|
||||
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
GroupName = x.GroupName,
|
||||
GroupEnName = x.GroupEnName,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
QuestionType = x.QuestionType,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Group,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName,
|
||||
QuestionId = x.Id,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Type = x.Type,
|
||||
QuestionType = x.QuestionType,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
OrderMark = x.OrderMark,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Question,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
|
||||
question.Childrens = rowlist.Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + x.RowIndex.GetLesionMark(),
|
||||
SplitOrMergeLesionName = x.MergeName.IsNullOrEmpty() ? x.SplitName : x.MergeName,
|
||||
SplitOrMergeType = x.SplitOrMergeType,
|
||||
LesionType = question.LesionType,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
IsCanEditPosition = x.IsCanEditPosition,
|
||||
RowIndex = x.RowIndex,
|
||||
BlindName = x.BlindName,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
Type = x.Type,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
RowId = row.RowId,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
DataSource = x.DataSource,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionMark = x.QuestionMark,
|
||||
TypeValue = x.TypeValue,
|
||||
RowIndex = row.RowIndex,
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
ReportLayType = ReportLayType.TableQuestion,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
List<ReadingReportDto> questions = await _generalCalculateService.GetReadingReportQuestion
|
||||
(
|
||||
questionList,
|
||||
taskInfoList,
|
||||
globalanswerList,
|
||||
answers,
|
||||
tableAnsweRowInfos,
|
||||
tableQuestionList,
|
||||
alltableAnsweRowInfos,
|
||||
tableAnswers,
|
||||
organInfos,
|
||||
needChangeType
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using DocumentFormat.OpenXml.EMMA;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
|
|
@ -101,12 +102,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var answers = await _readingTaskQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new
|
||||
var globalanswerList = await _readingGlobalTaskInfoRepository.Where(x => visitTaskIds.Contains(x.TaskId) && x.GlobalVisitTask.TaskState == TaskState.Effect && x.Answer != string.Empty).Select(x => new Globalanswer()
|
||||
{
|
||||
x.TaskId,
|
||||
x.GlobalVisitTask.VisitTaskNum,
|
||||
x.QuestionId,
|
||||
x.Answer
|
||||
TaskId = x.TaskId,
|
||||
VisitTaskNum = x.GlobalVisitTask.VisitTaskNum,
|
||||
QuestionId = x.QuestionId,
|
||||
Answer = x.Answer
|
||||
}).ToListAsync();
|
||||
var alltableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).ToListAsync();
|
||||
var organIds = alltableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
|
|
@ -120,227 +121,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
// 第一级
|
||||
|
||||
#region 构造问题
|
||||
List<ReadingReportDto> questions = questionList.Where(x => x.Type == ReadingQestionType.Group).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
GroupName = x.GroupName.LanguageName(x.GroupEnName, _userInfo.IsEn_Us),
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
Type = x.Type,
|
||||
GroupId = x.GroupId,
|
||||
GroupEnName = x.GroupEnName,
|
||||
QuestionType = x.QuestionType,
|
||||
DataSource = x.DataSource,
|
||||
LesionType = x.LesionType,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
LimitEdit = x.LimitEdit,
|
||||
MaxAnswerLength = x.MaxAnswerLength,
|
||||
FileType = x.FileType,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Group,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 分组
|
||||
foreach (var item in questions)
|
||||
{
|
||||
item.Childrens = questionList.Where(x => x.GroupId == item.QuestionId).OrderBy(x => x.ShowOrder).Select(x => new ReadingReportDto()
|
||||
{
|
||||
GroupName = x.GroupName.LanguageName(x.GroupEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.Id,
|
||||
IsShowInDicom = x.IsShowInDicom,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
LesionType = x.LesionType,
|
||||
DataSource = x.DataSource,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
GroupEnName = x.GroupEnName,
|
||||
LimitEdit = x.LimitEdit,
|
||||
MaxAnswerLength = x.MaxAnswerLength,
|
||||
FileType = x.FileType,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
Type = x.Type,
|
||||
QuestionType = x.QuestionType,
|
||||
TypeValue = x.TypeValue,
|
||||
ShowOrder = x.ShowOrder,
|
||||
OrderMark = x.OrderMark,
|
||||
ValueType = x.ValueType,
|
||||
Unit = x.Unit,
|
||||
CustomUnit = x.CustomUnit,
|
||||
ReportLayType = ReportLayType.Question,
|
||||
HighlightAnswer = x.HighlightAnswer,
|
||||
HighlightAnswerList = x.HighlightAnswerList,
|
||||
}).ToList();
|
||||
|
||||
// 问题
|
||||
foreach (var question in item.Childrens)
|
||||
{
|
||||
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var globalAnswer = globalanswerList.Where(x => x.TaskId == task.VisitTaskId && x.QuestionId == question.QuestionId).OrderByDescending(x => x.VisitTaskNum).FirstOrDefault();
|
||||
|
||||
var answer = answers.Where(x => x.VisitTaskId == task.VisitTaskId && x.ReadingQuestionTrialId == question.QuestionId).FirstOrDefault();
|
||||
question.Answer.Add(new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = answer == null ? string.Empty : answer.Answer,
|
||||
IsGlobalChange = globalAnswer == null ? false : true,
|
||||
GlobalChangeAnswer = globalAnswer == null ? string.Empty : globalAnswer.Answer,
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
// 构造表格行数据
|
||||
|
||||
|
||||
var rowlist = tableAnsweRowInfos.Where(x => x.QuestionId == question.QuestionId).OrderBy(x => x.RowIndex).ToList();
|
||||
|
||||
question.Childrens = new List<ReadingReportDto>();
|
||||
|
||||
var rowoindexs = lesionsIndexs.Where(x => x.QuestionId == question.QuestionId).Select(x => x.Rowindexs.OrderBy(y => y).ToList()).FirstOrDefault();
|
||||
rowoindexs = rowoindexs == null ? new List<decimal>() : rowoindexs;
|
||||
foreach (var rowoindex in rowoindexs)
|
||||
{
|
||||
var rowinfo = rowlist.Where(x => x.RowIndex == rowoindex).FirstOrDefault();
|
||||
question.Childrens.Add(new ReadingReportDto()
|
||||
{
|
||||
QuestionName = question.OrderMark + rowoindex.GetLesionMark(),
|
||||
RowId = rowinfo?.Id,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
SplitOrMergeLesionName = rowinfo != null ? (rowinfo.MergeName.IsNullOrEmpty() ? rowinfo.SplitName : rowinfo.MergeName) : string.Empty,
|
||||
SplitOrMergeType = rowinfo != null ? (rowinfo.SplitOrMergeType) : null,
|
||||
LesionType = question.LesionType,
|
||||
IsCanEditPosition = rowinfo != null ? (rowinfo.IsCanEditPosition) : false,
|
||||
RowIndex = rowoindex,
|
||||
BlindName = rowinfo != null ? rowinfo.BlindName : string.Empty,
|
||||
ReportLayType = ReportLayType.Lesions,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
foreach (var row in question.Childrens)
|
||||
{
|
||||
// tableQuestion
|
||||
row.Childrens = tableQuestionList.Where(x => x.ReadingQuestionId == question.QuestionId).Select(x => new ReadingReportDto()
|
||||
{
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionId = x.ReadingQuestionId,
|
||||
TableQuestionId = x.Id,
|
||||
Type = x.Type,
|
||||
IsShowInDicom = question.IsShowInDicom,
|
||||
DataSource = x.DataSource,
|
||||
LimitEdit = x.LimitEdit,
|
||||
MaxAnswerLength = x.MaxAnswerLength,
|
||||
FileType = x.FileType,
|
||||
LesionType = question.LesionType,
|
||||
TableQuestionType = x.TableQuestionType,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionMark = x.QuestionMark,
|
||||
TypeValue = x.TypeValue,
|
||||
RowIndex = row.RowIndex,
|
||||
RowId = row.RowId,
|
||||
ShowOrder = x.ShowOrder,
|
||||
ValueType = x.ValueType,
|
||||
CustomUnit = x.CustomUnit,
|
||||
Unit = x.Unit,
|
||||
ReportLayType = ReportLayType.TableQuestion,
|
||||
}).ToList();
|
||||
|
||||
|
||||
foreach (var tableQuestion in row.Childrens)
|
||||
{
|
||||
foreach (var task in taskInfoList)
|
||||
{
|
||||
var rowinfo = alltableAnsweRowInfos.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex).FirstOrDefault();
|
||||
var taskQuestionAnswer = new TaskQuestionAnswer()
|
||||
{
|
||||
Answer = tableAnswers.Where(x => x.VisitTaskId == task.VisitTaskId && x.QuestionId == tableQuestion.QuestionId && x.RowIndex == tableQuestion.RowIndex && x.TableQuestionId == tableQuestion.TableQuestionId).Select(x => x.Answer).FirstIsNullReturnEmpty(),
|
||||
TaskName = task.TaskName,
|
||||
VisitTaskId = task.VisitTaskId,
|
||||
};
|
||||
if (rowinfo != null && rowinfo.OrganInfoId != null)
|
||||
{
|
||||
var organInfo = organInfos.Where(x => x.Id == rowinfo.OrganInfoId).FirstOrDefault();
|
||||
|
||||
|
||||
if (organInfo != null && needChangeType.Contains(tableQuestion.QuestionMark))
|
||||
{
|
||||
if (_userInfo.IsEn_Us)
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOCEN;
|
||||
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULATEN;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
|
||||
taskQuestionAnswer.Answer = organInfo.PartEN;
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (tableQuestion.QuestionMark)
|
||||
{
|
||||
case QuestionMark.Organ:
|
||||
taskQuestionAnswer.Answer = organInfo.TULOC;
|
||||
break;
|
||||
case QuestionMark.Location:
|
||||
if (organInfo.IsCanEditPosition)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
taskQuestionAnswer.Answer = organInfo.TULAT;
|
||||
|
||||
}
|
||||
break;
|
||||
case QuestionMark.Part:
|
||||
taskQuestionAnswer.Answer = organInfo.Part;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tableQuestion.Answer.Add(taskQuestionAnswer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endregion
|
||||
List<ReadingReportDto> questions = await _generalCalculateService.GetReadingReportQuestion
|
||||
(
|
||||
questionList,
|
||||
taskInfoList,
|
||||
globalanswerList,
|
||||
answers,
|
||||
tableAnsweRowInfos,
|
||||
tableQuestionList,
|
||||
alltableAnsweRowInfos,
|
||||
tableAnswers,
|
||||
organInfos,
|
||||
needChangeType
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
|
@ -366,6 +159,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var isReadingTaskViewInOrder = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskinfo.TrialReadingCriterionId).Select(x => x.IsReadingTaskViewInOrder).FirstOrDefaultAsync();
|
||||
var baseLineVisitId = await _subjectVisitRepository.Where(x => x.SubjectId == taskinfo.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
|
||||
List<ReadingTableAnswerRowInfo> addRowList = new List<ReadingTableAnswerRowInfo>();
|
||||
List<ReadingTableQuestionAnswer> addTableQuestionAnswerList = new List<ReadingTableQuestionAnswer>();
|
||||
// 判断当前任务是否是基线
|
||||
if (taskinfo.SourceSubjectVisitId != baseLineVisitId && isReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||
{
|
||||
|
|
@ -434,13 +229,64 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var addList = _mapper.Map<List<ReadingTableAnswerRowInfo>>(tableRowAnswers);
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers);
|
||||
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||
addRowList.AddRange(addList);
|
||||
addTableQuestionAnswerList.AddRange(tableAnswers);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 添加 是否预设
|
||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId && x.IsPreinstall).Include(x=>x.ReadingQuestionTrial).ToListAsync();
|
||||
if (tableQuestionList.Count() > 0)
|
||||
{
|
||||
|
||||
foreach (var tableQuestion in tableQuestionList)
|
||||
{
|
||||
var thisTableQuestionList=await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionId == tableQuestion.ReadingQuestionId).ToListAsync();
|
||||
|
||||
decimal index = 1;
|
||||
|
||||
foreach (var item in tableQuestion.TypeValue.Split('|'))
|
||||
{
|
||||
var newRowId = NewId.NextGuid();
|
||||
addRowList.Add(new ReadingTableAnswerRowInfo()
|
||||
{
|
||||
Id = newRowId,
|
||||
QuestionId = tableQuestion.ReadingQuestionId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
RowIndex = index,
|
||||
IsCurrentTaskAdd = true,
|
||||
BlindName = taskinfo.TaskBlindName,
|
||||
OrderMark = tableQuestion.ReadingQuestionTrial.OrderMark,
|
||||
FristAddTaskId = taskinfo.Id,
|
||||
RowMark = tableQuestion.ReadingQuestionTrial.OrderMark + decimal.Parse(index.ToString()).GetLesionMark()
|
||||
|
||||
});
|
||||
|
||||
foreach (var thisTableQuestion in thisTableQuestionList)
|
||||
{
|
||||
addTableQuestionAnswerList.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = thisTableQuestion.Id== tableQuestion.Id? item:string.Empty,
|
||||
QuestionId = tableQuestion.ReadingQuestionId,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
RowId = newRowId,
|
||||
RowIndex = index,
|
||||
TableQuestionId = thisTableQuestion.Id,
|
||||
});
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
await _readingTableAnswerRowInfoRepository.AddRangeAsync(addRowList);
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(addTableQuestionAnswerList);
|
||||
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||
return new AddTaskLesionAnswerFromLastTaskOutDto()
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,14 @@ using IRaCIS.Core.Application.Contracts.Dicom.DTO;
|
|||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Org.BouncyCastle.Asn1.Tsp;
|
||||
|
||||
namespace IRaCIS.Core.Application.Services
|
||||
{
|
||||
|
|
@ -19,7 +22,7 @@ namespace IRaCIS.Core.Application.Services
|
|||
IRepository<NoneDicomStudy> _noneDicomStudyRepository,
|
||||
IRepository<VisitTask> _visitTaskRepository,
|
||||
IRepository<ReadingTableAnswerRowInfo> _readingTableAnswerRowInfoRepository,
|
||||
//IRepository<ReadingCustomTag> _readingCustomTagRepository,
|
||||
//IRepository<ReadingCustomTag> _readingCustomTagRepository,
|
||||
IRepository<ReadingTaskQuestionMark> _readingTaskQuestionMark,
|
||||
IRepository<NoneDicomStudyFile> _noneDicomStudyFileRepository,
|
||||
IRepository<Subject> _subjectRepository,
|
||||
|
|
@ -222,27 +225,42 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var isImageFilter = false;
|
||||
var criterionModalitys = "";
|
||||
if (visitTaskId != null)
|
||||
var criterionType = CriterionType.NoCriterion;
|
||||
|
||||
var isVisitTask = false;
|
||||
|
||||
bool? isImageSegmentLabel = null;
|
||||
if (visitTaskId != null && visitTaskId != Guid.Empty)
|
||||
{
|
||||
isVisitTask = true;
|
||||
var info = await _visitTaskRepository.Where(t => t.Id == visitTaskId)
|
||||
.Select(t => new { t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys }).FirstNotNullAsync();
|
||||
.Select(t => new { t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys, t.TrialReadingCriterion.CriterionType }).FirstNotNullAsync();
|
||||
isImageFilter = info.IsImageFilter;
|
||||
criterionModalitys = info.CriterionModalitys;
|
||||
|
||||
criterionType = info.CriterionType;
|
||||
|
||||
if (criterionType == CriterionType.OCT || criterionType == CriterionType.IVUS)
|
||||
{
|
||||
isImageSegmentLabel = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var studyList = await _dicomStudyRepository.Where(t => t.TrialId == trialId && t.SubjectVisitId == sujectVisitId).IgnoreQueryFilters()
|
||||
.Where(t => isImageFilter ? ("|" + criterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|") : true)
|
||||
.WhereIf(isReading == 1 || isQCFinished, s => s.IsDeleted == false)
|
||||
.Select(k => new VisitStudyDTO()
|
||||
{
|
||||
InstanceCount = k.InstanceCount,
|
||||
Modalities = k.Modalities,
|
||||
//SeriesCount = k.SeriesCount,
|
||||
StudyCode = k.StudyCode,
|
||||
StudyId = k.Id
|
||||
}).ToListAsync();
|
||||
.Where(t => isImageFilter ? ("|" + criterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|") : true)
|
||||
.WhereIf(isReading == 1 || isQCFinished, s => s.IsDeleted == false)
|
||||
//预览靶段标注上传的影像 影像后处理 上传了新的影像 还要原始dsa
|
||||
.WhereIf(isImageSegmentLabel == true && isVisitTask && (criterionType == CriterionType.OCT || criterionType == CriterionType.IVUS), t => t.ModalityForEdit == "XA" || t.ModalityForEdit == "DSA" || t.ModalityForEdit == "OCT")
|
||||
.Select(k => new VisitStudyDTO()
|
||||
{
|
||||
InstanceCount = k.InstanceCount,
|
||||
Modalities = k.Modalities,
|
||||
//SeriesCount = k.SeriesCount,
|
||||
StudyCode = k.StudyCode,
|
||||
StudyId = k.Id
|
||||
}).ToListAsync();
|
||||
|
||||
var studyIds = studyList.Select(t => t.StudyId).ToList();
|
||||
|
||||
|
|
@ -285,12 +303,29 @@ namespace IRaCIS.Core.Application.Services
|
|||
t.InstanceCount = t.SeriesList.SelectMany(t => t.InstanceInfoList).Count();
|
||||
}
|
||||
|
||||
//预览靶段标注上传的影像
|
||||
if (isImageSegmentLabel == true && isVisitTask)
|
||||
{
|
||||
//var taskStudyList = await _taskStudyRepository.Where(t => t.SubjectVisitId == sujectVisitId)
|
||||
// .WhereIf(isImageFilter, t => ("|" + criterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
// .ProjectTo<VisitStudyDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
//foreach (var study in taskStudyList)
|
||||
//{
|
||||
// study.SeriesList = study.SeriesList.OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).ToList();
|
||||
|
||||
// study.InstanceCount = study.SeriesList.SelectMany(t => t.InstanceInfoList).Count();
|
||||
//}
|
||||
|
||||
//studyList.AddRange(taskStudyList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return studyList.Where(x=>x.SeriesList.Count()>0).ToList();
|
||||
return studyList.Where(x => x.SeriesList.Count() > 0).ToList();
|
||||
|
||||
|
||||
|
||||
//return ResponseOutput.Ok(studyList.Where(t => t.SeriesList.Count > 0).ToList());
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -468,62 +503,71 @@ namespace IRaCIS.Core.Application.Services
|
|||
|
||||
var studyList = new List<VisitStudyDTO>();
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(t => new { t.TrialReadingCriterionId, t.TrialReadingCriterion.IsImageFilter, t.TrialReadingCriterion.CriterionModalitys, t.ReadingTaskState, TaskStudyCount = t.TaskStudyList.Count }).FirstNotNullAsync();
|
||||
|
||||
//影像后处理 上传了新的影像
|
||||
if (taskInfo.TaskStudyCount > 0)
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(t => new
|
||||
{
|
||||
t.TrialReadingCriterionId,
|
||||
t.TrialReadingCriterion.CriterionType,
|
||||
t.TrialReadingCriterion.IsImageFilter,
|
||||
t.TrialReadingCriterion.CriterionModalitys,
|
||||
t.ReadingTaskState,
|
||||
|
||||
var taskStudyList = await _taskStudyRepository.Where(t => t.TrialId == indto.TrialId && t.VisitTaskId == indto.VisitTaskId)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
.ProjectTo<VisitStudyDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
//是否有了后处理的dicom检查
|
||||
IsHaveTaskStudy = t.TaskStudyList.Any(),
|
||||
//是否有了后处理的NoneDicom检查
|
||||
IsHaveTaskNoneDicomStudyFile = t.SourceSubjectVisit.NoneDicomStudyList.SelectMany(c => c.TaskNoneDicomFileList.Where(t => t.VisitTaskId == indto.VisitTaskId)).Any(),
|
||||
//是否有了标注的dicom检查
|
||||
//IsMarkDicomStudy = t.SourceSubjectVisit.TaskStudyList.Any(),
|
||||
//是否有了标注的NoneDicom检查
|
||||
IsMarkNoneDicomStudy = t.SourceSubjectVisit.NoneDicomStudyList.SelectMany(c => c.ImageLabelNoneDicomFileList).Any()
|
||||
|
||||
foreach (var study in taskStudyList)
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
|
||||
|
||||
#region dicom 检查查询
|
||||
|
||||
//如果是手动生成的标准,需要过滤检查和序列数据
|
||||
|
||||
var isManualGenerate = await _trialReadingCriterionRepository.AnyAsync(t => t.Id == taskInfo.TrialReadingCriterionId && t.IsAutoCreate == false);
|
||||
|
||||
var dicomStudyList = await _dicomStudyRepository.Where(t => t.TrialId == indto.TrialId && t.SubjectVisitId == indto.SujectVisitId)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
.WhereIf(isManualGenerate, t => t.SubjectCriteriaEvaluationVisitStudyFilterList.Any(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsConfirmed && t.IsReading))
|
||||
//影像后处理 上传了新的影像 还要原始dsa
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy && taskInfo.CriterionType == CriterionType.OCT,
|
||||
t => t.ModalityForEdit == "XA" || t.ModalityForEdit == "DSA" )
|
||||
|
||||
.WhereIf(taskInfo.CriterionType == CriterionType.IVUS,
|
||||
t => t.ModalityForEdit == "XA" || t.ModalityForEdit == "DSA" || t.ModalityForEdit == "IVUS")
|
||||
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy == false && taskInfo.CriterionType == CriterionType.OCT,
|
||||
t => t.ModalityForEdit == "XA" || t.ModalityForEdit == "DSA" || t.ModalityForEdit == "OCT")
|
||||
|
||||
|
||||
//其他 不应该看原始影像
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy && (taskInfo.CriterionType != CriterionType.OCT && taskInfo.CriterionType != CriterionType.IVUS), t => false)
|
||||
.Select(k => new VisitStudyDTO()
|
||||
{
|
||||
study.SeriesList = study.SeriesList.OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).ToList();
|
||||
InstanceCount = k.InstanceCount,
|
||||
StudyName = k.StudyName,
|
||||
Modalities = k.Modalities,
|
||||
//SeriesCount = k.SeriesCount,
|
||||
StudyCode = k.StudyCode,
|
||||
StudyId = k.Id,
|
||||
|
||||
//foreach (var series in study.SeriesList)
|
||||
//{
|
||||
// series.WindowCenter = series.InstanceInfoList.FirstOrDefault()!.WindowCenter;
|
||||
// series.WindowWidth = series.InstanceInfoList.FirstOrDefault()!.WindowWidth;
|
||||
//}
|
||||
//study.SeriesCount = study.SeriesList.Count;
|
||||
BodyPartForEdit = k.BodyPartForEdit,
|
||||
BodyPartForEditOther = k.BodyPartForEditOther
|
||||
|
||||
study.InstanceCount = study.SeriesList.SelectMany(t => t.InstanceInfoList).Count();
|
||||
}
|
||||
|
||||
studyList.AddRange(taskStudyList);
|
||||
}).ToListAsync();
|
||||
|
||||
}
|
||||
else
|
||||
|
||||
var studyIds = dicomStudyList.Select(t => t.StudyId).ToList();
|
||||
|
||||
if (studyIds.Count > 0)
|
||||
{
|
||||
#region dicom 检查查询
|
||||
|
||||
//如果是手动生成的标准,需要过滤检查和序列数据
|
||||
|
||||
var isManualGenerate = await _trialReadingCriterionRepository.AnyAsync(t => t.Id == taskInfo.TrialReadingCriterionId && t.IsAutoCreate == false);
|
||||
|
||||
var dicomStudyList = await _dicomStudyRepository.Where(t => t.TrialId == indto.TrialId && t.SubjectVisitId == indto.SujectVisitId)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
.WhereIf(isManualGenerate, t => t.SubjectCriteriaEvaluationVisitStudyFilterList.Any(t => t.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && t.IsConfirmed && t.IsReading))
|
||||
.Select(k => new VisitStudyDTO()
|
||||
{
|
||||
InstanceCount = k.InstanceCount,
|
||||
StudyName = k.StudyName,
|
||||
Modalities = k.Modalities,
|
||||
//SeriesCount = k.SeriesCount,
|
||||
StudyCode = k.StudyCode,
|
||||
StudyId = k.Id,
|
||||
|
||||
BodyPartForEdit=k.BodyPartForEdit,
|
||||
BodyPartForEditOther=k.BodyPartForEditOther
|
||||
|
||||
|
||||
}).ToListAsync();
|
||||
var studyIds = dicomStudyList.Select(t => t.StudyId).ToList();
|
||||
|
||||
var instanceList = await _dicomInstanceRepository.Where(t => studyIds.Contains(t.StudyId) && t.IsReading)
|
||||
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath, t.IsReading, t.FileSize }).ToListAsync();
|
||||
.Select(t => new { t.SeriesId, t.Id, t.InstanceNumber, t.Path, t.NumberOfFrames, t.WindowCenter, t.WindowWidth, t.HtmlPath, t.IsReading, t.FileSize }).ToListAsync();
|
||||
|
||||
List<DicomSeriesDTO> seriesLists = await _dicomSeriesRepository.Where(s => studyIds.Contains(s.StudyId))
|
||||
.WhereIf(isManualGenerate == false, t => t.IsReading)
|
||||
|
|
@ -561,155 +605,178 @@ namespace IRaCIS.Core.Application.Services
|
|||
}
|
||||
|
||||
studyList.AddRange(dicomStudyList);
|
||||
}
|
||||
|
||||
#endregion
|
||||
//影像后处理 上传了新的影像
|
||||
if (taskInfo.IsHaveTaskStudy /*|| taskInfo.IsMarkDicomStudy*/ || taskInfo.IsMarkNoneDicomStudy)
|
||||
{
|
||||
|
||||
#region dicom 关键序列处理
|
||||
var taskStudyList = await _taskStudyRepository.Where(t => t.TrialId == indto.TrialId)
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy, t => t.VisitTaskId == indto.VisitTaskId)
|
||||
.WhereIf(taskInfo.IsHaveTaskStudy == false && (/*taskInfo.IsMarkDicomStudy ||*/ taskInfo.IsMarkNoneDicomStudy), t => t.SubjectVisitId == indto.SujectVisitId)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.ModalityForEdit + "|"))
|
||||
.ProjectTo<VisitStudyDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
//已经签名的任务,加关键序列
|
||||
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
foreach (var study in taskStudyList)
|
||||
{
|
||||
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new StudyInstanceInfo()
|
||||
study.SeriesList = study.SeriesList.OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).ToList();
|
||||
|
||||
study.InstanceCount = study.SeriesList.SelectMany(t => t.InstanceInfoList).Count();
|
||||
}
|
||||
|
||||
studyList.AddRange(taskStudyList);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region dicom 关键序列处理
|
||||
|
||||
//已经签名的任务,加关键序列
|
||||
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
var rowInfoList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).OrderBy(x => x.ReadingQuestionTrial.ShowOrder).ThenBy(x => x.RowIndex).Select(x => new StudyInstanceInfo()
|
||||
{
|
||||
ShowOrder = x.ReadingQuestionTrial.ShowOrder,
|
||||
RowIndex = x.RowIndex,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
InstanceId = x.InstanceId,
|
||||
NumberOfFrames = x.NumberOfFrames,
|
||||
CreateTime = x.CreateTime,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
// 这个表的数据已经移动到 _readingTaskQuestionMark 了
|
||||
//var customoList = await _readingCustomTagRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).Select(x => new StudyInstanceInfo()
|
||||
//{
|
||||
// ShowOrder = 0,
|
||||
// RowIndex = 0m,
|
||||
// SeriesId = x.SeriesId,
|
||||
// StudyId = x.StudyId,
|
||||
// InstanceId = x.InstanceId,
|
||||
// NumberOfFrames = x.NumberOfFrames,
|
||||
// CreateTime = x.CreateTime,
|
||||
//}).ToListAsync();
|
||||
//rowInfoList.AddRange(customoList);
|
||||
|
||||
var questionMarkList = await _readingTaskQuestionMark.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).Select(x => new StudyInstanceInfo()
|
||||
{
|
||||
ShowOrder = x.ReadingQuestionTrial == null ? 0 : x.ReadingQuestionTrial.ShowOrder,
|
||||
RowIndex = 0m,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
InstanceId = x.InstanceId,
|
||||
NumberOfFrames = x.NumberOfFrames,
|
||||
CreateTime = x.CreateTime,
|
||||
}).ToListAsync();
|
||||
rowInfoList.AddRange(questionMarkList);
|
||||
|
||||
var thisStudyIds = rowInfoList.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.StudyId).Distinct().ToList();
|
||||
var thisSeriesIdIds = rowInfoList.Where(x => x.SeriesId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.SeriesId).Distinct().ToList();
|
||||
if (rowInfoList.Count > 0)
|
||||
{
|
||||
var thisVisitTaskStudy = await _dicomStudyRepository.Where(t => thisStudyIds.Contains(t.Id)).Select(k => new VisitStudyDTO()
|
||||
{
|
||||
ShowOrder = x.ReadingQuestionTrial.ShowOrder,
|
||||
RowIndex = x.RowIndex,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
InstanceId = x.InstanceId,
|
||||
NumberOfFrames = x.NumberOfFrames,
|
||||
CreateTime=x.CreateTime,
|
||||
|
||||
}).ToListAsync();
|
||||
InstanceCount = k.InstanceCount,
|
||||
|
||||
//SeriesCount = k.SeriesCount,
|
||||
|
||||
// 这个表的数据已经移动到 _readingTaskQuestionMark 了
|
||||
//var customoList = await _readingCustomTagRepository.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).Select(x => new StudyInstanceInfo()
|
||||
//{
|
||||
// ShowOrder = 0,
|
||||
// RowIndex = 0m,
|
||||
// SeriesId = x.SeriesId,
|
||||
// StudyId = x.StudyId,
|
||||
// InstanceId = x.InstanceId,
|
||||
// NumberOfFrames = x.NumberOfFrames,
|
||||
// CreateTime = x.CreateTime,
|
||||
//}).ToListAsync();
|
||||
//rowInfoList.AddRange(customoList);
|
||||
StudyId = k.Id,
|
||||
IsCriticalSequence = true,
|
||||
|
||||
var questionMarkList = await _readingTaskQuestionMark.Where(x => x.VisitTaskId == indto.VisitTaskId && x.StudyId != null).Select(x => new StudyInstanceInfo()
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
if (thisVisitTaskStudy != null)
|
||||
{
|
||||
ShowOrder = x.ReadingQuestionTrial==null?0: x.ReadingQuestionTrial.ShowOrder,
|
||||
RowIndex = 0m,
|
||||
SeriesId = x.SeriesId,
|
||||
StudyId = x.StudyId,
|
||||
InstanceId = x.InstanceId,
|
||||
NumberOfFrames = x.NumberOfFrames,
|
||||
CreateTime = x.CreateTime,
|
||||
}).ToListAsync();
|
||||
rowInfoList.AddRange(questionMarkList);
|
||||
thisVisitTaskStudy.StudyId = default(Guid);
|
||||
var item = await _dicomSeriesRepository.Where(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber).
|
||||
ThenBy(s => s.SeriesTime)
|
||||
.ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
var thisStudyIds = rowInfoList.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.StudyId).Distinct().ToList();
|
||||
var thisSeriesIdIds = rowInfoList.Where(x => x.SeriesId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(x => x.SeriesId).Distinct().ToList();
|
||||
if (rowInfoList.Count > 0)
|
||||
{
|
||||
var thisVisitTaskStudy = await _dicomStudyRepository.Where(t => thisStudyIds.Contains(t.Id)).Select(k => new VisitStudyDTO()
|
||||
if (item != null)
|
||||
{
|
||||
InstanceCount = k.InstanceCount,
|
||||
item.SeriesInstanceUid = string.Empty;
|
||||
|
||||
//SeriesCount = k.SeriesCount,
|
||||
var markInstanceIdList = rowInfoList.Where(y => y.InstanceId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(y => y.InstanceId!.Value).Distinct().ToList();
|
||||
|
||||
StudyId = k.Id,
|
||||
IsCriticalSequence = true,
|
||||
item.InstanceInfoList = await _dicomInstanceRepository.Where(t => markInstanceIdList.Contains(t.Id)).OrderBy(s => s.DicomSerie.SeriesNumber).ThenBy(s => s.DicomSerie.SeriesTime).ThenBy(x => x.InstanceTime).Select(k =>
|
||||
new InstanceBasicInfo()
|
||||
{
|
||||
Id = k.Id,
|
||||
NumberOfFrames = k.NumberOfFrames,
|
||||
HtmlPath = k.HtmlPath,
|
||||
Path = k.Path,
|
||||
InstanceNumber = k.InstanceNumber,
|
||||
StudyId = k.StudyId,
|
||||
SeriesId = k.SeriesId,
|
||||
FileSize = k.FileSize
|
||||
}).ToListAsync();
|
||||
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
if (thisVisitTaskStudy != null)
|
||||
{
|
||||
thisVisitTaskStudy.StudyId = default(Guid);
|
||||
var item = await _dicomSeriesRepository.Where(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber).
|
||||
ThenBy(s => s.SeriesTime)
|
||||
.ProjectTo<DicomSeriesDTO>(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
|
||||
|
||||
if (item != null)
|
||||
item.InstanceInfoList.ForEach(x =>
|
||||
{
|
||||
item.SeriesInstanceUid = string.Empty;
|
||||
x.RowDate = rowInfoList.FirstOrDefault(y => y.InstanceId == x.Id)?.CreateTime ?? DateTime.Now;
|
||||
var keyFramesList = rowInfoList.Where(y => y.InstanceId == x.Id && y.NumberOfFrames != 0 && y.NumberOfFrames != null).Select(y => y.NumberOfFrames).Distinct().ToList();
|
||||
|
||||
var markInstanceIdList = rowInfoList.Where(y => y.InstanceId != null).OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).Select(y => y.InstanceId!.Value).Distinct().ToList();
|
||||
|
||||
item.InstanceInfoList = await _dicomInstanceRepository.Where(t => markInstanceIdList.Contains(t.Id)).OrderBy(s => s.DicomSerie.SeriesNumber).ThenBy(s => s.DicomSerie.SeriesTime).ThenBy(x => x.InstanceTime).Select(k =>
|
||||
new InstanceBasicInfo()
|
||||
{
|
||||
Id = k.Id,
|
||||
NumberOfFrames = k.NumberOfFrames,
|
||||
HtmlPath = k.HtmlPath,
|
||||
Path = k.Path,
|
||||
InstanceNumber = k.InstanceNumber,
|
||||
StudyId = k.StudyId,
|
||||
SeriesId = k.SeriesId,
|
||||
FileSize = k.FileSize
|
||||
}).ToListAsync();
|
||||
|
||||
item.InstanceInfoList.ForEach(x =>
|
||||
if (keyFramesList.Count() > 0)
|
||||
{
|
||||
x.RowDate = rowInfoList.FirstOrDefault(y => y.InstanceId == x.Id)?.CreateTime ?? DateTime.Now;
|
||||
var keyFramesList = rowInfoList.Where(y => y.InstanceId == x.Id && y.NumberOfFrames != 0 && y.NumberOfFrames != null).Select(y => y.NumberOfFrames).Distinct().ToList();
|
||||
x.KeyFramesList = keyFramesList;
|
||||
}
|
||||
|
||||
if (keyFramesList.Count() > 0)
|
||||
{
|
||||
x.KeyFramesList = keyFramesList;
|
||||
}
|
||||
var item = rowInfoList.FirstOrDefault(y => y.InstanceId == x.Id);
|
||||
if (item != null)
|
||||
{
|
||||
x.ShowOrder = item.ShowOrder;
|
||||
x.RowIndex = item.RowIndex;
|
||||
}
|
||||
|
||||
var item = rowInfoList.FirstOrDefault(y => y.InstanceId == x.Id);
|
||||
if (item != null)
|
||||
{
|
||||
x.ShowOrder = item.ShowOrder;
|
||||
x.RowIndex = item.RowIndex;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
item.InstanceInfoList = item.InstanceInfoList.OrderBy(x => x.ShowOrder).ThenBy(x=>x.RowIndex).ThenBy(x=>x.RowDate).ToList();
|
||||
item.InstanceInfoList = item.InstanceInfoList.OrderBy(x => x.ShowOrder).ThenBy(x => x.RowIndex).ThenBy(x => x.RowDate).ToList();
|
||||
|
||||
|
||||
item.InstanceCount = item.InstanceInfoList.Count;
|
||||
item.InstanceCount = item.InstanceInfoList.Count;
|
||||
|
||||
item.Description = "Key Series";
|
||||
|
||||
var modalityList = await _dicomSeriesRepository.Where(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).Select(x => x.Modality).Distinct().ToListAsync(); ;
|
||||
item.Modality = string.Join(",", modalityList);
|
||||
thisVisitTaskStudy.SeriesList.Add(item);
|
||||
//thisVisitTaskStudy.SeriesCount = thisVisitTaskStudy.SeriesList.Count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
studyList.Insert(0, thisVisitTaskStudy);
|
||||
item.Description = "Key Series";
|
||||
|
||||
var modalityList = await _dicomSeriesRepository.Where(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber).ThenBy(s => s.SeriesTime).Select(x => x.Modality).Distinct().ToListAsync(); ;
|
||||
item.Modality = string.Join(",", modalityList);
|
||||
thisVisitTaskStudy.SeriesList.Add(item);
|
||||
//thisVisitTaskStudy.SeriesCount = thisVisitTaskStudy.SeriesList.Count;
|
||||
}
|
||||
|
||||
|
||||
|
||||
studyList.Insert(0, thisVisitTaskStudy);
|
||||
|
||||
}
|
||||
|
||||
studyList.ForEach(x =>
|
||||
{
|
||||
x.SeriesList.ForEach(y =>
|
||||
{
|
||||
y.IsBeMark = rowInfoList.Any(z => z.SeriesId == y.Id);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
studyList.ForEach(x =>
|
||||
{
|
||||
x.SeriesList.ForEach(y =>
|
||||
{
|
||||
y.IsBeMark = rowInfoList.Any(z => z.SeriesId == y.Id);
|
||||
});
|
||||
|
||||
#endregion
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 非Dicom 检查查询
|
||||
|
||||
var noDicomList = await _noneDicomStudyRepository.Where(x => x.TrialId == indto.TrialId && x.SubjectVisitId == indto.SujectVisitId && x.NoneDicomFileList.Any(t => !t.FileType.Contains(StaticData.FileType.Zip)))
|
||||
.Where(t => t.IsReading)
|
||||
.WhereIf(taskInfo.IsImageFilter == true, t => taskInfo.CriterionModalitys.Contains(t.Modality)).ToListAsync();
|
||||
var noDicomList = await _noneDicomStudyRepository.Where(x => x.TrialId == indto.TrialId && x.SubjectVisitId == indto.SujectVisitId)
|
||||
//iVUS 存在空检查
|
||||
.WhereIf(taskInfo.CriterionType != CriterionType.IVUS && taskInfo.CriterionType != CriterionType.OCT, x => x.NoneDicomFileList.Any(t => !t.FileType.Contains(StaticData.FileType.Zip)))
|
||||
.Where(t => t.IsReading)
|
||||
.WhereIf(taskInfo.IsImageFilter, t => ("|" + taskInfo.CriterionModalitys + "|").Contains("|" + t.Modality + "|"))
|
||||
.ToListAsync();
|
||||
|
||||
|
||||
List<VisitStudyDTO> noDicomStudyList = noDicomList.Select(x => new VisitStudyDTO()
|
||||
|
|
@ -722,20 +789,23 @@ namespace IRaCIS.Core.Application.Services
|
|||
StudyCode = x.StudyCode,
|
||||
IsDicom = false,
|
||||
|
||||
BodyPartForEdit=x.BodyPart,
|
||||
BodyPartForEditOther=x.BodyPartForEditOther
|
||||
BodyPartForEdit = x.BodyPart,
|
||||
BodyPartForEditOther = x.BodyPartForEditOther
|
||||
|
||||
}).ToList();
|
||||
|
||||
var isExistTaskNoneDicomFile = _noneDicomStudyFileRepository.Any(t => t.VisitTaskId == indto.VisitTaskId);
|
||||
//var isExistTaskNoneDicomFile = _noneDicomStudyFileRepository.Any(t => t.VisitTaskId == indto.VisitTaskId);
|
||||
|
||||
foreach (var item in noDicomStudyList)
|
||||
{
|
||||
var nodicom = noDicomList.Where(x => x.Id == item.StudyId).First();
|
||||
|
||||
var instanceCount = await _noneDicomStudyFileRepository.Where(t => t.IsReading)
|
||||
.WhereIf(isExistTaskNoneDicomFile, x => x.OriginNoneDicomStudyId == item.StudyId)
|
||||
.WhereIf(isExistTaskNoneDicomFile == false, x => x.NoneDicomStudyId == item.StudyId).CountAsync();
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile == false && taskInfo.IsMarkNoneDicomStudy == true, x => x.ImageLabelNoneDicomStudyId == item.StudyId)
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile && taskInfo.IsMarkNoneDicomStudy, x => x.OriginNoneDicomStudyId == item.StudyId && x.VisitTaskId==indto.VisitTaskId)
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile == false && taskInfo.IsMarkNoneDicomStudy == false, x => x.NoneDicomStudyId == item.StudyId)
|
||||
.Where(t => !t.FileType.Contains(StaticData.FileType.Zip))
|
||||
.CountAsync();
|
||||
|
||||
if (instanceCount == 0)
|
||||
{
|
||||
|
|
@ -745,23 +815,25 @@ namespace IRaCIS.Core.Application.Services
|
|||
else
|
||||
{
|
||||
item.SeriesList = new List<DicomSeriesDTO>()
|
||||
{
|
||||
new DicomSeriesDTO (){
|
||||
IsDicom=false,
|
||||
Id=item.StudyId,
|
||||
InstanceCount=instanceCount,
|
||||
Modality=item.Modalities,
|
||||
StudyId=item.StudyId,
|
||||
TrialId=nodicom.TrialId,
|
||||
SubjectVisitId=nodicom.SubjectVisitId,
|
||||
SubjectId=nodicom.SubjectId,
|
||||
SeriesNumber=1,
|
||||
NoneDicomFileFirstFile=await _noneDicomStudyFileRepository.WhereIf(isExistTaskNoneDicomFile,x=>x.OriginNoneDicomStudyId== item.StudyId)
|
||||
.WhereIf(isExistTaskNoneDicomFile==false, x=>x.NoneDicomStudyId == item.StudyId)
|
||||
.Where(x=> !x.FileType.Contains(StaticData.FileType.Zip)).Select(x=>x.Path).FirstOrDefaultAsync(),
|
||||
}
|
||||
{
|
||||
new DicomSeriesDTO (){
|
||||
IsDicom=false,
|
||||
Id=item.StudyId,
|
||||
InstanceCount=instanceCount,
|
||||
Modality=item.Modalities,
|
||||
StudyId=item.StudyId,
|
||||
TrialId=nodicom.TrialId,
|
||||
SubjectVisitId=nodicom.SubjectVisitId,
|
||||
SubjectId=nodicom.SubjectId,
|
||||
SeriesNumber=1,
|
||||
NoneDicomFileFirstFile=await _noneDicomStudyFileRepository
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile == false && taskInfo.IsMarkNoneDicomStudy == true, x => x.ImageLabelNoneDicomStudyId == item.StudyId)
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile && taskInfo.IsMarkNoneDicomStudy, x => x.OriginNoneDicomStudyId == item.StudyId && x.VisitTaskId==indto. VisitTaskId)
|
||||
.WhereIf(taskInfo.IsHaveTaskNoneDicomStudyFile == false && taskInfo.IsMarkNoneDicomStudy == false, x => x.NoneDicomStudyId == item.StudyId)
|
||||
.Where(x=> !x.FileType.Contains(StaticData.FileType.Zip)).Select(x=>x.Path).FirstOrDefaultAsync(),
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -125,7 +125,9 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<SCPSeries, DicomSeries>();
|
||||
CreateMap<SCPInstance, DicomInstance>();
|
||||
|
||||
|
||||
CreateMap<DicomStudy, VisitStudyDTO>()
|
||||
.ForMember(d => d.StudyId, u => u.MapFrom(s => s.Id))
|
||||
.ForMember(d => d.SeriesList, u => u.MapFrom(s => s.SeriesList));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,10 @@ using SixLabors.ImageSharp;
|
|||
using SixLabors.ImageSharp.Formats.Jpeg;
|
||||
using SixLabors.ImageSharp.Processing;
|
||||
using System.Collections.Concurrent;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using System.Reactive.Subjects;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
|
|
@ -74,6 +76,174 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
public static int IntValue = 100;
|
||||
|
||||
public async Task<IResponseOutput> EfcoreTest11()
|
||||
{
|
||||
//更
|
||||
await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == Guid.Parse("08de572a-55c6-6503-0242-0a0001000000"), t => new Trial() { CreateTime = DateTime.Now },true);
|
||||
|
||||
await _trialRepository.UpdatePartialFromQueryAsync(t => t.Id == Guid.Parse("08DDACB9-B6CA-F21C-0242-0A0001000000"), t => new Trial() { CreateTime = DateTime.Now },true);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
}
|
||||
|
||||
public class ModelVerifyCommand
|
||||
{
|
||||
public int? IntNUllValue { get; set; }
|
||||
public int IntValue { get; set; }
|
||||
|
||||
public string StringValue { get; set; }
|
||||
|
||||
public string? StringNUllValue { get; set; }
|
||||
|
||||
public string StringBackDefaultValue { get; set; } = string.Empty;
|
||||
|
||||
public Guid GuidValue { get; set; } = NewId.NextSequentialGuid();
|
||||
|
||||
public Guid? GuidNUllValue { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid GuidValueNotDefault { get; set; }
|
||||
|
||||
|
||||
public bool BoolValue { get; set; }
|
||||
|
||||
public bool? BoolNUllValue { get; set; }
|
||||
|
||||
public DateTime DateTimeValue { get; set; }
|
||||
|
||||
public DateTime? DateTimeNUllValue { get; set; }
|
||||
}
|
||||
|
||||
|
||||
//创建一个模型验证的方法
|
||||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> PostModelVerify(ModelVerifyCommand modelVerify)
|
||||
{
|
||||
|
||||
return ResponseOutput.Ok(modelVerify);
|
||||
|
||||
}
|
||||
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput> DealIVUSOCTDicomTag(string subjectCode, bool? isUploadOss)
|
||||
{
|
||||
var trialId = Guid.Parse("01000000-AC13-0242-3AE4-08DC9B0495C6");
|
||||
|
||||
var trialCode = "ZY2024002";
|
||||
|
||||
//var subjectCodeList = new List<string>() { "04032", "12004", "04005" };
|
||||
|
||||
var list = await _dicomInstanceRepository.Where(t => t.TrialId == trialId && t.DicomStudy.SubjectVisit.IsBaseLine)
|
||||
.Where(t => t.DicomStudy.Subject.Code == subjectCode)
|
||||
.WhereIf(subjectCode == "04032", t => t.DicomStudy.ModalityForEdit == "OCT")
|
||||
.WhereIf(subjectCode == "12004", t => t.DicomStudy.ModalityForEdit == "IVUS")
|
||||
.WhereIf(subjectCode == "04004", t => t.DicomStudy.ModalityForEdit == "IVUS" || t.DicomStudy.ModalityForEdit == "OCT")
|
||||
.WhereIf(subjectCode == "04005", t => t.DicomStudy.ModalityForEdit == "IVUS" || t.DicomStudy.ModalityForEdit == "OCT")
|
||||
.Select(t => new
|
||||
{
|
||||
SubjectCode = t.DicomStudy.Subject.Code,
|
||||
t.DicomStudy.ModalityForEdit,
|
||||
t.Path,
|
||||
t.FileSize
|
||||
}).ToListAsync();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
Console.WriteLine(item.Path);
|
||||
|
||||
await using var stream = await _IOSSService.GetStreamFromOSSAsync(item.Path);
|
||||
|
||||
var dicomFile = DicomFile.Open(stream, FileReadOption.ReadLargeOnDemand);
|
||||
|
||||
switch (item.SubjectCode)
|
||||
{
|
||||
case "04032":
|
||||
|
||||
dicomFile.Dataset.AddOrUpdate(DicomTag.PatientID, $"{trialCode}-04032");
|
||||
dicomFile.Dataset.AddOrUpdate(DicomTag.ClinicalTrialSubjectID, "04032");
|
||||
|
||||
break;
|
||||
case "12004":
|
||||
dicomFile.Dataset.AddOrUpdate(DicomTag.PatientID, $"{trialCode}-12004");
|
||||
dicomFile.Dataset.AddOrUpdate(DicomTag.ClinicalTrialSubjectID, "12004");
|
||||
break;
|
||||
|
||||
case "04004":
|
||||
dicomFile.Dataset.AddOrUpdate(DicomTag.PatientID, $"{trialCode}-04004");
|
||||
dicomFile.Dataset.AddOrUpdate(DicomTag.ClinicalTrialSubjectID, "04004");
|
||||
break;
|
||||
|
||||
case "04005":
|
||||
dicomFile.Dataset.AddOrUpdate(DicomTag.PatientID, $"{trialCode}-04005");
|
||||
dicomFile.Dataset.AddOrUpdate(DicomTag.ClinicalTrialSubjectID, "04005");
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//获取原始目录 和文件名
|
||||
var folder = item.Path.Substring(0, item.Path.LastIndexOf('/')).TrimStart('/');
|
||||
var fileName = Path.GetFileName(item.Path);
|
||||
|
||||
|
||||
|
||||
|
||||
//if (isUploadOss == false)
|
||||
//{
|
||||
// // 本地完整路径
|
||||
// var localPath = Path.Combine(Directory.GetCurrentDirectory(), fileName);
|
||||
|
||||
// // 写入文件
|
||||
// await using var fileStream = File.Create(localPath);
|
||||
// await output.CopyToAsync(fileStream);
|
||||
|
||||
// // 可选:确保写入完成再关闭
|
||||
// await fileStream.FlushAsync();
|
||||
//}
|
||||
//else
|
||||
if (isUploadOss == true)
|
||||
{
|
||||
//4 保存到一个 MemoryStream
|
||||
await using var output = new MemoryStream();
|
||||
dicomFile.Save(output);
|
||||
output.Position = 0;
|
||||
|
||||
|
||||
await _IOSSService.UploadToOSSAsync(output, folder, fileName, false);
|
||||
|
||||
//var pipe = new System.IO.Pipelines.Pipe();
|
||||
|
||||
//// 写入端:fo-dicom
|
||||
//_ = Task.Run(async () =>
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// await using var writer = pipe.Writer.AsStream();
|
||||
// dicomFile.Save(writer); // 直接写 Pipe
|
||||
// await pipe.Writer.CompleteAsync();
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// await pipe.Writer.CompleteAsync(ex);
|
||||
// }
|
||||
//});
|
||||
|
||||
////await _IOSSService.UploadToOSSAsync(pipe.Reader.AsStream(), folder, fileName, false);
|
||||
|
||||
await _IOSSService.DeleteFromPrefix(item.Path.TrimStart("/"), true);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重建闭包表
|
||||
/// </summary>
|
||||
|
|
@ -441,6 +611,308 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput> RestoreDBOSSDate(
|
||||
[FromServices] IOSSService _oSSService, [FromServices] IWebHostEnvironment _hostEnvironment, [FromServices] IRepository<DicomStudy> _studyRepository)
|
||||
{
|
||||
var folder = FileStoreHelper.GetIRaCISRootDataFolder(_hostEnvironment);
|
||||
|
||||
var outputFile = Path.Combine(folder, $"{Guid.NewGuid()}_deleteKey_info.txt");
|
||||
var outputFile2 = Path.Combine(folder, $"{Guid.NewGuid()}_deleteKeyExport_info.txt");
|
||||
|
||||
var outputErrorFile = Path.Combine(folder, $"{Guid.NewGuid()}_deleteKeyerror.txt");
|
||||
var outputErrorFile2 = Path.Combine(folder, $"{Guid.NewGuid()}_deleteKeyerrorStudy.txt");
|
||||
|
||||
|
||||
var aliConfig = _oSSService.ObjectStoreServiceOptions.AliyunOSS;
|
||||
|
||||
var tempToken = _oSSService.GetObjectStoreTempToken();
|
||||
|
||||
var _ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint,
|
||||
tempToken.AliyunOSS.AccessKeyId,
|
||||
tempToken.AliyunOSS.AccessKeySecret,
|
||||
tempToken.AliyunOSS.SecurityToken);
|
||||
|
||||
|
||||
var allVersions = new List<ObjectVersionSummary>();
|
||||
var allDeleteMarkers = new List<DeleteMarkerSummary>();
|
||||
|
||||
var request = new ListObjectVersionsRequest(tempToken.AliyunOSS.BucketName)
|
||||
{
|
||||
Prefix = "01000000-ac13-0242-6397-08dcd2d2a091/Image",
|
||||
//Prefix = "01000000-ac13-0242-6397-08dcd2d2a091/Image/08dd9c04-c1b2-c2da-0242-ac1301000000/01000000-ac13-0242-235b-08dd9c04c1b3",
|
||||
MaxKeys = 1000,
|
||||
};
|
||||
|
||||
ObjectVersionList result;
|
||||
do
|
||||
{
|
||||
|
||||
result = _ossClient.ListObjectVersions(request);
|
||||
|
||||
if (result.ObjectVersionSummaries != null)
|
||||
allVersions.AddRange(result.ObjectVersionSummaries);
|
||||
|
||||
if (result.DeleteMarkerSummaries != null)
|
||||
allDeleteMarkers.AddRange(result.DeleteMarkerSummaries);
|
||||
|
||||
request.KeyMarker = result.NextKeyMarker;
|
||||
request.VersionIdMarker = result.NextVersionIdMarker;
|
||||
|
||||
} while (result.IsTruncated);
|
||||
|
||||
Console.WriteLine($"共找到 {allDeleteMarkers.Count} 个删除标记");
|
||||
|
||||
|
||||
|
||||
int total = allDeleteMarkers.Count;
|
||||
|
||||
int processed = 0;
|
||||
double lastPercent = 0;
|
||||
|
||||
|
||||
// 按 Key 分组,找每个删除标记前的最近版本
|
||||
var versionsByKey = allVersions
|
||||
.GroupBy(v => v.Key)
|
||||
.ToDictionary(g => g.Key, g => g.OrderByDescending(x => x.LastModified).ToList());
|
||||
|
||||
foreach (var del in allDeleteMarkers)
|
||||
{
|
||||
#region 防止阿里云过期
|
||||
if (tempToken.AliyunOSS.Expiration.AddSeconds(10) <= DateTime.Now)
|
||||
{
|
||||
tempToken = _oSSService.GetObjectStoreTempToken();
|
||||
|
||||
_ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint,
|
||||
tempToken.AliyunOSS.AccessKeyId,
|
||||
tempToken.AliyunOSS.AccessKeySecret,
|
||||
tempToken.AliyunOSS.SecurityToken);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (!versionsByKey.TryGetValue(del.Key, out var versions))
|
||||
continue; // 没有历史版本无法恢复
|
||||
|
||||
var prevVersion = versions.FirstOrDefault(v => v.LastModified < del.LastModified);
|
||||
if (prevVersion == null)
|
||||
continue; // 没找到可恢复版本
|
||||
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
await File.AppendAllTextAsync(outputFile, $"{prevVersion.Key},{prevVersion.VersionId}" + Environment.NewLine);
|
||||
|
||||
var getReq = new GetObjectRequest(tempToken.AliyunOSS.BucketName, prevVersion.Key)
|
||||
{
|
||||
VersionId = prevVersion.VersionId
|
||||
};
|
||||
|
||||
using (var getResult = _ossClient.GetObject(getReq))
|
||||
using (var memStream = new MemoryStream())
|
||||
{
|
||||
// 先把 OSS 流复制到内存流
|
||||
getResult.Content.CopyTo(memStream);
|
||||
memStream.Position = 0;
|
||||
|
||||
// 读取 DICOM 信息
|
||||
var dicomFile = DicomFile.Open(memStream);
|
||||
var studyInstanceUID = dicomFile.Dataset.GetString(DicomTag.StudyInstanceUID);
|
||||
|
||||
var findInfo = await _studyRepository.Where(t => t.StudyInstanceUid == studyInstanceUID && t.TrialId == Guid.Parse("01000000-ac13-0242-6397-08dcd2d2a091"))
|
||||
.Select(t => new { t.StudyInstanceUid, t.Subject.Code, t.SubjectVisit.VisitName, t.SubjectId, t.SubjectVisitId }).FirstOrDefaultAsync();
|
||||
|
||||
if (findInfo != null)
|
||||
{
|
||||
|
||||
// 再保存到另一个路径(可以使用 fo-dicom 保存)
|
||||
|
||||
var fileName = Path.GetFileNameWithoutExtension(prevVersion.Key);
|
||||
var anotherPath = Path.Combine(folder, findInfo.Code, findInfo.VisitName, studyInstanceUID, fileName);
|
||||
// 去掉 folder 部分,得到相对路径
|
||||
var relativePath = Path.GetRelativePath(folder, anotherPath);
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(anotherPath));
|
||||
dicomFile.Save(anotherPath);
|
||||
|
||||
await File.AppendAllTextAsync(outputFile2, $"{findInfo.SubjectId},{findInfo.SubjectVisitId},{prevVersion.Key},{prevVersion.VersionId},{relativePath},{findInfo.Code},{findInfo.VisitName},{findInfo.StudyInstanceUid},{fileName}" + Environment.NewLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
await File.AppendAllTextAsync(outputErrorFile2, $"{studyInstanceUID},{prevVersion.Key},{prevVersion.VersionId}" + Environment.NewLine);
|
||||
}
|
||||
|
||||
//Console.WriteLine($"读取到 studyInstanceUID: {studyInstanceUID}");
|
||||
|
||||
//var localPath = Path.Combine(folder, prevVersion.Key.Trim('/').Replace('/', Path.DirectorySeparatorChar));
|
||||
//Directory.CreateDirectory(Path.GetDirectoryName(localPath));
|
||||
//// 保存到原本路径
|
||||
//memStream.Position = 0;
|
||||
//using (var fs = File.Create(localPath))
|
||||
//{
|
||||
// memStream.CopyTo(fs);
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Console.WriteLine($"✅ 下载成功: {prevVersion.Key} (version={prevVersion.VersionId})");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"❌ 下载失败: {prevVersion.Key}, 错误: {ex.Message}");
|
||||
|
||||
await File.AppendAllTextAsync(outputErrorFile, $"{prevVersion.Key},{prevVersion.VersionId}" + Environment.NewLine);
|
||||
}
|
||||
finally
|
||||
{
|
||||
processed++;
|
||||
double percent = processed * 100.0 / total;
|
||||
|
||||
// 每提升 5% 或完成时输出
|
||||
if (percent - lastPercent >= 2.0 || processed == total)
|
||||
{
|
||||
lastPercent = percent;
|
||||
Console.WriteLine($"{DateTime.Now} 进度: {processed}/{total} ({percent:F2}%)");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 使用 CopyObject 把历史版本拷贝为最新版本(恢复)
|
||||
//var copyReq = new CopyObjectRequest
|
||||
//{
|
||||
// Bucket = bucketName,
|
||||
// Key = prevVersion.Key,
|
||||
// SourceBucket = bucketName,
|
||||
// SourceKey = prevVersion.Key,
|
||||
// SourceVersionId = prevVersion.VersionId
|
||||
//};
|
||||
|
||||
//try
|
||||
//{
|
||||
// var copyResult = client.CopyObject(copyReq);
|
||||
// Console.WriteLine($"✅ 恢复成功: {prevVersion.Key} -> newVersionId={copyResult.VersionId}");
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// Console.WriteLine($"❌ 恢复失败: {prevVersion.Key}, 错误: {ex.Message}");
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public async Task<IResponseOutput> OSSDeleteReStorre([FromServices] IOSSService _oSSService, [FromServices] IWebHostEnvironment _hostEnvironment)
|
||||
{
|
||||
var aliConfig = _oSSService.ObjectStoreServiceOptions.AliyunOSS;
|
||||
|
||||
var tempToken = _oSSService.GetObjectStoreTempToken();
|
||||
|
||||
var _ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint,
|
||||
tempToken.AliyunOSS.AccessKeyId,
|
||||
tempToken.AliyunOSS.AccessKeySecret,
|
||||
tempToken.AliyunOSS.SecurityToken);
|
||||
|
||||
|
||||
var allVersions = new List<ObjectVersionSummary>();
|
||||
var allDeleteMarkers = new List<DeleteMarkerSummary>();
|
||||
|
||||
var request = new ListObjectVersionsRequest(tempToken.AliyunOSS.BucketName)
|
||||
{
|
||||
Prefix = "test-delete-restore",
|
||||
//Prefix = "01000000-ac13-0242-6397-08dcd2d2a091/Image/08dd9c04-c1b2-c2da-0242-ac1301000000/01000000-ac13-0242-235b-08dd9c04c1b3",
|
||||
MaxKeys = 1000,
|
||||
};
|
||||
|
||||
ObjectVersionList result;
|
||||
do
|
||||
{
|
||||
|
||||
result = _ossClient.ListObjectVersions(request);
|
||||
|
||||
if (result.ObjectVersionSummaries != null)
|
||||
allVersions.AddRange(result.ObjectVersionSummaries);
|
||||
|
||||
if (result.DeleteMarkerSummaries != null)
|
||||
allDeleteMarkers.AddRange(result.DeleteMarkerSummaries);
|
||||
|
||||
request.KeyMarker = result.NextKeyMarker;
|
||||
request.VersionIdMarker = result.NextVersionIdMarker;
|
||||
|
||||
} while (result.IsTruncated);
|
||||
|
||||
Console.WriteLine($"共找到 {allDeleteMarkers.Count} 个删除标记");
|
||||
|
||||
var versionsByKey = allVersions
|
||||
.GroupBy(v => v.Key)
|
||||
.ToDictionary(g => g.Key, g => g.OrderByDescending(x => x.LastModified).ToList());
|
||||
|
||||
|
||||
foreach (var del in allDeleteMarkers)
|
||||
{
|
||||
#region 防止阿里云过期
|
||||
if (tempToken.AliyunOSS.Expiration.AddSeconds(10) <= DateTime.Now)
|
||||
{
|
||||
tempToken = _oSSService.GetObjectStoreTempToken();
|
||||
|
||||
_ossClient = new OssClient(RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? aliConfig.EndPoint : aliConfig.InternalEndpoint,
|
||||
tempToken.AliyunOSS.AccessKeyId,
|
||||
tempToken.AliyunOSS.AccessKeySecret,
|
||||
tempToken.AliyunOSS.SecurityToken);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (!versionsByKey.TryGetValue(del.Key, out var versions))
|
||||
continue; // 没有历史版本无法恢复
|
||||
|
||||
var prevVersion = versions.FirstOrDefault(v => v.LastModified < del.LastModified);
|
||||
if (prevVersion == null)
|
||||
continue; // 没找到可恢复版本
|
||||
|
||||
|
||||
|
||||
|
||||
// 创建 CopyObject 请求
|
||||
// 先用构造函数指定源和目标
|
||||
var copyReq = new CopyObjectRequest(
|
||||
sourceBucketName: tempToken.AliyunOSS.BucketName,
|
||||
sourceKey: prevVersion.Key,
|
||||
destinationBucketName: tempToken.AliyunOSS.BucketName,
|
||||
destinationKey: prevVersion.Key // 覆盖到同名 Key,达到“恢复”的效果
|
||||
);
|
||||
|
||||
// 再设置版本号
|
||||
copyReq.SourceVersionId = prevVersion.VersionId;
|
||||
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var copyResult = _ossClient.CopyObject(copyReq);
|
||||
Console.WriteLine($"✅ 恢复成功: {prevVersion.Key}, 新版本ID={copyResult.VersionId}");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"❌ 恢复失败: {prevVersion.Key}, 错误: {ex.Message}");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
[AllowAnonymous]
|
||||
public async Task<IResponseOutput> UserCreateSourceDeal([FromServices] IRepository<IdentityUser> _identityUserRepository,
|
||||
[FromServices] IRepository<TrialUserRole> _trialUserRoleRepository)
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -13,6 +13,10 @@ public class DicomInstance : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
[ForeignKey("StudyId")]
|
||||
public DicomStudy DicomStudy { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("TrialId")]
|
||||
public Trial Trial { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<ReadingTableAnswerRowInfo> ReadingTableAnswerRowInfoList { get; set; }
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ public class DicomStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
[ForeignKey("SubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public List<ReadingClinicalData> ReadingClinicalDataList { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ public class NoneDicomStudy : BaseFullDeleteAuditEntity
|
|||
[JsonIgnore]
|
||||
public List<NoneDicomStudyFile> TaskNoneDicomFileList { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public List<NoneDicomStudyFile> ImageLabelNoneDicomFileList { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
[JsonIgnore]
|
||||
|
|
|
|||
|
|
@ -14,6 +14,16 @@ public class NoneDicomStudyFile : BaseAddDeleteAuditEntity
|
|||
[ForeignKey("OriginNoneDicomStudyId")]
|
||||
[JsonIgnore]
|
||||
public NoneDicomStudy OriginNoneDicomStudy { get; set; }
|
||||
|
||||
|
||||
[ForeignKey("ImageLabelNoneDicomStudyId")]
|
||||
[JsonIgnore]
|
||||
public NoneDicomStudy ImageMarkNoneDicomStudy { get; set; }
|
||||
|
||||
|
||||
//[ForeignKey("ImageMarkSubjectVisitId")]
|
||||
//[JsonIgnore]
|
||||
//public SubjectVisit ImageMarkSubjectVisit { get; set; }
|
||||
#endregion
|
||||
public Guid NoneDicomStudyId { get; set; }
|
||||
|
||||
|
|
@ -33,5 +43,13 @@ public class NoneDicomStudyFile : BaseAddDeleteAuditEntity
|
|||
[Comment("为了不影响原始检查,跟任务绑定的 NoneDicomStudyId 为guid空 这个字段记录跟原始检查绑")]
|
||||
public Guid? OriginNoneDicomStudyId { get; set; }
|
||||
#endregion
|
||||
|
||||
|
||||
#region 影像预处理访视Id NoneDicomStudyId 为guid空
|
||||
|
||||
//public Guid? ImageMarkSubjectVisitId { get; set; }
|
||||
|
||||
public Guid? ImageLabelNoneDicomStudyId { get; set; }
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,11 @@ public class TaskInstance : BaseFullAuditEntity, IEntitySeqId
|
|||
[JsonIgnore]
|
||||
[ForeignKey("StudyId")]
|
||||
public TaskStudy TaskStudy { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
#endregion
|
||||
|
||||
public Guid SeqId { get; set; }
|
||||
|
|
@ -37,6 +42,8 @@ public class TaskInstance : BaseFullAuditEntity, IEntitySeqId
|
|||
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public bool Anonymize { get; set; }
|
||||
public string Path { get; set; } = string.Empty;
|
||||
|
|
|
|||
|
|
@ -11,9 +11,16 @@ public class TaskSeries : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
|
||||
[JsonIgnore]
|
||||
public List<TaskInstance> InstanceList { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
#endregion
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public Guid SeqId { get; set; }
|
||||
public Guid StudyId { get; set; }
|
||||
|
|
|
|||
|
|
@ -19,11 +19,18 @@ public class TaskStudy : BaseFullDeleteAuditEntity, IEntitySeqId
|
|||
[JsonIgnore]
|
||||
[ForeignKey("SubjectId")]
|
||||
public Subject Subject { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SubjectVisitId")]
|
||||
public SubjectVisit SubjectVisit { get; set; }
|
||||
#endregion
|
||||
|
||||
public Guid SeqId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid? SubjectVisitId { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public int Code { get; set; } = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -176,6 +176,16 @@ public class ReadingQuestionSystem : BaseAddAuditEntity
|
|||
[Comment("数据来源")]
|
||||
public DataSources DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
[Comment("最大答案长度")]
|
||||
public int? MaxAnswerLength { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -238,7 +238,12 @@ public class ReadingQuestionTrial : BaseAddAuditEntity
|
|||
[Comment("数据来源")]
|
||||
public DataSources DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
[Comment("问题英文名称")]
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
|
|
|
|||
|
|
@ -130,6 +130,16 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity
|
|||
[Comment("数据来源")]
|
||||
public DataSources DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
[Comment("限制编辑")]
|
||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||
|
||||
|
|
@ -167,6 +177,12 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity
|
|||
[Comment("导出结果")]
|
||||
public string ExportResultStr { get; set; } = "[]";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否预设
|
||||
/// </summary>
|
||||
public bool IsPreinstall { get; set; } = false;
|
||||
|
||||
[NotMapped]
|
||||
public List<ExportResult> ExportResult
|
||||
{
|
||||
|
|
|
|||
|
|
@ -143,6 +143,16 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity
|
|||
[Comment("数据来源")]
|
||||
public DataSources DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 显示图表类型
|
||||
/// </summary>
|
||||
public ShowChartType ShowChartTypeEnum { get; set; } = ShowChartType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 选项类型
|
||||
/// </summary>
|
||||
public OptionType OptionTypeEnum { get; set; } = OptionType.Defalut;
|
||||
|
||||
[Comment("最大答案长度")]
|
||||
public int? MaxAnswerLength { get; set; }
|
||||
|
||||
|
|
@ -192,6 +202,11 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity
|
|||
/// </summary>
|
||||
public string ImageTool { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 是否预设
|
||||
/// </summary>
|
||||
public bool IsPreinstall { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 影像工具属性
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,18 @@ public class ReadingTableAnswerRowInfo : BaseFullDeleteAuditEntity
|
|||
[ForeignKey("InstanceId")]
|
||||
public DicomInstance Instance { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("SeriesId")]
|
||||
public DicomSeries DicomSeries { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// studyId 关联 dicom 和非dicom ,这里为了查询方便,默认查询非dicom dicom 通过序列查询
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[ForeignKey("StudyId")]
|
||||
public NoneDicomStudy NoneDicomStudy { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("OrganInfoId")]
|
||||
public OrganInfo OrganInfo { get; set; }
|
||||
|
|
|
|||
|
|
@ -6,6 +6,10 @@ namespace IRaCIS.Core.Domain.Models;
|
|||
public class SubjectVisit : BaseFullDeleteAuditEntity
|
||||
{
|
||||
#region 导航属性
|
||||
|
||||
[JsonIgnore]
|
||||
public List<TaskStudy> TaskStudyList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public List<TrialQCQuestionAnswer> TrialQCQuestionAnswerList { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -106,17 +106,43 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
return string.Empty;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (answerType == "upload")
|
||||
{
|
||||
return "❄❅❆❇❈❉❊" + answer;
|
||||
}
|
||||
|
||||
if (unit == ValueUnit.Custom)
|
||||
var answerList = new List<string>() { };
|
||||
|
||||
try
|
||||
{
|
||||
return answer + string.Empty + customUnit;
|
||||
answerList = JsonConvert.DeserializeObject<List<string>>(answer);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
answerList.Add(answer);
|
||||
}
|
||||
|
||||
return answer + string.Empty + unitDataList.Where(y => y.Unit == unit).Select(x => x.UnitName).FirstIsNullReturnEmpty();
|
||||
List<string> transList = new List<string>();
|
||||
foreach (var item in answerList)
|
||||
{
|
||||
if (unit == ValueUnit.Custom)
|
||||
{
|
||||
transList.Add(item + string.Empty + customUnit);
|
||||
}
|
||||
else
|
||||
{
|
||||
transList.Add(item + string.Empty + unitDataList.Where(y => y.Unit == unit).Select(x => x.UnitName).FirstIsNullReturnEmpty());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return string.Join(",", transList);
|
||||
|
||||
}
|
||||
public string GetEntityAuditOpt(EntityEntry entityEntry)
|
||||
{
|
||||
|
|
@ -262,7 +288,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
var entity = item.Entity as ReadingImportFile;
|
||||
|
||||
|
||||
var visitTaskInfo = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).Include(x=>x.DoctorUser).FirstOrDefaultAsync();
|
||||
var visitTaskInfo = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).Include(x => x.DoctorUser).FirstOrDefaultAsync();
|
||||
|
||||
await InsertInspection<ReadingImportFile>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
|
|
@ -2533,20 +2559,35 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
var extraIdentification = string.Empty;
|
||||
|
||||
Arm armEnum = Arm.SingleReadingArm;
|
||||
|
||||
Guid? subjectVisitId = null;
|
||||
|
||||
Arm? armEnum = Arm.SingleReadingArm;
|
||||
if (entity.VisitTaskId != null)
|
||||
{
|
||||
extraIdentification = "/VisitTask";
|
||||
armEnum = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).Select(x => x.ArmEnum).FirstOrDefaultAsync();
|
||||
var obj = await _dbContext.VisitTask.Where(x => x.Id == entity.VisitTaskId).Select(x => new { x.ArmEnum, x.SourceSubjectVisitId }).FirstOrDefaultAsync();
|
||||
armEnum = obj?.ArmEnum;
|
||||
subjectVisitId = obj.SourceSubjectVisitId;
|
||||
}
|
||||
else if (entity.ImageLabelNoneDicomStudyId != null)
|
||||
{
|
||||
//默认R0
|
||||
extraIdentification = "/VisitTask";
|
||||
|
||||
//var noneDicomStudy = await _dbContext.NoneDicomStudy.FindAsync(entity.NoneDicomStudyId);
|
||||
subjectVisitId = await _dbContext.NoneDicomStudy.Where(x => x.Id == entity.ImageLabelNoneDicomStudyId).Select(t => t.SubjectVisitId).FirstOrDefaultAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
subjectVisitId = (await _dbContext.NoneDicomStudy.FindAsync(entity.NoneDicomStudyId))?.SubjectVisitId;
|
||||
}
|
||||
|
||||
await InsertInspection<NoneDicomStudyFile>(item.Entity as NoneDicomStudyFile, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
//SubjectVisitId = noneDicomStudy.SubjectVisitId,
|
||||
SubjectVisitId = subjectVisitId,
|
||||
//SubjectId = noneDicomStudy.SubjectId,
|
||||
ObjectRelationParentId = x.VisitTaskId,
|
||||
VisitTaskId= x.VisitTaskId,
|
||||
ObjectRelationParentId = subjectVisitId,
|
||||
ObjectRelationParentId2 = x.NoneDicomStudyId,
|
||||
ObjectRelationParentId3 = x.OriginNoneDicomStudyId,
|
||||
ExtraIndentification = extraIdentification
|
||||
|
|
@ -3696,7 +3737,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
string questionName = string.Empty;
|
||||
string questionAnswer = string.Empty;
|
||||
if (thisQuestinonAnswer != null&& question!=null)
|
||||
if (thisQuestinonAnswer != null && question != null)
|
||||
{
|
||||
questionName = _userInfo.IsEn_Us ? question.QuestionEnName : question.QuestionName;
|
||||
questionAnswer = Translationunit(question.Type, question.Unit, question.CustomUnit, unitDataList, thisQuestinonAnswer.Answer);
|
||||
|
|
@ -3857,9 +3898,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
entity.OrderMark = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => x.OrderMark).FirstOrDefaultAsync();
|
||||
|
||||
entity.RowMark = entity.OrderMark+ entity.RowIndex.GetLesionMark();
|
||||
|
||||
|
||||
entity.RowMark = entity.OrderMark + entity.RowIndex.GetLesionMark();
|
||||
|
||||
|
||||
string extraIdentification = string.Empty;
|
||||
|
|
@ -4123,7 +4162,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class DicomSeriesConfigration : IEntityTypeConfiguration<DicomSeries>
|
|||
builder.HasMany(s => s.DicomInstanceList).WithOne(di => di.DicomSerie).HasForeignKey(t => t.SeriesId).HasPrincipalKey(se => se.Id);
|
||||
|
||||
builder.HasMany(s => s.SubjectCriteriaEvaluationVisitStudyFilterList).WithOne(di => di.Series).HasForeignKey(t => t.SeriesId).HasPrincipalKey(se => se.Id);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -42,10 +42,10 @@ public class DicomInstanceConfigration : IEntityTypeConfiguration<DicomInstance>
|
|||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
|
||||
builder.HasOne(e => e.DicomStudy).WithMany(c=>c.InstanceList).HasForeignKey(t=>t.StudyId).HasPrincipalKey(st => st.Id);
|
||||
builder.HasOne(e => e.DicomStudy).WithMany(c => c.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
||||
|
||||
builder.HasMany(s => s.ReadingTableAnswerRowInfoList).WithOne(di => di.Instance).HasForeignKey(t => t.InstanceId).HasPrincipalKey(se => se.Id);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ public class TaskInstanceConfigration : IEntityTypeConfiguration<TaskInstance>
|
|||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
|
||||
builder.HasOne(e => e.TaskStudy).WithMany(t=>t.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
||||
builder.HasOne(e => e.TaskStudy).WithMany(t => t.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -112,6 +112,18 @@ public class SCPInstanceConfigration : IEntityTypeConfiguration<SCPInstance>
|
|||
}
|
||||
|
||||
|
||||
public class ReadingTableAnswerRowInfoConfigration : IEntityTypeConfiguration<ReadingTableAnswerRowInfo>
|
||||
{
|
||||
public void Configure(EntityTypeBuilder<ReadingTableAnswerRowInfo> builder)
|
||||
{
|
||||
|
||||
|
||||
builder.HasOne(e => e.DicomSeries).WithMany().HasForeignKey(t => t.SeriesId).HasPrincipalKey(st => st.Id);
|
||||
|
||||
//builder.HasOne(e => e.Instance).WithMany().HasForeignKey(t => t.InstanceId).HasPrincipalKey(st => st.Id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,10 @@ namespace IRaCIS.Core.Infra.EFCore.EntityConfigration
|
|||
//同样一个实体 有两个相同的类型的导航属性,需要手动配置
|
||||
builder.HasMany(t => t.NoneDicomFileList).WithOne(s => s.NoneDicomStudy).HasForeignKey(t => t.NoneDicomStudyId);
|
||||
builder.HasMany(t => t.TaskNoneDicomFileList).WithOne(s => s.OriginNoneDicomStudy).HasForeignKey(t => t.OriginNoneDicomStudyId);
|
||||
|
||||
builder.HasMany(t => t.ImageLabelNoneDicomFileList).WithOne(s => s.ImageMarkNoneDicomStudy).HasForeignKey(t => t.ImageLabelNoneDicomStudyId);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
20344
IRaCIS.Core.Infra.EFCore/Migrations/20251010074451_IsPreinstall.Designer.cs
generated
Normal file
20344
IRaCIS.Core.Infra.EFCore/Migrations/20251010074451_IsPreinstall.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,40 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class IsPreinstall : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsPreinstall",
|
||||
table: "ReadingTableQuestionTrial",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsPreinstall",
|
||||
table: "ReadingTableQuestionSystem",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsPreinstall",
|
||||
table: "ReadingTableQuestionTrial");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsPreinstall",
|
||||
table: "ReadingTableQuestionSystem");
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,160 @@
|
|||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class octadd : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskStudy",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskSeries",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskInstance",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "ImageLabelNoneDicomStudyId",
|
||||
table: "NoneDicomStudyFile",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_TrialCriterionKeyFile_TrialCriterionId",
|
||||
// table: "TrialCriterionKeyFile",
|
||||
// column: "TrialCriterionId");
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_TaskStudy_SubjectVisitId",
|
||||
// table: "TaskStudy",
|
||||
// column: "SubjectVisitId");
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_TaskSeries_SubjectVisitId",
|
||||
// table: "TaskSeries",
|
||||
// column: "SubjectVisitId");
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_TaskInstance_SubjectVisitId",
|
||||
// table: "TaskInstance",
|
||||
// column: "SubjectVisitId");
|
||||
|
||||
//migrationBuilder.CreateIndex(
|
||||
// name: "IX_NoneDicomStudyFile_ImageLabelNoneDicomStudyId",
|
||||
// table: "NoneDicomStudyFile",
|
||||
// column: "ImageLabelNoneDicomStudyId");
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_NoneDicomStudyFile_NoneDicomStudy_ImageLabelNoneDicomStudyId",
|
||||
// table: "NoneDicomStudyFile",
|
||||
// column: "ImageLabelNoneDicomStudyId",
|
||||
// principalTable: "NoneDicomStudy",
|
||||
// principalColumn: "Id");
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_TaskInstance_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskInstance",
|
||||
// column: "SubjectVisitId",
|
||||
// principalTable: "SubjectVisit",
|
||||
// principalColumn: "Id");
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_TaskSeries_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskSeries",
|
||||
// column: "SubjectVisitId",
|
||||
// principalTable: "SubjectVisit",
|
||||
// principalColumn: "Id");
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_TaskStudy_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskStudy",
|
||||
// column: "SubjectVisitId",
|
||||
// principalTable: "SubjectVisit",
|
||||
// principalColumn: "Id");
|
||||
|
||||
//migrationBuilder.AddForeignKey(
|
||||
// name: "FK_TrialCriterionKeyFile_ReadingQuestionCriterionTrial_TrialCriterionId",
|
||||
// table: "TrialCriterionKeyFile",
|
||||
// column: "TrialCriterionId",
|
||||
// principalTable: "ReadingQuestionCriterionTrial",
|
||||
// principalColumn: "Id",
|
||||
// onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
//migrationBuilder.DropForeignKey(
|
||||
// name: "FK_NoneDicomStudyFile_NoneDicomStudy_ImageLabelNoneDicomStudyId",
|
||||
// table: "NoneDicomStudyFile");
|
||||
|
||||
//migrationBuilder.DropForeignKey(
|
||||
// name: "FK_TaskInstance_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskInstance");
|
||||
|
||||
//migrationBuilder.DropForeignKey(
|
||||
// name: "FK_TaskSeries_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskSeries");
|
||||
|
||||
//migrationBuilder.DropForeignKey(
|
||||
// name: "FK_TaskStudy_SubjectVisit_SubjectVisitId",
|
||||
// table: "TaskStudy");
|
||||
|
||||
//migrationBuilder.DropForeignKey(
|
||||
// name: "FK_TrialCriterionKeyFile_ReadingQuestionCriterionTrial_TrialCriterionId",
|
||||
// table: "TrialCriterionKeyFile");
|
||||
|
||||
//migrationBuilder.DropIndex(
|
||||
// name: "IX_TrialCriterionKeyFile_TrialCriterionId",
|
||||
// table: "TrialCriterionKeyFile");
|
||||
|
||||
//migrationBuilder.DropIndex(
|
||||
// name: "IX_TaskStudy_SubjectVisitId",
|
||||
// table: "TaskStudy");
|
||||
|
||||
//migrationBuilder.DropIndex(
|
||||
// name: "IX_TaskSeries_SubjectVisitId",
|
||||
// table: "TaskSeries");
|
||||
|
||||
//migrationBuilder.DropIndex(
|
||||
// name: "IX_TaskInstance_SubjectVisitId",
|
||||
// table: "TaskInstance");
|
||||
|
||||
//migrationBuilder.DropIndex(
|
||||
// name: "IX_NoneDicomStudyFile_ImageLabelNoneDicomStudyId",
|
||||
// table: "NoneDicomStudyFile");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskStudy");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskSeries");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SubjectVisitId",
|
||||
table: "TaskInstance");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ImageLabelNoneDicomStudyId",
|
||||
table: "NoneDicomStudyFile");
|
||||
}
|
||||
}
|
||||
}
|
||||
21333
IRaCIS.Core.Infra.EFCore/Migrations/20251204092307_OptionTypeEnum.Designer.cs
generated
Normal file
21333
IRaCIS.Core.Infra.EFCore/Migrations/20251204092307_OptionTypeEnum.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,62 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace IRaCIS.Core.Infra.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class OptionTypeEnum : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "OptionTypeEnum",
|
||||
table: "ReadingTableQuestionTrial",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "OptionTypeEnum",
|
||||
table: "ReadingTableQuestionSystem",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "OptionTypeEnum",
|
||||
table: "ReadingQuestionTrial",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "OptionTypeEnum",
|
||||
table: "ReadingQuestionSystem",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OptionTypeEnum",
|
||||
table: "ReadingTableQuestionTrial");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OptionTypeEnum",
|
||||
table: "ReadingTableQuestionSystem");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OptionTypeEnum",
|
||||
table: "ReadingQuestionTrial");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OptionTypeEnum",
|
||||
table: "ReadingQuestionSystem");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3538,6 +3538,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<Guid?>("ImageLabelNoneDicomStudyId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.HasColumnType("bit");
|
||||
|
||||
|
|
@ -3563,6 +3566,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.HasIndex("ImageLabelNoneDicomStudyId");
|
||||
|
||||
b.HasIndex("NoneDicomStudyId");
|
||||
|
||||
b.HasIndex("OriginNoneDicomStudyId");
|
||||
|
|
@ -6279,6 +6284,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasColumnType("int")
|
||||
.HasComment("最大问题数");
|
||||
|
||||
b.Property<int>("OptionTypeEnum")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderMark")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
|
|
@ -6585,6 +6593,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasColumnType("int")
|
||||
.HasComment("最大问题数");
|
||||
|
||||
b.Property<int>("OptionTypeEnum")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderMark")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
|
|
@ -7105,6 +7116,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasColumnType("bit")
|
||||
.HasComment("是否启用");
|
||||
|
||||
b.Property<bool>("IsPreinstall")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("IsRequired")
|
||||
.HasColumnType("int");
|
||||
|
||||
|
|
@ -7120,6 +7134,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.HasColumnType("int")
|
||||
.HasComment("最大问题数");
|
||||
|
||||
b.Property<int>("OptionTypeEnum")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("ParentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
|
|
@ -7337,6 +7354,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<bool>("IsEnable")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsPreinstall")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("IsRequired")
|
||||
.HasColumnType("int");
|
||||
|
||||
|
|
@ -7351,6 +7371,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<int?>("MaxRowCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("OptionTypeEnum")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("ParentId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
|
|
@ -10564,6 +10587,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("SubjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("SubjectVisitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("TransferSytaxUID")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
|
|
@ -10599,6 +10625,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("StudyId");
|
||||
|
||||
b.HasIndex("SubjectVisitId");
|
||||
|
||||
b.ToTable("TaskInstance", t =>
|
||||
{
|
||||
t.HasComment("项目阅片 - 任务后处理Instance");
|
||||
|
|
@ -10921,6 +10949,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("SubjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("SubjectVisitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("TrialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
|
|
@ -10944,6 +10975,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("StudyId");
|
||||
|
||||
b.HasIndex("SubjectVisitId");
|
||||
|
||||
b.ToTable("TaskSeries", t =>
|
||||
{
|
||||
t.HasComment("项目阅片 - 任务后上传序列");
|
||||
|
|
@ -11094,6 +11127,9 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Property<Guid>("SubjectId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("SubjectVisitId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("TrialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
|
|
@ -11117,6 +11153,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.HasIndex("SubjectId");
|
||||
|
||||
b.HasIndex("SubjectVisitId");
|
||||
|
||||
b.HasIndex("VisitTaskId");
|
||||
|
||||
b.ToTable("TaskStudy", t =>
|
||||
|
|
@ -11974,6 +12012,42 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.ToTable("TrialCriterionDictionaryCode");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionKeyFile", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreateTime")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid>("CreateUserId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("FileName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<string>("FilePath")
|
||||
.IsRequired()
|
||||
.HasMaxLength(400)
|
||||
.HasColumnType("nvarchar(400)");
|
||||
|
||||
b.Property<Guid>("TrialCriterionId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("CreateUserId");
|
||||
|
||||
b.HasIndex("TrialCriterionId");
|
||||
|
||||
b.ToTable("TrialCriterionKeyFile", t =>
|
||||
{
|
||||
t.HasComment("项目标准阅片关键点文件");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -15450,7 +15524,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.IdentityUser", "IdentityUser")
|
||||
.WithMany()
|
||||
.WithMany("AuditRecordList")
|
||||
.HasForeignKey("IdentityUserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
|
@ -16215,6 +16289,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "ImageMarkNoneDicomStudy")
|
||||
.WithMany("ImageLabelNoneDicomFileList")
|
||||
.HasForeignKey("ImageLabelNoneDicomStudyId");
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.NoneDicomStudy", "NoneDicomStudy")
|
||||
.WithMany("NoneDicomFileList")
|
||||
.HasForeignKey("NoneDicomStudyId")
|
||||
|
|
@ -16231,6 +16309,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("ImageMarkNoneDicomStudy");
|
||||
|
||||
b.Navigation("NoneDicomStudy");
|
||||
|
||||
b.Navigation("OriginNoneDicomStudy");
|
||||
|
|
@ -16912,7 +16992,7 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "OncologyVisitTask")
|
||||
.WithMany()
|
||||
.WithMany("OncologyResultList")
|
||||
.HasForeignKey("OncologyTaskId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
|
@ -18309,8 +18389,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
||||
.WithMany()
|
||||
.HasForeignKey("SubjectVisitId");
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("SubjectVisit");
|
||||
|
||||
b.Navigation("TaskSeries");
|
||||
|
||||
b.Navigation("TaskStudy");
|
||||
|
|
@ -18389,8 +18475,14 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
||||
.WithMany()
|
||||
.HasForeignKey("SubjectVisitId");
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("SubjectVisit");
|
||||
|
||||
b.Navigation("TaskStudy");
|
||||
});
|
||||
|
||||
|
|
@ -18408,6 +18500,10 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.SubjectVisit", "SubjectVisit")
|
||||
.WithMany("TaskStudyList")
|
||||
.HasForeignKey("SubjectVisitId");
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.VisitTask", "VisitTask")
|
||||
.WithMany("TaskStudyList")
|
||||
.HasForeignKey("VisitTaskId")
|
||||
|
|
@ -18418,6 +18514,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.Navigation("Subject");
|
||||
|
||||
b.Navigation("SubjectVisit");
|
||||
|
||||
b.Navigation("VisitTask");
|
||||
});
|
||||
|
||||
|
|
@ -18669,6 +18767,25 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
b.Navigation("TrialReadingCriterion");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialCriterionKeyFile", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("CreateUserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", "TrialReadingCriterion")
|
||||
.WithMany("KeyFileList")
|
||||
.HasForeignKey("TrialCriterionId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CreateUserRole");
|
||||
|
||||
b.Navigation("TrialReadingCriterion");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.TrialDicomAE", b =>
|
||||
{
|
||||
b.HasOne("IRaCIS.Core.Domain.Models.UserRole", "CreateUserRole")
|
||||
|
|
@ -19951,6 +20068,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.IdentityUser", b =>
|
||||
{
|
||||
b.Navigation("AuditRecordList");
|
||||
|
||||
b.Navigation("SystemDocConfirmedList");
|
||||
|
||||
b.Navigation("UserRoleList");
|
||||
|
|
@ -19965,6 +20084,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.NoneDicomStudy", b =>
|
||||
{
|
||||
b.Navigation("ImageLabelNoneDicomFileList");
|
||||
|
||||
b.Navigation("NoneDicomFileList");
|
||||
|
||||
b.Navigation("TaskNoneDicomFileList");
|
||||
|
|
@ -20013,6 +20134,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
modelBuilder.Entity("IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial", b =>
|
||||
{
|
||||
b.Navigation("KeyFileList");
|
||||
|
||||
b.Navigation("TrialClinicalDataSetCriterionList");
|
||||
|
||||
b.Navigation("TrialCriterionAdditionalAssessmentTypeList");
|
||||
|
|
@ -20121,6 +20244,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.Navigation("SubjectVisitImageBackRecordList");
|
||||
|
||||
b.Navigation("TaskStudyList");
|
||||
|
||||
b.Navigation("TrialQCQuestionAnswerList");
|
||||
|
||||
b.Navigation("VisitTaskList");
|
||||
|
|
@ -20311,6 +20436,8 @@ namespace IRaCIS.Core.Infra.EFCore.Migrations
|
|||
|
||||
b.Navigation("LesionList");
|
||||
|
||||
b.Navigation("OncologyResultList");
|
||||
|
||||
b.Navigation("ReadingNoneDicomMarkList");
|
||||
|
||||
b.Navigation("ReadingTaskQuestionAnswerList");
|
||||
|
|
|
|||
|
|
@ -119,7 +119,10 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
/// <summary>EntityState.Detached的实体 修改 部分字段</summary>
|
||||
public static void EntityModifyPartialFiled<T>(this IRaCISDBContext _dbContext, T waitModifyEntity, Expression<Func<T, T>> updateFactory) where T : Entity
|
||||
{
|
||||
var entityEntry = _dbContext.Entry(waitModifyEntity);
|
||||
//解决重复跟踪问题
|
||||
var tracked = _dbContext.ChangeTracker.Entries<T>().FirstOrDefault(e => e.Entity.Id.Equals(waitModifyEntity.Id));
|
||||
var entityEntry = tracked?? _dbContext.Entry(waitModifyEntity);
|
||||
|
||||
//entityEntry.State = EntityState.Detached;
|
||||
|
||||
var list = ((MemberInitExpression)updateFactory.Body).Bindings.Select(mb => mb.Member.Name)
|
||||
|
|
@ -134,7 +137,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
foreach (PropertyInfo prop in list)
|
||||
{
|
||||
_dbContext.Entry(waitModifyEntity).Property(prop.Name).IsModified = true;
|
||||
entityEntry.Property(prop.Name).IsModified = true;
|
||||
|
||||
object value = prop.GetValue(applyObj);
|
||||
prop.SetValue(waitModifyEntity, value);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using IRaCIS.Core.API._ServiceExtensions.NewtonsoftJson;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
|
||||
|
|
@ -75,6 +76,13 @@ namespace IRaCIS.Core.Infrastructure.Extention
|
|||
|
||||
foreach (PropertyInfo property in properties)
|
||||
{
|
||||
//质控导出需要集合
|
||||
// if (typeof(IEnumerable).IsAssignableFrom(property.PropertyType)
|
||||
//&& property.PropertyType != typeof(string))
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
string propertyName = property.Name;
|
||||
object propertyValue = property.GetValue(obj);
|
||||
// 如果属性的类型是枚举,将其值保留为整数
|
||||
|
|
|
|||
|
|
@ -306,6 +306,15 @@ public static class StaticData
|
|||
|
||||
public const string SystenMedicalQCQuestionsList_Export = "SystenMedicalQCQuestionsList_Export";
|
||||
|
||||
//一致性全量核查导出
|
||||
public const string TrialConsistentFUllCheckList_Export = "TrialConsistentFUllCheckList_Export";
|
||||
|
||||
public const string TumorCDISC_Export = "TumorCDISC_Export";
|
||||
|
||||
public const string IVUS_CDISC_Export = "IVUS_CDISC_Export";
|
||||
|
||||
public const string OCT_CDISC_Export = "OCT_CDISC_Export";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue