phenoml 6.2.0 → 6.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.d.ts +2 -0
- package/dist/cjs/api/resources/construe/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/construe/client/Client.js +6 -6
- package/dist/cjs/api/resources/fhir/client/Client.d.ts +49 -49
- package/dist/cjs/api/resources/fhir/client/Client.js +69 -69
- package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +10 -10
- package/dist/cjs/api/resources/fhirProvider/client/Client.js +25 -25
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +10 -10
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +20 -20
- package/dist/cjs/core/fetcher/Fetcher.js +44 -23
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/cjs/core/fetcher/makeRequest.js +0 -2
- package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
- package/dist/cjs/core/fetcher/signals.d.ts +0 -6
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/logging/logger.js +1 -1
- package/dist/cjs/core/url/join.js +0 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.d.mts +2 -0
- package/dist/esm/api/resources/construe/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/construe/client/Client.mjs +6 -6
- package/dist/esm/api/resources/fhir/client/Client.d.mts +49 -49
- package/dist/esm/api/resources/fhir/client/Client.mjs +69 -69
- package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +10 -10
- package/dist/esm/api/resources/fhirProvider/client/Client.mjs +25 -25
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +10 -10
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +20 -20
- package/dist/esm/core/fetcher/Fetcher.mjs +44 -23
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
- package/dist/esm/core/fetcher/signals.d.mts +0 -6
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/logging/logger.mjs +1 -1
- package/dist/esm/core/url/join.mjs +0 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +41 -41
|
@@ -2,10 +2,4 @@ export declare function getTimeoutSignal(timeoutMs: number): {
|
|
|
2
2
|
signal: AbortSignal;
|
|
3
3
|
abortId: NodeJS.Timeout;
|
|
4
4
|
};
|
|
5
|
-
/**
|
|
6
|
-
* Returns an abort signal that is getting aborted when
|
|
7
|
-
* at least one of the specified abort signals is aborted.
|
|
8
|
-
*
|
|
9
|
-
* Requires at least node.js 18.
|
|
10
|
-
*/
|
|
11
5
|
export declare function anySignal(...args: AbortSignal[] | [AbortSignal[]]): AbortSignal;
|
|
@@ -8,26 +8,14 @@ function getTimeoutSignal(timeoutMs) {
|
|
|
8
8
|
const abortId = setTimeout(() => controller.abort(TIMEOUT), timeoutMs);
|
|
9
9
|
return { signal: controller.signal, abortId };
|
|
10
10
|
}
|
|
11
|
-
/**
|
|
12
|
-
* Returns an abort signal that is getting aborted when
|
|
13
|
-
* at least one of the specified abort signals is aborted.
|
|
14
|
-
*
|
|
15
|
-
* Requires at least node.js 18.
|
|
16
|
-
*/
|
|
17
11
|
function anySignal(...args) {
|
|
18
|
-
// Allowing signals to be passed either as array
|
|
19
|
-
// of signals or as multiple arguments.
|
|
20
12
|
const signals = (args.length === 1 && Array.isArray(args[0]) ? args[0] : args);
|
|
21
13
|
const controller = new AbortController();
|
|
22
14
|
for (const signal of signals) {
|
|
23
15
|
if (signal.aborted) {
|
|
24
|
-
// Exiting early if one of the signals
|
|
25
|
-
// is already aborted.
|
|
26
16
|
controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason);
|
|
27
17
|
break;
|
|
28
18
|
}
|
|
29
|
-
// Listening for signals and removing the listeners
|
|
30
|
-
// when at least one symbol is aborted.
|
|
31
19
|
signal.addEventListener("abort", () => controller.abort(signal === null || signal === void 0 ? void 0 : signal.reason), {
|
|
32
20
|
signal: controller.signal,
|
|
33
21
|
});
|
|
@@ -51,7 +51,7 @@ class Logger {
|
|
|
51
51
|
* @returns True if the level should be logged
|
|
52
52
|
*/
|
|
53
53
|
shouldLog(level) {
|
|
54
|
-
return !this.silent && this.level
|
|
54
|
+
return !this.silent && this.level <= logLevelMap[level];
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Checks if debug logging is enabled.
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "6.
|
|
1
|
+
export declare const SDK_VERSION = "6.3.1";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/Client.mjs
CHANGED
|
@@ -16,8 +16,8 @@ export class phenomlClient {
|
|
|
16
16
|
this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: mergeHeaders({
|
|
17
17
|
"X-Fern-Language": "JavaScript",
|
|
18
18
|
"X-Fern-SDK-Name": "phenoml",
|
|
19
|
-
"X-Fern-SDK-Version": "6.
|
|
20
|
-
"User-Agent": "phenoml/
|
|
19
|
+
"X-Fern-SDK-Version": "6.3.1",
|
|
20
|
+
"User-Agent": "phenoml/6.3.1",
|
|
21
21
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
22
22
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
23
23
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -26,4 +26,6 @@ export interface AgentChatRequest {
|
|
|
26
26
|
session_id?: string;
|
|
27
27
|
/** The ID of the agent to chat with */
|
|
28
28
|
agent_id: string;
|
|
29
|
+
/** Enable enhanced reasoning capabilities, will increase latency but will also improve response quality and reliability. */
|
|
30
|
+
enhanced_reasoning?: boolean;
|
|
29
31
|
}
|
|
@@ -163,7 +163,7 @@ export declare class Construe {
|
|
|
163
163
|
* Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
164
164
|
*
|
|
165
165
|
* @param {string} codesystem - Code system name
|
|
166
|
-
* @param {string}
|
|
166
|
+
* @param {string} codeID - The code identifier
|
|
167
167
|
* @param {phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest} request
|
|
168
168
|
* @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
|
|
169
169
|
*
|
|
@@ -177,7 +177,7 @@ export declare class Construe {
|
|
|
177
177
|
* version: "version"
|
|
178
178
|
* })
|
|
179
179
|
*/
|
|
180
|
-
getASpecificCode(codesystem: string,
|
|
180
|
+
getASpecificCode(codesystem: string, codeID: string, request?: phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.GetCodeResponse>;
|
|
181
181
|
private __getASpecificCode;
|
|
182
182
|
/**
|
|
183
183
|
* Performs semantic similarity search using vector embeddings.
|
|
@@ -607,7 +607,7 @@ export class Construe {
|
|
|
607
607
|
* Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
608
608
|
*
|
|
609
609
|
* @param {string} codesystem - Code system name
|
|
610
|
-
* @param {string}
|
|
610
|
+
* @param {string} codeID - The code identifier
|
|
611
611
|
* @param {phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest} request
|
|
612
612
|
* @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
|
|
613
613
|
*
|
|
@@ -621,11 +621,11 @@ export class Construe {
|
|
|
621
621
|
* version: "version"
|
|
622
622
|
* })
|
|
623
623
|
*/
|
|
624
|
-
getASpecificCode(codesystem,
|
|
625
|
-
return core.HttpResponsePromise.fromPromise(this.__getASpecificCode(codesystem,
|
|
624
|
+
getASpecificCode(codesystem, codeID, request = {}, requestOptions) {
|
|
625
|
+
return core.HttpResponsePromise.fromPromise(this.__getASpecificCode(codesystem, codeID, request, requestOptions));
|
|
626
626
|
}
|
|
627
|
-
__getASpecificCode(codesystem_1,
|
|
628
|
-
return __awaiter(this, arguments, void 0, function* (codesystem,
|
|
627
|
+
__getASpecificCode(codesystem_1, codeID_1) {
|
|
628
|
+
return __awaiter(this, arguments, void 0, function* (codesystem, codeID, request = {}, requestOptions) {
|
|
629
629
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
630
630
|
const { version } = request;
|
|
631
631
|
const _queryParams = {};
|
|
@@ -634,7 +634,7 @@ export class Construe {
|
|
|
634
634
|
}
|
|
635
635
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
636
636
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
637
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/${core.url.encodePathParam(codesystem)}/${core.url.encodePathParam(
|
|
637
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `construe/codes/${core.url.encodePathParam(codesystem)}/${core.url.encodePathParam(codeID)}`),
|
|
638
638
|
method: "GET",
|
|
639
639
|
headers: _headers,
|
|
640
640
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -15,14 +15,14 @@ export declare class Fhir {
|
|
|
15
15
|
*
|
|
16
16
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
17
17
|
*
|
|
18
|
-
* @param {string}
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* @param {string}
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
18
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
19
|
+
* - A UUID representing the provider ID
|
|
20
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
21
|
+
* @param {string} fhir_path - The FHIR resource path to operate on. This follows FHIR RESTful API conventions.
|
|
22
|
+
* Examples:
|
|
23
|
+
* - "Patient" (for resource type operations)
|
|
24
|
+
* - "Patient/123" (for specific resource operations)
|
|
25
|
+
* - "Patient/123/_history" (for history operations)
|
|
26
26
|
* @param {phenoml.fhir.FhirSearchRequest} request
|
|
27
27
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
28
28
|
*
|
|
@@ -38,21 +38,21 @@ export declare class Fhir {
|
|
|
38
38
|
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c..."
|
|
39
39
|
* })
|
|
40
40
|
*/
|
|
41
|
-
search(
|
|
41
|
+
search(fhir_provider_id: string, fhir_path: string, request?: phenoml.fhir.FhirSearchRequest, requestOptions?: Fhir.RequestOptions): core.HttpResponsePromise<phenoml.fhir.FhirSearchResponse>;
|
|
42
42
|
private __search;
|
|
43
43
|
/**
|
|
44
44
|
* Creates a new FHIR resource on the specified provider. The request body should contain a valid FHIR resource in JSON format.
|
|
45
45
|
*
|
|
46
46
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
47
47
|
*
|
|
48
|
-
* @param {string}
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* @param {string}
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
48
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
49
|
+
* - A UUID representing the provider ID
|
|
50
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
51
|
+
* @param {string} fhir_path - The FHIR resource path to operate on. This follows FHIR RESTful API conventions.
|
|
52
|
+
* Examples:
|
|
53
|
+
* - "Patient" (for resource type operations)
|
|
54
|
+
* - "Patient/123" (for specific resource operations)
|
|
55
|
+
* - "Patient/123/_history" (for history operations)
|
|
56
56
|
* @param {phenoml.fhir.FhirCreateRequest} request
|
|
57
57
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
58
|
*
|
|
@@ -80,21 +80,21 @@ export declare class Fhir {
|
|
|
80
80
|
* }
|
|
81
81
|
* })
|
|
82
82
|
*/
|
|
83
|
-
create(
|
|
83
|
+
create(fhir_provider_id: string, fhir_path: string, request: phenoml.fhir.FhirCreateRequest, requestOptions?: Fhir.RequestOptions): core.HttpResponsePromise<phenoml.fhir.FhirResource>;
|
|
84
84
|
private __create;
|
|
85
85
|
/**
|
|
86
86
|
* Creates or updates a FHIR resource on the specified provider. If the resource exists, it will be updated; otherwise, it will be created.
|
|
87
87
|
*
|
|
88
88
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
89
89
|
*
|
|
90
|
-
* @param {string}
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* @param {string}
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
90
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
91
|
+
* - A UUID representing the provider ID
|
|
92
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
93
|
+
* @param {string} fhir_path - The FHIR resource path to operate on. This follows FHIR RESTful API conventions.
|
|
94
|
+
* Examples:
|
|
95
|
+
* - "Patient" (for resource type operations)
|
|
96
|
+
* - "Patient/123" (for specific resource operations)
|
|
97
|
+
* - "Patient/123/_history" (for history operations)
|
|
98
98
|
* @param {phenoml.fhir.FhirUpsertRequest} request
|
|
99
99
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
100
100
|
*
|
|
@@ -124,21 +124,21 @@ export declare class Fhir {
|
|
|
124
124
|
* }
|
|
125
125
|
* })
|
|
126
126
|
*/
|
|
127
|
-
upsert(
|
|
127
|
+
upsert(fhir_provider_id: string, fhir_path: string, request: phenoml.fhir.FhirUpsertRequest, requestOptions?: Fhir.RequestOptions): core.HttpResponsePromise<phenoml.fhir.FhirResource>;
|
|
128
128
|
private __upsert;
|
|
129
129
|
/**
|
|
130
130
|
* Deletes a FHIR resource from the specified provider.
|
|
131
131
|
*
|
|
132
132
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
133
133
|
*
|
|
134
|
-
* @param {string}
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* @param {string}
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
134
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
135
|
+
* - A UUID representing the provider ID
|
|
136
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
137
|
+
* @param {string} fhir_path - The FHIR resource path to operate on. This follows FHIR RESTful API conventions.
|
|
138
|
+
* Examples:
|
|
139
|
+
* - "Patient" (for resource type operations)
|
|
140
|
+
* - "Patient/123" (for specific resource operations)
|
|
141
|
+
* - "Patient/123/_history" (for history operations)
|
|
142
142
|
* @param {phenoml.fhir.FhirDeleteRequest} request
|
|
143
143
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
144
144
|
*
|
|
@@ -154,7 +154,7 @@ export declare class Fhir {
|
|
|
154
154
|
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c..."
|
|
155
155
|
* })
|
|
156
156
|
*/
|
|
157
|
-
delete(
|
|
157
|
+
delete(fhir_provider_id: string, fhir_path: string, request?: phenoml.fhir.FhirDeleteRequest, requestOptions?: Fhir.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
|
|
158
158
|
private __delete;
|
|
159
159
|
/**
|
|
160
160
|
* Partially updates a FHIR resource on the specified provider using JSON Patch operations as defined in RFC 6902.
|
|
@@ -166,14 +166,14 @@ export declare class Fhir {
|
|
|
166
166
|
*
|
|
167
167
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
168
168
|
*
|
|
169
|
-
* @param {string}
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
* @param {string}
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
169
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
170
|
+
* - A UUID representing the provider ID
|
|
171
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
172
|
+
* @param {string} fhir_path - The FHIR resource path to operate on. This follows FHIR RESTful API conventions.
|
|
173
|
+
* Examples:
|
|
174
|
+
* - "Patient" (for resource type operations)
|
|
175
|
+
* - "Patient/123" (for specific resource operations)
|
|
176
|
+
* - "Patient/123/_history" (for history operations)
|
|
177
177
|
* @param {phenoml.fhir.FhirPatchRequest} request
|
|
178
178
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
179
179
|
*
|
|
@@ -245,7 +245,7 @@ export declare class Fhir {
|
|
|
245
245
|
* }]
|
|
246
246
|
* })
|
|
247
247
|
*/
|
|
248
|
-
patch(
|
|
248
|
+
patch(fhir_provider_id: string, fhir_path: string, request: phenoml.fhir.FhirPatchRequest, requestOptions?: Fhir.RequestOptions): core.HttpResponsePromise<phenoml.fhir.FhirResource>;
|
|
249
249
|
private __patch;
|
|
250
250
|
/**
|
|
251
251
|
* Executes a FHIR Bundle transaction or batch operation on the specified provider. This allows multiple FHIR resources to be processed in a single request.
|
|
@@ -254,9 +254,9 @@ export declare class Fhir {
|
|
|
254
254
|
*
|
|
255
255
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
256
256
|
*
|
|
257
|
-
* @param {string}
|
|
258
|
-
*
|
|
259
|
-
*
|
|
257
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
258
|
+
* - A UUID representing the provider ID
|
|
259
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
260
260
|
* @param {phenoml.fhir.FhirExecuteBundleRequest} request
|
|
261
261
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
262
262
|
*
|
|
@@ -303,7 +303,7 @@ export declare class Fhir {
|
|
|
303
303
|
* }
|
|
304
304
|
* })
|
|
305
305
|
*/
|
|
306
|
-
executeBundle(
|
|
306
|
+
executeBundle(fhir_provider_id: string, request: phenoml.fhir.FhirExecuteBundleRequest, requestOptions?: Fhir.RequestOptions): core.HttpResponsePromise<phenoml.fhir.FhirBundle>;
|
|
307
307
|
private __executeBundle;
|
|
308
308
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
309
309
|
}
|
|
@@ -23,14 +23,14 @@ export class Fhir {
|
|
|
23
23
|
*
|
|
24
24
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
25
25
|
*
|
|
26
|
-
* @param {string}
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* @param {string}
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
26
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
27
|
+
* - A UUID representing the provider ID
|
|
28
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
29
|
+
* @param {string} fhir_path - The FHIR resource path to operate on. This follows FHIR RESTful API conventions.
|
|
30
|
+
* Examples:
|
|
31
|
+
* - "Patient" (for resource type operations)
|
|
32
|
+
* - "Patient/123" (for specific resource operations)
|
|
33
|
+
* - "Patient/123/_history" (for history operations)
|
|
34
34
|
* @param {phenoml.fhir.FhirSearchRequest} request
|
|
35
35
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
36
|
*
|
|
@@ -46,11 +46,11 @@ export class Fhir {
|
|
|
46
46
|
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c..."
|
|
47
47
|
* })
|
|
48
48
|
*/
|
|
49
|
-
search(
|
|
50
|
-
return core.HttpResponsePromise.fromPromise(this.__search(
|
|
49
|
+
search(fhir_provider_id, fhir_path, request = {}, requestOptions) {
|
|
50
|
+
return core.HttpResponsePromise.fromPromise(this.__search(fhir_provider_id, fhir_path, request, requestOptions));
|
|
51
51
|
}
|
|
52
|
-
__search(
|
|
53
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
52
|
+
__search(fhir_provider_id_1, fhir_path_1) {
|
|
53
|
+
return __awaiter(this, arguments, void 0, function* (fhir_provider_id, fhir_path, request = {}, requestOptions) {
|
|
54
54
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
55
55
|
const { query_parameters: queryParameters, "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, } = request;
|
|
56
56
|
const _queryParams = {};
|
|
@@ -63,7 +63,7 @@ export class Fhir {
|
|
|
63
63
|
"X-Phenoml-Fhir-Provider": phenomlFhirProvider != null ? phenomlFhirProvider : undefined,
|
|
64
64
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
65
65
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
66
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(
|
|
66
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir/${core.url.encodePathParam(fhir_path)}`),
|
|
67
67
|
method: "GET",
|
|
68
68
|
headers: _headers,
|
|
69
69
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -118,14 +118,14 @@ export class Fhir {
|
|
|
118
118
|
*
|
|
119
119
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
120
120
|
*
|
|
121
|
-
* @param {string}
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* @param {string}
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
121
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
122
|
+
* - A UUID representing the provider ID
|
|
123
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
124
|
+
* @param {string} fhir_path - The FHIR resource path to operate on. This follows FHIR RESTful API conventions.
|
|
125
|
+
* Examples:
|
|
126
|
+
* - "Patient" (for resource type operations)
|
|
127
|
+
* - "Patient/123" (for specific resource operations)
|
|
128
|
+
* - "Patient/123/_history" (for history operations)
|
|
129
129
|
* @param {phenoml.fhir.FhirCreateRequest} request
|
|
130
130
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
131
131
|
*
|
|
@@ -153,10 +153,10 @@ export class Fhir {
|
|
|
153
153
|
* }
|
|
154
154
|
* })
|
|
155
155
|
*/
|
|
156
|
-
create(
|
|
157
|
-
return core.HttpResponsePromise.fromPromise(this.__create(
|
|
156
|
+
create(fhir_provider_id, fhir_path, request, requestOptions) {
|
|
157
|
+
return core.HttpResponsePromise.fromPromise(this.__create(fhir_provider_id, fhir_path, request, requestOptions));
|
|
158
158
|
}
|
|
159
|
-
__create(
|
|
159
|
+
__create(fhir_provider_id, fhir_path, request, requestOptions) {
|
|
160
160
|
return __awaiter(this, void 0, void 0, function* () {
|
|
161
161
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
162
162
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
@@ -166,7 +166,7 @@ export class Fhir {
|
|
|
166
166
|
"X-Phenoml-Fhir-Provider": phenomlFhirProvider != null ? phenomlFhirProvider : undefined,
|
|
167
167
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
168
168
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
169
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(
|
|
169
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir/${core.url.encodePathParam(fhir_path)}`),
|
|
170
170
|
method: "POST",
|
|
171
171
|
headers: _headers,
|
|
172
172
|
contentType: "application/fhir+json",
|
|
@@ -222,14 +222,14 @@ export class Fhir {
|
|
|
222
222
|
*
|
|
223
223
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
224
224
|
*
|
|
225
|
-
* @param {string}
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
* @param {string}
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
225
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
226
|
+
* - A UUID representing the provider ID
|
|
227
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
228
|
+
* @param {string} fhir_path - The FHIR resource path to operate on. This follows FHIR RESTful API conventions.
|
|
229
|
+
* Examples:
|
|
230
|
+
* - "Patient" (for resource type operations)
|
|
231
|
+
* - "Patient/123" (for specific resource operations)
|
|
232
|
+
* - "Patient/123/_history" (for history operations)
|
|
233
233
|
* @param {phenoml.fhir.FhirUpsertRequest} request
|
|
234
234
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
235
235
|
*
|
|
@@ -259,10 +259,10 @@ export class Fhir {
|
|
|
259
259
|
* }
|
|
260
260
|
* })
|
|
261
261
|
*/
|
|
262
|
-
upsert(
|
|
263
|
-
return core.HttpResponsePromise.fromPromise(this.__upsert(
|
|
262
|
+
upsert(fhir_provider_id, fhir_path, request, requestOptions) {
|
|
263
|
+
return core.HttpResponsePromise.fromPromise(this.__upsert(fhir_provider_id, fhir_path, request, requestOptions));
|
|
264
264
|
}
|
|
265
|
-
__upsert(
|
|
265
|
+
__upsert(fhir_provider_id, fhir_path, request, requestOptions) {
|
|
266
266
|
return __awaiter(this, void 0, void 0, function* () {
|
|
267
267
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
268
268
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
@@ -272,7 +272,7 @@ export class Fhir {
|
|
|
272
272
|
"X-Phenoml-Fhir-Provider": phenomlFhirProvider != null ? phenomlFhirProvider : undefined,
|
|
273
273
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
274
274
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
275
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(
|
|
275
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir/${core.url.encodePathParam(fhir_path)}`),
|
|
276
276
|
method: "PUT",
|
|
277
277
|
headers: _headers,
|
|
278
278
|
contentType: "application/fhir+json",
|
|
@@ -328,14 +328,14 @@ export class Fhir {
|
|
|
328
328
|
*
|
|
329
329
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
330
330
|
*
|
|
331
|
-
* @param {string}
|
|
332
|
-
*
|
|
333
|
-
*
|
|
334
|
-
* @param {string}
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
338
|
-
*
|
|
331
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
332
|
+
* - A UUID representing the provider ID
|
|
333
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
334
|
+
* @param {string} fhir_path - The FHIR resource path to operate on. This follows FHIR RESTful API conventions.
|
|
335
|
+
* Examples:
|
|
336
|
+
* - "Patient" (for resource type operations)
|
|
337
|
+
* - "Patient/123" (for specific resource operations)
|
|
338
|
+
* - "Patient/123/_history" (for history operations)
|
|
339
339
|
* @param {phenoml.fhir.FhirDeleteRequest} request
|
|
340
340
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
341
341
|
*
|
|
@@ -351,11 +351,11 @@ export class Fhir {
|
|
|
351
351
|
* "X-Phenoml-Fhir-Provider": "550e8400-e29b-41d4-a716-446655440000:eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c..."
|
|
352
352
|
* })
|
|
353
353
|
*/
|
|
354
|
-
delete(
|
|
355
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(
|
|
354
|
+
delete(fhir_provider_id, fhir_path, request = {}, requestOptions) {
|
|
355
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(fhir_provider_id, fhir_path, request, requestOptions));
|
|
356
356
|
}
|
|
357
|
-
__delete(
|
|
358
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
357
|
+
__delete(fhir_provider_id_1, fhir_path_1) {
|
|
358
|
+
return __awaiter(this, arguments, void 0, function* (fhir_provider_id, fhir_path, request = {}, requestOptions) {
|
|
359
359
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
360
360
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider } = request;
|
|
361
361
|
const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
@@ -364,7 +364,7 @@ export class Fhir {
|
|
|
364
364
|
"X-Phenoml-Fhir-Provider": phenomlFhirProvider != null ? phenomlFhirProvider : undefined,
|
|
365
365
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
366
366
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
367
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(
|
|
367
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir/${core.url.encodePathParam(fhir_path)}`),
|
|
368
368
|
method: "DELETE",
|
|
369
369
|
headers: _headers,
|
|
370
370
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -424,14 +424,14 @@ export class Fhir {
|
|
|
424
424
|
*
|
|
425
425
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
426
426
|
*
|
|
427
|
-
* @param {string}
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
* @param {string}
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
*
|
|
427
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
428
|
+
* - A UUID representing the provider ID
|
|
429
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
430
|
+
* @param {string} fhir_path - The FHIR resource path to operate on. This follows FHIR RESTful API conventions.
|
|
431
|
+
* Examples:
|
|
432
|
+
* - "Patient" (for resource type operations)
|
|
433
|
+
* - "Patient/123" (for specific resource operations)
|
|
434
|
+
* - "Patient/123/_history" (for history operations)
|
|
435
435
|
* @param {phenoml.fhir.FhirPatchRequest} request
|
|
436
436
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
437
437
|
*
|
|
@@ -503,10 +503,10 @@ export class Fhir {
|
|
|
503
503
|
* }]
|
|
504
504
|
* })
|
|
505
505
|
*/
|
|
506
|
-
patch(
|
|
507
|
-
return core.HttpResponsePromise.fromPromise(this.__patch(
|
|
506
|
+
patch(fhir_provider_id, fhir_path, request, requestOptions) {
|
|
507
|
+
return core.HttpResponsePromise.fromPromise(this.__patch(fhir_provider_id, fhir_path, request, requestOptions));
|
|
508
508
|
}
|
|
509
|
-
__patch(
|
|
509
|
+
__patch(fhir_provider_id, fhir_path, request, requestOptions) {
|
|
510
510
|
return __awaiter(this, void 0, void 0, function* () {
|
|
511
511
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
512
512
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
@@ -516,7 +516,7 @@ export class Fhir {
|
|
|
516
516
|
"X-Phenoml-Fhir-Provider": phenomlFhirProvider != null ? phenomlFhirProvider : undefined,
|
|
517
517
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
518
518
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
519
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(
|
|
519
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir/${core.url.encodePathParam(fhir_path)}`),
|
|
520
520
|
method: "PATCH",
|
|
521
521
|
headers: _headers,
|
|
522
522
|
contentType: "application/json-patch+json",
|
|
@@ -576,9 +576,9 @@ export class Fhir {
|
|
|
576
576
|
*
|
|
577
577
|
* The request is proxied to the configured FHIR server with appropriate authentication headers.
|
|
578
578
|
*
|
|
579
|
-
* @param {string}
|
|
580
|
-
*
|
|
581
|
-
*
|
|
579
|
+
* @param {string} fhir_provider_id - The ID of the FHIR provider to use. Can be either:
|
|
580
|
+
* - A UUID representing the provider ID
|
|
581
|
+
* - A provider name (legacy support - will just use the most recently updated provider with this name)
|
|
582
582
|
* @param {phenoml.fhir.FhirExecuteBundleRequest} request
|
|
583
583
|
* @param {Fhir.RequestOptions} requestOptions - Request-specific configuration.
|
|
584
584
|
*
|
|
@@ -625,10 +625,10 @@ export class Fhir {
|
|
|
625
625
|
* }
|
|
626
626
|
* })
|
|
627
627
|
*/
|
|
628
|
-
executeBundle(
|
|
629
|
-
return core.HttpResponsePromise.fromPromise(this.__executeBundle(
|
|
628
|
+
executeBundle(fhir_provider_id, request, requestOptions) {
|
|
629
|
+
return core.HttpResponsePromise.fromPromise(this.__executeBundle(fhir_provider_id, request, requestOptions));
|
|
630
630
|
}
|
|
631
|
-
__executeBundle(
|
|
631
|
+
__executeBundle(fhir_provider_id, request, requestOptions) {
|
|
632
632
|
return __awaiter(this, void 0, void 0, function* () {
|
|
633
633
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
634
634
|
const { "X-Phenoml-On-Behalf-Of": phenomlOnBehalfOf, "X-Phenoml-Fhir-Provider": phenomlFhirProvider, body: _body, } = request;
|
|
@@ -638,7 +638,7 @@ export class Fhir {
|
|
|
638
638
|
"X-Phenoml-Fhir-Provider": phenomlFhirProvider != null ? phenomlFhirProvider : undefined,
|
|
639
639
|
}), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
640
640
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
641
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(
|
|
641
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.phenomlEnvironment.Default, `fhir-provider/${core.url.encodePathParam(fhir_provider_id)}/fhir`),
|
|
642
642
|
method: "POST",
|
|
643
643
|
headers: _headers,
|
|
644
644
|
contentType: "application/fhir+json",
|