DicomObjects.NET10 Documentation
DicomObjects.DicomWeb Namespace / WorkItemWebClient Class / UpdateAsync Method
The payload dataset contained in request, with the changes to the target Workitem to update.
The Transaction UID used to lock the target Workitem
The encoding to use (native/json/xml)
The transfer syntax used to encode and send the WorkItem
A token that may be used to cancel the operation
Example



In This Topic
    UpdateAsync Method (WorkItemWebClient)
    In This Topic
    Asynchronous transaction that modifies Attributes of an existing Workitem. It corresponds to the UPS DIMSE N-SET operation.
    Syntax
    'Declaration
     
    
    <AsyncStateMachineAttribute(DicomObjects.DicomWeb.WorkItemWebClient/d__30)> 
    Public Function UpdateAsync( _ 
       ByVal WorkItem As DicomDataSet, _ 
       ByVal TransactionUID As String, _ 
       Optional ByVal Encoding As DicomDataEncoding, _ 
       Optional ByVal TransferSyntax As String, _ 
       Optional ByVal cancellationToken As CancellationToken _ 
    ) As Task(Of HttpResponseMessage)
    'Usage
     
    
    Dim instance As WorkItemWebClient
    Dim WorkItem As DicomDataSet
    Dim TransactionUID As String
    Dim Encoding As DicomDataEncoding
    Dim TransferSyntax As String
    Dim cancellationToken As CancellationToken
    Dim value As Task(Of HttpResponseMessage)
     
    value = instance.UpdateAsync(WorkItem, TransactionUID, Encoding, TransferSyntax, cancellationToken)

    Parameters

    WorkItem
    The payload dataset contained in request, with the changes to the target Workitem to update.
    TransactionUID
    The Transaction UID used to lock the target Workitem
    Encoding
    The encoding to use (native/json/xml)
    TransferSyntax
    The transfer syntax used to encode and send the WorkItem
    cancellationToken
    A token that may be used to cancel the operation

    Return Value

    HttpResponseMessage
    Remarks
    If TransferSyntax is null, then the instances are sent using the transfer syntax in which they are currently held The async operation will return as soon as the response is available and headers are read (content is not read yet)
    Example
    WorkItemWebClient wwc = new WorkItemWebClient(BaseUri);
    DicomDataSet updates = new DicomDataSet();
    updates.Add(Keyword.PatientName, "newPN");
    updates.Add(Keyword.PatientID, "newPID");
    DicomDataSetCollection sq = new DicomDataSetCollection();
    DicomDataSet sqItem = new DicomDataSet();
    sqItem.Add(Keyword.CodeValue, "codeValue");
    sqItem.Add(Keyword.CodingSchemeDesignator, "DCM");
    sqItem.Add(Keyword.CodeMeaning, "codeMeaning");
    sq.Add(sqItem);
    updates.Add(Keyword.ScheduledStationNameCodeSequence, sq);
    var resp = wwc.Update(updates, "1.2.3.4.5.6.7.8.9", DicomDataEncoding.Json);
    Log($"Update State response: {resp.StatusCode}");
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also