Training
Module
Consume an Azure Cosmos DB for NoSQL change feed using the SDK - Training
Process change feed events using the change feed processor in the Azure Cosmos DB for NoSQL .NET SDK.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The Change Feed capability enables you to go through the history of a DICOM® service and act on the create and delete events.
You access the Change Feed by using REST APIs. These APIs, along with sample usage of Change Feed, are documented in the DICOM Change Feed overview. The version of the REST API should be explicitly specified in the request URL as described in the API Versioning for DICOM service Documentation.
The following C# code example shows how to consume Change Feed using the DICOM client package.
const int limit = 10;
using HttpClient httpClient = new HttpClient { BaseAddress = new Uri("<URL>") };
using CancellationTokenSource tokenSource = new CancellationTokenSource();
int read;
List<ChangeFeedEntry> entries = new List<ChangeFeedEntry>();
DicomWebClient client = new DicomWebClient(httpClient);
do
{
read = 0;
DicomWebAsyncEnumerableResponse<ChangeFeedEntry> result = await client.GetChangeFeed(
$"?offset={entries.Count}&limit={limit}&includeMetadata={true}",
tokenSource.Token);
await foreach (ChangeFeedEntry entry in result)
{
read++;
entries.Add(entry);
}
} while (read > 0);
For information, see the DICOM service overview.
Note
DICOM® is the registered trademark of the National Electrical Manufacturers Association for its Standards publications relating to digital communications of medical information.
Training
Module
Consume an Azure Cosmos DB for NoSQL change feed using the SDK - Training
Process change feed events using the change feed processor in the Azure Cosmos DB for NoSQL .NET SDK.