修改解析
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
7318dd4812
commit
1104c1481e
|
@ -1,6 +1,7 @@
|
||||||
using FellowOakDicom;
|
using FellowOakDicom;
|
||||||
using FellowOakDicom.Imaging;
|
using FellowOakDicom.Imaging;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace IRaCIS.Core.API
|
namespace IRaCIS.Core.API
|
||||||
{
|
{
|
||||||
|
@ -9,12 +10,14 @@ namespace IRaCIS.Core.API
|
||||||
public static void AddDicomSetup(this IServiceCollection services)
|
public static void AddDicomSetup(this IServiceCollection services)
|
||||||
{
|
{
|
||||||
new DicomSetupBuilder()
|
new DicomSetupBuilder()
|
||||||
.RegisterServices(s => s.AddFellowOakDicom()
|
.RegisterServices(s => s.AddFellowOakDicom().AddLogging(config => config.AddConsole())
|
||||||
.AddTranscoderManager<FellowOakDicom.Imaging.NativeCodec.NativeTranscoderManager>()
|
.AddTranscoderManager<FellowOakDicom.Imaging.NativeCodec.NativeTranscoderManager>()
|
||||||
.AddImageManager<ImageSharpImageManager>()
|
//.AddImageManager<ImageSharpImageManager>()
|
||||||
)
|
)
|
||||||
.SkipValidation()
|
.SkipValidation()
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,7 @@ using FellowOakDicom.Network.Client;
|
||||||
using FellowOakDicom.Network;
|
using FellowOakDicom.Network;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using DocumentFormat.OpenXml.Wordprocessing;
|
using DocumentFormat.OpenXml.Wordprocessing;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace IRaCIS.Application.Services
|
namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -2838,6 +2839,32 @@ namespace IRaCIS.Application.Services
|
||||||
request.Dataset.AddOrUpdate(new DicomTag(0x8, 0x5), "ISO_IR 100");
|
request.Dataset.AddOrUpdate(new DicomTag(0x8, 0x5), "ISO_IR 100");
|
||||||
|
|
||||||
// add the dicom tags with empty values that should be included in the result of the QR Server
|
// add the dicom tags with empty values that should be included in the result of the QR Server
|
||||||
|
|
||||||
|
////病例号
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.PatientID, "");
|
||||||
|
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.PatientName, "");
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.PatientSex, "");
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.PatientBirthDate, "");
|
||||||
|
////检查号 设备类型
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.StudyID, "");
|
||||||
|
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.ModalitiesInStudy, "");
|
||||||
|
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.StudyDate, "");
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.StudyTime, "");
|
||||||
|
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.BodyPartExamined, "");
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.StudyDescription, "");
|
||||||
|
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.StudyInstanceUID, "");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// add the dicom tags that contain the filter criterias
|
||||||
|
|
||||||
|
//request.Dataset.AddOrUpdate(DicomTag.PatientID, "Test*");
|
||||||
|
|
||||||
//病例号
|
//病例号
|
||||||
request.Dataset.AddOrUpdate(DicomTag.PatientID, inQuery.PatientID.IsNullOrEmpty() ? "" : inQuery.PatientID);
|
request.Dataset.AddOrUpdate(DicomTag.PatientID, inQuery.PatientID.IsNullOrEmpty() ? "" : inQuery.PatientID);
|
||||||
|
|
||||||
|
@ -2857,9 +2884,6 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
request.Dataset.AddOrUpdate(DicomTag.StudyInstanceUID, inQuery.StudyInstanceUID.IsNullOrEmpty() ? "" : inQuery.StudyInstanceUID);
|
request.Dataset.AddOrUpdate(DicomTag.StudyInstanceUID, inQuery.StudyInstanceUID.IsNullOrEmpty() ? "" : inQuery.StudyInstanceUID);
|
||||||
|
|
||||||
// add the dicom tags that contain the filter criterias
|
|
||||||
|
|
||||||
|
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2910,20 +2934,30 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
//DebugStudyResponse(response, _logger);
|
//DebugStudyResponse(response, _logger);
|
||||||
|
|
||||||
|
if (response.HasDataset)
|
||||||
|
{
|
||||||
|
//var time= response.Dataset?.GetSingleValueOrDefault<string?>(DicomTag.StudyTime, "")
|
||||||
|
|
||||||
|
var studyTime = response.Dataset.GetDateTime(DicomTag.StudyDate, DicomTag.StudyTime);
|
||||||
|
|
||||||
|
DateOnly datePart = DateOnly.FromDateTime(studyTime);
|
||||||
|
TimeOnly timePart = TimeOnly.FromDateTime(studyTime);
|
||||||
|
|
||||||
result.Add(new SCUStudyView()
|
result.Add(new SCUStudyView()
|
||||||
{
|
{
|
||||||
PatientID = response.Dataset?.GetSingleValue<string>(DicomTag.PatientID),
|
PatientID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientID, ""),
|
||||||
PatientName = response.Dataset?.GetSingleValue<string>(DicomTag.PatientName),
|
PatientName = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientName, ""),
|
||||||
PatientSex = response.Dataset?.GetSingleValue<string>(DicomTag.PatientSex),
|
PatientSex = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientSex, ""),
|
||||||
PatientBirthDate = response.Dataset?.GetSingleValue<string>(DicomTag.PatientBirthDate),
|
PatientBirthDate = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.PatientBirthDate, ""),
|
||||||
StudyID = response.Dataset?.GetSingleValue<string>(DicomTag.StudyID),
|
StudyID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyID, ""),
|
||||||
ModalitiesInStudy = response.Dataset?.GetSingleValue<string>(DicomTag.ModalitiesInStudy),
|
ModalitiesInStudy = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.ModalitiesInStudy, ""),
|
||||||
StudyDate = response.Dataset?.GetSingleValue<string>(DicomTag.StudyDate),
|
StudyDate = datePart.ToString(),
|
||||||
StudyTime = response.Dataset?.GetSingleValue<string>(DicomTag.StudyTime),
|
StudyTime = timePart.ToString("HH:mm:ss"),
|
||||||
BodyPartExamined = response.Dataset?.GetSingleValue<string>(DicomTag.BodyPartExamined),
|
BodyPartExamined = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.BodyPartExamined, ""),
|
||||||
StudyDescription = response.Dataset?.GetSingleValue<string>(DicomTag.StudyDescription),
|
StudyDescription = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyDescription, ""),
|
||||||
StudyInstanceUID = response.Dataset?.GetSingleValue<string>(DicomTag.StudyInstanceUID)
|
StudyInstanceUID = response.Dataset?.GetSingleValueOrDefault<string>(DicomTag.StudyInstanceUID, "")
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
await client.AddRequestAsync(request);
|
await client.AddRequestAsync(request);
|
||||||
|
|
Loading…
Reference in New Issue