@azure-rest/health-insights-radiologyinsights 1.0.0-beta.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +558 -50
- package/dist/index.js +73 -11
- package/dist/index.js.map +1 -1
- package/dist-esm/src/azureHealthInsightsClient.js +11 -9
- package/dist-esm/src/azureHealthInsightsClient.js.map +1 -1
- package/dist-esm/src/clientDefinitions.js.map +1 -1
- package/dist-esm/src/index.js +3 -2
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/isUnexpected.js +2 -2
- package/dist-esm/src/isUnexpected.js.map +1 -1
- package/dist-esm/src/models.js +19 -1
- package/dist-esm/src/models.js.map +1 -1
- package/dist-esm/src/outputModels.js +20 -1
- package/dist-esm/src/outputModels.js.map +1 -1
- package/dist-esm/src/parameters.js.map +1 -1
- package/dist-esm/src/pollingHelper.js.map +1 -1
- package/dist-esm/src/responses.js.map +1 -1
- package/dist-esm/src/serializeHelper.js +14 -0
- package/dist-esm/src/serializeHelper.js.map +1 -0
- package/package.json +7 -8
- package/review/health-insights-radiologyinsights.api.md +396 -131
package/dist/index.js
CHANGED
|
@@ -14,35 +14,37 @@ const logger = logger$1.createClientLogger("health-insights-radiologyinsights");
|
|
|
14
14
|
// Licensed under the MIT license.
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of `AzureHealthInsightsClient`
|
|
17
|
-
* @param
|
|
17
|
+
* @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.cognitiveservices.azure.com).
|
|
18
18
|
* @param credentials - uniquely identify client credential
|
|
19
19
|
* @param options - the parameter for all optional parameters
|
|
20
20
|
*/
|
|
21
|
-
function createClient(
|
|
22
|
-
var _a, _b, _c, _d, _e, _f;
|
|
23
|
-
const
|
|
24
|
-
options.apiVersion = (
|
|
25
|
-
const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0
|
|
21
|
+
function createClient(endpointParam, credentials, options = {}) {
|
|
22
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
23
|
+
const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `${endpointParam}/health-insights`;
|
|
24
|
+
options.apiVersion = (_c = options.apiVersion) !== null && _c !== void 0 ? _c : "2024-04-01";
|
|
25
|
+
const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0`;
|
|
26
26
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
27
27
|
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
28
28
|
: `${userAgentInfo}`;
|
|
29
29
|
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
30
30
|
userAgentPrefix,
|
|
31
31
|
}, loggingOptions: {
|
|
32
|
-
logger: (
|
|
32
|
+
logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info,
|
|
33
33
|
}, credentials: {
|
|
34
|
-
|
|
34
|
+
scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : ["https://cognitiveservices.azure.com/.default"],
|
|
35
|
+
apiKeyHeaderName: (_j = (_h = options.credentials) === null || _h === void 0 ? void 0 : _h.apiKeyHeaderName) !== null && _j !== void 0 ? _j : "Ocp-Apim-Subscription-Key",
|
|
35
36
|
} });
|
|
36
|
-
|
|
37
|
+
const client = coreClient.getClient(endpointUrl, credentials, options);
|
|
38
|
+
return client;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
// Copyright (c) Microsoft Corporation.
|
|
40
42
|
// Licensed under the MIT license.
|
|
41
43
|
const responseMap = {
|
|
42
44
|
"GET /radiology-insights/jobs/{id}": ["200"],
|
|
43
|
-
"
|
|
44
|
-
"GET /radiology-insights/jobs": ["200", "202"],
|
|
45
|
+
"PUT /radiology-insights/jobs/{id}": ["200", "201"],
|
|
45
46
|
};
|
|
47
|
+
/** Unexpected responses for get & create job calls */
|
|
46
48
|
function isUnexpected(response) {
|
|
47
49
|
const lroOriginal = response.headers["x-ms-original-url"];
|
|
48
50
|
const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
|
|
@@ -108,6 +110,51 @@ function getPathFromMapKey(mapKey) {
|
|
|
108
110
|
return mapKey.slice(pathStart);
|
|
109
111
|
}
|
|
110
112
|
|
|
113
|
+
// Copyright (c) Microsoft Corporation.
|
|
114
|
+
// Licensed under the MIT license.
|
|
115
|
+
/** Alias for ClinicalDocumentType */
|
|
116
|
+
exports.ClinicalDocumentTypeEnum = void 0;
|
|
117
|
+
(function (ClinicalDocumentTypeEnum) {
|
|
118
|
+
/** Consultation documents */
|
|
119
|
+
ClinicalDocumentTypeEnum["Consultation"] = "consultation";
|
|
120
|
+
/** Discharge summary documents */
|
|
121
|
+
ClinicalDocumentTypeEnum["DischargeSummary"] = "dischargeSummary";
|
|
122
|
+
/** H&P documents */
|
|
123
|
+
ClinicalDocumentTypeEnum["HistoryAndPhysical"] = "historyAndPhysical";
|
|
124
|
+
/** Radiology documents */
|
|
125
|
+
ClinicalDocumentTypeEnum["RadiologyReport"] = "radiologyReport";
|
|
126
|
+
/** Procedure notes */
|
|
127
|
+
ClinicalDocumentTypeEnum["Procedure"] = "procedure";
|
|
128
|
+
/** Progress notes */
|
|
129
|
+
ClinicalDocumentTypeEnum["Progress"] = "progress";
|
|
130
|
+
/** Laboratory documents */
|
|
131
|
+
ClinicalDocumentTypeEnum["Laboratory"] = "laboratory";
|
|
132
|
+
// Add more predefined types as needed
|
|
133
|
+
})(exports.ClinicalDocumentTypeEnum || (exports.ClinicalDocumentTypeEnum = {}));
|
|
134
|
+
|
|
135
|
+
// Copyright (c) Microsoft Corporation.
|
|
136
|
+
// Licensed under the MIT license.
|
|
137
|
+
/** Alias for ClinicalDocumentTypeOutput */
|
|
138
|
+
exports.ClinicalDocumentTypeOutputEnum = void 0;
|
|
139
|
+
(function (ClinicalDocumentTypeOutputEnum) {
|
|
140
|
+
/** Consultation documents */
|
|
141
|
+
ClinicalDocumentTypeOutputEnum["Consultation"] = "consultation";
|
|
142
|
+
/** Discharge summary documents */
|
|
143
|
+
ClinicalDocumentTypeOutputEnum["DischargeSummary"] = "dischargeSummary";
|
|
144
|
+
/** H&P documents */
|
|
145
|
+
ClinicalDocumentTypeOutputEnum["HistoryAndPhysical"] = "historyAndPhysical";
|
|
146
|
+
/** Radiology documents */
|
|
147
|
+
ClinicalDocumentTypeOutputEnum["RadiologyReport"] = "radiologyReport";
|
|
148
|
+
/** Procedure notes */
|
|
149
|
+
ClinicalDocumentTypeOutputEnum["Procedure"] = "procedure";
|
|
150
|
+
/** Progress notes */
|
|
151
|
+
ClinicalDocumentTypeOutputEnum["Progress"] = "progress";
|
|
152
|
+
/** Laboratory documents */
|
|
153
|
+
ClinicalDocumentTypeOutputEnum["Laboratory"] = "laboratory";
|
|
154
|
+
// Add more predefined types as needed
|
|
155
|
+
// Add more predefined types as needed
|
|
156
|
+
})(exports.ClinicalDocumentTypeOutputEnum || (exports.ClinicalDocumentTypeOutputEnum = {}));
|
|
157
|
+
|
|
111
158
|
// Copyright (c) Microsoft Corporation.
|
|
112
159
|
// Licensed under the MIT license.
|
|
113
160
|
async function getLongRunningPoller(client, initialResponse, options = {}) {
|
|
@@ -150,9 +197,24 @@ function getLroResponse(response) {
|
|
|
150
197
|
};
|
|
151
198
|
}
|
|
152
199
|
|
|
200
|
+
// Copyright (c) Microsoft Corporation.
|
|
201
|
+
// Licensed under the MIT license.
|
|
202
|
+
/** Returns all parameters per item*/
|
|
203
|
+
function buildMultiCollection(items, parameterName) {
|
|
204
|
+
return items
|
|
205
|
+
.map((item, index) => {
|
|
206
|
+
if (index === 0) {
|
|
207
|
+
return item;
|
|
208
|
+
}
|
|
209
|
+
return `${parameterName}=${item}`;
|
|
210
|
+
})
|
|
211
|
+
.join("&");
|
|
212
|
+
}
|
|
213
|
+
|
|
153
214
|
// Copyright (c) Microsoft Corporation.
|
|
154
215
|
// Licensed under the MIT license.
|
|
155
216
|
|
|
217
|
+
exports.buildMultiCollection = buildMultiCollection;
|
|
156
218
|
exports.default = createClient;
|
|
157
219
|
exports.getLongRunningPoller = getLongRunningPoller;
|
|
158
220
|
exports.isUnexpected = isUnexpected;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/logger.ts","../src/azureHealthInsightsClient.ts","../src/isUnexpected.ts","../src/pollingHelper.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"health-insights-radiologyinsights\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger\";\nimport { KeyCredential } from \"@azure/core-auth\";\nimport { AzureHealthInsightsClient } from \"./clientDefinitions\";\n\n/**\n * Initialize a new instance of `AzureHealthInsightsClient`\n * @param endpoint - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.api.cognitive.microsoft.com).\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credentials: KeyCredential,\n options: ClientOptions = {},\n): AzureHealthInsightsClient {\n const baseUrl = options.baseUrl ?? `${endpoint}/health-insights`;\n options.apiVersion = options.apiVersion ?? \"2023-09-01-preview\";\n const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n return getClient(baseUrl, credentials, options) as AzureHealthInsightsClient;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n GetJob200Response,\n GetJobDefaultResponse,\n CreateJob202Response,\n CreateJobLogicalResponse,\n CreateJobDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /radiology-insights/jobs/{id}\": [\"200\"],\n \"POST /radiology-insights/jobs\": [\"202\"],\n \"GET /radiology-insights/jobs\": [\"200\", \"202\"],\n};\n\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\nexport function isUnexpected(\n response: CreateJob202Response | CreateJobLogicalResponse | CreateJobDefaultResponse,\n): response is CreateJobDefaultResponse;\nexport function isUnexpected(\n response:\n | GetJob200Response\n | GetJobDefaultResponse\n | CreateJob202Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is GetJobDefaultResponse | CreateJobDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n CreateHttpPollerOptions,\n LongRunningOperation,\n LroResponse,\n OperationState,\n SimplePollerLike,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport {\n CreateJob202Response,\n CreateJobDefaultResponse,\n CreateJobLogicalResponse,\n} from \"./responses\";\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport async function getLongRunningPoller<\n TResult extends CreateJobLogicalResponse | CreateJobDefaultResponse,\n>(\n client: Client,\n initialResponse: CreateJob202Response | CreateJobDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client.pathUnchecked(path ?? initialResponse.request.url).get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n return createHttpPoller(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(response: TResult): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport AzureHealthInsightsClient from \"./azureHealthInsightsClient\";\n\nexport * from \"./azureHealthInsightsClient\";\nexport * from \"./parameters\";\nexport * from \"./responses\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./pollingHelper\";\n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ts","../src/models.ts","../src/outputModels.ts","../src/pollingHelper.ts","../src/serializeHelper.ts","../src/index.ts"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"health-insights-radiologyinsights\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { AzureHealthInsightsClient } from \"./clientDefinitions\";\nimport { logger } from \"./logger\";\n\n/**\n * Initialize a new instance of `AzureHealthInsightsClient`\n * @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.cognitiveservices.azure.com).\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential,\n options: ClientOptions = {},\n): AzureHealthInsightsClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}/health-insights`;\n options.apiVersion = options.apiVersion ?? \"2024-04-01\";\n const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://cognitiveservices.azure.com/.default\"],\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n const client = getClient(endpointUrl, credentials, options) as AzureHealthInsightsClient;\n\n return client;\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CreateJob200Response,\n CreateJob201Response,\n CreateJobDefaultResponse,\n CreateJobLogicalResponse,\n GetJob200Response,\n GetJobDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /radiology-insights/jobs/{id}\": [\"200\"],\n \"PUT /radiology-insights/jobs/{id}\": [\"200\", \"201\"],\n};\n\n/** Unexpected responses for get job calls */\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\n\n/** Unexpected responses for create job calls */\nexport function isUnexpected(\n response:\n | CreateJob200Response\n | CreateJob201Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is CreateJobDefaultResponse;\n\n/** Unexpected responses for get & create job calls */\nexport function isUnexpected(\n response:\n | GetJob200Response\n | GetJobDefaultResponse\n | CreateJob200Response\n | CreateJob201Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is GetJobDefaultResponse | CreateJobDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/** Contains the list of patients, and configuration data. */\nexport interface RadiologyInsightsData {\n /** The list of patients, including their clinical information and data. */\n patients: Array<PatientRecord>;\n /** Configuration affecting the Radiology Insights model's inference. */\n configuration?: RadiologyInsightsModelConfiguration;\n}\n\n/** A patient record, including their clinical information and data. */\nexport interface PatientRecord {\n /** A given identifier for the patient. Has to be unique across all patients in a single request. */\n id: string;\n /** Patient structured information, including demographics and known structured clinical information. */\n details?: PatientDetails;\n /** Patient encounters/visits. */\n encounters?: Array<PatientEncounter>;\n /** Patient unstructured clinical data, given as documents. */\n patientDocuments?: Array<PatientDocument>;\n}\n\n/** Patient structured information, including demographics and known structured clinical information. */\nexport interface PatientDetails {\n /** The patient's sex. */\n sex?: PatientSex;\n /** The patient's date of birth. */\n birthDate?: Date | string;\n /** Known clinical information for the patient, structured. */\n clinicalInfo?: Array<Resource>;\n}\n\n/**\n * Resource is the ancestor of DomainResource from which most resources are derived. Bundle, Parameters, and Binary extend Resource directly.\n * Based on [FHIR Resource](https://www.hl7.org/fhir/r4/resource.html\n */\nexport interface Resource extends Record<string, unknown> {\n /** resourceType */\n resourceType: string;\n /** Resource Id */\n id?: string;\n /** Metadata about the resource */\n meta?: Meta;\n /** A set of rules under which this content was created */\n implicitRules?: string;\n /** Language of the resource content */\n language?: string;\n}\n\n/**\n * Metadata about a resource\n * Based on [FHIR Meta](https://www.hl7.org/fhir/R4/resource.html#Meta)\n */\nexport interface Meta {\n /** 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. */\n versionId?: string;\n /** When the resource last changed - e.g. when the version changed. */\n lastUpdated?: string;\n /** 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. */\n source?: string;\n /** 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). */\n profile?: string[];\n /** Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure. */\n security?: Array<Coding>;\n /** 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. */\n tag?: Array<Coding>;\n}\n\n/**\n * A Coding is a representation of a defined concept using a symbol from a defined \"code system\".\n * Based on [FHIR Coding](https://www.hl7.org/fhir/R4/datatypes.html#Coding)\n */\nexport interface Coding extends Element {\n /** Identity of the terminology system */\n system?: string;\n /** Version of the system - if relevant */\n version?: string;\n /** Symbol in syntax defined by the system */\n code?: string;\n /** Representation defined by the system */\n display?: string;\n}\n\n/**\n * The base definition for all elements contained inside a resource.\n * Based on [FHIR Element](https://www.hl7.org/fhir/R4/element.html)\n */\nexport interface Element {\n /** Unique id for inter-element referencing */\n id?: string;\n /** Additional Content defined by implementations */\n extension?: Array<Extension>;\n}\n\n/**\n * Base for all elements\n * Based on [FHIR Element](https://www.hl7.org/fhir/datatypes.html#Element)\n */\nexport interface Extension extends Element {\n /** Source of the definition for the extension code - a logical name or a URL. */\n url: string;\n /** Value as Quantity */\n valueQuantity?: Quantity;\n /** Value as CodeableConcept */\n valueCodeableConcept?: CodeableConcept;\n /** Value as string */\n valueString?: string;\n /** Value as boolean */\n valueBoolean?: boolean;\n /** Value as integer */\n valueInteger?: number;\n /** Value as Range. */\n valueRange?: Range;\n /** Value as Ratio. */\n valueRatio?: Ratio;\n /** Value as SampledData. */\n valueSampledData?: SampledData;\n /** Value as time (hh:mm:ss) */\n valueTime?: Date | string;\n /** Value as dateTime. */\n valueDateTime?: string;\n /** Value as Period. */\n valuePeriod?: Period;\n /** Value as reference. */\n valueReference?: Reference;\n}\n\n/**\n * A measured or measurable amount\n * Based on [FHIR Quantity](https://www.hl7.org/fhir/R4/datatypes.html#Quantity)\n */\nexport interface Quantity extends Element {\n /** Numerical value (with implicit precision) */\n value?: number;\n /** \\< | \\<= | \\>= | \\> - how to understand the value */\n comparator?: string;\n /** Unit representation */\n unit?: string;\n /** System that defines coded unit form */\n system?: string;\n /** Coded form of the unit */\n code?: string;\n}\n\n/**\n * Concept - reference to a terminology or just text\n * Based on [FHIR CodeableConcept](https://www.hl7.org/fhir/R4/datatypes.html#CodeableConcept)\n */\nexport interface CodeableConcept extends Element {\n /** Code defined by a terminology system */\n coding?: Array<Coding>;\n /** Plain text representation of the concept */\n text?: string;\n}\n\n/**\n * A set of ordered Quantities defined by a low and high limit\n * Based on [FHIR Range](https://www.hl7.org/fhir/R4/datatypes.html#Range)\n */\nexport interface Range extends Element {\n /** Low limit */\n low?: Quantity;\n /** High limit */\n high?: Quantity;\n}\n\n/**\n * A ratio of two Quantity values - a numerator and a denominator\n * Based on [FHIR Ratio](https://www.hl7.org/fhir/R4/datatypes.html#Ratio)\n */\nexport interface Ratio extends Element {\n /** Numerator value */\n numerator?: Quantity;\n /** Denominator value */\n denominator?: Quantity;\n}\n\n/**\n * A series of measurements taken by a device\n * Based on [FHIR SampledData](https://www.hl7.org/fhir/R4/datatypes.html#SampledData)\n */\nexport interface SampledData extends Element {\n /** Zero value and units */\n origin: Quantity;\n /** Number of milliseconds between samples */\n period: number;\n /** Multiply data by this before adding to origin */\n factor?: number;\n /** Lower limit of detection */\n lowerLimit?: number;\n /** Upper limit of detection */\n upperLimit?: number;\n /** Number of sample points at each time point */\n dimensions: number;\n /** Decimal values with spaces, or \"E\" | \"U\" | \"L\" */\n data?: string;\n}\n\n/**\n * A time period defined by a start and end date and optionally time\n * Based on [FHIR Period](https://www.hl7.org/fhir/R4/datatypes.html#Period)\n */\nexport interface Period extends Element {\n /** Starting time with inclusive boundary */\n start?: string;\n /** End time with inclusive boundary, if not ongoing */\n end?: string;\n}\n\n/**\n * A reference from one resource to another\n * Based on [FHIR Reference](https://www.hl7.org/fhir/R4/references.html)\n */\nexport interface Reference extends Element {\n /** Literal reference, Relative, internal or absolute URL */\n reference?: string;\n /** Type the reference refers to (e.g. \"Patient\") */\n type?: string;\n /** Logical reference, when literal reference is not known */\n identifier?: Identifier;\n /** Text alternative for the resource */\n display?: string;\n}\n\n/**\n * An identifier intended for computation\n * Based on [FHIR Identifier](https://www.hl7.org/fhir/R4/identifier.html)\n */\nexport interface Identifier extends Element {\n /** usual | official | temp | secondary | old (If known) */\n use?: string;\n /** Description of identifier */\n type?: CodeableConcept;\n /** The namespace for the identifier value */\n system?: string;\n /** The value that is unique */\n value?: string;\n /** Time period when id is/was valid for use */\n period?: Period;\n /** Organization that issued id (may be just text) */\n assigner?: Reference;\n}\n\n/**\n * 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.\n * Based on [FHIR Narrative](https://www.hl7.org/fhir/R4/narrative.html#Narrative)\n */\nexport interface Narrative extends Element {\n /** generated, extensions, additional, empty */\n status: string;\n /** xhtml */\n div: string;\n}\n\n/**\n * A text note which also contains information about who made the statement and when\n * Based on [FHIR Annotation](https://www.hl7.org/fhir/R4/datatypes.html#Annotation)\n */\nexport interface Annotation extends Element {\n /** Individual responsible for the annotation */\n authorString?: string;\n /** When the annotation was made */\n time?: string;\n /** The annotation - text content (as markdown) */\n text: string;\n}\n\n/**\n * Component results\n * Based on [FHIR Observation.component](https://www.hl7.org/fhir/R4/observation.html)\n */\nexport interface ObservationComponent extends Element {\n /** Type of component observation (code / type) */\n code: CodeableConcept;\n /** Value as Quantity */\n valueQuantity?: Quantity;\n /** Value as CodeableConcept */\n valueCodeableConcept?: CodeableConcept;\n /** Value as string */\n valueString?: string;\n /** Value as boolean */\n valueBoolean?: boolean;\n /** Value as integer */\n valueInteger?: number;\n /** Value as Range. */\n valueRange?: Range;\n /** Value as Ratio. */\n valueRatio?: Ratio;\n /** Value as SampledData. */\n valueSampledData?: SampledData;\n /** Value as time (hh:mm:ss) */\n valueTime?: Date | string;\n /** Value as dateTime. */\n valueDateTime?: string;\n /** Value as Period. */\n valuePeriod?: Period;\n /** Value as reference. */\n valueReference?: Reference;\n /** Why the component result is missing */\n dataAbsentReason?: CodeableConcept;\n /** High, low, normal, etc. */\n interpretation?: Array<CodeableConcept>;\n /** Provides guide for interpretation of component result */\n referenceRange?: Array<ObservationReferenceRange>;\n}\n\n/**\n * Provides guide for interpretation of component result\n * Based on [FHIR Observation.referenceRange](https://www.hl7.org/fhir/R4/observation.html)\n */\nexport interface ObservationReferenceRange {\n /** Low Range, if relevant */\n low?: Quantity;\n /** High Range, if relevant */\n high?: Quantity;\n /** Reference range qualifier */\n type?: CodeableConcept;\n /** Reference range population */\n appliesTo?: Array<CodeableConcept>;\n /** Applicable age range, if relevant */\n age?: Range;\n /** Text based reference range in an observation */\n text?: string;\n}\n\n/** Contact details (See: https://www.hl7.org/fhir/R4/metadatatypes.html#ContactDetail) */\nexport interface ContactDetail extends Element {\n /** Name of an individual to contact */\n name?: string;\n /** Contact details for individual or organization */\n telecom?: Array<ContactPoint>;\n}\n\n/**\n * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.\n * See https://www.hl7.org/fhir/R4/datatypes.html#ContactPoint\n */\nexport interface ContactPoint {\n /** phone | fax | email | pager | url | sms | other */\n system?: ContactPointSystem;\n /** The actual contact point details */\n value?: string;\n /** home | work | temp | old | mobile - purpose of this contact point */\n use?: ContactPointUse;\n /** Specify preferred order of use (1 = highest) */\n rank?: number;\n /** Time period when the contact point was/is in use */\n period?: Period;\n}\n\n/**\n * A resource with narrative, extensions, and contained resources\n * Based on [FHIR DomainResource](https://www.hl7.org/fhir/domainresource.html)\n */\nexport interface DomainResourceParent extends Resource {\n /** Text summary of the resource, for human interpretation */\n text?: Narrative;\n /** Contained, inline Resources */\n contained?: Array<Resource>;\n /** Additional Content defined by implementations */\n extension?: Array<Extension>;\n /** Extensions that cannot be ignored */\n modifierExtension?: Array<Extension>;\n /** resourceType */\n resourceType: string;\n}\n\n/**\n * Detailed information about observations\n * Based on [FHIR Observation](https://www.hl7.org/fhir/R4/observation.html)\n */\nexport interface Observation extends DomainResourceParent {\n /** resourceType */\n resourceType: \"Observation\";\n /** Business Identifier for observation */\n identifier?: Array<Identifier>;\n /** registered | preliminary | final | amended + */\n status: ObservationStatusCodeType;\n /** Classification of type of observation */\n category?: Array<CodeableConcept>;\n /** Type of observation (code / type) */\n code: CodeableConcept;\n /** Who and/or what the observation is about */\n subject?: Reference;\n /** Healthcare event during which this observation is made */\n encounter?: Reference;\n /** Clinically relevant time/time-period for observation */\n effectiveDateTime?: string;\n /** Clinically relevant time/time-period for observation */\n effectivePeriod?: Period;\n /** Clinically relevant time/time-period for observation */\n effectiveInstant?: string;\n /** Date/Time this version was made available */\n issued?: string;\n /** Actual result */\n valueQuantity?: Quantity;\n /** Actual result */\n valueCodeableConcept?: CodeableConcept;\n /** Actual result */\n valueString?: string;\n /** Actual result */\n valueBoolean?: boolean;\n /** Actual result */\n valueInteger?: number;\n /** Actual result */\n valueRange?: Range;\n /** Actual result */\n valueRatio?: Ratio;\n /** Actual result */\n valueSampledData?: SampledData;\n /** Actual result */\n valueTime?: Date | string;\n /** Actual result */\n valueDateTime?: string;\n /** Actual result */\n valuePeriod?: Period;\n /** Why the result is missing */\n dataAbsentReason?: CodeableConcept;\n /** High, low, normal, etc. */\n interpretation?: Array<CodeableConcept>;\n /** Comments about the observation */\n note?: Array<Annotation>;\n /** Observed body part */\n bodySite?: CodeableConcept;\n /** How it was done */\n method?: CodeableConcept;\n /** Provides guide for interpretation */\n referenceRange?: Array<ObservationReferenceRange>;\n /** Related resource that belongs to the Observation group */\n hasMember?: Array<Reference>;\n /** Related measurements the observation is made from */\n derivedFrom?: Array<Reference>;\n /** Component results */\n component?: Array<ObservationComponent>;\n}\n\n/**\n * Detailed information about conditions, problems or diagnoses\n * Based on [FHIR Condition](https://www.hl7.org/fhir/R4/condition.html)\n */\nexport interface Condition extends DomainResourceParent {\n /** resourceType */\n resourceType: \"Condition\";\n /** External Ids for this condition */\n identifier?: Array<Identifier>;\n /** active | recurrence | relapse | inactive | remission | resolved */\n clinicalStatus?: CodeableConcept;\n /** unconfirmed | provisional | differential | confirmed | refuted | entered-in-error */\n verificationStatus?: CodeableConcept;\n /** problem-list-item | encounter-diagnosis */\n category?: Array<CodeableConcept>;\n /** Subjective severity of condition */\n severity?: CodeableConcept;\n /** Identification of the condition, problem or diagnosis */\n code?: CodeableConcept;\n /** Anatomical location, if relevant */\n bodySite?: Array<CodeableConcept>;\n /** Encounter created as part of */\n encounter?: Reference;\n /** Estimated or actual date, date-time, or age */\n onsetDateTime?: string;\n /** Estimated or actual date, date-time, or age */\n onsetAge?: Quantity;\n /** Estimated or actual date, date-time, or age */\n onsetPeriod?: Period;\n /** Estimated or actual date, date-time, or age */\n onsetRange?: Range;\n /** Estimated or actual date, date-time, or age */\n onsetString?: string;\n /** When in resolution/remission */\n abatementDateTime?: string;\n /** When in resolution/remission */\n abatementAge?: Quantity;\n /** When in resolution/remission */\n abatementPeriod?: Period;\n /** When in resolution/remission */\n abatementRange?: Range;\n /** When in resolution/remission */\n abatementString?: string;\n /** Date record was first recorded */\n recordedDate?: string;\n /** stge/grade, usually assessed formally */\n stage?: Array<ConditionStage>;\n /** Additional information about the Condition */\n note?: Array<Annotation>;\n}\n\n/**\n * Stage/grade, usually assessed formally\n * Based on [FHIR Condition.Stage](https://www.hl7.org/fhir/R4/condition.html)\n */\nexport interface ConditionStage {\n /** Simple summary (disease specific) */\n summary?: CodeableConcept;\n /** Kind of staging */\n type?: CodeableConcept;\n}\n\n/**\n * Detailed information about Research Study\n * Based on [FHIR ResearchStudy](https://www.hl7.org/fhir/R4/researchstudy.html)\n */\nexport interface ResearchStudy extends DomainResourceParent {\n /** resourceType */\n resourceType: \"ResearchStudy\";\n /** Business Identifier for study */\n identifier?: Array<Identifier>;\n /** Name for this study */\n title?: string;\n /** Steps followed in executing study */\n protocol?: Array<Reference>;\n /** Part of larger study */\n partOf?: Array<Reference>;\n /** 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 */\n status: ResearchStudyStatusCodeType;\n /** treatment | prevention | diagnostic | supportive-care | screening | health-services-research | basic-science | device-feasibility */\n primaryPurposeType?: CodeableConcept;\n /** n-a | early-phase-1 | phase-1 | phase-1-phase-2 | phase-2 | phase-2-phase-3 | phase-3 | phase-4 */\n phase?: CodeableConcept;\n /** Classifications for the study */\n category?: Array<CodeableConcept>;\n /** Drugs, devices, etc. under study */\n focus?: Array<CodeableConcept>;\n /** Condition being studied */\n condition?: Array<CodeableConcept>;\n /** Contact details for the study */\n contact?: Array<ContactDetail>;\n /** Used to search for the study */\n keyword?: Array<CodeableConcept>;\n /** Geographic region(s) for study */\n location?: Array<CodeableConcept>;\n /** What this is study doing */\n description?: string;\n /** Inclusion & exclusion criteria */\n enrollment?: Array<Reference>;\n /** When the study began and ended */\n period?: Period;\n /** Organization that initiates and is legally responsible for the study */\n sponsor?: Reference;\n /** Researcher who oversees multiple aspects of the study */\n principalInvestigator?: Reference;\n /** Facility where study activities are conducted */\n site?: Array<Reference>;\n /** accrual-goal-met | closed-due-to-toxicity | closed-due-to-lack-of-study-progress | temporarily-closed-per-study-design */\n reasonStopped?: CodeableConcept;\n /** Comments made about the study */\n note?: Array<Annotation>;\n /** Defined path through the study for a subject */\n arm?: { name: string; type?: CodeableConcept; description?: string }[];\n /** A goal for the study */\n objective?: { name: string; type?: CodeableConcept }[];\n}\n\n/** visit/encounter information */\nexport interface PatientEncounter {\n /** The id of the visit. */\n id: string;\n /**\n * Time period of the visit.\n * In case of admission, use timePeriod.start to indicate the admission time and timePeriod.end to indicate the discharge time.\n */\n period?: TimePeriod;\n /** The class of the encounter. */\n class?: EncounterClass;\n}\n\n/** A duration of time during which an event is happening */\nexport interface TimePeriod {\n /** Starting time with inclusive boundary */\n start?: Date | string;\n /** End time with inclusive boundary, if not ongoing */\n end?: Date | string;\n}\n\n/** A clinical document related to a patient. Document here is in the wide sense - not just a text document (note). */\nexport interface PatientDocument {\n /** The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). */\n type: DocumentType;\n /** The type of the clinical document. */\n clinicalType?: ClinicalDocumentType;\n /** A given identifier for the document. Has to be unique across all documents for a single patient. */\n id: string;\n /** A 2 letter ISO 639-1 representation of the language of the document. */\n language?: string;\n /** The date and time when the document was created. */\n createdAt?: Date | string;\n /** Document author(s) */\n authors?: Array<DocumentAuthor>;\n /** specialty type the document */\n specialtyType?: SpecialtyType;\n /** Administrative metadata for the document. */\n administrativeMetadata?: DocumentAdministrativeMetadata;\n /** The content of the patient document. */\n content: DocumentContent;\n}\n\n/** Document author */\nexport interface DocumentAuthor {\n /** author id */\n id?: string;\n /** Text representation of the full name */\n fullName?: string;\n}\n\n/** Document administrative metadata */\nexport interface DocumentAdministrativeMetadata {\n /** List of procedure information associated with the document. */\n orderedProcedures?: Array<OrderedProcedure>;\n /** Reference to the encounter associated with the document. */\n encounterId?: string;\n}\n\n/** Procedure information */\nexport interface OrderedProcedure {\n /** Procedure code */\n code?: CodeableConcept;\n /** Procedure description */\n description?: string;\n /** Additional Content defined by implementations */\n extension?: Array<Extension>;\n}\n\n/** The content of the patient document. */\nexport interface DocumentContent {\n /**\n * The type of the content's source.\n * In case the source type is 'inline', the content is given as a string (for instance, text).\n * In case the source type is 'reference', the content is given as a URI.\n */\n sourceType: DocumentContentSourceType;\n /** The content of the document, given either inline (as a string) or as a reference (URI). */\n value: string;\n}\n\n/** Configuration affecting the Radiology Insights model's inference. */\nexport interface RadiologyInsightsModelConfiguration {\n /** An indication whether the model should produce verbose output. */\n verbose?: boolean;\n /** An indication whether the model's output should include evidence for the inferences. */\n includeEvidence?: boolean;\n /** This is a list of inference types to be inferred for the current request. It could be used if only part of the Radiology Insights inferences are required. If this list is omitted or empty, the model will return all the inference types. */\n inferenceTypes?: RadiologyInsightsInferenceType[];\n /** Options regarding follow up recommendation inferences and finding inferences. */\n inferenceOptions?: RadiologyInsightsInferenceOptions;\n /** Local for the model to use. If not specified, the model will use the default locale. */\n locale?: string;\n}\n\n/** Options regarding follow up recommendation inferences and finding inferences. */\nexport interface RadiologyInsightsInferenceOptions {\n /** Follow-up recommendation options. */\n followupRecommendationOptions?: FollowupRecommendationOptions;\n /** Finding options. */\n findingOptions?: FindingOptions;\n}\n\n/** Follow-up recommendation options. */\nexport interface FollowupRecommendationOptions {\n /** Include/Exclude follow-up recommendations without a specific radiology procedure. Default is false. */\n includeRecommendationsWithNoSpecifiedModality?: boolean;\n /** Include/Exclude follow-up recommendations in references to a guideline or article. Default is false. */\n includeRecommendationsInReferences?: boolean;\n /** If this is true, provide one or more sentences as evidence for the recommendation, next to the token evidence. The start and end positions of these sentences will be put in an extension with url 'modality_sentences'. Default is false. */\n provideFocusedSentenceEvidence?: boolean;\n}\n\n/** Finding options. */\nexport interface FindingOptions {\n /** If this is true, provide the sentence that contains the first token of the finding's clinical indicator (i.e. the medical problem), if there is one. This sentence is provided as an extension with url 'ci_sentence', next to the token evidence. Default is false. */\n provideFocusedSentenceEvidence?: boolean;\n}\n\n/** The inference results for the Radiology Insights request. If field 'status' has value 'succeeded', then field 'result' will contain an instance of RadiologyInsightsInferenceResult. */\nexport interface RadiologyInsightsInferenceResult {\n /** Results for the patients given in the request. */\n patientResults: Array<RadiologyInsightsPatientResult>;\n /** The version of the model used for inference, expressed as the model date. */\n modelVersion: string;\n}\n\n/** Results of the model's work for a single patient. */\nexport interface RadiologyInsightsPatientResult {\n /** Identifier given for the patient in the request. */\n patientId: string;\n /** The model's inferences for the given patient. */\n inferences: Array<RadiologyInsightsInference>;\n}\n\n/**\n * An inference made by the Radiology Insights model regarding a patient.\n * - AgeMismatch\n * - SexMismatch\n * - LateralityDiscrepancy\n * - CompleteOrderDiscrepancy\n * - LimitedOrderDiscrepancy\n * - Finding\n * - CriticalResult\n * - FollowupRecommendation\n * - RadiologyProcedure\n * - FollowupCommunication\n */\nexport interface RadiologyInsightsInferenceParent {\n /** Additional Content defined by implementations */\n extension?: Array<Extension>;\n /** The kind of inference */\n kind: string;\n}\n\n/** A notification for age mismatch is displayed when the age mentioned in a document for a specific patient does not match the age specified in the patient information. */\nexport interface AgeMismatchInference extends RadiologyInsightsInferenceParent {\n /** Inference type. */\n kind: \"ageMismatch\";\n}\n\n/** A notification for a sex mismatch is displayed when the gender, personal pronouns, gender-related body parts, or gender-related procedures mentioned in a patient's clinical document are either inconsistent or do not match the gender specified in the patient information. */\nexport interface SexMismatchInference extends RadiologyInsightsInferenceParent {\n /** Inference type. */\n kind: \"sexMismatch\";\n /** Sex indication : SNOMED CT code for gender finding. */\n sexIndication: CodeableConcept;\n}\n\n/** A laterality mismatch occurs when there is a discrepancy between the clinical documentation and the ordered procedure (orderLateralityMismatch), a contradiction within the clinical document (textLateralityContradiction), or when no laterality is mentioned (textLateralityMissing). */\nexport interface LateralityDiscrepancyInference extends RadiologyInsightsInferenceParent {\n /** Inference type. */\n kind: \"lateralityDiscrepancy\";\n /** Laterality indication : SNOMED CT code for laterality qualifier value. */\n lateralityIndication?: CodeableConcept;\n /** Mismatch type : orderLateralityMismatch, textLateralityContradiction, textLateralityMissing. */\n discrepancyType: LateralityDiscrepancyType;\n}\n\n/** A complete order discrepancy is shown when one or more body parts and/or measurements that should be in the document (because there is a complete order) are not present. */\nexport interface CompleteOrderDiscrepancyInference extends RadiologyInsightsInferenceParent {\n /** Inference type. */\n kind: \"completeOrderDiscrepancy\";\n /** Order type : CPT ultrasound complete code for abdomen, retroperitoneal, pelvis or breast. */\n orderType: CodeableConcept;\n /** List of missing body parts required by a complete order : SNOMED CT codes. */\n missingBodyParts?: Array<CodeableConcept>;\n /** List of missing body parts that require measurement by a complete order : SNOMED CT codes. */\n missingBodyPartMeasurements?: Array<CodeableConcept>;\n}\n\n/** A limited order discrepancy occurs when there is a limited order, but all body parts and measurements that are needed for a complete order are present in the document. */\nexport interface LimitedOrderDiscrepancyInference extends RadiologyInsightsInferenceParent {\n /** Inference type. */\n kind: \"limitedOrderDiscrepancy\";\n /** Order type : CPT ultrasound complete code for abdomen, retroperitoneal, pelvis or breast. */\n orderType: CodeableConcept;\n /** List of body parts found in the document : SNOMED CT codes. */\n presentBodyParts?: Array<CodeableConcept>;\n /** List of body parts that are measured according to the document : SNOMED CT codes. */\n presentBodyPartMeasurements?: Array<CodeableConcept>;\n}\n\n/** Findings in a radiology report typically describe abnormalities, lesions, or other notable observations related to the anatomy or pathology of the imaged area. */\nexport interface FindingInference extends RadiologyInsightsInferenceParent {\n /** Inference type. */\n kind: \"finding\";\n /** Finding data : contains extensions, fields and components linked with the finding. */\n finding: Observation;\n}\n\n/** Critical results refer to findings of utmost importance that may require timely attention due to their potential impact on patient care. */\nexport interface CriticalResultInference extends RadiologyInsightsInferenceParent {\n /** Inference type. */\n kind: \"criticalResult\";\n /** The complete Critical Result, as outlined below, will be reused for the recommendation. */\n result: CriticalResult;\n}\n\n/** Critical Result consists of two properties. */\nexport interface CriticalResult {\n /** Description : medical problem. */\n description: string;\n /** Finding linked to the critical result. */\n finding?: Observation;\n}\n\n/** Radiology procedures are the specific imaging studies or examinations ordered for the patient, extracted from the document information and text. */\nexport interface RadiologyProcedureInference extends RadiologyInsightsInferenceParent {\n /** Inference type. */\n kind: \"radiologyProcedure\";\n /** LOINC codes for the procedure. */\n procedureCodes?: Array<CodeableConcept>;\n /** Imaging procedures. */\n imagingProcedures: Array<ImagingProcedure>;\n /** Ordered procedure information from the document information or text. */\n orderedProcedure: OrderedProcedure;\n}\n\n/** Imaging procedure. */\nexport interface ImagingProcedure {\n /** Modality : SNOMED CT code. */\n modality: CodeableConcept;\n /** Anatomy : SNOMED CT code. */\n anatomy: CodeableConcept;\n /** Laterality : SNOMED CT code. */\n laterality?: CodeableConcept;\n /** Contrast : see RadiologyCodeWithTypes (below). */\n contrast?: RadiologyCodeWithTypes;\n /** View : see RadiologyCodeWithTypes (below). */\n view?: RadiologyCodeWithTypes;\n}\n\n/** Radiology code with types : used in imaging procedure recommendation for contrast and view. */\nexport interface RadiologyCodeWithTypes {\n /** The SNOMED CT code indicates whether imaging was conducted with or without contrast in the case of contrast, and in the case of views, it denotes the number of views. */\n code: CodeableConcept;\n /** The collection of types will indicate the contrast substance used in the case of contrast and, in the case of views, it will specify the types of views, such as lateral and frontal, etc. */\n types: Array<CodeableConcept>;\n}\n\n/** Follow-up recommendations offer guidance to healthcare providers on managing and monitoring patients based on the findings of imaging studies. */\nexport interface FollowupRecommendationInference extends RadiologyInsightsInferenceParent {\n /** Inference type. */\n kind: \"followupRecommendation\";\n /** Date and time are displayed when the procedure is recommended to be done at a specific point in time. */\n effectiveAt?: string;\n /** The period is shown if a specific period is mentioned, with a start and end date-time. */\n effectivePeriod?: Period;\n /** Findings related to the recommendation. */\n findings?: Array<RecommendationFinding>;\n /** The conditional value indicates whether or not the sentence containing the recommendation includes a conditional statement. Keywords for conditional statements include 'if', 'when', 'unless', and so on. */\n isConditional: boolean;\n /** The option value indicates whether or not the sentence containing the recommendation includes an optional statement. Keywords for optional statements include 'recommend', 'consider', and so on. */\n isOption: boolean;\n /** The guideline value indicates whether or not the recommendation is part of a guideline section that compiles all recommendations applicable to various findings. */\n isGuideline: boolean;\n /** Hedging refers to ambiguous, vague or imprecise language within the sentence of the recommendation. Keywords for hedging are 'can be','may be',and so on. */\n isHedging: boolean;\n /** The procedure recommendation can be a generic procedure or an imaging procedure. */\n recommendedProcedure: ProcedureRecommendation;\n}\n\n/** Finding reference for recommendation. */\nexport interface RecommendationFinding {\n /** Finding linked to a recommendation. */\n finding?: Observation;\n /** Critical result linked to a recommendation. */\n criticalFinding?: CriticalResult;\n /** Recommendation finding status. */\n recommendationFindingStatus: RecommendationFindingStatusType;\n /** Additional Content defined by implementations */\n extension?: Array<Extension>;\n}\n\n/** The procedure recommendation can be a generic procedure or an imaging procedure. */\nexport interface ProcedureRecommendationParent {\n /** Additional Content defined by implementations */\n extension?: Array<Extension>;\n /** The kind of procedure recommendation eg. generic or imaging*/\n kind: string;\n}\n\n/** Generic procedure information. */\nexport interface GenericProcedureRecommendation extends ProcedureRecommendationParent {\n /** Procedure type : generic. */\n kind: \"genericProcedureRecommendation\";\n /** Procedure modality : SNOMED CT code. */\n code: CodeableConcept;\n /** Procedure description : MANAGEMENT PROCEDURE (PROCEDURE) or CONSULTATION (PROCEDURE) based on SNOMED CT. */\n description?: string;\n}\n\n/** Imaging procedures. */\nexport interface ImagingProcedureRecommendation extends ProcedureRecommendationParent {\n /** Procedure type : imaging. */\n kind: \"imagingProcedureRecommendation\";\n /** LOINC codes for the procedure. */\n procedureCodes?: Array<CodeableConcept>;\n /** Imaging procedures. */\n imagingProcedures: Array<ImagingProcedure>;\n}\n\n/** Follow-up communication involves the exchange of important information, recommendations, or updates between radiologists and other healthcare professionals involved in a patient's care. */\nexport interface FollowupCommunicationInference extends RadiologyInsightsInferenceParent {\n /** Inference type. */\n kind: \"followupCommunication\";\n /** Communication date and time. */\n communicatedAt?: Date[] | string[];\n /** Recipient of the communication. */\n recipient?: MedicalProfessionalType[];\n /** Communication was acknowledged. */\n wasAcknowledged: boolean;\n}\n\n/** Response for the Radiology Insights request. */\nexport interface RadiologyInsightsJob {\n /** The request data for the operation. */\n jobData?: RadiologyInsightsData;\n}\n\n/**\n * A resource with narrative, extensions, and contained resources\n * Based on [FHIR DomainResource](https://www.hl7.org/fhir/domainresource.html)\n */\nexport type DomainResource = DomainResourceParent | Observation | Condition | ResearchStudy;\n/**\n * An inference made by the Radiology Insights model regarding a patient.\n * - AgeMismatch\n * - SexMismatch\n * - LateralityDiscrepancy\n * - CompleteOrderDiscrepancy\n * - LimitedOrderDiscrepancy\n * - Finding\n * - CriticalResult\n * - FollowupRecommendation\n * - RadiologyProcedure\n * - FollowupCommunication\n */\nexport type RadiologyInsightsInference =\n | RadiologyInsightsInferenceParent\n | AgeMismatchInference\n | SexMismatchInference\n | LateralityDiscrepancyInference\n | CompleteOrderDiscrepancyInference\n | LimitedOrderDiscrepancyInference\n | FindingInference\n | CriticalResultInference\n | RadiologyProcedureInference\n | FollowupRecommendationInference\n | FollowupCommunicationInference;\n/** The procedure recommendation can be a generic procedure or an imaging procedure. */\nexport type ProcedureRecommendation =\n | ProcedureRecommendationParent\n | GenericProcedureRecommendation\n | ImagingProcedureRecommendation;\n/** Alias for PatientSex */\nexport type PatientSex = string | \"female\" | \"male\" | \"unspecified\";\n/** Alias for ContactPointSystem */\nexport type ContactPointSystem =\n | string\n | \"phone\"\n | \"fax\"\n | \"email\"\n | \"pager\"\n | \"url\"\n | \"sms\"\n | \"other\";\n/** Alias for ContactPointUse */\nexport type ContactPointUse = string | \"home\" | \"work\" | \"temp\" | \"old\" | \"mobile\";\n/** Alias for ObservationStatusCodeType */\nexport type ObservationStatusCodeType =\n | string\n | \"registered\"\n | \"preliminary\"\n | \"final\"\n | \"amended\"\n | \"corrected\"\n | \"cancelled\"\n | \"entered-in-error\"\n | \"unknown\";\n/** Alias for ResearchStudyStatusCodeType */\nexport type ResearchStudyStatusCodeType =\n | string\n | \"active\"\n | \"administratively-completed\"\n | \"approved\"\n | \"closed-to-accrual\"\n | \"closed-to-accrual-and-intervention\"\n | \"completed\"\n | \"disapproved\"\n | \"in-review\"\n | \"temporarily-closed-to-accrual\"\n | \"temporarily-closed-to-accrual-and-intervention\"\n | \"withdrawn\";\n/** Alias for EncounterClass */\nexport type EncounterClass =\n | string\n | \"inpatient\"\n | \"ambulatory\"\n | \"observation\"\n | \"emergency\"\n | \"virtual\"\n | \"healthHome\";\n\n/** Alias for DocumentType */\nexport type DocumentType = string | \"note\" | \"fhirBundle\" | \"dicom\" | \"genomicSequencing\";\n\n/** Alias for ClinicalDocumentType */\nexport enum ClinicalDocumentTypeEnum {\n /** Consultation documents */\n Consultation = \"consultation\",\n /** Discharge summary documents */\n DischargeSummary = \"dischargeSummary\",\n /** H&P documents */\n HistoryAndPhysical = \"historyAndPhysical\",\n /** Radiology documents */\n RadiologyReport = \"radiologyReport\",\n /** Procedure notes */\n Procedure = \"procedure\",\n /** Progress notes */\n Progress = \"progress\",\n /** Laboratory documents */\n Laboratory = \"laboratory\",\n // Add more predefined types as needed\n}\n/** Allowed types of documents to be evaluated, specified in an Enum */\nexport type ClinicalDocumentType = ClinicalDocumentTypeEnum;\n\n/** Alias for SpecialtyType */\nexport type SpecialtyType = string | \"pathology\" | \"radiology\";\n/** Alias for DocumentContentSourceType */\nexport type DocumentContentSourceType = string | \"inline\" | \"reference\";\n/** Alias for RadiologyInsightsInferenceType */\nexport type RadiologyInsightsInferenceType =\n | string\n | \"ageMismatch\"\n | \"lateralityDiscrepancy\"\n | \"sexMismatch\"\n | \"completeOrderDiscrepancy\"\n | \"limitedOrderDiscrepancy\"\n | \"finding\"\n | \"criticalResult\"\n | \"followupRecommendation\"\n | \"followupCommunication\"\n | \"radiologyProcedure\";\n/** Alias for LateralityDiscrepancyType */\nexport type LateralityDiscrepancyType =\n | string\n | \"orderLateralityMismatch\"\n | \"textLateralityContradiction\"\n | \"textLateralityMissing\";\n/** Alias for RecommendationFindingStatusType */\nexport type RecommendationFindingStatusType =\n | string\n | \"present\"\n | \"differential\"\n | \"ruleOut\"\n | \"conditional\";\n/** Alias for MedicalProfessionalType */\nexport type MedicalProfessionalType =\n | string\n | \"unknown\"\n | \"doctor\"\n | \"nurse\"\n | \"midwife\"\n | \"physicianAssistant\";\n/** Alias for JobStatus */\nexport type JobStatus = string | \"notStarted\" | \"running\" | \"succeeded\" | \"failed\" | \"canceled\";\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ErrorModel } from \"@azure-rest/core-client\";\n\n/** Response for the Radiology Insights request. */\nexport interface RadiologyInsightsJobOutput {\n /** The request data for the operation. */\n jobData?: RadiologyInsightsDataOutput;\n /** The result of the operation. */\n readonly result?: RadiologyInsightsInferenceResultOutput;\n /** The unique ID of the job. */\n readonly id: string;\n /** The status of the job. */\n readonly status: JobStatusOutput;\n /** The date and time when the processing job was created. */\n readonly createdAt?: string;\n /** The date and time when the processing job is set to expire. */\n readonly expiresAt?: string;\n /** The date and time when the processing job was last updated. */\n readonly updatedAt?: string;\n /** Error object that describes the error when status is \"Failed\". */\n readonly error?: ErrorModel;\n}\n\n/** Contains the list of patients, and configuration data. */\nexport interface RadiologyInsightsDataOutput {\n /** The list of patients, including their clinical information and data. */\n patients: Array<PatientRecordOutput>;\n /** Configuration affecting the Radiology Insights model's inference. */\n configuration?: RadiologyInsightsModelConfigurationOutput;\n}\n\n/** A patient record, including their clinical information and data. */\nexport interface PatientRecordOutput {\n /** A given identifier for the patient. Has to be unique across all patients in a single request. */\n id: string;\n /** Patient structured information, including demographics and known structured clinical information. */\n details?: PatientDetailsOutput;\n /** Patient encounters/visits. */\n encounters?: Array<PatientEncounterOutput>;\n /** Patient unstructured clinical data, given as documents. */\n patientDocuments?: Array<PatientDocumentOutput>;\n}\n\n/** Patient structured information, including demographics and known structured clinical information. */\nexport interface PatientDetailsOutput {\n /** The patient's sex. */\n sex?: PatientSexOutput;\n /** The patient's date of birth. */\n birthDate?: string;\n /** Known clinical information for the patient, structured. */\n clinicalInfo?: Array<ResourceOutput>;\n}\n\n/**\n * Resource is the ancestor of DomainResource from which most resources are derived. Bundle, Parameters, and Binary extend Resource directly.\n * Based on [FHIR Resource](https://www.hl7.org/fhir/r4/resource.html\n */\nexport interface ResourceOutput extends Record<string, any> {\n /** The type of resource */\n resourceType: string;\n /** Resource Id */\n id?: string;\n /** Metadata about the resource */\n meta?: MetaOutput;\n /** A set of rules under which this content was created */\n implicitRules?: string;\n /** Language of the resource content */\n language?: string;\n}\n\n/**\n * Metadata about a resource\n * Based on [FHIR Meta](https://www.hl7.org/fhir/R4/resource.html#Meta)\n */\nexport interface MetaOutput {\n /** 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. */\n versionId?: string;\n /** When the resource last changed - e.g. when the version changed. */\n lastUpdated?: string;\n /** 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. */\n source?: string;\n /** 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). */\n profile?: string[];\n /** Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure. */\n security?: Array<CodingOutput>;\n /** 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. */\n tag?: Array<CodingOutput>;\n}\n\n/**\n * A Coding is a representation of a defined concept using a symbol from a defined \"code system\".\n * Based on [FHIR Coding](https://www.hl7.org/fhir/R4/datatypes.html#Coding)\n */\nexport interface CodingOutput extends ElementOutput {\n /** Identity of the terminology system */\n system?: string;\n /** Version of the system - if relevant */\n version?: string;\n /** Symbol in syntax defined by the system */\n code?: string;\n /** Representation defined by the system */\n display?: string;\n}\n\n/**\n * The base definition for all elements contained inside a resource.\n * Based on [FHIR Element](https://www.hl7.org/fhir/R4/element.html)\n */\nexport interface ElementOutput {\n /** Unique id for inter-element referencing */\n id?: string;\n /** Additional Content defined by implementations */\n extension?: Array<ExtensionOutput>;\n}\n\n/**\n * Base for all elements\n * Based on [FHIR Element](https://www.hl7.org/fhir/datatypes.html#Element)\n */\nexport interface ExtensionOutput extends ElementOutput {\n /** Source of the definition for the extension code - a logical name or a URL. */\n url: string;\n /** Value as Quantity */\n valueQuantity?: QuantityOutput;\n /** Value as CodeableConcept */\n valueCodeableConcept?: CodeableConceptOutput;\n /** Value as string */\n valueString?: string;\n /** Value as boolean */\n valueBoolean?: boolean;\n /** Value as integer */\n valueInteger?: number;\n /** Value as Range. */\n valueRange?: RangeOutput;\n /** Value as Ratio. */\n valueRatio?: RatioOutput;\n /** Value as SampledData. */\n valueSampledData?: SampledDataOutput;\n /** Value as time (hh:mm:ss) */\n valueTime?: string;\n /** Value as dateTime. */\n valueDateTime?: string;\n /** Value as Period. */\n valuePeriod?: PeriodOutput;\n /** Value as reference. */\n valueReference?: ReferenceOutput;\n}\n\n/**\n * A measured or measurable amount\n * Based on [FHIR Quantity](https://www.hl7.org/fhir/R4/datatypes.html#Quantity)\n */\nexport interface QuantityOutput extends ElementOutput {\n /** Numerical value (with implicit precision) */\n value?: number;\n /** \\< | \\<= | \\>= | \\> - how to understand the value */\n comparator?: string;\n /** Unit representation */\n unit?: string;\n /** System that defines coded unit form */\n system?: string;\n /** Coded form of the unit */\n code?: string;\n}\n\n/**\n * Concept - reference to a terminology or just text\n * Based on [FHIR CodeableConcept](https://www.hl7.org/fhir/R4/datatypes.html#CodeableConcept)\n */\nexport interface CodeableConceptOutput extends ElementOutput {\n /** Code defined by a terminology system */\n coding?: Array<CodingOutput>;\n /** Plain text representation of the concept */\n text?: string;\n}\n\n/**\n * A set of ordered Quantities defined by a low and high limit\n * Based on [FHIR Range](https://www.hl7.org/fhir/R4/datatypes.html#Range)\n */\nexport interface RangeOutput extends ElementOutput {\n /** Low limit */\n low?: QuantityOutput;\n /** High limit */\n high?: QuantityOutput;\n}\n\n/**\n * A ratio of two Quantity values - a numerator and a denominator\n * Based on [FHIR Ratio](https://www.hl7.org/fhir/R4/datatypes.html#Ratio)\n */\nexport interface RatioOutput extends ElementOutput {\n /** Numerator value */\n numerator?: QuantityOutput;\n /** Denominator value */\n denominator?: QuantityOutput;\n}\n\n/**\n * A series of measurements taken by a device\n * Based on [FHIR SampledData](https://www.hl7.org/fhir/R4/datatypes.html#SampledData)\n */\nexport interface SampledDataOutput extends ElementOutput {\n /** Zero value and units */\n origin: QuantityOutput;\n /** Number of milliseconds between samples */\n period: number;\n /** Multiply data by this before adding to origin */\n factor?: number;\n /** Lower limit of detection */\n lowerLimit?: number;\n /** Upper limit of detection */\n upperLimit?: number;\n /** Number of sample points at each time point */\n dimensions: number;\n /** Decimal values with spaces, or \"E\" | \"U\" | \"L\" */\n data?: string;\n}\n\n/**\n * A time period defined by a start and end date and optionally time\n * Based on [FHIR Period](https://www.hl7.org/fhir/R4/datatypes.html#Period)\n */\nexport interface PeriodOutput extends ElementOutput {\n /** Starting time with inclusive boundary */\n start?: string;\n /** End time with inclusive boundary, if not ongoing */\n end?: string;\n}\n\n/**\n * A reference from one resource to another\n * Based on [FHIR Reference](https://www.hl7.org/fhir/R4/references.html)\n */\nexport interface ReferenceOutput extends ElementOutput {\n /** Literal reference, Relative, internal or absolute URL */\n reference?: string;\n /** Type the reference refers to (e.g. \"Patient\") */\n type?: string;\n /** Logical reference, when literal reference is not known */\n identifier?: IdentifierOutput;\n /** Text alternative for the resource */\n display?: string;\n}\n\n/**\n * An identifier intended for computation\n * Based on [FHIR Identifier](https://www.hl7.org/fhir/R4/identifier.html)\n */\nexport interface IdentifierOutput extends ElementOutput {\n /** usual | official | temp | secondary | old (If known) */\n use?: string;\n /** Description of identifier */\n type?: CodeableConceptOutput;\n /** The namespace for the identifier value */\n system?: string;\n /** The value that is unique */\n value?: string;\n /** Time period when id is/was valid for use */\n period?: PeriodOutput;\n /** Organization that issued id (may be just text) */\n assigner?: ReferenceOutput;\n}\n\n/**\n * 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.\n * Based on [FHIR Narrative](https://www.hl7.org/fhir/R4/narrative.html#Narrative)\n */\nexport interface NarrativeOutput extends ElementOutput {\n /** generated, extensions, additional, empty */\n status: string;\n /** xhtml */\n div: string;\n}\n\n/**\n * A text note which also contains information about who made the statement and when\n * Based on [FHIR Annotation](https://www.hl7.org/fhir/R4/datatypes.html#Annotation)\n */\nexport interface AnnotationOutput extends ElementOutput {\n /** Individual responsible for the annotation */\n authorString?: string;\n /** When the annotation was made */\n time?: string;\n /** The annotation - text content (as markdown) */\n text: string;\n}\n\n/**\n * Component results\n * Based on [FHIR Observation.component](https://www.hl7.org/fhir/R4/observation.html)\n */\nexport interface ObservationComponentOutput extends ElementOutput {\n /** Type of component observation (code / type) */\n code: CodeableConceptOutput;\n /** Value as Quantity */\n valueQuantity?: QuantityOutput;\n /** Value as CodeableConcept */\n valueCodeableConcept?: CodeableConceptOutput;\n /** Value as string */\n valueString?: string;\n /** Value as boolean */\n valueBoolean?: boolean;\n /** Value as integer */\n valueInteger?: number;\n /** Value as Range. */\n valueRange?: RangeOutput;\n /** Value as Ratio. */\n valueRatio?: RatioOutput;\n /** Value as SampledData. */\n valueSampledData?: SampledDataOutput;\n /** Value as time (hh:mm:ss) */\n valueTime?: string;\n /** Value as dateTime. */\n valueDateTime?: string;\n /** Value as Period. */\n valuePeriod?: PeriodOutput;\n /** Value as reference. */\n valueReference?: ReferenceOutput;\n /** Why the component result is missing */\n dataAbsentReason?: CodeableConceptOutput;\n /** High, low, normal, etc. */\n interpretation?: Array<CodeableConceptOutput>;\n /** Provides guide for interpretation of component result */\n referenceRange?: Array<ObservationReferenceRangeOutput>;\n}\n\n/**\n * Provides guide for interpretation of component result\n * Based on [FHIR Observation.referenceRange](https://www.hl7.org/fhir/R4/observation.html)\n */\nexport interface ObservationReferenceRangeOutput {\n /** Low Range, if relevant */\n low?: QuantityOutput;\n /** High Range, if relevant */\n high?: QuantityOutput;\n /** Reference range qualifier */\n type?: CodeableConceptOutput;\n /** Reference range population */\n appliesTo?: Array<CodeableConceptOutput>;\n /** Applicable age range, if relevant */\n age?: RangeOutput;\n /** Text based reference range in an observation */\n text?: string;\n}\n\n/** Contact details (See: https://www.hl7.org/fhir/R4/metadatatypes.html#ContactDetail) */\nexport interface ContactDetailOutput extends ElementOutput {\n /** Name of an individual to contact */\n name?: string;\n /** Contact details for individual or organization */\n telecom?: Array<ContactPointOutput>;\n}\n\n/**\n * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.\n * See https://www.hl7.org/fhir/R4/datatypes.html#ContactPoint\n */\nexport interface ContactPointOutput {\n /** phone | fax | email | pager | url | sms | other */\n system?: ContactPointSystemOutput;\n /** The actual contact point details */\n value?: string;\n /** home | work | temp | old | mobile - purpose of this contact point */\n use?: ContactPointUseOutput;\n /** Specify preferred order of use (1 = highest) */\n rank?: number;\n /** Time period when the contact point was/is in use */\n period?: PeriodOutput;\n}\n\n/**\n * A resource with narrative, extensions, and contained resources\n * Based on [FHIR DomainResource](https://www.hl7.org/fhir/domainresource.html)\n */\nexport interface DomainResourceOutputParent extends ResourceOutput {\n /** Text summary of the resource, for human interpretation */\n text?: NarrativeOutput;\n /** Contained, inline Resources */\n contained?: Array<ResourceOutput>;\n /** Additional Content defined by implementations */\n extension?: Array<ExtensionOutput>;\n /** Extensions that cannot be ignored */\n modifierExtension?: Array<ExtensionOutput>;\n /** resourceType */\n resourceType: string;\n}\n\n/**\n * Detailed information about observations\n * Based on [FHIR Observation](https://www.hl7.org/fhir/R4/observation.html)\n */\nexport interface ObservationOutput extends DomainResourceOutputParent {\n /** resourceType */\n resourceType: \"Observation\";\n /** Business Identifier for observation */\n identifier?: Array<IdentifierOutput>;\n /** registered | preliminary | final | amended + */\n status: ObservationStatusCodeTypeOutput;\n /** Classification of type of observation */\n category?: Array<CodeableConceptOutput>;\n /** Type of observation (code / type) */\n code: CodeableConceptOutput;\n /** Who and/or what the observation is about */\n subject?: ReferenceOutput;\n /** Healthcare event during which this observation is made */\n encounter?: ReferenceOutput;\n /** Clinically relevant time/time-period for observation */\n effectiveDateTime?: string;\n /** Clinically relevant time/time-period for observation */\n effectivePeriod?: PeriodOutput;\n /** Clinically relevant time/time-period for observation */\n effectiveInstant?: string;\n /** Date/Time this version was made available */\n issued?: string;\n /** Actual result */\n valueQuantity?: QuantityOutput;\n /** Actual result */\n valueCodeableConcept?: CodeableConceptOutput;\n /** Actual result */\n valueString?: string;\n /** Actual result */\n valueBoolean?: boolean;\n /** Actual result */\n valueInteger?: number;\n /** Actual result */\n valueRange?: RangeOutput;\n /** Actual result */\n valueRatio?: RatioOutput;\n /** Actual result */\n valueSampledData?: SampledDataOutput;\n /** Actual result */\n valueTime?: string;\n /** Actual result */\n valueDateTime?: string;\n /** Actual result */\n valuePeriod?: PeriodOutput;\n /** Why the result is missing */\n dataAbsentReason?: CodeableConceptOutput;\n /** High, low, normal, etc. */\n interpretation?: Array<CodeableConceptOutput>;\n /** Comments about the observation */\n note?: Array<AnnotationOutput>;\n /** Observed body part */\n bodySite?: CodeableConceptOutput;\n /** How it was done */\n method?: CodeableConceptOutput;\n /** Provides guide for interpretation */\n referenceRange?: Array<ObservationReferenceRangeOutput>;\n /** Related resource that belongs to the Observation group */\n hasMember?: Array<ReferenceOutput>;\n /** Related measurements the observation is made from */\n derivedFrom?: Array<ReferenceOutput>;\n /** Component results */\n component?: Array<ObservationComponentOutput>;\n}\n\n/**\n * Detailed information about conditions, problems or diagnoses\n * Based on [FHIR Condition](https://www.hl7.org/fhir/R4/condition.html)\n */\nexport interface ConditionOutput extends DomainResourceOutputParent {\n /** resourceType */\n resourceType: \"Condition\";\n /** External Ids for this condition */\n identifier?: Array<IdentifierOutput>;\n /** active | recurrence | relapse | inactive | remission | resolved */\n clinicalStatus?: CodeableConceptOutput;\n /** unconfirmed | provisional | differential | confirmed | refuted | entered-in-error */\n verificationStatus?: CodeableConceptOutput;\n /** problem-list-item | encounter-diagnosis */\n category?: Array<CodeableConceptOutput>;\n /** Subjective severity of condition */\n severity?: CodeableConceptOutput;\n /** Identification of the condition, problem or diagnosis */\n code?: CodeableConceptOutput;\n /** Anatomical location, if relevant */\n bodySite?: Array<CodeableConceptOutput>;\n /** Encounter created as part of */\n encounter?: ReferenceOutput;\n /** Estimated or actual date, date-time, or age */\n onsetDateTime?: string;\n /** Estimated or actual date, date-time, or age */\n onsetAge?: QuantityOutput;\n /** Estimated or actual date, date-time, or age */\n onsetPeriod?: PeriodOutput;\n /** Estimated or actual date, date-time, or age */\n onsetRange?: RangeOutput;\n /** Estimated or actual date, date-time, or age */\n onsetString?: string;\n /** When in resolution/remission */\n abatementDateTime?: string;\n /** When in resolution/remission */\n abatementAge?: QuantityOutput;\n /** When in resolution/remission */\n abatementPeriod?: PeriodOutput;\n /** When in resolution/remission */\n abatementRange?: RangeOutput;\n /** When in resolution/remission */\n abatementString?: string;\n /** Date record was first recorded */\n recordedDate?: string;\n /** stge/grade, usually assessed formally */\n stage?: Array<ConditionStageOutput>;\n /** Additional information about the Condition */\n note?: Array<AnnotationOutput>;\n}\n\n/**\n * Stage/grade, usually assessed formally\n * Based on [FHIR Condition.Stage](https://www.hl7.org/fhir/R4/condition.html)\n */\nexport interface ConditionStageOutput {\n /** Simple summary (disease specific) */\n summary?: CodeableConceptOutput;\n /** Kind of staging */\n type?: CodeableConceptOutput;\n}\n\n/**\n * Detailed information about Research Study\n * Based on [FHIR ResearchStudy](https://www.hl7.org/fhir/R4/researchstudy.html)\n */\nexport interface ResearchStudyOutput extends DomainResourceOutputParent {\n /** resourceType */\n resourceType: \"ResearchStudy\";\n /** Business Identifier for study */\n identifier?: Array<IdentifierOutput>;\n /** Name for this study */\n title?: string;\n /** Steps followed in executing study */\n protocol?: Array<ReferenceOutput>;\n /** Part of larger study */\n partOf?: Array<ReferenceOutput>;\n /** 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 */\n status: ResearchStudyStatusCodeTypeOutput;\n /** treatment | prevention | diagnostic | supportive-care | screening | health-services-research | basic-science | device-feasibility */\n primaryPurposeType?: CodeableConceptOutput;\n /** n-a | early-phase-1 | phase-1 | phase-1-phase-2 | phase-2 | phase-2-phase-3 | phase-3 | phase-4 */\n phase?: CodeableConceptOutput;\n /** Classifications for the study */\n category?: Array<CodeableConceptOutput>;\n /** Drugs, devices, etc. under study */\n focus?: Array<CodeableConceptOutput>;\n /** Condition being studied */\n condition?: Array<CodeableConceptOutput>;\n /** Contact details for the study */\n contact?: Array<ContactDetailOutput>;\n /** Used to search for the study */\n keyword?: Array<CodeableConceptOutput>;\n /** Geographic region(s) for study */\n location?: Array<CodeableConceptOutput>;\n /** What this is study doing */\n description?: string;\n /** Inclusion & exclusion criteria */\n enrollment?: Array<ReferenceOutput>;\n /** When the study began and ended */\n period?: PeriodOutput;\n /** Organization that initiates and is legally responsible for the study */\n sponsor?: ReferenceOutput;\n /** Researcher who oversees multiple aspects of the study */\n principalInvestigator?: ReferenceOutput;\n /** Facility where study activities are conducted */\n site?: Array<ReferenceOutput>;\n /** accrual-goal-met | closed-due-to-toxicity | closed-due-to-lack-of-study-progress | temporarily-closed-per-study-design */\n reasonStopped?: CodeableConceptOutput;\n /** Comments made about the study */\n note?: Array<AnnotationOutput>;\n /** Defined path through the study for a subject */\n arm?: { name: string; type?: CodeableConceptOutput; description?: string }[];\n /** A goal for the study */\n objective?: { name: string; type?: CodeableConceptOutput }[];\n}\n\n/** visit/encounter information */\nexport interface PatientEncounterOutput {\n /** The id of the visit. */\n id: string;\n /**\n * Time period of the visit.\n * In case of admission, use timePeriod.start to indicate the admission time and timePeriod.end to indicate the discharge time.\n */\n period?: TimePeriodOutput;\n /** The class of the encounter. */\n class?: EncounterClassOutput;\n}\n\n/** A duration of time during which an event is happening */\nexport interface TimePeriodOutput {\n /** Starting time with inclusive boundary */\n start?: string;\n /** End time with inclusive boundary, if not ongoing */\n end?: string;\n}\n\n/** A clinical document related to a patient. Document here is in the wide sense - not just a text document (note). */\nexport interface PatientDocumentOutput {\n /** The type of the patient document, such as 'note' (text document) or 'fhirBundle' (FHIR JSON document). */\n type: DocumentTypeOutput;\n /** The type of the clinical document. */\n clinicalType?: ClinicalDocumentTypeOutput;\n /** A given identifier for the document. Has to be unique across all documents for a single patient. */\n id: string;\n /** A 2 letter ISO 639-1 representation of the language of the document. */\n language?: string;\n /** The date and time when the document was created. */\n createdAt?: string;\n /** Document author(s) */\n authors?: Array<DocumentAuthorOutput>;\n /** specialty type the document */\n specialtyType?: SpecialtyTypeOutput;\n /** Administrative metadata for the document. */\n administrativeMetadata?: DocumentAdministrativeMetadataOutput;\n /** The content of the patient document. */\n content: DocumentContentOutput;\n}\n\n/** Document author */\nexport interface DocumentAuthorOutput {\n /** author id */\n id?: string;\n /** Text representation of the full name */\n fullName?: string;\n}\n\n/** Document administrative metadata */\nexport interface DocumentAdministrativeMetadataOutput {\n /** List of procedure information associated with the document. */\n orderedProcedures?: Array<OrderedProcedureOutput>;\n /** Reference to the encounter associated with the document. */\n encounterId?: string;\n}\n\n/** Procedure information */\nexport interface OrderedProcedureOutput {\n /** Procedure code */\n code?: CodeableConceptOutput;\n /** Procedure description */\n description?: string;\n /** Additional Content defined by implementations */\n extension?: Array<ExtensionOutput>;\n}\n\n/** The content of the patient document. */\nexport interface DocumentContentOutput {\n /**\n * The type of the content's source.\n * In case the source type is 'inline', the content is given as a string (for instance, text).\n * In case the source type is 'reference', the content is given as a URI.\n */\n sourceType: DocumentContentSourceTypeOutput;\n /** The content of the document, given either inline (as a string) or as a reference (URI). */\n value: string;\n}\n\n/** Configuration affecting the Radiology Insights model's inference. */\nexport interface RadiologyInsightsModelConfigurationOutput {\n /** An indication whether the model should produce verbose output. */\n verbose?: boolean;\n /** An indication whether the model's output should include evidence for the inferences. */\n includeEvidence?: boolean;\n /** This is a list of inference types to be inferred for the current request. It could be used if only part of the Radiology Insights inferences are required. If this list is omitted or empty, the model will return all the inference types. */\n inferenceTypes?: RadiologyInsightsInferenceTypeOutput[];\n /** Options regarding follow up recommendation inferences and finding inferences. */\n inferenceOptions?: RadiologyInsightsInferenceOptionsOutput;\n /** Local for the model to use. If not specified, the model will use the default locale. */\n locale?: string;\n}\n\n/** Options regarding follow up recommendation inferences and finding inferences. */\nexport interface RadiologyInsightsInferenceOptionsOutput {\n /** Follow-up recommendation options. */\n followupRecommendationOptions?: FollowupRecommendationOptionsOutput;\n /** Finding options. */\n findingOptions?: FindingOptionsOutput;\n}\n\n/** Follow-up recommendation options. */\nexport interface FollowupRecommendationOptionsOutput {\n /** Include/Exclude follow-up recommendations without a specific radiology procedure. Default is false. */\n includeRecommendationsWithNoSpecifiedModality?: boolean;\n /** Include/Exclude follow-up recommendations in references to a guideline or article. Default is false. */\n includeRecommendationsInReferences?: boolean;\n /** If this is true, provide one or more sentences as evidence for the recommendation, next to the token evidence. The start and end positions of these sentences will be put in an extension with url 'modality_sentences'. Default is false. */\n provideFocusedSentenceEvidence?: boolean;\n}\n\n/** Finding options. */\nexport interface FindingOptionsOutput {\n /** If this is true, provide the sentence that contains the first token of the finding's clinical indicator (i.e. the medical problem), if there is one. This sentence is provided as an extension with url 'ci_sentence', next to the token evidence. Default is false. */\n provideFocusedSentenceEvidence?: boolean;\n}\n\n/** The inference results for the Radiology Insights request. If field 'status' has value 'succeeded', then field 'result' will contain an instance of RadiologyInsightsInferenceResult. */\nexport interface RadiologyInsightsInferenceResultOutput {\n /** Results for the patients given in the request. */\n patientResults: Array<RadiologyInsightsPatientResultOutput>;\n /** The version of the model used for inference, expressed as the model date. */\n modelVersion: string;\n}\n\n/** Results of the model's work for a single patient. */\nexport interface RadiologyInsightsPatientResultOutput {\n /** Identifier given for the patient in the request. */\n patientId: string;\n /** The model's inferences for the given patient. */\n inferences: Array<RadiologyInsightsInferenceOutput>;\n}\n\n/**\n * An inference made by the Radiology Insights model regarding a patient.\n * - AgeMismatch\n * - SexMismatch\n * - LateralityDiscrepancy\n * - CompleteOrderDiscrepancy\n * - LimitedOrderDiscrepancy\n * - Finding\n * - CriticalResult\n * - FollowupRecommendation\n * - RadiologyProcedure\n * - FollowupCommunication\n */\nexport interface RadiologyInsightsInferenceOutputParent {\n /** Additional Content defined by implementations */\n extension?: Array<ExtensionOutput>;\n /** The kind of inference */\n kind: string;\n}\n\n/** A notification for age mismatch is displayed when the age mentioned in a document for a specific patient does not match the age specified in the patient information. */\nexport interface AgeMismatchInferenceOutput extends RadiologyInsightsInferenceOutputParent {\n /** Inference type. */\n kind: \"ageMismatch\";\n}\n\n/** A notification for a sex mismatch is displayed when the gender, personal pronouns, gender-related body parts, or gender-related procedures mentioned in a patient's clinical document are either inconsistent or do not match the gender specified in the patient information. */\nexport interface SexMismatchInferenceOutput extends RadiologyInsightsInferenceOutputParent {\n /** Inference type. */\n kind: \"sexMismatch\";\n /** Sex indication : SNOMED CT code for gender finding. */\n sexIndication: CodeableConceptOutput;\n}\n\n/** A laterality mismatch occurs when there is a discrepancy between the clinical documentation and the ordered procedure (orderLateralityMismatch), a contradiction within the clinical document (textLateralityContradiction), or when no laterality is mentioned (textLateralityMissing). */\nexport interface LateralityDiscrepancyInferenceOutput\n extends RadiologyInsightsInferenceOutputParent {\n /** Inference type. */\n kind: \"lateralityDiscrepancy\";\n /** Laterality indication : SNOMED CT code for laterality qualifier value. */\n lateralityIndication?: CodeableConceptOutput;\n /** Mismatch type : orderLateralityMismatch, textLateralityContradiction, textLateralityMissing. */\n discrepancyType: LateralityDiscrepancyTypeOutput;\n}\n\n/** A complete order discrepancy is shown when one or more body parts and/or measurements that should be in the document (because there is a complete order) are not present. */\nexport interface CompleteOrderDiscrepancyInferenceOutput\n extends RadiologyInsightsInferenceOutputParent {\n /** Inference type. */\n kind: \"completeOrderDiscrepancy\";\n /** Order type : CPT ultrasound complete code for abdomen, retroperitoneal, pelvis or breast. */\n orderType: CodeableConceptOutput;\n /** List of missing body parts required by a complete order : SNOMED CT codes. */\n missingBodyParts?: Array<CodeableConceptOutput>;\n /** List of missing body parts that require measurement by a complete order : SNOMED CT codes. */\n missingBodyPartMeasurements?: Array<CodeableConceptOutput>;\n}\n\n/** A limited order discrepancy occurs when there is a limited order, but all body parts and measurements that are needed for a complete order are present in the document. */\nexport interface LimitedOrderDiscrepancyInferenceOutput\n extends RadiologyInsightsInferenceOutputParent {\n /** Inference type. */\n kind: \"limitedOrderDiscrepancy\";\n /** Order type : CPT ultrasound complete code for abdomen, retroperitoneal, pelvis or breast. */\n orderType: CodeableConceptOutput;\n /** List of body parts found in the document : SNOMED CT codes. */\n presentBodyParts?: Array<CodeableConceptOutput>;\n /** List of body parts that are measured according to the document : SNOMED CT codes. */\n presentBodyPartMeasurements?: Array<CodeableConceptOutput>;\n}\n\n/** Findings in a radiology report typically describe abnormalities, lesions, or other notable observations related to the anatomy or pathology of the imaged area. */\nexport interface FindingInferenceOutput extends RadiologyInsightsInferenceOutputParent {\n /** Inference type. */\n kind: \"finding\";\n /** Finding data : contains extensions, fields and components linked with the finding. */\n finding: ObservationOutput;\n}\n\n/** Critical results refer to findings of utmost importance that may require timely attention due to their potential impact on patient care. */\nexport interface CriticalResultInferenceOutput extends RadiologyInsightsInferenceOutputParent {\n /** Inference type. */\n kind: \"criticalResult\";\n /** The complete Critical Result, as outlined below, will be reused for the recommendation. */\n result: CriticalResultOutput;\n}\n\n/** Critical Result consists of two properties. */\nexport interface CriticalResultOutput {\n /** Description : medical problem. */\n description: string;\n /** Finding linked to the critical result. */\n finding?: ObservationOutput;\n}\n\n/** Radiology procedures are the specific imaging studies or examinations ordered for the patient, extracted from the document information and text. */\nexport interface RadiologyProcedureInferenceOutput extends RadiologyInsightsInferenceOutputParent {\n /** Inference type. */\n kind: \"radiologyProcedure\";\n /** LOINC codes for the procedure. */\n procedureCodes?: Array<CodeableConceptOutput>;\n /** Imaging procedures. */\n imagingProcedures: Array<ImagingProcedureOutput>;\n /** Ordered procedure information from the document information or text. */\n orderedProcedure: OrderedProcedureOutput;\n}\n\n/** Imaging procedure. */\nexport interface ImagingProcedureOutput {\n /** Modality : SNOMED CT code. */\n modality: CodeableConceptOutput;\n /** Anatomy : SNOMED CT code. */\n anatomy: CodeableConceptOutput;\n /** Laterality : SNOMED CT code. */\n laterality?: CodeableConceptOutput;\n /** Contrast : see RadiologyCodeWithTypes (below). */\n contrast?: RadiologyCodeWithTypesOutput;\n /** View : see RadiologyCodeWithTypes (below). */\n view?: RadiologyCodeWithTypesOutput;\n}\n\n/** Radiology code with types : used in imaging procedure recommendation for contrast and view. */\nexport interface RadiologyCodeWithTypesOutput {\n /** The SNOMED CT code indicates whether imaging was conducted with or without contrast in the case of contrast, and in the case of views, it denotes the number of views. */\n code: CodeableConceptOutput;\n /** The collection of types will indicate the contrast substance used in the case of contrast and, in the case of views, it will specify the types of views, such as lateral and frontal, etc. */\n types: Array<CodeableConceptOutput>;\n}\n\n/** Follow-up recommendations offer guidance to healthcare providers on managing and monitoring patients based on the findings of imaging studies. */\nexport interface FollowupRecommendationInferenceOutput\n extends RadiologyInsightsInferenceOutputParent {\n /** Inference type. */\n kind: \"followupRecommendation\";\n /** Date and time are displayed when the procedure is recommended to be done at a specific point in time. */\n effectiveAt?: string;\n /** The period is shown if a specific period is mentioned, with a start and end date-time. */\n effectivePeriod?: PeriodOutput;\n /** Findings related to the recommendation. */\n findings?: Array<RecommendationFindingOutput>;\n /** The conditional value indicates whether or not the sentence containing the recommendation includes a conditional statement. Keywords for conditional statements include 'if', 'when', 'unless', and so on. */\n isConditional: boolean;\n /** The option value indicates whether or not the sentence containing the recommendation includes an optional statement. Keywords for optional statements include 'recommend', 'consider', and so on. */\n isOption: boolean;\n /** The guideline value indicates whether or not the recommendation is part of a guideline section that compiles all recommendations applicable to various findings. */\n isGuideline: boolean;\n /** Hedging refers to ambiguous, vague or imprecise language within the sentence of the recommendation. Keywords for hedging are 'can be','may be',and so on. */\n isHedging: boolean;\n /** The procedure recommendation can be a generic procedure or an imaging procedure. */\n recommendedProcedure: ProcedureRecommendationOutput;\n}\n\n/** Finding reference for recommendation. */\nexport interface RecommendationFindingOutput {\n /** Finding linked to a recommendation. */\n finding?: ObservationOutput;\n /** Critical result linked to a recommendation. */\n criticalFinding?: CriticalResultOutput;\n /** Recommendation finding status. */\n recommendationFindingStatus: RecommendationFindingStatusTypeOutput;\n /** Additional Content defined by implementations */\n extension?: Array<ExtensionOutput>;\n}\n\n/** The procedure recommendation can be a generic procedure or an imaging procedure. */\nexport interface ProcedureRecommendationOutputParent {\n /** Additional Content defined by implementations */\n extension?: Array<ExtensionOutput>;\n /** The kind of procedure recommendation eg. generic or imaging*/\n kind: string;\n}\n\n/** Generic procedure information. */\nexport interface GenericProcedureRecommendationOutput extends ProcedureRecommendationOutputParent {\n /** Procedure type : generic. */\n kind: \"genericProcedureRecommendation\";\n /** Procedure modality : SNOMED CT code. */\n code: CodeableConceptOutput;\n /** Procedure description : MANAGEMENT PROCEDURE (PROCEDURE) or CONSULTATION (PROCEDURE) based on SNOMED CT. */\n description?: string;\n}\n\n/** Imaging procedures. */\nexport interface ImagingProcedureRecommendationOutput extends ProcedureRecommendationOutputParent {\n /** Procedure type : imaging. */\n kind: \"imagingProcedureRecommendation\";\n /** LOINC codes for the procedure. */\n procedureCodes?: Array<CodeableConceptOutput>;\n /** Imaging procedures. */\n imagingProcedures: Array<ImagingProcedureOutput>;\n}\n\n/** Follow-up communication involves the exchange of important information, recommendations, or updates between radiologists and other healthcare professionals involved in a patient's care. */\nexport interface FollowupCommunicationInferenceOutput\n extends RadiologyInsightsInferenceOutputParent {\n /** Inference type. */\n kind: \"followupCommunication\";\n /** Communication date and time. */\n communicatedAt?: string[];\n /** Recipient of the communication. */\n recipient?: MedicalProfessionalTypeOutput[];\n /** Communication was acknowledged. */\n wasAcknowledged: boolean;\n}\n\n/** A response containing error details. */\nexport interface HealthInsightsErrorResponseOutput {\n /** The error object. */\n error: ErrorModel;\n /** An opaque, globally-unique, server-generated string identifier for the request. */\n requestId: { response: RequestIdResponseHeaderOutput };\n}\n\n/** Provides the 'x-ms-request-id' header to enable request correlation in responses. */\nexport interface RequestIdResponseHeaderOutput {}\n\n/**\n * A resource with narrative, extensions, and contained resources\n * Based on [FHIR DomainResource](https://www.hl7.org/fhir/domainresource.html)\n */\nexport type DomainResourceOutput =\n | DomainResourceOutputParent\n | ObservationOutput\n | ConditionOutput\n | ResearchStudyOutput;\n/**\n * An inference made by the Radiology Insights model regarding a patient.\n * - AgeMismatch\n * - SexMismatch\n * - LateralityDiscrepancy\n * - CompleteOrderDiscrepancy\n * - LimitedOrderDiscrepancy\n * - Finding\n * - CriticalResult\n * - FollowupRecommendation\n * - RadiologyProcedure\n * - FollowupCommunication\n */\nexport type RadiologyInsightsInferenceOutput =\n | RadiologyInsightsInferenceOutputParent\n | AgeMismatchInferenceOutput\n | SexMismatchInferenceOutput\n | LateralityDiscrepancyInferenceOutput\n | CompleteOrderDiscrepancyInferenceOutput\n | LimitedOrderDiscrepancyInferenceOutput\n | FindingInferenceOutput\n | CriticalResultInferenceOutput\n | RadiologyProcedureInferenceOutput\n | FollowupRecommendationInferenceOutput\n | FollowupCommunicationInferenceOutput;\n/** The procedure recommendation can be a generic procedure or an imaging procedure. */\nexport type ProcedureRecommendationOutput =\n | ProcedureRecommendationOutputParent\n | GenericProcedureRecommendationOutput\n | ImagingProcedureRecommendationOutput;\n/** Alias for PatientSexOutput */\nexport type PatientSexOutput = string | \"female\" | \"male\" | \"unspecified\";\n/** Alias for ContactPointSystemOutput */\nexport type ContactPointSystemOutput =\n | string\n | \"phone\"\n | \"fax\"\n | \"email\"\n | \"pager\"\n | \"url\"\n | \"sms\"\n | \"other\";\n/** Alias for ContactPointUseOutput */\nexport type ContactPointUseOutput = string | \"home\" | \"work\" | \"temp\" | \"old\" | \"mobile\";\n/** Alias for ObservationStatusCodeTypeOutput */\nexport type ObservationStatusCodeTypeOutput =\n | string\n | \"registered\"\n | \"preliminary\"\n | \"final\"\n | \"amended\"\n | \"corrected\"\n | \"cancelled\"\n | \"entered-in-error\"\n | \"unknown\";\n/** Alias for ResearchStudyStatusCodeTypeOutput */\nexport type ResearchStudyStatusCodeTypeOutput =\n | string\n | \"active\"\n | \"administratively-completed\"\n | \"approved\"\n | \"closed-to-accrual\"\n | \"closed-to-accrual-and-intervention\"\n | \"completed\"\n | \"disapproved\"\n | \"in-review\"\n | \"temporarily-closed-to-accrual\"\n | \"temporarily-closed-to-accrual-and-intervention\"\n | \"withdrawn\";\n/** Alias for EncounterClassOutput */\nexport type EncounterClassOutput =\n | string\n | \"inpatient\"\n | \"ambulatory\"\n | \"observation\"\n | \"emergency\"\n | \"virtual\"\n | \"healthHome\";\n/** Alias for DocumentTypeOutput */\nexport type DocumentTypeOutput = string | \"note\" | \"fhirBundle\" | \"dicom\" | \"genomicSequencing\";\n\n/** Alias for ClinicalDocumentTypeOutput */\nexport enum ClinicalDocumentTypeOutputEnum {\n /** Consultation documents */\n Consultation = \"consultation\",\n /** Discharge summary documents */\n DischargeSummary = \"dischargeSummary\",\n /** H&P documents */\n HistoryAndPhysical = \"historyAndPhysical\",\n /** Radiology documents */\n RadiologyReport = \"radiologyReport\",\n /** Procedure notes */\n Procedure = \"procedure\",\n /** Progress notes */\n Progress = \"progress\",\n /** Laboratory documents */\n Laboratory = \"laboratory\",\n // Add more predefined types as needed\n // Add more predefined types as needed\n}\n/** Output types of documents */\nexport type ClinicalDocumentTypeOutput = ClinicalDocumentTypeOutputEnum;\n/** Alias for SpecialtyTypeOutput */\nexport type SpecialtyTypeOutput = string | \"pathology\" | \"radiology\";\n/** Alias for DocumentContentSourceTypeOutput */\nexport type DocumentContentSourceTypeOutput = string | \"inline\" | \"reference\";\n/** Alias for RadiologyInsightsInferenceTypeOutput */\nexport type RadiologyInsightsInferenceTypeOutput =\n | string\n | \"ageMismatch\"\n | \"lateralityDiscrepancy\"\n | \"sexMismatch\"\n | \"completeOrderDiscrepancy\"\n | \"limitedOrderDiscrepancy\"\n | \"finding\"\n | \"criticalResult\"\n | \"followupRecommendation\"\n | \"followupCommunication\"\n | \"radiologyProcedure\";\n/** Alias for LateralityDiscrepancyTypeOutput */\nexport type LateralityDiscrepancyTypeOutput =\n | string\n | \"orderLateralityMismatch\"\n | \"textLateralityContradiction\"\n | \"textLateralityMissing\";\n/** Alias for RecommendationFindingStatusTypeOutput */\nexport type RecommendationFindingStatusTypeOutput =\n | string\n | \"present\"\n | \"differential\"\n | \"ruleOut\"\n | \"conditional\";\n/** Alias for MedicalProfessionalTypeOutput */\nexport type MedicalProfessionalTypeOutput =\n | string\n | \"unknown\"\n | \"doctor\"\n | \"nurse\"\n | \"midwife\"\n | \"physicianAssistant\";\n/** Alias for JobStatusOutput */\nexport type JobStatusOutput =\n | string\n | \"notStarted\"\n | \"running\"\n | \"succeeded\"\n | \"failed\"\n | \"canceled\";\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, HttpResponse } from \"@azure-rest/core-client\";\nimport {\n CreateHttpPollerOptions,\n LongRunningOperation,\n LroResponse,\n OperationState,\n SimplePollerLike,\n createHttpPoller,\n} from \"@azure/core-lro\";\nimport {\n CreateJob200Response,\n CreateJob201Response,\n CreateJobDefaultResponse,\n CreateJobLogicalResponse,\n} from \"./responses\";\n/**\n * Helper function that builds a Poller object to help polling a long running operation.\n * @param client - Client to use for sending the request to get additional pages.\n * @param initialResponse - The initial response.\n * @param options - Options to set a resume state or custom polling interval.\n * @returns - A poller object to poll for operation state updates and eventually get the final response.\n */\nexport async function getLongRunningPoller<\n TResult extends CreateJobLogicalResponse | CreateJobDefaultResponse,\n>(\n client: Client,\n initialResponse: CreateJob200Response | CreateJob201Response | CreateJobDefaultResponse,\n options?: CreateHttpPollerOptions<TResult, OperationState<TResult>>,\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>>;\nexport async function getLongRunningPoller<TResult extends HttpResponse>(\n client: Client,\n initialResponse: TResult,\n options: CreateHttpPollerOptions<TResult, OperationState<TResult>> = {},\n): Promise<SimplePollerLike<OperationState<TResult>, TResult>> {\n const poller: LongRunningOperation<TResult> = {\n requestMethod: initialResponse.request.method,\n requestPath: initialResponse.request.url,\n sendInitialRequest: async () => {\n // In the case of Rest Clients we are building the LRO poller object from a response that's the reason\n // we are not triggering the initial request here, just extracting the information from the\n // response we were provided.\n return getLroResponse(initialResponse);\n },\n sendPollRequest: async (path) => {\n // This is the callback that is going to be called to poll the service\n // to get the latest status. We use the client provided and the polling path\n // which is an opaque URL provided by caller, the service sends this in one of the following headers: operation-location, azure-asyncoperation or location\n // depending on the lro pattern that the service implements. If non is provided we default to the initial path.\n const response = await client.pathUnchecked(path ?? initialResponse.request.url).get();\n const lroResponse = getLroResponse(response as TResult);\n lroResponse.rawResponse.headers[\"x-ms-original-url\"] = initialResponse.request.url;\n return lroResponse;\n },\n };\n\n options.resolveOnUnsuccessful = options.resolveOnUnsuccessful ?? true;\n return createHttpPoller(poller, options);\n}\n\n/**\n * Converts a Rest Client response to a response that the LRO implementation understands\n * @param response - a rest client http response\n * @returns - An LRO response that the LRO implementation understands\n */\nfunction getLroResponse<TResult extends HttpResponse>(response: TResult): LroResponse<TResult> {\n if (Number.isNaN(response.status)) {\n throw new TypeError(`Status code of the response is not a number. Value: ${response.status}`);\n }\n\n return {\n flatResponse: response,\n rawResponse: {\n ...response,\n statusCode: Number.parseInt(response.status),\n body: response.body,\n },\n };\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/** Returns all parameters per item*/\nexport function buildMultiCollection(items: string[], parameterName: string): string {\n return items\n .map((item, index) => {\n if (index === 0) {\n return item;\n }\n return `${parameterName}=${item}`;\n })\n .join(\"&\");\n}\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport AzureHealthInsightsClient from \"./azureHealthInsightsClient\";\n\nexport * from \"./azureHealthInsightsClient\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./parameters\";\nexport * from \"./pollingHelper\";\nexport * from \"./responses\";\nexport * from \"./serializeHelper\";\n\nexport default AzureHealthInsightsClient;\n"],"names":["createClientLogger","getClient","ClinicalDocumentTypeEnum","ClinicalDocumentTypeOutputEnum","createHttpPoller"],"mappings":";;;;;;;;AAAA;AACA;AAGO,MAAM,MAAM,GAAGA,2BAAkB,CAAC,mCAAmC,CAAC;;ACJ7E;AACA;AAOA;;;;;AAKG;AACW,SAAU,YAAY,CAClC,aAAqB,EACrB,WAA4B,EAC5B,OAAA,GAAyB,EAAE,EAAA;;AAE3B,IAAA,MAAM,WAAW,GAAG,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,OAAO,CAAC,QAAQ,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,OAAO,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,CAAG,EAAA,aAAa,kBAAkB,CAAC;IAC9F,OAAO,CAAC,UAAU,GAAG,CAAA,EAAA,GAAA,OAAO,CAAC,UAAU,MAAI,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAA,YAAY,CAAC;IACxD,MAAM,aAAa,GAAG,CAAA,qDAAA,CAAuD,CAAC;IAC9E,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;UAChE,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAI,CAAA,EAAA,aAAa,CAAE,CAAA;AAChE,UAAE,CAAA,EAAG,aAAa,CAAA,CAAE,CAAC;AACzB,IAAA,OAAO,GACF,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,MAAA,CAAA,EAAA,EAAA,OAAO,CACV,EAAA,EAAA,gBAAgB,EAAE;YAChB,eAAe;AAChB,SAAA,EACD,cAAc,EAAE;YACd,MAAM,EAAE,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,OAAO,CAAC,cAAc,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA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Q;AACtB,QAAA,WAAW,kCACN,QAAQ,CAAA,EAAA,EACX,UAAU,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,EACpB,CAAA;KACF,CAAC;AACJ;;AChFA;AACA;AAEA;AACgB,SAAA,oBAAoB,CAAC,KAAe,EAAE,aAAqB,EAAA;AACzE,IAAA,OAAO,KAAK;AACT,SAAA,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAI;AACnB,QAAA,IAAI,KAAK,KAAK,CAAC,EAAE;AACf,YAAA,OAAO,IAAI,CAAC;SACb;AACD,QAAA,OAAO,CAAG,EAAA,aAAa,CAAI,CAAA,EAAA,IAAI,EAAE,CAAC;AACpC,KAAC,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf;;ACbA;AACA;;;;;;;"}
|
|
@@ -4,25 +4,27 @@ import { getClient } from "@azure-rest/core-client";
|
|
|
4
4
|
import { logger } from "./logger";
|
|
5
5
|
/**
|
|
6
6
|
* Initialize a new instance of `AzureHealthInsightsClient`
|
|
7
|
-
* @param
|
|
7
|
+
* @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.cognitiveservices.azure.com).
|
|
8
8
|
* @param credentials - uniquely identify client credential
|
|
9
9
|
* @param options - the parameter for all optional parameters
|
|
10
10
|
*/
|
|
11
|
-
export default function createClient(
|
|
12
|
-
var _a, _b, _c, _d, _e, _f;
|
|
13
|
-
const
|
|
14
|
-
options.apiVersion = (
|
|
15
|
-
const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0
|
|
11
|
+
export default function createClient(endpointParam, credentials, options = {}) {
|
|
12
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
13
|
+
const endpointUrl = (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUrl) !== null && _b !== void 0 ? _b : `${endpointParam}/health-insights`;
|
|
14
|
+
options.apiVersion = (_c = options.apiVersion) !== null && _c !== void 0 ? _c : "2024-04-01";
|
|
15
|
+
const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0`;
|
|
16
16
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
17
17
|
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
18
18
|
: `${userAgentInfo}`;
|
|
19
19
|
options = Object.assign(Object.assign({}, options), { userAgentOptions: {
|
|
20
20
|
userAgentPrefix,
|
|
21
21
|
}, loggingOptions: {
|
|
22
|
-
logger: (
|
|
22
|
+
logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger.info,
|
|
23
23
|
}, credentials: {
|
|
24
|
-
|
|
24
|
+
scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : ["https://cognitiveservices.azure.com/.default"],
|
|
25
|
+
apiKeyHeaderName: (_j = (_h = options.credentials) === null || _h === void 0 ? void 0 : _h.apiKeyHeaderName) !== null && _j !== void 0 ? _j : "Ocp-Apim-Subscription-Key",
|
|
25
26
|
} });
|
|
26
|
-
|
|
27
|
+
const client = getClient(endpointUrl, credentials, options);
|
|
28
|
+
return client;
|
|
27
29
|
}
|
|
28
30
|
//# sourceMappingURL=azureHealthInsightsClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"azureHealthInsightsClient.js","sourceRoot":"","sources":["../../src/azureHealthInsightsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,
|
|
1
|
+
{"version":3,"file":"azureHealthInsightsClient.js","sourceRoot":"","sources":["../../src/azureHealthInsightsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAiB,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGnE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAqB,EACrB,WAA4B,EAC5B,UAAyB,EAAE;;IAE3B,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,GAAG,aAAa,kBAAkB,CAAC;IAC9F,OAAO,CAAC,UAAU,GAAG,MAAA,OAAO,CAAC,UAAU,mCAAI,YAAY,CAAC;IACxD,MAAM,aAAa,GAAG,uDAAuD,CAAC;IAC9E,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,MAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI,CAAC,8CAA8C,CAAC;YACvF,gBAAgB,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,gBAAgB,mCAAI,2BAA2B;SACvF,GACF,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAA8B,CAAC;IAEzF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ClientOptions, getClient } from \"@azure-rest/core-client\";\nimport { TokenCredential } from \"@azure/core-auth\";\nimport { AzureHealthInsightsClient } from \"./clientDefinitions\";\nimport { logger } from \"./logger\";\n\n/**\n * Initialize a new instance of `AzureHealthInsightsClient`\n * @param endpointParam - Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus2.cognitiveservices.azure.com).\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential,\n options: ClientOptions = {},\n): AzureHealthInsightsClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}/health-insights`;\n options.apiVersion = options.apiVersion ?? \"2024-04-01\";\n const userAgentInfo = `azsdk-js-health-insights-radiologyinsights-rest/1.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\"https://cognitiveservices.azure.com/.default\"],\n apiKeyHeaderName: options.credentials?.apiKeyHeaderName ?? \"Ocp-Apim-Subscription-Key\",\n },\n };\n\n const client = getClient(endpointUrl, credentials, options) as AzureHealthInsightsClient;\n\n return client;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {
|
|
1
|
+
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\nimport { CreateJobParameters, GetJobParameters } from \"./parameters\";\nimport {\n CreateJob200Response,\n CreateJob201Response,\n CreateJobDefaultResponse,\n GetJob200Response,\n GetJobDefaultResponse,\n} from \"./responses\";\n\n/** Gets the Radiology Insights job. */\nexport interface GetJob {\n /** Gets the status and details of the Radiology Insights job. */\n get(options?: GetJobParameters): StreamableMethod<GetJob200Response | GetJobDefaultResponse>;\n /** Creates a Radiology Insights job with the given request body. */\n put(\n options: CreateJobParameters,\n requestOptions?: GetJobParameters,\n ): StreamableMethod<CreateJob200Response | CreateJob201Response | CreateJobDefaultResponse>;\n}\n\n/** The routes for the resource */\nexport interface Routes {\n /** Resource for '/radiology-insights/jobs/\\{id\\}' has methods for the following verbs: get, put */\n (path: \"/radiology-insights/jobs/{id}\", id: string): GetJob;\n}\n\n/** Create a HealthInsightsclient which is a Client an defined by the resource */\nexport type AzureHealthInsightsClient = Client & {\n /** The path specified by the routes for the resource */\n path: Routes;\n};\n"]}
|
package/dist-esm/src/index.js
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
3
|
import AzureHealthInsightsClient from "./azureHealthInsightsClient";
|
|
4
4
|
export * from "./azureHealthInsightsClient";
|
|
5
|
-
export * from "./parameters";
|
|
6
|
-
export * from "./responses";
|
|
7
5
|
export * from "./clientDefinitions";
|
|
8
6
|
export * from "./isUnexpected";
|
|
9
7
|
export * from "./models";
|
|
10
8
|
export * from "./outputModels";
|
|
9
|
+
export * from "./parameters";
|
|
11
10
|
export * from "./pollingHelper";
|
|
11
|
+
export * from "./responses";
|
|
12
|
+
export * from "./serializeHelper";
|
|
12
13
|
export default AzureHealthInsightsClient;
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAElC,eAAe,yBAAyB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport AzureHealthInsightsClient from \"./azureHealthInsightsClient\";\n\nexport * from \"./azureHealthInsightsClient\";\nexport * from \"./clientDefinitions\";\nexport * from \"./isUnexpected\";\nexport * from \"./models\";\nexport * from \"./outputModels\";\nexport * from \"./parameters\";\nexport * from \"./pollingHelper\";\nexport * from \"./responses\";\nexport * from \"./serializeHelper\";\n\nexport default AzureHealthInsightsClient;\n"]}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
3
|
const responseMap = {
|
|
4
4
|
"GET /radiology-insights/jobs/{id}": ["200"],
|
|
5
|
-
"
|
|
6
|
-
"GET /radiology-insights/jobs": ["200", "202"],
|
|
5
|
+
"PUT /radiology-insights/jobs/{id}": ["200", "201"],
|
|
7
6
|
};
|
|
7
|
+
/** Unexpected responses for get & create job calls */
|
|
8
8
|
export function isUnexpected(response) {
|
|
9
9
|
const lroOriginal = response.headers["x-ms-original-url"];
|
|
10
10
|
const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;
|
|
1
|
+
{"version":3,"file":"isUnexpected.js","sourceRo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C,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CreateJob200Response,\n CreateJob201Response,\n CreateJobDefaultResponse,\n CreateJobLogicalResponse,\n GetJob200Response,\n GetJobDefaultResponse,\n} from \"./responses\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /radiology-insights/jobs/{id}\": [\"200\"],\n \"PUT /radiology-insights/jobs/{id}\": [\"200\", \"201\"],\n};\n\n/** Unexpected responses for get job calls */\nexport function isUnexpected(\n response: GetJob200Response | GetJobDefaultResponse,\n): response is GetJobDefaultResponse;\n\n/** Unexpected responses for create job calls */\nexport function isUnexpected(\n response:\n | CreateJob200Response\n | CreateJob201Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is CreateJobDefaultResponse;\n\n/** Unexpected responses for get & create job calls */\nexport function isUnexpected(\n response:\n | GetJob200Response\n | GetJobDefaultResponse\n | CreateJob200Response\n | CreateJob201Response\n | CreateJobLogicalResponse\n | CreateJobDefaultResponse,\n): response is GetJobDefaultResponse | CreateJobDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {\n if (candidateParts[i]?.startsWith(\"{\") && candidateParts[i]?.indexOf(\"}\") !== -1) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(`${candidateParts[i]?.slice(start, end)}`).test(\n pathParts[j] || \"\",\n );\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
package/dist-esm/src/models.js
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT license.
|
|
3
|
-
|
|
3
|
+
/** Alias for ClinicalDocumentType */
|
|
4
|
+
export var ClinicalDocumentTypeEnum;
|
|
5
|
+
(function (ClinicalDocumentTypeEnum) {
|
|
6
|
+
/** Consultation documents */
|
|
7
|
+
ClinicalDocumentTypeEnum["Consultation"] = "consultation";
|
|
8
|
+
/** Discharge summary documents */
|
|
9
|
+
ClinicalDocumentTypeEnum["DischargeSummary"] = "dischargeSummary";
|
|
10
|
+
/** H&P documents */
|
|
11
|
+
ClinicalDocumentTypeEnum["HistoryAndPhysical"] = "historyAndPhysical";
|
|
12
|
+
/** Radiology documents */
|
|
13
|
+
ClinicalDocumentTypeEnum["RadiologyReport"] = "radiologyReport";
|
|
14
|
+
/** Procedure notes */
|
|
15
|
+
ClinicalDocumentTypeEnum["Procedure"] = "procedure";
|
|
16
|
+
/** Progress notes */
|
|
17
|
+
ClinicalDocumentTypeEnum["Progress"] = "progress";
|
|
18
|
+
/** Laboratory documents */
|
|
19
|
+
ClinicalDocumentTypeEnum["Laboratory"] = "laboratory";
|
|
20
|
+
// Add more predefined types as needed
|
|
21
|
+
})(ClinicalDocumentTypeEnum || (ClinicalDocumentTypeEnum = {}));
|
|
4
22
|
//# sourceMappingURL=models.js.map
|