0xFF00 (Pending) ModalityWorklistInformationFind

106 views
Skip to first unread message

Natnicha Faksang

unread,
Oct 18, 2023, 12:30:44 AM10/18/23
to dcm4che
My docker compose contain:
- LDAP dcm4che/slapd-dcm4chee:2.6.3-30.0
PostgestDB dcm4che/postgres-dcm4chee:15.2-30
arc dcm4che/dcm4chee-arc-psql:5.30.0

I want to find MWL that status is SCHEDULED like this:
```
from pydicom.dataset import Dataset
from pynetdicom import AE, debug_logger
from pynetdicom.sop_class import ModalityWorklistInformationFind
import constants

debug_logger()

remote_host = constants.REMOTE_HOST
remote_port = constants.REMOTE_DCM_PORT
remote_ae_title = 'WORKLIST'

ae = AE()
ae.add_requested_context(ModalityWorklistInformationFind)
assoc = ae.associate(remote_host, remote_port, ae_title=remote_ae_title)

ds = Dataset()
ds.PatientName = '*'
ds.ScheduledProcedureStepSequence = [Dataset()]
item = ds.ScheduledProcedureStepSequence[0]
item.ScheduledStationAETitle = '*' 
item.ScheduledProcedureStepStatus = "SCHEDULED"

if assoc.is_established:
    responses = assoc.send_c_find(ds, ModalityWorklistInformationFind)

    for (status, identifier) in responses:
        if status:
            print('C-FIND query status: 0x{0:04x}'.format(status.Status))

            if status.Status == 0x0000:
                print('MWL entry found:')
                print(identifier)
        else:
            print('Connection timed out, was aborted or received invalid response')

    assoc.release()
else:
    print('Association rejected, aborted or never connected')
```

then I got response that contain Find SCP Response: 0xFF00 (Pending) with MWL entry 
but the last response is Find SCP Result: 0x0000 (Success) without MWL entry 

Question is how to find MWL entry on my condition
```
I: Requesting Association
D: Request Parameters:
D: ======================= OUTGOING A-ASSOCIATE-RQ PDU ========================
D: Our Implementation Class UID:      1.2.826.0.1.3680043.9.3811.2.0.2
D: Our Implementation Version Name:   PYNETDICOM_202
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    PYNETDICOM
D: Called Application Name:     WORKLIST
D: Our Max PDU Receive Size:    16382
D: Presentation Context:
D:   Context ID:        1 (Proposed)
D:     Abstract Syntax: =Modality Worklist Information Model - FIND
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntaxes:
D:       =Implicit VR Little Endian
D:       =Explicit VR Little Endian
D:       =Deflated Explicit VR Little Endian
D:       =Explicit VR Big Endian
D: Requested Extended Negotiation: None
D: Requested Common Extended Negotiation: None
D: Requested Asynchronous Operations Window Negotiation: None
D: Requested User Identity Negotiation: None
D: ========================== END A-ASSOCIATE-RQ PDU ==========================
D: Accept Parameters:
D: ======================= INCOMING A-ASSOCIATE-AC PDU ========================
D: Their Implementation Class UID:    1.2.40.0.13.1.3
D: Their Implementation Version Name: dcm4che-5.31.1
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    PYNETDICOM
D: Called Application Name:     WORKLIST
D: Their Max PDU Receive Size:  16378
D: Presentation Contexts:
D:   Context ID:        1 (Accepted)
D:     Abstract Syntax: =Modality Worklist Information Model - FIND
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =Implicit VR Little Endian
D: Accepted Extended Negotiation: None
D: Accepted Asynchronous Operations Window Negotiation: None
D: User Identity Negotiation Response: None
D: ========================== END A-ASSOCIATE-AC PDU ==========================
I: Association Accepted
I: Sending Find Request: MsgID 1
I:
I: # Request Identifier
I: (0010,0010) PN [*]                                      # 1 PatientName
I: (0040,0100) SQ (Sequence with 1 item)                   # 1 ScheduledProcedureStepSequence
I:   (Sequence item #1)
I:     (0040,0001) AE (no value available)                     # 0 ScheduledStationAETitle
I:     (0040,0020) CS [SCHEDULED]                              # 1 ScheduledProcedureStepStatus
I:
D: ========================== OUTGOING DIMSE MESSAGE ==========================
D: Message Type                  : C-FIND RQ
D: Presentation Context ID       : 1
D: Message ID                    : 1
D: Affected SOP Class UID        : Modality Worklist Information Model - FIND
D: Identifier                    : Present
D: Priority                      : Low
D: ============================ END DIMSE MESSAGE =============================
D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
D:
I: Find SCP Response: 1 - 0xFF00 (Pending)
D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
I:
I: # Response Identifier
I: (0008,0005) CS [ISO_IR 100]                             # 1 SpecificCharacterSet
I: (0010,0010) PN [APPLESEED^JOHN^A^MR.]                   # 1 PatientName
I: (0040,0100) SQ (Sequence with 1 item)                   # 1 ScheduledProcedureStepSequence
I:   (Sequence item #1)
I:     (0040,0001) AE [SCHEDULEDSTATION]                       # 1 ScheduledStationAETitle
I:     (0040,0020) CS [SCHEDULED]                              # 1 ScheduledProcedureStepStatus
I:
C-FIND query status: 0xff00
D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
D:
I: Find SCP Response: 2 - 0xFF00 (Pending)
D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
I:
I: # Response Identifier
I: (0008,0005) CS [ISO_IR 100]                             # 1 SpecificCharacterSet
I: (0010,0010) PN [APPLESEED^JOHN^A^MR.]                   # 1 PatientName
I: (0040,0100) SQ (Sequence with 1 item)                   # 1 ScheduledProcedureStepSequence
I:   (Sequence item #1)
I:     (0040,0001) AE [AI]                                     # 1 ScheduledStationAETitle
I:     (0040,0020) CS [SCHEDULED]                              # 1 ScheduledProcedureStepStatus
I:
C-FIND query status: 0xff00
D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
D: ========================== INCOMING DIMSE MESSAGE ==========================
D: Message Type                  : C-FIND RSP
D: Message ID Being Responded To : 1
D: Affected SOP Class UID        : Modality Worklist Information Model - FIND
D: Identifier                    : None
D: Status                        : 0x0000
D: ============================ END DIMSE MESSAGE =============================
D:
I: Find SCP Result: 0x0000 (Success)
C-FIND query status: 0x0000
MWL entry found:
None
I: Releasing Association
```

Juan Pablo Bizantino

unread,
Oct 18, 2023, 9:21:41 AM10/18/23
to dcm...@googlegroups.com
Hi,

This is not the solution to your question but can help you. 

You can call the REST API  with your parameters and parse the JSON result.

Documentation

GET  /aets/{aet}/rs/mwlitems
<YOUR URL>/dcm4chee-arc/aets/<PACS AET>/rs/mwlitems?includefield=all&ScheduledProcedureStepSequence.ScheduledProcedureStepStatus=SCHEDULED




--
You received this message because you are subscribed to the Google Groups "dcm4che" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dcm4che+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dcm4che/631031ac-340f-4d6b-93e0-b111559847c1n%40googlegroups.com.

Natnicha Faksang

unread,
Oct 18, 2023, 11:14:45 AM10/18/23
to dcm4che
Thank you for your reply.

I try to use the REST API but I get error Failed to fetch

Screenshot 2566-10-18 at 22.11.20.pngScreenshot 2566-10-18 at 21.57.38.png

Questions:
1. The url call the http://dcm4chee-arc:8080/dcm4chee-arc server by default. How to change it to my server?
2. I want to implement in python, where to find source code of the REST API?

Do you have any suggestions for improvement? 

ในวันที่ วันพุธที่ 18 ตุลาคม ค.ศ. 2023 เวลา 20 นาฬิกา 21 นาที 41 วินาที UTC+7 jpbiz...@gmail.com เขียนว่า:

kirill zemskoff

unread,
Oct 18, 2023, 11:28:28 AM10/18/23
to dcm4che
This URL is given for an example. Use Postman and your own URL.

среда, 18 октября 2023 г. в 18:14:45 UTC+3, omsin.n...@gmail.com:
Message has been deleted

Natnicha Faksang

unread,
Oct 19, 2023, 12:26:09 PM10/19/23
to dcm4che
Thank you so much.

ในวันที่ วันพุธที่ 18 ตุลาคม ค.ศ. 2023 เวลา 22 นาฬิกา 28 นาที 28 วินาที UTC+7 kirill....@gmail.com เขียนว่า:
Reply all
Reply to author
Forward
0 new messages