@fhirfly-io/terminology 0.9.0 → 0.10.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.d.cts CHANGED
@@ -2292,6 +2292,244 @@ declare class ClaimsEndpoint {
2292
2292
  checkCoverage(hcpcs: string, options?: CoverageCheckOptions): Promise<CoverageCheckResponse>;
2293
2293
  }
2294
2294
 
2295
+ /**
2296
+ * SMA Endpoint Directory API types.
2297
+ *
2298
+ * Types for looking up state Medicaid agency FHIR endpoint implementation
2299
+ * status, including patient access and provider directory endpoints.
2300
+ */
2301
+ /**
2302
+ * Options for filtering the SMA states list.
2303
+ */
2304
+ interface SmaListOptions {
2305
+ /** Filter by implementation status */
2306
+ implemented?: boolean;
2307
+ /** Filter by API vendor (e.g., "Epic") */
2308
+ vendor?: string;
2309
+ /** Filter by patient access status */
2310
+ status?: string;
2311
+ /** Filter by FHIR version (e.g., "4.0.1") */
2312
+ fhir_version?: string;
2313
+ }
2314
+ /**
2315
+ * Summary of a state's SMA endpoint implementation status.
2316
+ */
2317
+ interface SmaStateSummary {
2318
+ /** State identifier (e.g., "california") */
2319
+ id: string;
2320
+ /** State display name (e.g., "California") */
2321
+ state: string;
2322
+ /** Two-letter abbreviation (e.g., "CA") or null for territories */
2323
+ abbreviation: string | null;
2324
+ /** Whether the state has implemented FHIR endpoints */
2325
+ is_implemented: boolean;
2326
+ /** API vendor (e.g., "Epic") or null */
2327
+ api_vendor: string | null;
2328
+ /** Patient access API status */
2329
+ patient_access_status: string | null;
2330
+ /** Provider directory API status */
2331
+ provider_directory_status: string | null;
2332
+ /** Number of production endpoint URLs */
2333
+ production_url_count: number;
2334
+ /** FHIR version (e.g., "4.0.1") */
2335
+ fhir_version: string | null;
2336
+ }
2337
+ /**
2338
+ * Response metadata for SMA lookups.
2339
+ */
2340
+ interface SmaMetaResponse {
2341
+ /** Timestamp of when data was last updated */
2342
+ data_as_of: string;
2343
+ /** Data source name */
2344
+ source: string;
2345
+ /** URL to the source data */
2346
+ source_url: string;
2347
+ }
2348
+ /**
2349
+ * List of states with SMA endpoint implementation status.
2350
+ */
2351
+ interface SmaStatesListResponse {
2352
+ /** Array of state summaries */
2353
+ states: SmaStateSummary[];
2354
+ /** Total number of states returned */
2355
+ total: number;
2356
+ /** Response metadata */
2357
+ meta: SmaMetaResponse;
2358
+ }
2359
+ /**
2360
+ * Full detail for a single state's SMA endpoint implementation.
2361
+ */
2362
+ interface SmaStateDetailResponse {
2363
+ /** State identifier (e.g., "california") */
2364
+ id: string;
2365
+ /** State display name */
2366
+ state: string;
2367
+ /** Two-letter abbreviation or null */
2368
+ abbreviation: string | null;
2369
+ /** API vendor or null */
2370
+ api_vendor: string | null;
2371
+ /** Date of most recent survey or null */
2372
+ survey_date: string | null;
2373
+ /** Whether FHIR endpoints are implemented */
2374
+ is_implemented: boolean;
2375
+ /** Patient access API details */
2376
+ patient_access: {
2377
+ status: string | null;
2378
+ implementation_date: string | null;
2379
+ fhir_version: string | null;
2380
+ auth_protocol: string | null;
2381
+ refresh_frequency: string | null;
2382
+ endpoints: {
2383
+ claims: string[];
2384
+ pdex: string[];
2385
+ formulary: string[];
2386
+ chip: string[];
2387
+ capability_statement: string[];
2388
+ sandbox: string[];
2389
+ };
2390
+ };
2391
+ /** Provider directory API details */
2392
+ provider_directory: {
2393
+ status: string | null;
2394
+ implementation_date: string | null;
2395
+ fhir_version: string | null;
2396
+ is_public: boolean | null;
2397
+ refresh_frequency: string | null;
2398
+ endpoints: {
2399
+ production: string[];
2400
+ capability_statement: string[];
2401
+ sandbox: string[];
2402
+ };
2403
+ };
2404
+ /** Contact information */
2405
+ contacts: {
2406
+ member_phone: string | null;
2407
+ member_email: string | null;
2408
+ developer_contact: string | null;
2409
+ pd_developer_contact: string | null;
2410
+ registration_info: string | null;
2411
+ pd_registration_info: string | null;
2412
+ };
2413
+ /** All production endpoint URLs */
2414
+ all_production_urls: string[];
2415
+ /** Response metadata (includes ingested_at) */
2416
+ meta: SmaMetaResponse & {
2417
+ ingested_at: string;
2418
+ };
2419
+ }
2420
+ /**
2421
+ * Aggregate statistics across all SMA endpoint implementations.
2422
+ */
2423
+ interface SmaStatsResponse {
2424
+ /** Summary counts */
2425
+ summary: {
2426
+ total_states: number;
2427
+ implemented: number;
2428
+ not_implemented: number;
2429
+ total_production_urls: number;
2430
+ };
2431
+ /** Counts by API vendor */
2432
+ by_vendor: Record<string, number>;
2433
+ /** Counts by patient access status */
2434
+ by_patient_access_status: Record<string, number>;
2435
+ /** Counts by FHIR version */
2436
+ by_fhir_version: Record<string, number>;
2437
+ /** Counts by authentication protocol */
2438
+ by_auth_protocol: Record<string, number>;
2439
+ /** Provider directory statistics */
2440
+ provider_directory: {
2441
+ total_with_pd: number;
2442
+ by_status: Record<string, number>;
2443
+ };
2444
+ /** Response metadata */
2445
+ meta: SmaMetaResponse;
2446
+ }
2447
+
2448
+ /**
2449
+ * SMA (State Medicaid Agency) Endpoint Directory API endpoints.
2450
+ *
2451
+ * Provides access to CMS SMA Endpoint Directory data showing which state
2452
+ * Medicaid agencies have implemented FHIR-based patient access and provider
2453
+ * directory APIs.
2454
+ *
2455
+ * All SMA endpoints require the `connectivity.read` scope.
2456
+ *
2457
+ * @example
2458
+ * ```ts
2459
+ * // List all implemented states
2460
+ * const list = await client.sma.listStates({ implemented: true });
2461
+ * console.log(`${list.total} states have FHIR endpoints`);
2462
+ *
2463
+ * // Get details for California
2464
+ * const ca = await client.sma.getState("CA");
2465
+ * console.log(`Vendor: ${ca.api_vendor}`);
2466
+ * console.log(`Claims endpoints: ${ca.patient_access.endpoints.claims.length}`);
2467
+ *
2468
+ * // Get aggregate statistics
2469
+ * const stats = await client.sma.stats();
2470
+ * console.log(`${stats.summary.implemented} of ${stats.summary.total_states} implemented`);
2471
+ * ```
2472
+ */
2473
+ declare class SmaEndpoint {
2474
+ private readonly http;
2475
+ constructor(http: HttpClient);
2476
+ /**
2477
+ * List all states with SMA endpoint implementation status.
2478
+ *
2479
+ * @param options - Optional filters (implemented, vendor, status, fhir_version)
2480
+ * @returns List of state summaries with implementation status
2481
+ *
2482
+ * @example
2483
+ * ```ts
2484
+ * // All states
2485
+ * const all = await client.sma.listStates();
2486
+ *
2487
+ * // Only Epic-based implementations
2488
+ * const epic = await client.sma.listStates({ vendor: "Epic" });
2489
+ *
2490
+ * // Only implemented states
2491
+ * const live = await client.sma.listStates({ implemented: true });
2492
+ * ```
2493
+ */
2494
+ listStates(options?: SmaListOptions): Promise<SmaStatesListResponse>;
2495
+ /**
2496
+ * Get full SMA details for a specific state.
2497
+ *
2498
+ * Accepts state abbreviation (CA), underscore ID (california), or
2499
+ * display name (California).
2500
+ *
2501
+ * @param state - State identifier (abbreviation, ID, or display name)
2502
+ * @returns Full state detail with endpoints, contacts, and metadata
2503
+ *
2504
+ * @example
2505
+ * ```ts
2506
+ * const ca = await client.sma.getState("CA");
2507
+ * console.log(`${ca.state}: ${ca.is_implemented ? "Implemented" : "Not implemented"}`);
2508
+ *
2509
+ * for (const url of ca.patient_access.endpoints.claims) {
2510
+ * console.log(`Claims endpoint: ${url}`);
2511
+ * }
2512
+ * ```
2513
+ */
2514
+ getState(state: string): Promise<SmaStateDetailResponse>;
2515
+ /**
2516
+ * Get aggregate SMA statistics.
2517
+ *
2518
+ * Returns implementation counts, breakdowns by vendor/status/FHIR version,
2519
+ * and provider directory statistics.
2520
+ *
2521
+ * @returns Aggregate statistics across all states
2522
+ *
2523
+ * @example
2524
+ * ```ts
2525
+ * const stats = await client.sma.stats();
2526
+ * console.log(`${stats.summary.implemented} / ${stats.summary.total_states} states implemented`);
2527
+ * console.log(`Total production URLs: ${stats.summary.total_production_urls}`);
2528
+ * ```
2529
+ */
2530
+ stats(): Promise<SmaStatsResponse>;
2531
+ }
2532
+
2295
2533
  /**
2296
2534
  * Base configuration options shared by all auth modes.
2297
2535
  */
@@ -2434,6 +2672,11 @@ declare class Fhirfly {
2434
2672
  * NCCI PTP validation, MUE limits, PFS/RVU fee schedule, LCD/NCD coverage.
2435
2673
  */
2436
2674
  readonly claims: ClaimsEndpoint;
2675
+ /**
2676
+ * SMA (State Medicaid Agency) Endpoint Directory (requires `connectivity.read` scope).
2677
+ * State FHIR endpoint implementation status, patient access, and provider directories.
2678
+ */
2679
+ readonly sma: SmaEndpoint;
2437
2680
  /**
2438
2681
  * Create a new FHIRfly client.
2439
2682
  *
@@ -2519,4 +2762,4 @@ declare class TimeoutError extends FhirflyError {
2519
2762
  constructor(timeoutMs: number);
2520
2763
  }
2521
2764
 
2522
- export { type ActiveIngredient, ApiError, type ApiResponse, AuthenticationError, type AuthorizedOfficial, type BatchLookupOptions, type BatchResponse, type BatchResultItem, type ClaimsLegalInfo, type ClaimsMeta, type ConnectivityEndpointData, type ConnectivityMeta, type ConnectivityTargetData, type CoverageCheckData, type CoverageCheckItem, type CoverageCheckResponse, type CoveragePolicyType, 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 MueBatchResponse, type MueBatchResultItem, type MueLimitItem, type MueLookupData, type MueLookupResponse, type MueServiceType, type MvxCompact, type MvxData, type MvxFhirCoding, type MvxFull, type MvxIngest, type MvxSearchParams, type MvxStandard, type NcciClaimType, type NcciEditItem, type NcciValidateData, type NcciValidateResponse, 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 PfsBatchResponse, type PfsBatchResultItem, type PfsIndicators, type PfsLookupData, type PfsLookupResponse, type PfsPayment, type PfsRvu, 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 };
2765
+ export { type ActiveIngredient, ApiError, type ApiResponse, AuthenticationError, type AuthorizedOfficial, type BatchLookupOptions, type BatchResponse, type BatchResultItem, type ClaimsLegalInfo, type ClaimsMeta, type ConnectivityEndpointData, type ConnectivityMeta, type ConnectivityTargetData, type CoverageCheckData, type CoverageCheckItem, type CoverageCheckResponse, type CoveragePolicyType, 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 MueBatchResponse, type MueBatchResultItem, type MueLimitItem, type MueLookupData, type MueLookupResponse, type MueServiceType, type MvxCompact, type MvxData, type MvxFhirCoding, type MvxFull, type MvxIngest, type MvxSearchParams, type MvxStandard, type NcciClaimType, type NcciEditItem, type NcciValidateData, type NcciValidateResponse, 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 PfsBatchResponse, type PfsBatchResultItem, type PfsIndicators, type PfsLookupData, type PfsLookupResponse, type PfsPayment, type PfsRvu, 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 SmaListOptions, type SmaMetaResponse, type SmaStateDetailResponse, type SmaStateSummary, type SmaStatesListResponse, type SmaStatsResponse, 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 };
package/dist/index.d.ts CHANGED
@@ -2292,6 +2292,244 @@ declare class ClaimsEndpoint {
2292
2292
  checkCoverage(hcpcs: string, options?: CoverageCheckOptions): Promise<CoverageCheckResponse>;
2293
2293
  }
2294
2294
 
2295
+ /**
2296
+ * SMA Endpoint Directory API types.
2297
+ *
2298
+ * Types for looking up state Medicaid agency FHIR endpoint implementation
2299
+ * status, including patient access and provider directory endpoints.
2300
+ */
2301
+ /**
2302
+ * Options for filtering the SMA states list.
2303
+ */
2304
+ interface SmaListOptions {
2305
+ /** Filter by implementation status */
2306
+ implemented?: boolean;
2307
+ /** Filter by API vendor (e.g., "Epic") */
2308
+ vendor?: string;
2309
+ /** Filter by patient access status */
2310
+ status?: string;
2311
+ /** Filter by FHIR version (e.g., "4.0.1") */
2312
+ fhir_version?: string;
2313
+ }
2314
+ /**
2315
+ * Summary of a state's SMA endpoint implementation status.
2316
+ */
2317
+ interface SmaStateSummary {
2318
+ /** State identifier (e.g., "california") */
2319
+ id: string;
2320
+ /** State display name (e.g., "California") */
2321
+ state: string;
2322
+ /** Two-letter abbreviation (e.g., "CA") or null for territories */
2323
+ abbreviation: string | null;
2324
+ /** Whether the state has implemented FHIR endpoints */
2325
+ is_implemented: boolean;
2326
+ /** API vendor (e.g., "Epic") or null */
2327
+ api_vendor: string | null;
2328
+ /** Patient access API status */
2329
+ patient_access_status: string | null;
2330
+ /** Provider directory API status */
2331
+ provider_directory_status: string | null;
2332
+ /** Number of production endpoint URLs */
2333
+ production_url_count: number;
2334
+ /** FHIR version (e.g., "4.0.1") */
2335
+ fhir_version: string | null;
2336
+ }
2337
+ /**
2338
+ * Response metadata for SMA lookups.
2339
+ */
2340
+ interface SmaMetaResponse {
2341
+ /** Timestamp of when data was last updated */
2342
+ data_as_of: string;
2343
+ /** Data source name */
2344
+ source: string;
2345
+ /** URL to the source data */
2346
+ source_url: string;
2347
+ }
2348
+ /**
2349
+ * List of states with SMA endpoint implementation status.
2350
+ */
2351
+ interface SmaStatesListResponse {
2352
+ /** Array of state summaries */
2353
+ states: SmaStateSummary[];
2354
+ /** Total number of states returned */
2355
+ total: number;
2356
+ /** Response metadata */
2357
+ meta: SmaMetaResponse;
2358
+ }
2359
+ /**
2360
+ * Full detail for a single state's SMA endpoint implementation.
2361
+ */
2362
+ interface SmaStateDetailResponse {
2363
+ /** State identifier (e.g., "california") */
2364
+ id: string;
2365
+ /** State display name */
2366
+ state: string;
2367
+ /** Two-letter abbreviation or null */
2368
+ abbreviation: string | null;
2369
+ /** API vendor or null */
2370
+ api_vendor: string | null;
2371
+ /** Date of most recent survey or null */
2372
+ survey_date: string | null;
2373
+ /** Whether FHIR endpoints are implemented */
2374
+ is_implemented: boolean;
2375
+ /** Patient access API details */
2376
+ patient_access: {
2377
+ status: string | null;
2378
+ implementation_date: string | null;
2379
+ fhir_version: string | null;
2380
+ auth_protocol: string | null;
2381
+ refresh_frequency: string | null;
2382
+ endpoints: {
2383
+ claims: string[];
2384
+ pdex: string[];
2385
+ formulary: string[];
2386
+ chip: string[];
2387
+ capability_statement: string[];
2388
+ sandbox: string[];
2389
+ };
2390
+ };
2391
+ /** Provider directory API details */
2392
+ provider_directory: {
2393
+ status: string | null;
2394
+ implementation_date: string | null;
2395
+ fhir_version: string | null;
2396
+ is_public: boolean | null;
2397
+ refresh_frequency: string | null;
2398
+ endpoints: {
2399
+ production: string[];
2400
+ capability_statement: string[];
2401
+ sandbox: string[];
2402
+ };
2403
+ };
2404
+ /** Contact information */
2405
+ contacts: {
2406
+ member_phone: string | null;
2407
+ member_email: string | null;
2408
+ developer_contact: string | null;
2409
+ pd_developer_contact: string | null;
2410
+ registration_info: string | null;
2411
+ pd_registration_info: string | null;
2412
+ };
2413
+ /** All production endpoint URLs */
2414
+ all_production_urls: string[];
2415
+ /** Response metadata (includes ingested_at) */
2416
+ meta: SmaMetaResponse & {
2417
+ ingested_at: string;
2418
+ };
2419
+ }
2420
+ /**
2421
+ * Aggregate statistics across all SMA endpoint implementations.
2422
+ */
2423
+ interface SmaStatsResponse {
2424
+ /** Summary counts */
2425
+ summary: {
2426
+ total_states: number;
2427
+ implemented: number;
2428
+ not_implemented: number;
2429
+ total_production_urls: number;
2430
+ };
2431
+ /** Counts by API vendor */
2432
+ by_vendor: Record<string, number>;
2433
+ /** Counts by patient access status */
2434
+ by_patient_access_status: Record<string, number>;
2435
+ /** Counts by FHIR version */
2436
+ by_fhir_version: Record<string, number>;
2437
+ /** Counts by authentication protocol */
2438
+ by_auth_protocol: Record<string, number>;
2439
+ /** Provider directory statistics */
2440
+ provider_directory: {
2441
+ total_with_pd: number;
2442
+ by_status: Record<string, number>;
2443
+ };
2444
+ /** Response metadata */
2445
+ meta: SmaMetaResponse;
2446
+ }
2447
+
2448
+ /**
2449
+ * SMA (State Medicaid Agency) Endpoint Directory API endpoints.
2450
+ *
2451
+ * Provides access to CMS SMA Endpoint Directory data showing which state
2452
+ * Medicaid agencies have implemented FHIR-based patient access and provider
2453
+ * directory APIs.
2454
+ *
2455
+ * All SMA endpoints require the `connectivity.read` scope.
2456
+ *
2457
+ * @example
2458
+ * ```ts
2459
+ * // List all implemented states
2460
+ * const list = await client.sma.listStates({ implemented: true });
2461
+ * console.log(`${list.total} states have FHIR endpoints`);
2462
+ *
2463
+ * // Get details for California
2464
+ * const ca = await client.sma.getState("CA");
2465
+ * console.log(`Vendor: ${ca.api_vendor}`);
2466
+ * console.log(`Claims endpoints: ${ca.patient_access.endpoints.claims.length}`);
2467
+ *
2468
+ * // Get aggregate statistics
2469
+ * const stats = await client.sma.stats();
2470
+ * console.log(`${stats.summary.implemented} of ${stats.summary.total_states} implemented`);
2471
+ * ```
2472
+ */
2473
+ declare class SmaEndpoint {
2474
+ private readonly http;
2475
+ constructor(http: HttpClient);
2476
+ /**
2477
+ * List all states with SMA endpoint implementation status.
2478
+ *
2479
+ * @param options - Optional filters (implemented, vendor, status, fhir_version)
2480
+ * @returns List of state summaries with implementation status
2481
+ *
2482
+ * @example
2483
+ * ```ts
2484
+ * // All states
2485
+ * const all = await client.sma.listStates();
2486
+ *
2487
+ * // Only Epic-based implementations
2488
+ * const epic = await client.sma.listStates({ vendor: "Epic" });
2489
+ *
2490
+ * // Only implemented states
2491
+ * const live = await client.sma.listStates({ implemented: true });
2492
+ * ```
2493
+ */
2494
+ listStates(options?: SmaListOptions): Promise<SmaStatesListResponse>;
2495
+ /**
2496
+ * Get full SMA details for a specific state.
2497
+ *
2498
+ * Accepts state abbreviation (CA), underscore ID (california), or
2499
+ * display name (California).
2500
+ *
2501
+ * @param state - State identifier (abbreviation, ID, or display name)
2502
+ * @returns Full state detail with endpoints, contacts, and metadata
2503
+ *
2504
+ * @example
2505
+ * ```ts
2506
+ * const ca = await client.sma.getState("CA");
2507
+ * console.log(`${ca.state}: ${ca.is_implemented ? "Implemented" : "Not implemented"}`);
2508
+ *
2509
+ * for (const url of ca.patient_access.endpoints.claims) {
2510
+ * console.log(`Claims endpoint: ${url}`);
2511
+ * }
2512
+ * ```
2513
+ */
2514
+ getState(state: string): Promise<SmaStateDetailResponse>;
2515
+ /**
2516
+ * Get aggregate SMA statistics.
2517
+ *
2518
+ * Returns implementation counts, breakdowns by vendor/status/FHIR version,
2519
+ * and provider directory statistics.
2520
+ *
2521
+ * @returns Aggregate statistics across all states
2522
+ *
2523
+ * @example
2524
+ * ```ts
2525
+ * const stats = await client.sma.stats();
2526
+ * console.log(`${stats.summary.implemented} / ${stats.summary.total_states} states implemented`);
2527
+ * console.log(`Total production URLs: ${stats.summary.total_production_urls}`);
2528
+ * ```
2529
+ */
2530
+ stats(): Promise<SmaStatsResponse>;
2531
+ }
2532
+
2295
2533
  /**
2296
2534
  * Base configuration options shared by all auth modes.
2297
2535
  */
@@ -2434,6 +2672,11 @@ declare class Fhirfly {
2434
2672
  * NCCI PTP validation, MUE limits, PFS/RVU fee schedule, LCD/NCD coverage.
2435
2673
  */
2436
2674
  readonly claims: ClaimsEndpoint;
2675
+ /**
2676
+ * SMA (State Medicaid Agency) Endpoint Directory (requires `connectivity.read` scope).
2677
+ * State FHIR endpoint implementation status, patient access, and provider directories.
2678
+ */
2679
+ readonly sma: SmaEndpoint;
2437
2680
  /**
2438
2681
  * Create a new FHIRfly client.
2439
2682
  *
@@ -2519,4 +2762,4 @@ declare class TimeoutError extends FhirflyError {
2519
2762
  constructor(timeoutMs: number);
2520
2763
  }
2521
2764
 
2522
- export { type ActiveIngredient, ApiError, type ApiResponse, AuthenticationError, type AuthorizedOfficial, type BatchLookupOptions, type BatchResponse, type BatchResultItem, type ClaimsLegalInfo, type ClaimsMeta, type ConnectivityEndpointData, type ConnectivityMeta, type ConnectivityTargetData, type CoverageCheckData, type CoverageCheckItem, type CoverageCheckResponse, type CoveragePolicyType, 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 MueBatchResponse, type MueBatchResultItem, type MueLimitItem, type MueLookupData, type MueLookupResponse, type MueServiceType, type MvxCompact, type MvxData, type MvxFhirCoding, type MvxFull, type MvxIngest, type MvxSearchParams, type MvxStandard, type NcciClaimType, type NcciEditItem, type NcciValidateData, type NcciValidateResponse, 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 PfsBatchResponse, type PfsBatchResultItem, type PfsIndicators, type PfsLookupData, type PfsLookupResponse, type PfsPayment, type PfsRvu, 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 };
2765
+ export { type ActiveIngredient, ApiError, type ApiResponse, AuthenticationError, type AuthorizedOfficial, type BatchLookupOptions, type BatchResponse, type BatchResultItem, type ClaimsLegalInfo, type ClaimsMeta, type ConnectivityEndpointData, type ConnectivityMeta, type ConnectivityTargetData, type CoverageCheckData, type CoverageCheckItem, type CoverageCheckResponse, type CoveragePolicyType, 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 MueBatchResponse, type MueBatchResultItem, type MueLimitItem, type MueLookupData, type MueLookupResponse, type MueServiceType, type MvxCompact, type MvxData, type MvxFhirCoding, type MvxFull, type MvxIngest, type MvxSearchParams, type MvxStandard, type NcciClaimType, type NcciEditItem, type NcciValidateData, type NcciValidateResponse, 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 PfsBatchResponse, type PfsBatchResultItem, type PfsIndicators, type PfsLookupData, type PfsLookupResponse, type PfsPayment, type PfsRvu, 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 SmaListOptions, type SmaMetaResponse, type SmaStateDetailResponse, type SmaStateSummary, type SmaStatesListResponse, type SmaStatsResponse, 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 };
package/dist/index.js CHANGED
@@ -1278,6 +1278,90 @@ var ClaimsEndpoint = class {
1278
1278
  }
1279
1279
  };
1280
1280
 
1281
+ // src/endpoints/sma.ts
1282
+ var SmaEndpoint = class {
1283
+ constructor(http) {
1284
+ this.http = http;
1285
+ }
1286
+ /**
1287
+ * List all states with SMA endpoint implementation status.
1288
+ *
1289
+ * @param options - Optional filters (implemented, vendor, status, fhir_version)
1290
+ * @returns List of state summaries with implementation status
1291
+ *
1292
+ * @example
1293
+ * ```ts
1294
+ * // All states
1295
+ * const all = await client.sma.listStates();
1296
+ *
1297
+ * // Only Epic-based implementations
1298
+ * const epic = await client.sma.listStates({ vendor: "Epic" });
1299
+ *
1300
+ * // Only implemented states
1301
+ * const live = await client.sma.listStates({ implemented: true });
1302
+ * ```
1303
+ */
1304
+ async listStates(options) {
1305
+ const params = {};
1306
+ if (options?.implemented !== void 0) {
1307
+ params.implemented = options.implemented.toString();
1308
+ }
1309
+ if (options?.vendor) {
1310
+ params.vendor = options.vendor;
1311
+ }
1312
+ if (options?.status) {
1313
+ params.status = options.status;
1314
+ }
1315
+ if (options?.fhir_version) {
1316
+ params.fhir_version = options.fhir_version;
1317
+ }
1318
+ const queryString = this.http.buildSearchQueryString(params);
1319
+ return this.http.get(`/v1/sma/states${queryString}`);
1320
+ }
1321
+ /**
1322
+ * Get full SMA details for a specific state.
1323
+ *
1324
+ * Accepts state abbreviation (CA), underscore ID (california), or
1325
+ * display name (California).
1326
+ *
1327
+ * @param state - State identifier (abbreviation, ID, or display name)
1328
+ * @returns Full state detail with endpoints, contacts, and metadata
1329
+ *
1330
+ * @example
1331
+ * ```ts
1332
+ * const ca = await client.sma.getState("CA");
1333
+ * console.log(`${ca.state}: ${ca.is_implemented ? "Implemented" : "Not implemented"}`);
1334
+ *
1335
+ * for (const url of ca.patient_access.endpoints.claims) {
1336
+ * console.log(`Claims endpoint: ${url}`);
1337
+ * }
1338
+ * ```
1339
+ */
1340
+ async getState(state) {
1341
+ return this.http.get(
1342
+ `/v1/sma/states/${encodeURIComponent(state)}`
1343
+ );
1344
+ }
1345
+ /**
1346
+ * Get aggregate SMA statistics.
1347
+ *
1348
+ * Returns implementation counts, breakdowns by vendor/status/FHIR version,
1349
+ * and provider directory statistics.
1350
+ *
1351
+ * @returns Aggregate statistics across all states
1352
+ *
1353
+ * @example
1354
+ * ```ts
1355
+ * const stats = await client.sma.stats();
1356
+ * console.log(`${stats.summary.implemented} / ${stats.summary.total_states} states implemented`);
1357
+ * console.log(`Total production URLs: ${stats.summary.total_production_urls}`);
1358
+ * ```
1359
+ */
1360
+ async stats() {
1361
+ return this.http.get("/v1/sma/stats");
1362
+ }
1363
+ };
1364
+
1281
1365
  // src/client.ts
1282
1366
  var Fhirfly = class {
1283
1367
  http;
@@ -1328,6 +1412,11 @@ var Fhirfly = class {
1328
1412
  * NCCI PTP validation, MUE limits, PFS/RVU fee schedule, LCD/NCD coverage.
1329
1413
  */
1330
1414
  claims;
1415
+ /**
1416
+ * SMA (State Medicaid Agency) Endpoint Directory (requires `connectivity.read` scope).
1417
+ * State FHIR endpoint implementation status, patient access, and provider directories.
1418
+ */
1419
+ sma;
1331
1420
  /**
1332
1421
  * Create a new FHIRfly client.
1333
1422
  *
@@ -1376,6 +1465,7 @@ var Fhirfly = class {
1376
1465
  this.connectivity = new ConnectivityEndpoint(this.http);
1377
1466
  this.snomed = new SnomedEndpoint(this.http);
1378
1467
  this.claims = new ClaimsEndpoint(this.http);
1468
+ this.sma = new SmaEndpoint(this.http);
1379
1469
  }
1380
1470
  };
1381
1471