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
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
|
-
* {
|
|
3
|
+
* {
|
|
4
|
+
* name: "Medical Assistant System Prompt",
|
|
5
|
+
* description: "Updated system prompt",
|
|
6
|
+
* content: "You are a helpful medical assistant. Always cite ICD-10 codes when discussing diagnoses.",
|
|
7
|
+
* is_default: false,
|
|
8
|
+
* tags: ["medical", "system", "updated"]
|
|
9
|
+
* }
|
|
4
10
|
*/
|
|
5
11
|
export interface AgentPromptsUpdateRequest {
|
|
6
12
|
/** Prompt name */
|
|
@@ -24,7 +24,10 @@ export declare class AuthClient {
|
|
|
24
24
|
* @throws {@link phenoml.authtoken.InternalServerError}
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
|
-
* await client.authtoken.auth.getToken(
|
|
27
|
+
* await client.authtoken.auth.getToken({
|
|
28
|
+
* client_id: "your_client_id",
|
|
29
|
+
* client_secret: "your_client_secret"
|
|
30
|
+
* })
|
|
28
31
|
*/
|
|
29
32
|
getToken(request?: phenoml.authtoken.ClientCredentialsRequest, requestOptions?: AuthClient.RequestOptions): core.HttpResponsePromise<phenoml.authtoken.TokenResponse>;
|
|
30
33
|
private __getToken;
|
|
@@ -33,7 +33,10 @@ export class AuthClient {
|
|
|
33
33
|
* @throws {@link phenoml.authtoken.InternalServerError}
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
|
-
* await client.authtoken.auth.getToken(
|
|
36
|
+
* await client.authtoken.auth.getToken({
|
|
37
|
+
* client_id: "your_client_id",
|
|
38
|
+
* client_secret: "your_client_secret"
|
|
39
|
+
* })
|
|
37
40
|
*/
|
|
38
41
|
getToken(request = {}, requestOptions) {
|
|
39
42
|
return core.HttpResponsePromise.fromPromise(this.__getToken(request, requestOptions));
|
|
@@ -47,7 +50,7 @@ export class AuthClient {
|
|
|
47
50
|
method: "POST",
|
|
48
51
|
headers: _headers,
|
|
49
52
|
contentType: "application/json",
|
|
50
|
-
|
|
53
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
51
54
|
requestType: "json",
|
|
52
55
|
body: request,
|
|
53
56
|
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,
|
|
@@ -47,7 +47,7 @@ export class CohortClient {
|
|
|
47
47
|
method: "POST",
|
|
48
48
|
headers: _headers,
|
|
49
49
|
contentType: "application/json",
|
|
50
|
-
|
|
50
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
51
51
|
requestType: "json",
|
|
52
52
|
body: request,
|
|
53
53
|
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,
|
|
@@ -30,7 +30,24 @@ export declare class ConstrueClient {
|
|
|
30
30
|
* await client.construe.uploadCodeSystem({
|
|
31
31
|
* name: "CUSTOM_CODES",
|
|
32
32
|
* version: "1.0",
|
|
33
|
-
* format: "
|
|
33
|
+
* format: "json",
|
|
34
|
+
* codes: [{
|
|
35
|
+
* code: "X001",
|
|
36
|
+
* description: "Example custom code 1"
|
|
37
|
+
* }, {
|
|
38
|
+
* code: "X002",
|
|
39
|
+
* description: "Example custom code 2"
|
|
40
|
+
* }]
|
|
41
|
+
* })
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* await client.construe.uploadCodeSystem({
|
|
45
|
+
* name: "CUSTOM_CODES",
|
|
46
|
+
* version: "1.0",
|
|
47
|
+
* format: "csv",
|
|
48
|
+
* file: "Y29kZSxkZXNjcmlwdGlvbgpYMDAxLEV4YW1wbGUgY3VzdG9tIGNvZGUgMQo=",
|
|
49
|
+
* code_col: "code",
|
|
50
|
+
* desc_col: "description"
|
|
34
51
|
* })
|
|
35
52
|
*/
|
|
36
53
|
uploadCodeSystem(request: phenoml.construe.UploadRequest, requestOptions?: ConstrueClient.RequestOptions): core.HttpResponsePromise<phenoml.construe.ConstrueUploadCodeSystemResponse>;
|
|
@@ -52,7 +69,66 @@ export declare class ConstrueClient {
|
|
|
52
69
|
*
|
|
53
70
|
* @example
|
|
54
71
|
* await client.construe.extractCodes({
|
|
55
|
-
* text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney"
|
|
72
|
+
* text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney.",
|
|
73
|
+
* system: {
|
|
74
|
+
* name: "ICD-10-CM",
|
|
75
|
+
* version: "2025"
|
|
76
|
+
* }
|
|
77
|
+
* })
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* await client.construe.extractCodes({
|
|
81
|
+
* text: "45-year-old male presents with chest pain radiating to left arm, shortness of breath, and diaphoresis. ECG shows ST elevation in leads II, III, and aVF.",
|
|
82
|
+
* system: {
|
|
83
|
+
* name: "SNOMED_CT_US_LITE",
|
|
84
|
+
* version: "20240901"
|
|
85
|
+
* },
|
|
86
|
+
* config: {
|
|
87
|
+
* chunking_method: "sentences",
|
|
88
|
+
* validation_method: "simple",
|
|
89
|
+
* include_rationale: true,
|
|
90
|
+
* include_citations: true
|
|
91
|
+
* }
|
|
92
|
+
* })
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* await client.construe.extractCodes({
|
|
96
|
+
* text: "Start Metformin 500mg twice daily for type 2 diabetes. Continue Lisinopril 10mg daily for hypertension. Add Atorvastatin 20mg at bedtime.",
|
|
97
|
+
* system: {
|
|
98
|
+
* name: "RXNORM",
|
|
99
|
+
* version: "11042024"
|
|
100
|
+
* },
|
|
101
|
+
* config: {
|
|
102
|
+
* validation_method: "medication_search",
|
|
103
|
+
* include_rationale: true
|
|
104
|
+
* }
|
|
105
|
+
* })
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* await client.construe.extractCodes({
|
|
109
|
+
* text: "Patient diagnosed with Type 2 diabetes mellitus with diabetic chronic kidney disease, stage 3.",
|
|
110
|
+
* system: {
|
|
111
|
+
* name: "ICD-10-CM",
|
|
112
|
+
* version: "2025"
|
|
113
|
+
* },
|
|
114
|
+
* config: {
|
|
115
|
+
* validation_method: "simple",
|
|
116
|
+
* include_ancestors: true
|
|
117
|
+
* }
|
|
118
|
+
* })
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* await client.construe.extractCodes({
|
|
122
|
+
* text: "5-year-old male with seizures, severe intellectual disability, microcephaly, and hypotonia.",
|
|
123
|
+
* system: {
|
|
124
|
+
* name: "HPO",
|
|
125
|
+
* version: "2025"
|
|
126
|
+
* },
|
|
127
|
+
* config: {
|
|
128
|
+
* chunking_method: "fasthpocr",
|
|
129
|
+
* validation_method: "none",
|
|
130
|
+
* include_rationale: false
|
|
131
|
+
* }
|
|
56
132
|
* })
|
|
57
133
|
*/
|
|
58
134
|
extractCodes(request: phenoml.construe.ExtractRequest, requestOptions?: ConstrueClient.RequestOptions): core.HttpResponsePromise<phenoml.construe.ExtractCodesResult>;
|
|
@@ -163,7 +239,8 @@ export declare class ConstrueClient {
|
|
|
163
239
|
* Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
164
240
|
*
|
|
165
241
|
* @param {string} codesystem - Code system name
|
|
166
|
-
* @param {string} codeID - The code identifier
|
|
242
|
+
* @param {string} codeID - The code identifier. ICD-10-CM codes are stored without their
|
|
243
|
+
* cosmetic dot (use "E1165", not "E11.65").
|
|
167
244
|
* @param {phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest} request
|
|
168
245
|
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
169
246
|
*
|
|
@@ -173,7 +250,7 @@ export declare class ConstrueClient {
|
|
|
173
250
|
* @throws {@link phenoml.construe.InternalServerError}
|
|
174
251
|
*
|
|
175
252
|
* @example
|
|
176
|
-
* await client.construe.getASpecificCode("ICD-10-CM", "
|
|
253
|
+
* await client.construe.getASpecificCode("ICD-10-CM", "E1165", {
|
|
177
254
|
* version: "version"
|
|
178
255
|
* })
|
|
179
256
|
*/
|
|
@@ -234,21 +311,28 @@ export declare class ConstrueClient {
|
|
|
234
311
|
* await client.construe.submitFeedbackOnExtractionResults({
|
|
235
312
|
* text: "Patient has type 2 diabetes with hyperglycemia",
|
|
236
313
|
* received_result: {
|
|
237
|
-
* system: {
|
|
314
|
+
* system: {
|
|
315
|
+
* name: "ICD-10-CM",
|
|
316
|
+
* version: "2025"
|
|
317
|
+
* },
|
|
238
318
|
* codes: [{
|
|
239
|
-
* code: "
|
|
240
|
-
* description: "
|
|
319
|
+
* code: "E11.9",
|
|
320
|
+
* description: "Type 2 diabetes mellitus without complications",
|
|
241
321
|
* valid: true
|
|
242
322
|
* }]
|
|
243
323
|
* },
|
|
244
324
|
* expected_result: {
|
|
245
|
-
* system: {
|
|
325
|
+
* system: {
|
|
326
|
+
* name: "ICD-10-CM",
|
|
327
|
+
* version: "2025"
|
|
328
|
+
* },
|
|
246
329
|
* codes: [{
|
|
247
|
-
* code: "
|
|
248
|
-
* description: "
|
|
330
|
+
* code: "E11.65",
|
|
331
|
+
* description: "Type 2 diabetes mellitus with hyperglycemia",
|
|
249
332
|
* valid: true
|
|
250
333
|
* }]
|
|
251
|
-
* }
|
|
334
|
+
* },
|
|
335
|
+
* detail: "Expected code E11.65 because the text mentions hyperglycemia"
|
|
252
336
|
* })
|
|
253
337
|
*/
|
|
254
338
|
submitFeedbackOnExtractionResults(request: phenoml.construe.FeedbackRequest, requestOptions?: ConstrueClient.RequestOptions): core.HttpResponsePromise<phenoml.construe.FeedbackResponse>;
|
|
@@ -39,7 +39,24 @@ export class ConstrueClient {
|
|
|
39
39
|
* await client.construe.uploadCodeSystem({
|
|
40
40
|
* name: "CUSTOM_CODES",
|
|
41
41
|
* version: "1.0",
|
|
42
|
-
* format: "
|
|
42
|
+
* format: "json",
|
|
43
|
+
* codes: [{
|
|
44
|
+
* code: "X001",
|
|
45
|
+
* description: "Example custom code 1"
|
|
46
|
+
* }, {
|
|
47
|
+
* code: "X002",
|
|
48
|
+
* description: "Example custom code 2"
|
|
49
|
+
* }]
|
|
50
|
+
* })
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* await client.construe.uploadCodeSystem({
|
|
54
|
+
* name: "CUSTOM_CODES",
|
|
55
|
+
* version: "1.0",
|
|
56
|
+
* format: "csv",
|
|
57
|
+
* file: "Y29kZSxkZXNjcmlwdGlvbgpYMDAxLEV4YW1wbGUgY3VzdG9tIGNvZGUgMQo=",
|
|
58
|
+
* code_col: "code",
|
|
59
|
+
* desc_col: "description"
|
|
43
60
|
* })
|
|
44
61
|
*/
|
|
45
62
|
uploadCodeSystem(request, requestOptions) {
|
|
@@ -55,7 +72,7 @@ export class ConstrueClient {
|
|
|
55
72
|
method: "POST",
|
|
56
73
|
headers: _headers,
|
|
57
74
|
contentType: "application/json",
|
|
58
|
-
|
|
75
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
59
76
|
requestType: "json",
|
|
60
77
|
body: request,
|
|
61
78
|
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,
|
|
@@ -112,7 +129,66 @@ export class ConstrueClient {
|
|
|
112
129
|
*
|
|
113
130
|
* @example
|
|
114
131
|
* await client.construe.extractCodes({
|
|
115
|
-
* text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney"
|
|
132
|
+
* text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney.",
|
|
133
|
+
* system: {
|
|
134
|
+
* name: "ICD-10-CM",
|
|
135
|
+
* version: "2025"
|
|
136
|
+
* }
|
|
137
|
+
* })
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* await client.construe.extractCodes({
|
|
141
|
+
* text: "45-year-old male presents with chest pain radiating to left arm, shortness of breath, and diaphoresis. ECG shows ST elevation in leads II, III, and aVF.",
|
|
142
|
+
* system: {
|
|
143
|
+
* name: "SNOMED_CT_US_LITE",
|
|
144
|
+
* version: "20240901"
|
|
145
|
+
* },
|
|
146
|
+
* config: {
|
|
147
|
+
* chunking_method: "sentences",
|
|
148
|
+
* validation_method: "simple",
|
|
149
|
+
* include_rationale: true,
|
|
150
|
+
* include_citations: true
|
|
151
|
+
* }
|
|
152
|
+
* })
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* await client.construe.extractCodes({
|
|
156
|
+
* text: "Start Metformin 500mg twice daily for type 2 diabetes. Continue Lisinopril 10mg daily for hypertension. Add Atorvastatin 20mg at bedtime.",
|
|
157
|
+
* system: {
|
|
158
|
+
* name: "RXNORM",
|
|
159
|
+
* version: "11042024"
|
|
160
|
+
* },
|
|
161
|
+
* config: {
|
|
162
|
+
* validation_method: "medication_search",
|
|
163
|
+
* include_rationale: true
|
|
164
|
+
* }
|
|
165
|
+
* })
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* await client.construe.extractCodes({
|
|
169
|
+
* text: "Patient diagnosed with Type 2 diabetes mellitus with diabetic chronic kidney disease, stage 3.",
|
|
170
|
+
* system: {
|
|
171
|
+
* name: "ICD-10-CM",
|
|
172
|
+
* version: "2025"
|
|
173
|
+
* },
|
|
174
|
+
* config: {
|
|
175
|
+
* validation_method: "simple",
|
|
176
|
+
* include_ancestors: true
|
|
177
|
+
* }
|
|
178
|
+
* })
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* await client.construe.extractCodes({
|
|
182
|
+
* text: "5-year-old male with seizures, severe intellectual disability, microcephaly, and hypotonia.",
|
|
183
|
+
* system: {
|
|
184
|
+
* name: "HPO",
|
|
185
|
+
* version: "2025"
|
|
186
|
+
* },
|
|
187
|
+
* config: {
|
|
188
|
+
* chunking_method: "fasthpocr",
|
|
189
|
+
* validation_method: "none",
|
|
190
|
+
* include_rationale: false
|
|
191
|
+
* }
|
|
116
192
|
* })
|
|
117
193
|
*/
|
|
118
194
|
extractCodes(request, requestOptions) {
|
|
@@ -128,7 +204,7 @@ export class ConstrueClient {
|
|
|
128
204
|
method: "POST",
|
|
129
205
|
headers: _headers,
|
|
130
206
|
contentType: "application/json",
|
|
131
|
-
|
|
207
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
132
208
|
requestType: "json",
|
|
133
209
|
body: request,
|
|
134
210
|
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,
|
|
@@ -188,7 +264,7 @@ export class ConstrueClient {
|
|
|
188
264
|
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/systems"),
|
|
189
265
|
method: "GET",
|
|
190
266
|
headers: _headers,
|
|
191
|
-
|
|
267
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
192
268
|
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,
|
|
193
269
|
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,
|
|
194
270
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -251,7 +327,11 @@ export class ConstrueClient {
|
|
|
251
327
|
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/systems/${core.url.encodePathParam(codesystem)}`),
|
|
252
328
|
method: "GET",
|
|
253
329
|
headers: _headers,
|
|
254
|
-
|
|
330
|
+
queryString: core.url
|
|
331
|
+
.queryBuilder()
|
|
332
|
+
.addMany(_queryParams)
|
|
333
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
334
|
+
.build(),
|
|
255
335
|
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,
|
|
256
336
|
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,
|
|
257
337
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -320,7 +400,11 @@ export class ConstrueClient {
|
|
|
320
400
|
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/systems/${core.url.encodePathParam(codesystem)}`),
|
|
321
401
|
method: "DELETE",
|
|
322
402
|
headers: _headers,
|
|
323
|
-
|
|
403
|
+
queryString: core.url
|
|
404
|
+
.queryBuilder()
|
|
405
|
+
.addMany(_queryParams)
|
|
406
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
407
|
+
.build(),
|
|
324
408
|
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,
|
|
325
409
|
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,
|
|
326
410
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -394,7 +478,11 @@ export class ConstrueClient {
|
|
|
394
478
|
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/systems/${core.url.encodePathParam(codesystem)}/export`),
|
|
395
479
|
method: "GET",
|
|
396
480
|
headers: _headers,
|
|
397
|
-
|
|
481
|
+
queryString: core.url
|
|
482
|
+
.queryBuilder()
|
|
483
|
+
.addMany(_queryParams)
|
|
484
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
485
|
+
.build(),
|
|
398
486
|
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,
|
|
399
487
|
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,
|
|
400
488
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -473,7 +561,11 @@ export class ConstrueClient {
|
|
|
473
561
|
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)}`),
|
|
474
562
|
method: "GET",
|
|
475
563
|
headers: _headers,
|
|
476
|
-
|
|
564
|
+
queryString: core.url
|
|
565
|
+
.queryBuilder()
|
|
566
|
+
.addMany(_queryParams)
|
|
567
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
568
|
+
.build(),
|
|
477
569
|
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,
|
|
478
570
|
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,
|
|
479
571
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -510,7 +602,8 @@ export class ConstrueClient {
|
|
|
510
602
|
* Usage of CPT is subject to AMA requirements: see PhenoML Terms of Service.
|
|
511
603
|
*
|
|
512
604
|
* @param {string} codesystem - Code system name
|
|
513
|
-
* @param {string} codeID - The code identifier
|
|
605
|
+
* @param {string} codeID - The code identifier. ICD-10-CM codes are stored without their
|
|
606
|
+
* cosmetic dot (use "E1165", not "E11.65").
|
|
514
607
|
* @param {phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest} request
|
|
515
608
|
* @param {ConstrueClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
516
609
|
*
|
|
@@ -520,7 +613,7 @@ export class ConstrueClient {
|
|
|
520
613
|
* @throws {@link phenoml.construe.InternalServerError}
|
|
521
614
|
*
|
|
522
615
|
* @example
|
|
523
|
-
* await client.construe.getASpecificCode("ICD-10-CM", "
|
|
616
|
+
* await client.construe.getASpecificCode("ICD-10-CM", "E1165", {
|
|
524
617
|
* version: "version"
|
|
525
618
|
* })
|
|
526
619
|
*/
|
|
@@ -540,7 +633,11 @@ export class ConstrueClient {
|
|
|
540
633
|
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)}`),
|
|
541
634
|
method: "GET",
|
|
542
635
|
headers: _headers,
|
|
543
|
-
|
|
636
|
+
queryString: core.url
|
|
637
|
+
.queryBuilder()
|
|
638
|
+
.addMany(_queryParams)
|
|
639
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
640
|
+
.build(),
|
|
544
641
|
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,
|
|
545
642
|
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,
|
|
546
643
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -626,7 +723,11 @@ export class ConstrueClient {
|
|
|
626
723
|
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)}/search/semantic`),
|
|
627
724
|
method: "GET",
|
|
628
725
|
headers: _headers,
|
|
629
|
-
|
|
726
|
+
queryString: core.url
|
|
727
|
+
.queryBuilder()
|
|
728
|
+
.addMany(_queryParams)
|
|
729
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
730
|
+
.build(),
|
|
630
731
|
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,
|
|
631
732
|
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,
|
|
632
733
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -676,21 +777,28 @@ export class ConstrueClient {
|
|
|
676
777
|
* await client.construe.submitFeedbackOnExtractionResults({
|
|
677
778
|
* text: "Patient has type 2 diabetes with hyperglycemia",
|
|
678
779
|
* received_result: {
|
|
679
|
-
* system: {
|
|
780
|
+
* system: {
|
|
781
|
+
* name: "ICD-10-CM",
|
|
782
|
+
* version: "2025"
|
|
783
|
+
* },
|
|
680
784
|
* codes: [{
|
|
681
|
-
* code: "
|
|
682
|
-
* description: "
|
|
785
|
+
* code: "E11.9",
|
|
786
|
+
* description: "Type 2 diabetes mellitus without complications",
|
|
683
787
|
* valid: true
|
|
684
788
|
* }]
|
|
685
789
|
* },
|
|
686
790
|
* expected_result: {
|
|
687
|
-
* system: {
|
|
791
|
+
* system: {
|
|
792
|
+
* name: "ICD-10-CM",
|
|
793
|
+
* version: "2025"
|
|
794
|
+
* },
|
|
688
795
|
* codes: [{
|
|
689
|
-
* code: "
|
|
690
|
-
* description: "
|
|
796
|
+
* code: "E11.65",
|
|
797
|
+
* description: "Type 2 diabetes mellitus with hyperglycemia",
|
|
691
798
|
* valid: true
|
|
692
799
|
* }]
|
|
693
|
-
* }
|
|
800
|
+
* },
|
|
801
|
+
* detail: "Expected code E11.65 because the text mentions hyperglycemia"
|
|
694
802
|
* })
|
|
695
803
|
*/
|
|
696
804
|
submitFeedbackOnExtractionResults(request, requestOptions) {
|
|
@@ -706,7 +814,7 @@ export class ConstrueClient {
|
|
|
706
814
|
method: "POST",
|
|
707
815
|
headers: _headers,
|
|
708
816
|
contentType: "application/json",
|
|
709
|
-
|
|
817
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
710
818
|
requestType: "json",
|
|
711
819
|
body: request,
|
|
712
820
|
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,
|
|
@@ -800,7 +908,11 @@ export class ConstrueClient {
|
|
|
800
908
|
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)}/search/text`),
|
|
801
909
|
method: "GET",
|
|
802
910
|
headers: _headers,
|
|
803
|
-
|
|
911
|
+
queryString: core.url
|
|
912
|
+
.queryBuilder()
|
|
913
|
+
.addMany(_queryParams)
|
|
914
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
915
|
+
.build(),
|
|
804
916
|
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,
|
|
805
917
|
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,
|
|
806
918
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -2,7 +2,66 @@ import type * as phenoml from "../../../../index.mjs";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
* text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney"
|
|
5
|
+
* text: "Patient is a 14-year-old female, previously healthy, who is here for evaluation of abnormal renal ultrasound with atrophic right kidney.",
|
|
6
|
+
* system: {
|
|
7
|
+
* name: "ICD-10-CM",
|
|
8
|
+
* version: "2025"
|
|
9
|
+
* }
|
|
10
|
+
* }
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* {
|
|
14
|
+
* text: "45-year-old male presents with chest pain radiating to left arm, shortness of breath, and diaphoresis. ECG shows ST elevation in leads II, III, and aVF.",
|
|
15
|
+
* system: {
|
|
16
|
+
* name: "SNOMED_CT_US_LITE",
|
|
17
|
+
* version: "20240901"
|
|
18
|
+
* },
|
|
19
|
+
* config: {
|
|
20
|
+
* chunking_method: "sentences",
|
|
21
|
+
* validation_method: "simple",
|
|
22
|
+
* include_rationale: true,
|
|
23
|
+
* include_citations: true
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* {
|
|
29
|
+
* text: "Start Metformin 500mg twice daily for type 2 diabetes. Continue Lisinopril 10mg daily for hypertension. Add Atorvastatin 20mg at bedtime.",
|
|
30
|
+
* system: {
|
|
31
|
+
* name: "RXNORM",
|
|
32
|
+
* version: "11042024"
|
|
33
|
+
* },
|
|
34
|
+
* config: {
|
|
35
|
+
* validation_method: "medication_search",
|
|
36
|
+
* include_rationale: true
|
|
37
|
+
* }
|
|
38
|
+
* }
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* {
|
|
42
|
+
* text: "Patient diagnosed with Type 2 diabetes mellitus with diabetic chronic kidney disease, stage 3.",
|
|
43
|
+
* system: {
|
|
44
|
+
* name: "ICD-10-CM",
|
|
45
|
+
* version: "2025"
|
|
46
|
+
* },
|
|
47
|
+
* config: {
|
|
48
|
+
* validation_method: "simple",
|
|
49
|
+
* include_ancestors: true
|
|
50
|
+
* }
|
|
51
|
+
* }
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* {
|
|
55
|
+
* text: "5-year-old male with seizures, severe intellectual disability, microcephaly, and hypotonia.",
|
|
56
|
+
* system: {
|
|
57
|
+
* name: "HPO",
|
|
58
|
+
* version: "2025"
|
|
59
|
+
* },
|
|
60
|
+
* config: {
|
|
61
|
+
* chunking_method: "fasthpocr",
|
|
62
|
+
* validation_method: "none",
|
|
63
|
+
* include_rationale: false
|
|
64
|
+
* }
|
|
6
65
|
* }
|
|
7
66
|
*/
|
|
8
67
|
export interface ExtractRequest {
|
|
@@ -4,21 +4,28 @@ import type * as phenoml from "../../../../index.mjs";
|
|
|
4
4
|
* {
|
|
5
5
|
* text: "Patient has type 2 diabetes with hyperglycemia",
|
|
6
6
|
* received_result: {
|
|
7
|
-
* system: {
|
|
7
|
+
* system: {
|
|
8
|
+
* name: "ICD-10-CM",
|
|
9
|
+
* version: "2025"
|
|
10
|
+
* },
|
|
8
11
|
* codes: [{
|
|
9
|
-
* code: "
|
|
10
|
-
* description: "
|
|
12
|
+
* code: "E11.9",
|
|
13
|
+
* description: "Type 2 diabetes mellitus without complications",
|
|
11
14
|
* valid: true
|
|
12
15
|
* }]
|
|
13
16
|
* },
|
|
14
17
|
* expected_result: {
|
|
15
|
-
* system: {
|
|
18
|
+
* system: {
|
|
19
|
+
* name: "ICD-10-CM",
|
|
20
|
+
* version: "2025"
|
|
21
|
+
* },
|
|
16
22
|
* codes: [{
|
|
17
|
-
* code: "
|
|
18
|
-
* description: "
|
|
23
|
+
* code: "E11.65",
|
|
24
|
+
* description: "Type 2 diabetes mellitus with hyperglycemia",
|
|
19
25
|
* valid: true
|
|
20
26
|
* }]
|
|
21
|
-
* }
|
|
27
|
+
* },
|
|
28
|
+
* detail: "Expected code E11.65 because the text mentions hyperglycemia"
|
|
22
29
|
* }
|
|
23
30
|
*/
|
|
24
31
|
export interface FeedbackRequest {
|
|
@@ -4,7 +4,24 @@ import type * as phenoml from "../../../../index.mjs";
|
|
|
4
4
|
* {
|
|
5
5
|
* name: "CUSTOM_CODES",
|
|
6
6
|
* version: "1.0",
|
|
7
|
-
* format: "
|
|
7
|
+
* format: "json",
|
|
8
|
+
* codes: [{
|
|
9
|
+
* code: "X001",
|
|
10
|
+
* description: "Example custom code 1"
|
|
11
|
+
* }, {
|
|
12
|
+
* code: "X002",
|
|
13
|
+
* description: "Example custom code 2"
|
|
14
|
+
* }]
|
|
15
|
+
* }
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* {
|
|
19
|
+
* name: "CUSTOM_CODES",
|
|
20
|
+
* version: "1.0",
|
|
21
|
+
* format: "csv",
|
|
22
|
+
* file: "Y29kZSxkZXNjcmlwdGlvbgpYMDAxLEV4YW1wbGUgY3VzdG9tIGNvZGUgMQo=",
|
|
23
|
+
* code_col: "code",
|
|
24
|
+
* desc_col: "description"
|
|
8
25
|
* }
|
|
9
26
|
*/
|
|
10
27
|
export interface UploadRequest {
|