question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

i want to change workitem's status using n-action

See original GitHub issue

i have tried to change status for workitems in uwl using n-action.

but i got status code - 0x0123(No such action).

i am new to dicom and couldn’t find references about changing workitem’s status with pynetdicom.

please let me know what is the problem in below code.

or are there examples?

thank you in advance.

n-action document: http://dicom.nema.org/dicom/2013/output/chtml/part04/sect_CC.2.html

    from pydicom.dataset import Dataset
    from pynetdicom import AE
    from pynetdicom.sop_class import (
        UnifiedProcedureStepPushSOPClass
    )
    from pynetdicom.presentation import (
        UnifiedProcedurePresentationContexts
    )
    from pydicom.uid import generate_uid

    ae = AE(ae_title='calling_ae')
    assoc = ae.associate(
        ip,
        port,
        contexts=UnifiedProcedurePresentationContexts,
        ae_title='called_ae'
    )
    ds = Dataset()
    ds.TransactionUID = generate_uid()
    ds.ProcedureStepState = 'IN PROGRESS'
    (status, reply) = assoc.send_n_action(
        ds,
        1,
        UnifiedProcedureStepPushSOPClass,
        sop_instance_uid
    )

    assoc.release()

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
scaramallioncommented, Jun 29, 2020

OK, I think this is a pynetdicom issue. The DICOM Standard says:

An SCU uses N-ACTION to ask the SCP to change the state of a UPS Instance as shown in Figure CC.1.1-1. Since all UPSs are created as instances of the UPS Push SOP Class, the Requested SOP Class UID (0000,0003) in the N-ACTION request shall be the UID of the UPS Push SOP Class. See Section CC.3.1 for further details.

In essence, dcm4chee wants the requested presentation context to be UPS Pull and the N-ACTION-RQ’s Requested SOP Class UID to be UPS Push. pynetdicom doesn’t allow that with Association.send_n_action(), when I patch it then everything works as expected. dcm4chee doesn’t like having an association with all the UPS presentation contexts, either, it just wants one.

I’ll double check my reasoning and probably put out a patch release. If you need it working sooner rather than later then this branch should work with:

def set_in_progress(instance_uid):
    ae = AE()

    ae.add_requested_context(UnifiedProcedureStepPullSOPClass)

    ds = Dataset()
    ds.TransactionUID = generate_uid()
    ds.ProcedureStepState = 'IN PROGRESS'

    assoc = ae.associate('localhost', 11112, ae_title=b"DCM4CHEE")
    if assoc.is_established:
        (status, reply) = assoc.send_n_action(
            ds, 1,
            UnifiedProcedureStepPushSOPClass,
            instance_uid,
        )
        print(f"In-progress: 0x{status.Status:04X}")

        assoc.release()
0reactions
scaramallioncommented, Jul 4, 2020

Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Move work items and change the work item type in Azure Boards
Learn how to change the work item type or bulk move work items to another project in Azure Boards.
Read more >
Workflow work item, two agents, and status IN PROCESS
If you want to change the status, selct the workitem which has already status 'IN PROCESS', then rightclick on it, you will get...
Read more >
Configure Work Item Workflow - Siemens PLM
Field changes and workflow functions only take place when the Action is invoked manually by changing the Work Item's status. The Conditions and...
Read more >
Work items - IBM
The status and number of work items are indicators of the condition of your project. Work item types. The Scrum process is ready...
Read more >
Work Item States in Azure DevOps - Medium
For example if you want to change the Agile template to include a state called Approved under the Proposed category you can just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found