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.
Files changed (102) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.d.ts +2 -3
  3. package/dist/cjs/api/resources/agent/resources/prompts/client/Client.js +2 -3
  4. package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.ts +1 -4
  5. package/dist/cjs/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.ts +0 -2
  6. package/dist/cjs/api/resources/agent/types/AgentTemplate.d.ts +0 -2
  7. package/dist/cjs/api/resources/agent/types/PromptTemplate.d.ts +0 -2
  8. package/dist/cjs/api/resources/construe/client/Client.d.ts +129 -0
  9. package/dist/cjs/api/resources/construe/client/Client.js +429 -0
  10. package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.d.ts +10 -0
  11. package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.js +3 -0
  12. package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemRequest.d.ts +16 -0
  13. package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemRequest.js +3 -0
  14. package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.d.ts +16 -0
  15. package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.js +3 -0
  16. package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.d.ts +16 -0
  17. package/dist/cjs/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.js +3 -0
  18. package/dist/cjs/api/resources/construe/client/requests/index.d.ts +4 -0
  19. package/dist/cjs/api/resources/construe/errors/NotFoundError.d.ts +5 -0
  20. package/dist/cjs/api/resources/construe/errors/NotFoundError.js +50 -0
  21. package/dist/cjs/api/resources/construe/errors/NotImplementedError.d.ts +5 -0
  22. package/dist/cjs/api/resources/construe/errors/NotImplementedError.js +50 -0
  23. package/dist/cjs/api/resources/construe/errors/ServiceUnavailableError.d.ts +5 -0
  24. package/dist/cjs/api/resources/construe/errors/ServiceUnavailableError.js +50 -0
  25. package/dist/cjs/api/resources/construe/errors/index.d.ts +3 -0
  26. package/dist/cjs/api/resources/construe/errors/index.js +3 -0
  27. package/dist/cjs/api/resources/construe/types/CodeResponse.d.ts +8 -0
  28. package/dist/cjs/api/resources/construe/types/CodeResponse.js +3 -0
  29. package/dist/cjs/api/resources/construe/types/CodeSystemDetails.d.ts +10 -0
  30. package/dist/cjs/api/resources/construe/types/CodeSystemDetails.js +3 -0
  31. package/dist/cjs/api/resources/construe/types/CodeSystemInfo.d.ts +6 -0
  32. package/dist/cjs/api/resources/construe/types/CodeSystemInfo.js +3 -0
  33. package/dist/cjs/api/resources/construe/types/GetCodeResponse.d.ts +10 -0
  34. package/dist/cjs/api/resources/construe/types/GetCodeResponse.js +3 -0
  35. package/dist/cjs/api/resources/construe/types/ListCodeSystemsResponse.d.ts +4 -0
  36. package/dist/cjs/api/resources/construe/types/ListCodeSystemsResponse.js +3 -0
  37. package/dist/cjs/api/resources/construe/types/ListCodesResponse.d.ts +9 -0
  38. package/dist/cjs/api/resources/construe/types/ListCodesResponse.js +3 -0
  39. package/dist/cjs/api/resources/construe/types/SemanticSearchResponse.d.ts +6 -0
  40. package/dist/cjs/api/resources/construe/types/SemanticSearchResponse.js +3 -0
  41. package/dist/cjs/api/resources/construe/types/SemanticSearchResult.d.ts +4 -0
  42. package/dist/cjs/api/resources/construe/types/SemanticSearchResult.js +3 -0
  43. package/dist/cjs/api/resources/construe/types/TextSearchResponse.d.ts +8 -0
  44. package/dist/cjs/api/resources/construe/types/TextSearchResponse.js +3 -0
  45. package/dist/cjs/api/resources/construe/types/TextSearchResult.d.ts +4 -0
  46. package/dist/cjs/api/resources/construe/types/TextSearchResult.js +3 -0
  47. package/dist/cjs/api/resources/construe/types/index.d.ts +10 -0
  48. package/dist/cjs/api/resources/construe/types/index.js +10 -0
  49. package/dist/cjs/version.d.ts +1 -1
  50. package/dist/cjs/version.js +1 -1
  51. package/dist/esm/Client.mjs +2 -2
  52. package/dist/esm/api/resources/agent/resources/prompts/client/Client.d.mts +2 -3
  53. package/dist/esm/api/resources/agent/resources/prompts/client/Client.mjs +2 -3
  54. package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsCreateRequest.d.mts +1 -4
  55. package/dist/esm/api/resources/agent/resources/prompts/client/requests/AgentPromptsUpdateRequest.d.mts +0 -2
  56. package/dist/esm/api/resources/agent/types/AgentTemplate.d.mts +0 -2
  57. package/dist/esm/api/resources/agent/types/PromptTemplate.d.mts +0 -2
  58. package/dist/esm/api/resources/construe/client/Client.d.mts +129 -0
  59. package/dist/esm/api/resources/construe/client/Client.mjs +429 -0
  60. package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.d.mts +10 -0
  61. package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemCodeIdRequest.mjs +2 -0
  62. package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemRequest.d.mts +16 -0
  63. package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemRequest.mjs +2 -0
  64. package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.d.mts +16 -0
  65. package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchSemanticRequest.mjs +2 -0
  66. package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.d.mts +16 -0
  67. package/dist/esm/api/resources/construe/client/requests/GetConstrueCodesCodesystemSearchTextRequest.mjs +2 -0
  68. package/dist/esm/api/resources/construe/client/requests/index.d.mts +4 -0
  69. package/dist/esm/api/resources/construe/errors/NotFoundError.d.mts +5 -0
  70. package/dist/esm/api/resources/construe/errors/NotFoundError.mjs +13 -0
  71. package/dist/esm/api/resources/construe/errors/NotImplementedError.d.mts +5 -0
  72. package/dist/esm/api/resources/construe/errors/NotImplementedError.mjs +13 -0
  73. package/dist/esm/api/resources/construe/errors/ServiceUnavailableError.d.mts +5 -0
  74. package/dist/esm/api/resources/construe/errors/ServiceUnavailableError.mjs +13 -0
  75. package/dist/esm/api/resources/construe/errors/index.d.mts +3 -0
  76. package/dist/esm/api/resources/construe/errors/index.mjs +3 -0
  77. package/dist/esm/api/resources/construe/types/CodeResponse.d.mts +8 -0
  78. package/dist/esm/api/resources/construe/types/CodeResponse.mjs +2 -0
  79. package/dist/esm/api/resources/construe/types/CodeSystemDetails.d.mts +10 -0
  80. package/dist/esm/api/resources/construe/types/CodeSystemDetails.mjs +2 -0
  81. package/dist/esm/api/resources/construe/types/CodeSystemInfo.d.mts +6 -0
  82. package/dist/esm/api/resources/construe/types/CodeSystemInfo.mjs +2 -0
  83. package/dist/esm/api/resources/construe/types/GetCodeResponse.d.mts +10 -0
  84. package/dist/esm/api/resources/construe/types/GetCodeResponse.mjs +2 -0
  85. package/dist/esm/api/resources/construe/types/ListCodeSystemsResponse.d.mts +4 -0
  86. package/dist/esm/api/resources/construe/types/ListCodeSystemsResponse.mjs +2 -0
  87. package/dist/esm/api/resources/construe/types/ListCodesResponse.d.mts +9 -0
  88. package/dist/esm/api/resources/construe/types/ListCodesResponse.mjs +2 -0
  89. package/dist/esm/api/resources/construe/types/SemanticSearchResponse.d.mts +6 -0
  90. package/dist/esm/api/resources/construe/types/SemanticSearchResponse.mjs +2 -0
  91. package/dist/esm/api/resources/construe/types/SemanticSearchResult.d.mts +4 -0
  92. package/dist/esm/api/resources/construe/types/SemanticSearchResult.mjs +2 -0
  93. package/dist/esm/api/resources/construe/types/TextSearchResponse.d.mts +8 -0
  94. package/dist/esm/api/resources/construe/types/TextSearchResponse.mjs +2 -0
  95. package/dist/esm/api/resources/construe/types/TextSearchResult.d.mts +4 -0
  96. package/dist/esm/api/resources/construe/types/TextSearchResult.mjs +2 -0
  97. package/dist/esm/api/resources/construe/types/index.d.mts +10 -0
  98. package/dist/esm/api/resources/construe/types/index.mjs +10 -0
  99. package/dist/esm/version.d.mts +1 -1
  100. package/dist/esm/version.mjs +1 -1
  101. package/package.json +1 -1
  102. package/reference.md +394 -3
@@ -0,0 +1,10 @@
1
+ import type * as phenoml from "../../../index.mjs";
2
+ export interface GetCodeResponse {
3
+ system: phenoml.construe.CodeSystemInfo;
4
+ /** The code identifier */
5
+ code: string;
6
+ /** Short description of the code */
7
+ description: string;
8
+ /** Extended definition of the code (if available) */
9
+ definition?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as phenoml from "../../../index.mjs";
2
+ export interface ListCodeSystemsResponse {
3
+ systems: phenoml.construe.CodeSystemDetails[];
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ import type * as phenoml from "../../../index.mjs";
2
+ export interface ListCodesResponse {
3
+ system: phenoml.construe.CodeSystemInfo;
4
+ codes: phenoml.construe.CodeResponse[];
5
+ /** Cursor for fetching the next page (null if no more results) */
6
+ next_cursor?: string;
7
+ /** Whether there are more results available */
8
+ has_more: boolean;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,6 @@
1
+ import type * as phenoml from "../../../index.mjs";
2
+ export interface SemanticSearchResponse {
3
+ system: phenoml.construe.CodeSystemInfo;
4
+ /** Codes ordered by semantic similarity (most similar first) */
5
+ results: phenoml.construe.SemanticSearchResult[];
6
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface SemanticSearchResult {
2
+ code: string;
3
+ description: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,8 @@
1
+ import type * as phenoml from "../../../index.mjs";
2
+ export interface TextSearchResponse {
3
+ system: phenoml.construe.CodeSystemInfo;
4
+ /** Codes matching the search query */
5
+ results: phenoml.construe.TextSearchResult[];
6
+ /** Total number of matching results (may exceed results array due to pagination) */
7
+ found: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface TextSearchResult {
2
+ code: string;
3
+ description: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,5 +1,15 @@
1
+ export * from "./CodeResponse.mjs";
2
+ export * from "./CodeSystemDetails.mjs";
3
+ export * from "./CodeSystemInfo.mjs";
1
4
  export * from "./ConstrueUploadCodeSystemResponse.mjs";
2
5
  export * from "./ExtractCodesResult.mjs";
3
6
  export * from "./ExtractedCodeResult.mjs";
4
7
  export * from "./ExtractRequestConfig.mjs";
5
8
  export * from "./ExtractRequestSystem.mjs";
9
+ export * from "./GetCodeResponse.mjs";
10
+ export * from "./ListCodeSystemsResponse.mjs";
11
+ export * from "./ListCodesResponse.mjs";
12
+ export * from "./SemanticSearchResponse.mjs";
13
+ export * from "./SemanticSearchResult.mjs";
14
+ export * from "./TextSearchResponse.mjs";
15
+ export * from "./TextSearchResult.mjs";
@@ -1,5 +1,15 @@
1
+ export * from "./CodeResponse.mjs";
2
+ export * from "./CodeSystemDetails.mjs";
3
+ export * from "./CodeSystemInfo.mjs";
1
4
  export * from "./ConstrueUploadCodeSystemResponse.mjs";
2
5
  export * from "./ExtractCodesResult.mjs";
3
6
  export * from "./ExtractedCodeResult.mjs";
4
7
  export * from "./ExtractRequestConfig.mjs";
5
8
  export * from "./ExtractRequestSystem.mjs";
9
+ export * from "./GetCodeResponse.mjs";
10
+ export * from "./ListCodeSystemsResponse.mjs";
11
+ export * from "./ListCodesResponse.mjs";
12
+ export * from "./SemanticSearchResponse.mjs";
13
+ export * from "./SemanticSearchResult.mjs";
14
+ export * from "./TextSearchResponse.mjs";
15
+ export * from "./TextSearchResult.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.1";
1
+ export declare const SDK_VERSION = "2.0.0";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.1";
1
+ export const SDK_VERSION = "2.0.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "phenoml",
3
- "version": "1.0.1",
3
+ "version": "2.0.0",
4
4
  "private": false,
5
5
  "repository": "github:PhenoML/phenoml-ts-sdk",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -579,8 +579,7 @@ Creates a new agent prompt
579
579
  ```typescript
580
580
  await client.agent.prompts.create({
581
581
  name: "Medical Assistant System Prompt",
582
- content: "You are a helpful medical assistant specialized in FHIR data processing...",
583
- is_active: true
582
+ content: "You are a helpful medical assistant specialized in FHIR data processing..."
584
583
  });
585
584
 
586
585
  ```
@@ -818,7 +817,7 @@ await client.agent.prompts.update("id");
818
817
  <dl>
819
818
  <dd>
820
819
 
821
- Soft deletes a prompt by setting is_active to false
820
+ Deletes a prompt
822
821
  </dd>
823
822
  </dl>
824
823
  </dd>
@@ -1271,6 +1270,398 @@ await client.construe.extractCodes({
1271
1270
  </dl>
1272
1271
 
1273
1272
 
1273
+ </dd>
1274
+ </dl>
1275
+ </details>
1276
+
1277
+ <details><summary><code>client.construe.<a href="/src/api/resources/construe/client/Client.ts">listAvailableCodeSystems</a>() -> phenoml.ListCodeSystemsResponse</code></summary>
1278
+ <dl>
1279
+ <dd>
1280
+
1281
+ #### 📝 Description
1282
+
1283
+ <dl>
1284
+ <dd>
1285
+
1286
+ <dl>
1287
+ <dd>
1288
+
1289
+ Returns metadata about all available code systems including built-in and custom systems.
1290
+ </dd>
1291
+ </dl>
1292
+ </dd>
1293
+ </dl>
1294
+
1295
+ #### 🔌 Usage
1296
+
1297
+ <dl>
1298
+ <dd>
1299
+
1300
+ <dl>
1301
+ <dd>
1302
+
1303
+ ```typescript
1304
+ await client.construe.listAvailableCodeSystems();
1305
+
1306
+ ```
1307
+ </dd>
1308
+ </dl>
1309
+ </dd>
1310
+ </dl>
1311
+
1312
+ #### ⚙️ Parameters
1313
+
1314
+ <dl>
1315
+ <dd>
1316
+
1317
+ <dl>
1318
+ <dd>
1319
+
1320
+ **requestOptions:** `Construe.RequestOptions`
1321
+
1322
+ </dd>
1323
+ </dl>
1324
+ </dd>
1325
+ </dl>
1326
+
1327
+
1328
+ </dd>
1329
+ </dl>
1330
+ </details>
1331
+
1332
+ <details><summary><code>client.construe.<a href="/src/api/resources/construe/client/Client.ts">listCodesInACodeSystem</a>(codesystem, { ...params }) -> phenoml.ListCodesResponse</code></summary>
1333
+ <dl>
1334
+ <dd>
1335
+
1336
+ #### 📝 Description
1337
+
1338
+ <dl>
1339
+ <dd>
1340
+
1341
+ <dl>
1342
+ <dd>
1343
+
1344
+ Returns a paginated list of all codes in the specified code system.
1345
+ </dd>
1346
+ </dl>
1347
+ </dd>
1348
+ </dl>
1349
+
1350
+ #### 🔌 Usage
1351
+
1352
+ <dl>
1353
+ <dd>
1354
+
1355
+ <dl>
1356
+ <dd>
1357
+
1358
+ ```typescript
1359
+ await client.construe.listCodesInACodeSystem("ICD-10-CM", {
1360
+ version: "2025",
1361
+ cursor: "cursor",
1362
+ limit: 1
1363
+ });
1364
+
1365
+ ```
1366
+ </dd>
1367
+ </dl>
1368
+ </dd>
1369
+ </dl>
1370
+
1371
+ #### ⚙️ Parameters
1372
+
1373
+ <dl>
1374
+ <dd>
1375
+
1376
+ <dl>
1377
+ <dd>
1378
+
1379
+ **codesystem:** `string` — Code system name (e.g., "ICD-10-CM", "SNOMED_CT_US_LITE")
1380
+
1381
+ </dd>
1382
+ </dl>
1383
+
1384
+ <dl>
1385
+ <dd>
1386
+
1387
+ **request:** `phenoml.construe.GetConstrueCodesCodesystemRequest`
1388
+
1389
+ </dd>
1390
+ </dl>
1391
+
1392
+ <dl>
1393
+ <dd>
1394
+
1395
+ **requestOptions:** `Construe.RequestOptions`
1396
+
1397
+ </dd>
1398
+ </dl>
1399
+ </dd>
1400
+ </dl>
1401
+
1402
+
1403
+ </dd>
1404
+ </dl>
1405
+ </details>
1406
+
1407
+ <details><summary><code>client.construe.<a href="/src/api/resources/construe/client/Client.ts">getASpecificCode</a>(codesystem, codeId, { ...params }) -> phenoml.GetCodeResponse</code></summary>
1408
+ <dl>
1409
+ <dd>
1410
+
1411
+ #### 📝 Description
1412
+
1413
+ <dl>
1414
+ <dd>
1415
+
1416
+ <dl>
1417
+ <dd>
1418
+
1419
+ Returns details for a specific code within a code system.
1420
+ </dd>
1421
+ </dl>
1422
+ </dd>
1423
+ </dl>
1424
+
1425
+ #### 🔌 Usage
1426
+
1427
+ <dl>
1428
+ <dd>
1429
+
1430
+ <dl>
1431
+ <dd>
1432
+
1433
+ ```typescript
1434
+ await client.construe.getASpecificCode("ICD-10-CM", "E11.65", {
1435
+ version: "version"
1436
+ });
1437
+
1438
+ ```
1439
+ </dd>
1440
+ </dl>
1441
+ </dd>
1442
+ </dl>
1443
+
1444
+ #### ⚙️ Parameters
1445
+
1446
+ <dl>
1447
+ <dd>
1448
+
1449
+ <dl>
1450
+ <dd>
1451
+
1452
+ **codesystem:** `string` — Code system name
1453
+
1454
+ </dd>
1455
+ </dl>
1456
+
1457
+ <dl>
1458
+ <dd>
1459
+
1460
+ **codeId:** `string` — The code identifier
1461
+
1462
+ </dd>
1463
+ </dl>
1464
+
1465
+ <dl>
1466
+ <dd>
1467
+
1468
+ **request:** `phenoml.construe.GetConstrueCodesCodesystemCodeIdRequest`
1469
+
1470
+ </dd>
1471
+ </dl>
1472
+
1473
+ <dl>
1474
+ <dd>
1475
+
1476
+ **requestOptions:** `Construe.RequestOptions`
1477
+
1478
+ </dd>
1479
+ </dl>
1480
+ </dd>
1481
+ </dl>
1482
+
1483
+
1484
+ </dd>
1485
+ </dl>
1486
+ </details>
1487
+
1488
+ <details><summary><code>client.construe.<a href="/src/api/resources/construe/client/Client.ts">semanticSearchEmbeddingBased</a>(codesystem, { ...params }) -> phenoml.SemanticSearchResponse</code></summary>
1489
+ <dl>
1490
+ <dd>
1491
+
1492
+ #### 📝 Description
1493
+
1494
+ <dl>
1495
+ <dd>
1496
+
1497
+ <dl>
1498
+ <dd>
1499
+
1500
+ Performs semantic similarity search using vector embeddings.
1501
+
1502
+ **When to use**: Best for natural language queries where you want to find conceptually
1503
+ related codes, even when different terminology is used. The search understands meaning,
1504
+ not just keywords.
1505
+
1506
+ **Examples**:
1507
+ - Query "trouble breathing at night" finds codes like "Sleep apnea", "Orthopnea",
1508
+ "Nocturnal dyspnea" — semantically related but no exact keyword matches
1509
+ - Query "heart problems" finds "Myocardial infarction", "Cardiac arrest", "Arrhythmia"
1510
+
1511
+ **Trade-offs**: Slower than text search (requires embedding generation), but finds
1512
+ conceptually similar results that keyword search would miss.
1513
+
1514
+ See also: `/search/text` for faster keyword-based lookup with typo tolerance.
1515
+ </dd>
1516
+ </dl>
1517
+ </dd>
1518
+ </dl>
1519
+
1520
+ #### 🔌 Usage
1521
+
1522
+ <dl>
1523
+ <dd>
1524
+
1525
+ <dl>
1526
+ <dd>
1527
+
1528
+ ```typescript
1529
+ await client.construe.semanticSearchEmbeddingBased("ICD-10-CM", {
1530
+ text: "patient has trouble breathing at night and wakes up gasping",
1531
+ version: "version",
1532
+ limit: 1
1533
+ });
1534
+
1535
+ ```
1536
+ </dd>
1537
+ </dl>
1538
+ </dd>
1539
+ </dl>
1540
+
1541
+ #### ⚙️ Parameters
1542
+
1543
+ <dl>
1544
+ <dd>
1545
+
1546
+ <dl>
1547
+ <dd>
1548
+
1549
+ **codesystem:** `string` — Code system name
1550
+
1551
+ </dd>
1552
+ </dl>
1553
+
1554
+ <dl>
1555
+ <dd>
1556
+
1557
+ **request:** `phenoml.construe.GetConstrueCodesCodesystemSearchSemanticRequest`
1558
+
1559
+ </dd>
1560
+ </dl>
1561
+
1562
+ <dl>
1563
+ <dd>
1564
+
1565
+ **requestOptions:** `Construe.RequestOptions`
1566
+
1567
+ </dd>
1568
+ </dl>
1569
+ </dd>
1570
+ </dl>
1571
+
1572
+
1573
+ </dd>
1574
+ </dl>
1575
+ </details>
1576
+
1577
+ <details><summary><code>client.construe.<a href="/src/api/resources/construe/client/Client.ts">textSearchKeywordBased</a>(codesystem, { ...params }) -> phenoml.TextSearchResponse</code></summary>
1578
+ <dl>
1579
+ <dd>
1580
+
1581
+ #### 📝 Description
1582
+
1583
+ <dl>
1584
+ <dd>
1585
+
1586
+ <dl>
1587
+ <dd>
1588
+
1589
+ Performs fast full-text search over code IDs and descriptions.
1590
+
1591
+ **When to use**: Best for autocomplete UIs, code lookup, or when users know part of
1592
+ the code ID or specific keywords. Fast response times suitable for typeahead interfaces.
1593
+
1594
+ **Features**:
1595
+ - Substring matching on code IDs (e.g., "11.65" finds "E11.65")
1596
+ - Typo tolerance on descriptions (not on code IDs)
1597
+ - Fast response times (~10-50ms)
1598
+
1599
+ **Examples**:
1600
+ - Query "E11" finds all codes starting with E11 (diabetes codes)
1601
+ - Query "diabtes" (typo) still finds "diabetes" codes
1602
+
1603
+ **Trade-offs**: Faster than semantic search, but only matches keywords/substrings.
1604
+ Won't find conceptually related codes with different terminology.
1605
+
1606
+ See also: `/search/semantic` for finding conceptually similar codes.
1607
+ </dd>
1608
+ </dl>
1609
+ </dd>
1610
+ </dl>
1611
+
1612
+ #### 🔌 Usage
1613
+
1614
+ <dl>
1615
+ <dd>
1616
+
1617
+ <dl>
1618
+ <dd>
1619
+
1620
+ ```typescript
1621
+ await client.construe.textSearchKeywordBased("ICD-10-CM", {
1622
+ q: "E11.65",
1623
+ version: "version",
1624
+ limit: 1
1625
+ });
1626
+
1627
+ ```
1628
+ </dd>
1629
+ </dl>
1630
+ </dd>
1631
+ </dl>
1632
+
1633
+ #### ⚙️ Parameters
1634
+
1635
+ <dl>
1636
+ <dd>
1637
+
1638
+ <dl>
1639
+ <dd>
1640
+
1641
+ **codesystem:** `string` — Code system name
1642
+
1643
+ </dd>
1644
+ </dl>
1645
+
1646
+ <dl>
1647
+ <dd>
1648
+
1649
+ **request:** `phenoml.construe.GetConstrueCodesCodesystemSearchTextRequest`
1650
+
1651
+ </dd>
1652
+ </dl>
1653
+
1654
+ <dl>
1655
+ <dd>
1656
+
1657
+ **requestOptions:** `Construe.RequestOptions`
1658
+
1659
+ </dd>
1660
+ </dl>
1661
+ </dd>
1662
+ </dl>
1663
+
1664
+
1274
1665
  </dd>
1275
1666
  </dl>
1276
1667
  </details>