@sequoiaport/codes 0.1.1 → 0.1.2-beta.2
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/README.md +34 -3
- package/dist/index.d.mts +546 -3
- package/dist/index.d.ts +546 -3
- package/dist/index.js +59 -0
- package/dist/index.mjs +58 -0
- package/dist/mcp.js +57 -0
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Official TypeScript/JavaScript SDK for the [Sequoia Codes API](https://sequoiacodes.com) — a unified API for medical code search and lookup.
|
|
4
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.
|
|
5
|
+
Query **ICD-10**, **CPT**, **HCPCS**, **SNOMED CT**, **LOINC**, and **RxNorm** codes through a single client. The SDK also covers **LCD/NCD** coverage guidelines, **Life Expectancy** actuarial tables (CDC/CMS WCMSA standard), and a **clinical orchestrator** for cross-system operations like coverage checks and diagnosis-to-procedure mapping.
|
|
6
6
|
|
|
7
7
|
- Fully typed with Zod-validated responses
|
|
8
8
|
- Supports both ESM and CommonJS
|
|
@@ -47,6 +47,10 @@ console.log(cptResults.results);
|
|
|
47
47
|
- **`client.loinc`** - LOINC laboratory test codes
|
|
48
48
|
- **`client.rxnorm`** - RxNorm drug/medication codes
|
|
49
49
|
|
|
50
|
+
### Actuarial / Reference Data
|
|
51
|
+
|
|
52
|
+
- **`client.lifeExpectancy`** - CDC/CMS WCMSA life expectancy actuarial tables
|
|
53
|
+
|
|
50
54
|
### Guidelines
|
|
51
55
|
|
|
52
56
|
- **`client.lcd`** - Local Coverage Determinations
|
|
@@ -156,6 +160,29 @@ const ncdResults = await client.ncd.searchGuidelines({ query: "oxygen" });
|
|
|
156
160
|
const ncd = await client.ncd.identifyGuideline({ section: "220.6" });
|
|
157
161
|
```
|
|
158
162
|
|
|
163
|
+
### Life Expectancy
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
// Look up life expectancy for a 65-year-old
|
|
167
|
+
const le = await client.lifeExpectancy.lookupByAge({ age: 65 });
|
|
168
|
+
console.log(le.result?.ex); // e.g. 19.09 years
|
|
169
|
+
|
|
170
|
+
// Batch lookup for multiple ages
|
|
171
|
+
const batch = await client.lifeExpectancy.lookupBatch({
|
|
172
|
+
ages: [30, 50, 70],
|
|
173
|
+
gender: "female",
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
// Get the full actuarial life table
|
|
177
|
+
const table = await client.lifeExpectancy.getTable({ gender: "total" });
|
|
178
|
+
|
|
179
|
+
// Get active dataset version metadata
|
|
180
|
+
const version = await client.lifeExpectancy.getVersion();
|
|
181
|
+
|
|
182
|
+
// Health check
|
|
183
|
+
const health = await client.lifeExpectancy.health();
|
|
184
|
+
```
|
|
185
|
+
|
|
159
186
|
### Clinical Orchestrator
|
|
160
187
|
|
|
161
188
|
```typescript
|
|
@@ -220,6 +247,8 @@ import type {
|
|
|
220
247
|
CPTCode,
|
|
221
248
|
LoincCode,
|
|
222
249
|
RxnormDrug,
|
|
250
|
+
LifeExpectancyResult,
|
|
251
|
+
LEVersionInfo,
|
|
223
252
|
} from "@sequoiaport/codes";
|
|
224
253
|
```
|
|
225
254
|
|
|
@@ -234,24 +263,26 @@ This SDK includes agent skills compatible with the [Vercel Agent Skills](https:/
|
|
|
234
263
|
npx skills add sequoia-port/codes
|
|
235
264
|
|
|
236
265
|
# Or install individual skills
|
|
237
|
-
npx skills add sequoia-port/codes --skill
|
|
266
|
+
npx skills add sequoia-port/codes --skill icd10-codes
|
|
238
267
|
npx skills add sequoia-port/codes --skill cpt-codes
|
|
239
268
|
npx skills add sequoia-port/codes --skill snomed-codes
|
|
240
269
|
npx skills add sequoia-port/codes --skill hcpcs-codes
|
|
241
270
|
npx skills add sequoia-port/codes --skill loinc-codes
|
|
242
271
|
npx skills add sequoia-port/codes --skill rxnorm-codes
|
|
272
|
+
npx skills add sequoia-port/codes --skill life-expectancy
|
|
243
273
|
```
|
|
244
274
|
|
|
245
275
|
### Available Skills
|
|
246
276
|
|
|
247
277
|
| Skill | Description |
|
|
248
278
|
|-------|-------------|
|
|
249
|
-
| `
|
|
279
|
+
| `icd10-codes` | ICD-10 diagnosis code search and lookup |
|
|
250
280
|
| `cpt-codes` | CPT procedure code search, lookup, cost/RVU, and ICD-10 linking |
|
|
251
281
|
| `snomed-codes` | SNOMED CT clinical terminology search and lookup |
|
|
252
282
|
| `hcpcs-codes` | HCPCS Level II code search, lookup, and cost |
|
|
253
283
|
| `loinc-codes` | LOINC laboratory test code search, lookup, and panel members |
|
|
254
284
|
| `rxnorm-codes` | RxNorm drug code search, NDC/RXCUI lookup, and ingredients |
|
|
285
|
+
| `life-expectancy` | CDC/CMS life expectancy actuarial table lookups for WCMSA calculations |
|
|
255
286
|
|
|
256
287
|
Skills are compatible with Claude Code, Cursor, GitHub Copilot, Gemini, and [17+ other agents](https://skills.sh).
|
|
257
288
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1757,6 +1757,489 @@ type RxnormLookupNdcOutput = z.infer<typeof LookupNdcOutputSchema>;
|
|
|
1757
1757
|
type RxnormLookupRxcuiOutput = z.infer<typeof LookupRxcuiOutputSchema>;
|
|
1758
1758
|
type RxnormGetIngredientsOutput = z.infer<typeof GetIngredientsOutputSchema>;
|
|
1759
1759
|
|
|
1760
|
+
/** Life expectancy result for a single age/gender combination */
|
|
1761
|
+
declare const LifeExpectancyResultSchema: z.ZodObject<{
|
|
1762
|
+
age_start: z.ZodNumber;
|
|
1763
|
+
age_end: z.ZodNullable<z.ZodNumber>;
|
|
1764
|
+
gender: z.ZodEnum<["male", "female", "total"]>;
|
|
1765
|
+
data_year: z.ZodNumber;
|
|
1766
|
+
source: z.ZodString;
|
|
1767
|
+
qx: z.ZodNumber;
|
|
1768
|
+
lx: z.ZodNumber;
|
|
1769
|
+
dx: z.ZodNumber;
|
|
1770
|
+
lx_person_years: z.ZodNumber;
|
|
1771
|
+
tx: z.ZodNumber;
|
|
1772
|
+
ex: z.ZodNumber;
|
|
1773
|
+
nvsr_volume: z.ZodOptional<z.ZodNumber>;
|
|
1774
|
+
nvsr_issue: z.ZodOptional<z.ZodNumber>;
|
|
1775
|
+
cms_reference: z.ZodOptional<z.ZodString>;
|
|
1776
|
+
}, "strip", z.ZodTypeAny, {
|
|
1777
|
+
source: string;
|
|
1778
|
+
age_start: number;
|
|
1779
|
+
age_end: number | null;
|
|
1780
|
+
gender: "male" | "female" | "total";
|
|
1781
|
+
data_year: number;
|
|
1782
|
+
qx: number;
|
|
1783
|
+
lx: number;
|
|
1784
|
+
dx: number;
|
|
1785
|
+
lx_person_years: number;
|
|
1786
|
+
tx: number;
|
|
1787
|
+
ex: number;
|
|
1788
|
+
nvsr_volume?: number | undefined;
|
|
1789
|
+
nvsr_issue?: number | undefined;
|
|
1790
|
+
cms_reference?: string | undefined;
|
|
1791
|
+
}, {
|
|
1792
|
+
source: string;
|
|
1793
|
+
age_start: number;
|
|
1794
|
+
age_end: number | null;
|
|
1795
|
+
gender: "male" | "female" | "total";
|
|
1796
|
+
data_year: number;
|
|
1797
|
+
qx: number;
|
|
1798
|
+
lx: number;
|
|
1799
|
+
dx: number;
|
|
1800
|
+
lx_person_years: number;
|
|
1801
|
+
tx: number;
|
|
1802
|
+
ex: number;
|
|
1803
|
+
nvsr_volume?: number | undefined;
|
|
1804
|
+
nvsr_issue?: number | undefined;
|
|
1805
|
+
cms_reference?: string | undefined;
|
|
1806
|
+
}>;
|
|
1807
|
+
/** Version metadata for a life table dataset */
|
|
1808
|
+
declare const VersionInfoSchema: z.ZodObject<{
|
|
1809
|
+
id: z.ZodNumber;
|
|
1810
|
+
nvsr_volume: z.ZodNumber;
|
|
1811
|
+
nvsr_issue: z.ZodNumber;
|
|
1812
|
+
data_year: z.ZodNumber;
|
|
1813
|
+
gender: z.ZodString;
|
|
1814
|
+
source_url: z.ZodString;
|
|
1815
|
+
cms_reference: z.ZodOptional<z.ZodString>;
|
|
1816
|
+
status: z.ZodString;
|
|
1817
|
+
row_count: z.ZodNumber;
|
|
1818
|
+
ingested_at: z.ZodString;
|
|
1819
|
+
}, "strip", z.ZodTypeAny, {
|
|
1820
|
+
status: string;
|
|
1821
|
+
gender: string;
|
|
1822
|
+
data_year: number;
|
|
1823
|
+
nvsr_volume: number;
|
|
1824
|
+
nvsr_issue: number;
|
|
1825
|
+
id: number;
|
|
1826
|
+
source_url: string;
|
|
1827
|
+
row_count: number;
|
|
1828
|
+
ingested_at: string;
|
|
1829
|
+
cms_reference?: string | undefined;
|
|
1830
|
+
}, {
|
|
1831
|
+
status: string;
|
|
1832
|
+
gender: string;
|
|
1833
|
+
data_year: number;
|
|
1834
|
+
nvsr_volume: number;
|
|
1835
|
+
nvsr_issue: number;
|
|
1836
|
+
id: number;
|
|
1837
|
+
source_url: string;
|
|
1838
|
+
row_count: number;
|
|
1839
|
+
ingested_at: string;
|
|
1840
|
+
cms_reference?: string | undefined;
|
|
1841
|
+
}>;
|
|
1842
|
+
/** lookupByAge output */
|
|
1843
|
+
declare const LookupByAgeOutputSchema: z.ZodObject<{
|
|
1844
|
+
age_start: z.ZodNumber;
|
|
1845
|
+
gender: z.ZodString;
|
|
1846
|
+
found: z.ZodBoolean;
|
|
1847
|
+
result: z.ZodOptional<z.ZodObject<{
|
|
1848
|
+
age_start: z.ZodNumber;
|
|
1849
|
+
age_end: z.ZodNullable<z.ZodNumber>;
|
|
1850
|
+
gender: z.ZodEnum<["male", "female", "total"]>;
|
|
1851
|
+
data_year: z.ZodNumber;
|
|
1852
|
+
source: z.ZodString;
|
|
1853
|
+
qx: z.ZodNumber;
|
|
1854
|
+
lx: z.ZodNumber;
|
|
1855
|
+
dx: z.ZodNumber;
|
|
1856
|
+
lx_person_years: z.ZodNumber;
|
|
1857
|
+
tx: z.ZodNumber;
|
|
1858
|
+
ex: z.ZodNumber;
|
|
1859
|
+
nvsr_volume: z.ZodOptional<z.ZodNumber>;
|
|
1860
|
+
nvsr_issue: z.ZodOptional<z.ZodNumber>;
|
|
1861
|
+
cms_reference: z.ZodOptional<z.ZodString>;
|
|
1862
|
+
}, "strip", z.ZodTypeAny, {
|
|
1863
|
+
source: string;
|
|
1864
|
+
age_start: number;
|
|
1865
|
+
age_end: number | null;
|
|
1866
|
+
gender: "male" | "female" | "total";
|
|
1867
|
+
data_year: number;
|
|
1868
|
+
qx: number;
|
|
1869
|
+
lx: number;
|
|
1870
|
+
dx: number;
|
|
1871
|
+
lx_person_years: number;
|
|
1872
|
+
tx: number;
|
|
1873
|
+
ex: number;
|
|
1874
|
+
nvsr_volume?: number | undefined;
|
|
1875
|
+
nvsr_issue?: number | undefined;
|
|
1876
|
+
cms_reference?: string | undefined;
|
|
1877
|
+
}, {
|
|
1878
|
+
source: string;
|
|
1879
|
+
age_start: number;
|
|
1880
|
+
age_end: number | null;
|
|
1881
|
+
gender: "male" | "female" | "total";
|
|
1882
|
+
data_year: number;
|
|
1883
|
+
qx: number;
|
|
1884
|
+
lx: number;
|
|
1885
|
+
dx: number;
|
|
1886
|
+
lx_person_years: number;
|
|
1887
|
+
tx: number;
|
|
1888
|
+
ex: number;
|
|
1889
|
+
nvsr_volume?: number | undefined;
|
|
1890
|
+
nvsr_issue?: number | undefined;
|
|
1891
|
+
cms_reference?: string | undefined;
|
|
1892
|
+
}>>;
|
|
1893
|
+
}, "strip", z.ZodTypeAny, {
|
|
1894
|
+
found: boolean;
|
|
1895
|
+
age_start: number;
|
|
1896
|
+
gender: string;
|
|
1897
|
+
result?: {
|
|
1898
|
+
source: string;
|
|
1899
|
+
age_start: number;
|
|
1900
|
+
age_end: number | null;
|
|
1901
|
+
gender: "male" | "female" | "total";
|
|
1902
|
+
data_year: number;
|
|
1903
|
+
qx: number;
|
|
1904
|
+
lx: number;
|
|
1905
|
+
dx: number;
|
|
1906
|
+
lx_person_years: number;
|
|
1907
|
+
tx: number;
|
|
1908
|
+
ex: number;
|
|
1909
|
+
nvsr_volume?: number | undefined;
|
|
1910
|
+
nvsr_issue?: number | undefined;
|
|
1911
|
+
cms_reference?: string | undefined;
|
|
1912
|
+
} | undefined;
|
|
1913
|
+
}, {
|
|
1914
|
+
found: boolean;
|
|
1915
|
+
age_start: number;
|
|
1916
|
+
gender: string;
|
|
1917
|
+
result?: {
|
|
1918
|
+
source: string;
|
|
1919
|
+
age_start: number;
|
|
1920
|
+
age_end: number | null;
|
|
1921
|
+
gender: "male" | "female" | "total";
|
|
1922
|
+
data_year: number;
|
|
1923
|
+
qx: number;
|
|
1924
|
+
lx: number;
|
|
1925
|
+
dx: number;
|
|
1926
|
+
lx_person_years: number;
|
|
1927
|
+
tx: number;
|
|
1928
|
+
ex: number;
|
|
1929
|
+
nvsr_volume?: number | undefined;
|
|
1930
|
+
nvsr_issue?: number | undefined;
|
|
1931
|
+
cms_reference?: string | undefined;
|
|
1932
|
+
} | undefined;
|
|
1933
|
+
}>;
|
|
1934
|
+
/** lookupBatch output */
|
|
1935
|
+
declare const LookupBatchOutputSchema: z.ZodObject<{
|
|
1936
|
+
gender: z.ZodString;
|
|
1937
|
+
count: z.ZodNumber;
|
|
1938
|
+
results: z.ZodArray<z.ZodObject<{
|
|
1939
|
+
age_start: z.ZodNumber;
|
|
1940
|
+
age_end: z.ZodNullable<z.ZodNumber>;
|
|
1941
|
+
gender: z.ZodEnum<["male", "female", "total"]>;
|
|
1942
|
+
data_year: z.ZodNumber;
|
|
1943
|
+
source: z.ZodString;
|
|
1944
|
+
qx: z.ZodNumber;
|
|
1945
|
+
lx: z.ZodNumber;
|
|
1946
|
+
dx: z.ZodNumber;
|
|
1947
|
+
lx_person_years: z.ZodNumber;
|
|
1948
|
+
tx: z.ZodNumber;
|
|
1949
|
+
ex: z.ZodNumber;
|
|
1950
|
+
nvsr_volume: z.ZodOptional<z.ZodNumber>;
|
|
1951
|
+
nvsr_issue: z.ZodOptional<z.ZodNumber>;
|
|
1952
|
+
cms_reference: z.ZodOptional<z.ZodString>;
|
|
1953
|
+
}, "strip", z.ZodTypeAny, {
|
|
1954
|
+
source: string;
|
|
1955
|
+
age_start: number;
|
|
1956
|
+
age_end: number | null;
|
|
1957
|
+
gender: "male" | "female" | "total";
|
|
1958
|
+
data_year: number;
|
|
1959
|
+
qx: number;
|
|
1960
|
+
lx: number;
|
|
1961
|
+
dx: number;
|
|
1962
|
+
lx_person_years: number;
|
|
1963
|
+
tx: number;
|
|
1964
|
+
ex: number;
|
|
1965
|
+
nvsr_volume?: number | undefined;
|
|
1966
|
+
nvsr_issue?: number | undefined;
|
|
1967
|
+
cms_reference?: string | undefined;
|
|
1968
|
+
}, {
|
|
1969
|
+
source: string;
|
|
1970
|
+
age_start: number;
|
|
1971
|
+
age_end: number | null;
|
|
1972
|
+
gender: "male" | "female" | "total";
|
|
1973
|
+
data_year: number;
|
|
1974
|
+
qx: number;
|
|
1975
|
+
lx: number;
|
|
1976
|
+
dx: number;
|
|
1977
|
+
lx_person_years: number;
|
|
1978
|
+
tx: number;
|
|
1979
|
+
ex: number;
|
|
1980
|
+
nvsr_volume?: number | undefined;
|
|
1981
|
+
nvsr_issue?: number | undefined;
|
|
1982
|
+
cms_reference?: string | undefined;
|
|
1983
|
+
}>, "many">;
|
|
1984
|
+
}, "strip", z.ZodTypeAny, {
|
|
1985
|
+
count: number;
|
|
1986
|
+
results: {
|
|
1987
|
+
source: string;
|
|
1988
|
+
age_start: number;
|
|
1989
|
+
age_end: number | null;
|
|
1990
|
+
gender: "male" | "female" | "total";
|
|
1991
|
+
data_year: number;
|
|
1992
|
+
qx: number;
|
|
1993
|
+
lx: number;
|
|
1994
|
+
dx: number;
|
|
1995
|
+
lx_person_years: number;
|
|
1996
|
+
tx: number;
|
|
1997
|
+
ex: number;
|
|
1998
|
+
nvsr_volume?: number | undefined;
|
|
1999
|
+
nvsr_issue?: number | undefined;
|
|
2000
|
+
cms_reference?: string | undefined;
|
|
2001
|
+
}[];
|
|
2002
|
+
gender: string;
|
|
2003
|
+
}, {
|
|
2004
|
+
count: number;
|
|
2005
|
+
results: {
|
|
2006
|
+
source: string;
|
|
2007
|
+
age_start: number;
|
|
2008
|
+
age_end: number | null;
|
|
2009
|
+
gender: "male" | "female" | "total";
|
|
2010
|
+
data_year: number;
|
|
2011
|
+
qx: number;
|
|
2012
|
+
lx: number;
|
|
2013
|
+
dx: number;
|
|
2014
|
+
lx_person_years: number;
|
|
2015
|
+
tx: number;
|
|
2016
|
+
ex: number;
|
|
2017
|
+
nvsr_volume?: number | undefined;
|
|
2018
|
+
nvsr_issue?: number | undefined;
|
|
2019
|
+
cms_reference?: string | undefined;
|
|
2020
|
+
}[];
|
|
2021
|
+
gender: string;
|
|
2022
|
+
}>;
|
|
2023
|
+
/** getTable output */
|
|
2024
|
+
declare const GetTableOutputSchema: z.ZodObject<{
|
|
2025
|
+
gender: z.ZodString;
|
|
2026
|
+
min_age: z.ZodNumber;
|
|
2027
|
+
max_age: z.ZodNumber;
|
|
2028
|
+
count: z.ZodNumber;
|
|
2029
|
+
results: z.ZodArray<z.ZodObject<{
|
|
2030
|
+
age_start: z.ZodNumber;
|
|
2031
|
+
age_end: z.ZodNullable<z.ZodNumber>;
|
|
2032
|
+
gender: z.ZodEnum<["male", "female", "total"]>;
|
|
2033
|
+
data_year: z.ZodNumber;
|
|
2034
|
+
source: z.ZodString;
|
|
2035
|
+
qx: z.ZodNumber;
|
|
2036
|
+
lx: z.ZodNumber;
|
|
2037
|
+
dx: z.ZodNumber;
|
|
2038
|
+
lx_person_years: z.ZodNumber;
|
|
2039
|
+
tx: z.ZodNumber;
|
|
2040
|
+
ex: z.ZodNumber;
|
|
2041
|
+
nvsr_volume: z.ZodOptional<z.ZodNumber>;
|
|
2042
|
+
nvsr_issue: z.ZodOptional<z.ZodNumber>;
|
|
2043
|
+
cms_reference: z.ZodOptional<z.ZodString>;
|
|
2044
|
+
}, "strip", z.ZodTypeAny, {
|
|
2045
|
+
source: string;
|
|
2046
|
+
age_start: number;
|
|
2047
|
+
age_end: number | null;
|
|
2048
|
+
gender: "male" | "female" | "total";
|
|
2049
|
+
data_year: number;
|
|
2050
|
+
qx: number;
|
|
2051
|
+
lx: number;
|
|
2052
|
+
dx: number;
|
|
2053
|
+
lx_person_years: number;
|
|
2054
|
+
tx: number;
|
|
2055
|
+
ex: number;
|
|
2056
|
+
nvsr_volume?: number | undefined;
|
|
2057
|
+
nvsr_issue?: number | undefined;
|
|
2058
|
+
cms_reference?: string | undefined;
|
|
2059
|
+
}, {
|
|
2060
|
+
source: string;
|
|
2061
|
+
age_start: number;
|
|
2062
|
+
age_end: number | null;
|
|
2063
|
+
gender: "male" | "female" | "total";
|
|
2064
|
+
data_year: number;
|
|
2065
|
+
qx: number;
|
|
2066
|
+
lx: number;
|
|
2067
|
+
dx: number;
|
|
2068
|
+
lx_person_years: number;
|
|
2069
|
+
tx: number;
|
|
2070
|
+
ex: number;
|
|
2071
|
+
nvsr_volume?: number | undefined;
|
|
2072
|
+
nvsr_issue?: number | undefined;
|
|
2073
|
+
cms_reference?: string | undefined;
|
|
2074
|
+
}>, "many">;
|
|
2075
|
+
}, "strip", z.ZodTypeAny, {
|
|
2076
|
+
count: number;
|
|
2077
|
+
results: {
|
|
2078
|
+
source: string;
|
|
2079
|
+
age_start: number;
|
|
2080
|
+
age_end: number | null;
|
|
2081
|
+
gender: "male" | "female" | "total";
|
|
2082
|
+
data_year: number;
|
|
2083
|
+
qx: number;
|
|
2084
|
+
lx: number;
|
|
2085
|
+
dx: number;
|
|
2086
|
+
lx_person_years: number;
|
|
2087
|
+
tx: number;
|
|
2088
|
+
ex: number;
|
|
2089
|
+
nvsr_volume?: number | undefined;
|
|
2090
|
+
nvsr_issue?: number | undefined;
|
|
2091
|
+
cms_reference?: string | undefined;
|
|
2092
|
+
}[];
|
|
2093
|
+
gender: string;
|
|
2094
|
+
min_age: number;
|
|
2095
|
+
max_age: number;
|
|
2096
|
+
}, {
|
|
2097
|
+
count: number;
|
|
2098
|
+
results: {
|
|
2099
|
+
source: string;
|
|
2100
|
+
age_start: number;
|
|
2101
|
+
age_end: number | null;
|
|
2102
|
+
gender: "male" | "female" | "total";
|
|
2103
|
+
data_year: number;
|
|
2104
|
+
qx: number;
|
|
2105
|
+
lx: number;
|
|
2106
|
+
dx: number;
|
|
2107
|
+
lx_person_years: number;
|
|
2108
|
+
tx: number;
|
|
2109
|
+
ex: number;
|
|
2110
|
+
nvsr_volume?: number | undefined;
|
|
2111
|
+
nvsr_issue?: number | undefined;
|
|
2112
|
+
cms_reference?: string | undefined;
|
|
2113
|
+
}[];
|
|
2114
|
+
gender: string;
|
|
2115
|
+
min_age: number;
|
|
2116
|
+
max_age: number;
|
|
2117
|
+
}>;
|
|
2118
|
+
/** getVersion output */
|
|
2119
|
+
declare const GetVersionOutputSchema: z.ZodObject<{
|
|
2120
|
+
count: z.ZodNumber;
|
|
2121
|
+
versions: z.ZodArray<z.ZodObject<{
|
|
2122
|
+
id: z.ZodNumber;
|
|
2123
|
+
nvsr_volume: z.ZodNumber;
|
|
2124
|
+
nvsr_issue: z.ZodNumber;
|
|
2125
|
+
data_year: z.ZodNumber;
|
|
2126
|
+
gender: z.ZodString;
|
|
2127
|
+
source_url: z.ZodString;
|
|
2128
|
+
cms_reference: z.ZodOptional<z.ZodString>;
|
|
2129
|
+
status: z.ZodString;
|
|
2130
|
+
row_count: z.ZodNumber;
|
|
2131
|
+
ingested_at: z.ZodString;
|
|
2132
|
+
}, "strip", z.ZodTypeAny, {
|
|
2133
|
+
status: string;
|
|
2134
|
+
gender: string;
|
|
2135
|
+
data_year: number;
|
|
2136
|
+
nvsr_volume: number;
|
|
2137
|
+
nvsr_issue: number;
|
|
2138
|
+
id: number;
|
|
2139
|
+
source_url: string;
|
|
2140
|
+
row_count: number;
|
|
2141
|
+
ingested_at: string;
|
|
2142
|
+
cms_reference?: string | undefined;
|
|
2143
|
+
}, {
|
|
2144
|
+
status: string;
|
|
2145
|
+
gender: string;
|
|
2146
|
+
data_year: number;
|
|
2147
|
+
nvsr_volume: number;
|
|
2148
|
+
nvsr_issue: number;
|
|
2149
|
+
id: number;
|
|
2150
|
+
source_url: string;
|
|
2151
|
+
row_count: number;
|
|
2152
|
+
ingested_at: string;
|
|
2153
|
+
cms_reference?: string | undefined;
|
|
2154
|
+
}>, "many">;
|
|
2155
|
+
}, "strip", z.ZodTypeAny, {
|
|
2156
|
+
count: number;
|
|
2157
|
+
versions: {
|
|
2158
|
+
status: string;
|
|
2159
|
+
gender: string;
|
|
2160
|
+
data_year: number;
|
|
2161
|
+
nvsr_volume: number;
|
|
2162
|
+
nvsr_issue: number;
|
|
2163
|
+
id: number;
|
|
2164
|
+
source_url: string;
|
|
2165
|
+
row_count: number;
|
|
2166
|
+
ingested_at: string;
|
|
2167
|
+
cms_reference?: string | undefined;
|
|
2168
|
+
}[];
|
|
2169
|
+
}, {
|
|
2170
|
+
count: number;
|
|
2171
|
+
versions: {
|
|
2172
|
+
status: string;
|
|
2173
|
+
gender: string;
|
|
2174
|
+
data_year: number;
|
|
2175
|
+
nvsr_volume: number;
|
|
2176
|
+
nvsr_issue: number;
|
|
2177
|
+
id: number;
|
|
2178
|
+
source_url: string;
|
|
2179
|
+
row_count: number;
|
|
2180
|
+
ingested_at: string;
|
|
2181
|
+
cms_reference?: string | undefined;
|
|
2182
|
+
}[];
|
|
2183
|
+
}>;
|
|
2184
|
+
/** health output */
|
|
2185
|
+
declare const LEHealthOutputSchema: z.ZodObject<{
|
|
2186
|
+
status: z.ZodEnum<["healthy", "degraded"]>;
|
|
2187
|
+
engine: z.ZodOptional<z.ZodString>;
|
|
2188
|
+
version: z.ZodOptional<z.ZodString>;
|
|
2189
|
+
database: z.ZodOptional<z.ZodObject<{
|
|
2190
|
+
status: z.ZodString;
|
|
2191
|
+
total_conns: z.ZodOptional<z.ZodNumber>;
|
|
2192
|
+
idle_conns: z.ZodOptional<z.ZodNumber>;
|
|
2193
|
+
acquired_conns: z.ZodOptional<z.ZodNumber>;
|
|
2194
|
+
}, "strip", z.ZodTypeAny, {
|
|
2195
|
+
status: string;
|
|
2196
|
+
total_conns?: number | undefined;
|
|
2197
|
+
idle_conns?: number | undefined;
|
|
2198
|
+
acquired_conns?: number | undefined;
|
|
2199
|
+
}, {
|
|
2200
|
+
status: string;
|
|
2201
|
+
total_conns?: number | undefined;
|
|
2202
|
+
idle_conns?: number | undefined;
|
|
2203
|
+
acquired_conns?: number | undefined;
|
|
2204
|
+
}>>;
|
|
2205
|
+
}, "strip", z.ZodTypeAny, {
|
|
2206
|
+
status: "healthy" | "degraded";
|
|
2207
|
+
engine?: string | undefined;
|
|
2208
|
+
version?: string | undefined;
|
|
2209
|
+
database?: {
|
|
2210
|
+
status: string;
|
|
2211
|
+
total_conns?: number | undefined;
|
|
2212
|
+
idle_conns?: number | undefined;
|
|
2213
|
+
acquired_conns?: number | undefined;
|
|
2214
|
+
} | undefined;
|
|
2215
|
+
}, {
|
|
2216
|
+
status: "healthy" | "degraded";
|
|
2217
|
+
engine?: string | undefined;
|
|
2218
|
+
version?: string | undefined;
|
|
2219
|
+
database?: {
|
|
2220
|
+
status: string;
|
|
2221
|
+
total_conns?: number | undefined;
|
|
2222
|
+
idle_conns?: number | undefined;
|
|
2223
|
+
acquired_conns?: number | undefined;
|
|
2224
|
+
} | undefined;
|
|
2225
|
+
}>;
|
|
2226
|
+
/** getStats output */
|
|
2227
|
+
declare const GetStatsOutputSchema: z.ZodObject<{
|
|
2228
|
+
stats: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
2229
|
+
}, "strip", z.ZodTypeAny, {
|
|
2230
|
+
stats: Record<string, unknown>;
|
|
2231
|
+
}, {
|
|
2232
|
+
stats: Record<string, unknown>;
|
|
2233
|
+
}>;
|
|
2234
|
+
type LifeExpectancyResult = z.infer<typeof LifeExpectancyResultSchema>;
|
|
2235
|
+
type VersionInfo = z.infer<typeof VersionInfoSchema>;
|
|
2236
|
+
type LELookupByAgeOutput = z.infer<typeof LookupByAgeOutputSchema>;
|
|
2237
|
+
type LELookupBatchOutput = z.infer<typeof LookupBatchOutputSchema>;
|
|
2238
|
+
type LEGetTableOutput = z.infer<typeof GetTableOutputSchema>;
|
|
2239
|
+
type LEGetVersionOutput = z.infer<typeof GetVersionOutputSchema>;
|
|
2240
|
+
type LEHealthOutput = z.infer<typeof LEHealthOutputSchema>;
|
|
2241
|
+
type LEGetStatsOutput = z.infer<typeof GetStatsOutputSchema>;
|
|
2242
|
+
|
|
1760
2243
|
/**
|
|
1761
2244
|
* Simplified Public SDK Engine Categories
|
|
1762
2245
|
*
|
|
@@ -2076,6 +2559,61 @@ declare class NcdCategory {
|
|
|
2076
2559
|
searchGuidelines(input: NcdSearchGuidelinesInput): Promise<NcdSearchOutput>;
|
|
2077
2560
|
identifyGuideline(input: NcdIdentifyGuidelineInput): Promise<NcdGetOutput>;
|
|
2078
2561
|
}
|
|
2562
|
+
declare const LELookupByAgeInputSchema: z.ZodObject<{
|
|
2563
|
+
age: z.ZodNumber;
|
|
2564
|
+
gender: z.ZodOptional<z.ZodEnum<["male", "female", "total"]>>;
|
|
2565
|
+
}, "strip", z.ZodTypeAny, {
|
|
2566
|
+
age: number;
|
|
2567
|
+
gender?: "male" | "female" | "total" | undefined;
|
|
2568
|
+
}, {
|
|
2569
|
+
age: number;
|
|
2570
|
+
gender?: "male" | "female" | "total" | undefined;
|
|
2571
|
+
}>;
|
|
2572
|
+
declare const LELookupBatchInputSchema: z.ZodObject<{
|
|
2573
|
+
ages: z.ZodArray<z.ZodNumber, "many">;
|
|
2574
|
+
gender: z.ZodOptional<z.ZodEnum<["male", "female", "total"]>>;
|
|
2575
|
+
}, "strip", z.ZodTypeAny, {
|
|
2576
|
+
ages: number[];
|
|
2577
|
+
gender?: "male" | "female" | "total" | undefined;
|
|
2578
|
+
}, {
|
|
2579
|
+
ages: number[];
|
|
2580
|
+
gender?: "male" | "female" | "total" | undefined;
|
|
2581
|
+
}>;
|
|
2582
|
+
declare const LEGetTableInputSchema: z.ZodObject<{
|
|
2583
|
+
gender: z.ZodOptional<z.ZodEnum<["male", "female", "total"]>>;
|
|
2584
|
+
min_age: z.ZodOptional<z.ZodNumber>;
|
|
2585
|
+
max_age: z.ZodOptional<z.ZodNumber>;
|
|
2586
|
+
}, "strip", z.ZodTypeAny, {
|
|
2587
|
+
gender?: "male" | "female" | "total" | undefined;
|
|
2588
|
+
min_age?: number | undefined;
|
|
2589
|
+
max_age?: number | undefined;
|
|
2590
|
+
}, {
|
|
2591
|
+
gender?: "male" | "female" | "total" | undefined;
|
|
2592
|
+
min_age?: number | undefined;
|
|
2593
|
+
max_age?: number | undefined;
|
|
2594
|
+
}>;
|
|
2595
|
+
type LELookupByAgeInput = z.infer<typeof LELookupByAgeInputSchema>;
|
|
2596
|
+
type LELookupBatchInput = z.infer<typeof LELookupBatchInputSchema>;
|
|
2597
|
+
type LEGetTableInput = z.infer<typeof LEGetTableInputSchema>;
|
|
2598
|
+
/**
|
|
2599
|
+
* Life Expectancy actuarial tables (CDC/CMS WCMSA standard).
|
|
2600
|
+
* - lookupByAge(): Get life expectancy for a specific age
|
|
2601
|
+
* - lookupBatch(): Batch lookup for multiple ages
|
|
2602
|
+
* - getTable(): Get the full actuarial life table (or a filtered range)
|
|
2603
|
+
* - getVersion(): Get active dataset version metadata
|
|
2604
|
+
* - getStats(): Get database statistics
|
|
2605
|
+
* - health(): Engine health check
|
|
2606
|
+
*/
|
|
2607
|
+
declare class LifeExpectancyCategory {
|
|
2608
|
+
private request;
|
|
2609
|
+
constructor(request: RequestFunction$1);
|
|
2610
|
+
lookupByAge(input: LELookupByAgeInput): Promise<LELookupByAgeOutput>;
|
|
2611
|
+
lookupBatch(input: LELookupBatchInput): Promise<LELookupBatchOutput>;
|
|
2612
|
+
getTable(input?: LEGetTableInput): Promise<LEGetTableOutput>;
|
|
2613
|
+
getVersion(): Promise<LEGetVersionOutput>;
|
|
2614
|
+
getStats(): Promise<LEGetStatsOutput>;
|
|
2615
|
+
health(): Promise<LEHealthOutput>;
|
|
2616
|
+
}
|
|
2079
2617
|
|
|
2080
2618
|
declare const DiagnosisToProceduresInputSchema: z.ZodObject<{
|
|
2081
2619
|
snomed_id: z.ZodOptional<z.ZodString>;
|
|
@@ -2193,12 +2731,12 @@ declare const HealthOutputSchema: z.ZodObject<{
|
|
|
2193
2731
|
environment: z.ZodOptional<z.ZodString>;
|
|
2194
2732
|
engines: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["ok", "error", "unknown"]>>>;
|
|
2195
2733
|
}, "strip", z.ZodTypeAny, {
|
|
2196
|
-
status: "
|
|
2734
|
+
status: "degraded" | "ok";
|
|
2197
2735
|
version?: string | undefined;
|
|
2198
2736
|
environment?: string | undefined;
|
|
2199
2737
|
engines?: Record<string, "unknown" | "error" | "ok"> | undefined;
|
|
2200
2738
|
}, {
|
|
2201
|
-
status: "
|
|
2739
|
+
status: "degraded" | "ok";
|
|
2202
2740
|
version?: string | undefined;
|
|
2203
2741
|
environment?: string | undefined;
|
|
2204
2742
|
engines?: Record<string, "unknown" | "error" | "ok"> | undefined;
|
|
@@ -2253,6 +2791,9 @@ declare class SystemCategory {
|
|
|
2253
2791
|
* const lcd = await client.lcd.searchGuidelines({ query: "MRI" });
|
|
2254
2792
|
* const ncd = await client.ncd.identifyGuideline({ section: "220.6" });
|
|
2255
2793
|
*
|
|
2794
|
+
* // Life expectancy (CDC/CMS WCMSA)
|
|
2795
|
+
* const le = await client.lifeExpectancy.lookupByAge({ age: 65 });
|
|
2796
|
+
*
|
|
2256
2797
|
* // Orchestrator endpoints
|
|
2257
2798
|
* const coverage = await client.clinical.checkCoverage({ cpt_code: "99213" });
|
|
2258
2799
|
* const procedures = await client.clinical.getProceduresForDiagnosis({ icd10_code: "E11.9" });
|
|
@@ -2278,6 +2819,8 @@ declare class SequoiaCodesClient {
|
|
|
2278
2819
|
readonly loinc: LoincCategory;
|
|
2279
2820
|
/** RxNorm drug/medication codes */
|
|
2280
2821
|
readonly rxnorm: RxnormCategory;
|
|
2822
|
+
/** Life Expectancy actuarial tables (CDC/CMS WCMSA standard) */
|
|
2823
|
+
readonly lifeExpectancy: LifeExpectancyCategory;
|
|
2281
2824
|
/** LCD (Local Coverage Determination) guidelines */
|
|
2282
2825
|
readonly lcd: LcdCategory;
|
|
2283
2826
|
/** NCD (National Coverage Determination) guidelines */
|
|
@@ -2304,4 +2847,4 @@ declare class CodesApiError extends Error {
|
|
|
2304
2847
|
};
|
|
2305
2848
|
}
|
|
2306
2849
|
|
|
2307
|
-
export { type ApiResponse, type CPTCode, CodesApiError, type CoverageCheckInput, type CoverageCheckOutput, CptCategory, type CptGetCodeOutput, type CptGetCostInput, type CptGetCostOutput, type CptIdentifyCodeInput, type CptLinkIcd10Input, type CptLinkIcd10Output, type CptSearchCodeInput, type CptSearchOutput, type DiagnosisToProceduresInput, type DiagnosisToProceduresOutput, type EngineStatus, type GetCategoriesOutput, type GetResultInput, type GetResultOutput, HcpcsCategory, type HcpcsGetCostInput, type HcpcsIdentifyCodeInput, type HcpcsSearchCodeInput, type HealthOutput, Icd10Category, type Icd10Chapter, type Icd10Code, type Icd10GetChaptersOutput, type Icd10IdentifyCodeInput, type Icd10LookupOutput, type Icd10Mapping, type Icd10SearchCodeInput, type Icd10SearchOutput, LcdCategory, type LcdGetOutput, type LcdIdentifyGuidelineInput, type LcdSearchGuidelinesInput, type LcdSearchOutput, LoincCategory, type LoincCode, type LoincGetPanelMembersInput, type LoincGetPanelMembersOutput, type LoincIdentifyCodeInput, type LoincLookupOutput, type LoincSearchCodeInput, type LoincSearchOutput, NcdCategory, type NcdGetOutput, type NcdIdentifyGuidelineInput, type NcdSearchGuidelinesInput, type NcdSearchOutput, type NdcResult, type PanelInfo, type PanelMember, RxnormCategory, type RxnormDrug, type RxnormGetIngredientsInput, type RxnormGetIngredientsOutput, type RxnormIdentifyCodeInput, type RxnormLookupNdcOutput, type RxnormLookupRxcuiOutput, type RxnormSearchCodeInput, type RxnormSearchOutput, SequoiaCodesClient, type SequoiaCodesClientConfig, SnomedCategory, type SnomedConcept, type SnomedIdentifyCodeInput, type SnomedLookupOutput, type SnomedRelationship, type SnomedSearchCodeInput, type SnomedSearchOutput };
|
|
2850
|
+
export { type ApiResponse, type CPTCode, CodesApiError, type CoverageCheckInput, type CoverageCheckOutput, CptCategory, type CptGetCodeOutput, type CptGetCostInput, type CptGetCostOutput, type CptIdentifyCodeInput, type CptLinkIcd10Input, type CptLinkIcd10Output, type CptSearchCodeInput, type CptSearchOutput, type DiagnosisToProceduresInput, type DiagnosisToProceduresOutput, type EngineStatus, type GetCategoriesOutput, type GetResultInput, type GetResultOutput, HcpcsCategory, type HcpcsGetCostInput, type HcpcsIdentifyCodeInput, type HcpcsSearchCodeInput, type HealthOutput, Icd10Category, type Icd10Chapter, type Icd10Code, type Icd10GetChaptersOutput, type Icd10IdentifyCodeInput, type Icd10LookupOutput, type Icd10Mapping, type Icd10SearchCodeInput, type Icd10SearchOutput, type LEGetStatsOutput, type LEGetTableInput, type LEGetTableOutput, type LEGetVersionOutput, type LEHealthOutput, type LELookupBatchInput, type LELookupBatchOutput, type LELookupByAgeInput, type LELookupByAgeOutput, type VersionInfo as LEVersionInfo, LcdCategory, type LcdGetOutput, type LcdIdentifyGuidelineInput, type LcdSearchGuidelinesInput, type LcdSearchOutput, LifeExpectancyCategory, type LifeExpectancyResult, LoincCategory, type LoincCode, type LoincGetPanelMembersInput, type LoincGetPanelMembersOutput, type LoincIdentifyCodeInput, type LoincLookupOutput, type LoincSearchCodeInput, type LoincSearchOutput, NcdCategory, type NcdGetOutput, type NcdIdentifyGuidelineInput, type NcdSearchGuidelinesInput, type NcdSearchOutput, type NdcResult, type PanelInfo, type PanelMember, RxnormCategory, type RxnormDrug, type RxnormGetIngredientsInput, type RxnormGetIngredientsOutput, type RxnormIdentifyCodeInput, type RxnormLookupNdcOutput, type RxnormLookupRxcuiOutput, type RxnormSearchCodeInput, type RxnormSearchOutput, SequoiaCodesClient, type SequoiaCodesClientConfig, SnomedCategory, type SnomedConcept, type SnomedIdentifyCodeInput, type SnomedLookupOutput, type SnomedRelationship, type SnomedSearchCodeInput, type SnomedSearchOutput };
|