Cant access WorklistItem values

0 votes
asked by about TomoCon PACS Worklist SDK
    public void DeleteFromWorklist(string accessionnumber)
    {
        var keyAttributes = _worklistManager.NewWorklistItem();
        keyAttributes.SetAccessionNumber(accessionnumber);

        var filteredWorklist = _worklistManager.Find(keyAttributes); //returns worklist with items that matched the attributes
        if(filteredWorklist == null)
            ShowError(new Exception("Record not found in PACS modality worklist"));

        if (filteredWorklist.Count > 0) 
        {
            WorklistItem item = filteredWorklist.item[0]; // we assume that items have unique accessionnumbers
            object itemInstanceUID = null;

            var ok = item.GetWorklistItemInstanceUID(ref itemInstanceUID); // returns error code "Object not found"
            var instanceUID = item.WorklistItemInstanceUID;

            _worklistManager.DeleteWorklistItem(itemInstanceUID.ToString());
            CheckForErrorCode();
        }
    }

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...