phenoml 13.0.0 → 14.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/dist/cjs/BaseClient.d.ts +3 -0
- package/dist/cjs/BaseClient.js +17 -2
- package/dist/cjs/api/resources/agent/client/Client.d.ts +24 -12
- package/dist/cjs/api/resources/agent/client/Client.js +41 -21
- package/dist/cjs/api/resources/agent/client/requests/AgentChatRequest.d.ts +11 -0
- package/dist/cjs/api/resources/agent/client/requests/AgentStreamChatRequest.d.ts +1 -0
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +13 -25
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +19 -70
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.ts +4 -1
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.ts +7 -1
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.d.ts +4 -1
- package/dist/cjs/api/resources/authtoken/resources/auth/client/Client.js +5 -2
- package/dist/cjs/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.ts +4 -1
- package/dist/cjs/api/resources/cohort/client/Client.js +1 -1
- package/dist/cjs/api/resources/construe/client/Client.d.ts +95 -11
- package/dist/cjs/api/resources/construe/client/Client.js +134 -22
- package/dist/cjs/api/resources/construe/client/requests/ExtractRequest.d.ts +60 -1
- package/dist/cjs/api/resources/construe/client/requests/FeedbackRequest.d.ts +14 -7
- package/dist/cjs/api/resources/construe/client/requests/UploadRequest.d.ts +18 -1
- package/dist/cjs/api/resources/fhir/client/Client.js +10 -6
- package/dist/cjs/api/resources/fhirProvider/client/Client.d.ts +10 -7
- package/dist/cjs/api/resources/fhirProvider/client/Client.js +17 -14
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.ts +5 -3
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.ts +1 -1
- package/dist/cjs/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.ts +1 -1
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.ts +6 -4
- package/dist/cjs/api/resources/fhirProvider/types/FhirProviderTemplate.d.ts +10 -5
- package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +17 -6
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +23 -12
- package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateMultiRequest.d.ts +2 -1
- package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateRequest.d.ts +9 -2
- package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.ts +2 -1
- package/dist/cjs/api/resources/lang2Fhir/client/requests/DocumentRequest.d.ts +1 -1
- package/dist/cjs/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.ts +3 -1
- package/dist/cjs/api/resources/lang2Fhir/types/SearchResponse.d.ts +2 -2
- package/dist/cjs/api/resources/summary/client/Client.d.ts +74 -9
- package/dist/cjs/api/resources/summary/client/Client.js +80 -15
- package/dist/cjs/api/resources/summary/client/requests/CreateSummaryRequest.d.ts +67 -11
- package/dist/cjs/api/resources/summary/client/requests/CreateSummaryTemplateRequest.d.ts +4 -4
- package/dist/cjs/api/resources/summary/client/requests/UpdateSummaryTemplateRequest.d.ts +4 -4
- package/dist/cjs/api/resources/summary/types/index.d.ts +0 -2
- package/dist/cjs/api/resources/summary/types/index.js +0 -2
- package/dist/cjs/api/resources/tools/client/Client.d.ts +7 -3
- package/dist/cjs/api/resources/tools/client/Client.js +11 -7
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateMultiRequest.d.ts +1 -0
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.ts +3 -2
- package/dist/cjs/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.ts +3 -1
- package/dist/cjs/api/resources/tools/resources/mcpServer/client/Client.js +4 -4
- package/dist/cjs/api/resources/tools/resources/mcpServer/resources/tools/client/Client.js +4 -4
- package/dist/cjs/api/resources/tools/types/McpServer.d.ts +10 -0
- package/dist/cjs/api/resources/tools/types/McpServerResponse.d.ts +12 -16
- package/dist/cjs/api/resources/tools/types/McpServerTool.d.ts +14 -0
- package/dist/cjs/api/resources/tools/types/McpServerToolResponse.d.ts +7 -20
- package/dist/cjs/api/resources/tools/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/tools/types/index.js +2 -0
- package/dist/cjs/api/resources/workflows/client/Client.d.ts +21 -9
- package/dist/cjs/api/resources/workflows/client/Client.js +43 -15
- package/dist/cjs/api/resources/workflows/client/requests/CreateWorkflowRequest.d.ts +3 -2
- package/dist/cjs/api/resources/workflows/client/requests/ExecuteWorkflowRequest.d.ts +11 -1
- package/dist/cjs/api/resources/workflows/client/requests/UpdateWorkflowRequest.d.ts +6 -5
- package/dist/cjs/core/auth/AuthProvider.d.ts +1 -0
- package/dist/cjs/core/auth/AuthProvider.js +7 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
- package/dist/cjs/core/auth/BasicAuth.js +7 -1
- package/dist/cjs/core/auth/index.d.ts +1 -1
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/fetcher/Fetcher.d.ts +8 -0
- package/dist/cjs/core/fetcher/Fetcher.js +13 -8
- package/dist/cjs/core/fetcher/requestWithRetries.js +4 -1
- package/dist/cjs/core/url/QueryStringBuilder.d.ts +47 -0
- package/dist/cjs/core/url/QueryStringBuilder.js +83 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/qs.d.ts +2 -1
- package/dist/cjs/core/url/qs.js +24 -12
- package/dist/cjs/errors/handleNonStatusCodeError.js +4 -1
- package/dist/cjs/errors/phenomlError.d.ts +3 -1
- package/dist/cjs/errors/phenomlError.js +4 -1
- package/dist/cjs/errors/phenomlTimeoutError.d.ts +4 -1
- package/dist/cjs/errors/phenomlTimeoutError.js +4 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +3 -0
- package/dist/esm/BaseClient.mjs +17 -2
- package/dist/esm/api/resources/agent/client/Client.d.mts +24 -12
- package/dist/esm/api/resources/agent/client/Client.mjs +41 -21
- package/dist/esm/api/resources/agent/client/requests/AgentChatRequest.d.mts +11 -0
- package/dist/esm/api/resources/agent/client/requests/AgentStreamChatRequest.d.mts +1 -0
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +13 -25
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +19 -70
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.mts +4 -1
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.mts +7 -1
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.d.mts +4 -1
- package/dist/esm/api/resources/authtoken/resources/auth/client/Client.mjs +5 -2
- package/dist/esm/api/resources/authtoken/resources/auth/client/requests/ClientCredentialsRequest.d.mts +4 -1
- package/dist/esm/api/resources/cohort/client/Client.mjs +1 -1
- package/dist/esm/api/resources/construe/client/Client.d.mts +95 -11
- package/dist/esm/api/resources/construe/client/Client.mjs +134 -22
- package/dist/esm/api/resources/construe/client/requests/ExtractRequest.d.mts +60 -1
- package/dist/esm/api/resources/construe/client/requests/FeedbackRequest.d.mts +14 -7
- package/dist/esm/api/resources/construe/client/requests/UploadRequest.d.mts +18 -1
- package/dist/esm/api/resources/fhir/client/Client.mjs +10 -6
- package/dist/esm/api/resources/fhirProvider/client/Client.d.mts +10 -7
- package/dist/esm/api/resources/fhirProvider/client/Client.mjs +17 -14
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderCreateRequest.d.mts +5 -3
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderRemoveAuthConfigRequest.d.mts +1 -1
- package/dist/esm/api/resources/fhirProvider/client/requests/FhirProviderSetActiveAuthConfigRequest.d.mts +1 -1
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderSandboxInfo.d.mts +6 -4
- package/dist/esm/api/resources/fhirProvider/types/FhirProviderTemplate.d.mts +10 -5
- package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +17 -6
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +23 -12
- package/dist/esm/api/resources/lang2Fhir/client/requests/CreateMultiRequest.d.mts +2 -1
- package/dist/esm/api/resources/lang2Fhir/client/requests/CreateRequest.d.mts +9 -2
- package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentMultiRequest.d.mts +2 -1
- package/dist/esm/api/resources/lang2Fhir/client/requests/DocumentRequest.d.mts +1 -1
- package/dist/esm/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.mts +3 -1
- package/dist/esm/api/resources/lang2Fhir/types/SearchResponse.d.mts +2 -2
- package/dist/esm/api/resources/summary/client/Client.d.mts +74 -9
- package/dist/esm/api/resources/summary/client/Client.mjs +80 -15
- package/dist/esm/api/resources/summary/client/requests/CreateSummaryRequest.d.mts +67 -11
- package/dist/esm/api/resources/summary/client/requests/CreateSummaryTemplateRequest.d.mts +4 -4
- package/dist/esm/api/resources/summary/client/requests/UpdateSummaryTemplateRequest.d.mts +4 -4
- package/dist/esm/api/resources/summary/types/index.d.mts +0 -2
- package/dist/esm/api/resources/summary/types/index.mjs +0 -2
- package/dist/esm/api/resources/tools/client/Client.d.mts +7 -3
- package/dist/esm/api/resources/tools/client/Client.mjs +11 -7
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateMultiRequest.d.mts +1 -0
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndCreateRequest.d.mts +3 -2
- package/dist/esm/api/resources/tools/client/requests/Lang2FhirAndSearchRequest.d.mts +3 -1
- package/dist/esm/api/resources/tools/resources/mcpServer/client/Client.mjs +4 -4
- package/dist/esm/api/resources/tools/resources/mcpServer/resources/tools/client/Client.mjs +4 -4
- package/dist/esm/api/resources/tools/types/McpServer.d.mts +10 -0
- package/dist/esm/api/resources/tools/types/McpServerResponse.d.mts +12 -16
- package/dist/esm/api/resources/tools/types/McpServerTool.d.mts +14 -0
- package/dist/esm/api/resources/tools/types/McpServerToolResponse.d.mts +7 -20
- package/dist/esm/api/resources/tools/types/index.d.mts +2 -0
- package/dist/esm/api/resources/tools/types/index.mjs +2 -0
- package/dist/esm/api/resources/workflows/client/Client.d.mts +21 -9
- package/dist/esm/api/resources/workflows/client/Client.mjs +43 -15
- package/dist/esm/api/resources/workflows/client/requests/CreateWorkflowRequest.d.mts +3 -2
- package/dist/esm/api/resources/workflows/client/requests/ExecuteWorkflowRequest.d.mts +11 -1
- package/dist/esm/api/resources/workflows/client/requests/UpdateWorkflowRequest.d.mts +6 -5
- package/dist/esm/core/auth/AuthProvider.d.mts +1 -0
- package/dist/esm/core/auth/AuthProvider.mjs +6 -1
- package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
- package/dist/esm/core/auth/BasicAuth.mjs +7 -1
- package/dist/esm/core/auth/index.d.mts +1 -1
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/fetcher/Fetcher.d.mts +8 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +13 -8
- package/dist/esm/core/fetcher/requestWithRetries.mjs +4 -1
- package/dist/esm/core/url/QueryStringBuilder.d.mts +47 -0
- package/dist/esm/core/url/QueryStringBuilder.mjs +80 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/qs.d.mts +2 -1
- package/dist/esm/core/url/qs.mjs +24 -12
- package/dist/esm/errors/handleNonStatusCodeError.mjs +4 -1
- package/dist/esm/errors/phenomlError.d.mts +3 -1
- package/dist/esm/errors/phenomlError.mjs +4 -1
- package/dist/esm/errors/phenomlTimeoutError.d.mts +4 -1
- package/dist/esm/errors/phenomlTimeoutError.mjs +4 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
- package/reference.md +140 -124
- package/dist/cjs/api/resources/summary/types/FhirBundle.d.ts +0 -13
- package/dist/cjs/api/resources/summary/types/FhirResource.d.ts +0 -6
- package/dist/esm/api/resources/summary/types/FhirBundle.d.mts +0 -13
- package/dist/esm/api/resources/summary/types/FhirResource.d.mts +0 -6
- /package/dist/cjs/api/resources/{summary/types/FhirBundle.js → tools/types/McpServer.js} +0 -0
- /package/dist/cjs/api/resources/{summary/types/FhirResource.js → tools/types/McpServerTool.js} +0 -0
- /package/dist/esm/api/resources/{summary/types/FhirBundle.mjs → tools/types/McpServer.mjs} +0 -0
- /package/dist/esm/api/resources/{summary/types/FhirResource.mjs → tools/types/McpServerTool.mjs} +0 -0
|
@@ -26,11 +26,13 @@ export declare class FhirProviderClient {
|
|
|
26
26
|
* @example
|
|
27
27
|
* await client.fhirProvider.create({
|
|
28
28
|
* name: "Epic Sandbox",
|
|
29
|
-
*
|
|
29
|
+
* description: "Epic sandbox environment for testing",
|
|
30
|
+
* provider: "epic",
|
|
30
31
|
* base_url: "https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",
|
|
31
32
|
* auth: {
|
|
32
|
-
* auth_method: "
|
|
33
|
-
* client_id: "your-client-id"
|
|
33
|
+
* auth_method: "client_secret",
|
|
34
|
+
* client_id: "your-client-id",
|
|
35
|
+
* client_secret: "your-client-secret"
|
|
34
36
|
* }
|
|
35
37
|
* })
|
|
36
38
|
*/
|
|
@@ -106,8 +108,9 @@ export declare class FhirProviderClient {
|
|
|
106
108
|
*
|
|
107
109
|
* @example
|
|
108
110
|
* await client.fhirProvider.addAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
|
|
109
|
-
* auth_method: "
|
|
110
|
-
* client_id: "your-client-id"
|
|
111
|
+
* auth_method: "client_secret",
|
|
112
|
+
* client_id: "your-client-id",
|
|
113
|
+
* client_secret: "your-client-secret"
|
|
111
114
|
* })
|
|
112
115
|
*/
|
|
113
116
|
addAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderAddAuthConfigRequest, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
|
|
@@ -133,7 +136,7 @@ export declare class FhirProviderClient {
|
|
|
133
136
|
*
|
|
134
137
|
* @example
|
|
135
138
|
* await client.fhirProvider.setActiveAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
|
|
136
|
-
* auth_config_id: "auth-config-
|
|
139
|
+
* auth_config_id: "auth-config-456"
|
|
137
140
|
* })
|
|
138
141
|
*/
|
|
139
142
|
setActiveAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderSetActiveAuthConfigRequest, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderResponse>;
|
|
@@ -156,7 +159,7 @@ export declare class FhirProviderClient {
|
|
|
156
159
|
*
|
|
157
160
|
* @example
|
|
158
161
|
* await client.fhirProvider.removeAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
|
|
159
|
-
* auth_config_id: "auth-config-
|
|
162
|
+
* auth_config_id: "auth-config-456"
|
|
160
163
|
* })
|
|
161
164
|
*/
|
|
162
165
|
removeAuthConfig(fhir_provider_id: string, request: phenoml.fhirProvider.FhirProviderRemoveAuthConfigRequest, requestOptions?: FhirProviderClient.RequestOptions): core.HttpResponsePromise<phenoml.fhirProvider.FhirProviderRemoveAuthConfigResponse>;
|
|
@@ -71,11 +71,13 @@ class FhirProviderClient {
|
|
|
71
71
|
* @example
|
|
72
72
|
* await client.fhirProvider.create({
|
|
73
73
|
* name: "Epic Sandbox",
|
|
74
|
-
*
|
|
74
|
+
* description: "Epic sandbox environment for testing",
|
|
75
|
+
* provider: "epic",
|
|
75
76
|
* base_url: "https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",
|
|
76
77
|
* auth: {
|
|
77
|
-
* auth_method: "
|
|
78
|
-
* client_id: "your-client-id"
|
|
78
|
+
* auth_method: "client_secret",
|
|
79
|
+
* client_id: "your-client-id",
|
|
80
|
+
* client_secret: "your-client-secret"
|
|
79
81
|
* }
|
|
80
82
|
* })
|
|
81
83
|
*/
|
|
@@ -92,7 +94,7 @@ class FhirProviderClient {
|
|
|
92
94
|
method: "POST",
|
|
93
95
|
headers: _headers,
|
|
94
96
|
contentType: "application/json",
|
|
95
|
-
|
|
97
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
96
98
|
requestType: "json",
|
|
97
99
|
body: request,
|
|
98
100
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
@@ -154,7 +156,7 @@ class FhirProviderClient {
|
|
|
154
156
|
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/list"),
|
|
155
157
|
method: "GET",
|
|
156
158
|
headers: _headers,
|
|
157
|
-
|
|
159
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
158
160
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
159
161
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
160
162
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -212,7 +214,7 @@ class FhirProviderClient {
|
|
|
212
214
|
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)}`),
|
|
213
215
|
method: "GET",
|
|
214
216
|
headers: _headers,
|
|
215
|
-
|
|
217
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
216
218
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
217
219
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
218
220
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -272,7 +274,7 @@ class FhirProviderClient {
|
|
|
272
274
|
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)}`),
|
|
273
275
|
method: "DELETE",
|
|
274
276
|
headers: _headers,
|
|
275
|
-
|
|
277
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
276
278
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
277
279
|
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
278
280
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -324,8 +326,9 @@ class FhirProviderClient {
|
|
|
324
326
|
*
|
|
325
327
|
* @example
|
|
326
328
|
* await client.fhirProvider.addAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
|
|
327
|
-
* auth_method: "
|
|
328
|
-
* client_id: "your-client-id"
|
|
329
|
+
* auth_method: "client_secret",
|
|
330
|
+
* client_id: "your-client-id",
|
|
331
|
+
* client_secret: "your-client-secret"
|
|
329
332
|
* })
|
|
330
333
|
*/
|
|
331
334
|
addAuthConfig(fhir_provider_id, request, requestOptions) {
|
|
@@ -341,7 +344,7 @@ class FhirProviderClient {
|
|
|
341
344
|
method: "PATCH",
|
|
342
345
|
headers: _headers,
|
|
343
346
|
contentType: "application/json",
|
|
344
|
-
|
|
347
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
345
348
|
requestType: "json",
|
|
346
349
|
body: request,
|
|
347
350
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
@@ -400,7 +403,7 @@ class FhirProviderClient {
|
|
|
400
403
|
*
|
|
401
404
|
* @example
|
|
402
405
|
* await client.fhirProvider.setActiveAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
|
|
403
|
-
* auth_config_id: "auth-config-
|
|
406
|
+
* auth_config_id: "auth-config-456"
|
|
404
407
|
* })
|
|
405
408
|
*/
|
|
406
409
|
setActiveAuthConfig(fhir_provider_id, request, requestOptions) {
|
|
@@ -416,7 +419,7 @@ class FhirProviderClient {
|
|
|
416
419
|
method: "PATCH",
|
|
417
420
|
headers: _headers,
|
|
418
421
|
contentType: "application/json",
|
|
419
|
-
|
|
422
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
420
423
|
requestType: "json",
|
|
421
424
|
body: request,
|
|
422
425
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
@@ -472,7 +475,7 @@ class FhirProviderClient {
|
|
|
472
475
|
*
|
|
473
476
|
* @example
|
|
474
477
|
* await client.fhirProvider.removeAuthConfig("1716d214-de93-43a4-aa6b-a878d864e2ad", {
|
|
475
|
-
* auth_config_id: "auth-config-
|
|
478
|
+
* auth_config_id: "auth-config-456"
|
|
476
479
|
* })
|
|
477
480
|
*/
|
|
478
481
|
removeAuthConfig(fhir_provider_id, request, requestOptions) {
|
|
@@ -488,7 +491,7 @@ class FhirProviderClient {
|
|
|
488
491
|
method: "PATCH",
|
|
489
492
|
headers: _headers,
|
|
490
493
|
contentType: "application/json",
|
|
491
|
-
|
|
494
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
492
495
|
requestType: "json",
|
|
493
496
|
body: request,
|
|
494
497
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
@@ -3,11 +3,13 @@ import type * as phenoml from "../../../../index.js";
|
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
5
|
* name: "Epic Sandbox",
|
|
6
|
-
*
|
|
6
|
+
* description: "Epic sandbox environment for testing",
|
|
7
|
+
* provider: "epic",
|
|
7
8
|
* base_url: "https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4",
|
|
8
9
|
* auth: {
|
|
9
|
-
* auth_method: "
|
|
10
|
-
* client_id: "your-client-id"
|
|
10
|
+
* auth_method: "client_secret",
|
|
11
|
+
* client_id: "your-client-id",
|
|
12
|
+
* client_secret: "your-client-secret"
|
|
11
13
|
* }
|
|
12
14
|
* }
|
|
13
15
|
*/
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Limited information returned for sandbox FHIR providers. Sandbox
|
|
3
|
+
* responses omit `auth_configs` and `last_updated`, which is what
|
|
4
|
+
* distinguishes this shape from `FhirProviderTemplate` in `oneOf`.
|
|
3
5
|
*/
|
|
4
6
|
export interface FhirProviderSandboxInfo {
|
|
5
7
|
/** Unique identifier for the FHIR provider */
|
|
6
|
-
id
|
|
8
|
+
id: string;
|
|
7
9
|
/** Display name for the FHIR provider */
|
|
8
|
-
name
|
|
10
|
+
name: string;
|
|
9
11
|
/** Optional description of the FHIR provider */
|
|
10
12
|
description?: string | undefined;
|
|
11
13
|
/** Provider type (always "sandbox" for this schema) */
|
|
12
|
-
provider
|
|
14
|
+
provider: "sandbox";
|
|
13
15
|
}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import type * as phenoml from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Full FHIR provider configuration returned for non-sandbox providers.
|
|
4
|
+
* `auth_configs` and `last_updated` are always populated, which is how
|
|
5
|
+
* list responses distinguish this shape from `FhirProviderSandboxInfo`.
|
|
6
|
+
*/
|
|
2
7
|
export interface FhirProviderTemplate {
|
|
3
8
|
/** Unique identifier for the FHIR provider */
|
|
4
|
-
id
|
|
9
|
+
id: string;
|
|
5
10
|
/** Display name for the FHIR provider */
|
|
6
|
-
name
|
|
11
|
+
name: string;
|
|
7
12
|
/** Optional description of the FHIR provider */
|
|
8
13
|
description?: string | undefined;
|
|
9
|
-
provider
|
|
14
|
+
provider: phenoml.fhirProvider.Provider;
|
|
10
15
|
/** Base URL of the FHIR server */
|
|
11
16
|
base_url?: string | undefined;
|
|
12
17
|
/** OAuth client ID. Deprecated: use client_id on FhirProviderAuthConfig instead. Retained for backward compatibility with existing providers. */
|
|
13
18
|
client_id?: string | undefined;
|
|
14
19
|
/** Map of authentication configurations (key is auth_config_id) */
|
|
15
|
-
auth_configs
|
|
20
|
+
auth_configs: Record<string, phenoml.fhirProvider.FhirProviderAuthConfig>;
|
|
16
21
|
/** Timestamp when the provider was last updated */
|
|
17
|
-
last_updated
|
|
22
|
+
last_updated: string;
|
|
18
23
|
}
|
|
@@ -25,8 +25,15 @@ export declare class Lang2FhirClient {
|
|
|
25
25
|
* @example
|
|
26
26
|
* await client.lang2Fhir.create({
|
|
27
27
|
* version: "R4",
|
|
28
|
-
* resource: "
|
|
29
|
-
* text: "Patient has severe asthma with acute exacerbation"
|
|
28
|
+
* resource: "condition-encounter-diagnosis",
|
|
29
|
+
* text: "Patient has severe persistent asthma with acute exacerbation"
|
|
30
|
+
* })
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* await client.lang2Fhir.create({
|
|
34
|
+
* version: "R4",
|
|
35
|
+
* resource: "medicationrequest",
|
|
36
|
+
* text: "Prescribe Amoxicillin 500mg capsules, take one capsule three times daily for 10 days"
|
|
30
37
|
* })
|
|
31
38
|
*/
|
|
32
39
|
create(request: phenoml.lang2Fhir.CreateRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.FhirResource>;
|
|
@@ -47,7 +54,8 @@ export declare class Lang2FhirClient {
|
|
|
47
54
|
*
|
|
48
55
|
* @example
|
|
49
56
|
* await client.lang2Fhir.createMulti({
|
|
50
|
-
* text: "John Smith,
|
|
57
|
+
* text: "John Smith, 45-year-old male, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily. Blood pressure 140/90.",
|
|
58
|
+
* version: "R4"
|
|
51
59
|
* })
|
|
52
60
|
*/
|
|
53
61
|
createMulti(request: phenoml.lang2Fhir.CreateMultiRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.CreateMultiResponse>;
|
|
@@ -99,7 +107,9 @@ export declare class Lang2FhirClient {
|
|
|
99
107
|
*
|
|
100
108
|
* @example
|
|
101
109
|
* await client.lang2Fhir.uploadProfile({
|
|
102
|
-
* profile: "
|
|
110
|
+
* profile: "eyJyZXNvdXJjZVR5cGUiOiJTdHJ1Y3R1cmVEZWZpbml0aW9uIiwiaWQiOiJjdXN0b20tcGF0aWVudCIsInVybCI6Imh0dHA6Ly9waGVub21sLmNvbS9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vY3VzdG9tLXBhdGllbnQiLCJuYW1lIjoiQ3VzdG9tUGF0aWVudCIsInN0YXR1cyI6ImFjdGl2ZSIsImZoaXJWZXJzaW9uIjoiNC4wLjEiLCJraW5kIjoicmVzb3VyY2UiLCJhYnN0cmFjdCI6ZmFsc2UsInR5cGUiOiJQYXRpZW50IiwiYmFzZURlZmluaXRpb24iOiJodHRwOi8vaGw3Lm9yZy9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vUGF0aWVudCIsImRlcml2YXRpb24iOiJjb25zdHJhaW50Iiwic25hcHNob3QiOnsiZWxlbWVudCI6W3siaWQiOiJQYXRpZW50IiwicGF0aCI6IlBhdGllbnQiLCJtaW4iOjAsIm1heCI6IioifSx7ImlkIjoiUGF0aWVudC5uYW1lIiwicGF0aCI6IlBhdGllbnQubmFtZSIsIm1pbiI6MSwibWF4IjoiKiJ9XX19Cg==",
|
|
111
|
+
* implementation_guide: "acme-cardiology",
|
|
112
|
+
* profile_context: "When clinical text describes cardiology-specific findings, prefer this profile over the generic US Core Condition."
|
|
103
113
|
* })
|
|
104
114
|
*/
|
|
105
115
|
uploadProfile(request: phenoml.lang2Fhir.ProfileUploadRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.Lang2FhirUploadProfileResponse>;
|
|
@@ -120,7 +130,7 @@ export declare class Lang2FhirClient {
|
|
|
120
130
|
* await client.lang2Fhir.document({
|
|
121
131
|
* version: "R4",
|
|
122
132
|
* resource: "questionnaire",
|
|
123
|
-
* content: "
|
|
133
|
+
* content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)"
|
|
124
134
|
* })
|
|
125
135
|
*/
|
|
126
136
|
document(request: phenoml.lang2Fhir.DocumentRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.FhirResource>;
|
|
@@ -144,7 +154,8 @@ export declare class Lang2FhirClient {
|
|
|
144
154
|
* @example
|
|
145
155
|
* await client.lang2Fhir.extractMultipleFhirResourcesFromADocument({
|
|
146
156
|
* version: "R4",
|
|
147
|
-
* content: "
|
|
157
|
+
* content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)",
|
|
158
|
+
* provider: "medplum"
|
|
148
159
|
* })
|
|
149
160
|
*/
|
|
150
161
|
extractMultipleFhirResourcesFromADocument(request: phenoml.lang2Fhir.DocumentMultiRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.DocumentMultiResponse>;
|
|
@@ -70,8 +70,15 @@ class Lang2FhirClient {
|
|
|
70
70
|
* @example
|
|
71
71
|
* await client.lang2Fhir.create({
|
|
72
72
|
* version: "R4",
|
|
73
|
-
* resource: "
|
|
74
|
-
* text: "Patient has severe asthma with acute exacerbation"
|
|
73
|
+
* resource: "condition-encounter-diagnosis",
|
|
74
|
+
* text: "Patient has severe persistent asthma with acute exacerbation"
|
|
75
|
+
* })
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.lang2Fhir.create({
|
|
79
|
+
* version: "R4",
|
|
80
|
+
* resource: "medicationrequest",
|
|
81
|
+
* text: "Prescribe Amoxicillin 500mg capsules, take one capsule three times daily for 10 days"
|
|
75
82
|
* })
|
|
76
83
|
*/
|
|
77
84
|
create(request, requestOptions) {
|
|
@@ -87,7 +94,7 @@ class Lang2FhirClient {
|
|
|
87
94
|
method: "POST",
|
|
88
95
|
headers: _headers,
|
|
89
96
|
contentType: "application/json",
|
|
90
|
-
|
|
97
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
91
98
|
requestType: "json",
|
|
92
99
|
body: request,
|
|
93
100
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
@@ -134,7 +141,8 @@ class Lang2FhirClient {
|
|
|
134
141
|
*
|
|
135
142
|
* @example
|
|
136
143
|
* await client.lang2Fhir.createMulti({
|
|
137
|
-
* text: "John Smith,
|
|
144
|
+
* text: "John Smith, 45-year-old male, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily. Blood pressure 140/90.",
|
|
145
|
+
* version: "R4"
|
|
138
146
|
* })
|
|
139
147
|
*/
|
|
140
148
|
createMulti(request, requestOptions) {
|
|
@@ -150,7 +158,7 @@ class Lang2FhirClient {
|
|
|
150
158
|
method: "POST",
|
|
151
159
|
headers: _headers,
|
|
152
160
|
contentType: "application/json",
|
|
153
|
-
|
|
161
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
154
162
|
requestType: "json",
|
|
155
163
|
body: request,
|
|
156
164
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
@@ -220,7 +228,7 @@ class Lang2FhirClient {
|
|
|
220
228
|
method: "POST",
|
|
221
229
|
headers: _headers,
|
|
222
230
|
contentType: "application/json",
|
|
223
|
-
|
|
231
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
224
232
|
requestType: "json",
|
|
225
233
|
body: request,
|
|
226
234
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
@@ -275,7 +283,9 @@ class Lang2FhirClient {
|
|
|
275
283
|
*
|
|
276
284
|
* @example
|
|
277
285
|
* await client.lang2Fhir.uploadProfile({
|
|
278
|
-
* profile: "
|
|
286
|
+
* profile: "eyJyZXNvdXJjZVR5cGUiOiJTdHJ1Y3R1cmVEZWZpbml0aW9uIiwiaWQiOiJjdXN0b20tcGF0aWVudCIsInVybCI6Imh0dHA6Ly9waGVub21sLmNvbS9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vY3VzdG9tLXBhdGllbnQiLCJuYW1lIjoiQ3VzdG9tUGF0aWVudCIsInN0YXR1cyI6ImFjdGl2ZSIsImZoaXJWZXJzaW9uIjoiNC4wLjEiLCJraW5kIjoicmVzb3VyY2UiLCJhYnN0cmFjdCI6ZmFsc2UsInR5cGUiOiJQYXRpZW50IiwiYmFzZURlZmluaXRpb24iOiJodHRwOi8vaGw3Lm9yZy9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vUGF0aWVudCIsImRlcml2YXRpb24iOiJjb25zdHJhaW50Iiwic25hcHNob3QiOnsiZWxlbWVudCI6W3siaWQiOiJQYXRpZW50IiwicGF0aCI6IlBhdGllbnQiLCJtaW4iOjAsIm1heCI6IioifSx7ImlkIjoiUGF0aWVudC5uYW1lIiwicGF0aCI6IlBhdGllbnQubmFtZSIsIm1pbiI6MSwibWF4IjoiKiJ9XX19Cg==",
|
|
287
|
+
* implementation_guide: "acme-cardiology",
|
|
288
|
+
* profile_context: "When clinical text describes cardiology-specific findings, prefer this profile over the generic US Core Condition."
|
|
279
289
|
* })
|
|
280
290
|
*/
|
|
281
291
|
uploadProfile(request, requestOptions) {
|
|
@@ -291,7 +301,7 @@ class Lang2FhirClient {
|
|
|
291
301
|
method: "POST",
|
|
292
302
|
headers: _headers,
|
|
293
303
|
contentType: "application/json",
|
|
294
|
-
|
|
304
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
295
305
|
requestType: "json",
|
|
296
306
|
body: request,
|
|
297
307
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
@@ -343,7 +353,7 @@ class Lang2FhirClient {
|
|
|
343
353
|
* await client.lang2Fhir.document({
|
|
344
354
|
* version: "R4",
|
|
345
355
|
* resource: "questionnaire",
|
|
346
|
-
* content: "
|
|
356
|
+
* content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)"
|
|
347
357
|
* })
|
|
348
358
|
*/
|
|
349
359
|
document(request, requestOptions) {
|
|
@@ -359,7 +369,7 @@ class Lang2FhirClient {
|
|
|
359
369
|
method: "POST",
|
|
360
370
|
headers: _headers,
|
|
361
371
|
contentType: "application/json",
|
|
362
|
-
|
|
372
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
363
373
|
requestType: "json",
|
|
364
374
|
body: request,
|
|
365
375
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
@@ -409,7 +419,8 @@ class Lang2FhirClient {
|
|
|
409
419
|
* @example
|
|
410
420
|
* await client.lang2Fhir.extractMultipleFhirResourcesFromADocument({
|
|
411
421
|
* version: "R4",
|
|
412
|
-
* content: "
|
|
422
|
+
* content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)",
|
|
423
|
+
* provider: "medplum"
|
|
413
424
|
* })
|
|
414
425
|
*/
|
|
415
426
|
extractMultipleFhirResourcesFromADocument(request, requestOptions) {
|
|
@@ -425,7 +436,7 @@ class Lang2FhirClient {
|
|
|
425
436
|
method: "POST",
|
|
426
437
|
headers: _headers,
|
|
427
438
|
contentType: "application/json",
|
|
428
|
-
|
|
439
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
429
440
|
requestType: "json",
|
|
430
441
|
body: request,
|
|
431
442
|
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* text: "John Smith,
|
|
4
|
+
* text: "John Smith, 45-year-old male, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily. Blood pressure 140/90.",
|
|
5
|
+
* version: "R4"
|
|
5
6
|
* }
|
|
6
7
|
*/
|
|
7
8
|
export interface CreateMultiRequest {
|
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* version: "R4",
|
|
5
|
-
* resource: "
|
|
6
|
-
* text: "Patient has severe asthma with acute exacerbation"
|
|
5
|
+
* resource: "condition-encounter-diagnosis",
|
|
6
|
+
* text: "Patient has severe persistent asthma with acute exacerbation"
|
|
7
|
+
* }
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* {
|
|
11
|
+
* version: "R4",
|
|
12
|
+
* resource: "medicationrequest",
|
|
13
|
+
* text: "Prescribe Amoxicillin 500mg capsules, take one capsule three times daily for 10 days"
|
|
7
14
|
* }
|
|
8
15
|
*/
|
|
9
16
|
export interface CreateRequest {
|
|
@@ -3,7 +3,8 @@ import type * as phenoml from "../../../../index.js";
|
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
5
|
* version: "R4",
|
|
6
|
-
* content: "
|
|
6
|
+
* content: "JVBERi0xLjQKJeLjz9MK...(base64-encoded PDF or image bytes)",
|
|
7
|
+
* provider: "medplum"
|
|
7
8
|
* }
|
|
8
9
|
*/
|
|
9
10
|
export interface DocumentMultiRequest {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* profile: "
|
|
4
|
+
* profile: "eyJyZXNvdXJjZVR5cGUiOiJTdHJ1Y3R1cmVEZWZpbml0aW9uIiwiaWQiOiJjdXN0b20tcGF0aWVudCIsInVybCI6Imh0dHA6Ly9waGVub21sLmNvbS9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vY3VzdG9tLXBhdGllbnQiLCJuYW1lIjoiQ3VzdG9tUGF0aWVudCIsInN0YXR1cyI6ImFjdGl2ZSIsImZoaXJWZXJzaW9uIjoiNC4wLjEiLCJraW5kIjoicmVzb3VyY2UiLCJhYnN0cmFjdCI6ZmFsc2UsInR5cGUiOiJQYXRpZW50IiwiYmFzZURlZmluaXRpb24iOiJodHRwOi8vaGw3Lm9yZy9maGlyL1N0cnVjdHVyZURlZmluaXRpb24vUGF0aWVudCIsImRlcml2YXRpb24iOiJjb25zdHJhaW50Iiwic25hcHNob3QiOnsiZWxlbWVudCI6W3siaWQiOiJQYXRpZW50IiwicGF0aCI6IlBhdGllbnQiLCJtaW4iOjAsIm1heCI6IioifSx7ImlkIjoiUGF0aWVudC5uYW1lIiwicGF0aCI6IlBhdGllbnQubmFtZSIsIm1pbiI6MSwibWF4IjoiKiJ9XX19Cg==",
|
|
5
|
+
* implementation_guide: "acme-cardiology",
|
|
6
|
+
* profile_context: "When clinical text describes cardiology-specific findings, prefer this profile over the generic US Core Condition."
|
|
5
7
|
* }
|
|
6
8
|
*/
|
|
7
9
|
export interface ProfileUploadRequest {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export interface SearchResponse {
|
|
2
2
|
/** The FHIR resource type identified for the search */
|
|
3
|
-
|
|
3
|
+
resource_type?: SearchResponse.ResourceType | undefined;
|
|
4
4
|
/**
|
|
5
5
|
* FHIR search parameters in standard query string format.
|
|
6
6
|
* Parameters are formatted according to the FHIR specification with appropriate operators.
|
|
7
7
|
* Code parameters are resolved to standard terminology codes (SNOMED CT, LOINC, RxNorm, ICD-10-CM).
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
search_params?: string | undefined;
|
|
10
10
|
}
|
|
11
11
|
export declare namespace SearchResponse {
|
|
12
12
|
/** The FHIR resource type identified for the search */
|
|
@@ -35,10 +35,10 @@ export declare class SummaryClient {
|
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
37
|
* await client.summary.createTemplate({
|
|
38
|
-
* name: "
|
|
39
|
-
* example_summary: "Patient John Doe, age 45,
|
|
40
|
-
* target_resources: ["Patient", "Condition", "
|
|
41
|
-
* mode: "
|
|
38
|
+
* name: "Discharge Summary",
|
|
39
|
+
* example_summary: "Patient John Doe, age 45, was admitted on 2024-01-10 with Type 2 Diabetes. Discharged on 2024-01-15 with Metformin 500mg BID.",
|
|
40
|
+
* target_resources: ["Patient", "Condition", "MedicationRequest"],
|
|
41
|
+
* mode: "narrative"
|
|
42
42
|
* })
|
|
43
43
|
*/
|
|
44
44
|
createTemplate(request: phenoml.summary.CreateSummaryTemplateRequest, requestOptions?: SummaryClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.CreateSummaryTemplateResponse>;
|
|
@@ -74,10 +74,10 @@ export declare class SummaryClient {
|
|
|
74
74
|
*
|
|
75
75
|
* @example
|
|
76
76
|
* await client.summary.updateTemplate("id", {
|
|
77
|
-
* name: "
|
|
78
|
-
* template: "
|
|
79
|
-
* target_resources: ["
|
|
80
|
-
* mode: "
|
|
77
|
+
* name: "Discharge Summary",
|
|
78
|
+
* template: "Patient {{Patient.name[0].text}} was discharged on {{Encounter[0].period.end}} with {{MedicationRequest[0].medicationCodeableConcept.coding[0].display}} {{MedicationRequest[0].dosageInstruction[0].text}}.",
|
|
79
|
+
* target_resources: ["Patient", "Encounter", "MedicationRequest"],
|
|
80
|
+
* mode: "narrative"
|
|
81
81
|
* })
|
|
82
82
|
*/
|
|
83
83
|
updateTemplate(id: string, request: phenoml.summary.UpdateSummaryTemplateRequest, requestOptions?: SummaryClient.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryUpdateTemplateResponse>;
|
|
@@ -115,8 +115,73 @@ export declare class SummaryClient {
|
|
|
115
115
|
*
|
|
116
116
|
* @example
|
|
117
117
|
* await client.summary.create({
|
|
118
|
+
* mode: "narrative",
|
|
119
|
+
* template_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
118
120
|
* fhir_resources: {
|
|
119
|
-
* resourceType: "
|
|
121
|
+
* "resourceType": "Bundle",
|
|
122
|
+
* "type": "collection",
|
|
123
|
+
* "entry": [
|
|
124
|
+
* {
|
|
125
|
+
* "resource": {
|
|
126
|
+
* "resourceType": "Patient",
|
|
127
|
+
* "name": [
|
|
128
|
+
* {
|
|
129
|
+
* "given": [
|
|
130
|
+
* "John"
|
|
131
|
+
* ],
|
|
132
|
+
* "family": "Doe"
|
|
133
|
+
* }
|
|
134
|
+
* ],
|
|
135
|
+
* "gender": "male",
|
|
136
|
+
* "birthDate": "1979-03-15"
|
|
137
|
+
* }
|
|
138
|
+
* },
|
|
139
|
+
* {
|
|
140
|
+
* "resource": {
|
|
141
|
+
* "resourceType": "Condition",
|
|
142
|
+
* "code": {
|
|
143
|
+
* "text": "Type 2 Diabetes Mellitus"
|
|
144
|
+
* },
|
|
145
|
+
* "onsetDateTime": "2024-01-15"
|
|
146
|
+
* }
|
|
147
|
+
* }
|
|
148
|
+
* ]
|
|
149
|
+
* }
|
|
150
|
+
* })
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* await client.summary.create({
|
|
154
|
+
* mode: "ips",
|
|
155
|
+
* fhir_resources: {
|
|
156
|
+
* "resourceType": "Bundle",
|
|
157
|
+
* "type": "collection",
|
|
158
|
+
* "entry": [
|
|
159
|
+
* {
|
|
160
|
+
* "resource": {
|
|
161
|
+
* "resourceType": "Patient",
|
|
162
|
+
* "id": "maria-garcia-001",
|
|
163
|
+
* "name": [
|
|
164
|
+
* {
|
|
165
|
+
* "given": [
|
|
166
|
+
* "Maria"
|
|
167
|
+
* ],
|
|
168
|
+
* "family": "Garcia"
|
|
169
|
+
* }
|
|
170
|
+
* ],
|
|
171
|
+
* "gender": "female",
|
|
172
|
+
* "birthDate": "1985-07-22"
|
|
173
|
+
* }
|
|
174
|
+
* },
|
|
175
|
+
* {
|
|
176
|
+
* "resource": {
|
|
177
|
+
* "resourceType": "AllergyIntolerance",
|
|
178
|
+
* "code": {
|
|
179
|
+
* "text": "Penicillin"
|
|
180
|
+
* },
|
|
181
|
+
* "criticality": "high"
|
|
182
|
+
* }
|
|
183
|
+
* }
|
|
184
|
+
* ]
|
|
120
185
|
* }
|
|
121
186
|
* })
|
|
122
187
|
*/
|