@fhirfly-io/terminology 0.6.1 → 0.7.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 +37 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +382 -175
- package/dist/index.d.ts +382 -175
- package/dist/index.js +37 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -327,54 +327,83 @@ interface SnomedEnrichmentFull extends SnomedEnrichmentStandard {
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
|
-
* Active ingredient in a drug product.
|
|
330
|
+
* Active ingredient in a drug product (full shape only).
|
|
331
331
|
*/
|
|
332
332
|
interface ActiveIngredient {
|
|
333
333
|
name: string;
|
|
334
|
-
strength
|
|
335
|
-
unit
|
|
334
|
+
strength: string | null;
|
|
335
|
+
unit: string | null;
|
|
336
336
|
}
|
|
337
337
|
/**
|
|
338
|
-
*
|
|
338
|
+
* NDC type: product-level or package-level.
|
|
339
339
|
*/
|
|
340
|
-
|
|
341
|
-
ndc: string;
|
|
342
|
-
description?: string;
|
|
343
|
-
package_ndc?: string;
|
|
344
|
-
}
|
|
340
|
+
type NdcType = "package" | "product";
|
|
345
341
|
/**
|
|
346
342
|
* NDC lookup result - compact shape.
|
|
343
|
+
* Minimal data for lists, autocomplete, search results.
|
|
347
344
|
*/
|
|
348
345
|
interface NdcCompact extends DisplayField {
|
|
349
346
|
ndc: string;
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
347
|
+
type: NdcType;
|
|
348
|
+
name: string;
|
|
349
|
+
generic: string | null;
|
|
350
|
+
labeler: string | null;
|
|
351
|
+
active: boolean;
|
|
353
352
|
}
|
|
354
353
|
/**
|
|
355
354
|
* NDC lookup result - standard shape.
|
|
355
|
+
* Core structured data for most API integrations.
|
|
356
356
|
*/
|
|
357
|
-
interface NdcStandard extends
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
357
|
+
interface NdcStandard extends DisplayField {
|
|
358
|
+
ndc: string;
|
|
359
|
+
type: NdcType;
|
|
360
|
+
/** Package-specific: hyphenated 5-4-2 NDC */
|
|
361
|
+
ndc11_hyph?: string;
|
|
362
|
+
/** Package-specific: parent product NDC */
|
|
363
|
+
product_ndc?: string;
|
|
364
|
+
/** Package-specific: package description */
|
|
365
|
+
package_description?: string;
|
|
366
|
+
brand_name: string | null;
|
|
367
|
+
generic_name: string | null;
|
|
368
|
+
labeler_name: string | null;
|
|
369
|
+
dosage_form: string | null;
|
|
370
|
+
route: string[] | null;
|
|
371
|
+
strength: string | null;
|
|
372
|
+
rxcui: string[];
|
|
373
|
+
is_active: boolean;
|
|
364
374
|
/** SNOMED CT mappings (derived via RxNorm, added by enrichment) */
|
|
365
375
|
snomed?: SnomedEnrichmentStandard[];
|
|
366
376
|
}
|
|
367
377
|
/**
|
|
368
378
|
* NDC lookup result - full shape.
|
|
379
|
+
* Complete data with provenance for AI agents and auditing.
|
|
369
380
|
*/
|
|
370
|
-
interface NdcFull extends
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
381
|
+
interface NdcFull extends DisplayField {
|
|
382
|
+
ndc: string;
|
|
383
|
+
type: NdcType;
|
|
384
|
+
/** Package-specific: hyphenated 5-4-2 NDC */
|
|
385
|
+
ndc11_hyph?: string;
|
|
386
|
+
/** Package-specific: parent product NDC */
|
|
387
|
+
product_ndc?: string;
|
|
388
|
+
/** Package-specific: package description */
|
|
389
|
+
package_description?: string;
|
|
390
|
+
brand_name: string | null;
|
|
391
|
+
generic_name: string | null;
|
|
392
|
+
labeler_name: string | null;
|
|
393
|
+
dosage_form: string | null;
|
|
394
|
+
route: string[] | null;
|
|
395
|
+
strength: string | null;
|
|
396
|
+
rxcui: string[];
|
|
397
|
+
is_active: boolean;
|
|
398
|
+
marketing_category: string | null;
|
|
399
|
+
application_number: string | null;
|
|
400
|
+
product_type: string | null;
|
|
401
|
+
listing_expiration_date: string | null;
|
|
402
|
+
is_generic: boolean;
|
|
403
|
+
generic_basis: string[];
|
|
404
|
+
active_ingredients: ActiveIngredient[];
|
|
405
|
+
pharm_class: string[];
|
|
406
|
+
dea_schedule: string | null;
|
|
378
407
|
/** SNOMED CT mappings with FHIR coding (derived via RxNorm, added by enrichment) */
|
|
379
408
|
snomed?: SnomedEnrichmentFull[];
|
|
380
409
|
}
|
|
@@ -495,6 +524,17 @@ declare class NdcEndpoint {
|
|
|
495
524
|
search(params: NdcSearchParams, options?: SearchOptions): Promise<SearchResponse<NdcData>>;
|
|
496
525
|
}
|
|
497
526
|
|
|
527
|
+
/**
|
|
528
|
+
* Person name object for individual providers.
|
|
529
|
+
*/
|
|
530
|
+
interface PersonName {
|
|
531
|
+
first: string;
|
|
532
|
+
last: string;
|
|
533
|
+
middle?: string;
|
|
534
|
+
prefix?: string;
|
|
535
|
+
suffix?: string;
|
|
536
|
+
credential?: string;
|
|
537
|
+
}
|
|
498
538
|
/**
|
|
499
539
|
* Provider address information.
|
|
500
540
|
*/
|
|
@@ -504,69 +544,116 @@ interface NpiAddress {
|
|
|
504
544
|
city?: string;
|
|
505
545
|
state?: string;
|
|
506
546
|
postal_code?: string;
|
|
507
|
-
|
|
508
|
-
|
|
547
|
+
country_code?: string;
|
|
548
|
+
phone?: string;
|
|
549
|
+
phone_digits?: string;
|
|
509
550
|
fax?: string;
|
|
510
551
|
}
|
|
511
552
|
/**
|
|
512
|
-
*
|
|
553
|
+
* Enriched taxonomy with NUCC data merged.
|
|
513
554
|
*/
|
|
514
|
-
interface
|
|
555
|
+
interface EnrichedTaxonomy {
|
|
515
556
|
code: string;
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
557
|
+
primary: boolean;
|
|
558
|
+
license_number?: string;
|
|
559
|
+
license_state?: string;
|
|
560
|
+
classification: string;
|
|
561
|
+
specialization: string | null;
|
|
562
|
+
display_name: string;
|
|
563
|
+
grouping?: string;
|
|
564
|
+
/** Only included in full shape */
|
|
565
|
+
definition?: string;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Secondary practice location from pl_pfile.
|
|
569
|
+
*/
|
|
570
|
+
interface SecondaryLocation {
|
|
571
|
+
line1: string;
|
|
572
|
+
line2?: string;
|
|
573
|
+
city: string;
|
|
574
|
+
state: string;
|
|
575
|
+
postal: string;
|
|
576
|
+
country?: string;
|
|
577
|
+
phone?: string;
|
|
578
|
+
phone_digits?: string;
|
|
579
|
+
phone_ext?: string;
|
|
580
|
+
fax?: string;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* Deactivation information.
|
|
584
|
+
*/
|
|
585
|
+
interface Deactivation {
|
|
586
|
+
code?: string;
|
|
587
|
+
date?: string;
|
|
588
|
+
reactivation_date?: string;
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Authorized official for organizations.
|
|
592
|
+
*/
|
|
593
|
+
interface AuthorizedOfficial {
|
|
594
|
+
first_name?: string;
|
|
595
|
+
last_name?: string;
|
|
596
|
+
middle_name?: string;
|
|
597
|
+
title?: string;
|
|
598
|
+
phone?: string;
|
|
599
|
+
credential?: string;
|
|
520
600
|
}
|
|
521
601
|
/**
|
|
522
602
|
* Other identifier (non-NPI) for a provider.
|
|
523
603
|
*/
|
|
524
|
-
interface
|
|
604
|
+
interface OtherIdentifier {
|
|
525
605
|
identifier: string;
|
|
526
|
-
|
|
606
|
+
type_code: string;
|
|
527
607
|
state?: string;
|
|
528
608
|
issuer?: string;
|
|
529
609
|
}
|
|
530
610
|
/**
|
|
531
611
|
* NPI lookup result - compact shape.
|
|
612
|
+
* Minimal data for lists, autocomplete, search results.
|
|
532
613
|
*/
|
|
533
614
|
interface NpiCompact extends DisplayField {
|
|
534
615
|
npi: string;
|
|
535
|
-
entity_type: "individual" | "organization";
|
|
536
616
|
name: string;
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
/** For organizations: organization name */
|
|
542
|
-
organization_name?: string;
|
|
617
|
+
type: "individual" | "organization";
|
|
618
|
+
specialty: string | null;
|
|
619
|
+
location: string | null;
|
|
620
|
+
active: boolean;
|
|
543
621
|
}
|
|
544
622
|
/**
|
|
545
623
|
* NPI lookup result - standard shape.
|
|
624
|
+
* Core structured data for most API integrations.
|
|
546
625
|
*/
|
|
547
|
-
interface NpiStandard extends
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
626
|
+
interface NpiStandard extends DisplayField {
|
|
627
|
+
npi: string;
|
|
628
|
+
entity_type: "individual" | "organization";
|
|
629
|
+
name: PersonName | null;
|
|
630
|
+
organization_name: string | null;
|
|
631
|
+
taxonomies: Omit<EnrichedTaxonomy, "definition">[];
|
|
632
|
+
practice_address: NpiAddress | null;
|
|
633
|
+
enumeration_date: string;
|
|
634
|
+
last_update_date: string;
|
|
635
|
+
is_active: boolean;
|
|
556
636
|
}
|
|
557
637
|
/**
|
|
558
638
|
* NPI lookup result - full shape.
|
|
639
|
+
* Complete data with provenance for AI agents and auditing.
|
|
559
640
|
*/
|
|
560
|
-
interface NpiFull extends
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
641
|
+
interface NpiFull extends DisplayField {
|
|
642
|
+
npi: string;
|
|
643
|
+
entity_type: "individual" | "organization";
|
|
644
|
+
name: PersonName | null;
|
|
645
|
+
organization_name: string | null;
|
|
646
|
+
taxonomies: EnrichedTaxonomy[];
|
|
647
|
+
practice_address: NpiAddress | null;
|
|
648
|
+
secondary_locations: SecondaryLocation[];
|
|
649
|
+
mailing_address: NpiAddress | null;
|
|
650
|
+
enumeration_date: string;
|
|
651
|
+
last_update_date: string;
|
|
652
|
+
is_active: boolean;
|
|
653
|
+
is_sole_proprietor: boolean | null;
|
|
654
|
+
deactivation: Deactivation | null;
|
|
655
|
+
authorized_official: AuthorizedOfficial | null;
|
|
656
|
+
other_identifiers: OtherIdentifier[];
|
|
570
657
|
}
|
|
571
658
|
/**
|
|
572
659
|
* NPI response type based on shape.
|
|
@@ -798,55 +885,102 @@ declare class RxNormEndpoint {
|
|
|
798
885
|
search(params: RxNormSearchParams, options?: SearchOptions): Promise<SearchResponse<RxNormData>>;
|
|
799
886
|
}
|
|
800
887
|
|
|
888
|
+
/**
|
|
889
|
+
* LOINC semantic axis parts.
|
|
890
|
+
*/
|
|
891
|
+
interface LoincParts {
|
|
892
|
+
component: string | null;
|
|
893
|
+
property: string | null;
|
|
894
|
+
time_aspct: string | null;
|
|
895
|
+
system: string | null;
|
|
896
|
+
scale_typ: string | null;
|
|
897
|
+
method_typ: string | null;
|
|
898
|
+
}
|
|
899
|
+
/**
|
|
900
|
+
* LOINC example unit information.
|
|
901
|
+
*/
|
|
902
|
+
interface LoincUnits {
|
|
903
|
+
example_units: string | null;
|
|
904
|
+
example_ucum_units: string | null;
|
|
905
|
+
}
|
|
906
|
+
/**
|
|
907
|
+
* LOINC FHIR coding representation.
|
|
908
|
+
*/
|
|
909
|
+
interface LoincFhirCoding {
|
|
910
|
+
system: string;
|
|
911
|
+
code: string;
|
|
912
|
+
display: string;
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* Ranking information for common tests/orders.
|
|
916
|
+
*/
|
|
917
|
+
interface LoincRanks {
|
|
918
|
+
common_test_rank: number | null;
|
|
919
|
+
common_order_rank: number | null;
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Source organization and copyright info.
|
|
923
|
+
*/
|
|
924
|
+
interface LoincSourceOrg {
|
|
925
|
+
external_copyright_notice: string | null;
|
|
926
|
+
external_copyright_link: string | null;
|
|
927
|
+
org_name: string | null;
|
|
928
|
+
org_terms_of_use: string | null;
|
|
929
|
+
org_url: string | null;
|
|
930
|
+
}
|
|
801
931
|
/**
|
|
802
932
|
* LOINC lookup result - compact shape.
|
|
933
|
+
* Minimal data for lists, autocomplete, search results.
|
|
803
934
|
*/
|
|
804
935
|
interface LoincCompact extends DisplayField {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
936
|
+
code: string;
|
|
937
|
+
display_name: string;
|
|
938
|
+
shortname: string | null;
|
|
939
|
+
class: string | null;
|
|
940
|
+
component: string | null;
|
|
808
941
|
}
|
|
809
942
|
/**
|
|
810
943
|
* LOINC lookup result - standard shape.
|
|
944
|
+
* Core structured data for most API integrations.
|
|
811
945
|
*/
|
|
812
|
-
interface LoincStandard extends
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
946
|
+
interface LoincStandard extends DisplayField {
|
|
947
|
+
code: string;
|
|
948
|
+
display_name: string;
|
|
949
|
+
shortname: string | null;
|
|
950
|
+
long_name: string | null;
|
|
951
|
+
class: string | null;
|
|
952
|
+
status: string;
|
|
953
|
+
order_obs: string | null;
|
|
954
|
+
parts: LoincParts;
|
|
955
|
+
units: LoincUnits;
|
|
956
|
+
map_to: string[];
|
|
957
|
+
fhir_coding: LoincFhirCoding;
|
|
823
958
|
}
|
|
824
959
|
/**
|
|
825
960
|
* LOINC lookup result - full shape.
|
|
961
|
+
* Complete data with provenance for AI agents.
|
|
826
962
|
*/
|
|
827
|
-
interface LoincFull extends
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
version_first_released?: string;
|
|
849
|
-
version_last_changed?: string;
|
|
963
|
+
interface LoincFull extends DisplayField {
|
|
964
|
+
code: string;
|
|
965
|
+
display_name: string;
|
|
966
|
+
shortname: string | null;
|
|
967
|
+
long_name: string | null;
|
|
968
|
+
consumer_name: string | null;
|
|
969
|
+
class: string | null;
|
|
970
|
+
classtype: number | null;
|
|
971
|
+
status: string;
|
|
972
|
+
status_reason: string | null;
|
|
973
|
+
order_obs: string | null;
|
|
974
|
+
parts: LoincParts;
|
|
975
|
+
units: LoincUnits;
|
|
976
|
+
map_to: string[];
|
|
977
|
+
map_to_comment: string | null;
|
|
978
|
+
fhir_coding: LoincFhirCoding;
|
|
979
|
+
version: string;
|
|
980
|
+
version_first_released: string | null;
|
|
981
|
+
version_last_changed: string | null;
|
|
982
|
+
ranks: LoincRanks;
|
|
983
|
+
source_org: LoincSourceOrg;
|
|
850
984
|
}
|
|
851
985
|
/**
|
|
852
986
|
* LOINC response type based on shape.
|
|
@@ -1170,29 +1304,66 @@ declare class CvxEndpoint {
|
|
|
1170
1304
|
search(params: CvxSearchParams, options?: SearchOptions): Promise<SearchResponse<CvxData>>;
|
|
1171
1305
|
}
|
|
1172
1306
|
|
|
1307
|
+
/**
|
|
1308
|
+
* FHIR coding representation for MVX.
|
|
1309
|
+
*/
|
|
1310
|
+
interface MvxFhirCoding {
|
|
1311
|
+
system: string;
|
|
1312
|
+
code: string;
|
|
1313
|
+
display: string;
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* ETL ingest tracking metadata.
|
|
1317
|
+
*/
|
|
1318
|
+
interface MvxIngest {
|
|
1319
|
+
source: string;
|
|
1320
|
+
file_tag: string;
|
|
1321
|
+
etl_version: string;
|
|
1322
|
+
run_id: string;
|
|
1323
|
+
first_seen: string;
|
|
1324
|
+
last_seen: string;
|
|
1325
|
+
is_current: boolean;
|
|
1326
|
+
was_removed: boolean;
|
|
1327
|
+
removed_at: string | null;
|
|
1328
|
+
removed_file_tag: string | null;
|
|
1329
|
+
}
|
|
1173
1330
|
/**
|
|
1174
1331
|
* MVX vaccine manufacturer lookup result - compact shape.
|
|
1332
|
+
* Minimal data for lists, autocomplete.
|
|
1175
1333
|
*/
|
|
1176
1334
|
interface MvxCompact extends DisplayField {
|
|
1177
|
-
|
|
1178
|
-
|
|
1335
|
+
code: string;
|
|
1336
|
+
display: string;
|
|
1337
|
+
status: string;
|
|
1179
1338
|
}
|
|
1180
1339
|
/**
|
|
1181
1340
|
* MVX vaccine manufacturer lookup result - standard shape.
|
|
1341
|
+
* Core structured data for most API integrations.
|
|
1182
1342
|
*/
|
|
1183
|
-
interface MvxStandard extends
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1343
|
+
interface MvxStandard extends DisplayField {
|
|
1344
|
+
code: string;
|
|
1345
|
+
code_system: string;
|
|
1346
|
+
display: string;
|
|
1347
|
+
status: string;
|
|
1348
|
+
manufacturer_name: string;
|
|
1349
|
+
notes: string | null;
|
|
1350
|
+
last_updated_by_cdc: string | null;
|
|
1351
|
+
fhir_coding: MvxFhirCoding;
|
|
1187
1352
|
}
|
|
1188
1353
|
/**
|
|
1189
1354
|
* MVX vaccine manufacturer lookup result - full shape.
|
|
1355
|
+
* Complete data with provenance for AI agents.
|
|
1190
1356
|
*/
|
|
1191
|
-
interface MvxFull extends
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1357
|
+
interface MvxFull extends DisplayField {
|
|
1358
|
+
code: string;
|
|
1359
|
+
code_system: string;
|
|
1360
|
+
display: string;
|
|
1361
|
+
status: string;
|
|
1362
|
+
manufacturer_name: string;
|
|
1363
|
+
notes: string | null;
|
|
1364
|
+
last_updated_by_cdc: string | null;
|
|
1365
|
+
fhir_coding: MvxFhirCoding;
|
|
1366
|
+
ingest: MvxIngest;
|
|
1196
1367
|
}
|
|
1197
1368
|
/**
|
|
1198
1369
|
* MVX response type based on shape.
|
|
@@ -1258,53 +1429,85 @@ declare class MvxEndpoint {
|
|
|
1258
1429
|
}
|
|
1259
1430
|
|
|
1260
1431
|
/**
|
|
1261
|
-
* FDA Label
|
|
1432
|
+
* FDA Label metadata returned in API responses.
|
|
1262
1433
|
*/
|
|
1263
|
-
interface
|
|
1434
|
+
interface FdaLabelMetadata {
|
|
1435
|
+
id: string;
|
|
1264
1436
|
set_id: string;
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1437
|
+
version: string;
|
|
1438
|
+
effective_time: string;
|
|
1439
|
+
brand_name: string[];
|
|
1440
|
+
generic_name: string[];
|
|
1441
|
+
manufacturer_name: string[];
|
|
1442
|
+
product_ndc: string[];
|
|
1443
|
+
package_ndc: string[];
|
|
1444
|
+
rxcui: string[];
|
|
1445
|
+
product_type: string[];
|
|
1446
|
+
route: string[];
|
|
1447
|
+
pharm_class_epc: string[];
|
|
1448
|
+
available_sections: string[];
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
* FDA Label data returned from lookup.
|
|
1452
|
+
* The API uses a metadata + sections model instead of compact/standard/full shapes.
|
|
1453
|
+
*/
|
|
1454
|
+
interface FdaLabelData {
|
|
1455
|
+
metadata: FdaLabelMetadata;
|
|
1456
|
+
/** Section content, keyed by section name (e.g., "boxed_warning", "dosage_and_administration") */
|
|
1457
|
+
sections?: Record<string, string[]>;
|
|
1458
|
+
}
|
|
1459
|
+
/**
|
|
1460
|
+
* Known section bundle names for common use cases.
|
|
1461
|
+
*/
|
|
1462
|
+
type FdaLabelBundleName = "safety" | "dosing" | "interactions" | "pregnancy" | "ingredients";
|
|
1463
|
+
/**
|
|
1464
|
+
* Options for FDA Label lookup (replaces standard LookupOptions shape).
|
|
1465
|
+
*/
|
|
1466
|
+
interface FdaLabelLookupOptions {
|
|
1467
|
+
/** Specific section keys to fetch (e.g., ["boxed_warning", "dosage_and_administration"]) */
|
|
1468
|
+
sections?: string[];
|
|
1469
|
+
/** Predefined bundle of sections (e.g., "safety", "dosing") */
|
|
1470
|
+
bundle?: FdaLabelBundleName;
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* FDA Label search result - compact shape (used by search endpoint).
|
|
1474
|
+
*/
|
|
1475
|
+
interface FdaLabelSearchCompact {
|
|
1476
|
+
spl_id: string;
|
|
1477
|
+
set_id: string;
|
|
1478
|
+
brand_name: string | null;
|
|
1479
|
+
generic_name: string | null;
|
|
1480
|
+
manufacturer: string | null;
|
|
1481
|
+
product_type: string | null;
|
|
1482
|
+
route: string[];
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* FDA Label search result - standard shape (used by search endpoint).
|
|
1486
|
+
*/
|
|
1487
|
+
interface FdaLabelSearchStandard extends FdaLabelSearchCompact {
|
|
1488
|
+
substance_name: string[];
|
|
1489
|
+
pharm_class_epc: string[];
|
|
1490
|
+
rxcui: string[];
|
|
1491
|
+
product_ndc: string[];
|
|
1492
|
+
application_number: string[];
|
|
1493
|
+
effective_time: string;
|
|
1494
|
+
version: string;
|
|
1495
|
+
}
|
|
1496
|
+
/**
|
|
1497
|
+
* FDA Label search result - full shape (used by search endpoint).
|
|
1498
|
+
*/
|
|
1499
|
+
interface FdaLabelSearchFull extends FdaLabelSearchStandard {
|
|
1500
|
+
pharm_class_moa: string[];
|
|
1501
|
+
pharm_class_pe: string[];
|
|
1502
|
+
pharm_class_cs: string[];
|
|
1503
|
+
package_ndc: string[];
|
|
1504
|
+
unii: string[];
|
|
1505
|
+
nui: string[];
|
|
1506
|
+
}
|
|
1507
|
+
/**
|
|
1508
|
+
* FDA Label search result type.
|
|
1509
|
+
*/
|
|
1510
|
+
type FdaLabelSearchData = FdaLabelSearchCompact | FdaLabelSearchStandard | FdaLabelSearchFull;
|
|
1308
1511
|
/**
|
|
1309
1512
|
* FDA Label search parameters.
|
|
1310
1513
|
*/
|
|
@@ -1343,6 +1546,9 @@ interface FdaLabelSearchParams {
|
|
|
1343
1546
|
|
|
1344
1547
|
/**
|
|
1345
1548
|
* FDA Labels API endpoint.
|
|
1549
|
+
*
|
|
1550
|
+
* Unlike other endpoints, FDA Labels uses a metadata + sections model instead of
|
|
1551
|
+
* compact/standard/full shapes for lookup. The search endpoint still uses shapes.
|
|
1346
1552
|
*/
|
|
1347
1553
|
declare class FdaLabelsEndpoint {
|
|
1348
1554
|
private readonly http;
|
|
@@ -1351,37 +1557,44 @@ declare class FdaLabelsEndpoint {
|
|
|
1351
1557
|
* Look up FDA label by identifier (Set ID, NDC, or RxCUI).
|
|
1352
1558
|
*
|
|
1353
1559
|
* The API auto-detects the identifier type based on format.
|
|
1560
|
+
* Returns metadata by default; specify `sections` or `bundle` to include label content.
|
|
1354
1561
|
*
|
|
1355
1562
|
* @param identifier - FDA SPL Set ID, NDC code, or RxCUI
|
|
1356
|
-
* @param options -
|
|
1357
|
-
* @returns FDA Label
|
|
1563
|
+
* @param options - Sections or bundle to include
|
|
1564
|
+
* @returns FDA Label metadata and optional sections
|
|
1358
1565
|
*
|
|
1359
1566
|
* @example
|
|
1360
1567
|
* ```ts
|
|
1361
|
-
* //
|
|
1362
|
-
* const label = await client.fdaLabels.lookup("abc123-def456");
|
|
1363
|
-
*
|
|
1364
|
-
* // By NDC
|
|
1568
|
+
* // Metadata only
|
|
1365
1569
|
* const label = await client.fdaLabels.lookup("0069-0151-01");
|
|
1366
1570
|
*
|
|
1367
|
-
* //
|
|
1368
|
-
* const label = await client.fdaLabels.lookup("
|
|
1571
|
+
* // With safety sections
|
|
1572
|
+
* const label = await client.fdaLabels.lookup("0069-0151-01", {
|
|
1573
|
+
* bundle: "safety"
|
|
1574
|
+
* });
|
|
1575
|
+
*
|
|
1576
|
+
* // With specific sections
|
|
1577
|
+
* const label = await client.fdaLabels.lookup("0069-0151-01", {
|
|
1578
|
+
* sections: ["boxed_warning", "dosage_and_administration"]
|
|
1579
|
+
* });
|
|
1369
1580
|
* ```
|
|
1370
1581
|
*/
|
|
1371
|
-
lookup(identifier: string, options?:
|
|
1582
|
+
lookup(identifier: string, options?: FdaLabelLookupOptions): Promise<ApiResponse<FdaLabelData>>;
|
|
1372
1583
|
/**
|
|
1373
1584
|
* Look up multiple FDA labels by identifiers in a single request.
|
|
1374
1585
|
*
|
|
1586
|
+
* Returns metadata only (no sections) for batch efficiency.
|
|
1375
1587
|
* Identifiers can be Set IDs, NDC codes, or RxCUIs (mixed).
|
|
1376
1588
|
*
|
|
1377
1589
|
* @param identifiers - Array of identifiers (max 500)
|
|
1378
|
-
* @param options - Response shape, include, and batch options
|
|
1379
1590
|
* @returns Batch response with results for each identifier
|
|
1380
1591
|
*/
|
|
1381
|
-
lookupMany(identifiers: string[]
|
|
1592
|
+
lookupMany(identifiers: string[]): Promise<BatchResponse<FdaLabelData>>;
|
|
1382
1593
|
/**
|
|
1383
1594
|
* Search for FDA drug labels.
|
|
1384
1595
|
*
|
|
1596
|
+
* Search uses compact/standard/full shapes (unlike lookup which uses metadata+sections).
|
|
1597
|
+
*
|
|
1385
1598
|
* @param params - Search parameters (q, name, brand, substance, manufacturer, etc.)
|
|
1386
1599
|
* @param options - Pagination and response shape options
|
|
1387
1600
|
* @returns Search results with facets
|
|
@@ -1396,15 +1609,9 @@ declare class FdaLabelsEndpoint {
|
|
|
1396
1609
|
* substance: "acetaminophen",
|
|
1397
1610
|
* product_type: "otc"
|
|
1398
1611
|
* });
|
|
1399
|
-
*
|
|
1400
|
-
* // Search by manufacturer
|
|
1401
|
-
* const results = await client.fdaLabels.search({
|
|
1402
|
-
* manufacturer: "pfizer",
|
|
1403
|
-
* product_type: "rx"
|
|
1404
|
-
* });
|
|
1405
1612
|
* ```
|
|
1406
1613
|
*/
|
|
1407
|
-
search(params: FdaLabelSearchParams, options?: SearchOptions): Promise<SearchResponse<
|
|
1614
|
+
search(params: FdaLabelSearchParams, options?: SearchOptions): Promise<SearchResponse<FdaLabelSearchData>>;
|
|
1408
1615
|
}
|
|
1409
1616
|
|
|
1410
1617
|
/**
|
|
@@ -1947,4 +2154,4 @@ declare class TimeoutError extends FhirflyError {
|
|
|
1947
2154
|
constructor(timeoutMs: number);
|
|
1948
2155
|
}
|
|
1949
2156
|
|
|
1950
|
-
export { type ActiveIngredient, ApiError, type ApiResponse, AuthenticationError, type BatchLookupOptions, type BatchResponse, type BatchResultItem, type ConnectivityEndpointData, type ConnectivityMeta, type ConnectivityTargetData, type CvxCompact, type CvxData, type CvxFull, type CvxSearchParams, type CvxStandard, type DisplayField, type EndpointAuthRequirements, type EndpointAvailability, type EvidenceSummary, type
|
|
2157
|
+
export { type ActiveIngredient, ApiError, type ApiResponse, AuthenticationError, type AuthorizedOfficial, type BatchLookupOptions, type BatchResponse, type BatchResultItem, type ConnectivityEndpointData, type ConnectivityMeta, type ConnectivityTargetData, type CvxCompact, type CvxData, type CvxFull, type CvxSearchParams, type CvxStandard, type Deactivation, type DisplayField, type EndpointAuthRequirements, type EndpointAvailability, type EnrichedTaxonomy, type EvidenceSummary, type FdaLabelBundleName, type FdaLabelData, type FdaLabelLookupOptions, type FdaLabelMetadata, type FdaLabelSearchCompact, type FdaLabelSearchData, type FdaLabelSearchFull, type FdaLabelSearchParams, type FdaLabelSearchStandard, type FhirMetadata, Fhirfly, type FhirflyApiKeyConfig, type FhirflyConfig, FhirflyError, type FhirflyOAuthConfig, type Icd10Compact, type Icd10Data, type Icd10Full, type Icd10SearchParams, type Icd10Standard, type Icd10Type, type IncludeOption, type IpsCategory, type LegalInfo, type LoincCompact, type LoincData, type LoincFhirCoding, type LoincFull, type LoincParts, type LoincRanks, type LoincSearchParams, type LoincSourceOrg, type LoincStandard, type LoincUnits, type LookupOptions, type MvxCompact, type MvxData, type MvxFhirCoding, type MvxFull, type MvxIngest, type MvxSearchParams, type MvxStandard, type NdcCompact, type NdcData, type NdcFull, type NdcSearchParams, type NdcStandard, type NdcType, NetworkError, NotFoundError, type NpiAddress, type NpiCompact, type NpiConnectivityData, type NpiData, type NpiFull, type NpiSearchParams, type NpiStandard, type OtherIdentifier, type PersonName, type ProviderSummary, 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, type SecondaryLocation, ServerError, type SnomedBatchResultItem, type SnomedCategoriesResponse, type SnomedConcept, type SnomedEnrichmentFull, type SnomedEnrichmentStandard, type SnomedMappingSource, type SnomedMappingSourceSystem, type SnomedMappingType, type SnomedReverseMapping, type SnomedReverseMappingData, type SnomedSearchParams, TimeoutError, TokenManager, ValidationError };
|