Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop 'batch' from healthcare samples #21835

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/textanalytics/Azure.AI.TextAnalytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ catch (RequestFailedException exception)
### Recognize Healthcare Entities Asynchronously
Text Analytics for health is a containerized service that extracts and labels relevant medical information from unstructured texts such as doctor's notes, discharge summaries, clinical documents, and electronic health records. For more information see [How to: Use Text Analytics for health][healthcare].

```C# Snippet:Sample7_AnalyzeHealthcareEntitiesBatchConvenience
```C# Snippet:Sample7_AnalyzeHealthcareEntitiesConvenience
// get input documents
string document1 = @"RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | CORONARY ARTERY DISEASE | Signed | DIS | \
Admission Date: 5/22/2001 Report Status: Signed Discharge Date: 4/24/2001 ADMISSION DIAGNOSIS: CORONARY ARTERY DISEASE. \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ To see the full example source files, see:

* [Automatic Polling AnalyzeOperation ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperationAsync.cs)
* [Manual Polling AnalyzeOperation ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample_AnalyzeOperation.cs)
* [Automatic Polling HealthcareOperation ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesBatchConvenienceAsync_AutomaticPolling.cs)
* [Manual Polling HealthcareOperation ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesBatchConvenience_ManualPolling.cs)
* [Automatic Polling HealthcareOperation ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesConvenienceAsync_AutomaticPolling.cs)
* [Manual Polling HealthcareOperation ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesConvenience_ManualPolling.cs)

[DefaultAzureCredential]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/identity/Azure.Identity/README.md
[README]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var client = new TextAnalyticsClient(new Uri(endpoint), new AzureKeyCredential(a

To recognize healthcare entities in multiple documents, call `StartAnalyzeHealthcareEntities` on an `IEnumerable` of strings. The result is a Long Running operation of type `AnalyzeHealthcareEntitiesOperation` which polls for the results from the API.

```C# Snippet:TextAnalyticsSampleHealthcareBatchConvenienceAnalyzeDocumentsAsync
```C# Snippet:TextAnalyticsSampleHealthcareConvenienceAnalyzeDocumentsAsync
// get input documents
string document1 = @"RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | CORONARY ARTERY DISEASE | Signed | DIS | \
Admission Date: 5/22/2001 Report Status: Signed Discharge Date: 4/24/2001 ADMISSION DIAGNOSIS: CORONARY ARTERY DISEASE. \
Expand Down Expand Up @@ -56,7 +56,7 @@ Console.WriteLine($"Status : {healthOperation.Status}");
Console.WriteLine($"Last Modified: {healthOperation.LastModified}");
```
To view the final results of the long-running operation:
```C# Snippet:TextAnalyticsSampleHealthcareBatchConvenienceAsyncViewResults
```C# Snippet:TextAnalyticsSampleHealthcareConvenienceAsyncViewResults
// view operation results
await foreach (AnalyzeHealthcareEntitiesResultCollection documentsInPage in healthOperation.Value)
{
Expand Down Expand Up @@ -142,12 +142,12 @@ await foreach (AnalyzeHealthcareEntitiesResultCollection documentsInPage in heal

To see the full example source files, see:

* [Synchronous AnalyzeHealthcareEntities](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesBatch.cs)
* [Asynchronous AnalyzeHealthcareEntities](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesBatchAsync.cs)
* [Automatic Polling AnalyzeHealthcareEntities ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesBatchAsync_AutomaticPolling.cs)
* [Manual Polling AnalyzeHealthcareEntities ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesBatch_ManualPolling.cs)
* [Automatic Polling AnalyzeHealthcareEntities Convenience](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesBatchConvenienceAsync_AutomaticPolling.cs)
* [Manual Polling AnalyzeHealthcareEntities Convenience ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesBatchConvenience_ManualPolling.cs)
* [Synchronous AnalyzeHealthcareEntities](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntities.cs)
* [Asynchronous AnalyzeHealthcareEntities](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesAsync.cs)
* [Automatic Polling AnalyzeHealthcareEntities ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesAsync_AutomaticPolling.cs)
* [Manual Polling AnalyzeHealthcareEntities ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntities_ManualPolling.cs)
* [Automatic Polling AnalyzeHealthcareEntities Convenience](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesConvenienceAsync_AutomaticPolling.cs)
* [Manual Polling AnalyzeHealthcareEntities Convenience ](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesConvenience_ManualPolling.cs)
* [Synchronous AnalyzeHealthcareEntities Cancellation](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntities_Cancellation.cs)
* [Asynchronous AnalyzeHealthcareEntitiesAsync Cancellation](https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/textanalytics/Azure.AI.TextAnalytics/tests/samples/Sample7_AnalyzeHealthcareEntitiesAsync_Cancellation.cs)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ namespace Azure.AI.TextAnalytics.Samples
public partial class TextAnalyticsSamples: SamplesBase<TextAnalyticsTestEnvironment>
{
[Test]
public async Task Sample7_AnalyzeHealthcareEntitiesBatch()
public async Task Sample7_AnalyzeHealthcareEntities()
{
// create a text analytics client
string endpoint = TestEnvironment.Endpoint;
string apiKey = TestEnvironment.ApiKey;
var client = new TextAnalyticsClient(new Uri(endpoint), new AzureKeyCredential(apiKey));

#region Snippet:TextAnalyticsSampleHealthcareBatch
#region Snippet:TextAnalyticsSampleHealthcare
// get input documents
string document1 = @"RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | CORONARY ARTERY DISEASE | Signed | DIS | \
Admission Date: 5/22/2001 Report Status: Signed Discharge Date: 4/24/2001 ADMISSION DIAGNOSIS: CORONARY ARTERY DISEASE. \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ namespace Azure.AI.TextAnalytics.Samples
public partial class TextAnalyticsSamples: SamplesBase<TextAnalyticsTestEnvironment>
{
[Test]
public async Task Sample7_AnalyzeHealthcareEntitiesBatchAsync()
public async Task Sample7_AnalyzeHealthcareEntitiesAsync()
{
// create a text analytics client
string endpoint = TestEnvironment.Endpoint;
string apiKey = TestEnvironment.ApiKey;
var client = new TextAnalyticsClient(new Uri(endpoint), new AzureKeyCredential(apiKey));

#region Snippet:TextAnalyticsSampleHealthcareBatchAsync
#region Snippet:TextAnalyticsSampleHealthcareAsync
// get input documents
string document1 = @"RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | CORONARY ARTERY DISEASE | Signed | DIS |
Admission Date: 5/22/2001 Report Status: Signed Discharge Date: 4/24/2001 ADMISSION DIAGNOSIS: CORONARY ARTERY DISEASE.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Azure.AI.TextAnalytics.Samples
public partial class TextAnalyticsSamples: SamplesBase<TextAnalyticsTestEnvironment>
{
[Test]
public async Task Sample7_AnalyzeHealthcareEntitiesBatchAsync_AutomaticPolling()
public async Task Sample7_AnalyzeHealthcareEntitiesAsync_AutomaticPolling()
{
// create a text analytics client
string endpoint = TestEnvironment.Endpoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ namespace Azure.AI.TextAnalytics.Samples
public partial class TextAnalyticsSamples: SamplesBase<TextAnalyticsTestEnvironment>
{
[Test]
public async Task Sample7_AnalyzeHealthcareEntitiesBatchConvenience()
public async Task Sample7_AnalyzeHealthcareEntitiesConvenience()
{
// create a text analytics client
string endpoint = TestEnvironment.Endpoint;
string apiKey = TestEnvironment.ApiKey;
var client = new TextAnalyticsClient(new Uri(endpoint), new AzureKeyCredential(apiKey));

#region Snippet:Sample7_AnalyzeHealthcareEntitiesBatchConvenience
#region Snippet:Sample7_AnalyzeHealthcareEntitiesConvenience
// get input documents
string document1 = @"RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | CORONARY ARTERY DISEASE | Signed | DIS | \
Admission Date: 5/22/2001 Report Status: Signed Discharge Date: 4/24/2001 ADMISSION DIAGNOSIS: CORONARY ARTERY DISEASE. \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ namespace Azure.AI.TextAnalytics.Samples
public partial class TextAnalyticsSamples: SamplesBase<TextAnalyticsTestEnvironment>
{
[Test]
public async Task Sample7_AnalyzeHealthcareEntitiesBatchConvenienceAsync()
public async Task Sample7_AnalyzeHealthcareEntitiesConvenienceAsync()
{
// create a text analytics client
string endpoint = TestEnvironment.Endpoint;
string apiKey = TestEnvironment.ApiKey;
var client = new TextAnalyticsClient(new Uri(endpoint), new AzureKeyCredential(apiKey));

#region Snippet:TextAnalyticsSampleHealthcareBatchConvenienceAnalyzeDocumentsAsync
#region Snippet:TextAnalyticsSampleHealthcareConvenienceAnalyzeDocumentsAsync
// get input documents
string document1 = @"RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | CORONARY ARTERY DISEASE | Signed | DIS | \
Admission Date: 5/22/2001 Report Status: Signed Discharge Date: 4/24/2001 ADMISSION DIAGNOSIS: CORONARY ARTERY DISEASE. \
Expand Down Expand Up @@ -59,7 +59,7 @@ with a strong family history of coronary artery disease with a brother dying at
Console.WriteLine($"Last Modified: {healthOperation.LastModified}");
#endregion

#region Snippet:TextAnalyticsSampleHealthcareBatchConvenienceAsyncViewResults
#region Snippet:TextAnalyticsSampleHealthcareConvenienceAsyncViewResults
// view operation results
await foreach (AnalyzeHealthcareEntitiesResultCollection documentsInPage in healthOperation.Value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Azure.AI.TextAnalytics.Samples
public partial class TextAnalyticsSamples: SamplesBase<TextAnalyticsTestEnvironment>
{
[Test]
public async Task Sample7_AnalyzeHealthcareEntities_AutomaticPolling()
public async Task Sample7_AnalyzeHealthcareEntitiesConvenienceAsync_AutomaticPolling()
{
// create a text analytics client
string endpoint = TestEnvironment.Endpoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace Azure.AI.TextAnalytics.Samples
public partial class TextAnalyticsSamples: SamplesBase<TextAnalyticsTestEnvironment>
{
[Test]
public async Task Sample7_AnalyzeHealthcareEntities_ManualPolling()
public async Task Sample7_AnalyzeHealthcareEntitiesConvenience_ManualPolling()
{
// create a text analytics client
string endpoint = TestEnvironment.Endpoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ namespace Azure.AI.TextAnalytics.Samples
public partial class TextAnalyticsSamples: SamplesBase<TextAnalyticsTestEnvironment>
{
[Test]
public async Task Sample7_AnalyzeHealthcareEntitiesBatch_ManualPolling()
public async Task Sample7_AnalyzeHealthcareEntities_ManualPolling()
{
// create a text analytics client
string endpoint = TestEnvironment.Endpoint;
string apiKey = TestEnvironment.ApiKey;
var client = new TextAnalyticsClient(new Uri(endpoint), new AzureKeyCredential(apiKey));

#region Snippet:Sample7_AnalyzeHealthcareEntitiesBatch_ManualPolling
#region Snippet:Sample7_AnalyzeHealthcareEntities_ManualPolling
// get input documents
string document1 = @"RECORD #333582770390100 | MH | 85986313 | | 054351 | 2/14/2001 12:00:00 AM | CORONARY ARTERY DISEASE | Signed | DIS | \
Admission Date: 5/22/2001 Report Status: Signed Discharge Date: 4/24/2001 ADMISSION DIAGNOSIS: CORONARY ARTERY DISEASE. \
Expand Down