From 525cae72324c15208743835d78511725a56f00c6 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 28 Aug 2025 15:01:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9F=A5=E8=AF=A2=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRC.Core.SCP/Service/DicomArchiveService.cs | 22 +++++++++++++++++++ .../Allocation/DTO/VisitTaskViewModel.cs | 4 +++- .../Service/Allocation/VisitTaskService.cs | 2 ++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/IRC.Core.SCP/Service/DicomArchiveService.cs b/IRC.Core.SCP/Service/DicomArchiveService.cs index a701f3c95..3df47a3b7 100644 --- a/IRC.Core.SCP/Service/DicomArchiveService.cs +++ b/IRC.Core.SCP/Service/DicomArchiveService.cs @@ -139,6 +139,28 @@ namespace IRaCIS.Core.SCP.Service findPatient.PatientName = dataset.GetSingleValueOrDefault(DicomTag.PatientName, string.Empty); findPatient.PatientSex = dataset.GetSingleValueOrDefault(DicomTag.PatientSex, string.Empty); findPatient.PatientAge = dataset.GetSingleValueOrDefault(DicomTag.PatientAge, string.Empty); + + if (findPatient.PatientBirthDate.Length == 8) + { + var birthDateStr = $"{findPatient.PatientBirthDate[0]}{findPatient.PatientBirthDate[1]}{findPatient.PatientBirthDate[2]}{findPatient.PatientBirthDate[3]}-{findPatient.PatientBirthDate[4]}{findPatient.PatientBirthDate[5]}-{findPatient.PatientBirthDate[6]}{findPatient.PatientBirthDate[7]}"; + + var yearStr = $"{findPatient.PatientBirthDate[0]}{findPatient.PatientBirthDate[1]}{findPatient.PatientBirthDate[2]}{findPatient.PatientBirthDate[3]}"; + + int year = 0; + + var canParse = int.TryParse(yearStr, out year); + + if (canParse && year > 1900) + { + findPatient.PatientBirthDate = birthDateStr; + + } + else + { + findPatient.PatientBirthDate = string.Empty; + } + + } } if (findStudy == null) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 88b6b72d3..86e60eb1d 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -526,6 +526,8 @@ namespace IRaCIS.Core.Application.ViewModel public string? PatientName { get; set; } public string? PatientIdStr { get; set; } + public EvaluateProgress? EvaluateProgressEnum { get; set; } + } public class VisitTaskQuery : PageInput @@ -660,7 +662,7 @@ namespace IRaCIS.Core.Application.ViewModel [NotDefault] public Guid TrialReadingCriterionId { get; set; } - public EvaluateProgress EvaluateProgressEnum { get; set; } + public EvaluateProgress? EvaluateProgressEnum { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 9eb6aac03..aba5e6436 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -17,6 +17,7 @@ using IRaCIS.Core.Infrastructure.Extention; using MassTransit; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; +using System.Linq; using System.Linq.Dynamic.Core; using System.Reactive.Subjects; using Subject = IRaCIS.Core.Domain.Models.Subject; @@ -1307,6 +1308,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, UnReadCanReadTaskList = x.Where(y => y.TrialReadingCriterionId == trialReadingCriterionId && y.ReadingTaskState != ReadingTaskState.HaveSigned) + .Where(t => inQuery.EvaluateProgressEnum != null ? t.EvaluateProgressEnum == inQuery.EvaluateProgressEnum : true) .Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true)) .OrderBy(x => x.VisitTaskNum) .Select(u => new IRUnreadTaskView()