From 4171c8704feedddfa6787d9bc51873c3239bd2df Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 1 Feb 2024 19:06:51 +0000 Subject: [PATCH] CodeGen from PR 27614 in Azure/azure-rest-api-specs Merge db33fc2adc0cdba39caa509506e3de0bacbc3707 into 784dcbc568c61801a33dfe197cb785ffe22a9dec --- .../.eslintrc.json | 11 + .../README.md | 59 + .../api-extractor.json | 31 + .../karma.conf.js | 133 +++ .../package.json | 117 ++ .../src/azureHealthInsightsClient.ts | 48 + .../src/clientDefinitions.ts | 36 + .../src/index.ts | 15 + .../src/isUnexpected.ts | 116 ++ .../src/logger.ts | 5 + .../src/models.ts | 825 +++++++++++++ .../src/outputModels.ts | 1027 +++++++++++++++++ .../src/parameters.ts | 27 + .../src/pollingHelper.ts | 87 ++ .../src/responses.ts | 66 ++ .../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 + 21 files changed, 2681 insertions(+) create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/.eslintrc.json create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/README.md create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/api-extractor.json create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/karma.conf.js create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/package.json create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/azureHealthInsightsClient.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/clientDefinitions.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/index.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/isUnexpected.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/logger.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/models.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/outputModels.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/parameters.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/pollingHelper.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/responses.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/test/public/sampleTest.spec.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/test/public/utils/env.browser.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/test/public/utils/env.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/test/public/utils/recordedClient.ts create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/tsconfig.json create mode 100644 sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/tsp-location.yaml diff --git a/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/.eslintrc.json b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/.eslintrc.json new file mode 100644 index 000000000000..619797ac39b6 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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/azurehealthinsightsclinicalmatching-rest/README.md b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/README.md new file mode 100644 index 000000000000..e7266b454ee8 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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/azurehealthinsightsclinicalmatching-rest) +- [Package (NPM)](https://www.npmjs.com/package/@azure-rest/health-insights-clinicalmatching) +- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure-rest/health-insights-clinicalmatching?view=azure-node-preview) +- [Samples](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthinsights/azurehealthinsightsclinicalmatching-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-clinicalmatching` package + +Install the AzureHealthInsights REST client REST client library for JavaScript with `npm`: + +```bash +npm install @azure-rest/health-insights-clinicalmatching +``` + +### 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/azurehealthinsightsclinicalmatching-rest/api-extractor.json b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/api-extractor.json new file mode 100644 index 000000000000..98d7c2dc5e59 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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-clinicalmatching.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/azurehealthinsightsclinicalmatching-rest/karma.conf.js b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/karma.conf.js new file mode 100644 index 000000000000..a9d5f1b5fc59 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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/azurehealthinsightsclinicalmatching-rest/package.json b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/package.json new file mode 100644 index 000000000000..e4880861d8b7 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/package.json @@ -0,0 +1,117 @@ +{ + "name": "@azure-rest/health-insights-clinicalmatching", + "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-clinicalmatching.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-clinicalmatching.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.3.0", + "@azure-rest/core-client": "^1.1.6", + "@azure/core-rest-pipeline": "^1.12.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.2.0", + "@azure/dev-tool": "^1.0.0", + "@azure/eslint-plugin-azure-sdk": "^3.0.0", + "@azure-tools/test-credential": "^1.0.0", + "@azure/identity": "^3.3.0", + "@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/azurehealthinsightsclinicalmatching-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/azurehealthinsightsclinicalmatching-rest/src/azureHealthInsightsClient.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/azureHealthInsightsClient.ts new file mode 100644 index 000000000000..04340c099f7b --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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-clinicalmatching-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/azurehealthinsightsclinicalmatching-rest/src/clientDefinitions.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/clientDefinitions.ts new file mode 100644 index 000000000000..bcfb8b88948a --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/clientDefinitions.ts @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { GetJobParameters, CreateJobParameters } from "./parameters"; +import { + GetJob200Response, + GetJobDefaultResponse, + CreateJob202Response, + CreateJobDefaultResponse, +} from "./responses"; +import { Client, StreamableMethod } from "@azure-rest/core-client"; + +export interface GetJob { + /** Gets the status and details of the Trial Matcher job. */ + get( + options?: GetJobParameters, + ): StreamableMethod; +} + +export interface CreateJob { + /** Creates a Trial Matcher job with the given request body. */ + post( + options?: CreateJobParameters, + ): StreamableMethod; +} + +export interface Routes { + /** Resource for '/trial-matcher/jobs/\{id\}' has methods for the following verbs: get */ + (path: "/trial-matcher/jobs/{id}", id: string): GetJob; + /** Resource for '/trial-matcher/jobs' has methods for the following verbs: post */ + (path: "/trial-matcher/jobs"): CreateJob; +} + +export type AzureHealthInsightsClient = Client & { + path: Routes; +}; diff --git a/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/index.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/index.ts new file mode 100644 index 000000000000..f11345b137ab --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/index.ts @@ -0,0 +1,15 @@ +// 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 default AzureHealthInsightsClient; diff --git a/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/isUnexpected.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/isUnexpected.ts new file mode 100644 index 000000000000..aa89d5d09e99 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/isUnexpected.ts @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { + GetJob200Response, + GetJobDefaultResponse, + CreateJob202Response, + CreateJobLogicalResponse, + CreateJobDefaultResponse, +} from "./responses"; + +const responseMap: Record = { + "GET /trial-matcher/jobs/{id}": ["200"], + "POST /trial-matcher/jobs": ["202"], + "GET /trial-matcher/jobs": ["200", "202"], +}; + +export function isUnexpected( + response: GetJob200Response | GetJobDefaultResponse, +): response is GetJobDefaultResponse; +export function isUnexpected( + response: + | CreateJob202Response + | CreateJobLogicalResponse + | CreateJobDefaultResponse, +): response is CreateJobDefaultResponse; +export function isUnexpected( + response: + | GetJob200Response + | GetJobDefaultResponse + | CreateJob202Response + | 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/azurehealthinsightsclinicalmatching-rest/src/logger.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/logger.ts new file mode 100644 index 000000000000..85e568a23186 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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-clinicalmatching"); diff --git a/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/models.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/models.ts new file mode 100644 index 000000000000..ad3d0d18a3be --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/models.ts @@ -0,0 +1,825 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +/** The body of the Trial Matcher request. */ +export interface TrialMatcherData { + /** The list of patients, including their clinical information and data. */ + patients: Array; + /** Configuration affecting the Trial Matcher model's inference. */ + configuration?: TrialMatcherModelConfiguration; +} + +/** 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. */ + info?: PatientInfo; + /** 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 PatientInfo { + /** + * 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; +} + +/** 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 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; +} + +/** + * 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 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 }[]; +} + +/** + * 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 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; +} + +/** visit/encounter information */ +export interface Encounter { + /** 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. */ + createdDateTime?: 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 { + /** Additional Content defined by implementations */ + extension?: Array; + /** Procedure code */ + code?: CodeableConcept; + /** Procedure description */ + description?: string; +} + +/** 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 Trial Matcher model's inference. */ +export interface TrialMatcherModelConfiguration { + /** 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; + /** + * The clinical trials that the patient(s) should be matched to.
The trial + * selection can be given as a list of custom clinical trials and/or a list of + * filters to known clinical trial registries. In case both are given, the + * resulting trial set is a union of the two sets. + */ + clinicalTrials: ClinicalTrials; +} + +/** + * The clinical trials that the patient(s) should be matched to. + * The trial selection can be given as a list of custom clinical trials and/or a list of filters to known clinical trial registries. + * In case both are given, the resulting trial set is a union of the two sets. + */ +export interface ClinicalTrials { + /** A list of clinical trials. */ + customTrials?: Array; + /** + * A list of filters, each one creating a selection of trials from a given + * clinical trial registry. + */ + registryFilters?: Array; +} + +/** A filter defining a subset of clinical trials from a given clinical trial registry (e.g. clinicaltrials.gov). */ +export interface ClinicalTrialRegistryFilter { + /** + * Trials with any of the given medical conditions will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the medical conditions. + */ + conditions?: string[]; + /** + * Trials with any of the given study types will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the study types. + */ + studyTypes?: string[]; + /** + * Trials with any of the given recruitment statuses will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the recruitment statuses. + */ + recruitmentStatuses?: string[]; + /** + * Trials with any of the given sponsors will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the sponsors. + */ + sponsors?: string[]; + /** + * Trials with any of the given phases will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the phases. + */ + phases?: string[]; + /** + * Trials with any of the given purposes will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the purposes. + */ + purposes?: string[]; + /** + * Trials with any of the given identifiers will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial identifiers. + */ + ids?: string[]; + /** + * Trials with any of the given sources will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the sources. + */ + sources?: string[]; + /** + * Trials with any of the given facility names will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility names. + */ + facilityNames?: string[]; + /** + * Trials with any of the given facility locations will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility locations. + */ + facilityLocations?: Array; + /** + * Trials with any of the given facility area boundaries will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility area boundaries. + */ + facilityAreas?: Array; +} + +/** + * A location given as a combination of city, state and country/region. It could specify a city, a state or a country/region. + * In case a city is specified, either state +country/region or country/region (for countries/regions where there are no states) should be added. + * In case a state is specified (without a city), country/region should be added. + */ +export interface GeographicLocation { + /** City name. */ + city?: string; + /** State name. */ + state?: string; + /** Country/region name. */ + countryOrRegion: string; +} + +/** A geographic area, expressed as a `Circle` geometry represented using a `GeoJSON Feature` (see [GeoJSON spec](https://tools.ietf.org/html/rfc7946)). */ +export interface GeographicArea { + /** + * `GeoJSON` type. + * + * Possible values: "Feature" + */ + type: string; + /** `GeoJSON` geometry, representing the area circle's center. */ + geometry: AreaGeometry; + /** `GeoJSON` object properties. */ + properties: AreaProperties; +} + +/** `GeoJSON` geometry, representing the area circle's center. */ +export interface AreaGeometry { + /** + * `GeoJSON` geometry type. + * + * Possible values: "Point" + */ + type: string; + /** + * Coordinates of the area circle's center, represented according to the `GeoJSON` standard. + * This is an array of 2 decimal numbers, longitude and latitude (precisely in this order). + */ + coordinates: number[]; +} + +/** `GeoJSON` object properties. */ +export interface AreaProperties { + /** + * `GeoJSON` object sub-type. + * + * Possible values: "Circle" + */ + subType: string; + /** The radius of the area's circle, in meters. */ + radius: number; +} + +/** + * A resource with narrative, extensions, and contained resources + * Based on [FHIR DomainResource](https://www.hl7.org/fhir/domainresource.html) + */ +export type DomainResource = + | DomainResourceParent + | ResearchStudy + | Condition + | Observation; diff --git a/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/outputModels.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/outputModels.ts new file mode 100644 index 000000000000..dcd9cf69d173 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/outputModels.ts @@ -0,0 +1,1027 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { ErrorModel } from "@azure-rest/core-client"; + +/** The response for the Trial Matcher request. */ +export interface TrialMatcherResultOutput { + /** The unique ID of the operation. */ + readonly id: string; + /** + * The status of the operation + * + * Possible values: "notStarted", "running", "succeeded", "failed", "canceled" + */ + readonly status: string; + /** The date and time when the processing job was created. */ + readonly createdDateTime?: string; + /** The date and time when the processing job is set to expire. */ + readonly expirationDateTime?: string; + /** The date and time when the processing job was last updated. */ + readonly lastUpdateDateTime?: string; + /** Error object that describes the error when status is "Failed". */ + error?: ErrorModel; + /** The result of the operation. */ + result?: TrialMatcherInferenceResultOutput; +} + +/** The inference results for the Trial Matcher request. */ +export interface TrialMatcherInferenceResultOutput { + /** 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; + /** The date when the clinical trials knowledge graph was last updated. */ + knowledgeGraphLastUpdateDate?: string; +} + +/** The results of the model's work for a single patient. */ +export interface TrialMatcherPatientResultOutput { + /** The identifier given for the patient in the request. */ + patientId: string; + /** The inference results for the patient. */ + inferences: Array; + /** Clinical information which is needed to provide better trial matching results for the patient. */ + neededClinicalInfo?: Array; +} + +/** An inference made by the Trial Matcher model regarding a patient. */ +export interface TrialMatcherInferenceOutput { + /** + * The type of the Trial Matcher inference. + * + * Possible values: "trialEligibility" + */ + type: string; + /** The value of the inference, as relevant for the given inference type. */ + value: string; + /** The description corresponding to the inference value. */ + description?: string; + /** Confidence score for this inference. */ + confidenceScore?: number; + /** The evidence corresponding to the inference value. */ + evidence?: Array; + /** The identifier of the clinical trial. */ + clinicalTrialId?: string; + /** + * Possible sources of a clinical trial. + * + * Possible values: "custom", "clinicaltrials.gov" + */ + source?: string; + /** Trial data which is of interest to the potential participant. */ + metadata?: ClinicalTrialMetadataOutput; +} + +/** A piece of evidence corresponding to a Trial Matcher inference. */ +export interface TrialMatcherInferenceEvidenceOutput { + /** A piece of evidence from the eligibility criteria text of a clinical trial. */ + eligibilityCriteriaEvidence?: string; + /** A piece of evidence from a clinical note (text document). */ + patientDataEvidence?: ClinicalNoteEvidenceOutput; + /** + * A piece of clinical information, expressed as a code in a clinical coding + * system. + */ + patientInfoEvidence?: ClinicalCodedElementOutput; + /** A value indicating how important this piece of evidence is for the inference. */ + importance?: number; +} + +/** A piece of evidence from a clinical note (text document). */ +export interface ClinicalNoteEvidenceOutput { + /** The identifier of the document containing the evidence. */ + id: string; + /** The actual text span which is evidence for the inference. */ + text?: string; + /** The start index of the evidence text span in the document (0 based). */ + offset: number; + /** The length of the evidence text span. */ + length: number; +} + +/** A piece of clinical information, expressed as a code in a clinical coding system. */ +export interface ClinicalCodedElementOutput { + /** The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. */ + system: string; + /** The code within the given clinical coding system. */ + code: string; + /** The name of this coded concept in the coding system. */ + name?: string; + /** A value associated with the code within the given clinical coding system. */ + value?: string; +} + +/** Trial data which is of interest to the potential participant. */ +export interface ClinicalTrialMetadataOutput { + /** + * Phases which are relevant for the clinical trial. + * Each clinical trial can be in a certain phase or in multiple phases. + */ + phases?: string[]; + /** + * Possible study types of a clinical trial. + * + * Possible values: "interventional", "observational", "expandedAccess", "patientRegistries" + */ + studyType?: string; + /** + * Possible recruitment status of a clinical trial. + * + * Possible values: "unknownStatus", "notYetRecruiting", "recruiting", "enrollingByInvitation" + */ + recruitmentStatus?: string; + /** Medical conditions and their synonyms which are relevant for the clinical trial, given as strings. */ + conditions: string[]; + /** Sponsors/collaborators involved with the trial. */ + sponsors?: string[]; + /** Contact details of the trial administrators, for patients that want to participate in the trial. */ + contacts?: Array; + /** Research facilities where the clinical trial is conducted. */ + facilities?: Array; +} + +/** A person's contact details. */ +export interface ContactDetailsOutput { + /** The person's name. */ + name?: string; + /** The person's email. */ + email?: string; + /** A person's phone number. */ + phone?: string; +} + +/** Details of a research facility where a clinical trial is conducted. */ +export interface ClinicalTrialResearchFacilityOutput { + /** The facility's name. */ + name: string; + /** City name. */ + city?: string; + /** State name. */ + state?: string; + /** Country/region name. */ + countryOrRegion: string; +} + +/** A piece of clinical information, expressed as a code in a clinical coding system, extended by semantic information. */ +export interface ExtendedClinicalCodedElementOutput { + /** The clinical coding system, e.g. ICD-10, SNOMED-CT, UMLS. */ + system: string; + /** The code within the given clinical coding system. */ + code: string; + /** The name of this coded concept in the coding system. */ + name?: string; + /** A value associated with the code within the given clinical coding system. */ + value?: string; + /** The [UMLS semantic type](https://www.nlm.nih.gov/research/umls/META3_current_semantic_types.html) associated with the coded concept. */ + semanticType?: string; + /** The bio-medical category related to the coded concept, e.g. Diagnosis, Symptom, Medication, Examination. */ + category?: string; +} + +/** The body of the Trial Matcher request. */ +export interface TrialMatcherDataOutput { + /** The list of patients, including their clinical information and data. */ + patients: Array; + /** Configuration affecting the Trial Matcher model's inference. */ + configuration?: TrialMatcherModelConfigurationOutput; +} + +/** 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. */ + info?: PatientInfoOutput; + /** 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 PatientInfoOutput { + /** + * 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; +} + +/** 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 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; +} + +/** + * 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 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 }[]; +} + +/** + * 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 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; +} + +/** visit/encounter information */ +export interface EncounterOutput { + /** 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. */ + createdDateTime?: 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 { + /** Additional Content defined by implementations */ + extension?: Array; + /** Procedure code */ + code?: CodeableConceptOutput; + /** Procedure description */ + description?: string; +} + +/** 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 Trial Matcher model's inference. */ +export interface TrialMatcherModelConfigurationOutput { + /** 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; + /** + * The clinical trials that the patient(s) should be matched to.
The trial + * selection can be given as a list of custom clinical trials and/or a list of + * filters to known clinical trial registries. In case both are given, the + * resulting trial set is a union of the two sets. + */ + clinicalTrials: ClinicalTrialsOutput; +} + +/** + * The clinical trials that the patient(s) should be matched to. + * The trial selection can be given as a list of custom clinical trials and/or a list of filters to known clinical trial registries. + * In case both are given, the resulting trial set is a union of the two sets. + */ +export interface ClinicalTrialsOutput { + /** A list of clinical trials. */ + customTrials?: Array; + /** + * A list of filters, each one creating a selection of trials from a given + * clinical trial registry. + */ + registryFilters?: Array; +} + +/** A filter defining a subset of clinical trials from a given clinical trial registry (e.g. clinicaltrials.gov). */ +export interface ClinicalTrialRegistryFilterOutput { + /** + * Trials with any of the given medical conditions will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the medical conditions. + */ + conditions?: string[]; + /** + * Trials with any of the given study types will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the study types. + */ + studyTypes?: string[]; + /** + * Trials with any of the given recruitment statuses will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the recruitment statuses. + */ + recruitmentStatuses?: string[]; + /** + * Trials with any of the given sponsors will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the sponsors. + */ + sponsors?: string[]; + /** + * Trials with any of the given phases will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the phases. + */ + phases?: string[]; + /** + * Trials with any of the given purposes will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the purposes. + */ + purposes?: string[]; + /** + * Trials with any of the given identifiers will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial identifiers. + */ + ids?: string[]; + /** + * Trials with any of the given sources will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the sources. + */ + sources?: string[]; + /** + * Trials with any of the given facility names will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility names. + */ + facilityNames?: string[]; + /** + * Trials with any of the given facility locations will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility locations. + */ + facilityLocations?: Array; + /** + * Trials with any of the given facility area boundaries will be included in the selection (provided that other limitations are satisfied). + * Leaving this list empty will not limit the trial facility area boundaries. + */ + facilityAreas?: Array; +} + +/** + * A location given as a combination of city, state and country/region. It could specify a city, a state or a country/region. + * In case a city is specified, either state +country/region or country/region (for countries/regions where there are no states) should be added. + * In case a state is specified (without a city), country/region should be added. + */ +export interface GeographicLocationOutput { + /** City name. */ + city?: string; + /** State name. */ + state?: string; + /** Country/region name. */ + countryOrRegion: string; +} + +/** A geographic area, expressed as a `Circle` geometry represented using a `GeoJSON Feature` (see [GeoJSON spec](https://tools.ietf.org/html/rfc7946)). */ +export interface GeographicAreaOutput { + /** + * `GeoJSON` type. + * + * Possible values: "Feature" + */ + type: string; + /** `GeoJSON` geometry, representing the area circle's center. */ + geometry: AreaGeometryOutput; + /** `GeoJSON` object properties. */ + properties: AreaPropertiesOutput; +} + +/** `GeoJSON` geometry, representing the area circle's center. */ +export interface AreaGeometryOutput { + /** + * `GeoJSON` geometry type. + * + * Possible values: "Point" + */ + type: string; + /** + * Coordinates of the area circle's center, represented according to the `GeoJSON` standard. + * This is an array of 2 decimal numbers, longitude and latitude (precisely in this order). + */ + coordinates: number[]; +} + +/** `GeoJSON` object properties. */ +export interface AreaPropertiesOutput { + /** + * `GeoJSON` object sub-type. + * + * Possible values: "Circle" + */ + subType: string; + /** The radius of the area's circle, in meters. */ + radius: number; +} + +/** Provides status details for long running operations. */ +export interface HealthInsightsOperationStatusOutput { + /** The unique ID of the operation. */ + readonly id: string; + /** + * The status of the operation + * + * Possible values: "notStarted", "running", "succeeded", "failed", "canceled" + */ + readonly status: string; + /** The date and time when the processing job was created. */ + readonly createdDateTime?: string; + /** The date and time when the processing job is set to expire. */ + readonly expirationDateTime?: string; + /** The date and time when the processing job was last updated. */ + readonly lastUpdateDateTime?: string; + /** Error object that describes the error when status is "Failed". */ + error?: ErrorModel; + /** The result of the operation. */ + result?: TrialMatcherInferenceResultOutput; +} + +/** + * A resource with narrative, extensions, and contained resources + * Based on [FHIR DomainResource](https://www.hl7.org/fhir/domainresource.html) + */ +export type DomainResourceOutput = + | DomainResourceOutputParent + | ResearchStudyOutput + | ConditionOutput + | ObservationOutput; +/** Alias for RepeatabilityResultOutput */ +export type RepeatabilityResultOutput = "accepted" | "rejected"; diff --git a/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/parameters.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/parameters.ts new file mode 100644 index 000000000000..39ead02cb008 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/parameters.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { RawHttpHeadersInput } from "@azure/core-rest-pipeline"; +import { RequestParameters } from "@azure-rest/core-client"; +import { TrialMatcherData } from "./models"; + +export type GetJobParameters = RequestParameters; + +export interface CreateJobHeaders { + /** An opaque, globally-unique, client-generated string identifier for the request. */ + "Repeatability-Request-ID"?: string; + /** Specifies the date and time at which the request was first created. */ + "Repeatability-First-Sent"?: string; +} + +export interface CreateJobBodyParam { + body?: TrialMatcherData; +} + +export interface CreateJobHeaderParam { + headers?: RawHttpHeadersInput & CreateJobHeaders; +} + +export type CreateJobParameters = CreateJobHeaderParam & + CreateJobBodyParam & + RequestParameters; diff --git a/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/pollingHelper.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/pollingHelper.ts new file mode 100644 index 000000000000..8d11d40e171e --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/pollingHelper.ts @@ -0,0 +1,87 @@ +// 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 { + CreateJob202Response, + 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: CreateJob202Response | 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/azurehealthinsightsclinicalmatching-rest/src/responses.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/responses.ts new file mode 100644 index 000000000000..eecc04a2cd01 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/src/responses.ts @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { RawHttpHeaders } from "@azure/core-rest-pipeline"; +import { HttpResponse, ErrorResponse } from "@azure-rest/core-client"; +import { + TrialMatcherResultOutput, + RepeatabilityResultOutput, + HealthInsightsOperationStatusOutput, +} 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; +} + +/** The request has succeeded. */ +export interface GetJob200Response extends HttpResponse { + status: "200"; + body: TrialMatcherResultOutput; + headers: RawHttpHeaders & GetJob200Headers; +} + +export interface GetJobDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface GetJobDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & GetJobDefaultHeaders; +} + +export interface CreateJob202Headers { + /** The location for monitoring the operation state. */ + "operation-location": string; + /** The Retry-After header can indicate how long the client should wait before polling the operation status. */ + "retry-after"?: number; + /** Indicates whether the repeatable request was accepted or rejected. */ + "repeatability-result"?: RepeatabilityResultOutput; +} + +/** The request has been accepted for processing, but processing has not yet completed. */ +export interface CreateJob202Response extends HttpResponse { + status: "202"; + body: HealthInsightsOperationStatusOutput; + headers: RawHttpHeaders & CreateJob202Headers; +} + +export interface CreateJobDefaultHeaders { + /** String error code indicating what went wrong. */ + "x-ms-error-code"?: string; +} + +export interface CreateJobDefaultResponse extends HttpResponse { + status: string; + body: ErrorResponse; + headers: RawHttpHeaders & CreateJobDefaultHeaders; +} + +/** The final response for long-running createJob operation */ +export interface CreateJobLogicalResponse extends HttpResponse { + status: "200"; + body: HealthInsightsOperationStatusOutput; +} diff --git a/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/test/public/sampleTest.spec.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/test/public/sampleTest.spec.ts new file mode 100644 index 000000000000..bce68e428645 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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/azurehealthinsightsclinicalmatching-rest/test/public/utils/env.browser.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/test/public/utils/env.browser.ts new file mode 100644 index 000000000000..fd2aca680c7b --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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/azurehealthinsightsclinicalmatching-rest/test/public/utils/env.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/test/public/utils/env.ts new file mode 100644 index 000000000000..0e06855b73ae --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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/azurehealthinsightsclinicalmatching-rest/test/public/utils/recordedClient.ts b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/test/public/utils/recordedClient.ts new file mode 100644 index 000000000000..6cc58bc15e11 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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/azurehealthinsightsclinicalmatching-rest/tsconfig.json b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/tsconfig.json new file mode 100644 index 000000000000..d5bf593423c9 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-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/azurehealthinsightsclinicalmatching-rest/tsp-location.yaml b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/tsp-location.yaml new file mode 100644 index 000000000000..bf12f75d2a69 --- /dev/null +++ b/sdk/healthinsights/azurehealthinsightsclinicalmatching-rest/tsp-location.yaml @@ -0,0 +1,7 @@ +repo: Azure/azure-rest-api-specs +directory: specification/ai/HealthInsights/HealthInsights.TrialMatcher +additionalDirectories: +- specification/ai/HealthInsights/HealthInsights.Common/ +- specification/ai/HealthInsights/HealthInsights.OpenAPI/ +commit: e91043999e4a2f492dfd17c9a3573f089150b513 +