同胞橡树dicom C-Find回复

时间:2015-03-13 08:45:33

标签: c# .net dicom fo-dicom

我有一个关于同伴橡木dicom的c-find操作的问题。我已经开发了一种服务,它实现了c-find操作,并且应该将找到的患者送回超声机器。我目前正在测试GE的4d视图“模拟器”。

我已经实现了我在此论坛上发现的代码并接收了请求。我发回一个数据集,但每次我在超声波机器上都会收到没有找到物品的消息。 →

愿你们中的任何人能帮助我吗?

提前致谢

安德烈亚斯

    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 个答案:

答案 0 :(得分:2)

您在C-FIND响应中缺少许多必需的返回键属性。请查看PS 3.4 of the DICOM standard中的“表K.6-1 - 模态工作列表信息模型的属性”。 如果“返回键类型”列中的值为“1”,则必须在C-Find响应中包含具有有效值的属性。例如,预定站AE标题(0040,0001),预定过程步骤开始日期(0040,0002),预定过程步骤开始时间(0040,0003),模态(0008,0060)等是预定下的类型1返回键程序步骤顺序(0040,0100)。

如果“返回键类型”列的值为“2”,则必须在C-Find响应中包含该属性,但它可以为空(如果不知道)。此类属性的示例是计划执行医生姓名,计划工作站名称和计划过程步骤位置等。

当满足条件时,值“1C”类似于类型“1”。这样的示例是预定过程步骤描述和预定协议代码序列。而且,“2C”是有条件的类型“2”。类型“3”是可选的,如果属性不在请求数据集中,则不需要在响应中包含它们。