@sequoiaport/codes 0.1.0-beta.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sequoiaport
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,262 @@
1
+ # @sequoiaport/codes
2
+
3
+ Official TypeScript/JavaScript SDK for the [Sequoia Codes API](https://sequoiacodes.com) — a unified API for medical code search and lookup.
4
+
5
+ Query **ICD-10**, **CPT**, **HCPCS**, **SNOMED CT**, **LOINC**, and **RxNorm** codes through a single client. The SDK also covers **LCD/NCD** coverage guidelines and a **clinical orchestrator** for cross-system operations like coverage checks and diagnosis-to-procedure mapping.
6
+
7
+ - Fully typed with Zod-validated responses
8
+ - Supports both ESM and CommonJS
9
+ - Includes [agent skills](https://skills.sh) for AI coding assistants
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @sequoiaport/codes
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```typescript
20
+ import { SequoiaCodesClient } from "@sequoiaport/codes";
21
+
22
+ const client = new SequoiaCodesClient({
23
+ apiKey: process.env.SEQUOIA_CODES_API_KEY!,
24
+ });
25
+
26
+ // Search for ICD-10 codes
27
+ const icd10Results = await client.icd10.searchCode({ query: "diabetes type 2" });
28
+ console.log(icd10Results.results);
29
+
30
+ // Look up a specific SNOMED code
31
+ const snomedCode = await client.snomed.identifyCode({ code: "73211009" });
32
+ console.log(snomedCode.concept);
33
+
34
+ // Search for CPT procedures
35
+ const cptResults = await client.cpt.searchCode({ query: "knee replacement" });
36
+ console.log(cptResults.results);
37
+ ```
38
+
39
+ ## API Categories
40
+
41
+ ### Coding Systems
42
+
43
+ - **`client.snomed`** - SNOMED CT clinical terminology
44
+ - **`client.icd10`** - ICD-10 diagnosis codes
45
+ - **`client.cpt`** - CPT procedure codes
46
+ - **`client.hcpcs`** - HCPCS procedure codes
47
+ - **`client.loinc`** - LOINC laboratory test codes
48
+ - **`client.rxnorm`** - RxNorm drug/medication codes
49
+
50
+ ### Guidelines
51
+
52
+ - **`client.lcd`** - Local Coverage Determinations
53
+ - **`client.ncd`** - National Coverage Determinations
54
+
55
+ ### Orchestrators
56
+
57
+ - **`client.clinical`** - Cross-engine clinical operations
58
+ - **`client.system`** - System health and async results
59
+
60
+ ## Examples
61
+
62
+ ### SNOMED
63
+
64
+ ```typescript
65
+ // Hybrid search
66
+ const results = await client.snomed.searchCode({
67
+ query: "heart failure",
68
+ limit: 10,
69
+ });
70
+
71
+ // Lookup by code
72
+ const concept = await client.snomed.identifyCode({ code: "84114007" });
73
+ ```
74
+
75
+ ### ICD-10
76
+
77
+ ```typescript
78
+ // Search with billing filter
79
+ const results = await client.icd10.searchCode({
80
+ query: "diabetes",
81
+ billingOnly: true,
82
+ limit: 20,
83
+ });
84
+
85
+ // Lookup specific code
86
+ const code = await client.icd10.identifyCode({ code: "E11.9" });
87
+
88
+ // Get all chapters
89
+ const chapters = await client.icd10.getChapters();
90
+ ```
91
+
92
+ ### CPT/HCPCS
93
+
94
+ ```typescript
95
+ // Search CPT codes
96
+ const cptResults = await client.cpt.searchCode({ query: "colonoscopy" });
97
+
98
+ // Get cost/RVU data
99
+ const cost = await client.cpt.getCost({ code: "45378" });
100
+
101
+ // Get ICD-10 linking terms
102
+ const linkTerms = await client.cpt.linkIcd10({ code: "99213" });
103
+
104
+ // Search HCPCS codes
105
+ const hcpcsResults = await client.hcpcs.searchCode({ query: "wheelchair" });
106
+ ```
107
+
108
+ ### LOINC
109
+
110
+ ```typescript
111
+ // Search lab tests
112
+ const results = await client.loinc.searchCode({ query: "glucose" });
113
+
114
+ // Lookup specific code
115
+ const test = await client.loinc.identifyCode({ code: "2345-7" });
116
+
117
+ // Get panel members
118
+ const panel = await client.loinc.getPanelMembers({ code: "24323-8" });
119
+ ```
120
+
121
+ ### RxNorm
122
+
123
+ ```typescript
124
+ // Search drugs
125
+ const results = await client.rxnorm.searchCode({ query: "metformin" });
126
+
127
+ // Lookup by NDC
128
+ const ndcResult = await client.rxnorm.identifyCode({
129
+ type: "ndc",
130
+ code: "0002-4112-01",
131
+ });
132
+
133
+ // Lookup by RXCUI
134
+ const rxcuiResult = await client.rxnorm.identifyCode({
135
+ type: "rxcui",
136
+ code: "861004",
137
+ });
138
+
139
+ // Get active ingredients
140
+ const ingredients = await client.rxnorm.getIngredients({ rxcui: "861004" });
141
+ ```
142
+
143
+ ### Guidelines (LCD/NCD)
144
+
145
+ ```typescript
146
+ // Search LCD guidelines
147
+ const lcdResults = await client.lcd.searchGuidelines({ query: "MRI" });
148
+
149
+ // Lookup specific LCD
150
+ const lcd = await client.lcd.identifyGuideline({ id: "L33288" });
151
+
152
+ // Search NCD guidelines
153
+ const ncdResults = await client.ncd.searchGuidelines({ query: "oxygen" });
154
+
155
+ // Lookup NCD by section
156
+ const ncd = await client.ncd.identifyGuideline({ section: "220.6" });
157
+ ```
158
+
159
+ ### Clinical Orchestrator
160
+
161
+ ```typescript
162
+ // Check coverage for CPT + ICD-10 pair
163
+ const coverage = await client.clinical.checkCoverage({
164
+ cpt_code: "99213",
165
+ icd10_code: "E11.9",
166
+ });
167
+
168
+ // Map diagnosis to procedures
169
+ const procedures = await client.clinical.getProceduresForDiagnosis({
170
+ icd10_code: "M17.11",
171
+ });
172
+
173
+ // Get metadata from all engines
174
+ const metadata = await client.clinical.getMetadata();
175
+ ```
176
+
177
+ ### System
178
+
179
+ ```typescript
180
+ // Health check
181
+ const health = await client.system.health();
182
+
183
+ // Get async result
184
+ const result = await client.system.getResult({ request_id: "abc123" });
185
+ ```
186
+
187
+ ## Configuration
188
+
189
+ ```typescript
190
+ const client = new SequoiaCodesClient({
191
+ apiKey: "your-api-key",
192
+ baseUrl: "https://api.sequoiacodes.com", // optional
193
+ version: "v1", // optional
194
+ });
195
+ ```
196
+
197
+ ## Error Handling
198
+
199
+ ```typescript
200
+ import { SequoiaCodesClient, CodesApiError } from "@sequoiaport/codes";
201
+
202
+ try {
203
+ const result = await client.icd10.searchCode({ query: "test" });
204
+ } catch (error) {
205
+ if (error instanceof CodesApiError) {
206
+ console.error(`API Error ${error.status}: ${error.message}`);
207
+ console.error(`Action: ${error.action}`);
208
+ }
209
+ }
210
+ ```
211
+
212
+ ## TypeScript Support
213
+
214
+ All methods are fully typed. Import types as needed:
215
+
216
+ ```typescript
217
+ import type {
218
+ SnomedConcept,
219
+ Icd10Code,
220
+ CPTCode,
221
+ LoincCode,
222
+ RxnormDrug,
223
+ } from "@sequoiaport/codes";
224
+ ```
225
+
226
+ ## Agent Skills
227
+
228
+ This SDK includes agent skills compatible with the [Vercel Agent Skills](https://skills.sh) ecosystem. Skills give AI coding agents the knowledge to use the Sequoia Codes SDK for medical coding tasks.
229
+
230
+ ### Install Skills
231
+
232
+ ```bash
233
+ # Install all skills from this repo
234
+ npx skills add @sequoiaport/codes
235
+
236
+ # Or install individual skills
237
+ npx skills add @sequoiaport/codes/medical-codes
238
+ npx skills add @sequoiaport/codes/icd10-codes
239
+ npx skills add @sequoiaport/codes/cpt-codes
240
+ npx skills add @sequoiaport/codes/snomed-codes
241
+ npx skills add @sequoiaport/codes/hcpcs-codes
242
+ npx skills add @sequoiaport/codes/loinc-codes
243
+ npx skills add @sequoiaport/codes/rxnorm-codes
244
+ ```
245
+
246
+ ### Available Skills
247
+
248
+ | Skill | Description |
249
+ |-------|-------------|
250
+ | `medical-codes` | Comprehensive skill covering all coding systems, guidelines, and clinical orchestration |
251
+ | `icd10-codes` | ICD-10 diagnosis code search and lookup |
252
+ | `cpt-codes` | CPT procedure code search, lookup, cost/RVU, and ICD-10 linking |
253
+ | `snomed-codes` | SNOMED CT clinical terminology search and lookup |
254
+ | `hcpcs-codes` | HCPCS Level II code search, lookup, and cost |
255
+ | `loinc-codes` | LOINC laboratory test code search, lookup, and panel members |
256
+ | `rxnorm-codes` | RxNorm drug code search, NDC/RXCUI lookup, and ingredients |
257
+
258
+ Skills are compatible with Claude Code, Cursor, GitHub Copilot, Gemini, and [17+ other agents](https://skills.sh).
259
+
260
+ ## License
261
+
262
+ MIT