AnalyzeHealthcareEntitiesLROPoller Class
- Inheritance
-
azure.core.polling._poller.LROPollerAnalyzeHealthcareEntitiesLROPollerAnalyzeHealthcareEntitiesLROPoller
Constructor
AnalyzeHealthcareEntitiesLROPoller(client: Any, initial_response: Any, deserialization_callback: Callable, polling_method: PollingMethod[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.
cancel(**kwargs: Any) -> LROPoller[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 LROPoller 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 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."
]
poller = text_analytics_client.begin_analyze_healthcare_entities(documents)
try:
cancellation_poller = poller.cancel()
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._lro.AnalyzeHealthcareEntitiesLROPollingMethod
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.begin_analyze_healthcare_entities>
Returns
ID of your call to <xref:azure.ai.textanalytics.begin_analyze_healthcare_entities>
Return type
last_modified_on
When your healthcare entities job was last modified
Returns
When your healthcare entities job was last modified
Return type
Feedback
Submit and view feedback for