Hello,
i have a question regarding the c-find Operation in the fellow oak dicom. I have developed a Service wich implements a c-find operation and should send the found patients back tot he ultrasound machine. I’m testing currently with the 4d view “emulator” from GE.
I’ve implemented the code like I found on this forum and its receiving the request. I send back a dataset but everytime I get on the ultrasound machine the message that no items could be found. L
May anyone of you can help me?
Thanks in advance
Andreas
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
namespace Server
{
[CLSCompliant(false)]
public class CFind : DicomServiceBase, IDicomCFindProvider
{
private static readonly DicomTag PatientNumberTag = new DicomTag(0x10, 0x20);
private static readonly DicomTag PatientNameTag = new DicomTag(0x10, 0x10);
public CFind() : base(null, null)
{
}
public CFind(System.IO.Stream stream, global::Dicom.Log.Logger log) : base(stream, log)
{
}
public IEnumerable<global::Dicom.Network.DicomCFindResponse> OnCFindRequest(global::Dicom.Network.DicomCFindRequest request)
{
Logging.Trace(CurrentLogger, "C-Find request");
string familyname = "";
int? patientId = default(int?);
if (request.Dataset.Contains(PatientNumberTag)) {
DicomLongString dicomLongStringItem = request.Dataset.Get<DicomLongString>(PatientNumberTag);
if (Information.IsNumeric(dicomLongStringItem.Value))
patientId = dicomLongStringItem.Value;
}
if (request.Dataset.Contains(PatientNameTag)) {
DicomPersonName dicomPersonNameItem = request.Dataset.Get<DicomPersonName>(PatientNameTag);
if (!string.IsNullOrEmpty(dicomPersonNameItem.Last) && dicomPersonNameItem.Last != "*")
familyname = dicomPersonNameItem.Last;
}
List<DicomCFindResponse> responses = new List<DicomCFindResponse>();
if (request.Level == DicomQueryRetrieveLevel.Patient) {
foreach (DicomDataset result in getworklistresults()) {
result.Add(DicomTag.QueryRetrieveLevel, request.Level);
result.Add(DicomTag.RetrieveAETitle, CalledAe);
DicomCFindResponse response = new DicomCFindResponse(request, DicomStatus.Success);
response.Dataset = result;
responses.Add(response);
}
}
responses.Add(new DicomCFindResponse(request, DicomStatus.Success));
return responses;
thanks for your response. i have looked into the request dataset and added all tags mentioned there. but it can't find patients in the 4d view app. Did you mean that? Heres my updated code: |