From f58e07ae016e730b3798f6faf135e8ff4018fea3 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 22 Feb 2024 09:54:22 +0000 Subject: [PATCH] CodeGen from PR 27614 in Azure/azure-rest-api-specs Merge d426c060b51f2c7757dc5c84138ed6e3af5922e7 into 6bc6d5759767ea537c0b63b28d785e7e6ea0a90b --- common/config/rush/pnpm-lock.yaml | 55 +- rush.json | 11 +- .../.eslintrc.json | 11 + .../CHANGELOG.md | 3 + .../README.md | 59 + .../api-extractor.json | 31 + .../karma.conf.js | 133 ++ .../package.json | 117 ++ .../health-insights-radiologyinsights.api.md | 1278 +++++++++++++++++ .../src/azureHealthInsightsClient.ts | 48 + .../src/clientDefinitions.ts | 34 + .../src/index.ts | 16 + .../src/isUnexpected.ts | 118 ++ .../src/logger.ts | 5 + .../src/models.ts | 986 +++++++++++++ .../src/outputModels.ts | 1024 +++++++++++++ .../src/parameters.ts | 34 + .../src/pollingHelper.ts | 91 ++ .../src/responses.ts | 83 ++ .../src/serializeHelper.ts | 13 + .../test/public/sampleTest.spec.ts | 23 + .../test/public/utils/env.browser.ts | 2 + .../test/public/utils/env.ts | 6 + .../test/public/utils/recordedClient.ts | 29 + .../tsconfig.json | 11 + .../tsp-location.yaml | 7 + sdk/healthinsights/ci.yml | 5 +- 27 files changed, 4225 insertions(+), 8 deletions(-) create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/.eslintrc.json create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/CHANGELOG.md create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/README.md create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/api-extractor.json create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/karma.conf.js create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/package.json create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/review/health-insights-radiologyinsights.api.md create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/azureHealthInsightsClient.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/clientDefinitions.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/index.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/isUnexpected.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/logger.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/models.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/outputModels.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/parameters.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/pollingHelper.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/responses.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/serializeHelper.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/sampleTest.spec.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/env.browser.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/env.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/recordedClient.ts create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/tsconfig.json create mode 100644 sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/tsp-location.yaml diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 78be0d9bf3c4..6275a2cf7c5f 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -869,6 +869,9 @@ dependencies: '@rush-temp/health-insights-clinicalmatching': specifier: file:./projects/health-insights-clinicalmatching.tgz version: file:projects/health-insights-clinicalmatching.tgz + '@rush-temp/health-insights-radiologyinsights': + specifier: file:./projects/health-insights-radiologyinsights.tgz + version: file:projects/health-insights-radiologyinsights.tgz '@rush-temp/identity': specifier: file:./projects/identity.tgz version: file:projects/identity.tgz @@ -3593,13 +3596,13 @@ packages: /@types/jsonwebtoken@9.0.5: resolution: {integrity: sha512-VRLSGzik+Unrup6BsouBeHsf4d1hOEgYWTm/7Nmw1sXoN1+tRly/Gy/po3yeahnP4jfnQWWAhQAqcNfH7ngOkA==} dependencies: - '@types/node': 18.19.3 + '@types/node': 20.10.6 dev: false /@types/jws@3.2.9: resolution: {integrity: sha512-xAqC7PI7QSBY3fXV1f2pbcdbBFoR4dF8+lH2z6MfZQVcGe14twYVfjzJ3CHhLS1NHxE+DnjUR5xaHu2/U9GGaQ==} dependencies: - '@types/node': 18.19.3 + '@types/node': 20.10.6 dev: false /@types/linkify-it@3.0.5: @@ -3760,7 +3763,7 @@ packages: /@types/stoppable@1.1.3: resolution: {integrity: sha512-7wGKIBJGE4ZxFjk9NkjAxZMLlIXroETqP1FJCdoSvKmEznwmBxQFmTB1dsCkAvVcNemuSZM5qkkd9HE/NL2JTw==} dependencies: - '@types/node': 18.19.3 + '@types/node': 20.10.6 dev: false /@types/through@0.0.33: @@ -8674,7 +8677,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 18.19.3 + '@types/node': 20.10.6 long: 5.2.3 dev: false @@ -19822,6 +19825,50 @@ packages: - utf-8-validate dev: false + file:projects/health-insights-radiologyinsights.tgz: + resolution: {integrity: sha512-LzShHe5C9t4zZLNVcQO9e9ber1j7KcYsK7AtcQ4Wyy4IcmqqSb3u0cAGnOEddemfOrtdjBA81uLXBFl47FfGUg==, tarball: file:projects/health-insights-radiologyinsights.tgz} + name: '@rush-temp/health-insights-radiologyinsights' + version: 0.0.0 + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/identity': 4.0.1 + '@microsoft/api-extractor': 7.40.3(@types/node@18.19.3) + '@types/chai': 4.3.11 + '@types/mocha': 10.0.6 + '@types/node': 18.19.3 + autorest: 3.7.1 + c8: 8.0.1 + chai: 4.3.10 + cross-env: 7.0.3 + dotenv: 16.4.4 + eslint: 8.56.0 + esm: 3.2.25 + karma: 6.4.2(debug@4.3.4) + karma-chrome-launcher: 3.2.0 + karma-coverage: 2.2.1 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 2.1.2 + karma-junit-reporter: 2.0.1(karma@6.4.2) + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5(karma@6.4.2) + karma-source-map-support: 1.4.0 + karma-sourcemap-loader: 0.4.0 + mkdirp: 2.1.6 + mocha: 10.2.0 + rimraf: 5.0.5 + source-map-support: 0.5.21 + ts-node: 10.9.2(@types/node@18.19.3)(typescript@5.3.3) + tslib: 2.6.2 + typescript: 5.3.3 + transitivePeerDependencies: + - '@swc/core' + - '@swc/wasm' + - bufferutil + - debug + - supports-color + - utf-8-validate + dev: false + file:projects/identity-broker.tgz: resolution: {integrity: sha512-avm0f5Ct6j9Y+wNVLvc4w0VPfcVqMZ7xvh0mtxzDljGjibF37UEaDAKisEsKD33n0bWzb8phTDyQdrxF1ErTGQ==, tarball: file:projects/identity-broker.tgz} name: '@rush-temp/identity-broker' diff --git a/rush.json b/rush.json index 43428d5abb08..b2ef3694479a 100644 --- a/rush.json +++ b/rush.json @@ -510,7 +510,7 @@ "projectFolder": "sdk/communication/communication-job-router-rest", "versionPolicyName": "client" }, - { + { "packageName": "@azure-rest/communication-messages", "projectFolder": "sdk/communication/communication-messages-rest", "versionPolicyName": "client" @@ -638,7 +638,9 @@ { "packageName": "@azure/identity", "projectFolder": "sdk/identity/identity", - "decoupledLocalDependencies": ["@azure/keyvault-keys"], + "decoupledLocalDependencies": [ + "@azure/keyvault-keys" + ], "versionPolicyName": "client" }, { @@ -2180,6 +2182,11 @@ "packageName": "@azure/arm-springappdiscovery", "projectFolder": "sdk/springappdiscovery/arm-springappdiscovery", "versionPolicyName": "management" + }, + { + "packageName": "@azure-rest/health-insights-radiologyinsights", + "projectFolder": "sdk/healthinsights/azurehealthinsightsradiologyinsights-rest", + "versionPolicyName": "client" } ] } \ No newline at end of file diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/.eslintrc.json b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/.eslintrc.json new file mode 100644 index 000000000000..619797ac39b6 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/.eslintrc.json @@ -0,0 +1,11 @@ +{ + "plugins": ["@azure/azure-sdk"], + "extends": ["plugin:@azure/azure-sdk/azure-sdk-base"], + "rules": { + "@azure/azure-sdk/ts-modules-only-named": "warn", + "@azure/azure-sdk/ts-apiextractor-json-types": "warn", + "@azure/azure-sdk/ts-package-json-types": "warn", + "@azure/azure-sdk/ts-package-json-engine-is-present": "warn", + "tsdoc/syntax": "warn" + } +} diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/CHANGELOG.md b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/CHANGELOG.md new file mode 100644 index 000000000000..393b5a3ff91c --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0-beta.1 (2024-02-22) + + - Initial Release diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/README.md b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/README.md new file mode 100644 index 000000000000..86f48981850d --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/README.md @@ -0,0 +1,59 @@ +# AzureHealthInsights REST client library for JavaScript + +Azure AI Health Insights provides an API that serves insight models, specific for Health & Life Sciences, that perform analysis and provide inferences to be used by a human. + +**Please rely heavily on our [REST client docs](https://github.com/Azure/azure-sdk-for-js/blob/main/documentation/rest-clients.md) to use this library** + +Key links: + +- [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest) +- [Package (NPM)](https://www.npmjs.com/package/@azure-rest/health-insights-radiologyinsights) +- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure-rest/health-insights-radiologyinsights?view=azure-node-preview) +- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/samples) + +## Getting started + +### Currently supported environments + +- LTS versions of Node.js + +### Prerequisites + +- You must have an [Azure subscription](https://azure.microsoft.com/free/) to use this package. + +### Install the `@azure-rest/health-insights-radiologyinsights` package + +Install the AzureHealthInsights REST client REST client library for JavaScript with `npm`: + +```bash +npm install @azure-rest/health-insights-radiologyinsights +``` + +### Create and authenticate a `AzureHealthInsightsClient` + +To use an [Azure Active Directory (AAD) 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), +provide an instance of the desired credential type obtained from the +[@azure/identity](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) library. + +To authenticate with AAD, you must first `npm` install [`@azure/identity`](https://www.npmjs.com/package/@azure/identity) + +After setup, you can choose which type of [credential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#credentials) from `@azure/identity` to use. +As an example, [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential) +can be used to authenticate the client. + +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: +AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET + +## Troubleshooting + +### Logging + +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`: + +```javascript +const { setLogLevel } = require("@azure/logger"); + +setLogLevel("info"); +``` + +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). diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/api-extractor.json b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/api-extractor.json new file mode 100644 index 000000000000..a0ea6335e116 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/api-extractor.json @@ -0,0 +1,31 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "./types/src/index.d.ts", + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/health-insights-radiologyinsights.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } +} \ No newline at end of file diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/karma.conf.js b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/karma.conf.js new file mode 100644 index 000000000000..a9d5f1b5fc59 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/karma.conf.js @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +// https://github.com/karma-runner/karma-chrome-launcher +process.env.CHROME_BIN = require("puppeteer").executablePath(); +require("dotenv").config(); +const { relativeRecordingsPath } = require("@azure-tools/test-recorder"); +process.env.RECORDINGS_RELATIVE_PATH = relativeRecordingsPath(); + +module.exports = function (config) { + config.set({ + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: "./", + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ["source-map-support", "mocha"], + + plugins: [ + "karma-mocha", + "karma-mocha-reporter", + "karma-chrome-launcher", + "karma-firefox-launcher", + "karma-env-preprocessor", + "karma-coverage", + "karma-sourcemap-loader", + "karma-junit-reporter", + "karma-source-map-support", + ], + + // list of files / patterns to load in the browser + files: [ + "dist-test/index.browser.js", + { + pattern: "dist-test/index.browser.js.map", + type: "html", + included: false, + served: true, + }, + ], + + // list of files / patterns to exclude + exclude: [], + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + "**/*.js": ["sourcemap", "env"], + // IMPORTANT: COMMENT following line if you want to debug in your browsers!! + // Preprocess source file to calculate code coverage, however this will make source file unreadable + // "dist-test/index.js": ["coverage"] + }, + + envPreprocessor: [ + "TEST_MODE", + "ENDPOINT", + "AZURE_CLIENT_SECRET", + "AZURE_CLIENT_ID", + "AZURE_TENANT_ID", + "SUBSCRIPTION_ID", + "RECORDINGS_RELATIVE_PATH", + ], + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ["mocha", "coverage", "junit"], + + coverageReporter: { + // specify a common output directory + dir: "coverage-browser/", + reporters: [ + { type: "json", subdir: ".", file: "coverage.json" }, + { type: "lcovonly", subdir: ".", file: "lcov.info" }, + { type: "html", subdir: "html" }, + { type: "cobertura", subdir: ".", file: "cobertura-coverage.xml" }, + ], + }, + + junitReporter: { + outputDir: "", // results will be saved as $outputDir/$browserName.xml + outputFile: "test-results.browser.xml", // if included, results will be saved as $outputDir/$browserName/$outputFile + suite: "", // suite will become the package name attribute in xml testsuite element + useBrowserName: false, // add browser name to report and classes names + nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element + classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element + properties: {}, // key value pair of properties to add to the section of the report + }, + + // web server port + port: 9876, + + // enable / disable colors in the output (reporters and logs) + colors: true, + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG + logLevel: config.LOG_INFO, + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: false, + + // --no-sandbox allows our tests to run in Linux without having to change the system. + // --disable-web-security allows us to authenticate from the browser without having to write tests using interactive auth, which would be far more complex. + browsers: ["ChromeHeadlessNoSandbox"], + customLaunchers: { + ChromeHeadlessNoSandbox: { + base: "ChromeHeadless", + flags: ["--no-sandbox", "--disable-web-security"], + }, + }, + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: 1, + + browserNoActivityTimeout: 60000000, + browserDisconnectTimeout: 10000, + browserDisconnectTolerance: 3, + + client: { + mocha: { + // change Karma's debug.html to the mocha web reporter + reporter: "html", + timeout: "600000", + }, + }, + }); +}; diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/package.json b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/package.json new file mode 100644 index 000000000000..3e8d9a76b605 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/package.json @@ -0,0 +1,117 @@ +{ + "name": "@azure-rest/health-insights-radiologyinsights", + "sdk-type": "client", + "author": "Microsoft Corporation", + "version": "1.0.0-beta.1", + "description": "undefined", + "keywords": [ + "node", + "azure", + "cloud", + "typescript", + "browser", + "isomorphic" + ], + "license": "MIT", + "main": "dist/index.js", + "module": "./dist-esm/src/index.js", + "types": "./types/health-insights-radiologyinsights.d.ts", + "repository": "github:Azure/azure-sdk-for-js", + "bugs": { + "url": "https://github.com/Azure/azure-sdk-for-js/issues" + }, + "files": [ + "dist/", + "dist-esm/src/", + "types/health-insights-radiologyinsights.d.ts", + "README.md", + "LICENSE", + "review/*" + ], + "engines": { + "node": ">=18.0.0" + }, + "scripts": { + "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", + "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1", + "build:samples": "echo skipped.", + "build:test": "tsc -p . && dev-tool run bundle", + "build:debug": "tsc -p . && dev-tool run bundle && api-extractor run --local", + "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "execute:samples": "echo skipped", + "extract-api": "rimraf review && mkdirp ./review && api-extractor run --local", + "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"*.{js,json}\" \"test/**/*.ts\"", + "generate:client": "echo skipped", + "integration-test:browser": "dev-tool run test:browser", + "integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]", + "lint": "eslint package.json api-extractor.json src test --ext .ts", + "pack": "npm pack 2>&1", + "test:browser": "npm run clean && npm run build:test && npm run unit-test:browser", + "test:node": "npm run clean && npm run build:test && npm run unit-test:node", + "test": "npm run clean && npm run build:test && npm run unit-test", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 --exclude 'test/**/browser/*.spec.ts' 'test/**/*.spec.ts'", + "unit-test:browser": "dev-tool run test:browser", + "build": "npm run clean && tsc -p . && dev-tool run bundle && mkdirp ./review && api-extractor run --local" + }, + "sideEffects": false, + "autoPublish": false, + "dependencies": { + "@azure/core-auth": "^1.6.0", + "@azure-rest/core-client": "^1.2.0", + "@azure/core-rest-pipeline": "^1.14.0", + "@azure/logger": "^1.0.0", + "tslib": "^2.2.0", + "@azure/core-lro": "^2.5.4", + "@azure/abort-controller": "^1.0.0" + }, + "devDependencies": { + "@microsoft/api-extractor": "^7.31.1", + "autorest": "latest", + "@types/node": "^18.0.0", + "dotenv": "^16.0.0", + "eslint": "^8.0.0", + "mkdirp": "^2.1.2", + "rimraf": "^5.0.0", + "source-map-support": "^0.5.9", + "typescript": "~5.3.3", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure-tools/test-credential": "^1.0.0", + "@azure/identity": "^4.0.1", + "@azure-tools/test-recorder": "^3.0.0", + "mocha": "^10.0.0", + "esm": "^3.2.18", + "@types/mocha": "^10.0.0", + "cross-env": "^7.0.2", + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "karma-chrome-launcher": "^3.0.0", + "karma-coverage": "^2.0.0", + "karma-env-preprocessor": "^0.1.1", + "karma-firefox-launcher": "^2.1.2", + "karma-junit-reporter": "^2.0.1", + "karma-mocha-reporter": "^2.2.5", + "karma-mocha": "^2.0.1", + "karma-source-map-support": "~1.4.0", + "karma-sourcemap-loader": "^0.4.0", + "karma": "^6.2.0", + "c8": "^8.0.0", + "ts-node": "^10.0.0" + }, + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/README.md", + "//metadata": { + "constantPaths": [ + { + "path": "src/azureHealthInsightsClient.ts", + "prefix": "userAgentInfo" + } + ] + }, + "browser": { + "./dist-esm/test/public/utils/env.js": "./dist-esm/test/public/utils/env.browser.js" + } +} \ No newline at end of file diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/review/health-insights-radiologyinsights.api.md b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/review/health-insights-radiologyinsights.api.md new file mode 100644 index 000000000000..381c74b77685 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/review/health-insights-radiologyinsights.api.md @@ -0,0 +1,1278 @@ +## API Report File for "@azure-rest/health-insights-radiologyinsights" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Client } from '@azure-rest/core-client'; +import { ClientOptions } from '@azure-rest/core-client'; +import { CreateHttpPollerOptions } from '@azure/core-lro'; +import { ErrorModel } from '@azure-rest/core-client'; +import { HttpResponse } from '@azure-rest/core-client'; +import { KeyCredential } from '@azure/core-auth'; +import { OperationState } from '@azure/core-lro'; +import { RawHttpHeaders } from '@azure/core-rest-pipeline'; +import { RequestParameters } from '@azure-rest/core-client'; +import { SimplePollerLike } from '@azure/core-lro'; +import { StreamableMethod } from '@azure-rest/core-client'; + +// @public +export interface AgeMismatchInference extends RadiologyInsightsInferenceParent { + kind: "ageMismatch"; +} + +// @public +export interface AgeMismatchInferenceOutput extends RadiologyInsightsInferenceOutputParent { + kind: "ageMismatch"; +} + +// @public +export interface Annotation extends Element { + authorString?: string; + text: string; + time?: string; +} + +// @public +export interface AnnotationOutput extends ElementOutput { + authorString?: string; + text: string; + time?: string; +} + +// @public (undocumented) +export type AzureHealthInsightsClient = Client & { + path: Routes; +}; + +// @public (undocumented) +export function buildMultiCollection(items: string[], parameterName: string): string; + +// @public +export interface CodeableConcept extends Element { + coding?: Array; + text?: string; +} + +// @public +export interface CodeableConceptOutput extends ElementOutput { + coding?: Array; + text?: string; +} + +// @public +export interface Coding extends Element { + code?: string; + display?: string; + system?: string; + version?: string; +} + +// @public +export interface CodingOutput extends ElementOutput { + code?: string; + display?: string; + system?: string; + version?: string; +} + +// @public +export interface CompleteOrderDiscrepancyInference extends RadiologyInsightsInferenceParent { + kind: "completeOrderDiscrepancy"; + missingBodyPartMeasurements?: Array; + missingBodyParts?: Array; + orderType: CodeableConcept; +} + +// @public +export interface CompleteOrderDiscrepancyInferenceOutput extends RadiologyInsightsInferenceOutputParent { + kind: "completeOrderDiscrepancy"; + missingBodyPartMeasurements?: Array; + missingBodyParts?: Array; + orderType: CodeableConceptOutput; +} + +// @public +export interface Condition extends DomainResourceParent { + abatementAge?: Quantity; + abatementDateTime?: string; + abatementPeriod?: Period; + abatementRange?: Range; + abatementString?: string; + bodySite?: Array; + category?: Array; + clinicalStatus?: CodeableConcept; + code?: CodeableConcept; + encounter?: Reference; + identifier?: Array; + note?: Array; + onsetAge?: Quantity; + onsetDateTime?: string; + onsetPeriod?: Period; + onsetRange?: Range; + onsetString?: string; + recordedDate?: string; + resourceType: "Condition"; + severity?: CodeableConcept; + stage?: Array; + verificationStatus?: CodeableConcept; +} + +// @public +export interface ConditionOutput extends DomainResourceOutputParent { + abatementAge?: QuantityOutput; + abatementDateTime?: string; + abatementPeriod?: PeriodOutput; + abatementRange?: RangeOutput; + abatementString?: string; + bodySite?: Array; + category?: Array; + clinicalStatus?: CodeableConceptOutput; + code?: CodeableConceptOutput; + encounter?: ReferenceOutput; + identifier?: Array; + note?: Array; + onsetAge?: QuantityOutput; + onsetDateTime?: string; + onsetPeriod?: PeriodOutput; + onsetRange?: RangeOutput; + onsetString?: string; + recordedDate?: string; + resourceType: "Condition"; + severity?: CodeableConceptOutput; + stage?: Array; + verificationStatus?: CodeableConceptOutput; +} + +// @public +export interface ConditionStage { + summary?: CodeableConcept; + type?: CodeableConcept; +} + +// @public +export interface ConditionStageOutput { + summary?: CodeableConceptOutput; + type?: CodeableConceptOutput; +} + +// @public +export interface ContactDetail extends Element { + name?: string; + telecom?: Array; +} + +// @public +export interface ContactDetailOutput extends ElementOutput { + name?: string; + telecom?: Array; +} + +// @public +export interface ContactPoint { + period?: Period; + rank?: number; + system?: string; + use?: string; + value?: string; +} + +// @public +export interface ContactPointOutput { + period?: PeriodOutput; + rank?: number; + system?: string; + use?: string; + value?: string; +} + +// @public +function createClient(endpoint: string, credentials: KeyCredential, options?: ClientOptions): AzureHealthInsightsClient; +export default createClient; + +// @public (undocumented) +export interface CreateJob200Headers { + "operation-location": string; + "x-ms-request-id"?: string; +} + +// @public +export interface CreateJob200Response extends HttpResponse { + // (undocumented) + body: RadiologyInsightsJobOutput; + // (undocumented) + headers: RawHttpHeaders & CreateJob200Headers; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface CreateJob201Headers { + "operation-location": string; + "x-ms-request-id"?: string; +} + +// @public +export interface CreateJob201Response extends HttpResponse { + // (undocumented) + body: RadiologyInsightsJobOutput; + // (undocumented) + headers: RawHttpHeaders & CreateJob201Headers; + // (undocumented) + status: "201"; +} + +// @public (undocumented) +export interface CreateJobBodyParam { + body: RadiologyInsightsJob; +} + +// @public (undocumented) +export interface CreateJobDefaultHeaders { + "x-ms-error-code"?: string; + "x-ms-request-id"?: string; +} + +// @public (undocumented) +export interface CreateJobDefaultResponse extends HttpResponse { + // (undocumented) + body: HealthInsightsErrorResponseOutput; + // (undocumented) + headers: RawHttpHeaders & CreateJobDefaultHeaders; + // (undocumented) + status: string; +} + +// @public +export interface CreateJobLogicalResponse extends HttpResponse { + // (undocumented) + body: RadiologyInsightsJobOutput; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export type CreateJobParameters = CreateJobQueryParam & CreateJobBodyParam & RequestParameters; + +// @public (undocumented) +export interface CreateJobQueryParam { + // (undocumented) + queryParameters?: CreateJobQueryParamProperties; +} + +// @public (undocumented) +export interface CreateJobQueryParamProperties { + expand?: string; +} + +// @public +export interface CriticalResult { + description: string; + finding?: Observation; +} + +// @public +export interface CriticalResultInference extends RadiologyInsightsInferenceParent { + kind: "criticalResult"; + result: CriticalResult; +} + +// @public +export interface CriticalResultInferenceOutput extends RadiologyInsightsInferenceOutputParent { + kind: "criticalResult"; + result: CriticalResultOutput; +} + +// @public +export interface CriticalResultOutput { + description: string; + finding?: ObservationOutput; +} + +// @public +export interface DocumentAdministrativeMetadata { + encounterId?: string; + orderedProcedures?: Array; +} + +// @public +export interface DocumentAdministrativeMetadataOutput { + encounterId?: string; + orderedProcedures?: Array; +} + +// @public +export interface DocumentAuthor { + fullName?: string; + id?: string; +} + +// @public +export interface DocumentAuthorOutput { + fullName?: string; + id?: string; +} + +// @public +export interface DocumentContent { + sourceType: string; + value: string; +} + +// @public +export interface DocumentContentOutput { + sourceType: string; + value: string; +} + +// @public +export type DomainResource = DomainResourceParent | Observation | Condition | ResearchStudy; + +// @public +export type DomainResourceOutput = DomainResourceOutputParent | ObservationOutput | ConditionOutput | ResearchStudyOutput; + +// @public +export interface DomainResourceOutputParent extends ResourceOutput { + contained?: Array; + extension?: Array; + modifierExtension?: Array; + // (undocumented) + resourceType: string; + text?: NarrativeOutput; +} + +// @public +export interface DomainResourceParent extends Resource { + contained?: Array; + extension?: Array; + modifierExtension?: Array; + // (undocumented) + resourceType: string; + text?: Narrative; +} + +// @public +export interface Element { + extension?: Array; + id?: string; +} + +// @public +export interface ElementOutput { + extension?: Array; + id?: string; +} + +// @public +export interface ExpandQueryParameterOutput { +} + +// @public +export interface Extension extends Element { + url: string; + valueBoolean?: boolean; + valueCodeableConcept?: CodeableConcept; + valueDateTime?: string; + valueInteger?: number; + valuePeriod?: Period; + valueQuantity?: Quantity; + valueRange?: Range; + valueRatio?: Ratio; + valueReference?: Reference; + valueSampledData?: SampledData; + valueString?: string; + valueTime?: Date | string; +} + +// @public +export interface ExtensionOutput extends ElementOutput { + url: string; + valueBoolean?: boolean; + valueCodeableConcept?: CodeableConceptOutput; + valueDateTime?: string; + valueInteger?: number; + valuePeriod?: PeriodOutput; + valueQuantity?: QuantityOutput; + valueRange?: RangeOutput; + valueRatio?: RatioOutput; + valueReference?: ReferenceOutput; + valueSampledData?: SampledDataOutput; + valueString?: string; + valueTime?: string; +} + +// @public +export interface FindingInference extends RadiologyInsightsInferenceParent { + finding: Observation; + kind: "finding"; +} + +// @public +export interface FindingInferenceOutput extends RadiologyInsightsInferenceOutputParent { + finding: ObservationOutput; + kind: "finding"; +} + +// @public +export interface FindingOptions { + provideFocusedSentenceEvidence?: boolean; +} + +// @public +export interface FindingOptionsOutput { + provideFocusedSentenceEvidence?: boolean; +} + +// @public +export interface FollowupCommunicationInference extends RadiologyInsightsInferenceParent { + communicatedAt?: Date[] | string[]; + kind: "followupCommunication"; + recipient?: string[]; + wasAcknowledged: boolean; +} + +// @public +export interface FollowupCommunicationInferenceOutput extends RadiologyInsightsInferenceOutputParent { + communicatedAt?: string[]; + kind: "followupCommunication"; + recipient?: string[]; + wasAcknowledged: boolean; +} + +// @public +export interface FollowupRecommendationInference extends RadiologyInsightsInferenceParent { + effectiveAt?: string; + effectivePeriod?: Period; + findings?: Array; + isConditional: boolean; + isGuideline: boolean; + isHedging: boolean; + isOption: boolean; + kind: "followupRecommendation"; + recommendedProcedure: ProcedureRecommendation; +} + +// @public +export interface FollowupRecommendationInferenceOutput extends RadiologyInsightsInferenceOutputParent { + effectiveAt?: string; + effectivePeriod?: PeriodOutput; + findings?: Array; + isConditional: boolean; + isGuideline: boolean; + isHedging: boolean; + isOption: boolean; + kind: "followupRecommendation"; + recommendedProcedure: ProcedureRecommendationOutput; +} + +// @public +export interface FollowupRecommendationOptions { + includeRecommendationsInReferences?: boolean; + includeRecommendationsWithNoSpecifiedModality?: boolean; + provideFocusedSentenceEvidence?: boolean; +} + +// @public +export interface FollowupRecommendationOptionsOutput { + includeRecommendationsInReferences?: boolean; + includeRecommendationsWithNoSpecifiedModality?: boolean; + provideFocusedSentenceEvidence?: boolean; +} + +// @public +export interface GenericProcedureRecommendation extends ProcedureRecommendationParent { + code: CodeableConcept; + description?: string; + kind: "genericProcedureRecommendation"; +} + +// @public +export interface GenericProcedureRecommendationOutput extends ProcedureRecommendationOutputParent { + code: CodeableConceptOutput; + description?: string; + kind: "genericProcedureRecommendation"; +} + +// @public (undocumented) +export interface GetJob { + get(options?: GetJobParameters): StreamableMethod; + put(options: CreateJobParameters): StreamableMethod; +} + +// @public (undocumented) +export interface GetJob200Headers { + "retry-after"?: number; + "x-ms-request-id"?: string; +} + +// @public +export interface GetJob200Response extends HttpResponse { + // (undocumented) + body: RadiologyInsightsJobOutput; + // (undocumented) + headers: RawHttpHeaders & GetJob200Headers; + // (undocumented) + status: "200"; +} + +// @public (undocumented) +export interface GetJobDefaultHeaders { + "x-ms-error-code"?: string; + "x-ms-request-id"?: string; +} + +// @public (undocumented) +export interface GetJobDefaultResponse extends HttpResponse { + // (undocumented) + body: HealthInsightsErrorResponseOutput; + // (undocumented) + headers: RawHttpHeaders & GetJobDefaultHeaders; + // (undocumented) + status: string; +} + +// @public (undocumented) +export type GetJobParameters = GetJobQueryParam & RequestParameters; + +// @public (undocumented) +export interface GetJobQueryParam { + // (undocumented) + queryParameters?: GetJobQueryParamProperties; +} + +// @public (undocumented) +export interface GetJobQueryParamProperties { + expand?: string; +} + +// @public +export function getLongRunningPoller(client: Client, initialResponse: CreateJob200Response | CreateJob201Response | CreateJobDefaultResponse, options?: CreateHttpPollerOptions>): Promise, TResult>>; + +// @public +export interface HealthInsightsErrorResponseOutput { + error: ErrorModel; + requestId: { + response: RequestIdResponseHeaderOutput; + }; +} + +// @public +export interface Identifier extends Element { + assigner?: Reference; + period?: Period; + system?: string; + type?: CodeableConcept; + use?: string; + value?: string; +} + +// @public +export interface IdentifierOutput extends ElementOutput { + assigner?: ReferenceOutput; + period?: PeriodOutput; + system?: string; + type?: CodeableConceptOutput; + use?: string; + value?: string; +} + +// @public +export interface ImagingProcedure { + anatomy: CodeableConcept; + contrast?: RadiologyCodeWithTypes; + laterality?: CodeableConcept; + modality: CodeableConcept; + view?: RadiologyCodeWithTypes; +} + +// @public +export interface ImagingProcedureOutput { + anatomy: CodeableConceptOutput; + contrast?: RadiologyCodeWithTypesOutput; + laterality?: CodeableConceptOutput; + modality: CodeableConceptOutput; + view?: RadiologyCodeWithTypesOutput; +} + +// @public +export interface ImagingProcedureRecommendation extends ProcedureRecommendationParent { + imagingProcedures: Array; + kind: "imagingProcedureRecommendation"; + procedureCodes?: Array; +} + +// @public +export interface ImagingProcedureRecommendationOutput extends ProcedureRecommendationOutputParent { + imagingProcedures: Array; + kind: "imagingProcedureRecommendation"; + procedureCodes?: Array; +} + +// @public (undocumented) +export function isUnexpected(response: GetJob200Response | GetJobDefaultResponse): response is GetJobDefaultResponse; + +// @public (undocumented) +export function isUnexpected(response: CreateJob200Response | CreateJob201Response | CreateJobLogicalResponse | CreateJobDefaultResponse): response is CreateJobDefaultResponse; + +// @public +export interface LateralityDiscrepancyInference extends RadiologyInsightsInferenceParent { + discrepancyType: string; + kind: "lateralityDiscrepancy"; + lateralityIndication?: CodeableConcept; +} + +// @public +export interface LateralityDiscrepancyInferenceOutput extends RadiologyInsightsInferenceOutputParent { + discrepancyType: string; + kind: "lateralityDiscrepancy"; + lateralityIndication?: CodeableConceptOutput; +} + +// @public +export interface LimitedOrderDiscrepancyInference extends RadiologyInsightsInferenceParent { + kind: "limitedOrderDiscrepancy"; + orderType: CodeableConcept; + presentBodyPartMeasurements?: Array; + presentBodyParts?: Array; +} + +// @public +export interface LimitedOrderDiscrepancyInferenceOutput extends RadiologyInsightsInferenceOutputParent { + kind: "limitedOrderDiscrepancy"; + orderType: CodeableConceptOutput; + presentBodyPartMeasurements?: Array; + presentBodyParts?: Array; +} + +// @public +export interface Meta { + lastUpdated?: string; + profile?: string[]; + security?: Array; + source?: string; + tag?: Array; + versionId?: string; +} + +// @public +export interface MetaOutput { + lastUpdated?: string; + profile?: string[]; + security?: Array; + source?: string; + tag?: Array; + versionId?: string; +} + +// @public +export interface Narrative extends Element { + div: string; + status: string; +} + +// @public +export interface NarrativeOutput extends ElementOutput { + div: string; + status: string; +} + +// @public +export interface Observation extends DomainResourceParent { + bodySite?: CodeableConcept; + category?: Array; + code: CodeableConcept; + component?: Array; + dataAbsentReason?: CodeableConcept; + derivedFrom?: Array; + effectiveDateTime?: string; + effectiveInstant?: string; + effectivePeriod?: Period; + encounter?: Reference; + hasMember?: Array; + identifier?: Array; + interpretation?: Array; + issued?: string; + method?: CodeableConcept; + note?: Array; + referenceRange?: Array; + resourceType: "Observation"; + status: string; + subject?: Reference; + valueBoolean?: boolean; + valueCodeableConcept?: CodeableConcept; + valueDateTime?: string; + valueInteger?: number; + valuePeriod?: Period; + valueQuantity?: Quantity; + valueRange?: Range; + valueRatio?: Ratio; + valueSampledData?: SampledData; + valueString?: string; + valueTime?: Date | string; +} + +// @public +export interface ObservationComponent extends Element { + code: CodeableConcept; + dataAbsentReason?: CodeableConcept; + interpretation?: Array; + referenceRange?: Array; + valueBoolean?: boolean; + valueCodeableConcept?: CodeableConcept; + valueDateTime?: string; + valueInteger?: number; + valuePeriod?: Period; + valueQuantity?: Quantity; + valueRange?: Range; + valueRatio?: Ratio; + valueReference?: Reference; + valueSampledData?: SampledData; + valueString?: string; + valueTime?: Date | string; +} + +// @public +export interface ObservationComponentOutput extends ElementOutput { + code: CodeableConceptOutput; + dataAbsentReason?: CodeableConceptOutput; + interpretation?: Array; + referenceRange?: Array; + valueBoolean?: boolean; + valueCodeableConcept?: CodeableConceptOutput; + valueDateTime?: string; + valueInteger?: number; + valuePeriod?: PeriodOutput; + valueQuantity?: QuantityOutput; + valueRange?: RangeOutput; + valueRatio?: RatioOutput; + valueReference?: ReferenceOutput; + valueSampledData?: SampledDataOutput; + valueString?: string; + valueTime?: string; +} + +// @public +export interface ObservationOutput extends DomainResourceOutputParent { + bodySite?: CodeableConceptOutput; + category?: Array; + code: CodeableConceptOutput; + component?: Array; + dataAbsentReason?: CodeableConceptOutput; + derivedFrom?: Array; + effectiveDateTime?: string; + effectiveInstant?: string; + effectivePeriod?: PeriodOutput; + encounter?: ReferenceOutput; + hasMember?: Array; + identifier?: Array; + interpretation?: Array; + issued?: string; + method?: CodeableConceptOutput; + note?: Array; + referenceRange?: Array; + resourceType: "Observation"; + status: string; + subject?: ReferenceOutput; + valueBoolean?: boolean; + valueCodeableConcept?: CodeableConceptOutput; + valueDateTime?: string; + valueInteger?: number; + valuePeriod?: PeriodOutput; + valueQuantity?: QuantityOutput; + valueRange?: RangeOutput; + valueRatio?: RatioOutput; + valueSampledData?: SampledDataOutput; + valueString?: string; + valueTime?: string; +} + +// @public +export interface ObservationReferenceRange { + age?: Range; + appliesTo?: Array; + high?: Quantity; + low?: Quantity; + text?: string; + type?: CodeableConcept; +} + +// @public +export interface ObservationReferenceRangeOutput { + age?: RangeOutput; + appliesTo?: Array; + high?: QuantityOutput; + low?: QuantityOutput; + text?: string; + type?: CodeableConceptOutput; +} + +// @public +export interface OrderedProcedure { + code?: CodeableConcept; + description?: string; + extension?: Array; +} + +// @public +export interface OrderedProcedureOutput { + code?: CodeableConceptOutput; + description?: string; + extension?: Array; +} + +// @public +export interface PatientDetails { + birthDate?: Date | string; + clinicalInfo?: Array; + sex?: string; +} + +// @public +export interface PatientDetailsOutput { + birthDate?: string; + clinicalInfo?: Array; + sex?: string; +} + +// @public +export interface PatientDocument { + administrativeMetadata?: DocumentAdministrativeMetadata; + authors?: Array; + clinicalType?: string; + content: DocumentContent; + createdAt?: Date | string; + id: string; + language?: string; + specialtyType?: string; + type: string; +} + +// @public +export interface PatientDocumentOutput { + administrativeMetadata?: DocumentAdministrativeMetadataOutput; + authors?: Array; + clinicalType?: string; + content: DocumentContentOutput; + createdAt?: string; + id: string; + language?: string; + specialtyType?: string; + type: string; +} + +// @public +export interface PatientEncounter { + class?: string; + id: string; + period?: TimePeriod; +} + +// @public +export interface PatientEncounterOutput { + class?: string; + id: string; + period?: TimePeriodOutput; +} + +// @public +export interface PatientRecord { + details?: PatientDetails; + encounters?: Array; + id: string; + patientDocuments?: Array; +} + +// @public +export interface PatientRecordOutput { + details?: PatientDetailsOutput; + encounters?: Array; + id: string; + patientDocuments?: Array; +} + +// @public +export interface Period extends Element { + end?: string; + start?: string; +} + +// @public +export interface PeriodOutput extends ElementOutput { + end?: string; + start?: string; +} + +// @public +export type ProcedureRecommendation = ProcedureRecommendationParent | GenericProcedureRecommendation | ImagingProcedureRecommendation; + +// @public +export type ProcedureRecommendationOutput = ProcedureRecommendationOutputParent | GenericProcedureRecommendationOutput | ImagingProcedureRecommendationOutput; + +// @public +export interface ProcedureRecommendationOutputParent { + extension?: Array; + // (undocumented) + kind: string; +} + +// @public +export interface ProcedureRecommendationParent { + extension?: Array; + // (undocumented) + kind: string; +} + +// @public +export interface Quantity extends Element { + code?: string; + comparator?: string; + system?: string; + unit?: string; + value?: number; +} + +// @public +export interface QuantityOutput extends ElementOutput { + code?: string; + comparator?: string; + system?: string; + unit?: string; + value?: number; +} + +// @public +export interface RadiologyCodeWithTypes { + code: CodeableConcept; + types: Array; +} + +// @public +export interface RadiologyCodeWithTypesOutput { + code: CodeableConceptOutput; + types: Array; +} + +// @public +export interface RadiologyInsightsData { + configuration?: RadiologyInsightsModelConfiguration; + patients: Array; +} + +// @public +export interface RadiologyInsightsDataOutput { + configuration?: RadiologyInsightsModelConfigurationOutput; + patients: Array; +} + +// @public +export type RadiologyInsightsInference = RadiologyInsightsInferenceParent | AgeMismatchInference | SexMismatchInference | LateralityDiscrepancyInference | CompleteOrderDiscrepancyInference | LimitedOrderDiscrepancyInference | FindingInference | CriticalResultInference | RadiologyProcedureInference | FollowupRecommendationInference | FollowupCommunicationInference; + +// @public +export interface RadiologyInsightsInferenceOptions { + findingOptions?: FindingOptions; + followupRecommendationOptions?: FollowupRecommendationOptions; +} + +// @public +export interface RadiologyInsightsInferenceOptionsOutput { + findingOptions?: FindingOptionsOutput; + followupRecommendationOptions?: FollowupRecommendationOptionsOutput; +} + +// @public +export type RadiologyInsightsInferenceOutput = RadiologyInsightsInferenceOutputParent | AgeMismatchInferenceOutput | SexMismatchInferenceOutput | LateralityDiscrepancyInferenceOutput | CompleteOrderDiscrepancyInferenceOutput | LimitedOrderDiscrepancyInferenceOutput | FindingInferenceOutput | CriticalResultInferenceOutput | RadiologyProcedureInferenceOutput | FollowupRecommendationInferenceOutput | FollowupCommunicationInferenceOutput; + +// @public +export interface RadiologyInsightsInferenceOutputParent { + extension?: Array; + // (undocumented) + kind: string; +} + +// @public +export interface RadiologyInsightsInferenceParent { + extension?: Array; + // (undocumented) + kind: string; +} + +// @public +export interface RadiologyInsightsInferenceResult { + modelVersion: string; + patientResults: Array; +} + +// @public +export interface RadiologyInsightsInferenceResultOutput { + modelVersion: string; + patientResults: Array; +} + +// @public +export interface RadiologyInsightsJob { + jobData?: RadiologyInsightsData; +} + +// @public +export interface RadiologyInsightsJobOutput { + readonly createdAt?: string; + readonly error?: ErrorModel; + readonly expiresAt?: string; + jobData?: RadiologyInsightsDataOutput; + readonly result?: RadiologyInsightsInferenceResultOutput; + readonly status: string; + readonly updatedAt?: string; +} + +// @public +export interface RadiologyInsightsModelConfiguration { + includeEvidence?: boolean; + inferenceOptions?: RadiologyInsightsInferenceOptions; + inferenceTypes?: string[]; + locale?: string; + verbose?: boolean; +} + +// @public +export interface RadiologyInsightsModelConfigurationOutput { + includeEvidence?: boolean; + inferenceOptions?: RadiologyInsightsInferenceOptionsOutput; + inferenceTypes?: string[]; + locale?: string; + verbose?: boolean; +} + +// @public +export interface RadiologyInsightsPatientResult { + inferences: Array; + patientId: string; +} + +// @public +export interface RadiologyInsightsPatientResultOutput { + inferences: Array; + patientId: string; +} + +// @public +export interface RadiologyProcedureInference extends RadiologyInsightsInferenceParent { + imagingProcedures: Array; + kind: "radiologyProcedure"; + orderedProcedure: OrderedProcedure; + procedureCodes?: Array; +} + +// @public +export interface RadiologyProcedureInferenceOutput extends RadiologyInsightsInferenceOutputParent { + imagingProcedures: Array; + kind: "radiologyProcedure"; + orderedProcedure: OrderedProcedureOutput; + procedureCodes?: Array; +} + +// @public +export interface Range extends Element { + high?: Quantity; + low?: Quantity; +} + +// @public +export interface RangeOutput extends ElementOutput { + high?: QuantityOutput; + low?: QuantityOutput; +} + +// @public +export interface Ratio extends Element { + denominator?: Quantity; + numerator?: Quantity; +} + +// @public +export interface RatioOutput extends ElementOutput { + denominator?: QuantityOutput; + numerator?: QuantityOutput; +} + +// @public +export interface RecommendationFinding { + criticalFinding?: CriticalResult; + extension?: Array; + finding?: Observation; + recommendationFindingStatus: string; +} + +// @public +export interface RecommendationFindingOutput { + criticalFinding?: CriticalResultOutput; + extension?: Array; + finding?: ObservationOutput; + recommendationFindingStatus: string; +} + +// @public +export interface Reference extends Element { + display?: string; + identifier?: Identifier; + reference?: string; + type?: string; +} + +// @public +export interface ReferenceOutput extends ElementOutput { + display?: string; + identifier?: IdentifierOutput; + reference?: string; + type?: string; +} + +// @public +export interface RequestIdResponseHeaderOutput { +} + +// @public +export interface ResearchStudy extends DomainResourceParent { + arm?: { + name: string; + type?: CodeableConcept; + description?: string; + }[]; + category?: Array; + condition?: Array; + contact?: Array; + description?: string; + enrollment?: Array; + focus?: Array; + identifier?: Array; + keyword?: Array; + location?: Array; + note?: Array; + objective?: { + name: string; + type?: CodeableConcept; + }[]; + partOf?: Array; + period?: Period; + phase?: CodeableConcept; + primaryPurposeType?: CodeableConcept; + principalInvestigator?: Reference; + protocol?: Array; + reasonStopped?: CodeableConcept; + resourceType: "ResearchStudy"; + site?: Array; + sponsor?: Reference; + status: string; + title?: string; +} + +// @public +export interface ResearchStudyOutput extends DomainResourceOutputParent { + arm?: { + name: string; + type?: CodeableConceptOutput; + description?: string; + }[]; + category?: Array; + condition?: Array; + contact?: Array; + description?: string; + enrollment?: Array; + focus?: Array; + identifier?: Array; + keyword?: Array; + location?: Array; + note?: Array; + objective?: { + name: string; + type?: CodeableConceptOutput; + }[]; + partOf?: Array; + period?: PeriodOutput; + phase?: CodeableConceptOutput; + primaryPurposeType?: CodeableConceptOutput; + principalInvestigator?: ReferenceOutput; + protocol?: Array; + reasonStopped?: CodeableConceptOutput; + resourceType: "ResearchStudy"; + site?: Array; + sponsor?: ReferenceOutput; + status: string; + title?: string; +} + +// @public +export interface Resource extends Record { + id?: string; + implicitRules?: string; + language?: string; + meta?: Meta; + resourceType: string; +} + +// @public +export interface ResourceOutput extends Record { + id?: string; + implicitRules?: string; + language?: string; + meta?: MetaOutput; + resourceType: string; +} + +// @public +export interface RetryAfterHeaderOutput { +} + +// @public (undocumented) +export interface Routes { + (path: "/radiology-insights/jobs/{id}", id: string): GetJob; +} + +// @public +export interface SampledData extends Element { + data?: string; + dimensions: number; + factor?: number; + lowerLimit?: number; + origin: Quantity; + period: number; + upperLimit?: number; +} + +// @public +export interface SampledDataOutput extends ElementOutput { + data?: string; + dimensions: number; + factor?: number; + lowerLimit?: number; + origin: QuantityOutput; + period: number; + upperLimit?: number; +} + +// @public +export interface SexMismatchInference extends RadiologyInsightsInferenceParent { + kind: "sexMismatch"; + sexIndication: CodeableConcept; +} + +// @public +export interface SexMismatchInferenceOutput extends RadiologyInsightsInferenceOutputParent { + kind: "sexMismatch"; + sexIndication: CodeableConceptOutput; +} + +// @public +export interface TimePeriod { + end?: Date | string; + start?: Date | string; +} + +// @public +export interface TimePeriodOutput { + end?: string; + start?: string; +} + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/azureHealthInsightsClient.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/azureHealthInsightsClient.ts new file mode 100644 index 000000000000..25976c0328d1 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/azureHealthInsightsClient.ts @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { getClient, ClientOptions } from "@azure-rest/core-client"; +import { logger } from "./logger"; +import { KeyCredential } from "@azure/core-auth"; +import { AzureHealthInsightsClient } from "./clientDefinitions"; + +/** + * Initialize a new instance of `AzureHealthInsightsClient` + * @param endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com). + * @param credentials - uniquely identify client credential + * @param options - the parameter for all optional parameters + */ +export default function createClient( + endpoint: string, + credentials: KeyCredential, + options: ClientOptions = {}, +): AzureHealthInsightsClient { + const baseUrl = options.baseUrl ?? `${endpoint}/health-insights`; + options.apiVersion = options.apiVersion ?? "2024-04-01"; + const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0-beta.1`; + const userAgentPrefix = + options.userAgentOptions && options.userAgentOptions.userAgentPrefix + ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}` + : `${userAgentInfo}`; + options = { + ...options, + userAgentOptions: { + userAgentPrefix, + }, + loggingOptions: { + logger: options.loggingOptions?.logger ?? logger.info, + }, + credentials: { + apiKeyHeaderName: + options.credentials?.apiKeyHeaderName ?? "Ocp-Apim-Subscription-Key", + }, + }; + + const client = getClient( + baseUrl, + credentials, + options, + ) as AzureHealthInsightsClient; + + return client; +} diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/clientDefinitions.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/clientDefinitions.ts new file mode 100644 index 000000000000..72bc3e56bd7d --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/clientDefinitions.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { GetJobParameters, CreateJobParameters } from "./parameters"; +import { + GetJob200Response, + GetJobDefaultResponse, + CreateJob200Response, + CreateJob201Response, + CreateJobDefaultResponse, +} from "./responses"; +import { Client, StreamableMethod } from "@azure-rest/core-client"; + +export interface GetJob { + /** Gets the status and details of the Radiology Insights job. */ + get( + options?: GetJobParameters, + ): StreamableMethod; + /** Creates a Radiology Insights job with the given request body. */ + put( + options: CreateJobParameters, + ): StreamableMethod< + CreateJob200Response | CreateJob201Response | CreateJobDefaultResponse + >; +} + +export interface Routes { + /** Resource for '/radiology-insights/jobs/\{id\}' has methods for the following verbs: get, put */ + (path: "/radiology-insights/jobs/{id}", id: string): GetJob; +} + +export type AzureHealthInsightsClient = Client & { + path: Routes; +}; diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/index.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/index.ts new file mode 100644 index 000000000000..239205b65285 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/index.ts @@ -0,0 +1,16 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import AzureHealthInsightsClient from "./azureHealthInsightsClient"; + +export * from "./azureHealthInsightsClient"; +export * from "./parameters"; +export * from "./responses"; +export * from "./clientDefinitions"; +export * from "./isUnexpected"; +export * from "./models"; +export * from "./outputModels"; +export * from "./pollingHelper"; +export * from "./serializeHelper"; + +export default AzureHealthInsightsClient; diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/isUnexpected.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/isUnexpected.ts new file mode 100644 index 000000000000..32d0ba07e508 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/isUnexpected.ts @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { + GetJob200Response, + GetJobDefaultResponse, + CreateJob200Response, + CreateJob201Response, + CreateJobLogicalResponse, + CreateJobDefaultResponse, +} from "./responses"; + +const responseMap: Record = { + "GET /radiology-insights/jobs/{id}": ["200"], + "PUT /radiology-insights/jobs/{id}": ["200", "201"], +}; + +export function isUnexpected( + response: GetJob200Response | GetJobDefaultResponse, +): response is GetJobDefaultResponse; +export function isUnexpected( + response: + | CreateJob200Response + | CreateJob201Response + | CreateJobLogicalResponse + | CreateJobDefaultResponse, +): response is CreateJobDefaultResponse; +export function isUnexpected( + response: + | GetJob200Response + | GetJobDefaultResponse + | CreateJob200Response + | CreateJob201Response + | CreateJobLogicalResponse + | CreateJobDefaultResponse, +): response is GetJobDefaultResponse | CreateJobDefaultResponse { + const lroOriginal = response.headers["x-ms-original-url"]; + const url = new URL(lroOriginal ?? response.request.url); + const method = response.request.method; + let pathDetails = responseMap[`${method} ${url.pathname}`]; + if (!pathDetails) { + pathDetails = getParametrizedPathSuccess(method, url.pathname); + } + return !pathDetails.includes(response.status); +} + +function getParametrizedPathSuccess(method: string, path: string): string[] { + const pathParts = path.split("/"); + + // Traverse list to match the longest candidate + // matchedLen: the length of candidate path + // matchedValue: the matched status code array + let matchedLen = -1, + matchedValue: string[] = []; + + // Iterate the responseMap to find a match + for (const [key, value] of Object.entries(responseMap)) { + // Extracting the path from the map key which is in format + // GET /path/foo + if (!key.startsWith(method)) { + continue; + } + const candidatePath = getPathFromMapKey(key); + // Get each part of the url path + const candidateParts = candidatePath.split("/"); + + // track if we have found a match to return the values found. + let found = true; + for ( + let i = candidateParts.length - 1, j = pathParts.length - 1; + i >= 1 && j >= 1; + i--, j-- + ) { + if ( + candidateParts[i]?.startsWith("{") && + candidateParts[i]?.indexOf("}") !== -1 + ) { + const start = candidateParts[i]!.indexOf("}") + 1, + end = candidateParts[i]?.length; + // If the current part of the candidate is a "template" part + // Try to use the suffix of pattern to match the path + // {guid} ==> $ + // {guid}:export ==> :export$ + const isMatched = new RegExp( + `${candidateParts[i]?.slice(start, end)}`, + ).test(pathParts[j] || ""); + + if (!isMatched) { + found = false; + break; + } + continue; + } + + // If the candidate part is not a template and + // the parts don't match mark the candidate as not found + // to move on with the next candidate path. + if (candidateParts[i] !== pathParts[j]) { + found = false; + break; + } + } + + // We finished evaluating the current candidate parts + // Update the matched value if and only if we found the longer pattern + if (found && candidatePath.length > matchedLen) { + matchedLen = candidatePath.length; + matchedValue = value; + } + } + + return matchedValue; +} + +function getPathFromMapKey(mapKey: string): string { + const pathStart = mapKey.indexOf("/"); + return mapKey.slice(pathStart); +} diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/logger.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/logger.ts new file mode 100644 index 000000000000..186ae367a1c1 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/logger.ts @@ -0,0 +1,5 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { createClientLogger } from "@azure/logger"; +export const logger = createClientLogger("health-insights-radiologyinsights"); diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/models.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/models.ts new file mode 100644 index 000000000000..7f84942cbe4c --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/models.ts @@ -0,0 +1,986 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** Contains the list of patients, and configuration data. */ +export interface RadiologyInsightsData { + /** The list of patients, including their clinical information and data. */ + patients: Array; + /** Configuration affecting the Radiology Insights model's inference. */ + configuration?: RadiologyInsightsModelConfiguration; +} + +/** A patient record, including their clinical information and data. */ +export interface PatientRecord { + /** A given identifier for the patient. Has to be unique across all patients in a single request. */ + id: string; + /** Patient structured information, including demographics and known structured clinical information. */ + details?: PatientDetails; + /** Patient encounters/visits. */ + encounters?: Array; + /** Patient unstructured clinical data, given as documents. */ + patientDocuments?: Array; +} + +/** Patient structured information, including demographics and known structured clinical information. */ +export interface PatientDetails { + /** + * The patient's sex. + * + * Possible values: "female", "male", "unspecified" + */ + sex?: string; + /** The patient's date of birth. */ + birthDate?: Date | string; + /** Known clinical information for the patient, structured. */ + clinicalInfo?: Array; +} + +/** + * Resource is the ancestor of DomainResource from which most resources are derived. Bundle, Parameters, and Binary extend Resource directly. + * Based on [FHIR Resource](https://www.hl7.org/fhir/r4/resource.html + */ +export interface Resource extends Record { + /** The type of resource */ + resourceType: string; + /** Resource Id */ + id?: string; + /** Metadata about the resource */ + meta?: Meta; + /** A set of rules under which this content was created */ + implicitRules?: string; + /** Language of the resource content */ + language?: string; +} + +/** + * Metadata about a resource + * Based on [FHIR Meta](https://www.hl7.org/fhir/R4/resource.html#Meta) + */ +export interface Meta { + /** The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted. */ + versionId?: string; + /** When the resource last changed - e.g. when the version changed. */ + lastUpdated?: string; + /** A uri that identifies the source system of the resource. This provides a minimal amount of Provenance information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc. */ + source?: string; + /** A list of profiles (references to [StructureDefinition](https://www.hl7.org/fhir/structuredefinition.html) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](https://www.hl7.org/fhir/structuredefinition-definitions.html#StructureDefinition.url). */ + profile?: string[]; + /** Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure. */ + security?: Array; + /** Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource. */ + tag?: Array; +} + +/** + * A Coding is a representation of a defined concept using a symbol from a defined "code system". + * Based on [FHIR Coding](https://www.hl7.org/fhir/R4/datatypes.html#Coding) + */ +export interface Coding extends Element { + /** Identity of the terminology system */ + system?: string; + /** Version of the system - if relevant */ + version?: string; + /** Symbol in syntax defined by the system */ + code?: string; + /** Representation defined by the system */ + display?: string; +} + +/** + * The base definition for all elements contained inside a resource. + * Based on [FHIR Element](https://www.hl7.org/fhir/R4/element.html) + */ +export interface Element { + /** Unique id for inter-element referencing */ + id?: string; + /** Additional Content defined by implementations */ + extension?: Array; +} + +/** + * Base for all elements + * Based on [FHIR Element](https://www.hl7.org/fhir/datatypes.html#Element) + */ +export interface Extension extends Element { + /** Source of the definition for the extension code - a logical name or a URL. */ + url: string; + /** Value as Quantity */ + valueQuantity?: Quantity; + /** Value as CodeableConcept */ + valueCodeableConcept?: CodeableConcept; + /** Value as string */ + valueString?: string; + /** Value as boolean */ + valueBoolean?: boolean; + /** Value as integer */ + valueInteger?: number; + /** Value as Range. */ + valueRange?: Range; + /** Value as Ratio. */ + valueRatio?: Ratio; + /** Value as SampledData. */ + valueSampledData?: SampledData; + /** Value as time (hh:mm:ss) */ + valueTime?: Date | string; + /** Value as dateTime. */ + valueDateTime?: string; + /** Value as Period. */ + valuePeriod?: Period; + /** Value as reference. */ + valueReference?: Reference; +} + +/** + * A measured or measurable amount + * Based on [FHIR Quantity](https://www.hl7.org/fhir/R4/datatypes.html#Quantity) + */ +export interface Quantity extends Element { + /** Numerical value (with implicit precision) */ + value?: number; + /** < | <= | >= | > - how to understand the value */ + comparator?: string; + /** Unit representation */ + unit?: string; + /** System that defines coded unit form */ + system?: string; + /** Coded form of the unit */ + code?: string; +} + +/** + * Concept - reference to a terminology or just text + * Based on [FHIR CodeableConcept](https://www.hl7.org/fhir/R4/datatypes.html#CodeableConcept) + */ +export interface CodeableConcept extends Element { + /** Code defined by a terminology system */ + coding?: Array; + /** Plain text representation of the concept */ + text?: string; +} + +/** + * A set of ordered Quantities defined by a low and high limit + * Based on [FHIR Range](https://www.hl7.org/fhir/R4/datatypes.html#Range) + */ +export interface Range extends Element { + /** Low limit */ + low?: Quantity; + /** High limit */ + high?: Quantity; +} + +/** + * A ratio of two Quantity values - a numerator and a denominator + * Based on [FHIR Ratio](https://www.hl7.org/fhir/R4/datatypes.html#Ratio) + */ +export interface Ratio extends Element { + /** Numerator value */ + numerator?: Quantity; + /** Denominator value */ + denominator?: Quantity; +} + +/** + * A series of measurements taken by a device + * Based on [FHIR SampledData](https://www.hl7.org/fhir/R4/datatypes.html#SampledData) + */ +export interface SampledData extends Element { + /** Zero value and units */ + origin: Quantity; + /** Number of milliseconds between samples */ + period: number; + /** Multiply data by this before adding to origin */ + factor?: number; + /** Lower limit of detection */ + lowerLimit?: number; + /** Upper limit of detection */ + upperLimit?: number; + /** Number of sample points at each time point */ + dimensions: number; + /** Decimal values with spaces, or "E" | "U" | "L" */ + data?: string; +} + +/** + * A time period defined by a start and end date and optionally time + * Based on [FHIR Period](https://www.hl7.org/fhir/R4/datatypes.html#Period) + */ +export interface Period extends Element { + /** Starting time with inclusive boundary */ + start?: string; + /** End time with inclusive boundary, if not ongoing */ + end?: string; +} + +/** + * A reference from one resource to another + * Based on [FHIR Reference](https://www.hl7.org/fhir/R4/references.html) + */ +export interface Reference extends Element { + /** Literal reference, Relative, internal or absolute URL */ + reference?: string; + /** Type the reference refers to (e.g. "Patient") */ + type?: string; + /** Logical reference, when literal reference is not known */ + identifier?: Identifier; + /** Text alternative for the resource */ + display?: string; +} + +/** + * An identifier intended for computation + * Based on [FHIR Identifier](https://www.hl7.org/fhir/R4/identifier.html) + */ +export interface Identifier extends Element { + /** usual | official | temp | secondary | old (If known) */ + use?: string; + /** Description of identifier */ + type?: CodeableConcept; + /** The namespace for the identifier value */ + system?: string; + /** The value that is unique */ + value?: string; + /** Time period when id is/was valid for use */ + period?: Period; + /** Organization that issued id (may be just text) */ + assigner?: Reference; +} + +/** + * Any resource that is a [DomainResource](https://www.hl7.org/fhir/domainresource.html) may include a human-readable narrative that contains a summary of the resource and may be used to represent the content of the resource to a human. + * Based on [FHIR Narrative](https://www.hl7.org/fhir/R4/narrative.html#Narrative) + */ +export interface Narrative extends Element { + /** generated, extensions, additional, empty */ + status: string; + /** xhtml */ + div: string; +} + +/** + * A text note which also contains information about who made the statement and when + * Based on [FHIR Annotation](https://www.hl7.org/fhir/R4/datatypes.html#Annotation) + */ +export interface Annotation extends Element { + /** Individual responsible for the annotation */ + authorString?: string; + /** When the annotation was made */ + time?: string; + /** The annotation - text content (as markdown) */ + text: string; +} + +/** + * Component results + * Based on [FHIR Observation.component](https://www.hl7.org/fhir/R4/observation.html) + */ +export interface ObservationComponent extends Element { + /** Type of component observation (code / type) */ + code: CodeableConcept; + /** Value as Quantity */ + valueQuantity?: Quantity; + /** Value as CodeableConcept */ + valueCodeableConcept?: CodeableConcept; + /** Value as string */ + valueString?: string; + /** Value as boolean */ + valueBoolean?: boolean; + /** Value as integer */ + valueInteger?: number; + /** Value as Range. */ + valueRange?: Range; + /** Value as Ratio. */ + valueRatio?: Ratio; + /** Value as SampledData. */ + valueSampledData?: SampledData; + /** Value as time (hh:mm:ss) */ + valueTime?: Date | string; + /** Value as dateTime. */ + valueDateTime?: string; + /** Value as Period. */ + valuePeriod?: Period; + /** Value as reference. */ + valueReference?: Reference; + /** Why the component result is missing */ + dataAbsentReason?: CodeableConcept; + /** High, low, normal, etc. */ + interpretation?: Array; + /** Provides guide for interpretation of component result */ + referenceRange?: Array; +} + +/** + * Provides guide for interpretation of component result + * Based on [FHIR Observation.referenceRange](https://www.hl7.org/fhir/R4/observation.html) + */ +export interface ObservationReferenceRange { + /** Low Range, if relevant */ + low?: Quantity; + /** High Range, if relevant */ + high?: Quantity; + /** Reference range qualifier */ + type?: CodeableConcept; + /** Reference range population */ + appliesTo?: Array; + /** Applicable age range, if relevant */ + age?: Range; + /** Text based reference range in an observation */ + text?: string; +} + +/** Contact details (See: https://www.hl7.org/fhir/R4/metadatatypes.html#ContactDetail) */ +export interface ContactDetail extends Element { + /** Name of an individual to contact */ + name?: string; + /** Contact details for individual or organization */ + telecom?: Array; +} + +/** + * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc. + * See https://www.hl7.org/fhir/R4/datatypes.html#ContactPoint + */ +export interface ContactPoint { + /** + * phone | fax | email | pager | url | sms | other + * + * Possible values: "phone", "fax", "email", "pager", "url", "sms", "other" + */ + system?: string; + /** The actual contact point details */ + value?: string; + /** + * home | work | temp | old | mobile - purpose of this contact point + * + * Possible values: "home", "work", "temp", "old", "mobile" + */ + use?: string; + /** Specify preferred order of use (1 = highest) */ + rank?: number; + /** Time period when the contact point was/is in use */ + period?: Period; +} + +/** + * A resource with narrative, extensions, and contained resources + * Based on [FHIR DomainResource](https://www.hl7.org/fhir/domainresource.html) + */ +export interface DomainResourceParent extends Resource { + /** Text summary of the resource, for human interpretation */ + text?: Narrative; + /** Contained, inline Resources */ + contained?: Array; + /** Additional Content defined by implementations */ + extension?: Array; + /** Extensions that cannot be ignored */ + modifierExtension?: Array; + resourceType: string; +} + +/** + * Detailed information about observations + * Based on [FHIR Observation](https://www.hl7.org/fhir/R4/observation.html) + */ +export interface Observation extends DomainResourceParent { + /** resourceType */ + resourceType: "Observation"; + /** Business Identifier for observation */ + identifier?: Array; + /** + * registered | preliminary | final | amended + + * + * Possible values: "registered", "preliminary", "final", "amended", "corrected", "cancelled", "entered-in-error", "unknown" + */ + status: string; + /** Classification of type of observation */ + category?: Array; + /** Type of observation (code / type) */ + code: CodeableConcept; + /** Who and/or what the observation is about */ + subject?: Reference; + /** Healthcare event during which this observation is made */ + encounter?: Reference; + /** Clinically relevant time/time-period for observation */ + effectiveDateTime?: string; + /** Clinically relevant time/time-period for observation */ + effectivePeriod?: Period; + /** Clinically relevant time/time-period for observation */ + effectiveInstant?: string; + /** Date/Time this version was made available */ + issued?: string; + /** Actual result */ + valueQuantity?: Quantity; + /** Actual result */ + valueCodeableConcept?: CodeableConcept; + /** Actual result */ + valueString?: string; + /** Actual result */ + valueBoolean?: boolean; + /** Actual result */ + valueInteger?: number; + /** Actual result */ + valueRange?: Range; + /** Actual result */ + valueRatio?: Ratio; + /** Actual result */ + valueSampledData?: SampledData; + /** Actual result */ + valueTime?: Date | string; + /** Actual result */ + valueDateTime?: string; + /** Actual result */ + valuePeriod?: Period; + /** Why the result is missing */ + dataAbsentReason?: CodeableConcept; + /** High, low, normal, etc. */ + interpretation?: Array; + /** Comments about the observation */ + note?: Array; + /** Observed body part */ + bodySite?: CodeableConcept; + /** How it was done */ + method?: CodeableConcept; + /** Provides guide for interpretation */ + referenceRange?: Array; + /** Related resource that belongs to the Observation group */ + hasMember?: Array; + /** Related measurements the observation is made from */ + derivedFrom?: Array; + /** Component results */ + component?: Array; +} + +/** + * Detailed information about conditions, problems or diagnoses + * Based on [FHIR Condition](https://www.hl7.org/fhir/R4/condition.html) + */ +export interface Condition extends DomainResourceParent { + /** resourceType */ + resourceType: "Condition"; + /** External Ids for this condition */ + identifier?: Array; + /** active | recurrence | relapse | inactive | remission | resolved */ + clinicalStatus?: CodeableConcept; + /** unconfirmed | provisional | differential | confirmed | refuted | entered-in-error */ + verificationStatus?: CodeableConcept; + /** problem-list-item | encounter-diagnosis */ + category?: Array; + /** Subjective severity of condition */ + severity?: CodeableConcept; + /** Identification of the condition, problem or diagnosis */ + code?: CodeableConcept; + /** Anatomical location, if relevant */ + bodySite?: Array; + /** Encounter created as part of */ + encounter?: Reference; + /** Estimated or actual date, date-time, or age */ + onsetDateTime?: string; + /** Estimated or actual date, date-time, or age */ + onsetAge?: Quantity; + /** Estimated or actual date, date-time, or age */ + onsetPeriod?: Period; + /** Estimated or actual date, date-time, or age */ + onsetRange?: Range; + /** Estimated or actual date, date-time, or age */ + onsetString?: string; + /** When in resolution/remission */ + abatementDateTime?: string; + /** When in resolution/remission */ + abatementAge?: Quantity; + /** When in resolution/remission */ + abatementPeriod?: Period; + /** When in resolution/remission */ + abatementRange?: Range; + /** When in resolution/remission */ + abatementString?: string; + /** Date record was first recorded */ + recordedDate?: string; + /** stge/grade, usually assessed formally */ + stage?: Array; + /** Additional information about the Condition */ + note?: Array; +} + +/** + * Stage/grade, usually assessed formally + * Based on [FHIR Condition.Stage](https://www.hl7.org/fhir/R4/condition.html) + */ +export interface ConditionStage { + /** Simple summary (disease specific) */ + summary?: CodeableConcept; + /** Kind of staging */ + type?: CodeableConcept; +} + +/** + * Detailed information about Research Study + * Based on [FHIR ResearchStudy](https://www.hl7.org/fhir/R4/researchstudy.html) + */ +export interface ResearchStudy extends DomainResourceParent { + /** resourceType */ + resourceType: "ResearchStudy"; + /** Business Identifier for study */ + identifier?: Array; + /** Name for this study */ + title?: string; + /** Steps followed in executing study */ + protocol?: Array; + /** Part of larger study */ + partOf?: Array; + /** + * active | administratively-completed | approved | closed-to-accrual | closed-to-accrual-and-intervention | completed | disapproved | in-review | temporarily-closed-to-accrual | temporarily-closed-to-accrual-and-intervention | withdrawn + * + * Possible values: "active", "administratively-completed", "approved", "closed-to-accrual", "closed-to-accrual-and-intervention", "completed", "disapproved", "in-review", "temporarily-closed-to-accrual", "temporarily-closed-to-accrual-and-intervention", "withdrawn" + */ + status: string; + /** treatment | prevention | diagnostic | supportive-care | screening | health-services-research | basic-science | device-feasibility */ + primaryPurposeType?: CodeableConcept; + /** n-a | early-phase-1 | phase-1 | phase-1-phase-2 | phase-2 | phase-2-phase-3 | phase-3 | phase-4 */ + phase?: CodeableConcept; + /** Classifications for the study */ + category?: Array; + /** Drugs, devices, etc. under study */ + focus?: Array; + /** Condition being studied */ + condition?: Array; + /** Contact details for the study */ + contact?: Array; + /** Used to search for the study */ + keyword?: Array; + /** Geographic region(s) for study */ + location?: Array; + /** What this is study doing */ + description?: string; + /** Inclusion & exclusion criteria */ + enrollment?: Array; + /** When the study began and ended */ + period?: Period; + /** Organization that initiates and is legally responsible for the study */ + sponsor?: Reference; + /** Researcher who oversees multiple aspects of the study */ + principalInvestigator?: Reference; + /** Facility where study activities are conducted */ + site?: Array; + /** accrual-goal-met | closed-due-to-toxicity | closed-due-to-lack-of-study-progress | temporarily-closed-per-study-design */ + reasonStopped?: CodeableConcept; + /** Comments made about the study */ + note?: Array; + /** Defined path through the study for a subject */ + arm?: { name: string; type?: CodeableConcept; description?: string }[]; + /** A goal for the study */ + objective?: { name: string; type?: CodeableConcept }[]; +} + +/** visit/encounter information */ +export interface PatientEncounter { + /** The id of the visit. */ + id: string; + /** + * Time period of the visit. + * In case of admission, use timePeriod.start to indicate the admission time and timePeriod.end to indicate the discharge time. + */ + period?: TimePeriod; + /** + * The class of the encounter. + * + * Possible values: "inpatient", "ambulatory", "observation", "emergency", "virtual", "healthHome" + */ + class?: string; +} + +/** A duration of time during which an event is happening */ +export interface TimePeriod { + /** Starting time with inclusive boundary */ + start?: Date | string; + /** End time with inclusive boundary, if not ongoing */ + end?: Date | string; +} + +/** A clinical document related to a patient. Document here is in the wide sense - not just a text document (note). */ +export interface PatientDocument { + /** + * The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). + * + * Possible values: "note", "fhirBundle", "dicom", "genomicSequencing" + */ + type: string; + /** + * The type of the clinical document. + * + * Possible values: "consultation", "dischargeSummary", "historyAndPhysical", "radiologyReport", "procedure", "progress", "laboratory", "pathologyReport" + */ + clinicalType?: string; + /** A given identifier for the document. Has to be unique across all documents for a single patient. */ + id: string; + /** A 2 letter ISO 639-1 representation of the language of the document. */ + language?: string; + /** The date and time when the document was created. */ + createdAt?: Date | string; + /** Document author(s) */ + authors?: Array; + /** + * specialty type the document + * + * Possible values: "pathology", "radiology" + */ + specialtyType?: string; + /** Administrative metadata for the document. */ + administrativeMetadata?: DocumentAdministrativeMetadata; + /** The content of the patient document. */ + content: DocumentContent; +} + +/** Document author */ +export interface DocumentAuthor { + /** author id */ + id?: string; + /** Text representation of the full name */ + fullName?: string; +} + +/** Document administrative metadata */ +export interface DocumentAdministrativeMetadata { + /** List of procedure information associated with the document. */ + orderedProcedures?: Array; + /** Reference to the encounter associated with the document. */ + encounterId?: string; +} + +/** Procedure information */ +export interface OrderedProcedure { + /** Procedure code */ + code?: CodeableConcept; + /** Procedure description */ + description?: string; + /** Additional Content defined by implementations */ + extension?: Array; +} + +/** The content of the patient document. */ +export interface DocumentContent { + /** + * The type of the content's source. + * In case the source type is 'inline', the content is given as a string (for instance, text). + * In case the source type is 'reference', the content is given as a URI. + * + * Possible values: "inline", "reference" + */ + sourceType: string; + /** The content of the document, given either inline (as a string) or as a reference (URI). */ + value: string; +} + +/** Configuration affecting the Radiology Insights model's inference. */ +export interface RadiologyInsightsModelConfiguration { + /** An indication whether the model should produce verbose output. */ + verbose?: boolean; + /** An indication whether the model's output should include evidence for the inferences. */ + includeEvidence?: boolean; + /** This is a list of inference types to be inferred for the current request. It could be used if only part of the Radiology Insights inferences are required. If this list is omitted or empty, the model will return all the inference types. */ + inferenceTypes?: string[]; + /** Options regarding follow up recommendation inferences and finding inferences. */ + inferenceOptions?: RadiologyInsightsInferenceOptions; + /** Local for the model to use. If not specified, the model will use the default locale. */ + locale?: string; +} + +/** Options regarding follow up recommendation inferences and finding inferences. */ +export interface RadiologyInsightsInferenceOptions { + /** Follow-up recommendation options. */ + followupRecommendationOptions?: FollowupRecommendationOptions; + /** Finding options. */ + findingOptions?: FindingOptions; +} + +/** Follow-up recommendation options. */ +export interface FollowupRecommendationOptions { + /** Include/Exclude follow-up recommendations without a specific radiology procedure. Default is false. */ + includeRecommendationsWithNoSpecifiedModality?: boolean; + /** Include/Exclude follow-up recommendations in references to a guideline or article. Default is false. */ + includeRecommendationsInReferences?: boolean; + /** If this is true, provide one or more sentences as evidence for the recommendation, next to the token evidence. The start and end positions of these sentences will be put in an extension with url 'modality_sentences'. Default is false. */ + provideFocusedSentenceEvidence?: boolean; +} + +/** Finding options. */ +export interface FindingOptions { + /** If this is true, provide the sentence that contains the first token of the finding's clinical indicator (i.e. the medical problem), if there is one. This sentence is provided as an extension with url 'ci_sentence', next to the token evidence. Default is false. */ + provideFocusedSentenceEvidence?: boolean; +} + +/** The inference results for the Radiology Insights request. If field 'status' has value 'succeeded', then field 'result' will contain an instance of RadiologyInsightsInferenceResult. */ +export interface RadiologyInsightsInferenceResult { + /** Results for the patients given in the request. */ + patientResults: Array; + /** The version of the model used for inference, expressed as the model date. */ + modelVersion: string; +} + +/** Results of the model's work for a single patient. */ +export interface RadiologyInsightsPatientResult { + /** Identifier given for the patient in the request. */ + patientId: string; + /** The model's inferences for the given patient. */ + inferences: Array; +} + +/** + * An inference made by the Radiology Insights model regarding a patient. + * - AgeMismatch + * - SexMismatch + * - LateralityDiscrepancy + * - CompleteOrderDiscrepancy + * - LimitedOrderDiscrepancy + * - Finding + * - CriticalResult + * - FollowupRecommendation + * - RadiologyProcedure + * - FollowupCommunication + */ +export interface RadiologyInsightsInferenceParent { + /** Additional Content defined by implementations */ + extension?: Array; + kind: string; +} + +/** A notification for age mismatch is displayed when the age mentioned in a document for a specific patient does not match the age specified in the patient information. */ +export interface AgeMismatchInference extends RadiologyInsightsInferenceParent { + /** Inference type. */ + kind: "ageMismatch"; +} + +/** A notification for a sex mismatch is displayed when the gender, personal pronouns, gender-related body parts, or gender-related procedures mentioned in a patient's clinical document are either inconsistent or do not match the gender specified in the patient information. */ +export interface SexMismatchInference extends RadiologyInsightsInferenceParent { + /** Inference type. */ + kind: "sexMismatch"; + /** Sex indication : SNOMED CT code for gender finding. */ + sexIndication: CodeableConcept; +} + +/** A laterality mismatch occurs when there is a discrepancy between the clinical documentation and the ordered procedure (orderLateralityMismatch), a contradiction within the clinical document (textLateralityContradiction), or when no laterality is mentioned (textLateralityMissing). */ +export interface LateralityDiscrepancyInference + extends RadiologyInsightsInferenceParent { + /** Inference type. */ + kind: "lateralityDiscrepancy"; + /** Laterality indication : SNOMED CT code for laterality qualifier value. */ + lateralityIndication?: CodeableConcept; + /** + * Mismatch type : orderLateralityMismatch, textLateralityContradiction, textLateralityMissing. + * + * Possible values: "orderLateralityMismatch", "textLateralityContradiction", "textLateralityMissing" + */ + discrepancyType: string; +} + +/** A complete order discrepancy is shown when one or more body parts and/or measurements that should be in the document (because there is a complete order) are not present. */ +export interface CompleteOrderDiscrepancyInference + extends RadiologyInsightsInferenceParent { + /** Inference type. */ + kind: "completeOrderDiscrepancy"; + /** Order type : CPT ultrasound complete code for abdomen, retroperitoneal, pelvis or breast. */ + orderType: CodeableConcept; + /** List of missing body parts required by a complete order : SNOMED CT codes. */ + missingBodyParts?: Array; + /** List of missing body parts that require measurement by a complete order : SNOMED CT codes. */ + missingBodyPartMeasurements?: Array; +} + +/** A limited order discrepancy occurs when there is a limited order, but all body parts and measurements that are needed for a complete order are present in the document. */ +export interface LimitedOrderDiscrepancyInference + extends RadiologyInsightsInferenceParent { + /** Inference type. */ + kind: "limitedOrderDiscrepancy"; + /** Order type : CPT ultrasound complete code for abdomen, retroperitoneal, pelvis or breast. */ + orderType: CodeableConcept; + /** List of body parts found in the document : SNOMED CT codes. */ + presentBodyParts?: Array; + /** List of body parts that are measured according to the document : SNOMED CT codes. */ + presentBodyPartMeasurements?: Array; +} + +/** Findings in a radiology report typically describe abnormalities, lesions, or other notable observations related to the anatomy or pathology of the imaged area. */ +export interface FindingInference extends RadiologyInsightsInferenceParent { + /** Inference type. */ + kind: "finding"; + /** Finding data : contains extensions, fields and components linked with the finding. */ + finding: Observation; +} + +/** Critical results refer to findings of utmost importance that may require timely attention due to their potential impact on patient care. */ +export interface CriticalResultInference + extends RadiologyInsightsInferenceParent { + /** Inference type. */ + kind: "criticalResult"; + /** The complete Critical Result, as outlined below, will be reused for the recommendation. */ + result: CriticalResult; +} + +/** Critical Result consists of two properties. */ +export interface CriticalResult { + /** Description : medical problem. */ + description: string; + /** Finding linked to the critical result. */ + finding?: Observation; +} + +/** Radiology procedures are the specific imaging studies or examinations ordered for the patient, extracted from the document information and text. */ +export interface RadiologyProcedureInference + extends RadiologyInsightsInferenceParent { + /** Inference type. */ + kind: "radiologyProcedure"; + /** LOINC codes for the procedure. */ + procedureCodes?: Array; + /** Imaging procedures. */ + imagingProcedures: Array; + /** Ordered procedure information from the document information or text. */ + orderedProcedure: OrderedProcedure; +} + +/** Imaging procedure. */ +export interface ImagingProcedure { + /** Modality : SNOMED CT code. */ + modality: CodeableConcept; + /** Anatomy : SNOMED CT code. */ + anatomy: CodeableConcept; + /** Laterality : SNOMED CT code. */ + laterality?: CodeableConcept; + /** Contrast : see RadiologyCodeWithTypes (below). */ + contrast?: RadiologyCodeWithTypes; + /** View : see RadiologyCodeWithTypes (below). */ + view?: RadiologyCodeWithTypes; +} + +/** Radiology code with types : used in imaging procedure recommendation for contrast and view. */ +export interface RadiologyCodeWithTypes { + /** The SNOMED CT code indicates whether imaging was conducted with or without contrast in the case of contrast, and in the case of views, it denotes the number of views. */ + code: CodeableConcept; + /** The collection of types will indicate the contrast substance used in the case of contrast and, in the case of views, it will specify the types of views, such as lateral and frontal, etc. */ + types: Array; +} + +/** Follow-up recommendations offer guidance to healthcare providers on managing and monitoring patients based on the findings of imaging studies. */ +export interface FollowupRecommendationInference + extends RadiologyInsightsInferenceParent { + /** Inference type. */ + kind: "followupRecommendation"; + /** Date and time are displayed when the procedure is recommended to be done at a specific point in time. */ + effectiveAt?: string; + /** The period is shown if a specific period is mentioned, with a start and end date-time. */ + effectivePeriod?: Period; + /** Findings related to the recommendation. */ + findings?: Array; + /** The conditional value indicates whether or not the sentence containing the recommendation includes a conditional statement. Keywords for conditional statements include 'if', 'when', 'unless', and so on. */ + isConditional: boolean; + /** The option value indicates whether or not the sentence containing the recommendation includes an optional statement. Keywords for optional statements include 'recommend', 'consider', and so on. */ + isOption: boolean; + /** The guideline value indicates whether or not the recommendation is part of a guideline section that compiles all recommendations applicable to various findings. */ + isGuideline: boolean; + /** Hedging refers to ambiguous, vague or imprecise language within the sentence of the recommendation. Keywords for hedging are 'can be','may be',and so on. */ + isHedging: boolean; + /** The procedure recommendation can be a generic procedure or an imaging procedure. */ + recommendedProcedure: ProcedureRecommendation; +} + +/** Finding reference for recommendation. */ +export interface RecommendationFinding { + /** Finding linked to a recommendation. */ + finding?: Observation; + /** Critical result linked to a recommendation. */ + criticalFinding?: CriticalResult; + /** + * Recommendation finding status. + * + * Possible values: "present", "differential", "ruleOut", "conditional" + */ + recommendationFindingStatus: string; + /** Additional Content defined by implementations */ + extension?: Array; +} + +/** The procedure recommendation can be a generic procedure or an imaging procedure. */ +export interface ProcedureRecommendationParent { + /** Additional Content defined by implementations */ + extension?: Array; + kind: string; +} + +/** Generic procedure information. */ +export interface GenericProcedureRecommendation + extends ProcedureRecommendationParent { + /** Procedure type : generic. */ + kind: "genericProcedureRecommendation"; + /** Procedure modality : SNOMED CT code. */ + code: CodeableConcept; + /** Procedure description : MANAGEMENT PROCEDURE (PROCEDURE) or CONSULTATION (PROCEDURE) based on SNOMED CT. */ + description?: string; +} + +/** Imaging procedures. */ +export interface ImagingProcedureRecommendation + extends ProcedureRecommendationParent { + /** Procedure type : imaging. */ + kind: "imagingProcedureRecommendation"; + /** LOINC codes for the procedure. */ + procedureCodes?: Array; + /** Imaging procedures. */ + imagingProcedures: Array; +} + +/** Follow-up communication involves the exchange of important information, recommendations, or updates between radiologists and other healthcare professionals involved in a patient's care. */ +export interface FollowupCommunicationInference + extends RadiologyInsightsInferenceParent { + /** Inference type. */ + kind: "followupCommunication"; + /** Communication date and time. */ + communicatedAt?: Date[] | string[]; + /** Recipient of the communication. */ + recipient?: string[]; + /** Communication was acknowledged. */ + wasAcknowledged: boolean; +} + +/** Response for the Radiology Insights request. */ +export interface RadiologyInsightsJob { + /** The request data for the operation. */ + jobData?: RadiologyInsightsData; +} + +/** + * A resource with narrative, extensions, and contained resources + * Based on [FHIR DomainResource](https://www.hl7.org/fhir/domainresource.html) + */ +export type DomainResource = + | DomainResourceParent + | Observation + | Condition + | ResearchStudy; +/** + * An inference made by the Radiology Insights model regarding a patient. + * - AgeMismatch + * - SexMismatch + * - LateralityDiscrepancy + * - CompleteOrderDiscrepancy + * - LimitedOrderDiscrepancy + * - Finding + * - CriticalResult + * - FollowupRecommendation + * - RadiologyProcedure + * - FollowupCommunication + */ +export type RadiologyInsightsInference = + | RadiologyInsightsInferenceParent + | AgeMismatchInference + | SexMismatchInference + | LateralityDiscrepancyInference + | CompleteOrderDiscrepancyInference + | LimitedOrderDiscrepancyInference + | FindingInference + | CriticalResultInference + | RadiologyProcedureInference + | FollowupRecommendationInference + | FollowupCommunicationInference; +/** The procedure recommendation can be a generic procedure or an imaging procedure. */ +export type ProcedureRecommendation = + | ProcedureRecommendationParent + | GenericProcedureRecommendation + | ImagingProcedureRecommendation; diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/outputModels.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/outputModels.ts new file mode 100644 index 000000000000..bc2172c80b49 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/outputModels.ts @@ -0,0 +1,1024 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { ErrorModel } from "@azure-rest/core-client"; + +/** The retry-after envelope. */ +export interface RetryAfterHeaderOutput {} + +/** Provides the 'x-ms-request-id' header to enable request correlation in responses. */ +export interface RequestIdResponseHeaderOutput {} + +/** Provides the standard 'expand' query parameter for list operations. */ +export interface ExpandQueryParameterOutput {} + +/** Response for the Radiology Insights request. */ +export interface RadiologyInsightsJobOutput { + /** The request data for the operation. */ + jobData?: RadiologyInsightsDataOutput; + /** The result of the operation. */ + readonly result?: RadiologyInsightsInferenceResultOutput; + /** + * The status of the job. + * + * Possible values: "notStarted", "running", "succeeded", "failed", "canceled" + */ + readonly status: string; + /** The date and time when the processing job was created. */ + readonly createdAt?: string; + /** The date and time when the processing job is set to expire. */ + readonly expiresAt?: string; + /** The date and time when the processing job was last updated. */ + readonly updatedAt?: string; + /** Error object that describes the error when status is "Failed". */ + readonly error?: ErrorModel; +} + +/** Contains the list of patients, and configuration data. */ +export interface RadiologyInsightsDataOutput { + /** The list of patients, including their clinical information and data. */ + patients: Array; + /** Configuration affecting the Radiology Insights model's inference. */ + configuration?: RadiologyInsightsModelConfigurationOutput; +} + +/** A patient record, including their clinical information and data. */ +export interface PatientRecordOutput { + /** A given identifier for the patient. Has to be unique across all patients in a single request. */ + id: string; + /** Patient structured information, including demographics and known structured clinical information. */ + details?: PatientDetailsOutput; + /** Patient encounters/visits. */ + encounters?: Array; + /** Patient unstructured clinical data, given as documents. */ + patientDocuments?: Array; +} + +/** Patient structured information, including demographics and known structured clinical information. */ +export interface PatientDetailsOutput { + /** + * The patient's sex. + * + * Possible values: "female", "male", "unspecified" + */ + sex?: string; + /** The patient's date of birth. */ + birthDate?: string; + /** Known clinical information for the patient, structured. */ + clinicalInfo?: Array; +} + +/** + * Resource is the ancestor of DomainResource from which most resources are derived. Bundle, Parameters, and Binary extend Resource directly. + * Based on [FHIR Resource](https://www.hl7.org/fhir/r4/resource.html + */ +export interface ResourceOutput extends Record { + /** The type of resource */ + resourceType: string; + /** Resource Id */ + id?: string; + /** Metadata about the resource */ + meta?: MetaOutput; + /** A set of rules under which this content was created */ + implicitRules?: string; + /** Language of the resource content */ + language?: string; +} + +/** + * Metadata about a resource + * Based on [FHIR Meta](https://www.hl7.org/fhir/R4/resource.html#Meta) + */ +export interface MetaOutput { + /** The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted. */ + versionId?: string; + /** When the resource last changed - e.g. when the version changed. */ + lastUpdated?: string; + /** A uri that identifies the source system of the resource. This provides a minimal amount of Provenance information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc. */ + source?: string; + /** A list of profiles (references to [StructureDefinition](https://www.hl7.org/fhir/structuredefinition.html) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](https://www.hl7.org/fhir/structuredefinition-definitions.html#StructureDefinition.url). */ + profile?: string[]; + /** Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure. */ + security?: Array; + /** Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource. */ + tag?: Array; +} + +/** + * A Coding is a representation of a defined concept using a symbol from a defined "code system". + * Based on [FHIR Coding](https://www.hl7.org/fhir/R4/datatypes.html#Coding) + */ +export interface CodingOutput extends ElementOutput { + /** Identity of the terminology system */ + system?: string; + /** Version of the system - if relevant */ + version?: string; + /** Symbol in syntax defined by the system */ + code?: string; + /** Representation defined by the system */ + display?: string; +} + +/** + * The base definition for all elements contained inside a resource. + * Based on [FHIR Element](https://www.hl7.org/fhir/R4/element.html) + */ +export interface ElementOutput { + /** Unique id for inter-element referencing */ + id?: string; + /** Additional Content defined by implementations */ + extension?: Array; +} + +/** + * Base for all elements + * Based on [FHIR Element](https://www.hl7.org/fhir/datatypes.html#Element) + */ +export interface ExtensionOutput extends ElementOutput { + /** Source of the definition for the extension code - a logical name or a URL. */ + url: string; + /** Value as Quantity */ + valueQuantity?: QuantityOutput; + /** Value as CodeableConcept */ + valueCodeableConcept?: CodeableConceptOutput; + /** Value as string */ + valueString?: string; + /** Value as boolean */ + valueBoolean?: boolean; + /** Value as integer */ + valueInteger?: number; + /** Value as Range. */ + valueRange?: RangeOutput; + /** Value as Ratio. */ + valueRatio?: RatioOutput; + /** Value as SampledData. */ + valueSampledData?: SampledDataOutput; + /** Value as time (hh:mm:ss) */ + valueTime?: string; + /** Value as dateTime. */ + valueDateTime?: string; + /** Value as Period. */ + valuePeriod?: PeriodOutput; + /** Value as reference. */ + valueReference?: ReferenceOutput; +} + +/** + * A measured or measurable amount + * Based on [FHIR Quantity](https://www.hl7.org/fhir/R4/datatypes.html#Quantity) + */ +export interface QuantityOutput extends ElementOutput { + /** Numerical value (with implicit precision) */ + value?: number; + /** < | <= | >= | > - how to understand the value */ + comparator?: string; + /** Unit representation */ + unit?: string; + /** System that defines coded unit form */ + system?: string; + /** Coded form of the unit */ + code?: string; +} + +/** + * Concept - reference to a terminology or just text + * Based on [FHIR CodeableConcept](https://www.hl7.org/fhir/R4/datatypes.html#CodeableConcept) + */ +export interface CodeableConceptOutput extends ElementOutput { + /** Code defined by a terminology system */ + coding?: Array; + /** Plain text representation of the concept */ + text?: string; +} + +/** + * A set of ordered Quantities defined by a low and high limit + * Based on [FHIR Range](https://www.hl7.org/fhir/R4/datatypes.html#Range) + */ +export interface RangeOutput extends ElementOutput { + /** Low limit */ + low?: QuantityOutput; + /** High limit */ + high?: QuantityOutput; +} + +/** + * A ratio of two Quantity values - a numerator and a denominator + * Based on [FHIR Ratio](https://www.hl7.org/fhir/R4/datatypes.html#Ratio) + */ +export interface RatioOutput extends ElementOutput { + /** Numerator value */ + numerator?: QuantityOutput; + /** Denominator value */ + denominator?: QuantityOutput; +} + +/** + * A series of measurements taken by a device + * Based on [FHIR SampledData](https://www.hl7.org/fhir/R4/datatypes.html#SampledData) + */ +export interface SampledDataOutput extends ElementOutput { + /** Zero value and units */ + origin: QuantityOutput; + /** Number of milliseconds between samples */ + period: number; + /** Multiply data by this before adding to origin */ + factor?: number; + /** Lower limit of detection */ + lowerLimit?: number; + /** Upper limit of detection */ + upperLimit?: number; + /** Number of sample points at each time point */ + dimensions: number; + /** Decimal values with spaces, or "E" | "U" | "L" */ + data?: string; +} + +/** + * A time period defined by a start and end date and optionally time + * Based on [FHIR Period](https://www.hl7.org/fhir/R4/datatypes.html#Period) + */ +export interface PeriodOutput extends ElementOutput { + /** Starting time with inclusive boundary */ + start?: string; + /** End time with inclusive boundary, if not ongoing */ + end?: string; +} + +/** + * A reference from one resource to another + * Based on [FHIR Reference](https://www.hl7.org/fhir/R4/references.html) + */ +export interface ReferenceOutput extends ElementOutput { + /** Literal reference, Relative, internal or absolute URL */ + reference?: string; + /** Type the reference refers to (e.g. "Patient") */ + type?: string; + /** Logical reference, when literal reference is not known */ + identifier?: IdentifierOutput; + /** Text alternative for the resource */ + display?: string; +} + +/** + * An identifier intended for computation + * Based on [FHIR Identifier](https://www.hl7.org/fhir/R4/identifier.html) + */ +export interface IdentifierOutput extends ElementOutput { + /** usual | official | temp | secondary | old (If known) */ + use?: string; + /** Description of identifier */ + type?: CodeableConceptOutput; + /** The namespace for the identifier value */ + system?: string; + /** The value that is unique */ + value?: string; + /** Time period when id is/was valid for use */ + period?: PeriodOutput; + /** Organization that issued id (may be just text) */ + assigner?: ReferenceOutput; +} + +/** + * Any resource that is a [DomainResource](https://www.hl7.org/fhir/domainresource.html) may include a human-readable narrative that contains a summary of the resource and may be used to represent the content of the resource to a human. + * Based on [FHIR Narrative](https://www.hl7.org/fhir/R4/narrative.html#Narrative) + */ +export interface NarrativeOutput extends ElementOutput { + /** generated, extensions, additional, empty */ + status: string; + /** xhtml */ + div: string; +} + +/** + * A text note which also contains information about who made the statement and when + * Based on [FHIR Annotation](https://www.hl7.org/fhir/R4/datatypes.html#Annotation) + */ +export interface AnnotationOutput extends ElementOutput { + /** Individual responsible for the annotation */ + authorString?: string; + /** When the annotation was made */ + time?: string; + /** The annotation - text content (as markdown) */ + text: string; +} + +/** + * Component results + * Based on [FHIR Observation.component](https://www.hl7.org/fhir/R4/observation.html) + */ +export interface ObservationComponentOutput extends ElementOutput { + /** Type of component observation (code / type) */ + code: CodeableConceptOutput; + /** Value as Quantity */ + valueQuantity?: QuantityOutput; + /** Value as CodeableConcept */ + valueCodeableConcept?: CodeableConceptOutput; + /** Value as string */ + valueString?: string; + /** Value as boolean */ + valueBoolean?: boolean; + /** Value as integer */ + valueInteger?: number; + /** Value as Range. */ + valueRange?: RangeOutput; + /** Value as Ratio. */ + valueRatio?: RatioOutput; + /** Value as SampledData. */ + valueSampledData?: SampledDataOutput; + /** Value as time (hh:mm:ss) */ + valueTime?: string; + /** Value as dateTime. */ + valueDateTime?: string; + /** Value as Period. */ + valuePeriod?: PeriodOutput; + /** Value as reference. */ + valueReference?: ReferenceOutput; + /** Why the component result is missing */ + dataAbsentReason?: CodeableConceptOutput; + /** High, low, normal, etc. */ + interpretation?: Array; + /** Provides guide for interpretation of component result */ + referenceRange?: Array; +} + +/** + * Provides guide for interpretation of component result + * Based on [FHIR Observation.referenceRange](https://www.hl7.org/fhir/R4/observation.html) + */ +export interface ObservationReferenceRangeOutput { + /** Low Range, if relevant */ + low?: QuantityOutput; + /** High Range, if relevant */ + high?: QuantityOutput; + /** Reference range qualifier */ + type?: CodeableConceptOutput; + /** Reference range population */ + appliesTo?: Array; + /** Applicable age range, if relevant */ + age?: RangeOutput; + /** Text based reference range in an observation */ + text?: string; +} + +/** Contact details (See: https://www.hl7.org/fhir/R4/metadatatypes.html#ContactDetail) */ +export interface ContactDetailOutput extends ElementOutput { + /** Name of an individual to contact */ + name?: string; + /** Contact details for individual or organization */ + telecom?: Array; +} + +/** + * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc. + * See https://www.hl7.org/fhir/R4/datatypes.html#ContactPoint + */ +export interface ContactPointOutput { + /** + * phone | fax | email | pager | url | sms | other + * + * Possible values: "phone", "fax", "email", "pager", "url", "sms", "other" + */ + system?: string; + /** The actual contact point details */ + value?: string; + /** + * home | work | temp | old | mobile - purpose of this contact point + * + * Possible values: "home", "work", "temp", "old", "mobile" + */ + use?: string; + /** Specify preferred order of use (1 = highest) */ + rank?: number; + /** Time period when the contact point was/is in use */ + period?: PeriodOutput; +} + +/** + * A resource with narrative, extensions, and contained resources + * Based on [FHIR DomainResource](https://www.hl7.org/fhir/domainresource.html) + */ +export interface DomainResourceOutputParent extends ResourceOutput { + /** Text summary of the resource, for human interpretation */ + text?: NarrativeOutput; + /** Contained, inline Resources */ + contained?: Array; + /** Additional Content defined by implementations */ + extension?: Array; + /** Extensions that cannot be ignored */ + modifierExtension?: Array; + resourceType: string; +} + +/** + * Detailed information about observations + * Based on [FHIR Observation](https://www.hl7.org/fhir/R4/observation.html) + */ +export interface ObservationOutput extends DomainResourceOutputParent { + /** resourceType */ + resourceType: "Observation"; + /** Business Identifier for observation */ + identifier?: Array; + /** + * registered | preliminary | final | amended + + * + * Possible values: "registered", "preliminary", "final", "amended", "corrected", "cancelled", "entered-in-error", "unknown" + */ + status: string; + /** Classification of type of observation */ + category?: Array; + /** Type of observation (code / type) */ + code: CodeableConceptOutput; + /** Who and/or what the observation is about */ + subject?: ReferenceOutput; + /** Healthcare event during which this observation is made */ + encounter?: ReferenceOutput; + /** Clinically relevant time/time-period for observation */ + effectiveDateTime?: string; + /** Clinically relevant time/time-period for observation */ + effectivePeriod?: PeriodOutput; + /** Clinically relevant time/time-period for observation */ + effectiveInstant?: string; + /** Date/Time this version was made available */ + issued?: string; + /** Actual result */ + valueQuantity?: QuantityOutput; + /** Actual result */ + valueCodeableConcept?: CodeableConceptOutput; + /** Actual result */ + valueString?: string; + /** Actual result */ + valueBoolean?: boolean; + /** Actual result */ + valueInteger?: number; + /** Actual result */ + valueRange?: RangeOutput; + /** Actual result */ + valueRatio?: RatioOutput; + /** Actual result */ + valueSampledData?: SampledDataOutput; + /** Actual result */ + valueTime?: string; + /** Actual result */ + valueDateTime?: string; + /** Actual result */ + valuePeriod?: PeriodOutput; + /** Why the result is missing */ + dataAbsentReason?: CodeableConceptOutput; + /** High, low, normal, etc. */ + interpretation?: Array; + /** Comments about the observation */ + note?: Array; + /** Observed body part */ + bodySite?: CodeableConceptOutput; + /** How it was done */ + method?: CodeableConceptOutput; + /** Provides guide for interpretation */ + referenceRange?: Array; + /** Related resource that belongs to the Observation group */ + hasMember?: Array; + /** Related measurements the observation is made from */ + derivedFrom?: Array; + /** Component results */ + component?: Array; +} + +/** + * Detailed information about conditions, problems or diagnoses + * Based on [FHIR Condition](https://www.hl7.org/fhir/R4/condition.html) + */ +export interface ConditionOutput extends DomainResourceOutputParent { + /** resourceType */ + resourceType: "Condition"; + /** External Ids for this condition */ + identifier?: Array; + /** active | recurrence | relapse | inactive | remission | resolved */ + clinicalStatus?: CodeableConceptOutput; + /** unconfirmed | provisional | differential | confirmed | refuted | entered-in-error */ + verificationStatus?: CodeableConceptOutput; + /** problem-list-item | encounter-diagnosis */ + category?: Array; + /** Subjective severity of condition */ + severity?: CodeableConceptOutput; + /** Identification of the condition, problem or diagnosis */ + code?: CodeableConceptOutput; + /** Anatomical location, if relevant */ + bodySite?: Array; + /** Encounter created as part of */ + encounter?: ReferenceOutput; + /** Estimated or actual date, date-time, or age */ + onsetDateTime?: string; + /** Estimated or actual date, date-time, or age */ + onsetAge?: QuantityOutput; + /** Estimated or actual date, date-time, or age */ + onsetPeriod?: PeriodOutput; + /** Estimated or actual date, date-time, or age */ + onsetRange?: RangeOutput; + /** Estimated or actual date, date-time, or age */ + onsetString?: string; + /** When in resolution/remission */ + abatementDateTime?: string; + /** When in resolution/remission */ + abatementAge?: QuantityOutput; + /** When in resolution/remission */ + abatementPeriod?: PeriodOutput; + /** When in resolution/remission */ + abatementRange?: RangeOutput; + /** When in resolution/remission */ + abatementString?: string; + /** Date record was first recorded */ + recordedDate?: string; + /** stge/grade, usually assessed formally */ + stage?: Array; + /** Additional information about the Condition */ + note?: Array; +} + +/** + * Stage/grade, usually assessed formally + * Based on [FHIR Condition.Stage](https://www.hl7.org/fhir/R4/condition.html) + */ +export interface ConditionStageOutput { + /** Simple summary (disease specific) */ + summary?: CodeableConceptOutput; + /** Kind of staging */ + type?: CodeableConceptOutput; +} + +/** + * Detailed information about Research Study + * Based on [FHIR ResearchStudy](https://www.hl7.org/fhir/R4/researchstudy.html) + */ +export interface ResearchStudyOutput extends DomainResourceOutputParent { + /** resourceType */ + resourceType: "ResearchStudy"; + /** Business Identifier for study */ + identifier?: Array; + /** Name for this study */ + title?: string; + /** Steps followed in executing study */ + protocol?: Array; + /** Part of larger study */ + partOf?: Array; + /** + * active | administratively-completed | approved | closed-to-accrual | closed-to-accrual-and-intervention | completed | disapproved | in-review | temporarily-closed-to-accrual | temporarily-closed-to-accrual-and-intervention | withdrawn + * + * Possible values: "active", "administratively-completed", "approved", "closed-to-accrual", "closed-to-accrual-and-intervention", "completed", "disapproved", "in-review", "temporarily-closed-to-accrual", "temporarily-closed-to-accrual-and-intervention", "withdrawn" + */ + status: string; + /** treatment | prevention | diagnostic | supportive-care | screening | health-services-research | basic-science | device-feasibility */ + primaryPurposeType?: CodeableConceptOutput; + /** n-a | early-phase-1 | phase-1 | phase-1-phase-2 | phase-2 | phase-2-phase-3 | phase-3 | phase-4 */ + phase?: CodeableConceptOutput; + /** Classifications for the study */ + category?: Array; + /** Drugs, devices, etc. under study */ + focus?: Array; + /** Condition being studied */ + condition?: Array; + /** Contact details for the study */ + contact?: Array; + /** Used to search for the study */ + keyword?: Array; + /** Geographic region(s) for study */ + location?: Array; + /** What this is study doing */ + description?: string; + /** Inclusion & exclusion criteria */ + enrollment?: Array; + /** When the study began and ended */ + period?: PeriodOutput; + /** Organization that initiates and is legally responsible for the study */ + sponsor?: ReferenceOutput; + /** Researcher who oversees multiple aspects of the study */ + principalInvestigator?: ReferenceOutput; + /** Facility where study activities are conducted */ + site?: Array; + /** accrual-goal-met | closed-due-to-toxicity | closed-due-to-lack-of-study-progress | temporarily-closed-per-study-design */ + reasonStopped?: CodeableConceptOutput; + /** Comments made about the study */ + note?: Array; + /** Defined path through the study for a subject */ + arm?: { name: string; type?: CodeableConceptOutput; description?: string }[]; + /** A goal for the study */ + objective?: { name: string; type?: CodeableConceptOutput }[]; +} + +/** visit/encounter information */ +export interface PatientEncounterOutput { + /** The id of the visit. */ + id: string; + /** + * Time period of the visit. + * In case of admission, use timePeriod.start to indicate the admission time and timePeriod.end to indicate the discharge time. + */ + period?: TimePeriodOutput; + /** + * The class of the encounter. + * + * Possible values: "inpatient", "ambulatory", "observation", "emergency", "virtual", "healthHome" + */ + class?: string; +} + +/** A duration of time during which an event is happening */ +export interface TimePeriodOutput { + /** Starting time with inclusive boundary */ + start?: string; + /** End time with inclusive boundary, if not ongoing */ + end?: string; +} + +/** A clinical document related to a patient. Document here is in the wide sense - not just a text document (note). */ +export interface PatientDocumentOutput { + /** + * The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). + * + * Possible values: "note", "fhirBundle", "dicom", "genomicSequencing" + */ + type: string; + /** + * The type of the clinical document. + * + * Possible values: "consultation", "dischargeSummary", "historyAndPhysical", "radiologyReport", "procedure", "progress", "laboratory", "pathologyReport" + */ + clinicalType?: string; + /** A given identifier for the document. Has to be unique across all documents for a single patient. */ + id: string; + /** A 2 letter ISO 639-1 representation of the language of the document. */ + language?: string; + /** The date and time when the document was created. */ + createdAt?: string; + /** Document author(s) */ + authors?: Array; + /** + * specialty type the document + * + * Possible values: "pathology", "radiology" + */ + specialtyType?: string; + /** Administrative metadata for the document. */ + administrativeMetadata?: DocumentAdministrativeMetadataOutput; + /** The content of the patient document. */ + content: DocumentContentOutput; +} + +/** Document author */ +export interface DocumentAuthorOutput { + /** author id */ + id?: string; + /** Text representation of the full name */ + fullName?: string; +} + +/** Document administrative metadata */ +export interface DocumentAdministrativeMetadataOutput { + /** List of procedure information associated with the document. */ + orderedProcedures?: Array; + /** Reference to the encounter associated with the document. */ + encounterId?: string; +} + +/** Procedure information */ +export interface OrderedProcedureOutput { + /** Procedure code */ + code?: CodeableConceptOutput; + /** Procedure description */ + description?: string; + /** Additional Content defined by implementations */ + extension?: Array; +} + +/** The content of the patient document. */ +export interface DocumentContentOutput { + /** + * The type of the content's source. + * In case the source type is 'inline', the content is given as a string (for instance, text). + * In case the source type is 'reference', the content is given as a URI. + * + * Possible values: "inline", "reference" + */ + sourceType: string; + /** The content of the document, given either inline (as a string) or as a reference (URI). */ + value: string; +} + +/** Configuration affecting the Radiology Insights model's inference. */ +export interface RadiologyInsightsModelConfigurationOutput { + /** An indication whether the model should produce verbose output. */ + verbose?: boolean; + /** An indication whether the model's output should include evidence for the inferences. */ + includeEvidence?: boolean; + /** This is a list of inference types to be inferred for the current request. It could be used if only part of the Radiology Insights inferences are required. If this list is omitted or empty, the model will return all the inference types. */ + inferenceTypes?: string[]; + /** Options regarding follow up recommendation inferences and finding inferences. */ + inferenceOptions?: RadiologyInsightsInferenceOptionsOutput; + /** Local for the model to use. If not specified, the model will use the default locale. */ + locale?: string; +} + +/** Options regarding follow up recommendation inferences and finding inferences. */ +export interface RadiologyInsightsInferenceOptionsOutput { + /** Follow-up recommendation options. */ + followupRecommendationOptions?: FollowupRecommendationOptionsOutput; + /** Finding options. */ + findingOptions?: FindingOptionsOutput; +} + +/** Follow-up recommendation options. */ +export interface FollowupRecommendationOptionsOutput { + /** Include/Exclude follow-up recommendations without a specific radiology procedure. Default is false. */ + includeRecommendationsWithNoSpecifiedModality?: boolean; + /** Include/Exclude follow-up recommendations in references to a guideline or article. Default is false. */ + includeRecommendationsInReferences?: boolean; + /** If this is true, provide one or more sentences as evidence for the recommendation, next to the token evidence. The start and end positions of these sentences will be put in an extension with url 'modality_sentences'. Default is false. */ + provideFocusedSentenceEvidence?: boolean; +} + +/** Finding options. */ +export interface FindingOptionsOutput { + /** If this is true, provide the sentence that contains the first token of the finding's clinical indicator (i.e. the medical problem), if there is one. This sentence is provided as an extension with url 'ci_sentence', next to the token evidence. Default is false. */ + provideFocusedSentenceEvidence?: boolean; +} + +/** The inference results for the Radiology Insights request. If field 'status' has value 'succeeded', then field 'result' will contain an instance of RadiologyInsightsInferenceResult. */ +export interface RadiologyInsightsInferenceResultOutput { + /** Results for the patients given in the request. */ + patientResults: Array; + /** The version of the model used for inference, expressed as the model date. */ + modelVersion: string; +} + +/** Results of the model's work for a single patient. */ +export interface RadiologyInsightsPatientResultOutput { + /** Identifier given for the patient in the request. */ + patientId: string; + /** The model's inferences for the given patient. */ + inferences: Array; +} + +/** + * An inference made by the Radiology Insights model regarding a patient. + * - AgeMismatch + * - SexMismatch + * - LateralityDiscrepancy + * - CompleteOrderDiscrepancy + * - LimitedOrderDiscrepancy + * - Finding + * - CriticalResult + * - FollowupRecommendation + * - RadiologyProcedure + * - FollowupCommunication + */ +export interface RadiologyInsightsInferenceOutputParent { + /** Additional Content defined by implementations */ + extension?: Array; + kind: string; +} + +/** A notification for age mismatch is displayed when the age mentioned in a document for a specific patient does not match the age specified in the patient information. */ +export interface AgeMismatchInferenceOutput + extends RadiologyInsightsInferenceOutputParent { + /** Inference type. */ + kind: "ageMismatch"; +} + +/** A notification for a sex mismatch is displayed when the gender, personal pronouns, gender-related body parts, or gender-related procedures mentioned in a patient's clinical document are either inconsistent or do not match the gender specified in the patient information. */ +export interface SexMismatchInferenceOutput + extends RadiologyInsightsInferenceOutputParent { + /** Inference type. */ + kind: "sexMismatch"; + /** Sex indication : SNOMED CT code for gender finding. */ + sexIndication: CodeableConceptOutput; +} + +/** A laterality mismatch occurs when there is a discrepancy between the clinical documentation and the ordered procedure (orderLateralityMismatch), a contradiction within the clinical document (textLateralityContradiction), or when no laterality is mentioned (textLateralityMissing). */ +export interface LateralityDiscrepancyInferenceOutput + extends RadiologyInsightsInferenceOutputParent { + /** Inference type. */ + kind: "lateralityDiscrepancy"; + /** Laterality indication : SNOMED CT code for laterality qualifier value. */ + lateralityIndication?: CodeableConceptOutput; + /** + * Mismatch type : orderLateralityMismatch, textLateralityContradiction, textLateralityMissing. + * + * Possible values: "orderLateralityMismatch", "textLateralityContradiction", "textLateralityMissing" + */ + discrepancyType: string; +} + +/** A complete order discrepancy is shown when one or more body parts and/or measurements that should be in the document (because there is a complete order) are not present. */ +export interface CompleteOrderDiscrepancyInferenceOutput + extends RadiologyInsightsInferenceOutputParent { + /** Inference type. */ + kind: "completeOrderDiscrepancy"; + /** Order type : CPT ultrasound complete code for abdomen, retroperitoneal, pelvis or breast. */ + orderType: CodeableConceptOutput; + /** List of missing body parts required by a complete order : SNOMED CT codes. */ + missingBodyParts?: Array; + /** List of missing body parts that require measurement by a complete order : SNOMED CT codes. */ + missingBodyPartMeasurements?: Array; +} + +/** A limited order discrepancy occurs when there is a limited order, but all body parts and measurements that are needed for a complete order are present in the document. */ +export interface LimitedOrderDiscrepancyInferenceOutput + extends RadiologyInsightsInferenceOutputParent { + /** Inference type. */ + kind: "limitedOrderDiscrepancy"; + /** Order type : CPT ultrasound complete code for abdomen, retroperitoneal, pelvis or breast. */ + orderType: CodeableConceptOutput; + /** List of body parts found in the document : SNOMED CT codes. */ + presentBodyParts?: Array; + /** List of body parts that are measured according to the document : SNOMED CT codes. */ + presentBodyPartMeasurements?: Array; +} + +/** Findings in a radiology report typically describe abnormalities, lesions, or other notable observations related to the anatomy or pathology of the imaged area. */ +export interface FindingInferenceOutput + extends RadiologyInsightsInferenceOutputParent { + /** Inference type. */ + kind: "finding"; + /** Finding data : contains extensions, fields and components linked with the finding. */ + finding: ObservationOutput; +} + +/** Critical results refer to findings of utmost importance that may require timely attention due to their potential impact on patient care. */ +export interface CriticalResultInferenceOutput + extends RadiologyInsightsInferenceOutputParent { + /** Inference type. */ + kind: "criticalResult"; + /** The complete Critical Result, as outlined below, will be reused for the recommendation. */ + result: CriticalResultOutput; +} + +/** Critical Result consists of two properties. */ +export interface CriticalResultOutput { + /** Description : medical problem. */ + description: string; + /** Finding linked to the critical result. */ + finding?: ObservationOutput; +} + +/** Radiology procedures are the specific imaging studies or examinations ordered for the patient, extracted from the document information and text. */ +export interface RadiologyProcedureInferenceOutput + extends RadiologyInsightsInferenceOutputParent { + /** Inference type. */ + kind: "radiologyProcedure"; + /** LOINC codes for the procedure. */ + procedureCodes?: Array; + /** Imaging procedures. */ + imagingProcedures: Array; + /** Ordered procedure information from the document information or text. */ + orderedProcedure: OrderedProcedureOutput; +} + +/** Imaging procedure. */ +export interface ImagingProcedureOutput { + /** Modality : SNOMED CT code. */ + modality: CodeableConceptOutput; + /** Anatomy : SNOMED CT code. */ + anatomy: CodeableConceptOutput; + /** Laterality : SNOMED CT code. */ + laterality?: CodeableConceptOutput; + /** Contrast : see RadiologyCodeWithTypes (below). */ + contrast?: RadiologyCodeWithTypesOutput; + /** View : see RadiologyCodeWithTypes (below). */ + view?: RadiologyCodeWithTypesOutput; +} + +/** Radiology code with types : used in imaging procedure recommendation for contrast and view. */ +export interface RadiologyCodeWithTypesOutput { + /** The SNOMED CT code indicates whether imaging was conducted with or without contrast in the case of contrast, and in the case of views, it denotes the number of views. */ + code: CodeableConceptOutput; + /** The collection of types will indicate the contrast substance used in the case of contrast and, in the case of views, it will specify the types of views, such as lateral and frontal, etc. */ + types: Array; +} + +/** Follow-up recommendations offer guidance to healthcare providers on managing and monitoring patients based on the findings of imaging studies. */ +export interface FollowupRecommendationInferenceOutput + extends RadiologyInsightsInferenceOutputParent { + /** Inference type. */ + kind: "followupRecommendation"; + /** Date and time are displayed when the procedure is recommended to be done at a specific point in time. */ + effectiveAt?: string; + /** The period is shown if a specific period is mentioned, with a start and end date-time. */ + effectivePeriod?: PeriodOutput; + /** Findings related to the recommendation. */ + findings?: Array; + /** The conditional value indicates whether or not the sentence containing the recommendation includes a conditional statement. Keywords for conditional statements include 'if', 'when', 'unless', and so on. */ + isConditional: boolean; + /** The option value indicates whether or not the sentence containing the recommendation includes an optional statement. Keywords for optional statements include 'recommend', 'consider', and so on. */ + isOption: boolean; + /** The guideline value indicates whether or not the recommendation is part of a guideline section that compiles all recommendations applicable to various findings. */ + isGuideline: boolean; + /** Hedging refers to ambiguous, vague or imprecise language within the sentence of the recommendation. Keywords for hedging are 'can be','may be',and so on. */ + isHedging: boolean; + /** The procedure recommendation can be a generic procedure or an imaging procedure. */ + recommendedProcedure: ProcedureRecommendationOutput; +} + +/** Finding reference for recommendation. */ +export interface RecommendationFindingOutput { + /** Finding linked to a recommendation. */ + finding?: ObservationOutput; + /** Critical result linked to a recommendation. */ + criticalFinding?: CriticalResultOutput; + /** + * Recommendation finding status. + * + * Possible values: "present", "differential", "ruleOut", "conditional" + */ + recommendationFindingStatus: string; + /** Additional Content defined by implementations */ + extension?: Array; +} + +/** The procedure recommendation can be a generic procedure or an imaging procedure. */ +export interface ProcedureRecommendationOutputParent { + /** Additional Content defined by implementations */ + extension?: Array; + kind: string; +} + +/** Generic procedure information. */ +export interface GenericProcedureRecommendationOutput + extends ProcedureRecommendationOutputParent { + /** Procedure type : generic. */ + kind: "genericProcedureRecommendation"; + /** Procedure modality : SNOMED CT code. */ + code: CodeableConceptOutput; + /** Procedure description : MANAGEMENT PROCEDURE (PROCEDURE) or CONSULTATION (PROCEDURE) based on SNOMED CT. */ + description?: string; +} + +/** Imaging procedures. */ +export interface ImagingProcedureRecommendationOutput + extends ProcedureRecommendationOutputParent { + /** Procedure type : imaging. */ + kind: "imagingProcedureRecommendation"; + /** LOINC codes for the procedure. */ + procedureCodes?: Array; + /** Imaging procedures. */ + imagingProcedures: Array; +} + +/** Follow-up communication involves the exchange of important information, recommendations, or updates between radiologists and other healthcare professionals involved in a patient's care. */ +export interface FollowupCommunicationInferenceOutput + extends RadiologyInsightsInferenceOutputParent { + /** Inference type. */ + kind: "followupCommunication"; + /** Communication date and time. */ + communicatedAt?: string[]; + /** Recipient of the communication. */ + recipient?: string[]; + /** Communication was acknowledged. */ + wasAcknowledged: boolean; +} + +/** A response containing error details. */ +export interface HealthInsightsErrorResponseOutput { + /** The error object. */ + error: ErrorModel; + /** An opaque, globally-unique, server-generated string identifier for the request. */ + requestId: { response: RequestIdResponseHeaderOutput }; +} + +/** + * A resource with narrative, extensions, and contained resources + * Based on [FHIR DomainResource](https://www.hl7.org/fhir/domainresource.html) + */ +export type DomainResourceOutput = + | DomainResourceOutputParent + | ObservationOutput + | ConditionOutput + | ResearchStudyOutput; +/** + * An inference made by the Radiology Insights model regarding a patient. + * - AgeMismatch + * - SexMismatch + * - LateralityDiscrepancy + * - CompleteOrderDiscrepancy + * - LimitedOrderDiscrepancy + * - Finding + * - CriticalResult + * - FollowupRecommendation + * - RadiologyProcedure + * - FollowupCommunication + */ +export type RadiologyInsightsInferenceOutput = + | RadiologyInsightsInferenceOutputParent + | AgeMismatchInferenceOutput + | SexMismatchInferenceOutput + | LateralityDiscrepancyInferenceOutput + | CompleteOrderDiscrepancyInferenceOutput + | LimitedOrderDiscrepancyInferenceOutput + | FindingInferenceOutput + | CriticalResultInferenceOutput + | RadiologyProcedureInferenceOutput + | FollowupRecommendationInferenceOutput + | FollowupCommunicationInferenceOutput; +/** The procedure recommendation can be a generic procedure or an imaging procedure. */ +export type ProcedureRecommendationOutput = + | ProcedureRecommendationOutputParent + | GenericProcedureRecommendationOutput + | ImagingProcedureRecommendationOutput; diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/parameters.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/parameters.ts new file mode 100644 index 000000000000..06a0ce49b380 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/parameters.ts @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { RequestParameters } from "@azure-rest/core-client"; +import { RadiologyInsightsJob } from "./models"; + +export interface GetJobQueryParamProperties { + /** Expand the indicated resources into the response. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */ + expand?: string; +} + +export interface GetJobQueryParam { + queryParameters?: GetJobQueryParamProperties; +} + +export type GetJobParameters = GetJobQueryParam & RequestParameters; + +export interface CreateJobBodyParam { + /** The resource instance. */ + body: RadiologyInsightsJob; +} + +export interface CreateJobQueryParamProperties { + /** Expand the indicated resources into the response. This parameter needs to be formatted as multi collection, we provide buildMultiCollection from serializeHelper.ts to help, you will probably need to set skipUrlEncoding as true when sending the request */ + expand?: string; +} + +export interface CreateJobQueryParam { + queryParameters?: CreateJobQueryParamProperties; +} + +export type CreateJobParameters = CreateJobQueryParam & + CreateJobBodyParam & + RequestParameters; diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/pollingHelper.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/pollingHelper.ts new file mode 100644 index 000000000000..e6cc803302b5 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/pollingHelper.ts @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Client, HttpResponse } from "@azure-rest/core-client"; +import { + CreateHttpPollerOptions, + LongRunningOperation, + LroResponse, + OperationState, + SimplePollerLike, + createHttpPoller, +} from "@azure/core-lro"; +import { + CreateJob200Response, + CreateJob201Response, + CreateJobDefaultResponse, + CreateJobLogicalResponse, +} from "./responses"; +/** + * Helper function that builds a Poller object to help polling a long running operation. + * @param client - Client to use for sending the request to get additional pages. + * @param initialResponse - The initial response. + * @param options - Options to set a resume state or custom polling interval. + * @returns - A poller object to poll for operation state updates and eventually get the final response. + */ +export async function getLongRunningPoller< + TResult extends CreateJobLogicalResponse | CreateJobDefaultResponse, +>( + client: Client, + initialResponse: + | CreateJob200Response + | CreateJob201Response + | CreateJobDefaultResponse, + options?: CreateHttpPollerOptions>, +): Promise, TResult>>; +export async function getLongRunningPoller( + client: Client, + initialResponse: TResult, + options: CreateHttpPollerOptions> = {}, +): Promise, TResult>> { + const poller: LongRunningOperation = { + requestMethod: initialResponse.request.method, + requestPath: initialResponse.request.url, + sendInitialRequest: async () => { + // In the case of Rest Clients we are building the LRO poller object from a response that's the reason + // we are not triggering the initial request here, just extracting the information from the + // response we were provided. + return getLroResponse(initialResponse); + }, + sendPollRequest: async (path) => { + // This is the callback that is going to be called to poll the service + // to get the latest status. We use the client provided and the polling path + // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location + // depending on the lro pattern that the service implements. If non is provided we default to the initial path. + const response = await client + .pathUnchecked(path ?? initialResponse.request.url) + .get(); + const lroResponse = getLroResponse(response as TResult); + lroResponse.rawResponse.headers["x-ms-original-url"] = + initialResponse.request.url; + return lroResponse; + }, + }; + + options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true; + return createHttpPoller(poller, options); +} + +/** + * Converts a Rest Client response to a response that the LRO implementation understands + * @param response - a rest client http response + * @returns - An LRO response that the LRO implementation understands + */ +function getLroResponse( + response: TResult, +): LroResponse { + if (Number.isNaN(response.status)) { + throw new TypeError( + `Status code of the response is not a number. Value: ${response.status}`, + ); + } + + return { + flatResponse: response, + rawResponse: { + ...response, + statusCode: Number.parseInt(response.status), + body: response.body, + }, + }; +} diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/responses.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/responses.ts new file mode 100644 index 000000000000..94e12bf4f957 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/responses.ts @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { RawHttpHeaders } from "@azure/core-rest-pipeline"; +import { HttpResponse } from "@azure-rest/core-client"; +import { + RadiologyInsightsJobOutput, + HealthInsightsErrorResponseOutput, +} from "./outputModels"; + +export interface GetJob200Headers { + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + "retry-after"?: number; + /** An opaque, globally-unique, server-generated string identifier for the request. */ + "x-ms-request-id"?: string; +} + +/** The request has succeeded. */ +export interface GetJob200Response extends HttpResponse { + status: "200"; + body: RadiologyInsightsJobOutput; + headers: RawHttpHeaders & GetJob200Headers; +} + +export interface GetJobDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; + /** An opaque, globally-unique, server-generated string identifier for the request. */ + "x-ms-request-id"?: string; +} + +export interface GetJobDefaultResponse extends HttpResponse { + status: string; + body: HealthInsightsErrorResponseOutput; + headers: RawHttpHeaders & GetJobDefaultHeaders; +} + +export interface CreateJob200Headers { + /** An opaque, globally-unique, server-generated string identifier for the request. */ + "x-ms-request-id"?: string; + /** The location for monitoring the operation state. */ + "operation-location": string; +} + +/** The request has succeeded. */ +export interface CreateJob200Response extends HttpResponse { + status: "200"; + body: RadiologyInsightsJobOutput; + headers: RawHttpHeaders & CreateJob200Headers; +} + +export interface CreateJob201Headers { + /** An opaque, globally-unique, server-generated string identifier for the request. */ + "x-ms-request-id"?: string; + /** The location for monitoring the operation state. */ + "operation-location": string; +} + +/** The request has succeeded and a new resource has been created as a result. */ +export interface CreateJob201Response extends HttpResponse { + status: "201"; + body: RadiologyInsightsJobOutput; + headers: RawHttpHeaders & CreateJob201Headers; +} + +export interface CreateJobDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; + /** An opaque, globally-unique, server-generated string identifier for the request. */ + "x-ms-request-id"?: string; +} + +export interface CreateJobDefaultResponse extends HttpResponse { + status: string; + body: HealthInsightsErrorResponseOutput; + headers: RawHttpHeaders & CreateJobDefaultHeaders; +} + +/** The final response for long-running createJob operation */ +export interface CreateJobLogicalResponse extends HttpResponse { + status: "200"; + body: RadiologyInsightsJobOutput; +} diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/serializeHelper.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/serializeHelper.ts new file mode 100644 index 000000000000..710a5bf2a759 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/src/serializeHelper.ts @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +export function buildMultiCollection(items: string[], parameterName: string) { + return items + .map((item, index) => { + if (index === 0) { + return item; + } + return `${parameterName}=${item}`; + }) + .join("&"); +} diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/sampleTest.spec.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..bce68e428645 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/sampleTest.spec.ts @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Recorder } from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { createRecorder } from "./utils/recordedClient"; +import { Context } from "mocha"; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function (this: Context) { + recorder = await createRecorder(this); + }); + + afterEach(async function () { + await recorder.stop(); + }); + + it("sample test", async function () { + assert.equal(1, 1); + }); +}); diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/env.browser.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/env.browser.ts new file mode 100644 index 000000000000..fd2aca680c7b --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/env.browser.ts @@ -0,0 +1,2 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/env.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/env.ts new file mode 100644 index 000000000000..0e06855b73ae --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/env.ts @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import * as dotenv from "dotenv"; + +dotenv.config(); diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/recordedClient.ts b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/recordedClient.ts new file mode 100644 index 000000000000..6cc58bc15e11 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/test/public/utils/recordedClient.ts @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { Context } from "mocha"; +import { Recorder, RecorderStartOptions } from "@azure-tools/test-recorder"; +import "./env"; + +const envSetupForPlayback: Record = { + ENDPOINT: "https://endpoint", + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id", +}; + +const recorderEnvSetup: RecorderStartOptions = { + envSetupForPlayback, +}; + +/** + * creates the recorder and reads the environment variables from the `.env` file. + * Should be called first in the test suite to make sure environment variables are + * read before they are being used. + */ +export async function createRecorder(context: Context): Promise { + const recorder = new Recorder(context.currentTest); + await recorder.start(recorderEnvSetup); + return recorder; +} diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/tsconfig.json b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/tsconfig.json new file mode 100644 index 000000000000..d5bf593423c9 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../../../tsconfig.package", + "compilerOptions": { + "outDir": "./dist-esm", + "declarationDir": "./types" + }, + "include": [ + "src/**/*.ts", + "./test/**/*.ts" + ] +} \ No newline at end of file diff --git a/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/tsp-location.yaml b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/tsp-location.yaml new file mode 100644 index 000000000000..1cd8ff006ad1 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsradiologyinsights-rest/tsp-location.yaml @@ -0,0 +1,7 @@ +directory: specification/ai/HealthInsights/HealthInsights.RadiologyInsights +repo: Azure/azure-rest-api-specs +commit: 5e4eba656e8ef3842f03bd1fffd4c7a23e8d05cd +additionalDirectories: +- specification/ai/HealthInsights/HealthInsights.Common/ +- specification/ai/HealthInsights/HealthInsights.OpenAPI/ + diff --git a/sdk/healthinsights/ci.yml b/sdk/healthinsights/ci.yml index 31275b994b2d..63011453cfb5 100644 --- a/sdk/healthinsights/ci.yml +++ b/sdk/healthinsights/ci.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -9,7 +9,6 @@ trigger: paths: include: - sdk/healthinsights/ - pr: branches: include: @@ -31,3 +30,5 @@ extends: safeName: azureresthealthinsightscancerprofiling - name: azure-rest-health-insights-clinicalmatching safeName: azureresthealthinsightsclinicalmatching + - name: azure-rest-health-insights-radiologyinsights + safeName: azureresthealthinsightsradiologyinsights