1
votes

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

    Public Function OnCFindRequest(request As Global.Dicom.Network.DicomCFindRequest) As IEnumerable(Of Global.Dicom.Network.DicomCFindResponse) Implements Global.Dicom.Network.IDicomCFindProvider.OnCFindRequest
        Logging.Trace(CurrentLogger, "C-Find request")
        Dim familyname As String = ""
        Dim patientId As Integer?

        If request.Dataset.Contains(PatientNumberTag) Then
            Dim dicomLongStringItem As DicomLongString = request.Dataset.Get(Of DicomLongString)(PatientNumberTag)
            If IsNumeric(dicomLongStringItem.Value) Then patientId = dicomLongStringItem.Value
        End If
        If request.Dataset.Contains(PatientNameTag) Then
            Dim dicomPersonNameItem As DicomPersonName = request.Dataset.Get(Of DicomPersonName)(PatientNameTag)
            If Not String.IsNullOrEmpty(dicomPersonNameItem.Last) AndAlso dicomPersonNameItem.Last <> "*" Then familyname = dicomPersonNameItem.Last
        End If


        Dim responses As New List(Of DicomCFindResponse)()
        If request.Level = DicomQueryRetrieveLevel.Patient Then
            For Each result As DicomDataset In getworklistresults(request)
                Dim response As New DicomCFindResponse(request, DicomStatus.Pending)
                response.Dataset = result
                responses.Add(response)

            Next
        End If

        responses.Add(New DicomCFindResponse(request, DicomStatus.Success))

        Return responses
    End Function

    Private Function getworklistresults(request As Global.Dicom.Network.DicomCFindRequest) As List(Of DicomDataset)
        Dim dicomdatasets As New DicomDataset()

        dicomdatasets.Add(DicomTag.SpecificCharacterSet, "ISO_IR 100")
        dicomdatasets.Add(DicomTag.AccessionNumber, "")
        dicomdatasets.Add(DicomTag.ReferringPhysicianName, "")

        Dim sequenceDatase0 = New DicomDataset
        Dim sq0 As New DicomSequence(DicomTag.ReferencedStudySequence, sequenceDatase0)
        dicomdatasets.Add(DicomTag.ReferencedStudySequence, sq0)

        Dim sequenceDataset1 = New DicomDataset
        Dim sq1 As New DicomSequence(DicomTag.ReferencedPatientSequence, sequenceDataset1)
        dicomdatasets.Add(DicomTag.ReferencedPatientSequence, sq1)

        dicomdatasets.Add(New DicomPersonName(DicomTag.PatientName, DicomEncoding.GetEncoding("ISO 2022 IR 100"), "name^surname"))
        dicomdatasets.Add(DicomTag.PatientID, "12345")
        dicomdatasets.Add(DicomTag.IssuerOfPatientID, "")
        dicomdatasets.Add(DicomTag.PatientBirthDate, "")

        dicomdatasets.Add(DicomTag.PatientSex, "F")
        dicomdatasets.Add(DicomTag.PatientSize, "170")
        dicomdatasets.Add(DicomTag.PatientWeight, "170")
        dicomdatasets.Add(DicomTag.LastMenstrualDate, "")

        dicomdatasets.Add(DicomTag.StudyInstanceUID, "")
        dicomdatasets.Add(DicomTag.RequestingPhysician, "")
        dicomdatasets.Add(DicomTag.RequestedProcedureDescription, "")

        Dim sequenceDataset2 = New DicomDataset
        Dim sq2 As New DicomSequence(DicomTag.RequestedProcedureCodeSequence, sequenceDataset2)

        dicomdatasets.Add(DicomTag.RequestedProcedureCodeSequence, sq2)
        dicomdatasets.Add(DicomTag.AdmissionID, "")

        Dim sequenceDataset3 = New DicomDataset
        Dim sq3 As New DicomSequence(DicomTag.ScheduledProcedureStepSequence, sequenceDataset3)
        dicomdatasets.Add(DicomTag.ScheduledProcedureStepSequence, sq3)

        dicomdatasets.Add(DicomTag.RequestedProcedureID, "")
        dicomdatasets.Add(DicomTag.ReasonForTheRequestedProcedure, "")

        Dim a As New List(Of DicomDataset)
        a.Add(dicomdatasets)
        Return a
    End Function
1
You should check the Dicom Conformance Statement of the ultrasound machine, which Dicom Tags and values are expected from the system. Usually its necessary to supply at least the required fields to be a valid response. - JohnnyQ
Yes. You need to check DICOM Conformance Statement of the ultrasound machine as well as please go through the DICOM standard and see what are the required fields for C-Find response. Might be you are missing one of those. - Sandip Perane
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. i have updated the code in the original post - Andreas
A problem could be your RequestedProcedureCodeSequence and/or ScheduledProcedureStepSequence, because you only create a empty sequence container without any tags specified. Usually the ScheduledProcedureStepSequence contains several tags e.g. Modality, ScheduledProcedureStepStart and so on ... but this should be specified in the Dicom Conformance Statement. - JohnnyQ

1 Answers

2
votes

You are missing many of the required return key attributes in your C-FIND Response. Please, review the "Table K.6-1 - Attributes for the Modality Worklist Information Model" in PS 3.4 of the DICOM standard. If the value in the “Return Key Type” column is “1”, you must include the attribute with a valid value in your C-Find response. As for example, Scheduled Station AE Title (0040,0001), Scheduled Procedure Step Start Date (0040,0002), Scheduled Procedure Step Start Time (0040,0003), Modality (0008,0060) etc are type 1 return key under Scheduled Procedure Step Sequence (0040,0100).

If the value for “Return Key Type” column is “2”, you must include the attribute in C-Find response but it can be empty (if not know). Example of such attributes is Scheduled Performing Physician's Name, Scheduled Station Name, and Scheduled Procedure Step Location etc.

The value “1C” is like type “1” when condition is satisfied. Such example is Scheduled Procedure Step Description and Scheduled Protocol Code Sequence. Also, “2C” is type “2” conditional. Type “3” is optional and you do not need to include them in your response, if the attribute is not in the request dataset.