phenoml 5.1.0 → 5.2.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/Client.js +2 -2
- package/dist/cjs/api/resources/construe/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/construe/client/Client.js +4 -2
- package/dist/cjs/api/resources/construe/client/requests/index.d.ts +0 -1
- package/dist/cjs/api/resources/construe/types/GetCodeSystemDetailResponse.d.ts +21 -2
- package/dist/cjs/api/resources/construe/types/GetCodeSystemDetailResponse.js +15 -0
- package/dist/cjs/api/resources/construe/types/UploadRequest.d.ts +10 -0
- package/dist/cjs/api/resources/construe/types/UploadRequest.js +3 -0
- package/dist/cjs/api/resources/construe/types/UploadRequestCsv.d.ts +32 -0
- package/dist/cjs/api/resources/construe/types/UploadRequestCsv.js +3 -0
- package/dist/cjs/api/resources/construe/types/UploadRequestJson.d.ts +40 -0
- package/dist/cjs/api/resources/construe/types/UploadRequestJson.js +3 -0
- package/dist/cjs/api/resources/construe/types/index.d.ts +3 -0
- package/dist/cjs/api/resources/construe/types/index.js +3 -0
- 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/construe/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/construe/client/Client.mjs +4 -2
- package/dist/esm/api/resources/construe/client/requests/index.d.mts +0 -1
- package/dist/esm/api/resources/construe/types/GetCodeSystemDetailResponse.d.mts +21 -2
- package/dist/esm/api/resources/construe/types/GetCodeSystemDetailResponse.mjs +14 -1
- package/dist/esm/api/resources/construe/types/UploadRequest.d.mts +10 -0
- package/dist/esm/api/resources/construe/types/UploadRequest.mjs +2 -0
- package/dist/esm/api/resources/construe/types/UploadRequestCsv.d.mts +32 -0
- package/dist/esm/api/resources/construe/types/UploadRequestCsv.mjs +2 -0
- package/dist/esm/api/resources/construe/types/UploadRequestJson.d.mts +40 -0
- package/dist/esm/api/resources/construe/types/UploadRequestJson.mjs +2 -0
- package/dist/esm/api/resources/construe/types/index.d.mts +3 -0
- package/dist/esm/api/resources/construe/types/index.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +5 -3
- package/dist/cjs/api/resources/construe/client/requests/UploadRequest.d.ts +0 -45
- package/dist/cjs/api/resources/construe/client/requests/UploadRequest.js +0 -12
- package/dist/esm/api/resources/construe/client/requests/UploadRequest.d.mts +0 -45
- package/dist/esm/api/resources/construe/client/requests/UploadRequest.mjs +0 -9
package/dist/cjs/Client.js
CHANGED
|
@@ -52,8 +52,8 @@ class phenomlClient {
|
|
|
52
52
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
53
53
|
"X-Fern-Language": "JavaScript",
|
|
54
54
|
"X-Fern-SDK-Name": "phenoml",
|
|
55
|
-
"X-Fern-SDK-Version": "5.
|
|
56
|
-
"User-Agent": "phenoml/5.
|
|
55
|
+
"X-Fern-SDK-Version": "5.2.0",
|
|
56
|
+
"User-Agent": "phenoml/5.2.0",
|
|
57
57
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
58
58
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
59
59
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -27,10 +27,12 @@ export declare class Construe {
|
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* await client.construe.uploadCodeSystem({
|
|
30
|
+
* format: "csv",
|
|
30
31
|
* name: "CUSTOM_CODES",
|
|
31
32
|
* version: "1.0",
|
|
32
|
-
*
|
|
33
|
-
*
|
|
33
|
+
* file: "file",
|
|
34
|
+
* code_col: "code",
|
|
35
|
+
* desc_col: "description"
|
|
34
36
|
* })
|
|
35
37
|
*/
|
|
36
38
|
uploadCodeSystem(request: phenoml.construe.UploadRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ConstrueUploadCodeSystemResponse>;
|
|
@@ -70,10 +70,12 @@ class Construe {
|
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
72
72
|
* await client.construe.uploadCodeSystem({
|
|
73
|
+
* format: "csv",
|
|
73
74
|
* name: "CUSTOM_CODES",
|
|
74
75
|
* version: "1.0",
|
|
75
|
-
*
|
|
76
|
-
*
|
|
76
|
+
* file: "file",
|
|
77
|
+
* code_col: "code",
|
|
78
|
+
* desc_col: "description"
|
|
77
79
|
* })
|
|
78
80
|
*/
|
|
79
81
|
uploadCodeSystem(request, requestOptions) {
|
|
@@ -5,4 +5,3 @@ export type { GetConstrueCodesCodesystemRequest } from "./GetConstrueCodesCodesy
|
|
|
5
5
|
export type { GetConstrueCodesCodesystemSearchSemanticRequest } from "./GetConstrueCodesCodesystemSearchSemanticRequest.js";
|
|
6
6
|
export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.js";
|
|
7
7
|
export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.js";
|
|
8
|
-
export type { UploadRequest } from "./UploadRequest.js";
|
|
@@ -7,10 +7,29 @@ export interface GetCodeSystemDetailResponse {
|
|
|
7
7
|
code_count: number;
|
|
8
8
|
/** Whether this is a built-in system (vs custom uploaded) */
|
|
9
9
|
builtin: boolean;
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Processing status of the code system.
|
|
12
|
+
* - "processing": embeddings are being generated (async upload in progress)
|
|
13
|
+
* - "ready": code system is ready for use
|
|
14
|
+
* - "failed": async processing failed (re-upload with replace=true to retry)
|
|
15
|
+
*/
|
|
16
|
+
status: GetCodeSystemDetailResponse.Status;
|
|
12
17
|
/** When the code system was created */
|
|
13
18
|
created_at: string;
|
|
14
19
|
/** When the code system was last updated */
|
|
15
20
|
updated_at: string;
|
|
16
21
|
}
|
|
22
|
+
export declare namespace GetCodeSystemDetailResponse {
|
|
23
|
+
/**
|
|
24
|
+
* Processing status of the code system.
|
|
25
|
+
* - "processing": embeddings are being generated (async upload in progress)
|
|
26
|
+
* - "ready": code system is ready for use
|
|
27
|
+
* - "failed": async processing failed (re-upload with replace=true to retry)
|
|
28
|
+
*/
|
|
29
|
+
const Status: {
|
|
30
|
+
readonly Processing: "processing";
|
|
31
|
+
readonly Ready: "ready";
|
|
32
|
+
readonly Failed: "failed";
|
|
33
|
+
};
|
|
34
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
35
|
+
}
|
|
@@ -1,3 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.GetCodeSystemDetailResponse = void 0;
|
|
5
|
+
var GetCodeSystemDetailResponse;
|
|
6
|
+
(function (GetCodeSystemDetailResponse) {
|
|
7
|
+
/**
|
|
8
|
+
* Processing status of the code system.
|
|
9
|
+
* - "processing": embeddings are being generated (async upload in progress)
|
|
10
|
+
* - "ready": code system is ready for use
|
|
11
|
+
* - "failed": async processing failed (re-upload with replace=true to retry)
|
|
12
|
+
*/
|
|
13
|
+
GetCodeSystemDetailResponse.Status = {
|
|
14
|
+
Processing: "processing",
|
|
15
|
+
Ready: "ready",
|
|
16
|
+
Failed: "failed",
|
|
17
|
+
};
|
|
18
|
+
})(GetCodeSystemDetailResponse || (exports.GetCodeSystemDetailResponse = GetCodeSystemDetailResponse = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as phenoml from "../../../index.js";
|
|
2
|
+
export type UploadRequest = phenoml.construe.UploadRequest.Csv | phenoml.construe.UploadRequest.Json;
|
|
3
|
+
export declare namespace UploadRequest {
|
|
4
|
+
interface Csv extends phenoml.construe.UploadRequestCsv {
|
|
5
|
+
format: "csv";
|
|
6
|
+
}
|
|
7
|
+
interface Json extends phenoml.construe.UploadRequestJson {
|
|
8
|
+
format: "json";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface UploadRequestCsv {
|
|
2
|
+
/**
|
|
3
|
+
* Name of the code system. Names are case-insensitive and stored uppercase.
|
|
4
|
+
* Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
|
|
5
|
+
* reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
|
|
6
|
+
*/
|
|
7
|
+
name: string;
|
|
8
|
+
/** Version of the code system */
|
|
9
|
+
version: string;
|
|
10
|
+
/** Optional revision number */
|
|
11
|
+
revision?: number;
|
|
12
|
+
/** The CSV file contents as a base64-encoded string. */
|
|
13
|
+
file: string;
|
|
14
|
+
/** Column name containing codes */
|
|
15
|
+
code_col: string;
|
|
16
|
+
/** Column name containing descriptions */
|
|
17
|
+
desc_col: string;
|
|
18
|
+
/** Optional column name containing long definitions */
|
|
19
|
+
defn_col?: string;
|
|
20
|
+
/**
|
|
21
|
+
* If true, replaces an existing code system with the same name and version.
|
|
22
|
+
* Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
|
|
23
|
+
* When false (default), uploading a duplicate returns 409 Conflict.
|
|
24
|
+
*/
|
|
25
|
+
replace?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* If true, returns 202 Accepted immediately after validation and starts processing
|
|
28
|
+
* in the background. Poll GET /construe/codes/systems/{name}?version={version} to
|
|
29
|
+
* check when status transitions from "processing" to "ready" or "failed".
|
|
30
|
+
*/
|
|
31
|
+
async?: boolean;
|
|
32
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type * as phenoml from "../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Upload codes in JSON format. Either 'file' or 'codes' must be provided.
|
|
4
|
+
* If both are provided, 'codes' takes precedence.
|
|
5
|
+
*/
|
|
6
|
+
export interface UploadRequestJson {
|
|
7
|
+
/**
|
|
8
|
+
* Name of the code system. Names are case-insensitive and stored uppercase.
|
|
9
|
+
* Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
|
|
10
|
+
* reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/** Version of the code system */
|
|
14
|
+
version: string;
|
|
15
|
+
/** Optional revision number */
|
|
16
|
+
revision?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The file contents as a base64-encoded JSON array string.
|
|
19
|
+
* Prefer using 'codes' instead to pass the array directly without base64 encoding.
|
|
20
|
+
*/
|
|
21
|
+
file?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The codes to upload as a JSON array.
|
|
24
|
+
* This is the preferred way to upload JSON codes, as it avoids unnecessary base64 encoding.
|
|
25
|
+
* If both 'codes' and 'file' are provided, 'codes' takes precedence.
|
|
26
|
+
*/
|
|
27
|
+
codes?: phenoml.construe.CodeResponse[];
|
|
28
|
+
/**
|
|
29
|
+
* If true, replaces an existing code system with the same name and version.
|
|
30
|
+
* Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
|
|
31
|
+
* When false (default), uploading a duplicate returns 409 Conflict.
|
|
32
|
+
*/
|
|
33
|
+
replace?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* If true, returns 202 Accepted immediately after validation and starts processing
|
|
36
|
+
* in the background. Poll GET /construe/codes/systems/{name}?version={version} to
|
|
37
|
+
* check when status transitions from "processing" to "ready" or "failed".
|
|
38
|
+
*/
|
|
39
|
+
async?: boolean;
|
|
40
|
+
}
|
|
@@ -16,3 +16,6 @@ export * from "./SemanticSearchResponse.js";
|
|
|
16
16
|
export * from "./SemanticSearchResult.js";
|
|
17
17
|
export * from "./TextSearchResponse.js";
|
|
18
18
|
export * from "./TextSearchResult.js";
|
|
19
|
+
export * from "./UploadRequest.js";
|
|
20
|
+
export * from "./UploadRequestCsv.js";
|
|
21
|
+
export * from "./UploadRequestJson.js";
|
|
@@ -32,3 +32,6 @@ __exportStar(require("./SemanticSearchResponse.js"), exports);
|
|
|
32
32
|
__exportStar(require("./SemanticSearchResult.js"), exports);
|
|
33
33
|
__exportStar(require("./TextSearchResponse.js"), exports);
|
|
34
34
|
__exportStar(require("./TextSearchResult.js"), exports);
|
|
35
|
+
__exportStar(require("./UploadRequest.js"), exports);
|
|
36
|
+
__exportStar(require("./UploadRequestCsv.js"), exports);
|
|
37
|
+
__exportStar(require("./UploadRequestJson.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "5.
|
|
1
|
+
export declare const SDK_VERSION = "5.2.0";
|
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), { headers: mergeHeaders({
|
|
17
17
|
"X-Fern-Language": "JavaScript",
|
|
18
18
|
"X-Fern-SDK-Name": "phenoml",
|
|
19
|
-
"X-Fern-SDK-Version": "5.
|
|
20
|
-
"User-Agent": "phenoml/5.
|
|
19
|
+
"X-Fern-SDK-Version": "5.2.0",
|
|
20
|
+
"User-Agent": "phenoml/5.2.0",
|
|
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) });
|
|
@@ -27,10 +27,12 @@ export declare class Construe {
|
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* await client.construe.uploadCodeSystem({
|
|
30
|
+
* format: "csv",
|
|
30
31
|
* name: "CUSTOM_CODES",
|
|
31
32
|
* version: "1.0",
|
|
32
|
-
*
|
|
33
|
-
*
|
|
33
|
+
* file: "file",
|
|
34
|
+
* code_col: "code",
|
|
35
|
+
* desc_col: "description"
|
|
34
36
|
* })
|
|
35
37
|
*/
|
|
36
38
|
uploadCodeSystem(request: phenoml.construe.UploadRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ConstrueUploadCodeSystemResponse>;
|
|
@@ -34,10 +34,12 @@ export class Construe {
|
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
36
|
* await client.construe.uploadCodeSystem({
|
|
37
|
+
* format: "csv",
|
|
37
38
|
* name: "CUSTOM_CODES",
|
|
38
39
|
* version: "1.0",
|
|
39
|
-
*
|
|
40
|
-
*
|
|
40
|
+
* file: "file",
|
|
41
|
+
* code_col: "code",
|
|
42
|
+
* desc_col: "description"
|
|
41
43
|
* })
|
|
42
44
|
*/
|
|
43
45
|
uploadCodeSystem(request, requestOptions) {
|
|
@@ -5,4 +5,3 @@ export type { GetConstrueCodesCodesystemRequest } from "./GetConstrueCodesCodesy
|
|
|
5
5
|
export type { GetConstrueCodesCodesystemSearchSemanticRequest } from "./GetConstrueCodesCodesystemSearchSemanticRequest.mjs";
|
|
6
6
|
export type { GetConstrueCodesCodesystemSearchTextRequest } from "./GetConstrueCodesCodesystemSearchTextRequest.mjs";
|
|
7
7
|
export type { GetConstrueCodesSystemsCodesystemRequest } from "./GetConstrueCodesSystemsCodesystemRequest.mjs";
|
|
8
|
-
export type { UploadRequest } from "./UploadRequest.mjs";
|
|
@@ -7,10 +7,29 @@ export interface GetCodeSystemDetailResponse {
|
|
|
7
7
|
code_count: number;
|
|
8
8
|
/** Whether this is a built-in system (vs custom uploaded) */
|
|
9
9
|
builtin: boolean;
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Processing status of the code system.
|
|
12
|
+
* - "processing": embeddings are being generated (async upload in progress)
|
|
13
|
+
* - "ready": code system is ready for use
|
|
14
|
+
* - "failed": async processing failed (re-upload with replace=true to retry)
|
|
15
|
+
*/
|
|
16
|
+
status: GetCodeSystemDetailResponse.Status;
|
|
12
17
|
/** When the code system was created */
|
|
13
18
|
created_at: string;
|
|
14
19
|
/** When the code system was last updated */
|
|
15
20
|
updated_at: string;
|
|
16
21
|
}
|
|
22
|
+
export declare namespace GetCodeSystemDetailResponse {
|
|
23
|
+
/**
|
|
24
|
+
* Processing status of the code system.
|
|
25
|
+
* - "processing": embeddings are being generated (async upload in progress)
|
|
26
|
+
* - "ready": code system is ready for use
|
|
27
|
+
* - "failed": async processing failed (re-upload with replace=true to retry)
|
|
28
|
+
*/
|
|
29
|
+
const Status: {
|
|
30
|
+
readonly Processing: "processing";
|
|
31
|
+
readonly Ready: "ready";
|
|
32
|
+
readonly Failed: "failed";
|
|
33
|
+
};
|
|
34
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
35
|
+
}
|
|
@@ -1,2 +1,15 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export
|
|
2
|
+
export var GetCodeSystemDetailResponse;
|
|
3
|
+
(function (GetCodeSystemDetailResponse) {
|
|
4
|
+
/**
|
|
5
|
+
* Processing status of the code system.
|
|
6
|
+
* - "processing": embeddings are being generated (async upload in progress)
|
|
7
|
+
* - "ready": code system is ready for use
|
|
8
|
+
* - "failed": async processing failed (re-upload with replace=true to retry)
|
|
9
|
+
*/
|
|
10
|
+
GetCodeSystemDetailResponse.Status = {
|
|
11
|
+
Processing: "processing",
|
|
12
|
+
Ready: "ready",
|
|
13
|
+
Failed: "failed",
|
|
14
|
+
};
|
|
15
|
+
})(GetCodeSystemDetailResponse || (GetCodeSystemDetailResponse = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type * as phenoml from "../../../index.mjs";
|
|
2
|
+
export type UploadRequest = phenoml.construe.UploadRequest.Csv | phenoml.construe.UploadRequest.Json;
|
|
3
|
+
export declare namespace UploadRequest {
|
|
4
|
+
interface Csv extends phenoml.construe.UploadRequestCsv {
|
|
5
|
+
format: "csv";
|
|
6
|
+
}
|
|
7
|
+
interface Json extends phenoml.construe.UploadRequestJson {
|
|
8
|
+
format: "json";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export interface UploadRequestCsv {
|
|
2
|
+
/**
|
|
3
|
+
* Name of the code system. Names are case-insensitive and stored uppercase.
|
|
4
|
+
* Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
|
|
5
|
+
* reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
|
|
6
|
+
*/
|
|
7
|
+
name: string;
|
|
8
|
+
/** Version of the code system */
|
|
9
|
+
version: string;
|
|
10
|
+
/** Optional revision number */
|
|
11
|
+
revision?: number;
|
|
12
|
+
/** The CSV file contents as a base64-encoded string. */
|
|
13
|
+
file: string;
|
|
14
|
+
/** Column name containing codes */
|
|
15
|
+
code_col: string;
|
|
16
|
+
/** Column name containing descriptions */
|
|
17
|
+
desc_col: string;
|
|
18
|
+
/** Optional column name containing long definitions */
|
|
19
|
+
defn_col?: string;
|
|
20
|
+
/**
|
|
21
|
+
* If true, replaces an existing code system with the same name and version.
|
|
22
|
+
* Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
|
|
23
|
+
* When false (default), uploading a duplicate returns 409 Conflict.
|
|
24
|
+
*/
|
|
25
|
+
replace?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* If true, returns 202 Accepted immediately after validation and starts processing
|
|
28
|
+
* in the background. Poll GET /construe/codes/systems/{name}?version={version} to
|
|
29
|
+
* check when status transitions from "processing" to "ready" or "failed".
|
|
30
|
+
*/
|
|
31
|
+
async?: boolean;
|
|
32
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type * as phenoml from "../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Upload codes in JSON format. Either 'file' or 'codes' must be provided.
|
|
4
|
+
* If both are provided, 'codes' takes precedence.
|
|
5
|
+
*/
|
|
6
|
+
export interface UploadRequestJson {
|
|
7
|
+
/**
|
|
8
|
+
* Name of the code system. Names are case-insensitive and stored uppercase.
|
|
9
|
+
* Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
|
|
10
|
+
* reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/** Version of the code system */
|
|
14
|
+
version: string;
|
|
15
|
+
/** Optional revision number */
|
|
16
|
+
revision?: number;
|
|
17
|
+
/**
|
|
18
|
+
* The file contents as a base64-encoded JSON array string.
|
|
19
|
+
* Prefer using 'codes' instead to pass the array directly without base64 encoding.
|
|
20
|
+
*/
|
|
21
|
+
file?: string;
|
|
22
|
+
/**
|
|
23
|
+
* The codes to upload as a JSON array.
|
|
24
|
+
* This is the preferred way to upload JSON codes, as it avoids unnecessary base64 encoding.
|
|
25
|
+
* If both 'codes' and 'file' are provided, 'codes' takes precedence.
|
|
26
|
+
*/
|
|
27
|
+
codes?: phenoml.construe.CodeResponse[];
|
|
28
|
+
/**
|
|
29
|
+
* If true, replaces an existing code system with the same name and version.
|
|
30
|
+
* Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
|
|
31
|
+
* When false (default), uploading a duplicate returns 409 Conflict.
|
|
32
|
+
*/
|
|
33
|
+
replace?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* If true, returns 202 Accepted immediately after validation and starts processing
|
|
36
|
+
* in the background. Poll GET /construe/codes/systems/{name}?version={version} to
|
|
37
|
+
* check when status transitions from "processing" to "ready" or "failed".
|
|
38
|
+
*/
|
|
39
|
+
async?: boolean;
|
|
40
|
+
}
|
|
@@ -16,3 +16,6 @@ export * from "./SemanticSearchResponse.mjs";
|
|
|
16
16
|
export * from "./SemanticSearchResult.mjs";
|
|
17
17
|
export * from "./TextSearchResponse.mjs";
|
|
18
18
|
export * from "./TextSearchResult.mjs";
|
|
19
|
+
export * from "./UploadRequest.mjs";
|
|
20
|
+
export * from "./UploadRequestCsv.mjs";
|
|
21
|
+
export * from "./UploadRequestJson.mjs";
|
|
@@ -16,3 +16,6 @@ export * from "./SemanticSearchResponse.mjs";
|
|
|
16
16
|
export * from "./SemanticSearchResult.mjs";
|
|
17
17
|
export * from "./TextSearchResponse.mjs";
|
|
18
18
|
export * from "./TextSearchResult.mjs";
|
|
19
|
+
export * from "./UploadRequest.mjs";
|
|
20
|
+
export * from "./UploadRequestCsv.mjs";
|
|
21
|
+
export * from "./UploadRequestJson.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "5.
|
|
1
|
+
export declare const SDK_VERSION = "5.2.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "5.
|
|
1
|
+
export const SDK_VERSION = "5.2.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -1171,10 +1171,12 @@ subsequently use the code system for construe/extract and lang2fhir/create (comi
|
|
|
1171
1171
|
|
|
1172
1172
|
```typescript
|
|
1173
1173
|
await client.construe.uploadCodeSystem({
|
|
1174
|
+
format: "csv",
|
|
1174
1175
|
name: "CUSTOM_CODES",
|
|
1175
1176
|
version: "1.0",
|
|
1176
|
-
|
|
1177
|
-
|
|
1177
|
+
file: "file",
|
|
1178
|
+
code_col: "code",
|
|
1179
|
+
desc_col: "description"
|
|
1178
1180
|
});
|
|
1179
1181
|
|
|
1180
1182
|
```
|
|
@@ -1191,7 +1193,7 @@ await client.construe.uploadCodeSystem({
|
|
|
1191
1193
|
<dl>
|
|
1192
1194
|
<dd>
|
|
1193
1195
|
|
|
1194
|
-
**request:** `phenoml.
|
|
1196
|
+
**request:** `phenoml.UploadRequest`
|
|
1195
1197
|
|
|
1196
1198
|
</dd>
|
|
1197
1199
|
</dl>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {
|
|
4
|
-
* name: "CUSTOM_CODES",
|
|
5
|
-
* version: "1.0",
|
|
6
|
-
* format: "json",
|
|
7
|
-
* file: "file"
|
|
8
|
-
* }
|
|
9
|
-
*/
|
|
10
|
-
export interface UploadRequest {
|
|
11
|
-
/**
|
|
12
|
-
* Name of the code system. Names are case-insensitive and stored uppercase.
|
|
13
|
-
* Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
|
|
14
|
-
* reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
|
|
15
|
-
*/
|
|
16
|
-
name: string;
|
|
17
|
-
/** Version of the code system */
|
|
18
|
-
version: string;
|
|
19
|
-
/** Optional revision number */
|
|
20
|
-
revision?: number;
|
|
21
|
-
/** Format of the uploaded file */
|
|
22
|
-
format: UploadRequest.Format;
|
|
23
|
-
/** The file contents as a base64-encoded string */
|
|
24
|
-
file: string;
|
|
25
|
-
/** Column name containing codes (required for CSV format) */
|
|
26
|
-
code_col?: string;
|
|
27
|
-
/** Column name containing descriptions (required for CSV format) */
|
|
28
|
-
desc_col?: string;
|
|
29
|
-
/** Optional column name containing long definitions (for CSV format) */
|
|
30
|
-
defn_col?: string;
|
|
31
|
-
/**
|
|
32
|
-
* If true, replaces an existing code system with the same name and version.
|
|
33
|
-
* Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
|
|
34
|
-
* When false (default), uploading a duplicate returns 409 Conflict.
|
|
35
|
-
*/
|
|
36
|
-
replace?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export declare namespace UploadRequest {
|
|
39
|
-
/** Format of the uploaded file */
|
|
40
|
-
const Format: {
|
|
41
|
-
readonly Json: "json";
|
|
42
|
-
readonly Csv: "csv";
|
|
43
|
-
};
|
|
44
|
-
type Format = (typeof Format)[keyof typeof Format];
|
|
45
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.UploadRequest = void 0;
|
|
5
|
-
var UploadRequest;
|
|
6
|
-
(function (UploadRequest) {
|
|
7
|
-
/** Format of the uploaded file */
|
|
8
|
-
UploadRequest.Format = {
|
|
9
|
-
Json: "json",
|
|
10
|
-
Csv: "csv",
|
|
11
|
-
};
|
|
12
|
-
})(UploadRequest || (exports.UploadRequest = UploadRequest = {}));
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @example
|
|
3
|
-
* {
|
|
4
|
-
* name: "CUSTOM_CODES",
|
|
5
|
-
* version: "1.0",
|
|
6
|
-
* format: "json",
|
|
7
|
-
* file: "file"
|
|
8
|
-
* }
|
|
9
|
-
*/
|
|
10
|
-
export interface UploadRequest {
|
|
11
|
-
/**
|
|
12
|
-
* Name of the code system. Names are case-insensitive and stored uppercase.
|
|
13
|
-
* Builtin system names (e.g. ICD-10-CM, SNOMED_CT_US_LITE, LOINC, CPT, etc.) are
|
|
14
|
-
* reserved and cannot be used for custom uploads; attempts return HTTP 403 Forbidden.
|
|
15
|
-
*/
|
|
16
|
-
name: string;
|
|
17
|
-
/** Version of the code system */
|
|
18
|
-
version: string;
|
|
19
|
-
/** Optional revision number */
|
|
20
|
-
revision?: number;
|
|
21
|
-
/** Format of the uploaded file */
|
|
22
|
-
format: UploadRequest.Format;
|
|
23
|
-
/** The file contents as a base64-encoded string */
|
|
24
|
-
file: string;
|
|
25
|
-
/** Column name containing codes (required for CSV format) */
|
|
26
|
-
code_col?: string;
|
|
27
|
-
/** Column name containing descriptions (required for CSV format) */
|
|
28
|
-
desc_col?: string;
|
|
29
|
-
/** Optional column name containing long definitions (for CSV format) */
|
|
30
|
-
defn_col?: string;
|
|
31
|
-
/**
|
|
32
|
-
* If true, replaces an existing code system with the same name and version.
|
|
33
|
-
* Builtin systems cannot be replaced; attempts to do so return HTTP 403 Forbidden.
|
|
34
|
-
* When false (default), uploading a duplicate returns 409 Conflict.
|
|
35
|
-
*/
|
|
36
|
-
replace?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export declare namespace UploadRequest {
|
|
39
|
-
/** Format of the uploaded file */
|
|
40
|
-
const Format: {
|
|
41
|
-
readonly Json: "json";
|
|
42
|
-
readonly Csv: "csv";
|
|
43
|
-
};
|
|
44
|
-
type Format = (typeof Format)[keyof typeof Format];
|
|
45
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
export var UploadRequest;
|
|
3
|
-
(function (UploadRequest) {
|
|
4
|
-
/** Format of the uploaded file */
|
|
5
|
-
UploadRequest.Format = {
|
|
6
|
-
Json: "json",
|
|
7
|
-
Csv: "csv",
|
|
8
|
-
};
|
|
9
|
-
})(UploadRequest || (UploadRequest = {}));
|