Skip to content

Commit d2f3eb2

Browse files
authored
Merge pull request #56 from PhenoML/fern-bot/2026-02-08T15-51Z
feat: add code system detail retrieval and deletion methods
2 parents c743c6f + 7fbe13d commit d2f3eb2

16 files changed

+720
-7
lines changed

changelog.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## 5.1.0 - 2026-02-08
2+
* feat: add code system detail retrieval and deletion methods
3+
* Add comprehensive code system management capabilities with two new API methods for
4+
* retrieving detailed metadata and deleting custom code systems. Include enhanced
5+
* error handling and documentation updates for better API availability clarity.
6+
* Key changes:
7+
* Add `getCodeSystemDetail()` method to retrieve full metadata including timestamps and builtin status
8+
* Add `deleteCustomCodeSystem()` method to remove custom code systems with proper restrictions
9+
* Introduce ForbiddenError class for HTTP 403 responses with validation against builtin systems
10+
* Update upload request interface with replace option and enhanced validation documentation
11+
* Enhance search method documentation with availability notes for built-in vs custom systems
12+
* Add comprehensive test coverage for all new endpoints and error scenarios
13+
* 🌿 Generated with Fern
14+
115
## 5.0.0 - 2026-02-07
216
* feat: add workflow support to agents and simplify FHIR profile uploads
317
* This release adds workflow integration capabilities for agents and streamlines

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "phenoml",
3-
"version": "5.0.0",
3+
"version": "5.1.0",
44
"private": false,
55
"repository": "github:PhenoML/phenoml-ts-sdk",
66
"type": "commonjs",

reference.md

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,153 @@ await client.construe.listAvailableCodeSystems();
13291329
</dl>
13301330

13311331

1332+
</dd>
1333+
</dl>
1334+
</details>
1335+
1336+
<details><summary><code>client.construe.<a href="/src/api/resources/construe/client/Client.ts">getCodeSystemDetail</a>(codesystem, { ...params }) -> phenoml.GetCodeSystemDetailResponse</code></summary>
1337+
<dl>
1338+
<dd>
1339+
1340+
#### 📝 Description
1341+
1342+
<dl>
1343+
<dd>
1344+
1345+
<dl>
1346+
<dd>
1347+
1348+
Returns full metadata for a single code system, including timestamps and builtin status.
1349+
</dd>
1350+
</dl>
1351+
</dd>
1352+
</dl>
1353+
1354+
#### 🔌 Usage
1355+
1356+
<dl>
1357+
<dd>
1358+
1359+
<dl>
1360+
<dd>
1361+
1362+
```typescript
1363+
await client.construe.getCodeSystemDetail("ICD-10-CM", {
1364+
version: "2025"
1365+
});
1366+
1367+
```
1368+
</dd>
1369+
</dl>
1370+
</dd>
1371+
</dl>
1372+
1373+
#### ⚙️ Parameters
1374+
1375+
<dl>
1376+
<dd>
1377+
1378+
<dl>
1379+
<dd>
1380+
1381+
**codesystem:** `string` — Code system name (e.g., "ICD-10-CM", "SNOMED_CT_US_LITE")
1382+
1383+
</dd>
1384+
</dl>
1385+
1386+
<dl>
1387+
<dd>
1388+
1389+
**request:** `phenoml.construe.GetConstrueCodesSystemsCodesystemRequest`
1390+
1391+
</dd>
1392+
</dl>
1393+
1394+
<dl>
1395+
<dd>
1396+
1397+
**requestOptions:** `Construe.RequestOptions`
1398+
1399+
</dd>
1400+
</dl>
1401+
</dd>
1402+
</dl>
1403+
1404+
1405+
</dd>
1406+
</dl>
1407+
</details>
1408+
1409+
<details><summary><code>client.construe.<a href="/src/api/resources/construe/client/Client.ts">deleteCustomCodeSystem</a>(codesystem, { ...params }) -> phenoml.DeleteCodeSystemResponse</code></summary>
1410+
<dl>
1411+
<dd>
1412+
1413+
#### 📝 Description
1414+
1415+
<dl>
1416+
<dd>
1417+
1418+
<dl>
1419+
<dd>
1420+
1421+
Deletes a custom (non-builtin) code system and all its codes. Builtin systems cannot be deleted.
1422+
Only available on dedicated instances. Large systems may take up to a minute to delete.
1423+
</dd>
1424+
</dl>
1425+
</dd>
1426+
</dl>
1427+
1428+
#### 🔌 Usage
1429+
1430+
<dl>
1431+
<dd>
1432+
1433+
<dl>
1434+
<dd>
1435+
1436+
```typescript
1437+
await client.construe.deleteCustomCodeSystem("CUSTOM_CODES", {
1438+
version: "version"
1439+
});
1440+
1441+
```
1442+
</dd>
1443+
</dl>
1444+
</dd>
1445+
</dl>
1446+
1447+
#### ⚙️ Parameters
1448+
1449+
<dl>
1450+
<dd>
1451+
1452+
<dl>
1453+
<dd>
1454+
1455+
**codesystem:** `string` — Code system name
1456+
1457+
</dd>
1458+
</dl>
1459+
1460+
<dl>
1461+
<dd>
1462+
1463+
**request:** `phenoml.construe.DeleteConstrueCodesSystemsCodesystemRequest`
1464+
1465+
</dd>
1466+
</dl>
1467+
1468+
<dl>
1469+
<dd>
1470+
1471+
**requestOptions:** `Construe.RequestOptions`
1472+
1473+
</dd>
1474+
</dl>
1475+
</dd>
1476+
</dl>
1477+
1478+
13321479
</dd>
13331480
</dl>
13341481
</details>
@@ -1507,6 +1654,8 @@ await client.construe.getASpecificCode("ICD-10-CM", "E11.65", {
15071654

15081655
Performs semantic similarity search using vector embeddings.
15091656

1657+
**Availability**: This endpoint works for both **built-in and custom** code systems.
1658+
15101659
**When to use**: Best for natural language queries where you want to find conceptually
15111660
related codes, even when different terminology is used. The search understands meaning,
15121661
not just keywords.
@@ -1598,6 +1747,10 @@ await client.construe.semanticSearchEmbeddingBased("ICD-10-CM", {
15981747

15991748
Performs fast full-text search over code IDs and descriptions.
16001749

1750+
**Availability**: This endpoint is only available for **built-in code systems**.
1751+
Custom code systems uploaded via `/construe/upload` are not indexed for full-text search
1752+
and will return empty results. Use `/search/semantic` to search custom code systems.
1753+
16011754
**When to use**: Best for autocomplete UIs, code lookup, or when users know part of
16021755
the code ID or specific keywords. Fast response times suitable for typeahead interfaces.
16031756

src/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export class phenomlClient {
4040
{
4141
"X-Fern-Language": "JavaScript",
4242
"X-Fern-SDK-Name": "phenoml",
43-
"X-Fern-SDK-Version": "5.0.0",
44-
"User-Agent": "phenoml/5.0.0",
43+
"X-Fern-SDK-Version": "5.1.0",
44+
"User-Agent": "phenoml/5.1.0",
4545
"X-Fern-Runtime": core.RUNTIME.type,
4646
"X-Fern-Runtime-Version": core.RUNTIME.version,
4747
},

0 commit comments

Comments
 (0)