@sequoiaport/codes 0.1.0-beta.2 → 0.1.0-beta.4
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/AGENT_PROMPT.md +44 -78
- package/README.md +2 -2
- package/package.json +1 -1
package/AGENT_PROMPT.md
CHANGED
|
@@ -4,7 +4,7 @@ You now have access to the SequoiaCodex medical coding API. Use it to search and
|
|
|
4
4
|
|
|
5
5
|
## CRITICAL: Take things one step at a time
|
|
6
6
|
|
|
7
|
-
Do NOT try to do everything at once. Complete **Setup** fully before moving on to
|
|
7
|
+
Do NOT try to do everything at once. Complete each step in **Setup** fully before moving on to the next.
|
|
8
8
|
|
|
9
9
|
## Domain Guide — READ THIS CAREFULLY
|
|
10
10
|
|
|
@@ -17,13 +17,11 @@ There are TWO different domains. Using the wrong one will fail.
|
|
|
17
17
|
|
|
18
18
|
# Setup
|
|
19
19
|
|
|
20
|
-
Complete
|
|
20
|
+
Complete all steps below in order before making any API queries.
|
|
21
21
|
|
|
22
22
|
## Step 1: Get an API key
|
|
23
23
|
|
|
24
|
-
**Before doing anything else**,
|
|
25
|
-
|
|
26
|
-
**Only if no key is found**, ask the user:
|
|
24
|
+
**Before doing anything else**, ask the user:
|
|
27
25
|
|
|
28
26
|
> "Do you already have a SequoiaCodex API key, or would you like me to generate one for you?"
|
|
29
27
|
|
|
@@ -85,91 +83,59 @@ When status is `"completed"`, the response includes the API key:
|
|
|
85
83
|
|
|
86
84
|
**Store this key securely — it is only returned once.** The session expires after 10 minutes.
|
|
87
85
|
|
|
88
|
-
|
|
86
|
+
Display the full key to the user in this format:
|
|
89
87
|
|
|
90
|
-
|
|
88
|
+
```
|
|
89
|
+
SEQUOIA_CODES_API_KEY=sk_live_seq_abc123... (show the whole key)
|
|
90
|
+
```
|
|
91
91
|
|
|
92
|
-
**
|
|
92
|
+
Show the **complete key** — this is the only time it will ever be returned, so the user must be able to copy it.
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
## Step 2: Determine your environment
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
After you have the API key, figure out what kind of environment you are running in. This determines how you integrate.
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
### Option A: You are in a user's codebase
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
You can tell if you're in a codebase if there is a `package.json`, project files, a git repo, etc.
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
Ask the user:
|
|
103
103
|
|
|
104
|
-
|
|
105
|
-
Base URL: https://api.sequoiacodes.com
|
|
106
|
-
Auth header: Authorization: Bearer {api_key}
|
|
107
|
-
Method: GET for all endpoints
|
|
108
|
-
URL pattern: /v1/{system}/{action}?{params}
|
|
109
|
-
```
|
|
104
|
+
> "Would you like me to set up the SequoiaCodex SDK in your project? I'll install the package and configure it with your API key."
|
|
110
105
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
| System | Action | Params |
|
|
114
|
-
|----------|---------------------------|------------------------------------|
|
|
115
|
-
| icd10 | searchCode | query, limit?, billingOnly? |
|
|
116
|
-
| icd10 | identifyCode | code |
|
|
117
|
-
| icd10 | getChapters | (none) |
|
|
118
|
-
| cpt | searchCode | query, limit? |
|
|
119
|
-
| cpt | identifyCode | code |
|
|
120
|
-
| cpt | getCost | code |
|
|
121
|
-
| cpt | linkIcd10 | code |
|
|
122
|
-
| hcpcs | searchCode | query, limit? |
|
|
123
|
-
| hcpcs | identifyCode | code |
|
|
124
|
-
| hcpcs | getCost | code |
|
|
125
|
-
| snomed | searchCode | query, limit? |
|
|
126
|
-
| snomed | identifyCode | code |
|
|
127
|
-
| rxnorm | searchCode | query, limit? |
|
|
128
|
-
| rxnorm | identifyCode | type (ndc or rxcui), code |
|
|
129
|
-
| rxnorm | getIngredients | rxcui |
|
|
130
|
-
| loinc | searchCode | query, limit? |
|
|
131
|
-
| loinc | identifyCode | code |
|
|
132
|
-
| loinc | getPanelMembers | code |
|
|
133
|
-
| lcd | searchGuidelines | query, limit? |
|
|
134
|
-
| lcd | identifyGuideline | id |
|
|
135
|
-
| ncd | searchGuidelines | query, limit? |
|
|
136
|
-
| ncd | identifyGuideline | id?, section? |
|
|
137
|
-
| clinical | checkCoverage | (see /v1/clinical/getMetadata) |
|
|
138
|
-
| clinical | getProceduresForDiagnosis | (see /v1/clinical/getMetadata) |
|
|
139
|
-
| clinical | getMetadata | (none) |
|
|
140
|
-
|
|
141
|
-
All search endpoints accept `query` (string) and optional `limit` (1–200).
|
|
142
|
-
Use `searchCode` to find codes by description. Use `identifyCode` to look up a specific code.
|
|
143
|
-
|
|
144
|
-
### Example
|
|
106
|
+
- **If they agree**: Run `npm install @sequoiaport/codes` (or the appropriate package manager), then add `SEQUOIA_CODES_API_KEY` to the project's `.env` or `.env.local` file. Then proceed to Step 3.
|
|
107
|
+
- **If they decline**: Keep the key in memory for the current session and proceed to Step 3.
|
|
145
108
|
|
|
146
|
-
|
|
147
|
-
curl -s "https://api.sequoiacodes.com/v1/icd10/searchCode?query=hypertension" \
|
|
148
|
-
-H "Authorization: Bearer sk_live_seq_..."
|
|
149
|
-
```
|
|
109
|
+
### Option B: You are an agent in your own sandbox/environment
|
|
150
110
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
111
|
+
You are in a standalone agent environment (no user codebase — e.g., a chat agent, Claude Desktop, an AI sandbox).
|
|
112
|
+
|
|
113
|
+
Ask the user:
|
|
114
|
+
|
|
115
|
+
> "Would you like me to install SequoiaCodex as a skill so I can query medical codes natively? This will give me direct access to all code search and lookup tools."
|
|
116
|
+
|
|
117
|
+
- **If they agree**:
|
|
118
|
+
1. Run `npx skills add sequoia-port/codes` to download the skills and MCP server configuration.
|
|
119
|
+
2. Read the downloaded skill files for MCP setup instructions.
|
|
120
|
+
3. Configure the MCP server with the API key so you have native tool access.
|
|
121
|
+
4. Once the MCP server is running, you now have direct tool access — proceed to Step 3.
|
|
122
|
+
- **If they decline**: Keep the key in memory for the current session and proceed to Step 3.
|
|
123
|
+
|
|
124
|
+
### Option C: Neither — no shell access or isolated environment
|
|
125
|
+
|
|
126
|
+
If you cannot run commands or determine your environment, simply show the user the API key and tell them:
|
|
127
|
+
|
|
128
|
+
> "Here's your API key. You can use it to query the SequoiaCodex API directly. See the documentation for endpoint details."
|
|
129
|
+
|
|
130
|
+
Then proceed to Step 3.
|
|
131
|
+
|
|
132
|
+
## Step 3: Read the documentation
|
|
133
|
+
|
|
134
|
+
For full endpoint details, parameter descriptions, response schemas, and usage examples, refer to the GitHub README:
|
|
135
|
+
|
|
136
|
+
**https://github.com/Sequoia-Port/codes**
|
|
171
137
|
|
|
172
|
-
|
|
138
|
+
Do NOT guess at endpoints or parameters — always consult the docs first.
|
|
173
139
|
|
|
174
140
|
---
|
|
175
141
|
|
package/README.md
CHANGED
|
@@ -234,7 +234,7 @@ This SDK includes agent skills compatible with the [Vercel Agent Skills](https:/
|
|
|
234
234
|
npx skills add sequoia-port/codes
|
|
235
235
|
|
|
236
236
|
# Or install individual skills
|
|
237
|
-
npx skills add sequoia-port/codes/
|
|
237
|
+
npx skills add sequoia-port/codes/icd-10-codes
|
|
238
238
|
npx skills add sequoia-port/codes/cpt-codes
|
|
239
239
|
npx skills add sequoia-port/codes/snomed-codes
|
|
240
240
|
npx skills add sequoia-port/codes/hcpcs-codes
|
|
@@ -246,7 +246,7 @@ npx skills add sequoia-port/codes/rxnorm-codes
|
|
|
246
246
|
|
|
247
247
|
| Skill | Description |
|
|
248
248
|
|-------|-------------|
|
|
249
|
-
| `
|
|
249
|
+
| `icd-10-codes` | ICD-10 diagnosis code search and lookup |
|
|
250
250
|
| `cpt-codes` | CPT procedure code search, lookup, cost/RVU, and ICD-10 linking |
|
|
251
251
|
| `snomed-codes` | SNOMED CT clinical terminology search and lookup |
|
|
252
252
|
| `hcpcs-codes` | HCPCS Level II code search, lookup, and cost |
|
package/package.json
CHANGED