AsyncAnalyzeHealthcareEntitiesLROPoller Class

Inheritance
azure.core.polling._async_poller.AsyncLROPoller
AsyncAnalyzeHealthcareEntitiesLROPoller

Constructor

AsyncAnalyzeHealthcareEntitiesLROPoller(client: Any, initial_response: Any, deserialization_callback: Callable, polling_method: azure.core.polling._async_poller.AsyncPollingMethod[PollingReturnType])

Parameters

client
initial_response
deserialization_callback
polling_method

Methods

cancel

Cancel the operation currently being polled.

polling_method

Return the polling method associated to this poller.

cancel

Cancel the operation currently being polled.

async cancel(**kwargs) -> azure.core.polling._async_poller.AsyncLROPoller[None]

Parameters

polling_interval
int

The polling interval to use to poll the cancellation status. The default value is 5 seconds.

Returns

Returns an instance of an AsyncLROPoller that returns None.

Return type

Exceptions

When the operation has already reached a terminal state.

Examples

Cancel an existing health operation.


   from azure.core.credentials import AzureKeyCredential
   from azure.ai.textanalytics.aio import TextAnalyticsClient

   endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"]
   key = os.environ["AZURE_TEXT_ANALYTICS_KEY"]

   text_analytics_client = TextAnalyticsClient(
       endpoint=endpoint,
       credential=AzureKeyCredential(key),
   )

   documents = [
       "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. HISTORY OF PRESENT ILLNESS: \
       The patient is a 54-year-old gentleman with a history of progressive angina over the past several months. \
       The patient had a cardiac catheterization in July of this year revealing total occlusion of the RCA and \
       50% left main disease , with a strong family history of coronary artery disease with a brother dying at \
       the age of 52 from a myocardial infarction and another brother who is status post coronary artery bypass grafting. \
       The patient had a stress echocardiogram done on July , 2001 , which showed no wall motion abnormalities ,\
       but this was a difficult study due to body habitus. The patient went for six minutes with minimal ST depressions \
       in the anterior lateral leads , thought due to fatigue and wrist pain , his anginal equivalent. Due to the patient's \
       increased symptoms and family history and history left main disease with total occasional of his RCA was referred \
       for revascularization with open heart surgery."
   ]

   async with text_analytics_client:
       poller = await text_analytics_client.begin_analyze_healthcare_entities(documents)

       try:
           cancellation_poller = await poller.cancel()
           await cancellation_poller.wait()

       except HttpResponseError as e:
           # If the operation has already reached a terminal state it cannot be cancelled.
           print(e)

       else:
           print("Healthcare entities analysis was successfully cancelled.")


polling_method

Return the polling method associated to this poller.

polling_method() -> azure.ai.textanalytics.aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPollingMethod

Exceptions

When the operation has already reached a terminal state.

Attributes

created_on

When your healthcare entities job was created

Returns

When your healthcare entities job was created

Return type

expires_on

When your healthcare entities job will expire

Returns

When your healthcare entities job will expire

Return type

id

ID of your call to <xref:azure.ai.textanalytics.aio.begin_analyze_healthcare_entities>

Returns

ID of your call to <xref:azure.ai.textanalytics.aio.begin_analyze_healthcare_entities>

Return type

str

last_modified_on

When your healthcare entities job was last modified

Returns

When your healthcare entities job was last modified

Return type