phenoml 0.0.17 → 0.0.18
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/lang2Fhir/client/Client.d.ts +3 -3
- package/dist/cjs/api/resources/lang2Fhir/client/Client.js +3 -3
- package/dist/cjs/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.ts +3 -3
- package/dist/cjs/api/resources/summary/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/summary/client/Client.js +2 -1
- package/dist/cjs/api/resources/summary/client/requests/CreateSummaryRequest.d.ts +15 -2
- package/dist/cjs/api/resources/summary/client/requests/CreateSummaryRequest.js +2 -0
- package/dist/cjs/api/resources/summary/types/ErrorResponse.d.ts +5 -0
- package/dist/cjs/api/resources/summary/types/ErrorResponse.js +3 -0
- package/dist/cjs/api/resources/summary/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/summary/types/index.js +1 -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/lang2Fhir/client/Client.d.mts +3 -3
- package/dist/esm/api/resources/lang2Fhir/client/Client.mjs +3 -3
- package/dist/esm/api/resources/lang2Fhir/client/requests/ProfileUploadRequest.d.mts +3 -3
- package/dist/esm/api/resources/summary/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/summary/client/Client.mjs +2 -1
- package/dist/esm/api/resources/summary/client/requests/CreateSummaryRequest.d.mts +15 -2
- package/dist/esm/api/resources/summary/client/requests/CreateSummaryRequest.mjs +2 -0
- package/dist/esm/api/resources/summary/types/ErrorResponse.d.mts +5 -0
- package/dist/esm/api/resources/summary/types/ErrorResponse.mjs +2 -0
- package/dist/esm/api/resources/summary/types/index.d.mts +1 -0
- package/dist/esm/api/resources/summary/types/index.mjs +1 -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 -4
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": "0.0.
|
|
56
|
-
"User-Agent": "phenoml/0.0.
|
|
55
|
+
"X-Fern-SDK-Version": "0.0.18",
|
|
56
|
+
"User-Agent": "phenoml/0.0.18",
|
|
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) });
|
|
@@ -60,9 +60,9 @@ export declare class Lang2Fhir {
|
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
62
|
* await client.lang2Fhir.uploadProfile({
|
|
63
|
-
* version: "
|
|
64
|
-
* resource: "
|
|
65
|
-
* profile: "profile"
|
|
63
|
+
* version: "R4",
|
|
64
|
+
* resource: "condition-encounter-diagnosis",
|
|
65
|
+
* profile: "(base64 encoded JSON string of the FHIR profile)"
|
|
66
66
|
* })
|
|
67
67
|
*/
|
|
68
68
|
uploadProfile(request: phenoml.lang2Fhir.ProfileUploadRequest, requestOptions?: Lang2Fhir.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.Lang2FhirUploadProfileResponse>;
|
|
@@ -211,9 +211,9 @@ class Lang2Fhir {
|
|
|
211
211
|
*
|
|
212
212
|
* @example
|
|
213
213
|
* await client.lang2Fhir.uploadProfile({
|
|
214
|
-
* version: "
|
|
215
|
-
* resource: "
|
|
216
|
-
* profile: "profile"
|
|
214
|
+
* version: "R4",
|
|
215
|
+
* resource: "condition-encounter-diagnosis",
|
|
216
|
+
* profile: "(base64 encoded JSON string of the FHIR profile)"
|
|
217
217
|
* })
|
|
218
218
|
*/
|
|
219
219
|
uploadProfile(request, requestOptions) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* version: "
|
|
5
|
-
* resource: "
|
|
6
|
-
* profile: "profile"
|
|
4
|
+
* version: "R4",
|
|
5
|
+
* resource: "condition-encounter-diagnosis",
|
|
6
|
+
* profile: "(base64 encoded JSON string of the FHIR profile)"
|
|
7
7
|
* }
|
|
8
8
|
*/
|
|
9
9
|
export interface ProfileUploadRequest {
|
|
@@ -99,9 +99,10 @@ export declare class Summary {
|
|
|
99
99
|
deleteTemplate(id: string, requestOptions?: Summary.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryDeleteTemplateResponse>;
|
|
100
100
|
private __deleteTemplate;
|
|
101
101
|
/**
|
|
102
|
-
* Creates a summary from FHIR resources using one of
|
|
102
|
+
* Creates a summary from FHIR resources using one of three modes:
|
|
103
103
|
* - **narrative**: Uses a template to substitute FHIR data into placeholders (requires template_id)
|
|
104
104
|
* - **flatten**: Flattens FHIR resources into a searchable format for RAG/search (no template needed)
|
|
105
|
+
* - **ips**: Generates an International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG. Requires a Bundle with exactly one Patient resource (returns 400 error if no Patient or multiple Patients are present). Automatically filters resources to those referencing the patient and generates sections for allergies, medications, problems, immunizations, procedures, and vital signs.
|
|
105
106
|
*
|
|
106
107
|
* @param {phenoml.summary.CreateSummaryRequest} request
|
|
107
108
|
* @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -419,9 +419,10 @@ class Summary {
|
|
|
419
419
|
});
|
|
420
420
|
}
|
|
421
421
|
/**
|
|
422
|
-
* Creates a summary from FHIR resources using one of
|
|
422
|
+
* Creates a summary from FHIR resources using one of three modes:
|
|
423
423
|
* - **narrative**: Uses a template to substitute FHIR data into placeholders (requires template_id)
|
|
424
424
|
* - **flatten**: Flattens FHIR resources into a searchable format for RAG/search (no template needed)
|
|
425
|
+
* - **ips**: Generates an International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG. Requires a Bundle with exactly one Patient resource (returns 400 error if no Patient or multiple Patients are present). Automatically filters resources to those referencing the patient and generates sections for allergies, medications, problems, immunizations, procedures, and vital signs.
|
|
425
426
|
*
|
|
426
427
|
* @param {phenoml.summary.CreateSummaryRequest} request
|
|
427
428
|
* @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12,11 +12,18 @@ export interface CreateSummaryRequest {
|
|
|
12
12
|
* Summary generation mode:
|
|
13
13
|
* - narrative: Substitute FHIR data into a template (requires template_id)
|
|
14
14
|
* - flatten: Flatten FHIR resources for RAG/search (no template needed)
|
|
15
|
+
* - ips: Generate International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG
|
|
15
16
|
*/
|
|
16
17
|
mode?: CreateSummaryRequest.Mode;
|
|
17
18
|
/** ID of the template to use (required for narrative mode) */
|
|
18
19
|
template_id?: string;
|
|
19
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* FHIR resources (single resource or Bundle).
|
|
22
|
+
* For IPS mode, must be a Bundle containing exactly one Patient resource with at least one
|
|
23
|
+
* identifier (id, fullUrl, or identifier field). Returns an error if no Patient is found,
|
|
24
|
+
* if multiple Patients are present, or if the Patient has no identifiers. Resources are
|
|
25
|
+
* automatically filtered to only include those referencing the patient.
|
|
26
|
+
*/
|
|
20
27
|
fhir_resources: CreateSummaryRequest.FhirResources;
|
|
21
28
|
}
|
|
22
29
|
export declare namespace CreateSummaryRequest {
|
|
@@ -24,14 +31,20 @@ export declare namespace CreateSummaryRequest {
|
|
|
24
31
|
* Summary generation mode:
|
|
25
32
|
* - narrative: Substitute FHIR data into a template (requires template_id)
|
|
26
33
|
* - flatten: Flatten FHIR resources for RAG/search (no template needed)
|
|
34
|
+
* - ips: Generate International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG
|
|
27
35
|
*/
|
|
28
36
|
const Mode: {
|
|
29
37
|
readonly Narrative: "narrative";
|
|
30
38
|
readonly Flatten: "flatten";
|
|
39
|
+
readonly Ips: "ips";
|
|
31
40
|
};
|
|
32
41
|
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
33
42
|
/**
|
|
34
|
-
* FHIR resources (single resource or Bundle)
|
|
43
|
+
* FHIR resources (single resource or Bundle).
|
|
44
|
+
* For IPS mode, must be a Bundle containing exactly one Patient resource with at least one
|
|
45
|
+
* identifier (id, fullUrl, or identifier field). Returns an error if no Patient is found,
|
|
46
|
+
* if multiple Patients are present, or if the Patient has no identifiers. Resources are
|
|
47
|
+
* automatically filtered to only include those referencing the patient.
|
|
35
48
|
*/
|
|
36
49
|
type FhirResources = phenoml.summary.FhirResource | phenoml.summary.FhirBundle;
|
|
37
50
|
}
|
|
@@ -8,9 +8,11 @@ var CreateSummaryRequest;
|
|
|
8
8
|
* Summary generation mode:
|
|
9
9
|
* - narrative: Substitute FHIR data into a template (requires template_id)
|
|
10
10
|
* - flatten: Flatten FHIR resources for RAG/search (no template needed)
|
|
11
|
+
* - ips: Generate International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG
|
|
11
12
|
*/
|
|
12
13
|
CreateSummaryRequest.Mode = {
|
|
13
14
|
Narrative: "narrative",
|
|
14
15
|
Flatten: "flatten",
|
|
16
|
+
Ips: "ips",
|
|
15
17
|
};
|
|
16
18
|
})(CreateSummaryRequest || (exports.CreateSummaryRequest = CreateSummaryRequest = {}));
|
|
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./CreateSummaryResponse.js"), exports);
|
|
18
18
|
__exportStar(require("./CreateSummaryTemplateResponse.js"), exports);
|
|
19
|
+
__exportStar(require("./ErrorResponse.js"), exports);
|
|
19
20
|
__exportStar(require("./FhirBundle.js"), exports);
|
|
20
21
|
__exportStar(require("./FhirResource.js"), exports);
|
|
21
22
|
__exportStar(require("./SummaryDeleteTemplateResponse.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.18";
|
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": "0.0.
|
|
20
|
-
"User-Agent": "phenoml/0.0.
|
|
19
|
+
"X-Fern-SDK-Version": "0.0.18",
|
|
20
|
+
"User-Agent": "phenoml/0.0.18",
|
|
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) });
|
|
@@ -60,9 +60,9 @@ export declare class Lang2Fhir {
|
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
62
|
* await client.lang2Fhir.uploadProfile({
|
|
63
|
-
* version: "
|
|
64
|
-
* resource: "
|
|
65
|
-
* profile: "profile"
|
|
63
|
+
* version: "R4",
|
|
64
|
+
* resource: "condition-encounter-diagnosis",
|
|
65
|
+
* profile: "(base64 encoded JSON string of the FHIR profile)"
|
|
66
66
|
* })
|
|
67
67
|
*/
|
|
68
68
|
uploadProfile(request: phenoml.lang2Fhir.ProfileUploadRequest, requestOptions?: Lang2Fhir.RequestOptions): core.HttpResponsePromise<phenoml.lang2Fhir.Lang2FhirUploadProfileResponse>;
|
|
@@ -175,9 +175,9 @@ export class Lang2Fhir {
|
|
|
175
175
|
*
|
|
176
176
|
* @example
|
|
177
177
|
* await client.lang2Fhir.uploadProfile({
|
|
178
|
-
* version: "
|
|
179
|
-
* resource: "
|
|
180
|
-
* profile: "profile"
|
|
178
|
+
* version: "R4",
|
|
179
|
+
* resource: "condition-encounter-diagnosis",
|
|
180
|
+
* profile: "(base64 encoded JSON string of the FHIR profile)"
|
|
181
181
|
* })
|
|
182
182
|
*/
|
|
183
183
|
uploadProfile(request, requestOptions) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
|
-
* version: "
|
|
5
|
-
* resource: "
|
|
6
|
-
* profile: "profile"
|
|
4
|
+
* version: "R4",
|
|
5
|
+
* resource: "condition-encounter-diagnosis",
|
|
6
|
+
* profile: "(base64 encoded JSON string of the FHIR profile)"
|
|
7
7
|
* }
|
|
8
8
|
*/
|
|
9
9
|
export interface ProfileUploadRequest {
|
|
@@ -99,9 +99,10 @@ export declare class Summary {
|
|
|
99
99
|
deleteTemplate(id: string, requestOptions?: Summary.RequestOptions): core.HttpResponsePromise<phenoml.summary.SummaryDeleteTemplateResponse>;
|
|
100
100
|
private __deleteTemplate;
|
|
101
101
|
/**
|
|
102
|
-
* Creates a summary from FHIR resources using one of
|
|
102
|
+
* Creates a summary from FHIR resources using one of three modes:
|
|
103
103
|
* - **narrative**: Uses a template to substitute FHIR data into placeholders (requires template_id)
|
|
104
104
|
* - **flatten**: Flattens FHIR resources into a searchable format for RAG/search (no template needed)
|
|
105
|
+
* - **ips**: Generates an International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG. Requires a Bundle with exactly one Patient resource (returns 400 error if no Patient or multiple Patients are present). Automatically filters resources to those referencing the patient and generates sections for allergies, medications, problems, immunizations, procedures, and vital signs.
|
|
105
106
|
*
|
|
106
107
|
* @param {phenoml.summary.CreateSummaryRequest} request
|
|
107
108
|
* @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -383,9 +383,10 @@ export class Summary {
|
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
/**
|
|
386
|
-
* Creates a summary from FHIR resources using one of
|
|
386
|
+
* Creates a summary from FHIR resources using one of three modes:
|
|
387
387
|
* - **narrative**: Uses a template to substitute FHIR data into placeholders (requires template_id)
|
|
388
388
|
* - **flatten**: Flattens FHIR resources into a searchable format for RAG/search (no template needed)
|
|
389
|
+
* - **ips**: Generates an International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG. Requires a Bundle with exactly one Patient resource (returns 400 error if no Patient or multiple Patients are present). Automatically filters resources to those referencing the patient and generates sections for allergies, medications, problems, immunizations, procedures, and vital signs.
|
|
389
390
|
*
|
|
390
391
|
* @param {phenoml.summary.CreateSummaryRequest} request
|
|
391
392
|
* @param {Summary.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -12,11 +12,18 @@ export interface CreateSummaryRequest {
|
|
|
12
12
|
* Summary generation mode:
|
|
13
13
|
* - narrative: Substitute FHIR data into a template (requires template_id)
|
|
14
14
|
* - flatten: Flatten FHIR resources for RAG/search (no template needed)
|
|
15
|
+
* - ips: Generate International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG
|
|
15
16
|
*/
|
|
16
17
|
mode?: CreateSummaryRequest.Mode;
|
|
17
18
|
/** ID of the template to use (required for narrative mode) */
|
|
18
19
|
template_id?: string;
|
|
19
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* FHIR resources (single resource or Bundle).
|
|
22
|
+
* For IPS mode, must be a Bundle containing exactly one Patient resource with at least one
|
|
23
|
+
* identifier (id, fullUrl, or identifier field). Returns an error if no Patient is found,
|
|
24
|
+
* if multiple Patients are present, or if the Patient has no identifiers. Resources are
|
|
25
|
+
* automatically filtered to only include those referencing the patient.
|
|
26
|
+
*/
|
|
20
27
|
fhir_resources: CreateSummaryRequest.FhirResources;
|
|
21
28
|
}
|
|
22
29
|
export declare namespace CreateSummaryRequest {
|
|
@@ -24,14 +31,20 @@ export declare namespace CreateSummaryRequest {
|
|
|
24
31
|
* Summary generation mode:
|
|
25
32
|
* - narrative: Substitute FHIR data into a template (requires template_id)
|
|
26
33
|
* - flatten: Flatten FHIR resources for RAG/search (no template needed)
|
|
34
|
+
* - ips: Generate International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG
|
|
27
35
|
*/
|
|
28
36
|
const Mode: {
|
|
29
37
|
readonly Narrative: "narrative";
|
|
30
38
|
readonly Flatten: "flatten";
|
|
39
|
+
readonly Ips: "ips";
|
|
31
40
|
};
|
|
32
41
|
type Mode = (typeof Mode)[keyof typeof Mode];
|
|
33
42
|
/**
|
|
34
|
-
* FHIR resources (single resource or Bundle)
|
|
43
|
+
* FHIR resources (single resource or Bundle).
|
|
44
|
+
* For IPS mode, must be a Bundle containing exactly one Patient resource with at least one
|
|
45
|
+
* identifier (id, fullUrl, or identifier field). Returns an error if no Patient is found,
|
|
46
|
+
* if multiple Patients are present, or if the Patient has no identifiers. Resources are
|
|
47
|
+
* automatically filtered to only include those referencing the patient.
|
|
35
48
|
*/
|
|
36
49
|
type FhirResources = phenoml.summary.FhirResource | phenoml.summary.FhirBundle;
|
|
37
50
|
}
|
|
@@ -5,9 +5,11 @@ export var CreateSummaryRequest;
|
|
|
5
5
|
* Summary generation mode:
|
|
6
6
|
* - narrative: Substitute FHIR data into a template (requires template_id)
|
|
7
7
|
* - flatten: Flatten FHIR resources for RAG/search (no template needed)
|
|
8
|
+
* - ips: Generate International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG
|
|
8
9
|
*/
|
|
9
10
|
CreateSummaryRequest.Mode = {
|
|
10
11
|
Narrative: "narrative",
|
|
11
12
|
Flatten: "flatten",
|
|
13
|
+
Ips: "ips",
|
|
12
14
|
};
|
|
13
15
|
})(CreateSummaryRequest || (CreateSummaryRequest = {}));
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.18";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.18";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -2531,9 +2531,9 @@ Upload a custom FHIR StructureDefinition profile for use with the lang2fhir serv
|
|
|
2531
2531
|
|
|
2532
2532
|
```typescript
|
|
2533
2533
|
await client.lang2Fhir.uploadProfile({
|
|
2534
|
-
version: "
|
|
2535
|
-
resource: "
|
|
2536
|
-
profile: "profile"
|
|
2534
|
+
version: "R4",
|
|
2535
|
+
resource: "condition-encounter-diagnosis",
|
|
2536
|
+
profile: "(base64 encoded JSON string of the FHIR profile)"
|
|
2537
2537
|
});
|
|
2538
2538
|
|
|
2539
2539
|
```
|
|
@@ -2976,9 +2976,10 @@ await client.summary.deleteTemplate("id");
|
|
|
2976
2976
|
<dl>
|
|
2977
2977
|
<dd>
|
|
2978
2978
|
|
|
2979
|
-
Creates a summary from FHIR resources using one of
|
|
2979
|
+
Creates a summary from FHIR resources using one of three modes:
|
|
2980
2980
|
- **narrative**: Uses a template to substitute FHIR data into placeholders (requires template_id)
|
|
2981
2981
|
- **flatten**: Flattens FHIR resources into a searchable format for RAG/search (no template needed)
|
|
2982
|
+
- **ips**: Generates an International Patient Summary (IPS) narrative per ISO 27269/HL7 FHIR IPS IG. Requires a Bundle with exactly one Patient resource (returns 400 error if no Patient or multiple Patients are present). Automatically filters resources to those referencing the patient and generates sections for allergies, medications, problems, immunizations, procedures, and vital signs.
|
|
2982
2983
|
</dd>
|
|
2983
2984
|
</dl>
|
|
2984
2985
|
</dd>
|