修改时间解析
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
c266c68be8
commit
5f338de0cd
|
@ -2962,45 +2962,42 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
using (@lock.Acquire())
|
||||
{
|
||||
if (result.Count == maxStudyCount)
|
||||
if (result.Count >= maxStudyCount)
|
||||
{
|
||||
response.Status = DicomStatus.Cancel;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
var studyTime = response.Dataset.GetDateTime(DicomTag.StudyDate, DicomTag.StudyTime);
|
||||
|
||||
DateOnly datePart = DateOnly.FromDateTime(studyTime);
|
||||
TimeOnly timePart = TimeOnly.FromDateTime(studyTime);
|
||||
|
||||
DateTime? birthDate = DateTime.ParseExact(response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientBirthDate, ""), "yyyyMMdd", null);
|
||||
// 格式化为你需要的日期格式,例如:yyyy-MM-dd
|
||||
string formattedBirthDate = birthDate?.ToString("yyyy-MM-dd") ?? string.Empty;
|
||||
|
||||
|
||||
result.Add(new SCUStudyView()
|
||||
else
|
||||
{
|
||||
PatientID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientID, ""),
|
||||
PatientName = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientName, ""),
|
||||
PatientSex = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientSex, ""),
|
||||
PatientBirthDate = formattedBirthDate,
|
||||
StudyID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyID, ""),
|
||||
AccessionNumber = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.AccessionNumber, ""),
|
||||
ModalitiesInStudy = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.ModalitiesInStudy, ""),
|
||||
StudyDate = datePart.ToString("yyyy-MM-dd"),
|
||||
StudyTime = timePart.ToString("HH:mm:ss"),
|
||||
BodyPartExamined = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.BodyPartExamined, ""),
|
||||
StudyDescription = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyDescription, ""),
|
||||
StudyInstanceUID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyInstanceUID, "")
|
||||
});
|
||||
var studyTime = response.Dataset.GetDateTime(DicomTag.StudyDate, DicomTag.StudyTime);
|
||||
|
||||
if (result.Count == maxStudyCount)
|
||||
{
|
||||
response.Status = DicomStatus.Cancel;
|
||||
DateOnly datePart = DateOnly.FromDateTime(studyTime);
|
||||
TimeOnly timePart = TimeOnly.FromDateTime(studyTime);
|
||||
|
||||
return;
|
||||
var canParce = DateTime.TryParseExact(response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientBirthDate, ""), "yyyyMMdd", null, System.Globalization.DateTimeStyles.None, out DateTime birthDate);
|
||||
|
||||
// 格式化为你需要的日期格式,例如:yyyy-MM-dd
|
||||
string formattedBirthDate = canParce? birthDate.ToString("yyyy-MM-dd"):string.Empty;
|
||||
|
||||
|
||||
result.Add(new SCUStudyView()
|
||||
{
|
||||
PatientID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientID, ""),
|
||||
PatientName = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientName, ""),
|
||||
PatientSex = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientSex, ""),
|
||||
PatientBirthDate = formattedBirthDate,
|
||||
StudyID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyID, ""),
|
||||
AccessionNumber = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.AccessionNumber, ""),
|
||||
ModalitiesInStudy = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.ModalitiesInStudy, ""),
|
||||
StudyDate = datePart.ToString("yyyy-MM-dd"),
|
||||
StudyTime = timePart.ToString("HH:mm:ss"),
|
||||
BodyPartExamined = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.BodyPartExamined, ""),
|
||||
StudyDescription = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyDescription, ""),
|
||||
StudyInstanceUID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyInstanceUID, "")
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -3017,14 +3014,14 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//看当前前端有没有传递modality,有的话以前端为准,没有的话以配置为准 构造同样数量的请求
|
||||
|
||||
var requestModalityList = (inQuery.ModalitiesInStudyList != null && inQuery.ModalitiesInStudyList.Count > 0) ? inQuery.ModalitiesInStudyList : find.ModalityList;
|
||||
|
||||
requestModalityList = requestModalityList.Count == 0 ? new List<string>() { "" } : requestModalityList;
|
||||
|
||||
//requestModalityList = new List<string>() { "" };
|
||||
|
||||
var requestList = new List<DicomCFindRequest>();
|
||||
foreach (var modality in requestModalityList)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue