pacs server 使用c-find 其他的c-echo
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
011a75714e
commit
7b456c9008
|
@ -106,13 +106,15 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
client.NegotiateAsyncOps();
|
||||
|
||||
if (find.PacsTypeEnum == PacsType.PacsServer)
|
||||
{
|
||||
client.ServiceOptions.RequestTimeout = TimeSpan.FromSeconds(5);
|
||||
|
||||
var request = new DicomCFindRequest(DicomQueryRetrieveLevel.Study)
|
||||
{
|
||||
OnResponseReceived = (req, response) =>
|
||||
{
|
||||
//Console.WriteLine($"C-Find Response: {response.Status}");
|
||||
Console.WriteLine($"C-Find Response: {response.Status}");
|
||||
|
||||
if (response.Status == DicomStatus.Success)
|
||||
{
|
||||
|
@ -129,6 +131,31 @@ namespace IRaCIS.Core.Application.Service
|
|||
request.Dataset.Add(DicomTag.PatientID, "TEST123");
|
||||
|
||||
await client.AddRequestAsync(request);
|
||||
}
|
||||
else
|
||||
{
|
||||
client.ServiceOptions.RequestTimeout = TimeSpan.FromSeconds(3);
|
||||
|
||||
var request = new DicomCEchoRequest
|
||||
{
|
||||
OnResponseReceived = (req, response) =>
|
||||
{
|
||||
Console.WriteLine($"C-ECHO Response: {response.Status}");
|
||||
|
||||
if (response.Status == DicomStatus.Success)
|
||||
{
|
||||
find.IsTestOK = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
find.IsTestOK = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
await client.AddRequestAsync(request);
|
||||
}
|
||||
|
||||
|
||||
|
||||
await client.SendAsync();
|
||||
|
|
Loading…
Reference in New Issue