Skip to content
English
  • There are no suggestions because the search field is empty.

Removing a document from the Distribution Queue

At Waikato they have a report that shows them distributions that have failed due to either an EDI not existing for a GP (so Healthlink distribution fails) or an email address that is outside the DHB (so email distribution fails, as it checks for @WaikatoDHB.govt.nz). They can fix it up and re-try distribution themselves, or they can print the document and request it is removed from the distribution queue. Edit Find the Problem Document If they want it removed from the distribution queue, first you'll need to discover which distribution item it is. You can plug the Document ID into this script to do it: SELECT a.DocumentID, dt.Name, dq.* FROM [WinScribeText_Prod].[dbo].[DistributionQueueItem] dq inner join Activity A on a.Id = dq.ActivityId inner join DistributionType dt on dt.DistributionTypeId = dq.DistributionTypeId where a.DocumentID = 364112 When you run it, you'll see all of the distribution queue items for that document. You are looking for any with a status of 3. Here are the statuses you might see: Status Meaning 0 Not yet started 1 In Progress 2 Completed Successfully 3 Failed Mostly they'll be worried about distribution on completed documents, which will have a DistributionEvent of 100. However, if you notice any records with a status or 3 that have a DistributionEvent less than 100, fix those as well. Any less than 100's will all be of the 'FileDrop' type - this is used by the Rolling Patient History feature to keep the RPH up to date. a lot of document types don't have an RPH, and even if they do as long as the final FileDrop distribution goes through correctly then the RPH will be as up to date as it is going to get. These are the DistributionEvents you might see: DistributionEvent Meaning 0 Finished Authoring 1 Finished Typing 2 Finished Signing 3 Finished Distribution Approval 100 Document Complete Edit Fix the Problem Document Once you've identified the record that you need to fix, grab the ID (the DistributionQueueItem ID) and plug it into this script. The script will mark the distribution as complete, and remove it from the report of problem documents. Update DistributionQueueItem Set [Status] = 2, CompletionDate = GETUTCDATE(), FailureReason = FailureReason + 'Completed Manually' where ID = 1697381