diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_normalized_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_normalized_text.yaml index 3caf02a94b9a..e2f6f9cea27b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_normalized_text.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_normalized_text.yaml @@ -22,11 +22,11 @@ interactions: string: '' headers: apim-request-id: - - 1c4b7bf9-4eaf-41c1-8c28-585fd380d751 + - 735b33b4-774b-4271-9732-3753f3f96f3d date: - - Wed, 03 Mar 2021 21:46:23 GMT + - Fri, 05 Mar 2021 15:49:45 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/7249ddad-d020-43dd-9a69-a2b0216cd9bd + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/daea0526-7cc5-4ce7-adca-b26162a158fd strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -34,7 +34,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '338' + - '2691' status: code: 202 message: Accepted @@ -50,17 +50,17 @@ interactions: User-Agent: - azsdk-python-ai-textanalytics/5.1.0b6 Python/3.9.1 (macOS-10.13.6-x86_64-i386-64bit) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/7249ddad-d020-43dd-9a69-a2b0216cd9bd + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/daea0526-7cc5-4ce7-adca-b26162a158fd response: body: - string: '{"jobId":"7249ddad-d020-43dd-9a69-a2b0216cd9bd","lastUpdateDateTime":"2021-03-03T21:46:24Z","createdDateTime":"2021-03-03T21:46:23Z","expirationDateTime":"2021-03-04T21:46:23Z","status":"notStarted","errors":[]}' + string: '{"jobId":"daea0526-7cc5-4ce7-adca-b26162a158fd","lastUpdateDateTime":"2021-03-05T15:49:46Z","createdDateTime":"2021-03-05T15:49:43Z","expirationDateTime":"2021-03-06T15:49:43Z","status":"notStarted","errors":[]}' headers: apim-request-id: - - 57339114-5845-4f08-ab4d-0aa36c843d25 + - e78cb378-7a7f-4a85-8a0f-3fcb4bfc2102 content-type: - application/json; charset=utf-8 date: - - Wed, 03 Mar 2021 21:46:28 GMT + - Fri, 05 Mar 2021 15:49:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -68,7 +68,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '146' + - '13' status: code: 200 message: OK @@ -84,17 +84,17 @@ interactions: User-Agent: - azsdk-python-ai-textanalytics/5.1.0b6 Python/3.9.1 (macOS-10.13.6-x86_64-i386-64bit) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/7249ddad-d020-43dd-9a69-a2b0216cd9bd + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/daea0526-7cc5-4ce7-adca-b26162a158fd response: body: - string: '{"jobId":"7249ddad-d020-43dd-9a69-a2b0216cd9bd","lastUpdateDateTime":"2021-03-03T21:46:32Z","createdDateTime":"2021-03-03T21:46:23Z","expirationDateTime":"2021-03-04T21:46:23Z","status":"running","errors":[]}' + string: '{"jobId":"daea0526-7cc5-4ce7-adca-b26162a158fd","lastUpdateDateTime":"2021-03-05T15:49:52Z","createdDateTime":"2021-03-05T15:49:43Z","expirationDateTime":"2021-03-06T15:49:43Z","status":"running","errors":[]}' headers: apim-request-id: - - 417f0558-5abd-49fd-8cd7-32f2d03549bd + - fa9c29af-15ac-4179-a0f3-621af3f94244 content-type: - application/json; charset=utf-8 date: - - Wed, 03 Mar 2021 21:46:33 GMT + - Fri, 05 Mar 2021 15:49:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -102,7 +102,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '122' + - '10' status: code: 200 message: OK @@ -118,17 +118,19 @@ interactions: User-Agent: - azsdk-python-ai-textanalytics/5.1.0b6 Python/3.9.1 (macOS-10.13.6-x86_64-i386-64bit) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/7249ddad-d020-43dd-9a69-a2b0216cd9bd + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/daea0526-7cc5-4ce7-adca-b26162a158fd response: body: - string: '{"jobId":"7249ddad-d020-43dd-9a69-a2b0216cd9bd","lastUpdateDateTime":"2021-03-03T21:46:32Z","createdDateTime":"2021-03-03T21:46:23Z","expirationDateTime":"2021-03-04T21:46:23Z","status":"running","errors":[]}' + string: '{"jobId":"daea0526-7cc5-4ce7-adca-b26162a158fd","lastUpdateDateTime":"2021-03-05T15:49:57Z","createdDateTime":"2021-03-05T15:49:43Z","expirationDateTime":"2021-03-06T15:49:43Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, + Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-03-01"}}' headers: apim-request-id: - - 54ddb168-5bcc-4610-86b4-1b02d2241bd5 + - f42a9fef-222e-43d0-b4a7-b60272fe109c content-type: - application/json; charset=utf-8 date: - - Wed, 03 Mar 2021 21:46:39 GMT + - Fri, 05 Mar 2021 15:50:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -136,41 +138,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '87' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-ai-textanalytics/5.1.0b6 Python/3.9.1 (macOS-10.13.6-x86_64-i386-64bit) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/7249ddad-d020-43dd-9a69-a2b0216cd9bd - response: - body: - string: '{"jobId":"7249ddad-d020-43dd-9a69-a2b0216cd9bd","lastUpdateDateTime":"2021-03-03T21:46:43Z","createdDateTime":"2021-03-03T21:46:23Z","expirationDateTime":"2021-03-04T21:46:23Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-11"}}' - headers: - apim-request-id: - - 356495ad-d24a-4870-ae9a-3bc03cdc951b - content-type: - - application/json; charset=utf-8 - date: - - Wed, 03 Mar 2021 21:46:45 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-envoy-upstream-service-time: - - '302' + - '2703' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_normalized_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_normalized_text.yaml index fa5f4bc3921e..236c4994336e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_normalized_text.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_normalized_text.yaml @@ -17,13 +17,13 @@ interactions: body: string: '' headers: - apim-request-id: 5f62849b-975a-4da4-8d9f-359e2b7af6d4 - date: Wed, 03 Mar 2021 21:46:45 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/4be5a0c6-2663-46d8-ba56-ffeefe175b9b + apim-request-id: 48896ea9-a102-4c32-9ea1-87f23694e26b + date: Fri, 05 Mar 2021 15:50:07 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/916707e8-3890-46ce-bf92-0b1b042397ee strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '75' + x-envoy-upstream-service-time: '2683' status: code: 202 message: Accepted @@ -34,20 +34,66 @@ interactions: User-Agent: - azsdk-python-ai-textanalytics/5.1.0b6 Python/3.9.1 (macOS-10.13.6-x86_64-i386-64bit) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/4be5a0c6-2663-46d8-ba56-ffeefe175b9b + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/916707e8-3890-46ce-bf92-0b1b042397ee response: body: - string: '{"jobId":"4be5a0c6-2663-46d8-ba56-ffeefe175b9b","lastUpdateDateTime":"2021-03-03T21:46:48Z","createdDateTime":"2021-03-03T21:46:45Z","expirationDateTime":"2021-03-04T21:46:45Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-11"}}' + string: '{"jobId":"916707e8-3890-46ce-bf92-0b1b042397ee","lastUpdateDateTime":"2021-03-05T15:50:07Z","createdDateTime":"2021-03-05T15:50:05Z","expirationDateTime":"2021-03-06T15:50:05Z","status":"notStarted","errors":[]}' headers: - apim-request-id: f9b79e8f-3fa1-4623-99b1-bf925c6b3b60 + apim-request-id: 641d8766-41ad-4850-b8e8-e48f586280f9 content-type: application/json; charset=utf-8 - date: Wed, 03 Mar 2021 21:46:50 GMT + date: Fri, 05 Mar 2021 15:50:12 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '30' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK - url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/4be5a0c6-2663-46d8-ba56-ffeefe175b9b + url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/916707e8-3890-46ce-bf92-0b1b042397ee +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.1.0b6 Python/3.9.1 (macOS-10.13.6-x86_64-i386-64bit) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/916707e8-3890-46ce-bf92-0b1b042397ee + response: + body: + string: '{"jobId":"916707e8-3890-46ce-bf92-0b1b042397ee","lastUpdateDateTime":"2021-03-05T15:50:14Z","createdDateTime":"2021-03-05T15:50:05Z","expirationDateTime":"2021-03-06T15:50:05Z","status":"running","errors":[]}' + headers: + apim-request-id: cb175e99-6dce-4df3-bff4-704a81c95f98 + content-type: application/json; charset=utf-8 + date: Fri, 05 Mar 2021 15:50:18 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '6' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/916707e8-3890-46ce-bf92-0b1b042397ee +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.1.0b6 Python/3.9.1 (macOS-10.13.6-x86_64-i386-64bit) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/916707e8-3890-46ce-bf92-0b1b042397ee + response: + body: + string: '{"jobId":"916707e8-3890-46ce-bf92-0b1b042397ee","lastUpdateDateTime":"2021-03-05T15:50:20Z","createdDateTime":"2021-03-05T15:50:05Z","expirationDateTime":"2021-03-06T15:50:05Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, + Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-03-01"}}' + headers: + apim-request-id: 07da6261-fe59-4a7e-a7c2-eb5f66903890 + content-type: application/json; charset=utf-8 + date: Fri, 05 Mar 2021 15:50:22 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '180' + status: + code: 200 + message: OK + url: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.1-preview.4/entities/health/jobs/916707e8-3890-46ce-bf92-0b1b042397ee version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py index 2b52b55bc6ad..b11c4f825ea2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py @@ -331,7 +331,7 @@ def test_cancellation(self, client): @GlobalTextAnalyticsAccountPreparer() @TextAnalyticsClientPreparer() def test_default_string_index_type_is_UnicodeCodePoint(self, client): - poller = client.begin_analyze_healthcare_entities(documents=["Hello world"]) + poller = client.begin_analyze_healthcare_entities(documents=["Hello world"], polling_interval=self._interval()) actual_string_index_type = poller._polling_method._initial_response.http_request.query["stringIndexType"] self.assertEqual(actual_string_index_type, "UnicodeCodePoint") poller.result() @@ -341,7 +341,8 @@ def test_default_string_index_type_is_UnicodeCodePoint(self, client): def test_explicit_set_string_index_type(self, client): poller = client.begin_analyze_healthcare_entities( documents=["Hello world"], - string_index_type="TextElements_v8" + string_index_type="TextElements_v8", + polling_interval=self._interval(), ) actual_string_index_type = poller._polling_method._initial_response.http_request.query["stringIndexType"] self.assertEqual(actual_string_index_type, "TextElements_v8") @@ -351,7 +352,8 @@ def test_explicit_set_string_index_type(self, client): @TextAnalyticsClientPreparer() def test_relations(self, client): result = list(client.begin_analyze_healthcare_entities( - documents=["The patient was diagnosed with Parkinsons Disease (PD)"] + documents=["The patient was diagnosed with Parkinsons Disease (PD)"], + polling_interval=self._interval(), ).result()) assert len(result) == 1 @@ -378,7 +380,8 @@ def test_relations(self, client): @TextAnalyticsClientPreparer() def test_normalized_text(self, client): result = list(client.begin_analyze_healthcare_entities( - documents=["patients must have histologically confirmed NHL"] + documents=["patients must have histologically confirmed NHL"], + polling_interval=self._interval(), ).result()) # currently just testing it has that attribute. @@ -386,4 +389,6 @@ def test_normalized_text(self, client): assert all([ e for e in result[0].entities if hasattr(e, "normalized_text") - ]) \ No newline at end of file + ]) + histologically_entity = list(filter(lambda x: x.text == "histologically", result[0].entities))[0] + assert histologically_entity.normalized_text == "Histology Procedure" \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py index a74887d2aa93..2d061b3cae50 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py @@ -373,7 +373,7 @@ async def test_cancellation(self, client): @GlobalTextAnalyticsAccountPreparer() @TextAnalyticsClientPreparer() async def test_default_string_index_type_is_UnicodeCodePoint(self, client): - poller = await client.begin_analyze_healthcare_entities(documents=["Hello world"]) + poller = await client.begin_analyze_healthcare_entities(documents=["Hello world"], polling_interval=self._interval()) actual_string_index_type = poller._polling_method._initial_response.http_request.query["stringIndexType"] self.assertEqual(actual_string_index_type, "UnicodeCodePoint") await poller.result() @@ -383,7 +383,8 @@ async def test_default_string_index_type_is_UnicodeCodePoint(self, client): async def test_explicit_set_string_index_type(self, client): poller = await client.begin_analyze_healthcare_entities( documents=["Hello world"], - string_index_type="TextElements_v8" + string_index_type="TextElements_v8", + polling_interval=self._interval(), ) actual_string_index_type = poller._polling_method._initial_response.http_request.query["stringIndexType"] self.assertEqual(actual_string_index_type, "TextElements_v8") @@ -393,7 +394,8 @@ async def test_explicit_set_string_index_type(self, client): @TextAnalyticsClientPreparer() async def test_relations(self, client): response = await (await client.begin_analyze_healthcare_entities( - documents=["The patient was diagnosed with Parkinsons Disease (PD)"] + documents=["The patient was diagnosed with Parkinsons Disease (PD)"], + polling_interval=self._interval(), )).result() result = [] @@ -424,7 +426,8 @@ async def test_relations(self, client): @TextAnalyticsClientPreparer() async def test_normalized_text(self, client): response = await (await client.begin_analyze_healthcare_entities( - documents=["patients must have histologically confirmed NHL"] + documents=["patients must have histologically confirmed NHL"], + polling_interval=self._interval(), )).result() result = [] @@ -438,4 +441,5 @@ async def test_normalized_text(self, client): e for e in result[0].entities if hasattr(e, "normalized_text") ]) - + histologically_entity = list(filter(lambda x: x.text == "histologically", result[0].entities))[0] + assert histologically_entity.normalized_text == "Histology Procedure"