diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs index d62d88e18..dc6642fcb 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/IRECIST1Point1CalculateService.cs @@ -223,7 +223,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { "ImageProblem",imageProblem}, }).ToList(); - + var patientIdStrList = await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => x.PatientIdStr).Distinct().ToListAsync(); var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync(); @@ -270,7 +270,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { "SubjectName",subjectInfo.ShortName }, //患者姓名 { "SubjectSex", subjectInfo.Sex==string.Empty?string.Empty: subjectInfo.Sex=="M"?"男":"女" }, //患者性别 { "SubjectAge",subjectInfo.Age==null?string.Empty: subjectInfo.Age +"岁" }, //患者年龄 - { "SubjectCode",string.Join(",",subjectPatientList.Select(x=>x.Patient).OrderByDescending(x=>x.CreateTime).Select(x=>x.PatientIdStr).ToList()) }, //患者编号 + { "SubjectCode",string.Join(",",patientIdStrList) }, //患者编号 { "VisitName",visitInfo.VisitName }, //访视名称 { "LatestScanDate",visitInfo.StudyList.Min(x=>x.StudyTime)?.ToString("yyyy-MM-dd") }, //随访日期 { "CriterionName",taskinfo.TrialReadingCriterion.CriterionName }, //评估标准 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs index 48fb27833..1b53e6db3 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/MRECISTHCCCalculateService.cs @@ -56,6 +56,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate .Include(x => x.TrialReadingCriterion).FirstNotNullAsync(); var visitInfo = await _subjectVisitRepository.Where(x => x.Id == taskinfo.SourceSubjectVisitId).Include(x => x.StudyList).FirstNotNullAsync(); var subjectInfo = await _subjectRepository.Where(x => x.Id == taskinfo.SubjectId).Include(x => x.Trial).Include(x => x.SubjectPatientList).FirstNotNullAsync(); + var patientIdStrList = await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => x.PatientIdStr).Distinct().ToListAsync(); var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync(); var trialQuestion = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync(); var tableQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync(); @@ -179,7 +180,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var researchProgramNo = subjectInfo.Trial.ResearchProgramNo; var subjectName = subjectInfo.ShortName; - var subjectCode = string.Join(",", subjectPatientList.Select(x => x.Patient).OrderByDescending(x => x.CreateTime).Select(x => x.PatientIdStr).ToList()); //患者编号; + var subjectCode = string.Join(",", patientIdStrList); //患者编号; @@ -419,7 +420,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { "ImageProblem",imageProblem}, }).ToList(); - + var patientIdStrList = await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => x.PatientIdStr).Distinct().ToListAsync(); var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync(); var assessmentResult = string.Empty; @@ -442,7 +443,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { "SubjectName",subjectInfo.ShortName }, //患者姓名 { "SubjectSex", subjectInfo.Sex==string.Empty?string.Empty: subjectInfo.Sex=="M"?"男":"女" }, //患者性别 { "SubjectAge",subjectInfo.Age==null?string.Empty: subjectInfo.Age +"岁" }, //患者年龄 - { "SubjectCode",string.Join(",",subjectPatientList.Select(x=>x.Patient).OrderByDescending(x=>x.CreateTime).Select(x=>x.PatientIdStr).ToList()) }, //患者编号 + { "SubjectCode",string.Join(",",patientIdStrList) }, //患者编号 { "VisitName",visitInfo.VisitName }, //访视名称 { "LatestScanDate",visitInfo.StudyList.Min(x=>x.StudyTime)?.ToString("yyyy-MM-dd") }, //随访日期 { "CriterionName",taskinfo.TrialReadingCriterion.CriterionName }, //评估标准 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs index 509a47ec6..0ee883fad 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs @@ -194,7 +194,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { "ImageProblem",imageProblem}, }).ToList(); - + var patientIdStrList = await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => x.PatientIdStr).Distinct().ToListAsync(); var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync(); @@ -206,7 +206,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { "SubjectName",subjectInfo.ShortName }, //患者姓名 { "SubjectSex", subjectInfo.Sex==string.Empty?string.Empty: subjectInfo.Sex=="M"?"男":"女" }, //患者性别 { "SubjectAge",subjectInfo.Age==null?string.Empty: subjectInfo.Age +"岁" }, //患者年龄 - { "SubjectCode",string.Join(",",subjectPatientList.Select(x=>x.Patient).OrderByDescending(x=>x.CreateTime).Select(x=>x.PatientIdStr).ToList()) }, //患者编号 + { "SubjectCode",string.Join(",",patientIdStrList) }, //患者编号 { "VisitName",visitInfo.VisitName }, //访视名称 { "LatestScanDate",visitInfo.StudyList.Min(x=>x.StudyTime)?.ToString("yyyy-MM-dd") }, //随访日期 { "CriterionName",taskinfo.TrialReadingCriterion.CriterionName }, //评估标准 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs index 2a26b6b48..17aaf8638 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs @@ -72,6 +72,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var visitInfo = await _subjectVisitRepository.Where(x => x.Id == taskinfo.SourceSubjectVisitId).Include(x => x.StudyList).FirstNotNullAsync(); var subjectInfo = await _subjectRepository.Where(x => x.Id == taskinfo.SubjectId).Include(x => x.Trial).Include(x => x.SubjectPatientList).FirstNotNullAsync(); var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync(); + var patientIdStrList = await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => x.PatientIdStr).Distinct().ToListAsync(); var trialQuestion = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync(); var tableQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync(); var dicotionCode = trialQuestion.Where(x => x.DictionaryCode != string.Empty).Select(x => x.DictionaryCode).Distinct().ToList(); @@ -194,7 +195,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var researchProgramNo = subjectInfo.Trial.ResearchProgramNo; var subjectName = subjectInfo.ShortName; - var subjectCode = string.Join(",", subjectPatientList.Select(x => x.Patient).OrderByDescending(x => x.CreateTime).Select(x => x.PatientIdStr).ToList()); //患者编号; + var subjectCode = string.Join(",", patientIdStrList); //患者编号; @@ -434,7 +435,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { "ImageProblem",imageProblem}, }).ToList(); - + var patientIdStrList = await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => x.PatientIdStr).Distinct().ToListAsync(); var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync(); var assessmentResult = string.Empty; @@ -457,7 +458,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { "SubjectName",subjectInfo.ShortName }, //患者姓名 { "SubjectSex", subjectInfo.Sex==string.Empty?string.Empty: subjectInfo.Sex=="M"?"男":"女" }, //患者性别 { "SubjectAge",subjectInfo.Age==null?string.Empty: subjectInfo.Age +"岁" }, //患者年龄 - { "SubjectCode",string.Join(",",subjectPatientList.Select(x=>x.Patient).OrderByDescending(x=>x.CreateTime).Select(x=>x.PatientIdStr).ToList()) }, //患者编号 + { "SubjectCode",string.Join(",",patientIdStrList) }, //患者编号 { "VisitName",visitInfo.VisitName }, //访视名称 { "LatestScanDate",visitInfo.StudyList.Min(x=>x.StudyTime)?.ToString("yyyy-MM-dd") }, //随访日期 { "CriterionName",taskinfo.TrialReadingCriterion.CriterionName }, //评估标准 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs index bbfa9ac77..1edf1f21a 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1_BMCalculateService.cs @@ -67,6 +67,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate .Include(x => x.TrialReadingCriterion).FirstNotNullAsync(); var visitInfo = await _subjectVisitRepository.Where(x => x.Id == taskinfo.SourceSubjectVisitId).Include(x => x.StudyList).FirstNotNullAsync(); var subjectInfo = await _subjectRepository.Where(x => x.Id == taskinfo.SubjectId).Include(x => x.Trial).Include(x => x.SubjectPatientList).FirstNotNullAsync(); + var patientIdStrList = await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => x.PatientIdStr).Distinct().ToListAsync(); var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync(); var trialQuestion = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync(); var tableQuestion = await _readingTableQuestionTrialRepository.Where(x => x.ReadingQuestionTrial.ReadingQuestionCriterionTrialId == taskinfo.TrialReadingCriterionId).ToListAsync(); @@ -190,7 +191,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var researchProgramNo = subjectInfo.Trial.ResearchProgramNo; var subjectName = subjectInfo.ShortName; - var subjectCode = string.Join(",", subjectPatientList.Select(x => x.Patient).OrderByDescending(x => x.CreateTime).Select(x => x.PatientIdStr).ToList()); //患者编号; + var subjectCode = string.Join(",", patientIdStrList); //患者编号; @@ -428,7 +429,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { "ImageProblem",imageProblem}, }).ToList(); - + var patientIdStrList = await _dicomStudyRepository.Where(x => x.SubjectVisitId == taskinfo.SourceSubjectVisitId).Select(x => x.PatientIdStr).Distinct().ToListAsync(); var subjectPatientList = await _subjectPatientRepository.Where(x => x.SubjectId == subjectInfo.Id).Include(x => x.Patient).ToListAsync(); var assessmentResult = string.Empty; @@ -452,7 +453,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { "SubjectName",subjectInfo.ShortName }, //患者姓名 { "SubjectSex", subjectInfo.Sex==string.Empty?string.Empty: subjectInfo.Sex=="M"?"男":"女" }, //患者性别 { "SubjectAge",subjectInfo.Age==null?string.Empty: subjectInfo.Age +"岁" }, //患者年龄 - { "SubjectCode",string.Join(",",subjectPatientList.Select(x=>x.Patient).OrderByDescending(x=>x.CreateTime).Select(x=>x.PatientIdStr).ToList()) }, //患者编号 + { "SubjectCode",string.Join(",",patientIdStrList) }, //患者编号 { "VisitName",visitInfo.VisitName }, //访视名称 { "LatestScanDate",visitInfo.StudyList.Min(x=>x.StudyTime)?.ToString("yyyy-MM-dd") }, //随访日期 { "CriterionName",taskinfo.TrialReadingCriterion.CriterionName }, //评估标准