DicomObjects.NET.8.48 Documentation
DicomObjects.DicomWeb.WebClient Namespace / WorkItemWebClient Class / ChangeState Method
New State for the Workitem, cannot set to SCHEDULED
The Transaction UID used to lock the target Workitem
The encoding to use (native/json/xml)
Example






In This Topic
    ChangeState Method
    In This Topic
    Transaction to change the state of a Workitem. It corresponds to the UPS DIMSE N-ACTION operation "Change UPS State". State changes are used to claim ownership, complete, or cancel a Workitem.
    Syntax
    'Declaration
     
    
    Public Function ChangeState( _
       ByVal State As UPSState, _
       ByVal TransactionUID As System.String, _
       Optional ByVal Encoding As DicomDataEncoding _
    ) As System.Net.Http.HttpResponseMessage
    'Usage
     
    
    Dim instance As WorkItemWebClient
    Dim State As UPSState
    Dim TransactionUID As System.String
    Dim Encoding As DicomDataEncoding
    Dim value As System.Net.Http.HttpResponseMessage
     
    value = instance.ChangeState(State, TransactionUID, Encoding)
    public System.Net.Http.HttpResponseMessage ChangeState( 
       UPSState State,
       System.string TransactionUID,
       DicomDataEncoding Encoding
    )
    public function ChangeState( 
        State: UPSState;
        TransactionUID: System.String;
        Encoding: DicomDataEncoding
    ): System.Net.Http.HttpResponseMessage; 
    public function ChangeState( 
       State : UPSState,
       TransactionUID : System.String,
       Encoding : DicomDataEncoding
    ) : System.Net.Http.HttpResponseMessage;
    public: System.Net.Http.HttpResponseMessage* ChangeState( 
       UPSState State,
       System.string* TransactionUID,
       DicomDataEncoding Encoding
    ) 
    public:
    System.Net.Http.HttpResponseMessage^ ChangeState( 
       UPSState State,
       System.String^ TransactionUID,
       DicomDataEncoding Encoding
    ) 

    Parameters

    State
    New State for the Workitem, cannot set to SCHEDULED
    TransactionUID
    The Transaction UID used to lock the target Workitem
    Encoding
    The encoding to use (native/json/xml)

    Return Value

    HttpResponseMessage
    Example
    WorkItemWebClient wwc = new WorkItemWebClient(BaseUri);
    var resp = wwc.ChangeState(UPSState.INPROGRESS, "1.2.3.4.5.6.7.8.9");
    Log($"Change State response: {resp.StatusCode}");
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also