@azure-rest/health-insights-radiologyinsights 1.0.0-alpha.20250224.1 → 1.0.0-alpha.20250226.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -39,243 +39,262 @@ To authenticate with AAD, you must first `npm` install [`@azure/identity`][ident
39
39
 
40
40
  After setup, you can choose which type of [credential][credential] from `@azure/identity` to use.
41
41
  As an example, [DefaultAzureCredential][defaultazurecredential]
42
- can be used to authenticate the client. See more info on defaultAzureCredentials [default_information].
42
+ can be used to authenticate the client. See more info on defaultAzureCredentials [default_information].
43
43
  Managed Identities can also be used to authenticate through DefaultAzureCredential [managed_identity].
44
44
 
45
45
  ## Examples
46
46
 
47
47
  ### Create a RadiologyInsights asynchronous client
48
48
 
49
- ```typescript
50
- const endpoint = process.env["HEALTH_INSIGHTS_ENDPOINT"] || "";
49
+ ```ts snippet:ReadmeSampleCreateClient_Node
50
+ import { DefaultAzureCredential } from "@azure/identity";
51
+ import RadiologyInsightsRestClient from "@azure-rest/health-insights-radiologyinsights";
52
+
53
+ const endpoint = "https://<your-endpoint>";
51
54
  const credential = new DefaultAzureCredential();
52
55
  const client = RadiologyInsightsRestClient(endpoint, credential);
53
56
  ```
54
57
 
55
-
56
58
  ### Build a request, send it to the client and print out the description of a Critical Result Inference
57
59
 
58
- ```typescript
60
+ ```ts snippet:ReadmeSampleCriticalResultInference
61
+ import { DefaultAzureCredential } from "@azure/identity";
62
+ import RadiologyInsightsRestClient, {
63
+ ClinicalDocumentTypeEnum,
64
+ isUnexpected,
65
+ getLongRunningPoller,
66
+ RadiologyProcedureInference,
67
+ Coding,
68
+ ImagingProcedure,
69
+ } from "@azure-rest/health-insights-radiologyinsights";
70
+
71
+ const endpoint = "https://<your-endpoint>";
72
+ const credential = new DefaultAzureCredential();
73
+ const client = RadiologyInsightsRestClient(endpoint, credential);
59
74
 
60
- export async function main() {
61
- const credential = new DefaultAzureCredential();
62
- const client = AzureHealthInsightsClient(endpoint, credential);
63
-
64
- // if you want to use DefaultAzureCredential in you test, you can use the createTestCredential to do the correct switches between node and browser tests
65
- import { createTestCredential } from "@azure-tools/test-credential";
75
+ const codingData = {
76
+ system: "Http://hl7.org/fhir/ValueSet/cpt-all",
77
+ code: "24727-0",
78
+ display: "CT HEAD W CONTRAST IV",
79
+ };
66
80
 
67
- export async function createTestClient(recorder: Recorder): Promise<AzureHealthInsightsClient> {
68
- const endpoint = assertEnvironmentVariable("HEALTH_INSIGHTS_ENDPOINT");
69
- const credential = createTestCredential();
70
- return AHIClient(endpoint, credential, recorder.configureClientOptions({}));
71
- }
81
+ const code = {
82
+ coding: [codingData],
83
+ };
72
84
 
73
- // Create request body
74
- const radiologyInsightsParameter = createRequestBody();
85
+ const patientInfo = {
86
+ sex: "female",
87
+ birthDate: new Date("1959-11-11T19:00:00+00:00"),
88
+ };
75
89
 
76
- // Initiate radiology insights job and retrieve results
77
- // The jobID can be adapted by preference of the client, there are restrictions in size and it cannot contain spaces
78
- const dateString = Date.now();
79
- const jobID = "jobId-" + dateString;
80
- const initialResponse = await client.path("/radiology-insights/jobs/{id}", jobID).put(radiologyInsightsParameter);
81
- if (isUnexpected(initialResponse)) {
82
- throw initialResponse;
83
- }
84
- const poller = await getLongRunningPoller(client, initialResponse);
85
- const RadiologyInsightsResult = await poller.pollUntilDone();
86
- if (isUnexpected(RadiologyInsightsResult)) {
87
- throw RadiologyInsightsResult;
88
- }
89
- const resultBody = RadiologyInsightsResult.body;
90
- printResults(resultBody);
91
- }
90
+ const encounterData = {
91
+ id: "encounterid1",
92
+ period: {
93
+ start: "2021-8-28T00:00:00",
94
+ end: "2021-8-28T00:00:00",
95
+ },
96
+ class: "inpatient",
97
+ };
92
98
 
93
- function createRequestBody(): CreateJobParameters {
99
+ const authorData = {
100
+ id: "authorid1",
101
+ fullName: "authorname1",
102
+ };
94
103
 
95
- const codingData = {
96
- system: "Http://hl7.org/fhir/ValueSet/cpt-all",
97
- code: "USPELVIS",
98
- display: "US PELVIS COMPLETE"
99
- };
104
+ const orderedProceduresData = {
105
+ code: code,
106
+ description: "CT HEAD W CONTRAST IV",
107
+ };
100
108
 
101
- const code = {
102
- coding: [codingData]
103
- };
109
+ const administrativeMetadata = {
110
+ orderedProcedures: [orderedProceduresData],
111
+ encounterId: "encounterid1",
112
+ };
104
113
 
105
- const patientInfo = {
106
- sex: "female",
107
- birthDate: new Date("1959-11-11T19:00:00+00:00"),
108
- };
114
+ const content = {
115
+ sourceType: "inline",
116
+ value: ` Exam: Head CT with Contrast
109
117
 
110
- const encounterData = {
111
- id: "encounterid1",
112
- period: {
113
- "start": "2021-8-28T00:00:00",
114
- "end": "2021-8-28T00:00:00"
115
- },
116
- class: "inpatient"
117
- };
118
+ History: Headaches for 2 months
119
+ Technique: Axial, sagittal, and coronal images were reconstructed from helical CT through the head without IV contrast.
120
+ IV contrast: 100 mL IV Omnipaque 300.
118
121
 
119
- const authorData = {
120
- id: "authorid1",
121
- fullName: "authorname1",
122
+ Findings: There is no mass effect. There is no abnormal enhancement of the brain or within injuries with IV contrast.
123
+ However, there is no evidence of enhancing lesion in either internal auditory canal.
124
+ Impression: Negative CT of the brain without IV contrast.
125
+ I recommend a new brain CT within nine months.`,
122
126
  };
123
127
 
124
- const orderedProceduresData = {
125
- code: code,
126
- description: "US PELVIS COMPLETE"
127
- };
128
-
129
- const administrativeMetadata = {
130
- orderedProcedures: [orderedProceduresData],
131
- encounterId: "encounterid1"
132
- };
133
-
134
- const content = {
135
- sourceType: "inline",
136
- value: `CLINICAL HISTORY:
137
- 20-year-old female presenting with abdominal pain. Surgical history significant for appendectomy.
138
-
139
- COMPARISON:
140
- Right upper quadrant sonographic performed 1 day prior.
141
-
142
- TECHNIQUE:
143
- Transabdominal grayscale pelvic sonography with duplex color Doppler
144
- and spectral waveform analysis of the ovaries.
145
-
146
- FINDINGS:
147
- The uterus is unremarkable given the transabdominal technique with
148
- endometrial echo complex within physiologic normal limits. The
149
- ovaries are symmetric in size, measuring 2.5 x 1.2 x 3.0 cm and the
150
- left measuring 2.8 x 1.5 x 1.9 cm.
151
-
152
- On duplex imaging, Doppler signal is symmetric.
153
-
154
- IMPRESSION:
155
- 1. Normal pelvic sonography. Findings of testicular torsion.
156
- A new US pelvis within the next 6 months is recommended.
157
-
158
- These results have been discussed with Dr. Jones at 3 PM on November 5 2020.`,
159
- };
160
-
161
- const patientDocumentData = {
162
- type: "note",
163
- clinicalType: ClinicalDocumentTypeEnum.RadiologyReport,
164
- id: "docid1",
165
- language: "en",
166
- authors: [authorData],
167
- specialtyType: "radiology",
168
- administrativeMetadata: administrativeMetadata,
169
- content: content,
170
- createdAt: new Date("2021-05-31T16:00:00.000Z"),
171
- orderedProceduresAsCsv: "US PELVIS COMPLETE"
172
- };
173
-
174
-
175
- const patientData = {
176
- id: "Samantha Jones",
177
- details: patientInfo,
178
- encounters: [encounterData],
179
- patientDocuments: [patientDocumentData]
180
- };
181
-
182
- const inferenceTypes = [
183
- "finding",
184
- "ageMismatch",
185
- "lateralityDiscrepancy",
186
- "sexMismatch",
187
- "completeOrderDiscrepancy",
188
- "limitedOrderDiscrepancy",
189
- "criticalResult",
190
- "criticalRecommendation",
191
- "followupRecommendation",
192
- "followupCommunication",
193
- "radiologyProcedure"];
194
-
195
- const followupRecommendationOptions = {
196
- includeRecommendationsWithNoSpecifiedModality: true,
197
- includeRecommendationsInReferences: true,
198
- provideFocusedSentenceEvidence: true
199
- };
200
-
201
- const findingOptions = {
202
- provideFocusedSentenceEvidence: true
203
- };
204
-
205
- const inferenceOptions = {
206
- followupRecommendationOptions: followupRecommendationOptions,
207
- findingOptions: findingOptions
208
- };
209
-
210
- const configuration = {
211
- inferenceOptions: inferenceOptions,
212
- inferenceTypes: inferenceTypes,
213
- locale: "en-US",
214
- verbose: false,
215
- includeEvidence: true
216
- };
217
-
218
- const radiologyInsightsData = {
128
+ const patientDocumentData = {
129
+ type: "note",
130
+ clinicalType: ClinicalDocumentTypeEnum.RadiologyReport,
131
+ id: "docid1",
132
+ language: "en",
133
+ authors: [authorData],
134
+ specialtyType: "radiology",
135
+ administrativeMetadata: administrativeMetadata,
136
+ content: content,
137
+ createdAt: new Date("2021-05-31T16:00:00.000Z"),
138
+ orderedProceduresAsCsv: "CT HEAD W CONTRAST IV",
139
+ };
140
+
141
+ const patientData = {
142
+ id: "Samantha Jones",
143
+ details: patientInfo,
144
+ encounters: [encounterData],
145
+ patientDocuments: [patientDocumentData],
146
+ };
147
+
148
+ const inferenceTypes = [
149
+ "finding",
150
+ "ageMismatch",
151
+ "lateralityDiscrepancy",
152
+ "sexMismatch",
153
+ "completeOrderDiscrepancy",
154
+ "limitedOrderDiscrepancy",
155
+ "criticalResult",
156
+ "criticalRecommendation",
157
+ "followupRecommendation",
158
+ "followupCommunication",
159
+ "radiologyProcedure",
160
+ ];
161
+
162
+ const followupRecommendationOptions = {
163
+ includeRecommendationsWithNoSpecifiedModality: true,
164
+ includeRecommendationsInReferences: true,
165
+ provideFocusedSentenceEvidence: true,
166
+ };
167
+
168
+ const findingOptions = {
169
+ provideFocusedSentenceEvidence: true,
170
+ };
171
+
172
+ const inferenceOptions = {
173
+ followupRecommendationOptions: followupRecommendationOptions,
174
+ findingOptions: findingOptions,
175
+ };
176
+
177
+ // Create RI Configuration
178
+ const configuration = {
179
+ inferenceOptions: inferenceOptions,
180
+ inferenceTypes: inferenceTypes,
181
+ locale: "en-US",
182
+ verbose: false,
183
+ includeEvidence: true,
184
+ };
185
+
186
+ // create RI Data
187
+ const radiologyInsightsJob = {
188
+ jobData: {
219
189
  patients: [patientData],
220
- configuration: configuration
221
- };
190
+ configuration: configuration,
191
+ },
192
+ };
222
193
 
223
- return {
224
- body: radiologyInsightsData
225
- }
194
+ // Create request body
195
+ const radiologyInsightsParameter = { body: radiologyInsightsJob };
196
+
197
+ // Initiate radiology insights job and retrieve results
198
+ const dateString = Date.now();
199
+ const jobID = "jobId-" + dateString;
200
+ const initialResponse = await client
201
+ .path("/radiology-insights/jobs/{id}", jobID)
202
+ .put(radiologyInsightsParameter);
226
203
 
204
+ if (isUnexpected(initialResponse)) {
205
+ throw initialResponse.body.error;
227
206
  }
228
207
 
229
- function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput): void {
230
- if (radiologyInsightsResult.status === "succeeded") {
231
- const results = radiologyInsightsResult.result;
232
- if (results !== undefined) {
233
- results.patientResults.forEach((patientResult: { inferences: any[]; }) => {
234
- if (patientResult.inferences) {
235
- patientResult.inferences.forEach((inference) => {
236
- if (inference.kind === "criticalResult") {
237
- if ("result" in inference) {
238
- console.log("Critical Result Inference found: " + inference.result.description);
239
- }
208
+ const poller = await getLongRunningPoller(client, initialResponse);
209
+ const radiologyInsightsResult = await poller.pollUntilDone();
210
+
211
+ if (isUnexpected(radiologyInsightsResult)) {
212
+ throw radiologyInsightsResult.body.error;
213
+ }
214
+
215
+ const result = radiologyInsightsResult.body.result;
216
+
217
+ if (result) {
218
+ for (const patientResult of result.patientResults) {
219
+ if (patientResult.inferences) {
220
+ for (const inference of patientResult.inferences) {
221
+ if (inference.kind === "radiologyProcedure") {
222
+ console.log("Radiology Procedure Inference found");
223
+ const radiologyProcedureInference = inference as RadiologyProcedureInference;
224
+ for (const procedureCode of radiologyProcedureInference?.procedureCodes || []) {
225
+ console.log(" Procedure Codes: ");
226
+ displayCodes(procedureCode.coding);
227
+ }
228
+
229
+ if (radiologyProcedureInference.imagingProcedures) {
230
+ console.log(" Imaging Procedure Codes: ");
231
+ for (const imagingProcedure of radiologyProcedureInference.imagingProcedures) {
232
+ displayImaging(imagingProcedure);
240
233
  }
241
- });
234
+ }
235
+
236
+ if (radiologyProcedureInference.orderedProcedure) {
237
+ console.log(" Ordered Procedure Codes: ");
238
+ displayCodes(radiologyProcedureInference.orderedProcedure.code?.coding);
239
+ }
240
+
241
+ if (radiologyProcedureInference.orderedProcedure.description) {
242
+ console.log(
243
+ ` Description: ${radiologyProcedureInference.orderedProcedure.description}`,
244
+ );
245
+ }
242
246
  }
243
- });
244
- }
245
- } else {
246
- const error = radiologyInsightsResult.error;
247
- if (error) {
248
- console.log(error.code, ":", error.message);
247
+ }
249
248
  }
250
249
  }
251
250
  }
251
+
252
+ function displayCodes(codingList: Coding[] | undefined) {
253
+ for (const coding of codingList || []) {
254
+ console.log(` Coding: ${coding.code} , ${coding.display} (${coding.system})`);
255
+ }
256
+ }
257
+
258
+ function displayImaging(images: ImagingProcedure): void {
259
+ console.log(" Modality Codes: ");
260
+ displayCodes(images.modality.coding);
261
+ console.log(" Anatomy Codes: ");
262
+ displayCodes(images.anatomy.coding);
263
+ if (images.laterality) {
264
+ console.log(" Laterality Codes: ");
265
+ displayCodes(images.laterality.coding);
266
+ }
267
+ if (images.contrast) {
268
+ console.log(" Contrast Codes: ");
269
+ displayCodes(images.contrast.code.coding);
270
+ }
271
+ if (images.view) {
272
+ console.log(" View Codes: ");
273
+ displayCodes(images.view.code.coding);
274
+ }
275
+ }
252
276
  ```
277
+
253
278
  ### Print out the Age Mismatch Inference evidences
254
- ```typescript
279
+
280
+ ```ts snippet:ReadmeSampleAgeMismatch
281
+ import {
282
+ RadiologyInsightsJobOutput,
283
+ ExtensionOutput,
284
+ } from "@azure-rest/health-insights-radiologyinsights";
285
+
255
286
  function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput, content: string): void {
256
- if (radiologyInsightsResult.status === "succeeded") {
257
- const results = radiologyInsightsResult.result;
258
- if (results !== undefined) {
259
- results.patientResults.forEach((patientResult: any) => {
260
- if (patientResult.inferences) {
261
- patientResult.inferences.forEach((inference: any) => {
262
- if (inference.kind === "ageMismatch") {
263
- console.log("Age Mismatch Inference found: ");
264
- const evidence = findAgeEvidence(inference.extension, content);
265
- console.log(" Evidence: " + evidence);
266
- }
267
- });
268
- }
269
- });
270
- }
271
- } else {
272
- const error = radiologyInsightsResult.error;
273
- if (error) {
274
- console.log(error.code, ":", error.message);
287
+ for (const patientResult of radiologyInsightsResult?.result?.patientResults || []) {
288
+ for (const inference of patientResult?.inferences || []) {
289
+ if (inference.kind === "ageMismatch") {
290
+ console.log("Age Mismatch Inference found: ");
291
+ const evidence = findAgeEvidence(inference.extension, content);
292
+ console.log(" Evidence: " + evidence);
293
+ }
275
294
  }
276
295
  }
277
296
 
278
- function findAgeEvidence(extensions: any, content: string) {
297
+ function findAgeEvidence(extensions: ExtensionOutput[], content: string) {
279
298
  let offset = -1;
280
299
  let length = -1;
281
300
  let piece = "";
@@ -296,460 +315,413 @@ function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput, conte
296
315
  }
297
316
  return evidence;
298
317
  }
299
-
300
318
  }
301
319
  ```
302
320
 
303
321
  ### Print out the Complete Order Discrepancy Inference ordertype and its missing Body Parts and missing Body Part Measurements
304
322
 
305
- ```typescript
323
+ ```ts snippet:ReadmeSampleCompleteOrderDiscrepancy
324
+ import {
325
+ RadiologyInsightsJobOutput,
326
+ CompleteOrderDiscrepancyInference,
327
+ CodeableConcept,
328
+ } from "@azure-rest/health-insights-radiologyinsights";
329
+
306
330
  function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput): void {
307
- if (radiologyInsightsResult.status === "succeeded") {
308
- const results = radiologyInsightsResult.result;
309
- if (results !== undefined) {
310
- results.patientResults.forEach((patientResult: any) => {
311
- if (patientResult.inferences) {
312
- patientResult.inferences.forEach((inference: any) => {
313
- if (inference.kind === "completeOrderDiscrepancy") {
314
- console.log("Complete Order Discrepancy Inference found: ");
315
- if ("orderType" in inference) {
316
- console.log(" Ordertype: ");
317
- displayCodes({ codeableConcept: inference.orderType });
318
- };
319
-
320
- inference.missingBodyParts?.forEach((bodyparts: any) => {
321
- console.log(" Missing Body Parts: ");
322
- displayCodes({ codeableConcept: bodyparts });
323
- });
324
-
325
- inference.missingBodyPartMeasurements?.forEach((bodymeasure: any) => {
326
- console.log(" Missing Body Part Measurements: ");
327
- displayCodes({ codeableConcept: bodymeasure });
328
- });
329
- }
330
- });
331
+ for (const patientResult of radiologyInsightsResult?.result?.patientResults || []) {
332
+ for (const inference of patientResult?.inferences || []) {
333
+ if (inference.kind === "completeOrderDiscrepancy") {
334
+ const completeOrderDiscrepancyInference = inference as CompleteOrderDiscrepancyInference;
335
+ console.log("Complete Order Discrepancy Inference found: ");
336
+ console.log(" Ordertype: ");
337
+ displayCodes({ codeableConcept: completeOrderDiscrepancyInference.orderType });
338
+
339
+ for (const missingBodyPart of completeOrderDiscrepancyInference.missingBodyParts) {
340
+ console.log(" Missing Body Parts: ");
341
+ displayCodes({ codeableConcept: missingBodyPart });
331
342
  }
332
- });
333
- }
334
- } else {
335
- const error = radiologyInsightsResult.error;
336
- if (error) {
337
- console.log(error.code, ":", error.message);
338
- }
339
- }
340
343
 
341
- function displayCodes({ codeableConcept }: { codeableConcept: any; }): void {
342
- codeableConcept.coding?.forEach((coding: any) => {
343
- if ("code" in coding) {
344
- console.log(" Coding: " + coding.code + ", " + coding.display + " (" + coding.system + ")");
344
+ for (const missingBodymeasure of completeOrderDiscrepancyInference.missingBodyPartMeasurements) {
345
+ console.log(" Missing Body Part Measurements: ");
346
+ displayCodes({ codeableConcept: missingBodymeasure });
347
+ }
345
348
  }
346
- });
349
+ }
347
350
  }
348
351
 
352
+ function displayCodes({ codeableConcept }: { codeableConcept: CodeableConcept }): void {
353
+ for (const coding of codeableConcept.coding || []) {
354
+ console.log(` Coding: ${coding.code}, ${coding.display} (${coding.system})`);
355
+ }
356
+ }
349
357
  }
350
358
  ```
351
359
 
352
360
  ### Print out the Finding Inference code, interpretation, Component codes and the section info
353
361
 
354
- ```typescript
355
- function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput): void {
356
- if (radiologyInsightsResult.status === "succeeded") {
357
- const results = radiologyInsightsResult.result;
358
- if (results !== undefined) {
359
- results.patientResults.forEach((patientResult: { inferences: any[]; }) => {
360
- if (patientResult.inferences) {
361
- patientResult.inferences.forEach((inference) => {
362
- if (inference.kind === "finding") {
363
- console.log("Finding Inference found: ");
364
-
365
- let find = inference.finding;
366
- if ("code" in find) {
367
- let fcode = find.code;
368
- console.log(" Code: ");
369
- displayCodes(fcode);
370
- }
362
+ ```ts snippet:ReadmeSampleFindingInference
363
+ import {
364
+ RadiologyInsightsJobOutput,
365
+ FindingInference,
366
+ CodeableConcept,
367
+ Extension,
368
+ } from "@azure-rest/health-insights-radiologyinsights";
371
369
 
372
- find.interpretation?.forEach((inter: any) => {
373
- console.log(" Interpretation: ");
374
- displayCodes(inter);
375
- });
370
+ function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput): void {
371
+ if (radiologyInsightsResult.result) {
372
+ for (const patientResult of radiologyInsightsResult.result.patientResults) {
373
+ if (patientResult.inferences) {
374
+ for (const inference of patientResult.inferences) {
375
+ console.log("Finding Inference found: ");
376
+ if (inference.kind === "finding") {
377
+ const findingInference = inference as FindingInference;
378
+
379
+ if (findingInference.finding.code) {
380
+ console.log(" Code: ");
381
+ displayCodes(findingInference.finding.code);
382
+ }
376
383
 
377
- inference.finding.component?.forEach((comp: { code: any; valueCodeableConcept: any }) => {
378
- console.log(" Component code: ");
379
- displayCodes(comp.code);
380
- if ("valueCodeableConcept" in comp) {
381
- console.log(" Value component codeable concept: ");
382
- displayCodes(comp.valueCodeableConcept);
383
- }
384
- });
384
+ for (const interpretation of findingInference.finding.interpretation) {
385
+ console.log(" Interpretation: ");
386
+ displayCodes(interpretation);
387
+ }
385
388
 
386
- if ("extension" in inference) {
387
- displaySectionInfo(inference);
388
- };
389
+ for (const component of findingInference.finding.component) {
390
+ console.log(" Component code: ");
391
+ displayCodes(component.code);
392
+ if (component.valueCodeableConcept) {
393
+ console.log(" Value component codeable concept: ");
394
+ displayCodes(component.valueCodeableConcept);
395
+ }
396
+ }
389
397
 
398
+ if (findingInference.extension) {
399
+ displaySectionInfo(findingInference);
390
400
  }
391
- });
401
+ }
392
402
  }
393
- });
394
- }
395
- } else {
396
- const error = radiologyInsightsResult.error;
397
- if (error) {
398
- console.log(error.code, ":", error.message);
403
+ }
399
404
  }
400
405
  }
401
406
 
402
- function displayCodes(codeableConcept: any): void {
403
- codeableConcept.coding?.forEach((coding: any) => {
404
- if ("code" in coding) {
405
- console.log(" Coding: " + coding.code + ", " + coding.display + " (" + coding.system + ")");
406
- }
407
- });
407
+ function displayCodes(codeableConcept: CodeableConcept): void {
408
+ for (const coding of codeableConcept.coding || []) {
409
+ console.log(` Coding: ${coding.code}, ${coding.display} (${coding.system})`);
410
+ }
408
411
  }
409
412
 
410
- function displaySectionInfo(inference: { extension: any[]; }) {
411
- inference.extension?.forEach((ext: any) => {
412
- if ("url" in ext && ext.url === "section") {
413
+ function displaySectionInfo(inference: { extension?: Extension[] }) {
414
+ for (const extension of inference.extension || []) {
415
+ if (extension.url === "section") {
413
416
  console.log(" Section:");
414
- ext.extension?.forEach((subextension: { url: string; valueString: string; }) => {
415
- if ("url" in subextension && "valueString" in subextension) {
416
- console.log(" " + subextension.url + ": " + subextension.valueString);
417
- }
418
- });
417
+ for (const { url, valueString } of extension.extension || []) {
418
+ console.log(` ${url}: ${valueString}`);
419
+ }
419
420
  }
420
- });
421
+ }
421
422
  }
422
-
423
423
  }
424
424
  ```
425
425
 
426
426
  ### Print out the Follow Up Communication Inference date and recipient
427
427
 
428
- ```typescript
428
+ ```ts snippet:ReadmeSampleFollowUpCommunication
429
+ import {
430
+ RadiologyInsightsJobOutput,
431
+ FollowupCommunicationInference,
432
+ } from "@azure-rest/health-insights-radiologyinsights";
433
+
429
434
  function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput): void {
430
- if (radiologyInsightsResult.status === "succeeded") {
431
- const results = radiologyInsightsResult.result;
432
- if (results !== undefined) {
433
- results.patientResults.forEach((patientResult: any) => {
434
- patientResult.inferences.forEach((inference: { kind: string; communicatedAt: any[]; recipient: any[]; wasAcknowledged: string; }) => {
435
- if (inference.kind === "followupCommunication") {
436
- console.log("Followup Communication Inference found");
437
- if ("communicatedAt" in inference) {
438
- console.log("Communicated at: " + inference.communicatedAt.join(" "));
439
- }
440
- if ("recipient" in inference) {
441
- console.log("Recipient: " + inference.recipient.join(" "));
442
- }
443
- console.log(" Aknowledged: " + inference.wasAcknowledged);
444
- }
445
- });
446
- });
447
- }
448
- } else {
449
- const error = radiologyInsightsResult.error;
450
- if (error) {
451
- console.log(error.code, ":", error.message);
435
+ for (const patientResult of radiologyInsightsResult?.result?.patientResults || []) {
436
+ for (const inference of patientResult?.inferences || []) {
437
+ if (inference.kind === "followupCommunication") {
438
+ const followupCommunicationInference = inference as FollowupCommunicationInference;
439
+ console.log("Followup Communication Inference found");
440
+ if (followupCommunicationInference.communicatedAt) {
441
+ console.log(
442
+ `Communicated at: ${followupCommunicationInference.communicatedAt.join(" ")}`,
443
+ );
444
+ }
445
+ if (followupCommunicationInference.recipient) {
446
+ console.log(`Recipient: ${followupCommunicationInference.recipient.join(" ")}`);
447
+ }
448
+ console.log(` Acknowledged: ${followupCommunicationInference.wasAcknowledged}`);
449
+ }
452
450
  }
453
451
  }
454
-
455
452
  }
456
453
  ```
457
454
 
458
455
  ### Print out the Follow Up Recommendation Inference booleans, Generic Procedure code, description and Imaging Procedure codes
459
456
 
460
- ```typescript
457
+ ```ts snippet:ReadmeSampleFollowUpRecommendation
458
+ import {
459
+ RadiologyInsightsJobOutput,
460
+ FollowupRecommendationInference,
461
+ GenericProcedureRecommendation,
462
+ ImagingProcedureRecommendation,
463
+ CodeableConcept,
464
+ ImagingProcedure,
465
+ } from "@azure-rest/health-insights-radiologyinsights";
466
+
461
467
  function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput): void {
462
- if (radiologyInsightsResult.status === "succeeded") {
463
- const results = radiologyInsightsResult.result;
464
- if (results !== undefined) {
465
- results.patientResults.forEach((patientResult: any) => {
466
- patientResult.inferences.forEach((inference: { kind: string; isConditional: any; isGuideline: any; isHedging: any; isOption: any; recommendedProcedure: any; }) => {
467
- if (inference.kind === "followupRecommendation") {
468
- console.log("Follow Up Recommendation Inference found");
469
- console.log(" Is conditional: ", inference.isConditional);
470
- console.log(" Is guidline: ", inference.isGuideline);
471
- console.log(" Is hedging: ", inference.isHedging);
472
- console.log(" Is option: ", inference.isOption);
473
-
474
- var procedure = inference.recommendedProcedure;
475
- if ("kind" in procedure && procedure.kind === "genericProcedureRecommendation") {
476
- if ("code" in procedure) {
477
- console.log(" Recommended Generic Procedure: ", procedure.code);
478
- }
479
- if ("description" in procedure) {
480
- console.log(" Description: ", procedure.description);
481
- }
482
- } else if ("kind" in procedure && procedure.kind === "imagingProcedureRecommendation") {
483
- procedure.procedureCodes?.forEach((procedureCode: any) => {
484
- console.log(" Recommended Procedure Codes: ");
485
- displayCodes(procedureCode);
486
- });
487
-
488
- if ("imagingProcedures" in procedure) {
489
- procedure.imagingProcedures?.forEach((imagingProcedure: any) => {
490
- console.log(" Recommended Imaging Procedure Codes: ");
491
- displayImaging(imagingProcedure);
492
- });
493
- }
494
- }
468
+ for (const patientResult of radiologyInsightsResult?.result?.patientResults || []) {
469
+ for (const inference of patientResult?.inferences || []) {
470
+ if (inference.kind === "followupRecommendation") {
471
+ const followupRecommendationInference = inference as FollowupRecommendationInference;
472
+
473
+ console.log("Follow Up Recommendation Inference found");
474
+ console.log(` Is conditional: ${followupRecommendationInference.isConditional}`);
475
+ console.log(` Is guideline: ${followupRecommendationInference.isGuideline}`);
476
+ console.log(` Is hedging: ${followupRecommendationInference.isHedging}`);
477
+ console.log(` Is option: ${followupRecommendationInference.isOption}`);
478
+
479
+ const procedure = followupRecommendationInference.recommendedProcedure;
480
+ if (procedure.kind === "genericProcedureRecommendation") {
481
+ const genericProcedureRecommendation = procedure as GenericProcedureRecommendation;
482
+ console.log(` Recommended Generic Procedure: ${genericProcedureRecommendation.code}`);
483
+ console.log(` Description: ${genericProcedureRecommendation.description}`);
484
+ } else if (procedure.kind === "imagingProcedureRecommendation") {
485
+ const imagingProcedureRecommendation = procedure as ImagingProcedureRecommendation;
486
+
487
+ for (const procedureCode of imagingProcedureRecommendation?.procedureCodes || []) {
488
+ console.log(" Recommended Procedure Codes: ");
489
+ displayCodes(procedureCode);
495
490
  }
496
- });
497
- });
498
- }
499
- } else {
500
- const error = radiologyInsightsResult.error;
501
- if (error) {
502
- console.log(error.code, ":", error.message);
491
+
492
+ for (const imagingProcedure of imagingProcedureRecommendation?.imagingProcedures || []) {
493
+ console.log(" Recommended Imaging Procedure Codes: ");
494
+ displayImaging(imagingProcedure);
495
+ }
496
+ }
497
+ }
503
498
  }
504
499
  }
505
500
 
506
- function displayCodes(codeableConcept: any): void {
507
- codeableConcept.coding?.forEach((coding: any) => {
508
- if ("code" in coding) {
509
- console.log(" Coding: " + coding.code + ", " + coding.display + " (" + coding.system + ")");
510
- }
511
- });
501
+ function displayCodes(codeableConcept: CodeableConcept): void {
502
+ for (const coding of codeableConcept.coding || []) {
503
+ console.log(` Coding: ${coding.code}, ${coding.display} (${coding.system})`);
504
+ }
512
505
  }
513
506
 
514
- function displayImaging(images: { modality: { coding: any[]; }; anatomy: { coding: any[]; }; laterality: { coding: any[]; }; contrast: { code: { coding: any[]; }; }; view: { code: { coding: any[]; }; }; }) {
507
+ function displayImaging(images: ImagingProcedure): void {
515
508
  console.log(" Modality Codes: ");
516
509
  displayCodes(images.modality);
517
510
  console.log(" Anatomy Codes: ");
518
511
  displayCodes(images.anatomy);
519
- if ("laterality" in images) {
512
+ if (images.laterality) {
520
513
  console.log(" Laterality Codes: ");
521
514
  displayCodes(images.laterality);
522
515
  }
523
- if ("contrast" in images) {
516
+ if (images.contrast) {
524
517
  console.log(" Contrast Codes: ");
525
518
  displayCodes(images.contrast.code);
526
519
  }
527
- if ("view" in images) {
520
+ if (images.view) {
528
521
  console.log(" View Codes: ");
529
522
  displayCodes(images.view.code);
530
523
  }
531
524
  }
532
-
533
525
  }
534
526
  ```
535
527
 
536
528
  ### Print out the Laterality Discrepancy Inference code
537
529
 
538
- ```typescript
530
+ ```ts snippet:ReadmeSampleLateralityDiscrepancy
531
+ import {
532
+ RadiologyInsightsJobOutput,
533
+ LateralityDiscrepancyInference,
534
+ CodeableConcept,
535
+ } from "@azure-rest/health-insights-radiologyinsights";
536
+
539
537
  function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput): void {
540
- if (radiologyInsightsResult.status === "succeeded") {
541
- const results = radiologyInsightsResult.result;
542
- if (results !== undefined) {
543
- results.patientResults.forEach((patientResult: any) => {
544
- patientResult.inferences.forEach((inference: { kind: string; lateralityIndication: any }) => {
545
- if (inference.kind === "lateralityDiscrepancy") {
546
- console.log("Laterality Discrepancy Inference found: ");
547
- displayCodes(inference.lateralityIndication);
548
- }
549
- });
550
- });
551
- }
552
- } else {
553
- const error = radiologyInsightsResult.error;
554
- if (error) {
555
- console.log(error.code, ":", error.message);
538
+ for (const patientResult of radiologyInsightsResult?.result?.patientResults || []) {
539
+ for (const inference of patientResult?.inferences || []) {
540
+ if (inference.kind === "lateralityDiscrepancy") {
541
+ const lateralityDiscrepancyInference = inference as LateralityDiscrepancyInference;
542
+ console.log("Laterality Discrepancy Inference found: ");
543
+ displayCodes(lateralityDiscrepancyInference.lateralityIndication);
544
+ }
556
545
  }
557
546
  }
558
547
 
559
- function displayCodes(codeableConcept: any): void {
560
- codeableConcept.coding?.forEach((coding: any) => {
561
- if ("code" in coding) {
562
- console.log(" Coding: " + coding.code + ", " + coding.display + " (" + coding.system + "), type: " + coding.type);
563
- }
564
- });
548
+ function displayCodes(codeableConcept: CodeableConcept): void {
549
+ for (const coding of codeableConcept.coding || []) {
550
+ console.log(` Coding: ${coding.code}, ${coding.display} (${coding.system})`);
551
+ }
565
552
  }
566
-
567
553
  }
568
554
  ```
569
555
 
570
556
  ### Print out the Limited Order Discrepancy Inference ordertype with present Body Parts and present Body Part Measurements
571
557
 
572
- ```typescript
558
+ ```ts snippet:ReadmeSampleLimitedOrderDiscrepancy
559
+ import {
560
+ RadiologyInsightsJobOutput,
561
+ LimitedOrderDiscrepancyInference,
562
+ CodeableConcept,
563
+ } from "@azure-rest/health-insights-radiologyinsights";
564
+
573
565
  function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput): void {
574
- if (radiologyInsightsResult.status === "succeeded") {
575
- const results = radiologyInsightsResult.result;
576
- if (results !== undefined) {
577
- results.patientResults.forEach((patientResult: { inferences: any[]; }) => {
578
- if (patientResult.inferences) {
579
- patientResult.inferences.forEach((inference) => {
580
- if (inference.kind === "limitedOrderDiscrepancy") {
581
- console.log("Limited Order Discrepancy Inference found: ");
582
- if ("orderType" in inference) {
583
- console.log(" Ordertype: ");
584
- displayCodes(inference.orderType);
585
- };
586
-
587
- inference.presentBodyParts?.forEach((bodyparts: any) => {
588
- console.log(" Present Body Parts: ");
589
- displayCodes(bodyparts);
590
- });
591
-
592
- inference.presentBodyPartMeasurements?.forEach((bodymeasure: any) => {
593
- console.log(" Present Body Part Measurements: ");
594
- displayCodes(bodymeasure);
595
- });
596
- }
597
- });
566
+ for (const patientResult of radiologyInsightsResult?.result?.patientResults || []) {
567
+ for (const inference of patientResult?.inferences || []) {
568
+ if (inference.kind === "limitedOrderDiscrepancy") {
569
+ const limitedOrderDiscrepancyInference = inference as LimitedOrderDiscrepancyInference;
570
+
571
+ console.log("Limited Order Discrepancy Inference found: ");
572
+ console.log(" Ordertype: ");
573
+ displayCodes(limitedOrderDiscrepancyInference.orderType);
574
+
575
+ for (const presentBodyParts of limitedOrderDiscrepancyInference?.presentBodyParts || []) {
576
+ console.log(" Present Body Parts: ");
577
+ displayCodes(presentBodyParts);
598
578
  }
599
- });
600
- }
601
- } else {
602
- const error = radiologyInsightsResult.error;
603
- if (error) {
604
- console.log(error.code, ":", error.message);
605
- }
606
- }
607
579
 
608
- function displayCodes(codeableConcept: any): void {
609
- codeableConcept.coding?.forEach((coding: any) => {
610
- if ("code" in coding) {
611
- console.log(" Coding: " + coding.code + ", " + coding.display + " (" + coding.system + ")");
580
+ for (const presentBodymeasure of limitedOrderDiscrepancyInference?.presentBodyPartMeasurements ||
581
+ []) {
582
+ console.log(" Present Body Part Measurements: ");
583
+ displayCodes(presentBodymeasure);
584
+ }
612
585
  }
613
- });
586
+ }
614
587
  }
615
588
 
589
+ function displayCodes(codeableConcept: CodeableConcept): void {
590
+ for (const coding of codeableConcept.coding || []) {
591
+ console.log(` Coding: ${coding.code}, ${coding.display} (${coding.system})`);
592
+ }
593
+ }
616
594
  }
617
595
  ```
618
596
 
619
597
  ### Print out the Radiology Procedure Inference codes, Imaging Procedure codes and Order Procedure Codes and its description
620
598
 
621
- ```typescript
599
+ ```ts snippet:ReadmeSampleRadiologyProcedure
600
+ import {
601
+ RadiologyInsightsJobOutput,
602
+ RadiologyProcedureInference,
603
+ CodeableConcept,
604
+ ImagingProcedure,
605
+ } from "@azure-rest/health-insights-radiologyinsights";
606
+
622
607
  function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput): void {
623
- if (radiologyInsightsResult.status === "succeeded") {
624
- const results = radiologyInsightsResult.result;
625
- if (results !== undefined) {
626
- results.patientResults.forEach((patientResult: { inferences: any[]; }) => {
627
- if (patientResult.inferences) {
628
- patientResult.inferences.forEach((inference) => {
629
- if (inference.kind === "radiologyProcedure") {
630
- console.log("Radiology Procedure Inference found");
631
- inference.procedureCodes?.forEach((procedureCode: any) => {
632
- console.log(" Procedure Codes: ");
633
- displayCodes(procedureCode);
634
- });
635
-
636
- if ("imagingProcedures" in inference) {
637
- inference.imagingProcedures?.forEach((imagingProcedure: any) => {
638
- console.log(" Imaging Procedure Codes: ");
639
- displayImaging(imagingProcedure);
640
- });
641
- }
608
+ for (const patientResult of radiologyInsightsResult?.result?.patientResults || []) {
609
+ for (const inference of patientResult?.inferences || []) {
610
+ if (inference.kind === "radiologyProcedure") {
611
+ const radiologyProcedureInference = inference as RadiologyProcedureInference;
612
+ console.log("Radiology Procedure Inference found");
613
+
614
+ for (const procedureCode of radiologyProcedureInference?.procedureCodes || []) {
615
+ console.log(" Procedure Codes: ");
616
+ displayCodes(procedureCode);
617
+ }
642
618
 
643
- if ("orderedProcedure" in inference) {
644
- console.log(" Ordered procedures: ");
645
- if ("code" in inference.orderedProcedure) {
646
- displayCodes(inference.orderedProcedure.code);
647
- }
648
- }
619
+ for (const imagingProcedure of radiologyProcedureInference?.imagingProcedures || []) {
620
+ console.log(" Imaging Procedure Codes: ");
621
+ displayImaging(imagingProcedure);
622
+ }
649
623
 
650
- if ("description" in inference.orderedProcedure) {
651
- console.log(" Description: " + inference.orderedProcedure.description);
652
- }
653
- }
654
- });
624
+ if (radiologyProcedureInference.orderedProcedure) {
625
+ console.log(" Ordered Procedure Codes: ");
626
+ displayCodes(radiologyProcedureInference.orderedProcedure.code);
655
627
  }
656
- });
657
- }
658
- } else {
659
- const error = radiologyInsightsResult.error;
660
- if (error) {
661
- console.log(error.code, ":", error.message);
628
+
629
+ if (radiologyProcedureInference.orderedProcedure.description) {
630
+ console.log(
631
+ ` Description: ${radiologyProcedureInference.orderedProcedure.description}`,
632
+ );
633
+ }
634
+ }
662
635
  }
663
636
  }
664
637
 
665
- function displayCodes(codeableConcept: any): void {
666
- codeableConcept.coding?.forEach((coding: any) => {
667
- if ("code" in coding) {
668
- console.log(" Coding: " + coding.code + ", " + coding.display + " (" + coding.system + ")");
669
- }
670
- });
638
+ function displayCodes(codeableConcept: CodeableConcept): void {
639
+ for (const coding of codeableConcept.coding || []) {
640
+ console.log(` Coding: ${coding.code}, ${coding.display} (${coding.system})`);
641
+ }
671
642
  }
672
643
 
673
- function displayImaging(images: any): void {
644
+ function displayImaging(images: ImagingProcedure): void {
674
645
  console.log(" Modality Codes: ");
675
646
  displayCodes(images.modality);
676
647
  console.log(" Anatomy Codes: ");
677
648
  displayCodes(images.anatomy);
678
- if ("laterality" in images) {
649
+ if (images.laterality) {
679
650
  console.log(" Laterality Codes: ");
680
651
  displayCodes(images.laterality);
681
652
  }
682
- if ("contrast" in images) {
653
+ if (images.contrast) {
683
654
  console.log(" Contrast Codes: ");
684
655
  displayCodes(images.contrast.code);
685
656
  }
686
- if ("view" in images) {
657
+ if (images.view) {
687
658
  console.log(" View Codes: ");
688
659
  displayCodes(images.view.code);
689
660
  }
690
661
  }
691
-
692
662
  }
693
663
  ```
694
664
 
695
665
  ### Print out the Sex Mismatch Inference code
696
666
 
697
- ```typescript
667
+ ```ts snippet:ReadmeSampleSexMismatch
668
+ import {
669
+ RadiologyInsightsJobOutput,
670
+ SexMismatchInference,
671
+ CodeableConcept,
672
+ } from "@azure-rest/health-insights-radiologyinsights";
673
+
698
674
  function printResults(radiologyInsightsResult: RadiologyInsightsJobOutput): void {
699
- if (radiologyInsightsResult.status === "succeeded") {
700
- const results = radiologyInsightsResult.result;
701
- if (results !== undefined) {
702
- results.patientResults.forEach((patientResult: { inferences: any[]; }) => {
703
- if (patientResult.inferences) {
704
- patientResult.inferences.forEach((inference) => {
705
- if (inference.kind === "sexMismatch") {
706
- console.log("Sex Mismatch Inference found: ");
707
- if ("sexIndication" in inference) {
708
- displayCodes(inference.sexIndication)
709
- }
710
- }
711
- });
712
- }
713
- });
714
- }
715
- } else {
716
- const error = radiologyInsightsResult.error;
717
- if (error) {
718
- console.log(error.code, ":", error.message);
675
+ for (const patientResult of radiologyInsightsResult?.result?.patientResults || []) {
676
+ for (const inference of patientResult?.inferences || []) {
677
+ if (inference.kind === "sexMismatch") {
678
+ const sexMismatchInference = inference as SexMismatchInference;
679
+ console.log("Sex Mismatch Inference found: ");
680
+ displayCodes(sexMismatchInference.sexIndication);
681
+ }
719
682
  }
720
683
  }
721
684
 
722
- function displayCodes(codeableConcept: any): void {
723
- codeableConcept.coding?.forEach((coding: any) => {
724
- if ("code" in coding) {
725
- console.log(" Coding: " + coding.code + ", " + coding.display + " (" + coding.system + ")");
726
- }
727
- });
685
+ function displayCodes(codeableConcept: CodeableConcept): void {
686
+ for (const coding of codeableConcept.coding || []) {
687
+ console.log(` Coding: ${coding.code}, ${coding.display} (${coding.system})`);
688
+ }
728
689
  }
729
-
730
690
  }
731
-
732
691
  ```
692
+
733
693
  ## Using a Managed Identity require changes in adding the clientID of your managed identity as a const, adding it to you DefaultAzureCredential and add the Authorization Header
734
694
 
735
- ```typescript
736
- const clientID = process.env["MANAGED_IDENTITY_CLIENT_ID"] || "";
737
- ...
695
+ ```ts snippet:ReadmeSampleManagedIdentity
696
+ import { DefaultAzureCredential } from "@azure/identity";
697
+ import RadiologyInsightsRestClient from "@azure-rest/health-insights-radiologyinsights";
698
+
699
+ const managedIdentityClientId = "<client-id>";
700
+ const endpoint = "https://<your-endpoint>";
701
+ const credential = new DefaultAzureCredential({ managedIdentityClientId });
702
+ const client = RadiologyInsightsRestClient(endpoint, credential);
738
703
 
739
- //Create Managed Identity Credential
740
- const credential = new DefaultAzureCredential(
741
- clientID ? { managedIdentityClientId: clientID } : undefined,
742
- );
743
- const tokenResponse = await credential.getToken('https://cognitiveservices.azure.com/.default');
744
- logger.info(null, `Got token for Cognitive Services ${tokenResponse?.token}`);
704
+ const tokenResponse = await credential.getToken("https://cognitiveservices.azure.com/.default");
745
705
 
746
- const initialResponse = await client.path("/radiology-insights/jobs/{id}", jobID).put(radiologyInsightsParameter, {
706
+ const jobID = "jobId-123456789";
707
+ const radiologyInsightsJob = {
708
+ jobData: {
709
+ patients: [],
710
+ configuration: {},
711
+ },
712
+ };
713
+
714
+ // Create request body
715
+ const radiologyInsightsParameter = { body: radiologyInsightsJob };
716
+ // Create request body
717
+ const initialResponse = await client
718
+ .path("/radiology-insights/jobs/{id}", jobID)
719
+ .put(radiologyInsightsParameter, {
747
720
  headers: {
748
- 'Authorization': `Bearer ${tokenResponse?.token}`,
749
- 'Content-Type': 'application/json'
721
+ Authorization: `Bearer ${tokenResponse?.token}`,
722
+ "Content-Type": "application/json",
750
723
  },
751
724
  });
752
-
753
725
  ```
754
726
 
755
727
  ## Troubleshooting
@@ -758,8 +730,8 @@ const clientID = process.env["MANAGED_IDENTITY_CLIENT_ID"] || "";
758
730
 
759
731
  Enabling logging may help uncover useful information about failures. In order to see a log of HTTP requests and responses, set the `AZURE_LOG_LEVEL` environment variable to `info`. Alternatively, logging can be enabled at runtime by calling `setLogLevel` in the `@azure/logger`:
760
732
 
761
- ```javascript
762
- const { setLogLevel } = require("@azure/logger");
733
+ ```ts snippet:SetLogLevel
734
+ import { setLogLevel } from "@azure/logger";
763
735
 
764
736
  setLogLevel("info");
765
737
  ```
@@ -767,13 +739,14 @@ setLogLevel("info");
767
739
  For more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/core/logger).
768
740
 
769
741
  <!-- LINKS -->
742
+
770
743
  [health_insights]: https://learn.microsoft.com/azure/azure-health-insights/overview
771
744
  [radiology_insights_docs]: https://learn.microsoft.com/azure/azure-health-insights/radiology-insights/
772
745
  [Source code]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/health-insights-radiologyinsights-rest
773
746
  [Package (NPM)]: https://www.npmjs.com/package/@azure-rest/health-insights-radiologyinsights
774
747
  [API reference documentation]: https://learn.microsoft.com/rest/api/cognitiveservices/healthinsights/operation-groups?view=rest-cognitiveservices-healthinsights-2024-04-01
775
748
  [Product Information]: https://learn.microsoft.com/azure/azure-health-insights/radiology-insights/overview
776
- [Samples]:https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/health-insights-radiologyinsights-rest/samples/v1
749
+ [Samples]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/health-insights-radiologyinsights-rest/samples/v1
777
750
  [azure_identity]: https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/identity/identity
778
751
  [identity]: https://www.npmjs.com/package/@azure/identity
779
752
  [token_credential]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/identity/identity/samples/AzureIdentityExamples.md#authenticating-with-a-pre-fetched-access-token
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.50.0"
8
+ "packageVersion": "7.50.1"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@azure-rest/health-insights-radiologyinsights",
3
3
  "sdk-type": "client",
4
4
  "author": "Microsoft Corporation",
5
- "version": "1.0.0-alpha.20250224.1",
5
+ "version": "1.0.0-alpha.20250226.1",
6
6
  "description": "A generated SDK for Health Insights Radiology Insights Rest",
7
7
  "keywords": [
8
8
  "node",
@@ -53,7 +53,7 @@
53
53
  "unit-test": "npm run unit-test:node && npm run unit-test:browser",
54
54
  "unit-test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
55
55
  "unit-test:node": "dev-tool run test:vitest",
56
- "update-snippets": "echo skipped"
56
+ "update-snippets": "dev-tool run update-snippets"
57
57
  },
58
58
  "sideEffects": false,
59
59
  "autoPublish": false,
@@ -62,7 +62,7 @@
62
62
  "@azure/abort-controller": "^2.1.2",
63
63
  "@azure/core-auth": "^1.9.0",
64
64
  "@azure/core-lro": "^2.7.2",
65
- "@azure/core-rest-pipeline": "^1.18.0",
65
+ "@azure/core-rest-pipeline": "^1.19.0",
66
66
  "@azure/logger": "^1.1.4",
67
67
  "tslib": "^2.8.1"
68
68
  },
@@ -72,16 +72,16 @@
72
72
  "@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
73
73
  "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
74
74
  "@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
75
- "@azure/identity": "^4.0.1",
75
+ "@azure/identity": "^4.7.0",
76
76
  "@types/node": "^18.0.0",
77
- "@vitest/browser": "^3.0.3",
78
- "@vitest/coverage-istanbul": "^3.0.3",
77
+ "@vitest/browser": "^3.0.6",
78
+ "@vitest/coverage-istanbul": "^3.0.6",
79
79
  "autorest": "latest",
80
80
  "dotenv": "^16.0.0",
81
81
  "eslint": "^9.9.0",
82
- "playwright": "^1.49.0",
82
+ "playwright": "^1.50.1",
83
83
  "typescript": "~5.7.2",
84
- "vitest": "^3.0.3"
84
+ "vitest": "^3.0.6"
85
85
  },
86
86
  "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/health-insights-radiologyinsights-rest/README.md",
87
87
  "//metadata": {
@@ -103,6 +103,7 @@
103
103
  },
104
104
  "type": "module",
105
105
  "tshy": {
106
+ "project": "./tsconfig.src.json",
106
107
  "exports": {
107
108
  "./package.json": "./package.json",
108
109
  ".": "./src/index.ts"
@@ -115,8 +116,7 @@
115
116
  "browser",
116
117
  "react-native"
117
118
  ],
118
- "selfLink": false,
119
- "project": "./tsconfig.src.json"
119
+ "selfLink": false
120
120
  },
121
121
  "exports": {
122
122
  "./package.json": "./package.json",
@@ -138,5 +138,6 @@
138
138
  "default": "./dist/commonjs/index.js"
139
139
  }
140
140
  }
141
- }
141
+ },
142
+ "react-native": "./dist/react-native/index.js"
142
143
  }