phenoml 12.3.0 → 12.4.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.js +2 -2
- package/dist/cjs/api/resources/construe/types/CodeCategory.d.ts +9 -0
- package/dist/cjs/api/resources/construe/types/CodeCategory.js +3 -0
- package/dist/cjs/api/resources/construe/types/ExtractRequestConfig.d.ts +10 -1
- package/dist/cjs/api/resources/construe/types/ExtractRequestConfig.js +5 -0
- package/dist/cjs/api/resources/construe/types/ExtractedCodeResult.d.ts +5 -0
- package/dist/cjs/api/resources/construe/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/construe/types/index.js +1 -0
- package/dist/cjs/api/resources/lang2Fhir/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +1 -1
- package/dist/cjs/api/resources/lang2Fhir/client/requests/CreateMultiRequest.d.ts +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/construe/types/CodeCategory.d.mts +9 -0
- package/dist/esm/api/resources/construe/types/CodeCategory.mjs +2 -0
- package/dist/esm/api/resources/construe/types/ExtractRequestConfig.d.mts +10 -1
- package/dist/esm/api/resources/construe/types/ExtractRequestConfig.mjs +5 -0
- package/dist/esm/api/resources/construe/types/ExtractedCodeResult.d.mts +5 -0
- package/dist/esm/api/resources/construe/types/index.d.mts +1 -0
- package/dist/esm/api/resources/construe/types/index.mjs +1 -0
- package/dist/esm/api/resources/lang2Fhir/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +1 -1
- package/dist/esm/api/resources/lang2Fhir/client/requests/CreateMultiRequest.d.mts +1 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +1 -1
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "phenoml",
|
|
46
|
-
"X-Fern-SDK-Version": "12.
|
|
47
|
-
"User-Agent": "phenoml/12.
|
|
46
|
+
"X-Fern-SDK-Version": "12.4.0",
|
|
47
|
+
"User-Agent": "phenoml/12.4.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -6,6 +6,10 @@ export interface ExtractRequestConfig {
|
|
|
6
6
|
* * paragraphs / topics / soap_note - LLM-based chunking.
|
|
7
7
|
* * clinical_ner_extract - Extract clinical concepts (problems, tests,
|
|
8
8
|
* treatments) and use each as a chunk (supports citations).
|
|
9
|
+
* * fasthpocr - Extract HPO concepts directly with category
|
|
10
|
+
* annotations (supports citations). Requires `system: HPO`;
|
|
11
|
+
* other systems are rejected. Causes most other config options
|
|
12
|
+
* to be ignored.
|
|
9
13
|
*/
|
|
10
14
|
chunking_method?: ExtractRequestConfig.ChunkingMethod | undefined;
|
|
11
15
|
/**
|
|
@@ -39,7 +43,7 @@ export interface ExtractRequestConfig {
|
|
|
39
43
|
/**
|
|
40
44
|
* Whether to include source text citations for each extracted code.
|
|
41
45
|
* Citations show the exact text spans (with character offsets) that led to each code.
|
|
42
|
-
* Supported when chunking_method is "sentences" or "
|
|
46
|
+
* Supported when chunking_method is "sentences", "clinical_ner_extract", or "fasthpocr".
|
|
43
47
|
*/
|
|
44
48
|
include_citations?: boolean | undefined;
|
|
45
49
|
/**
|
|
@@ -78,6 +82,10 @@ export declare namespace ExtractRequestConfig {
|
|
|
78
82
|
* * paragraphs / topics / soap_note - LLM-based chunking.
|
|
79
83
|
* * clinical_ner_extract - Extract clinical concepts (problems, tests,
|
|
80
84
|
* treatments) and use each as a chunk (supports citations).
|
|
85
|
+
* * fasthpocr - Extract HPO concepts directly with category
|
|
86
|
+
* annotations (supports citations). Requires `system: HPO`;
|
|
87
|
+
* other systems are rejected. Causes most other config options
|
|
88
|
+
* to be ignored.
|
|
81
89
|
*/
|
|
82
90
|
const ChunkingMethod: {
|
|
83
91
|
readonly None: "none";
|
|
@@ -86,6 +94,7 @@ export declare namespace ExtractRequestConfig {
|
|
|
86
94
|
readonly Topics: "topics";
|
|
87
95
|
readonly SoapNote: "soap_note";
|
|
88
96
|
readonly ClinicalNerExtract: "clinical_ner_extract";
|
|
97
|
+
readonly Fasthpocr: "fasthpocr";
|
|
89
98
|
};
|
|
90
99
|
type ChunkingMethod = (typeof ChunkingMethod)[keyof typeof ChunkingMethod];
|
|
91
100
|
/**
|
|
@@ -11,6 +11,10 @@ var ExtractRequestConfig;
|
|
|
11
11
|
* * paragraphs / topics / soap_note - LLM-based chunking.
|
|
12
12
|
* * clinical_ner_extract - Extract clinical concepts (problems, tests,
|
|
13
13
|
* treatments) and use each as a chunk (supports citations).
|
|
14
|
+
* * fasthpocr - Extract HPO concepts directly with category
|
|
15
|
+
* annotations (supports citations). Requires `system: HPO`;
|
|
16
|
+
* other systems are rejected. Causes most other config options
|
|
17
|
+
* to be ignored.
|
|
14
18
|
*/
|
|
15
19
|
ExtractRequestConfig.ChunkingMethod = {
|
|
16
20
|
None: "none",
|
|
@@ -19,6 +23,7 @@ var ExtractRequestConfig;
|
|
|
19
23
|
Topics: "topics",
|
|
20
24
|
SoapNote: "soap_note",
|
|
21
25
|
ClinicalNerExtract: "clinical_ner_extract",
|
|
26
|
+
Fasthpocr: "fasthpocr",
|
|
22
27
|
};
|
|
23
28
|
/**
|
|
24
29
|
* Method for validating extracted codes:
|
|
@@ -19,4 +19,9 @@ export interface ExtractedCodeResult {
|
|
|
19
19
|
* Ancestor codes do not receive citations.
|
|
20
20
|
*/
|
|
21
21
|
citations?: phenoml.construe.Citation[] | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Higher-level groupings the extracted code belongs to (e.g. HPO category terms).
|
|
24
|
+
* Only populated by full-extraction chunking methods such as "fasthpocr".
|
|
25
|
+
*/
|
|
26
|
+
categories?: phenoml.construe.CodeCategory[] | undefined;
|
|
22
27
|
}
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./Citation.js"), exports);
|
|
18
|
+
__exportStar(require("./CodeCategory.js"), exports);
|
|
18
19
|
__exportStar(require("./CodeResponse.js"), exports);
|
|
19
20
|
__exportStar(require("./CodeSystemDetails.js"), exports);
|
|
20
21
|
__exportStar(require("./CodeSystemInfo.js"), exports);
|
|
@@ -43,7 +43,7 @@ export declare class Lang2FhirClient {
|
|
|
43
43
|
*
|
|
44
44
|
* @example
|
|
45
45
|
* await client.lang2Fhir.createMulti({
|
|
46
|
-
* text: "John Smith,
|
|
46
|
+
* text: "John Smith, male born on 1980-03-12, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily."
|
|
47
47
|
* })
|
|
48
48
|
*/
|
|
49
49
|
createMulti(request: phenoml.lang2Fhir.CreateMultiRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.CreateMultiResponse>;
|
|
@@ -130,7 +130,7 @@ class Lang2FhirClient {
|
|
|
130
130
|
*
|
|
131
131
|
* @example
|
|
132
132
|
* await client.lang2Fhir.createMulti({
|
|
133
|
-
* text: "John Smith,
|
|
133
|
+
* text: "John Smith, male born on 1980-03-12, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily."
|
|
134
134
|
* })
|
|
135
135
|
*/
|
|
136
136
|
createMulti(request, requestOptions) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* text: "John Smith,
|
|
4
|
+
* text: "John Smith, male born on 1980-03-12, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily."
|
|
5
5
|
* }
|
|
6
6
|
*/
|
|
7
7
|
export interface CreateMultiRequest {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "12.
|
|
1
|
+
export declare const SDK_VERSION = "12.4.0";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "phenoml",
|
|
9
|
-
"X-Fern-SDK-Version": "12.
|
|
10
|
-
"User-Agent": "phenoml/12.
|
|
9
|
+
"X-Fern-SDK-Version": "12.4.0",
|
|
10
|
+
"User-Agent": "phenoml/12.4.0",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -6,6 +6,10 @@ export interface ExtractRequestConfig {
|
|
|
6
6
|
* * paragraphs / topics / soap_note - LLM-based chunking.
|
|
7
7
|
* * clinical_ner_extract - Extract clinical concepts (problems, tests,
|
|
8
8
|
* treatments) and use each as a chunk (supports citations).
|
|
9
|
+
* * fasthpocr - Extract HPO concepts directly with category
|
|
10
|
+
* annotations (supports citations). Requires `system: HPO`;
|
|
11
|
+
* other systems are rejected. Causes most other config options
|
|
12
|
+
* to be ignored.
|
|
9
13
|
*/
|
|
10
14
|
chunking_method?: ExtractRequestConfig.ChunkingMethod | undefined;
|
|
11
15
|
/**
|
|
@@ -39,7 +43,7 @@ export interface ExtractRequestConfig {
|
|
|
39
43
|
/**
|
|
40
44
|
* Whether to include source text citations for each extracted code.
|
|
41
45
|
* Citations show the exact text spans (with character offsets) that led to each code.
|
|
42
|
-
* Supported when chunking_method is "sentences" or "
|
|
46
|
+
* Supported when chunking_method is "sentences", "clinical_ner_extract", or "fasthpocr".
|
|
43
47
|
*/
|
|
44
48
|
include_citations?: boolean | undefined;
|
|
45
49
|
/**
|
|
@@ -78,6 +82,10 @@ export declare namespace ExtractRequestConfig {
|
|
|
78
82
|
* * paragraphs / topics / soap_note - LLM-based chunking.
|
|
79
83
|
* * clinical_ner_extract - Extract clinical concepts (problems, tests,
|
|
80
84
|
* treatments) and use each as a chunk (supports citations).
|
|
85
|
+
* * fasthpocr - Extract HPO concepts directly with category
|
|
86
|
+
* annotations (supports citations). Requires `system: HPO`;
|
|
87
|
+
* other systems are rejected. Causes most other config options
|
|
88
|
+
* to be ignored.
|
|
81
89
|
*/
|
|
82
90
|
const ChunkingMethod: {
|
|
83
91
|
readonly None: "none";
|
|
@@ -86,6 +94,7 @@ export declare namespace ExtractRequestConfig {
|
|
|
86
94
|
readonly Topics: "topics";
|
|
87
95
|
readonly SoapNote: "soap_note";
|
|
88
96
|
readonly ClinicalNerExtract: "clinical_ner_extract";
|
|
97
|
+
readonly Fasthpocr: "fasthpocr";
|
|
89
98
|
};
|
|
90
99
|
type ChunkingMethod = (typeof ChunkingMethod)[keyof typeof ChunkingMethod];
|
|
91
100
|
/**
|
|
@@ -8,6 +8,10 @@ export var ExtractRequestConfig;
|
|
|
8
8
|
* * paragraphs / topics / soap_note - LLM-based chunking.
|
|
9
9
|
* * clinical_ner_extract - Extract clinical concepts (problems, tests,
|
|
10
10
|
* treatments) and use each as a chunk (supports citations).
|
|
11
|
+
* * fasthpocr - Extract HPO concepts directly with category
|
|
12
|
+
* annotations (supports citations). Requires `system: HPO`;
|
|
13
|
+
* other systems are rejected. Causes most other config options
|
|
14
|
+
* to be ignored.
|
|
11
15
|
*/
|
|
12
16
|
ExtractRequestConfig.ChunkingMethod = {
|
|
13
17
|
None: "none",
|
|
@@ -16,6 +20,7 @@ export var ExtractRequestConfig;
|
|
|
16
20
|
Topics: "topics",
|
|
17
21
|
SoapNote: "soap_note",
|
|
18
22
|
ClinicalNerExtract: "clinical_ner_extract",
|
|
23
|
+
Fasthpocr: "fasthpocr",
|
|
19
24
|
};
|
|
20
25
|
/**
|
|
21
26
|
* Method for validating extracted codes:
|
|
@@ -19,4 +19,9 @@ export interface ExtractedCodeResult {
|
|
|
19
19
|
* Ancestor codes do not receive citations.
|
|
20
20
|
*/
|
|
21
21
|
citations?: phenoml.construe.Citation[] | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Higher-level groupings the extracted code belongs to (e.g. HPO category terms).
|
|
24
|
+
* Only populated by full-extraction chunking methods such as "fasthpocr".
|
|
25
|
+
*/
|
|
26
|
+
categories?: phenoml.construe.CodeCategory[] | undefined;
|
|
22
27
|
}
|
|
@@ -43,7 +43,7 @@ export declare class Lang2FhirClient {
|
|
|
43
43
|
*
|
|
44
44
|
* @example
|
|
45
45
|
* await client.lang2Fhir.createMulti({
|
|
46
|
-
* text: "John Smith,
|
|
46
|
+
* text: "John Smith, male born on 1980-03-12, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily."
|
|
47
47
|
* })
|
|
48
48
|
*/
|
|
49
49
|
createMulti(request: phenoml.lang2Fhir.CreateMultiRequest, requestOptions?: Lang2FhirClient.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.CreateMultiResponse>;
|
|
@@ -94,7 +94,7 @@ export class Lang2FhirClient {
|
|
|
94
94
|
*
|
|
95
95
|
* @example
|
|
96
96
|
* await client.lang2Fhir.createMulti({
|
|
97
|
-
* text: "John Smith,
|
|
97
|
+
* text: "John Smith, male born on 1980-03-12, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily."
|
|
98
98
|
* })
|
|
99
99
|
*/
|
|
100
100
|
createMulti(request, requestOptions) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* text: "John Smith,
|
|
4
|
+
* text: "John Smith, male born on 1980-03-12, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily."
|
|
5
5
|
* }
|
|
6
6
|
*/
|
|
7
7
|
export interface CreateMultiRequest {
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "12.
|
|
1
|
+
export declare const SDK_VERSION = "12.4.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "12.
|
|
1
|
+
export const SDK_VERSION = "12.4.0";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -3256,7 +3256,7 @@ Resources are linked with proper references (e.g., Conditions reference the Pati
|
|
|
3256
3256
|
|
|
3257
3257
|
```typescript
|
|
3258
3258
|
await client.lang2Fhir.createMulti({
|
|
3259
|
-
text: "John Smith,
|
|
3259
|
+
text: "John Smith, male born on 1980-03-12, diagnosed with Type 2 Diabetes. Prescribed Metformin 500mg twice daily."
|
|
3260
3260
|
});
|
|
3261
3261
|
|
|
3262
3262
|
```
|