@fhirfly-io/terminology 0.1.5 → 0.2.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/dist/index.cjs +253 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +447 -1
- package/dist/index.d.ts +447 -1
- package/dist/index.js +253 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -71,6 +71,55 @@ interface BatchResponse<T> {
|
|
|
71
71
|
interface DisplayField {
|
|
72
72
|
display?: string;
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Common options for all search methods.
|
|
76
|
+
*/
|
|
77
|
+
interface SearchOptions {
|
|
78
|
+
/** Response detail level. Default: "compact" */
|
|
79
|
+
shape?: ResponseShape;
|
|
80
|
+
/** Include additional fields like pre-formatted display strings */
|
|
81
|
+
include?: IncludeOption[];
|
|
82
|
+
/** Results per page (1-100). Default: 20 */
|
|
83
|
+
limit?: number;
|
|
84
|
+
/** Page number (1-100). Default: 1 */
|
|
85
|
+
page?: number;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Facet counts in search results.
|
|
89
|
+
*/
|
|
90
|
+
type SearchFacets = Record<string, Record<string, number>>;
|
|
91
|
+
/**
|
|
92
|
+
* Legal metadata for search results.
|
|
93
|
+
*/
|
|
94
|
+
interface SearchLegalInfo {
|
|
95
|
+
license: string;
|
|
96
|
+
source_name: string;
|
|
97
|
+
citation: string;
|
|
98
|
+
attribution_required: boolean;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Search response wrapper.
|
|
102
|
+
*/
|
|
103
|
+
interface SearchResponse<T> {
|
|
104
|
+
/** Search result items */
|
|
105
|
+
items: T[];
|
|
106
|
+
/** Total number of matching results */
|
|
107
|
+
total: number;
|
|
108
|
+
/** Whether total was capped (e.g., at 10,000) */
|
|
109
|
+
total_capped: boolean;
|
|
110
|
+
/** Whether there are more results */
|
|
111
|
+
has_more: boolean;
|
|
112
|
+
/** Current page number */
|
|
113
|
+
page: number;
|
|
114
|
+
/** Results per page */
|
|
115
|
+
limit: number;
|
|
116
|
+
/** Facet counts for filtering */
|
|
117
|
+
facets: SearchFacets;
|
|
118
|
+
/** Legal and attribution metadata */
|
|
119
|
+
meta: {
|
|
120
|
+
legal: SearchLegalInfo;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
74
123
|
|
|
75
124
|
/**
|
|
76
125
|
* OAuth2 client credentials configuration.
|
|
@@ -132,6 +181,10 @@ declare class HttpClient {
|
|
|
132
181
|
* Build query string from options.
|
|
133
182
|
*/
|
|
134
183
|
private buildQueryString;
|
|
184
|
+
/**
|
|
185
|
+
* Build query string from search params object.
|
|
186
|
+
*/
|
|
187
|
+
buildSearchQueryString(params: Record<string, unknown>): string;
|
|
135
188
|
/**
|
|
136
189
|
* Parse error response from API.
|
|
137
190
|
*/
|
|
@@ -156,6 +209,10 @@ declare class HttpClient {
|
|
|
156
209
|
* Make a POST request.
|
|
157
210
|
*/
|
|
158
211
|
post<T>(endpoint: string, body: unknown, options?: LookupOptions): Promise<T>;
|
|
212
|
+
/**
|
|
213
|
+
* Make a GET request with search parameters.
|
|
214
|
+
*/
|
|
215
|
+
search<T>(endpoint: string, params: Record<string, unknown>): Promise<T>;
|
|
159
216
|
}
|
|
160
217
|
|
|
161
218
|
/**
|
|
@@ -210,6 +267,45 @@ interface NdcFull extends NdcStandard {
|
|
|
210
267
|
* NDC response type based on shape.
|
|
211
268
|
*/
|
|
212
269
|
type NdcData = NdcCompact | NdcStandard | NdcFull;
|
|
270
|
+
/**
|
|
271
|
+
* NDC search parameters.
|
|
272
|
+
*/
|
|
273
|
+
interface NdcSearchParams {
|
|
274
|
+
/** General text search across product names */
|
|
275
|
+
q?: string;
|
|
276
|
+
/** Search by product name */
|
|
277
|
+
name?: string;
|
|
278
|
+
/** Search by brand name */
|
|
279
|
+
brand?: string;
|
|
280
|
+
/** Search by generic name */
|
|
281
|
+
generic?: string;
|
|
282
|
+
/** Search by active ingredient */
|
|
283
|
+
ingredient?: string;
|
|
284
|
+
/** Filter by strength (e.g., "200mg", "10mg/5ml") */
|
|
285
|
+
strength?: string;
|
|
286
|
+
/** Filter by dosage form (e.g., "TABLET", "CAPSULE") */
|
|
287
|
+
dosage_form?: string;
|
|
288
|
+
/** Filter by administration route */
|
|
289
|
+
route?: string;
|
|
290
|
+
/** Filter by labeler/manufacturer name */
|
|
291
|
+
labeler?: string;
|
|
292
|
+
/** Filter by product type: "otc", "rx", or "all" */
|
|
293
|
+
product_type?: "otc" | "rx" | "all";
|
|
294
|
+
/** Filter by DEA schedule: "ci", "cii", "ciii", "civ", "cv", "none" */
|
|
295
|
+
dea_schedule?: "ci" | "cii" | "ciii" | "civ" | "cv" | "none";
|
|
296
|
+
/** Filter by marketing category */
|
|
297
|
+
marketing_category?: string;
|
|
298
|
+
/** Filter by pharmacologic class */
|
|
299
|
+
pharm_class?: string;
|
|
300
|
+
/** Filter by active status */
|
|
301
|
+
is_active?: boolean;
|
|
302
|
+
/** Filter by RxNorm linkage */
|
|
303
|
+
has_rxcui?: boolean;
|
|
304
|
+
/** Filter by specific RxNorm CUI */
|
|
305
|
+
rxcui?: string;
|
|
306
|
+
/** Sort order: "relevance", "name", "labeler" */
|
|
307
|
+
sort?: "relevance" | "name" | "labeler";
|
|
308
|
+
}
|
|
213
309
|
|
|
214
310
|
/**
|
|
215
311
|
* NDC (National Drug Code) API endpoint.
|
|
@@ -256,6 +352,32 @@ declare class NdcEndpoint {
|
|
|
256
352
|
* ```
|
|
257
353
|
*/
|
|
258
354
|
lookupMany(codes: string[], options?: BatchLookupOptions): Promise<BatchResponse<NdcData>>;
|
|
355
|
+
/**
|
|
356
|
+
* Search for NDC products.
|
|
357
|
+
*
|
|
358
|
+
* @param params - Search parameters (q, name, brand, ingredient, etc.)
|
|
359
|
+
* @param options - Pagination and response shape options
|
|
360
|
+
* @returns Search results with facets
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* ```ts
|
|
364
|
+
* // Search by drug name
|
|
365
|
+
* const results = await client.ndc.search({ q: "advil" });
|
|
366
|
+
*
|
|
367
|
+
* // Search with filters
|
|
368
|
+
* const results = await client.ndc.search({
|
|
369
|
+
* ingredient: "ibuprofen",
|
|
370
|
+
* dosage_form: "TABLET",
|
|
371
|
+
* product_type: "otc"
|
|
372
|
+
* });
|
|
373
|
+
*
|
|
374
|
+
* console.log(`Found ${results.total} products`);
|
|
375
|
+
* for (const item of results.items) {
|
|
376
|
+
* console.log(item.product_name);
|
|
377
|
+
* }
|
|
378
|
+
* ```
|
|
379
|
+
*/
|
|
380
|
+
search(params: NdcSearchParams, options?: SearchOptions): Promise<SearchResponse<NdcData>>;
|
|
259
381
|
}
|
|
260
382
|
|
|
261
383
|
/**
|
|
@@ -335,6 +457,39 @@ interface NpiFull extends NpiStandard {
|
|
|
335
457
|
* NPI response type based on shape.
|
|
336
458
|
*/
|
|
337
459
|
type NpiData = NpiCompact | NpiStandard | NpiFull;
|
|
460
|
+
/**
|
|
461
|
+
* NPI search parameters.
|
|
462
|
+
*/
|
|
463
|
+
interface NpiSearchParams {
|
|
464
|
+
/** General text search */
|
|
465
|
+
q?: string;
|
|
466
|
+
/** Search by provider name */
|
|
467
|
+
name?: string;
|
|
468
|
+
/** Filter by first name (individuals only) */
|
|
469
|
+
first_name?: string;
|
|
470
|
+
/** Filter by last name (individuals only) */
|
|
471
|
+
last_name?: string;
|
|
472
|
+
/** Search by organization name */
|
|
473
|
+
organization?: string;
|
|
474
|
+
/** Filter by taxonomy code */
|
|
475
|
+
taxonomy?: string;
|
|
476
|
+
/** Search by specialty description */
|
|
477
|
+
specialty?: string;
|
|
478
|
+
/** Filter by state (2-letter code) */
|
|
479
|
+
state?: string;
|
|
480
|
+
/** Filter by city */
|
|
481
|
+
city?: string;
|
|
482
|
+
/** Filter by postal code */
|
|
483
|
+
postal_code?: string;
|
|
484
|
+
/** Filter by phone number */
|
|
485
|
+
phone?: string;
|
|
486
|
+
/** Filter by entity type */
|
|
487
|
+
entity_type?: "individual" | "organization";
|
|
488
|
+
/** Filter by active status */
|
|
489
|
+
active?: boolean;
|
|
490
|
+
/** Sort order: "relevance", "name", "location" */
|
|
491
|
+
sort?: "relevance" | "name" | "location";
|
|
492
|
+
}
|
|
338
493
|
|
|
339
494
|
/**
|
|
340
495
|
* NPI (National Provider Identifier) API endpoint.
|
|
@@ -372,6 +527,29 @@ declare class NpiEndpoint {
|
|
|
372
527
|
* ```
|
|
373
528
|
*/
|
|
374
529
|
lookupMany(npis: string[], options?: BatchLookupOptions): Promise<BatchResponse<NpiData>>;
|
|
530
|
+
/**
|
|
531
|
+
* Search for healthcare providers.
|
|
532
|
+
*
|
|
533
|
+
* @param params - Search parameters (q, name, specialty, state, etc.)
|
|
534
|
+
* @param options - Pagination and response shape options
|
|
535
|
+
* @returns Search results with facets
|
|
536
|
+
*
|
|
537
|
+
* @example
|
|
538
|
+
* ```ts
|
|
539
|
+
* // Search by name
|
|
540
|
+
* const results = await client.npi.search({ q: "smith" });
|
|
541
|
+
*
|
|
542
|
+
* // Search with filters
|
|
543
|
+
* const results = await client.npi.search({
|
|
544
|
+
* specialty: "cardiology",
|
|
545
|
+
* state: "CA",
|
|
546
|
+
* entity_type: "individual"
|
|
547
|
+
* });
|
|
548
|
+
*
|
|
549
|
+
* console.log(`Found ${results.total} providers`);
|
|
550
|
+
* ```
|
|
551
|
+
*/
|
|
552
|
+
search(params: NpiSearchParams, options?: SearchOptions): Promise<SearchResponse<NpiData>>;
|
|
375
553
|
}
|
|
376
554
|
|
|
377
555
|
/**
|
|
@@ -423,6 +601,33 @@ interface RxNormFull extends RxNormStandard {
|
|
|
423
601
|
* RxNorm response type based on shape.
|
|
424
602
|
*/
|
|
425
603
|
type RxNormData = RxNormCompact | RxNormStandard | RxNormFull;
|
|
604
|
+
/**
|
|
605
|
+
* RxNorm search parameters.
|
|
606
|
+
*/
|
|
607
|
+
interface RxNormSearchParams {
|
|
608
|
+
/** General text search */
|
|
609
|
+
q?: string;
|
|
610
|
+
/** Search by drug name */
|
|
611
|
+
name?: string;
|
|
612
|
+
/** Search by ingredient name */
|
|
613
|
+
ingredient?: string;
|
|
614
|
+
/** Search by brand name */
|
|
615
|
+
brand?: string;
|
|
616
|
+
/** Filter by term type(s), comma-separated (e.g., "SCD,SBD") */
|
|
617
|
+
tty?: string;
|
|
618
|
+
/** Filter by prescribable status */
|
|
619
|
+
is_prescribable?: boolean;
|
|
620
|
+
/** Filter by status: "active", "removed", "remapped", "obsolete" */
|
|
621
|
+
status?: string;
|
|
622
|
+
/** Filter by semantic type */
|
|
623
|
+
semantic_type?: string;
|
|
624
|
+
/** Filter by NDC linkage */
|
|
625
|
+
has_ndc?: boolean;
|
|
626
|
+
/** Filter by specific NDC */
|
|
627
|
+
ndc?: string;
|
|
628
|
+
/** Sort order: "relevance", "name" */
|
|
629
|
+
sort?: "relevance" | "name";
|
|
630
|
+
}
|
|
426
631
|
|
|
427
632
|
/**
|
|
428
633
|
* RxNorm API endpoint.
|
|
@@ -452,6 +657,26 @@ declare class RxNormEndpoint {
|
|
|
452
657
|
* @returns Batch response with results for each RxCUI
|
|
453
658
|
*/
|
|
454
659
|
lookupMany(rxcuis: string[], options?: BatchLookupOptions): Promise<BatchResponse<RxNormData>>;
|
|
660
|
+
/**
|
|
661
|
+
* Search for drugs in RxNorm.
|
|
662
|
+
*
|
|
663
|
+
* @param params - Search parameters (q, name, ingredient, brand, etc.)
|
|
664
|
+
* @param options - Pagination and response shape options
|
|
665
|
+
* @returns Search results with facets
|
|
666
|
+
*
|
|
667
|
+
* @example
|
|
668
|
+
* ```ts
|
|
669
|
+
* // Search by drug name
|
|
670
|
+
* const results = await client.rxnorm.search({ q: "lipitor" });
|
|
671
|
+
*
|
|
672
|
+
* // Search prescribable drugs by ingredient
|
|
673
|
+
* const results = await client.rxnorm.search({
|
|
674
|
+
* ingredient: "metformin",
|
|
675
|
+
* is_prescribable: true
|
|
676
|
+
* });
|
|
677
|
+
* ```
|
|
678
|
+
*/
|
|
679
|
+
search(params: RxNormSearchParams, options?: SearchOptions): Promise<SearchResponse<RxNormData>>;
|
|
455
680
|
}
|
|
456
681
|
|
|
457
682
|
/**
|
|
@@ -508,6 +733,31 @@ interface LoincFull extends LoincStandard {
|
|
|
508
733
|
* LOINC response type based on shape.
|
|
509
734
|
*/
|
|
510
735
|
type LoincData = LoincCompact | LoincStandard | LoincFull;
|
|
736
|
+
/**
|
|
737
|
+
* LOINC search parameters.
|
|
738
|
+
*/
|
|
739
|
+
interface LoincSearchParams {
|
|
740
|
+
/** General text search */
|
|
741
|
+
q?: string;
|
|
742
|
+
/** Search by component name */
|
|
743
|
+
component?: string;
|
|
744
|
+
/** Filter by LOINC class (e.g., "CHEM", "HEM/BC") */
|
|
745
|
+
class?: string;
|
|
746
|
+
/** Filter by specimen/system type (e.g., "Bld", "Ser", "Urine") */
|
|
747
|
+
system?: string;
|
|
748
|
+
/** Filter by property */
|
|
749
|
+
property?: string;
|
|
750
|
+
/** Filter by scale type: "Qn", "Ord", "Nom", "Nar", etc. */
|
|
751
|
+
scale?: string;
|
|
752
|
+
/** Filter by method */
|
|
753
|
+
method?: string;
|
|
754
|
+
/** Filter by order/observation type: "Order", "Observation", "Both" */
|
|
755
|
+
order_obs?: string;
|
|
756
|
+
/** Filter by status: "ACTIVE", "DEPRECATED", "DISCOURAGED", etc. */
|
|
757
|
+
status?: string;
|
|
758
|
+
/** Sort order: "relevance", "name", "code" */
|
|
759
|
+
sort?: "relevance" | "name" | "code";
|
|
760
|
+
}
|
|
511
761
|
|
|
512
762
|
/**
|
|
513
763
|
* LOINC API endpoint.
|
|
@@ -537,6 +787,27 @@ declare class LoincEndpoint {
|
|
|
537
787
|
* @returns Batch response with results for each LOINC
|
|
538
788
|
*/
|
|
539
789
|
lookupMany(loincNums: string[], options?: BatchLookupOptions): Promise<BatchResponse<LoincData>>;
|
|
790
|
+
/**
|
|
791
|
+
* Search for LOINC codes.
|
|
792
|
+
*
|
|
793
|
+
* @param params - Search parameters (q, component, class, system, etc.)
|
|
794
|
+
* @param options - Pagination and response shape options
|
|
795
|
+
* @returns Search results with facets
|
|
796
|
+
*
|
|
797
|
+
* @example
|
|
798
|
+
* ```ts
|
|
799
|
+
* // Search by term
|
|
800
|
+
* const results = await client.loinc.search({ q: "glucose" });
|
|
801
|
+
*
|
|
802
|
+
* // Search blood chemistry tests
|
|
803
|
+
* const results = await client.loinc.search({
|
|
804
|
+
* class: "CHEM",
|
|
805
|
+
* system: "Bld",
|
|
806
|
+
* scale: "Qn"
|
|
807
|
+
* });
|
|
808
|
+
* ```
|
|
809
|
+
*/
|
|
810
|
+
search(params: LoincSearchParams, options?: SearchOptions): Promise<SearchResponse<LoincData>>;
|
|
540
811
|
}
|
|
541
812
|
|
|
542
813
|
/**
|
|
@@ -589,6 +860,33 @@ interface Icd10Full extends Icd10Standard {
|
|
|
589
860
|
* ICD-10 response type based on shape.
|
|
590
861
|
*/
|
|
591
862
|
type Icd10Data = Icd10Compact | Icd10Standard | Icd10Full;
|
|
863
|
+
/**
|
|
864
|
+
* ICD-10 search parameters.
|
|
865
|
+
*/
|
|
866
|
+
interface Icd10SearchParams {
|
|
867
|
+
/** General text search */
|
|
868
|
+
q?: string;
|
|
869
|
+
/** Filter by code system: "CM" (diagnosis) or "PCS" (procedure) */
|
|
870
|
+
code_system?: "CM" | "PCS";
|
|
871
|
+
/** Filter by chapter (CM only) */
|
|
872
|
+
chapter?: string;
|
|
873
|
+
/** Filter by block (CM only) */
|
|
874
|
+
block?: string;
|
|
875
|
+
/** Filter by billable codes only */
|
|
876
|
+
billable?: boolean;
|
|
877
|
+
/** Filter by section (PCS only) */
|
|
878
|
+
section?: string;
|
|
879
|
+
/** Filter by body system (PCS only) */
|
|
880
|
+
body_system?: string;
|
|
881
|
+
/** Filter by root operation (PCS only) */
|
|
882
|
+
root_operation?: string;
|
|
883
|
+
/** Filter by approach (PCS only) */
|
|
884
|
+
approach?: string;
|
|
885
|
+
/** Filter by status */
|
|
886
|
+
status?: string;
|
|
887
|
+
/** Sort order: "relevance", "code", "display" */
|
|
888
|
+
sort?: "relevance" | "code" | "display";
|
|
889
|
+
}
|
|
592
890
|
|
|
593
891
|
/**
|
|
594
892
|
* ICD-10 API endpoint.
|
|
@@ -640,6 +938,30 @@ declare class Icd10Endpoint {
|
|
|
640
938
|
* @returns Batch response with results for each code
|
|
641
939
|
*/
|
|
642
940
|
lookupPcsMany(codes: string[], options?: BatchLookupOptions): Promise<BatchResponse<Icd10Data>>;
|
|
941
|
+
/**
|
|
942
|
+
* Search for ICD-10 codes (both CM and PCS).
|
|
943
|
+
*
|
|
944
|
+
* @param params - Search parameters (q, code_system, chapter, billable, etc.)
|
|
945
|
+
* @param options - Pagination and response shape options
|
|
946
|
+
* @returns Search results with facets
|
|
947
|
+
*
|
|
948
|
+
* @example
|
|
949
|
+
* ```ts
|
|
950
|
+
* // Search diagnosis codes
|
|
951
|
+
* const results = await client.icd10.search({
|
|
952
|
+
* q: "diabetes",
|
|
953
|
+
* code_system: "CM",
|
|
954
|
+
* billable: true
|
|
955
|
+
* });
|
|
956
|
+
*
|
|
957
|
+
* // Search procedure codes
|
|
958
|
+
* const results = await client.icd10.search({
|
|
959
|
+
* q: "bypass",
|
|
960
|
+
* code_system: "PCS"
|
|
961
|
+
* });
|
|
962
|
+
* ```
|
|
963
|
+
*/
|
|
964
|
+
search(params: Icd10SearchParams, options?: SearchOptions): Promise<SearchResponse<Icd10Data>>;
|
|
643
965
|
}
|
|
644
966
|
|
|
645
967
|
/**
|
|
@@ -671,6 +993,21 @@ interface CvxFull extends CvxStandard {
|
|
|
671
993
|
* CVX response type based on shape.
|
|
672
994
|
*/
|
|
673
995
|
type CvxData = CvxCompact | CvxStandard | CvxFull;
|
|
996
|
+
/**
|
|
997
|
+
* CVX search parameters.
|
|
998
|
+
*/
|
|
999
|
+
interface CvxSearchParams {
|
|
1000
|
+
/** General text search */
|
|
1001
|
+
q?: string;
|
|
1002
|
+
/** Filter by status: "active", "inactive" */
|
|
1003
|
+
status?: string;
|
|
1004
|
+
/** Filter by vaccine type (e.g., "mRNA", "live", "inactivated") */
|
|
1005
|
+
vaccine_type?: string;
|
|
1006
|
+
/** Filter for COVID-19 vaccines only */
|
|
1007
|
+
is_covid_vaccine?: boolean;
|
|
1008
|
+
/** Sort order: "relevance", "name", "code" */
|
|
1009
|
+
sort?: "relevance" | "name" | "code";
|
|
1010
|
+
}
|
|
674
1011
|
|
|
675
1012
|
/**
|
|
676
1013
|
* CVX (Vaccine Codes) API endpoint.
|
|
@@ -700,6 +1037,26 @@ declare class CvxEndpoint {
|
|
|
700
1037
|
* @returns Batch response with results for each code
|
|
701
1038
|
*/
|
|
702
1039
|
lookupMany(cvxCodes: string[], options?: BatchLookupOptions): Promise<BatchResponse<CvxData>>;
|
|
1040
|
+
/**
|
|
1041
|
+
* Search for vaccine codes.
|
|
1042
|
+
*
|
|
1043
|
+
* @param params - Search parameters (q, status, vaccine_type, is_covid_vaccine)
|
|
1044
|
+
* @param options - Pagination and response shape options
|
|
1045
|
+
* @returns Search results with facets
|
|
1046
|
+
*
|
|
1047
|
+
* @example
|
|
1048
|
+
* ```ts
|
|
1049
|
+
* // Search for flu vaccines
|
|
1050
|
+
* const results = await client.cvx.search({ q: "influenza" });
|
|
1051
|
+
*
|
|
1052
|
+
* // Find all COVID-19 vaccines
|
|
1053
|
+
* const results = await client.cvx.search({
|
|
1054
|
+
* is_covid_vaccine: true,
|
|
1055
|
+
* status: "active"
|
|
1056
|
+
* });
|
|
1057
|
+
* ```
|
|
1058
|
+
*/
|
|
1059
|
+
search(params: CvxSearchParams, options?: SearchOptions): Promise<SearchResponse<CvxData>>;
|
|
703
1060
|
}
|
|
704
1061
|
|
|
705
1062
|
/**
|
|
@@ -730,6 +1087,17 @@ interface MvxFull extends MvxStandard {
|
|
|
730
1087
|
* MVX response type based on shape.
|
|
731
1088
|
*/
|
|
732
1089
|
type MvxData = MvxCompact | MvxStandard | MvxFull;
|
|
1090
|
+
/**
|
|
1091
|
+
* MVX search parameters.
|
|
1092
|
+
*/
|
|
1093
|
+
interface MvxSearchParams {
|
|
1094
|
+
/** General text search */
|
|
1095
|
+
q?: string;
|
|
1096
|
+
/** Filter by status: "active", "inactive" */
|
|
1097
|
+
status?: string;
|
|
1098
|
+
/** Sort order: "relevance", "name", "code" */
|
|
1099
|
+
sort?: "relevance" | "name" | "code";
|
|
1100
|
+
}
|
|
733
1101
|
|
|
734
1102
|
/**
|
|
735
1103
|
* MVX (Vaccine Manufacturer Codes) API endpoint.
|
|
@@ -759,6 +1127,23 @@ declare class MvxEndpoint {
|
|
|
759
1127
|
* @returns Batch response with results for each code
|
|
760
1128
|
*/
|
|
761
1129
|
lookupMany(mvxCodes: string[], options?: BatchLookupOptions): Promise<BatchResponse<MvxData>>;
|
|
1130
|
+
/**
|
|
1131
|
+
* Search for vaccine manufacturers.
|
|
1132
|
+
*
|
|
1133
|
+
* @param params - Search parameters (q, status)
|
|
1134
|
+
* @param options - Pagination and response shape options
|
|
1135
|
+
* @returns Search results with facets
|
|
1136
|
+
*
|
|
1137
|
+
* @example
|
|
1138
|
+
* ```ts
|
|
1139
|
+
* // Search by name
|
|
1140
|
+
* const results = await client.mvx.search({ q: "pfizer" });
|
|
1141
|
+
*
|
|
1142
|
+
* // List all active manufacturers
|
|
1143
|
+
* const results = await client.mvx.search({ status: "active" });
|
|
1144
|
+
* ```
|
|
1145
|
+
*/
|
|
1146
|
+
search(params: MvxSearchParams, options?: SearchOptions): Promise<SearchResponse<MvxData>>;
|
|
762
1147
|
}
|
|
763
1148
|
|
|
764
1149
|
/**
|
|
@@ -809,6 +1194,41 @@ interface FdaLabelFull extends FdaLabelStandard {
|
|
|
809
1194
|
* FDA Label response type based on shape.
|
|
810
1195
|
*/
|
|
811
1196
|
type FdaLabelData = FdaLabelCompact | FdaLabelStandard | FdaLabelFull;
|
|
1197
|
+
/**
|
|
1198
|
+
* FDA Label search parameters.
|
|
1199
|
+
*/
|
|
1200
|
+
interface FdaLabelSearchParams {
|
|
1201
|
+
/** General text search */
|
|
1202
|
+
q?: string;
|
|
1203
|
+
/** Search by product name */
|
|
1204
|
+
name?: string;
|
|
1205
|
+
/** Search by brand name */
|
|
1206
|
+
brand?: string;
|
|
1207
|
+
/** Search by generic name */
|
|
1208
|
+
generic?: string;
|
|
1209
|
+
/** Search by active substance/ingredient */
|
|
1210
|
+
substance?: string;
|
|
1211
|
+
/** Search by manufacturer name */
|
|
1212
|
+
manufacturer?: string;
|
|
1213
|
+
/** Filter by product type: "otc", "rx", "cellular" */
|
|
1214
|
+
product_type?: "otc" | "rx" | "cellular";
|
|
1215
|
+
/** Filter by administration route */
|
|
1216
|
+
route?: string;
|
|
1217
|
+
/** Filter by pharmacologic class */
|
|
1218
|
+
pharm_class?: string;
|
|
1219
|
+
/** Filter by RxNorm linkage */
|
|
1220
|
+
has_rxcui?: boolean;
|
|
1221
|
+
/** Filter by specific RxCUI */
|
|
1222
|
+
rxcui?: string;
|
|
1223
|
+
/** Filter by specific NDC */
|
|
1224
|
+
ndc?: string;
|
|
1225
|
+
/** Filter by FDA application number */
|
|
1226
|
+
application_number?: string;
|
|
1227
|
+
/** Filter for current labels only (default: true) */
|
|
1228
|
+
is_current?: boolean;
|
|
1229
|
+
/** Sort order: "relevance", "name", "manufacturer" */
|
|
1230
|
+
sort?: "relevance" | "name" | "manufacturer";
|
|
1231
|
+
}
|
|
812
1232
|
|
|
813
1233
|
/**
|
|
814
1234
|
* FDA Labels API endpoint.
|
|
@@ -852,6 +1272,32 @@ declare class FdaLabelsEndpoint {
|
|
|
852
1272
|
* @returns Batch response with results for each Set ID
|
|
853
1273
|
*/
|
|
854
1274
|
lookupMany(setIds: string[], options?: BatchLookupOptions): Promise<BatchResponse<FdaLabelData>>;
|
|
1275
|
+
/**
|
|
1276
|
+
* Search for FDA drug labels.
|
|
1277
|
+
*
|
|
1278
|
+
* @param params - Search parameters (q, name, brand, substance, manufacturer, etc.)
|
|
1279
|
+
* @param options - Pagination and response shape options
|
|
1280
|
+
* @returns Search results with facets
|
|
1281
|
+
*
|
|
1282
|
+
* @example
|
|
1283
|
+
* ```ts
|
|
1284
|
+
* // Search by drug name
|
|
1285
|
+
* const results = await client.fdaLabels.search({ q: "advil" });
|
|
1286
|
+
*
|
|
1287
|
+
* // Search OTC pain relievers
|
|
1288
|
+
* const results = await client.fdaLabels.search({
|
|
1289
|
+
* substance: "acetaminophen",
|
|
1290
|
+
* product_type: "otc"
|
|
1291
|
+
* });
|
|
1292
|
+
*
|
|
1293
|
+
* // Search by manufacturer
|
|
1294
|
+
* const results = await client.fdaLabels.search({
|
|
1295
|
+
* manufacturer: "pfizer",
|
|
1296
|
+
* product_type: "rx"
|
|
1297
|
+
* });
|
|
1298
|
+
* ```
|
|
1299
|
+
*/
|
|
1300
|
+
search(params: FdaLabelSearchParams, options?: SearchOptions): Promise<SearchResponse<FdaLabelData>>;
|
|
855
1301
|
}
|
|
856
1302
|
|
|
857
1303
|
/**
|
|
@@ -1065,4 +1511,4 @@ declare class TimeoutError extends FhirflyError {
|
|
|
1065
1511
|
constructor(timeoutMs: number);
|
|
1066
1512
|
}
|
|
1067
1513
|
|
|
1068
|
-
export { type ActiveIngredient, ApiError, type ApiResponse, AuthenticationError, type BatchLookupOptions, type BatchResponse, type BatchResultItem, type CvxCompact, type CvxData, type CvxFull, type CvxStandard, type DisplayField, type FdaLabelCompact, type FdaLabelData, type FdaLabelFull, type FdaLabelStandard, Fhirfly, type FhirflyApiKeyConfig, type FhirflyConfig, FhirflyError, type FhirflyOAuthConfig, type Icd10Compact, type Icd10Data, type Icd10Full, type Icd10Standard, type Icd10Type, type IncludeOption, type LegalInfo, type LoincCompact, type LoincData, type LoincFull, type LoincStandard, type LookupOptions, type MvxCompact, type MvxData, type MvxFull, type MvxStandard, type NdcCompact, type NdcData, type NdcFull, type NdcPackaging, type NdcStandard, NetworkError, NotFoundError, type NpiAddress, type NpiCompact, type NpiData, type NpiFull, type NpiIdentifier, type NpiStandard, type NpiTaxonomy, QuotaExceededError, RateLimitError, type ResponseMeta, type ResponseShape, type RxNormCompact, type RxNormData, type RxNormFull, type RxNormStandard, type RxTermType, ServerError, TimeoutError, TokenManager, ValidationError };
|
|
1514
|
+
export { type ActiveIngredient, ApiError, type ApiResponse, AuthenticationError, type BatchLookupOptions, type BatchResponse, type BatchResultItem, type CvxCompact, type CvxData, type CvxFull, type CvxSearchParams, type CvxStandard, type DisplayField, type FdaLabelCompact, type FdaLabelData, type FdaLabelFull, type FdaLabelSearchParams, type FdaLabelStandard, Fhirfly, type FhirflyApiKeyConfig, type FhirflyConfig, FhirflyError, type FhirflyOAuthConfig, type Icd10Compact, type Icd10Data, type Icd10Full, type Icd10SearchParams, type Icd10Standard, type Icd10Type, type IncludeOption, type LegalInfo, type LoincCompact, type LoincData, type LoincFull, type LoincSearchParams, type LoincStandard, type LookupOptions, type MvxCompact, type MvxData, type MvxFull, type MvxSearchParams, type MvxStandard, type NdcCompact, type NdcData, type NdcFull, type NdcPackaging, type NdcSearchParams, type NdcStandard, NetworkError, NotFoundError, type NpiAddress, type NpiCompact, type NpiData, type NpiFull, type NpiIdentifier, type NpiSearchParams, type NpiStandard, type NpiTaxonomy, QuotaExceededError, RateLimitError, type ResponseMeta, type ResponseShape, type RxNormCompact, type RxNormData, type RxNormFull, type RxNormSearchParams, type RxNormStandard, type RxTermType, type SearchFacets, type SearchLegalInfo, type SearchOptions, type SearchResponse, ServerError, TimeoutError, TokenManager, ValidationError };
|