@sequoiaport/codes 0.1.2-beta.1 → 0.1.3-beta.3

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/dist/index.js CHANGED
@@ -25,8 +25,10 @@ __export(index_exports, {
25
25
  HcpcsCategory: () => HcpcsCategory,
26
26
  Icd10Category: () => Icd10Category,
27
27
  LcdCategory: () => LcdCategory,
28
+ LifeExpectancyCategory: () => LifeExpectancyCategory,
28
29
  LoincCategory: () => LoincCategory,
29
30
  NcdCategory: () => NcdCategory,
31
+ NdcCategory: () => NdcCategory,
30
32
  RxnormCategory: () => RxnormCategory,
31
33
  SequoiaCodesClient: () => SequoiaCodesClient,
32
34
  SnomedCategory: () => SnomedCategory
@@ -298,6 +300,148 @@ var NcdCategory = class {
298
300
  });
299
301
  }
300
302
  };
303
+ var LELookupByAgeInputSchema = import_zod.z.object({
304
+ age: import_zod.z.number().int().min(0).max(125),
305
+ gender: import_zod.z.enum(["male", "female", "total"]).optional()
306
+ });
307
+ var LELookupBatchInputSchema = import_zod.z.object({
308
+ ages: import_zod.z.array(import_zod.z.number().int().min(0).max(125)).min(1).max(500),
309
+ gender: import_zod.z.enum(["male", "female", "total"]).optional()
310
+ });
311
+ var LEGetTableInputSchema = import_zod.z.object({
312
+ gender: import_zod.z.enum(["male", "female", "total"]).optional(),
313
+ min_age: import_zod.z.number().int().min(0).optional(),
314
+ max_age: import_zod.z.number().int().max(125).optional()
315
+ });
316
+ var LifeExpectancyCategory = class {
317
+ constructor(request) {
318
+ this.request = request;
319
+ }
320
+ async lookupByAge(input) {
321
+ const validated = LELookupByAgeInputSchema.parse(input);
322
+ return this.request(
323
+ "lifeExpectancy/lookupByAge",
324
+ validated
325
+ );
326
+ }
327
+ async lookupBatch(input) {
328
+ const validated = LELookupBatchInputSchema.parse(input);
329
+ return this.request(
330
+ "lifeExpectancy/lookupBatch",
331
+ validated
332
+ );
333
+ }
334
+ async getTable(input) {
335
+ const validated = LEGetTableInputSchema.parse(input ?? {});
336
+ return this.request(
337
+ "lifeExpectancy/getTable",
338
+ validated
339
+ );
340
+ }
341
+ async getVersion() {
342
+ return this.request(
343
+ "lifeExpectancy/getVersion",
344
+ {}
345
+ );
346
+ }
347
+ async getStats() {
348
+ return this.request("lifeExpectancy/getStats", {});
349
+ }
350
+ async health() {
351
+ return this.request("lifeExpectancy/health", {});
352
+ }
353
+ };
354
+ var NdcLookupInputSchema = import_zod.z.object({
355
+ ndc: import_zod.z.string().min(1)
356
+ });
357
+ var NdcBatchLookupInputSchema = import_zod.z.object({
358
+ ndcs: import_zod.z.array(import_zod.z.string().min(1)).min(1).max(25)
359
+ });
360
+ var NdcSearchInputSchema = import_zod.z.object({
361
+ query: import_zod.z.string().min(1),
362
+ productType: import_zod.z.string().optional(),
363
+ limit: import_zod.z.number().int().min(1).max(100).optional()
364
+ });
365
+ var NdcFuzzySearchInputSchema = import_zod.z.object({
366
+ query: import_zod.z.string().min(1),
367
+ limit: import_zod.z.number().int().min(1).max(50).optional()
368
+ });
369
+ var NdcGetProductInputSchema = import_zod.z.object({
370
+ productNdc: import_zod.z.string().min(1)
371
+ });
372
+ var NdcGetLabelerInputSchema = import_zod.z.object({
373
+ labeler: import_zod.z.string().min(1),
374
+ limit: import_zod.z.number().int().min(1).max(100).optional()
375
+ });
376
+ var NdcGetPackagesInputSchema = import_zod.z.object({
377
+ productNdc: import_zod.z.string().min(1)
378
+ });
379
+ var NdcCrossRefInputSchema = import_zod.z.object({
380
+ ndc: import_zod.z.string().min(1)
381
+ });
382
+ var NdcCategory = class {
383
+ constructor(request) {
384
+ this.request = request;
385
+ }
386
+ async lookupNdc(input) {
387
+ const validated = NdcLookupInputSchema.parse(input);
388
+ return this.request("ndc/lookupNdc", {
389
+ ndc: validated.ndc
390
+ });
391
+ }
392
+ async lookupBatch(input) {
393
+ const validated = NdcBatchLookupInputSchema.parse(input);
394
+ return this.request("ndc/lookupBatch", {
395
+ ndcs: validated.ndcs
396
+ });
397
+ }
398
+ async searchProducts(input) {
399
+ const validated = NdcSearchInputSchema.parse(input);
400
+ return this.request("ndc/searchProducts", {
401
+ query: validated.query,
402
+ product_type: validated.productType,
403
+ limit: validated.limit
404
+ });
405
+ }
406
+ async searchFuzzy(input) {
407
+ const validated = NdcFuzzySearchInputSchema.parse(input);
408
+ return this.request("ndc/searchFuzzy", {
409
+ query: validated.query,
410
+ limit: validated.limit
411
+ });
412
+ }
413
+ async getProduct(input) {
414
+ const validated = NdcGetProductInputSchema.parse(input);
415
+ return this.request("ndc/getProduct", {
416
+ product_ndc: validated.productNdc
417
+ });
418
+ }
419
+ async getLabeler(input) {
420
+ const validated = NdcGetLabelerInputSchema.parse(input);
421
+ return this.request("ndc/getLabeler", {
422
+ labeler: validated.labeler,
423
+ limit: validated.limit
424
+ });
425
+ }
426
+ async getPackages(input) {
427
+ const validated = NdcGetPackagesInputSchema.parse(input);
428
+ return this.request("ndc/getPackages", {
429
+ product_ndc: validated.productNdc
430
+ });
431
+ }
432
+ async crossRefRxcui(input) {
433
+ const validated = NdcCrossRefInputSchema.parse(input);
434
+ return this.request("ndc/crossRefRxcui", {
435
+ ndc: validated.ndc
436
+ });
437
+ }
438
+ async getStats() {
439
+ return this.request("ndc/getStats", {});
440
+ }
441
+ async health() {
442
+ return this.request("ndc/health", {});
443
+ }
444
+ };
301
445
 
302
446
  // src/schemas/clinical.ts
303
447
  var import_zod2 = require("zod");
@@ -417,6 +561,13 @@ var SequoiaCodesClient = class {
417
561
  loinc;
418
562
  /** RxNorm drug/medication codes */
419
563
  rxnorm;
564
+ /** FDA NDC Directory - drug product identification (133K products, 248K packages) */
565
+ ndc;
566
+ // ==========================================================================
567
+ // Actuarial / Reference Data Categories
568
+ // ==========================================================================
569
+ /** Life Expectancy actuarial tables (CDC/CMS WCMSA standard) */
570
+ lifeExpectancy;
420
571
  // ==========================================================================
421
572
  // Guideline Categories
422
573
  // ==========================================================================
@@ -437,6 +588,8 @@ var SequoiaCodesClient = class {
437
588
  this.hcpcs = new HcpcsCategory(boundRequest);
438
589
  this.loinc = new LoincCategory(boundRequest);
439
590
  this.rxnorm = new RxnormCategory(boundRequest);
591
+ this.ndc = new NdcCategory(boundRequest);
592
+ this.lifeExpectancy = new LifeExpectancyCategory(boundRequest);
440
593
  this.lcd = new LcdCategory(boundRequest);
441
594
  this.ncd = new NcdCategory(boundRequest);
442
595
  }
@@ -487,8 +640,10 @@ var SequoiaCodesClient = class {
487
640
  HcpcsCategory,
488
641
  Icd10Category,
489
642
  LcdCategory,
643
+ LifeExpectancyCategory,
490
644
  LoincCategory,
491
645
  NcdCategory,
646
+ NdcCategory,
492
647
  RxnormCategory,
493
648
  SequoiaCodesClient,
494
649
  SnomedCategory
package/dist/index.mjs CHANGED
@@ -263,6 +263,148 @@ var NcdCategory = class {
263
263
  });
264
264
  }
265
265
  };
266
+ var LELookupByAgeInputSchema = z.object({
267
+ age: z.number().int().min(0).max(125),
268
+ gender: z.enum(["male", "female", "total"]).optional()
269
+ });
270
+ var LELookupBatchInputSchema = z.object({
271
+ ages: z.array(z.number().int().min(0).max(125)).min(1).max(500),
272
+ gender: z.enum(["male", "female", "total"]).optional()
273
+ });
274
+ var LEGetTableInputSchema = z.object({
275
+ gender: z.enum(["male", "female", "total"]).optional(),
276
+ min_age: z.number().int().min(0).optional(),
277
+ max_age: z.number().int().max(125).optional()
278
+ });
279
+ var LifeExpectancyCategory = class {
280
+ constructor(request) {
281
+ this.request = request;
282
+ }
283
+ async lookupByAge(input) {
284
+ const validated = LELookupByAgeInputSchema.parse(input);
285
+ return this.request(
286
+ "lifeExpectancy/lookupByAge",
287
+ validated
288
+ );
289
+ }
290
+ async lookupBatch(input) {
291
+ const validated = LELookupBatchInputSchema.parse(input);
292
+ return this.request(
293
+ "lifeExpectancy/lookupBatch",
294
+ validated
295
+ );
296
+ }
297
+ async getTable(input) {
298
+ const validated = LEGetTableInputSchema.parse(input ?? {});
299
+ return this.request(
300
+ "lifeExpectancy/getTable",
301
+ validated
302
+ );
303
+ }
304
+ async getVersion() {
305
+ return this.request(
306
+ "lifeExpectancy/getVersion",
307
+ {}
308
+ );
309
+ }
310
+ async getStats() {
311
+ return this.request("lifeExpectancy/getStats", {});
312
+ }
313
+ async health() {
314
+ return this.request("lifeExpectancy/health", {});
315
+ }
316
+ };
317
+ var NdcLookupInputSchema = z.object({
318
+ ndc: z.string().min(1)
319
+ });
320
+ var NdcBatchLookupInputSchema = z.object({
321
+ ndcs: z.array(z.string().min(1)).min(1).max(25)
322
+ });
323
+ var NdcSearchInputSchema = z.object({
324
+ query: z.string().min(1),
325
+ productType: z.string().optional(),
326
+ limit: z.number().int().min(1).max(100).optional()
327
+ });
328
+ var NdcFuzzySearchInputSchema = z.object({
329
+ query: z.string().min(1),
330
+ limit: z.number().int().min(1).max(50).optional()
331
+ });
332
+ var NdcGetProductInputSchema = z.object({
333
+ productNdc: z.string().min(1)
334
+ });
335
+ var NdcGetLabelerInputSchema = z.object({
336
+ labeler: z.string().min(1),
337
+ limit: z.number().int().min(1).max(100).optional()
338
+ });
339
+ var NdcGetPackagesInputSchema = z.object({
340
+ productNdc: z.string().min(1)
341
+ });
342
+ var NdcCrossRefInputSchema = z.object({
343
+ ndc: z.string().min(1)
344
+ });
345
+ var NdcCategory = class {
346
+ constructor(request) {
347
+ this.request = request;
348
+ }
349
+ async lookupNdc(input) {
350
+ const validated = NdcLookupInputSchema.parse(input);
351
+ return this.request("ndc/lookupNdc", {
352
+ ndc: validated.ndc
353
+ });
354
+ }
355
+ async lookupBatch(input) {
356
+ const validated = NdcBatchLookupInputSchema.parse(input);
357
+ return this.request("ndc/lookupBatch", {
358
+ ndcs: validated.ndcs
359
+ });
360
+ }
361
+ async searchProducts(input) {
362
+ const validated = NdcSearchInputSchema.parse(input);
363
+ return this.request("ndc/searchProducts", {
364
+ query: validated.query,
365
+ product_type: validated.productType,
366
+ limit: validated.limit
367
+ });
368
+ }
369
+ async searchFuzzy(input) {
370
+ const validated = NdcFuzzySearchInputSchema.parse(input);
371
+ return this.request("ndc/searchFuzzy", {
372
+ query: validated.query,
373
+ limit: validated.limit
374
+ });
375
+ }
376
+ async getProduct(input) {
377
+ const validated = NdcGetProductInputSchema.parse(input);
378
+ return this.request("ndc/getProduct", {
379
+ product_ndc: validated.productNdc
380
+ });
381
+ }
382
+ async getLabeler(input) {
383
+ const validated = NdcGetLabelerInputSchema.parse(input);
384
+ return this.request("ndc/getLabeler", {
385
+ labeler: validated.labeler,
386
+ limit: validated.limit
387
+ });
388
+ }
389
+ async getPackages(input) {
390
+ const validated = NdcGetPackagesInputSchema.parse(input);
391
+ return this.request("ndc/getPackages", {
392
+ product_ndc: validated.productNdc
393
+ });
394
+ }
395
+ async crossRefRxcui(input) {
396
+ const validated = NdcCrossRefInputSchema.parse(input);
397
+ return this.request("ndc/crossRefRxcui", {
398
+ ndc: validated.ndc
399
+ });
400
+ }
401
+ async getStats() {
402
+ return this.request("ndc/getStats", {});
403
+ }
404
+ async health() {
405
+ return this.request("ndc/health", {});
406
+ }
407
+ };
266
408
 
267
409
  // src/schemas/clinical.ts
268
410
  import { z as z2 } from "zod";
@@ -382,6 +524,13 @@ var SequoiaCodesClient = class {
382
524
  loinc;
383
525
  /** RxNorm drug/medication codes */
384
526
  rxnorm;
527
+ /** FDA NDC Directory - drug product identification (133K products, 248K packages) */
528
+ ndc;
529
+ // ==========================================================================
530
+ // Actuarial / Reference Data Categories
531
+ // ==========================================================================
532
+ /** Life Expectancy actuarial tables (CDC/CMS WCMSA standard) */
533
+ lifeExpectancy;
385
534
  // ==========================================================================
386
535
  // Guideline Categories
387
536
  // ==========================================================================
@@ -402,6 +551,8 @@ var SequoiaCodesClient = class {
402
551
  this.hcpcs = new HcpcsCategory(boundRequest);
403
552
  this.loinc = new LoincCategory(boundRequest);
404
553
  this.rxnorm = new RxnormCategory(boundRequest);
554
+ this.ndc = new NdcCategory(boundRequest);
555
+ this.lifeExpectancy = new LifeExpectancyCategory(boundRequest);
405
556
  this.lcd = new LcdCategory(boundRequest);
406
557
  this.ncd = new NcdCategory(boundRequest);
407
558
  }
@@ -451,8 +602,10 @@ export {
451
602
  HcpcsCategory,
452
603
  Icd10Category,
453
604
  LcdCategory,
605
+ LifeExpectancyCategory,
454
606
  LoincCategory,
455
607
  NcdCategory,
608
+ NdcCategory,
456
609
  RxnormCategory,
457
610
  SequoiaCodesClient,
458
611
  SnomedCategory
package/dist/mcp.js CHANGED
@@ -271,6 +271,148 @@ var NcdCategory = class {
271
271
  });
272
272
  }
273
273
  };
274
+ var LELookupByAgeInputSchema = import_zod.z.object({
275
+ age: import_zod.z.number().int().min(0).max(125),
276
+ gender: import_zod.z.enum(["male", "female", "total"]).optional()
277
+ });
278
+ var LELookupBatchInputSchema = import_zod.z.object({
279
+ ages: import_zod.z.array(import_zod.z.number().int().min(0).max(125)).min(1).max(500),
280
+ gender: import_zod.z.enum(["male", "female", "total"]).optional()
281
+ });
282
+ var LEGetTableInputSchema = import_zod.z.object({
283
+ gender: import_zod.z.enum(["male", "female", "total"]).optional(),
284
+ min_age: import_zod.z.number().int().min(0).optional(),
285
+ max_age: import_zod.z.number().int().max(125).optional()
286
+ });
287
+ var LifeExpectancyCategory = class {
288
+ constructor(request) {
289
+ this.request = request;
290
+ }
291
+ async lookupByAge(input) {
292
+ const validated = LELookupByAgeInputSchema.parse(input);
293
+ return this.request(
294
+ "lifeExpectancy/lookupByAge",
295
+ validated
296
+ );
297
+ }
298
+ async lookupBatch(input) {
299
+ const validated = LELookupBatchInputSchema.parse(input);
300
+ return this.request(
301
+ "lifeExpectancy/lookupBatch",
302
+ validated
303
+ );
304
+ }
305
+ async getTable(input) {
306
+ const validated = LEGetTableInputSchema.parse(input ?? {});
307
+ return this.request(
308
+ "lifeExpectancy/getTable",
309
+ validated
310
+ );
311
+ }
312
+ async getVersion() {
313
+ return this.request(
314
+ "lifeExpectancy/getVersion",
315
+ {}
316
+ );
317
+ }
318
+ async getStats() {
319
+ return this.request("lifeExpectancy/getStats", {});
320
+ }
321
+ async health() {
322
+ return this.request("lifeExpectancy/health", {});
323
+ }
324
+ };
325
+ var NdcLookupInputSchema = import_zod.z.object({
326
+ ndc: import_zod.z.string().min(1)
327
+ });
328
+ var NdcBatchLookupInputSchema = import_zod.z.object({
329
+ ndcs: import_zod.z.array(import_zod.z.string().min(1)).min(1).max(25)
330
+ });
331
+ var NdcSearchInputSchema = import_zod.z.object({
332
+ query: import_zod.z.string().min(1),
333
+ productType: import_zod.z.string().optional(),
334
+ limit: import_zod.z.number().int().min(1).max(100).optional()
335
+ });
336
+ var NdcFuzzySearchInputSchema = import_zod.z.object({
337
+ query: import_zod.z.string().min(1),
338
+ limit: import_zod.z.number().int().min(1).max(50).optional()
339
+ });
340
+ var NdcGetProductInputSchema = import_zod.z.object({
341
+ productNdc: import_zod.z.string().min(1)
342
+ });
343
+ var NdcGetLabelerInputSchema = import_zod.z.object({
344
+ labeler: import_zod.z.string().min(1),
345
+ limit: import_zod.z.number().int().min(1).max(100).optional()
346
+ });
347
+ var NdcGetPackagesInputSchema = import_zod.z.object({
348
+ productNdc: import_zod.z.string().min(1)
349
+ });
350
+ var NdcCrossRefInputSchema = import_zod.z.object({
351
+ ndc: import_zod.z.string().min(1)
352
+ });
353
+ var NdcCategory = class {
354
+ constructor(request) {
355
+ this.request = request;
356
+ }
357
+ async lookupNdc(input) {
358
+ const validated = NdcLookupInputSchema.parse(input);
359
+ return this.request("ndc/lookupNdc", {
360
+ ndc: validated.ndc
361
+ });
362
+ }
363
+ async lookupBatch(input) {
364
+ const validated = NdcBatchLookupInputSchema.parse(input);
365
+ return this.request("ndc/lookupBatch", {
366
+ ndcs: validated.ndcs
367
+ });
368
+ }
369
+ async searchProducts(input) {
370
+ const validated = NdcSearchInputSchema.parse(input);
371
+ return this.request("ndc/searchProducts", {
372
+ query: validated.query,
373
+ product_type: validated.productType,
374
+ limit: validated.limit
375
+ });
376
+ }
377
+ async searchFuzzy(input) {
378
+ const validated = NdcFuzzySearchInputSchema.parse(input);
379
+ return this.request("ndc/searchFuzzy", {
380
+ query: validated.query,
381
+ limit: validated.limit
382
+ });
383
+ }
384
+ async getProduct(input) {
385
+ const validated = NdcGetProductInputSchema.parse(input);
386
+ return this.request("ndc/getProduct", {
387
+ product_ndc: validated.productNdc
388
+ });
389
+ }
390
+ async getLabeler(input) {
391
+ const validated = NdcGetLabelerInputSchema.parse(input);
392
+ return this.request("ndc/getLabeler", {
393
+ labeler: validated.labeler,
394
+ limit: validated.limit
395
+ });
396
+ }
397
+ async getPackages(input) {
398
+ const validated = NdcGetPackagesInputSchema.parse(input);
399
+ return this.request("ndc/getPackages", {
400
+ product_ndc: validated.productNdc
401
+ });
402
+ }
403
+ async crossRefRxcui(input) {
404
+ const validated = NdcCrossRefInputSchema.parse(input);
405
+ return this.request("ndc/crossRefRxcui", {
406
+ ndc: validated.ndc
407
+ });
408
+ }
409
+ async getStats() {
410
+ return this.request("ndc/getStats", {});
411
+ }
412
+ async health() {
413
+ return this.request("ndc/health", {});
414
+ }
415
+ };
274
416
 
275
417
  // src/schemas/clinical.ts
276
418
  var import_zod2 = require("zod");
@@ -390,6 +532,13 @@ var SequoiaCodesClient = class {
390
532
  loinc;
391
533
  /** RxNorm drug/medication codes */
392
534
  rxnorm;
535
+ /** FDA NDC Directory - drug product identification (133K products, 248K packages) */
536
+ ndc;
537
+ // ==========================================================================
538
+ // Actuarial / Reference Data Categories
539
+ // ==========================================================================
540
+ /** Life Expectancy actuarial tables (CDC/CMS WCMSA standard) */
541
+ lifeExpectancy;
393
542
  // ==========================================================================
394
543
  // Guideline Categories
395
544
  // ==========================================================================
@@ -410,6 +559,8 @@ var SequoiaCodesClient = class {
410
559
  this.hcpcs = new HcpcsCategory(boundRequest);
411
560
  this.loinc = new LoincCategory(boundRequest);
412
561
  this.rxnorm = new RxnormCategory(boundRequest);
562
+ this.ndc = new NdcCategory(boundRequest);
563
+ this.lifeExpectancy = new LifeExpectancyCategory(boundRequest);
413
564
  this.lcd = new LcdCategory(boundRequest);
414
565
  this.ncd = new NcdCategory(boundRequest);
415
566
  }
@@ -571,6 +722,61 @@ server.tool(
571
722
  return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
572
723
  }
573
724
  );
725
+ server.tool(
726
+ "ndcLookup",
727
+ "Look up, search, or explore the FDA NDC Directory. Actions: lookup (by NDC code), lookupBatch (multiple NDCs), search (by drug name), fuzzy (misspelling-tolerant search), getProduct (by product NDC), getLabeler (by manufacturer), getPackages (by product NDC), crossRef (NDC-to-RxNorm).",
728
+ {
729
+ action: import_zod4.z.enum(["lookup", "lookupBatch", "search", "fuzzy", "getProduct", "getLabeler", "getPackages", "crossRef", "stats"]).default("lookup").describe("The NDC action to perform"),
730
+ ndc: import_zod4.z.string().optional().describe("NDC code (for lookup, crossRef)"),
731
+ ndcs: import_zod4.z.array(import_zod4.z.string()).optional().describe("Array of NDC codes (for lookupBatch)"),
732
+ query: import_zod4.z.string().optional().describe("Drug name to search (for search, fuzzy)"),
733
+ productNdc: import_zod4.z.string().optional().describe("Product NDC in 5-4 format (for getProduct, getPackages)"),
734
+ labeler: import_zod4.z.string().optional().describe("Manufacturer name (for getLabeler)"),
735
+ productType: import_zod4.z.string().optional().describe("Filter by product type (for search)"),
736
+ limit: import_zod4.z.number().int().min(1).max(100).optional().describe("Max results")
737
+ },
738
+ async ({ action, ndc, ndcs, query, productNdc, labeler, productType, limit }) => {
739
+ let result;
740
+ switch (action) {
741
+ case "lookup":
742
+ if (!ndc) return { content: [{ type: "text", text: "ndc is required for lookup" }] };
743
+ result = await client.ndc.lookupNdc({ ndc });
744
+ break;
745
+ case "lookupBatch":
746
+ if (!ndcs || ndcs.length === 0) return { content: [{ type: "text", text: "ndcs array is required for lookupBatch" }] };
747
+ result = await client.ndc.lookupBatch({ ndcs });
748
+ break;
749
+ case "search":
750
+ if (!query) return { content: [{ type: "text", text: "query is required for search" }] };
751
+ result = await client.ndc.searchProducts({ query, productType, limit });
752
+ break;
753
+ case "fuzzy":
754
+ if (!query) return { content: [{ type: "text", text: "query is required for fuzzy search" }] };
755
+ result = await client.ndc.searchFuzzy({ query, limit });
756
+ break;
757
+ case "getProduct":
758
+ if (!productNdc) return { content: [{ type: "text", text: "productNdc is required for getProduct" }] };
759
+ result = await client.ndc.getProduct({ productNdc });
760
+ break;
761
+ case "getLabeler":
762
+ if (!labeler) return { content: [{ type: "text", text: "labeler is required for getLabeler" }] };
763
+ result = await client.ndc.getLabeler({ labeler, limit });
764
+ break;
765
+ case "getPackages":
766
+ if (!productNdc) return { content: [{ type: "text", text: "productNdc is required for getPackages" }] };
767
+ result = await client.ndc.getPackages({ productNdc });
768
+ break;
769
+ case "crossRef":
770
+ if (!ndc) return { content: [{ type: "text", text: "ndc is required for crossRef" }] };
771
+ result = await client.ndc.crossRefRxcui({ ndc });
772
+ break;
773
+ case "stats":
774
+ result = await client.ndc.getStats();
775
+ break;
776
+ }
777
+ return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
778
+ }
779
+ );
574
780
  async function main() {
575
781
  const transport = new import_stdio.StdioServerTransport();
576
782
  await server.connect(transport);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sequoiaport/codes",
3
- "version": "0.1.2-beta.1",
4
- "description": "Retrieve ICD-10, CPT, SNOMED, and more medical codes via the Sequoia Codes API.",
3
+ "version": "0.1.3-beta.3",
4
+ "description": "Retrieve ICD-10, CPT, SNOMED, RxNorm, LOINC, NDC, and more medical codes via the Sequoia Codes API.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -19,6 +19,7 @@
19
19
  "hcpcs",
20
20
  "loinc",
21
21
  "rxnorm",
22
+ "ndc",
22
23
  "snomed",
23
24
  "lcd",
24
25
  "ncd",