phenoml 1.0.1 → 2.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/Client.js +2 -2
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +2 -3
- package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +2 -3
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.ts +1 -4
- package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.ts +0 -2
- package/dist/cjs/api/resources/agent/types/AgentTemplate.d.ts +0 -2
- package/dist/cjs/api/resources/agent/types/PromptTemplate.d.ts +0 -2
- package/dist/cjs/api/resources/construe/client/Client.d.ts +129 -0
- package/dist/cjs/api/resources/construe/client/Client.js +429 -0
- package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.d.ts +10 -0
- package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.js +3 -0
- package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemRequest.d.ts +16 -0
- package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemRequest.js +3 -0
- package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.d.ts +16 -0
- package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.js +3 -0
- package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.d.ts +16 -0
- package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.js +3 -0
- package/dist/cjs/api/resources/construe/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/construe/errors/NotFoundError.d.ts +5 -0
- package/dist/cjs/api/resources/construe/errors/NotFoundError.js +50 -0
- package/dist/cjs/api/resources/construe/errors/NotImplementedError.d.ts +5 -0
- package/dist/cjs/api/resources/construe/errors/NotImplementedError.js +50 -0
- package/dist/cjs/api/resources/construe/errors/ServiceUnavailableError.d.ts +5 -0
- package/dist/cjs/api/resources/construe/errors/ServiceUnavailableError.js +50 -0
- package/dist/cjs/api/resources/construe/errors/index.d.ts +3 -0
- package/dist/cjs/api/resources/construe/errors/index.js +3 -0
- package/dist/cjs/api/resources/construe/types/CodeResponse.d.ts +8 -0
- package/dist/cjs/api/resources/construe/types/CodeResponse.js +3 -0
- package/dist/cjs/api/resources/construe/types/CodeSystemDetails.d.ts +10 -0
- package/dist/cjs/api/resources/construe/types/CodeSystemDetails.js +3 -0
- package/dist/cjs/api/resources/construe/types/CodeSystemInfo.d.ts +6 -0
- package/dist/cjs/api/resources/construe/types/CodeSystemInfo.js +3 -0
- package/dist/cjs/api/resources/construe/types/GetCodeResponse.d.ts +10 -0
- package/dist/cjs/api/resources/construe/types/GetCodeResponse.js +3 -0
- package/dist/cjs/api/resources/construe/types/ListCodeSystemsResponse.d.ts +4 -0
- package/dist/cjs/api/resources/construe/types/ListCodeSystemsResponse.js +3 -0
- package/dist/cjs/api/resources/construe/types/ListCodesResponse.d.ts +9 -0
- package/dist/cjs/api/resources/construe/types/ListCodesResponse.js +3 -0
- package/dist/cjs/api/resources/construe/types/SemanticSearchResponse.d.ts +6 -0
- package/dist/cjs/api/resources/construe/types/SemanticSearchResponse.js +3 -0
- package/dist/cjs/api/resources/construe/types/SemanticSearchResult.d.ts +4 -0
- package/dist/cjs/api/resources/construe/types/SemanticSearchResult.js +3 -0
- package/dist/cjs/api/resources/construe/types/TextSearchResponse.d.ts +8 -0
- package/dist/cjs/api/resources/construe/types/TextSearchResponse.js +3 -0
- package/dist/cjs/api/resources/construe/types/TextSearchResult.d.ts +4 -0
- package/dist/cjs/api/resources/construe/types/TextSearchResult.js +3 -0
- package/dist/cjs/api/resources/construe/types/index.d.ts +10 -0
- package/dist/cjs/api/resources/construe/types/index.js +10 -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/agent/resources/prompts/client/Client.d.mts +2 -3
- package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +2 -3
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.mts +1 -4
- package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.mts +0 -2
- package/dist/esm/api/resources/agent/types/AgentTemplate.d.mts +0 -2
- package/dist/esm/api/resources/agent/types/PromptTemplate.d.mts +0 -2
- package/dist/esm/api/resources/construe/client/Client.d.mts +129 -0
- package/dist/esm/api/resources/construe/client/Client.mjs +429 -0
- package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.d.mts +10 -0
- package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.mjs +2 -0
- package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemRequest.d.mts +16 -0
- package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemRequest.mjs +2 -0
- package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.d.mts +16 -0
- package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.mjs +2 -0
- package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.d.mts +16 -0
- package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.mjs +2 -0
- package/dist/esm/api/resources/construe/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/construe/errors/NotFoundError.d.mts +5 -0
- package/dist/esm/api/resources/construe/errors/NotFoundError.mjs +13 -0
- package/dist/esm/api/resources/construe/errors/NotImplementedError.d.mts +5 -0
- package/dist/esm/api/resources/construe/errors/NotImplementedError.mjs +13 -0
- package/dist/esm/api/resources/construe/errors/ServiceUnavailableError.d.mts +5 -0
- package/dist/esm/api/resources/construe/errors/ServiceUnavailableError.mjs +13 -0
- package/dist/esm/api/resources/construe/errors/index.d.mts +3 -0
- package/dist/esm/api/resources/construe/errors/index.mjs +3 -0
- package/dist/esm/api/resources/construe/types/CodeResponse.d.mts +8 -0
- package/dist/esm/api/resources/construe/types/CodeResponse.mjs +2 -0
- package/dist/esm/api/resources/construe/types/CodeSystemDetails.d.mts +10 -0
- package/dist/esm/api/resources/construe/types/CodeSystemDetails.mjs +2 -0
- package/dist/esm/api/resources/construe/types/CodeSystemInfo.d.mts +6 -0
- package/dist/esm/api/resources/construe/types/CodeSystemInfo.mjs +2 -0
- package/dist/esm/api/resources/construe/types/GetCodeResponse.d.mts +10 -0
- package/dist/esm/api/resources/construe/types/GetCodeResponse.mjs +2 -0
- package/dist/esm/api/resources/construe/types/ListCodeSystemsResponse.d.mts +4 -0
- package/dist/esm/api/resources/construe/types/ListCodeSystemsResponse.mjs +2 -0
- package/dist/esm/api/resources/construe/types/ListCodesResponse.d.mts +9 -0
- package/dist/esm/api/resources/construe/types/ListCodesResponse.mjs +2 -0
- package/dist/esm/api/resources/construe/types/SemanticSearchResponse.d.mts +6 -0
- package/dist/esm/api/resources/construe/types/SemanticSearchResponse.mjs +2 -0
- package/dist/esm/api/resources/construe/types/SemanticSearchResult.d.mts +4 -0
- package/dist/esm/api/resources/construe/types/SemanticSearchResult.mjs +2 -0
- package/dist/esm/api/resources/construe/types/TextSearchResponse.d.mts +8 -0
- package/dist/esm/api/resources/construe/types/TextSearchResponse.mjs +2 -0
- package/dist/esm/api/resources/construe/types/TextSearchResult.d.mts +4 -0
- package/dist/esm/api/resources/construe/types/TextSearchResult.mjs +2 -0
- package/dist/esm/api/resources/construe/types/index.d.mts +10 -0
- package/dist/esm/api/resources/construe/types/index.mjs +10 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +394 -3
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": "
|
|
56
|
-
"User-Agent": "phenoml/
|
|
55
|
+
"X-Fern-SDK-Version": "2.0.0",
|
|
56
|
+
"User-Agent": "phenoml/2.0.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) });
|
|
@@ -24,8 +24,7 @@ export declare class Prompts {
|
|
|
24
24
|
* @example
|
|
25
25
|
* await client.agent.prompts.create({
|
|
26
26
|
* name: "Medical Assistant System Prompt",
|
|
27
|
-
* content: "You are a helpful medical assistant specialized in FHIR data processing..."
|
|
28
|
-
* is_active: true
|
|
27
|
+
* content: "You are a helpful medical assistant specialized in FHIR data processing..."
|
|
29
28
|
* })
|
|
30
29
|
*/
|
|
31
30
|
create(request: phenoml.agent.AgentPromptsCreateRequest, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentPromptsResponse>;
|
|
@@ -79,7 +78,7 @@ export declare class Prompts {
|
|
|
79
78
|
update(id: string, request?: phenoml.agent.AgentPromptsUpdateRequest, requestOptions?: Prompts.RequestOptions): core.HttpResponsePromise<phenoml.agent.AgentPromptsResponse>;
|
|
80
79
|
private __update;
|
|
81
80
|
/**
|
|
82
|
-
*
|
|
81
|
+
* Deletes a prompt
|
|
83
82
|
*
|
|
84
83
|
* @param {string} id - Prompt ID
|
|
85
84
|
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -67,8 +67,7 @@ class Prompts {
|
|
|
67
67
|
* @example
|
|
68
68
|
* await client.agent.prompts.create({
|
|
69
69
|
* name: "Medical Assistant System Prompt",
|
|
70
|
-
* content: "You are a helpful medical assistant specialized in FHIR data processing..."
|
|
71
|
-
* is_active: true
|
|
70
|
+
* content: "You are a helpful medical assistant specialized in FHIR data processing..."
|
|
72
71
|
* })
|
|
73
72
|
*/
|
|
74
73
|
create(request, requestOptions) {
|
|
@@ -336,7 +335,7 @@ class Prompts {
|
|
|
336
335
|
});
|
|
337
336
|
}
|
|
338
337
|
/**
|
|
339
|
-
*
|
|
338
|
+
* Deletes a prompt
|
|
340
339
|
*
|
|
341
340
|
* @param {string} id - Prompt ID
|
|
342
341
|
* @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* name: "Medical Assistant System Prompt",
|
|
5
|
-
* content: "You are a helpful medical assistant specialized in FHIR data processing..."
|
|
6
|
-
* is_active: true
|
|
5
|
+
* content: "You are a helpful medical assistant specialized in FHIR data processing..."
|
|
7
6
|
* }
|
|
8
7
|
*/
|
|
9
8
|
export interface AgentPromptsCreateRequest {
|
|
@@ -15,8 +14,6 @@ export interface AgentPromptsCreateRequest {
|
|
|
15
14
|
content: string;
|
|
16
15
|
/** Whether this is a default prompt */
|
|
17
16
|
is_default?: boolean;
|
|
18
|
-
/** Whether the prompt is active */
|
|
19
|
-
is_active: boolean;
|
|
20
17
|
/** Tags for categorizing the prompt */
|
|
21
18
|
tags?: string[];
|
|
22
19
|
}
|
|
@@ -11,8 +11,6 @@ export interface AgentPromptsUpdateRequest {
|
|
|
11
11
|
content?: string;
|
|
12
12
|
/** Whether this is a default prompt */
|
|
13
13
|
is_default?: boolean;
|
|
14
|
-
/** Whether the prompt is active */
|
|
15
|
-
is_active?: boolean;
|
|
16
14
|
/** Tags for categorizing the prompt */
|
|
17
15
|
tags?: string[];
|
|
18
16
|
}
|
|
@@ -9,8 +9,6 @@ export interface AgentTemplate {
|
|
|
9
9
|
prompts?: string[];
|
|
10
10
|
/** Array of MCP server tool IDs used by this agent */
|
|
11
11
|
tools?: string[];
|
|
12
|
-
/** Whether the agent is active */
|
|
13
|
-
is_active?: boolean;
|
|
14
12
|
/** Tags for categorizing the agent */
|
|
15
13
|
tags?: string[];
|
|
16
14
|
/** FHIR provider ID(s) - must be valid UUIDs from existing FHIR providers */
|
|
@@ -52,5 +52,134 @@ export declare class Construe {
|
|
|
52
52
|
*/
|
|
53
53
|
extractCodes(request: phenoml.construe.ExtractRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ExtractCodesResult>;
|
|
54
54
|
private __extractCodes;
|
|
55
|
+
/**
|
|
56
|
+
* Returns metadata about all available code systems including built-in and custom systems.
|
|
57
|
+
*
|
|
58
|
+
* @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
|
+
*
|
|
60
|
+
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
61
|
+
* @throws {@link phenoml.construe.InternalServerError}
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* await client.construe.listAvailableCodeSystems()
|
|
65
|
+
*/
|
|
66
|
+
listAvailableCodeSystems(requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ListCodeSystemsResponse>;
|
|
67
|
+
private __listAvailableCodeSystems;
|
|
68
|
+
/**
|
|
69
|
+
* Returns a paginated list of all codes in the specified code system.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} codesystem - Code system name (e.g., "ICD-10-CM", "SNOMED_CT_US_LITE")
|
|
72
|
+
* @param {phenoml.construe.GetConstrueCodesCodesystemRequest} request
|
|
73
|
+
* @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link phenoml.construe.BadRequestError}
|
|
76
|
+
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
77
|
+
* @throws {@link phenoml.construe.NotFoundError}
|
|
78
|
+
* @throws {@link phenoml.construe.InternalServerError}
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* await client.construe.listCodesInACodeSystem("ICD-10-CM", {
|
|
82
|
+
* version: "2025",
|
|
83
|
+
* cursor: "cursor",
|
|
84
|
+
* limit: 1
|
|
85
|
+
* })
|
|
86
|
+
*/
|
|
87
|
+
listCodesInACodeSystem(codesystem: string, request?: phenoml.construe.GetConstrueCodesCodesystemRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.ListCodesResponse>;
|
|
88
|
+
private __listCodesInACodeSystem;
|
|
89
|
+
/**
|
|
90
|
+
* Returns details for a specific code within a code system.
|
|
91
|
+
*
|
|
92
|
+
* @param {string} codesystem - Code system name
|
|
93
|
+
* @param {string} codeId - The code identifier
|
|
94
|
+
* @param {phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest} request
|
|
95
|
+
* @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
|
|
96
|
+
*
|
|
97
|
+
* @throws {@link phenoml.construe.BadRequestError}
|
|
98
|
+
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
99
|
+
* @throws {@link phenoml.construe.NotFoundError}
|
|
100
|
+
* @throws {@link phenoml.construe.InternalServerError}
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* await client.construe.getASpecificCode("ICD-10-CM", "E11.65", {
|
|
104
|
+
* version: "version"
|
|
105
|
+
* })
|
|
106
|
+
*/
|
|
107
|
+
getASpecificCode(codesystem: string, codeId: string, request?: phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.GetCodeResponse>;
|
|
108
|
+
private __getASpecificCode;
|
|
109
|
+
/**
|
|
110
|
+
* Performs semantic similarity search using vector embeddings.
|
|
111
|
+
*
|
|
112
|
+
* **When to use**: Best for natural language queries where you want to find conceptually
|
|
113
|
+
* related codes, even when different terminology is used. The search understands meaning,
|
|
114
|
+
* not just keywords.
|
|
115
|
+
*
|
|
116
|
+
* **Examples**:
|
|
117
|
+
* - Query "trouble breathing at night" finds codes like "Sleep apnea", "Orthopnea",
|
|
118
|
+
* "Nocturnal dyspnea" — semantically related but no exact keyword matches
|
|
119
|
+
* - Query "heart problems" finds "Myocardial infarction", "Cardiac arrest", "Arrhythmia"
|
|
120
|
+
*
|
|
121
|
+
* **Trade-offs**: Slower than text search (requires embedding generation), but finds
|
|
122
|
+
* conceptually similar results that keyword search would miss.
|
|
123
|
+
*
|
|
124
|
+
* See also: `/search/text` for faster keyword-based lookup with typo tolerance.
|
|
125
|
+
*
|
|
126
|
+
* @param {string} codesystem - Code system name
|
|
127
|
+
* @param {phenoml.construe.GetConstrueCodesCodesystemSearchSemanticRequest} request
|
|
128
|
+
* @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
|
+
*
|
|
130
|
+
* @throws {@link phenoml.construe.BadRequestError}
|
|
131
|
+
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
132
|
+
* @throws {@link phenoml.construe.NotFoundError}
|
|
133
|
+
* @throws {@link phenoml.construe.InternalServerError}
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* await client.construe.semanticSearchEmbeddingBased("ICD-10-CM", {
|
|
137
|
+
* text: "patient has trouble breathing at night and wakes up gasping",
|
|
138
|
+
* version: "version",
|
|
139
|
+
* limit: 1
|
|
140
|
+
* })
|
|
141
|
+
*/
|
|
142
|
+
semanticSearchEmbeddingBased(codesystem: string, request: phenoml.construe.GetConstrueCodesCodesystemSearchSemanticRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.SemanticSearchResponse>;
|
|
143
|
+
private __semanticSearchEmbeddingBased;
|
|
144
|
+
/**
|
|
145
|
+
* Performs fast full-text search over code IDs and descriptions.
|
|
146
|
+
*
|
|
147
|
+
* **When to use**: Best for autocomplete UIs, code lookup, or when users know part of
|
|
148
|
+
* the code ID or specific keywords. Fast response times suitable for typeahead interfaces.
|
|
149
|
+
*
|
|
150
|
+
* **Features**:
|
|
151
|
+
* - Substring matching on code IDs (e.g., "11.65" finds "E11.65")
|
|
152
|
+
* - Typo tolerance on descriptions (not on code IDs)
|
|
153
|
+
* - Fast response times (~10-50ms)
|
|
154
|
+
*
|
|
155
|
+
* **Examples**:
|
|
156
|
+
* - Query "E11" finds all codes starting with E11 (diabetes codes)
|
|
157
|
+
* - Query "diabtes" (typo) still finds "diabetes" codes
|
|
158
|
+
*
|
|
159
|
+
* **Trade-offs**: Faster than semantic search, but only matches keywords/substrings.
|
|
160
|
+
* Won't find conceptually related codes with different terminology.
|
|
161
|
+
*
|
|
162
|
+
* See also: `/search/semantic` for finding conceptually similar codes.
|
|
163
|
+
*
|
|
164
|
+
* @param {string} codesystem - Code system name
|
|
165
|
+
* @param {phenoml.construe.GetConstrueCodesCodesystemSearchTextRequest} request
|
|
166
|
+
* @param {Construe.RequestOptions} requestOptions - Request-specific configuration.
|
|
167
|
+
*
|
|
168
|
+
* @throws {@link phenoml.construe.BadRequestError}
|
|
169
|
+
* @throws {@link phenoml.construe.UnauthorizedError}
|
|
170
|
+
* @throws {@link phenoml.construe.NotFoundError}
|
|
171
|
+
* @throws {@link phenoml.construe.InternalServerError}
|
|
172
|
+
* @throws {@link phenoml.construe.NotImplementedError}
|
|
173
|
+
* @throws {@link phenoml.construe.ServiceUnavailableError}
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* await client.construe.textSearchKeywordBased("ICD-10-CM", {
|
|
177
|
+
* q: "E11.65",
|
|
178
|
+
* version: "version",
|
|
179
|
+
* limit: 1
|
|
180
|
+
* })
|
|
181
|
+
*/
|
|
182
|
+
textSearchKeywordBased(codesystem: string, request: phenoml.construe.GetConstrueCodesCodesystemSearchTextRequest, requestOptions?: Construe.RequestOptions): core.HttpResponsePromise<phenoml.construe.TextSearchResponse>;
|
|
183
|
+
private __textSearchKeywordBased;
|
|
55
184
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
56
185
|
}
|