@fhirfly-io/terminology 0.9.0 → 0.10.1
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 +90 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +268 -1
- package/dist/index.d.ts +268 -1
- package/dist/index.js +90 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -27,6 +27,28 @@ interface LegalInfo {
|
|
|
27
27
|
attribution?: string;
|
|
28
28
|
source_url?: string;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Provenance information included in full-shape responses.
|
|
32
|
+
* Describes the upstream data source, version, and when FHIRfly last ingested it.
|
|
33
|
+
*/
|
|
34
|
+
interface SourceInfo {
|
|
35
|
+
/** Name of the data source (e.g., "FDA NDC Directory", "CMS NPPES") */
|
|
36
|
+
name: string;
|
|
37
|
+
/** URL of the authoritative source */
|
|
38
|
+
url?: string;
|
|
39
|
+
/** Version or release identifier of the source data */
|
|
40
|
+
version?: string;
|
|
41
|
+
/** ISO 8601 timestamp of when FHIRfly last ingested this data */
|
|
42
|
+
fhirfly_updated_at?: string;
|
|
43
|
+
/** Version of the FHIRfly ETL pipeline that processed this data */
|
|
44
|
+
fhirfly_etl_version?: string;
|
|
45
|
+
/** Component data sources (used when a dataset combines multiple sources, e.g., NPI = NPPES + NUCC) */
|
|
46
|
+
components?: Array<{
|
|
47
|
+
name: string;
|
|
48
|
+
version: string;
|
|
49
|
+
url?: string;
|
|
50
|
+
}>;
|
|
51
|
+
}
|
|
30
52
|
/**
|
|
31
53
|
* Metadata included in all API responses.
|
|
32
54
|
*/
|
|
@@ -66,6 +88,8 @@ interface BatchResponse<T> {
|
|
|
66
88
|
/** Response metadata */
|
|
67
89
|
meta: {
|
|
68
90
|
legal: LegalInfo;
|
|
91
|
+
/** Provenance information. Included when shape=full. */
|
|
92
|
+
source?: SourceInfo;
|
|
69
93
|
};
|
|
70
94
|
}
|
|
71
95
|
/**
|
|
@@ -2292,6 +2316,244 @@ declare class ClaimsEndpoint {
|
|
|
2292
2316
|
checkCoverage(hcpcs: string, options?: CoverageCheckOptions): Promise<CoverageCheckResponse>;
|
|
2293
2317
|
}
|
|
2294
2318
|
|
|
2319
|
+
/**
|
|
2320
|
+
* SMA Endpoint Directory API types.
|
|
2321
|
+
*
|
|
2322
|
+
* Types for looking up state Medicaid agency FHIR endpoint implementation
|
|
2323
|
+
* status, including patient access and provider directory endpoints.
|
|
2324
|
+
*/
|
|
2325
|
+
/**
|
|
2326
|
+
* Options for filtering the SMA states list.
|
|
2327
|
+
*/
|
|
2328
|
+
interface SmaListOptions {
|
|
2329
|
+
/** Filter by implementation status */
|
|
2330
|
+
implemented?: boolean;
|
|
2331
|
+
/** Filter by API vendor (e.g., "Epic") */
|
|
2332
|
+
vendor?: string;
|
|
2333
|
+
/** Filter by patient access status */
|
|
2334
|
+
status?: string;
|
|
2335
|
+
/** Filter by FHIR version (e.g., "4.0.1") */
|
|
2336
|
+
fhir_version?: string;
|
|
2337
|
+
}
|
|
2338
|
+
/**
|
|
2339
|
+
* Summary of a state's SMA endpoint implementation status.
|
|
2340
|
+
*/
|
|
2341
|
+
interface SmaStateSummary {
|
|
2342
|
+
/** State identifier (e.g., "california") */
|
|
2343
|
+
id: string;
|
|
2344
|
+
/** State display name (e.g., "California") */
|
|
2345
|
+
state: string;
|
|
2346
|
+
/** Two-letter abbreviation (e.g., "CA") or null for territories */
|
|
2347
|
+
abbreviation: string | null;
|
|
2348
|
+
/** Whether the state has implemented FHIR endpoints */
|
|
2349
|
+
is_implemented: boolean;
|
|
2350
|
+
/** API vendor (e.g., "Epic") or null */
|
|
2351
|
+
api_vendor: string | null;
|
|
2352
|
+
/** Patient access API status */
|
|
2353
|
+
patient_access_status: string | null;
|
|
2354
|
+
/** Provider directory API status */
|
|
2355
|
+
provider_directory_status: string | null;
|
|
2356
|
+
/** Number of production endpoint URLs */
|
|
2357
|
+
production_url_count: number;
|
|
2358
|
+
/** FHIR version (e.g., "4.0.1") */
|
|
2359
|
+
fhir_version: string | null;
|
|
2360
|
+
}
|
|
2361
|
+
/**
|
|
2362
|
+
* Response metadata for SMA lookups.
|
|
2363
|
+
*/
|
|
2364
|
+
interface SmaMetaResponse {
|
|
2365
|
+
/** Timestamp of when data was last updated */
|
|
2366
|
+
data_as_of: string;
|
|
2367
|
+
/** Data source name */
|
|
2368
|
+
source: string;
|
|
2369
|
+
/** URL to the source data */
|
|
2370
|
+
source_url: string;
|
|
2371
|
+
}
|
|
2372
|
+
/**
|
|
2373
|
+
* List of states with SMA endpoint implementation status.
|
|
2374
|
+
*/
|
|
2375
|
+
interface SmaStatesListResponse {
|
|
2376
|
+
/** Array of state summaries */
|
|
2377
|
+
states: SmaStateSummary[];
|
|
2378
|
+
/** Total number of states returned */
|
|
2379
|
+
total: number;
|
|
2380
|
+
/** Response metadata */
|
|
2381
|
+
meta: SmaMetaResponse;
|
|
2382
|
+
}
|
|
2383
|
+
/**
|
|
2384
|
+
* Full detail for a single state's SMA endpoint implementation.
|
|
2385
|
+
*/
|
|
2386
|
+
interface SmaStateDetailResponse {
|
|
2387
|
+
/** State identifier (e.g., "california") */
|
|
2388
|
+
id: string;
|
|
2389
|
+
/** State display name */
|
|
2390
|
+
state: string;
|
|
2391
|
+
/** Two-letter abbreviation or null */
|
|
2392
|
+
abbreviation: string | null;
|
|
2393
|
+
/** API vendor or null */
|
|
2394
|
+
api_vendor: string | null;
|
|
2395
|
+
/** Date of most recent survey or null */
|
|
2396
|
+
survey_date: string | null;
|
|
2397
|
+
/** Whether FHIR endpoints are implemented */
|
|
2398
|
+
is_implemented: boolean;
|
|
2399
|
+
/** Patient access API details */
|
|
2400
|
+
patient_access: {
|
|
2401
|
+
status: string | null;
|
|
2402
|
+
implementation_date: string | null;
|
|
2403
|
+
fhir_version: string | null;
|
|
2404
|
+
auth_protocol: string | null;
|
|
2405
|
+
refresh_frequency: string | null;
|
|
2406
|
+
endpoints: {
|
|
2407
|
+
claims: string[];
|
|
2408
|
+
pdex: string[];
|
|
2409
|
+
formulary: string[];
|
|
2410
|
+
chip: string[];
|
|
2411
|
+
capability_statement: string[];
|
|
2412
|
+
sandbox: string[];
|
|
2413
|
+
};
|
|
2414
|
+
};
|
|
2415
|
+
/** Provider directory API details */
|
|
2416
|
+
provider_directory: {
|
|
2417
|
+
status: string | null;
|
|
2418
|
+
implementation_date: string | null;
|
|
2419
|
+
fhir_version: string | null;
|
|
2420
|
+
is_public: boolean | null;
|
|
2421
|
+
refresh_frequency: string | null;
|
|
2422
|
+
endpoints: {
|
|
2423
|
+
production: string[];
|
|
2424
|
+
capability_statement: string[];
|
|
2425
|
+
sandbox: string[];
|
|
2426
|
+
};
|
|
2427
|
+
};
|
|
2428
|
+
/** Contact information */
|
|
2429
|
+
contacts: {
|
|
2430
|
+
member_phone: string | null;
|
|
2431
|
+
member_email: string | null;
|
|
2432
|
+
developer_contact: string | null;
|
|
2433
|
+
pd_developer_contact: string | null;
|
|
2434
|
+
registration_info: string | null;
|
|
2435
|
+
pd_registration_info: string | null;
|
|
2436
|
+
};
|
|
2437
|
+
/** All production endpoint URLs */
|
|
2438
|
+
all_production_urls: string[];
|
|
2439
|
+
/** Response metadata (includes ingested_at) */
|
|
2440
|
+
meta: SmaMetaResponse & {
|
|
2441
|
+
ingested_at: string;
|
|
2442
|
+
};
|
|
2443
|
+
}
|
|
2444
|
+
/**
|
|
2445
|
+
* Aggregate statistics across all SMA endpoint implementations.
|
|
2446
|
+
*/
|
|
2447
|
+
interface SmaStatsResponse {
|
|
2448
|
+
/** Summary counts */
|
|
2449
|
+
summary: {
|
|
2450
|
+
total_states: number;
|
|
2451
|
+
implemented: number;
|
|
2452
|
+
not_implemented: number;
|
|
2453
|
+
total_production_urls: number;
|
|
2454
|
+
};
|
|
2455
|
+
/** Counts by API vendor */
|
|
2456
|
+
by_vendor: Record<string, number>;
|
|
2457
|
+
/** Counts by patient access status */
|
|
2458
|
+
by_patient_access_status: Record<string, number>;
|
|
2459
|
+
/** Counts by FHIR version */
|
|
2460
|
+
by_fhir_version: Record<string, number>;
|
|
2461
|
+
/** Counts by authentication protocol */
|
|
2462
|
+
by_auth_protocol: Record<string, number>;
|
|
2463
|
+
/** Provider directory statistics */
|
|
2464
|
+
provider_directory: {
|
|
2465
|
+
total_with_pd: number;
|
|
2466
|
+
by_status: Record<string, number>;
|
|
2467
|
+
};
|
|
2468
|
+
/** Response metadata */
|
|
2469
|
+
meta: SmaMetaResponse;
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
/**
|
|
2473
|
+
* SMA (State Medicaid Agency) Endpoint Directory API endpoints.
|
|
2474
|
+
*
|
|
2475
|
+
* Provides access to CMS SMA Endpoint Directory data showing which state
|
|
2476
|
+
* Medicaid agencies have implemented FHIR-based patient access and provider
|
|
2477
|
+
* directory APIs.
|
|
2478
|
+
*
|
|
2479
|
+
* All SMA endpoints require the `connectivity.read` scope.
|
|
2480
|
+
*
|
|
2481
|
+
* @example
|
|
2482
|
+
* ```ts
|
|
2483
|
+
* // List all implemented states
|
|
2484
|
+
* const list = await client.sma.listStates({ implemented: true });
|
|
2485
|
+
* console.log(`${list.total} states have FHIR endpoints`);
|
|
2486
|
+
*
|
|
2487
|
+
* // Get details for California
|
|
2488
|
+
* const ca = await client.sma.getState("CA");
|
|
2489
|
+
* console.log(`Vendor: ${ca.api_vendor}`);
|
|
2490
|
+
* console.log(`Claims endpoints: ${ca.patient_access.endpoints.claims.length}`);
|
|
2491
|
+
*
|
|
2492
|
+
* // Get aggregate statistics
|
|
2493
|
+
* const stats = await client.sma.stats();
|
|
2494
|
+
* console.log(`${stats.summary.implemented} of ${stats.summary.total_states} implemented`);
|
|
2495
|
+
* ```
|
|
2496
|
+
*/
|
|
2497
|
+
declare class SmaEndpoint {
|
|
2498
|
+
private readonly http;
|
|
2499
|
+
constructor(http: HttpClient);
|
|
2500
|
+
/**
|
|
2501
|
+
* List all states with SMA endpoint implementation status.
|
|
2502
|
+
*
|
|
2503
|
+
* @param options - Optional filters (implemented, vendor, status, fhir_version)
|
|
2504
|
+
* @returns List of state summaries with implementation status
|
|
2505
|
+
*
|
|
2506
|
+
* @example
|
|
2507
|
+
* ```ts
|
|
2508
|
+
* // All states
|
|
2509
|
+
* const all = await client.sma.listStates();
|
|
2510
|
+
*
|
|
2511
|
+
* // Only Epic-based implementations
|
|
2512
|
+
* const epic = await client.sma.listStates({ vendor: "Epic" });
|
|
2513
|
+
*
|
|
2514
|
+
* // Only implemented states
|
|
2515
|
+
* const live = await client.sma.listStates({ implemented: true });
|
|
2516
|
+
* ```
|
|
2517
|
+
*/
|
|
2518
|
+
listStates(options?: SmaListOptions): Promise<SmaStatesListResponse>;
|
|
2519
|
+
/**
|
|
2520
|
+
* Get full SMA details for a specific state.
|
|
2521
|
+
*
|
|
2522
|
+
* Accepts state abbreviation (CA), underscore ID (california), or
|
|
2523
|
+
* display name (California).
|
|
2524
|
+
*
|
|
2525
|
+
* @param state - State identifier (abbreviation, ID, or display name)
|
|
2526
|
+
* @returns Full state detail with endpoints, contacts, and metadata
|
|
2527
|
+
*
|
|
2528
|
+
* @example
|
|
2529
|
+
* ```ts
|
|
2530
|
+
* const ca = await client.sma.getState("CA");
|
|
2531
|
+
* console.log(`${ca.state}: ${ca.is_implemented ? "Implemented" : "Not implemented"}`);
|
|
2532
|
+
*
|
|
2533
|
+
* for (const url of ca.patient_access.endpoints.claims) {
|
|
2534
|
+
* console.log(`Claims endpoint: ${url}`);
|
|
2535
|
+
* }
|
|
2536
|
+
* ```
|
|
2537
|
+
*/
|
|
2538
|
+
getState(state: string): Promise<SmaStateDetailResponse>;
|
|
2539
|
+
/**
|
|
2540
|
+
* Get aggregate SMA statistics.
|
|
2541
|
+
*
|
|
2542
|
+
* Returns implementation counts, breakdowns by vendor/status/FHIR version,
|
|
2543
|
+
* and provider directory statistics.
|
|
2544
|
+
*
|
|
2545
|
+
* @returns Aggregate statistics across all states
|
|
2546
|
+
*
|
|
2547
|
+
* @example
|
|
2548
|
+
* ```ts
|
|
2549
|
+
* const stats = await client.sma.stats();
|
|
2550
|
+
* console.log(`${stats.summary.implemented} / ${stats.summary.total_states} states implemented`);
|
|
2551
|
+
* console.log(`Total production URLs: ${stats.summary.total_production_urls}`);
|
|
2552
|
+
* ```
|
|
2553
|
+
*/
|
|
2554
|
+
stats(): Promise<SmaStatsResponse>;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2295
2557
|
/**
|
|
2296
2558
|
* Base configuration options shared by all auth modes.
|
|
2297
2559
|
*/
|
|
@@ -2434,6 +2696,11 @@ declare class Fhirfly {
|
|
|
2434
2696
|
* NCCI PTP validation, MUE limits, PFS/RVU fee schedule, LCD/NCD coverage.
|
|
2435
2697
|
*/
|
|
2436
2698
|
readonly claims: ClaimsEndpoint;
|
|
2699
|
+
/**
|
|
2700
|
+
* SMA (State Medicaid Agency) Endpoint Directory (requires `connectivity.read` scope).
|
|
2701
|
+
* State FHIR endpoint implementation status, patient access, and provider directories.
|
|
2702
|
+
*/
|
|
2703
|
+
readonly sma: SmaEndpoint;
|
|
2437
2704
|
/**
|
|
2438
2705
|
* Create a new FHIRfly client.
|
|
2439
2706
|
*
|
|
@@ -2519,4 +2786,4 @@ declare class TimeoutError extends FhirflyError {
|
|
|
2519
2786
|
constructor(timeoutMs: number);
|
|
2520
2787
|
}
|
|
2521
2788
|
|
|
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 };
|
|
2789
|
+
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
|
@@ -27,6 +27,28 @@ interface LegalInfo {
|
|
|
27
27
|
attribution?: string;
|
|
28
28
|
source_url?: string;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Provenance information included in full-shape responses.
|
|
32
|
+
* Describes the upstream data source, version, and when FHIRfly last ingested it.
|
|
33
|
+
*/
|
|
34
|
+
interface SourceInfo {
|
|
35
|
+
/** Name of the data source (e.g., "FDA NDC Directory", "CMS NPPES") */
|
|
36
|
+
name: string;
|
|
37
|
+
/** URL of the authoritative source */
|
|
38
|
+
url?: string;
|
|
39
|
+
/** Version or release identifier of the source data */
|
|
40
|
+
version?: string;
|
|
41
|
+
/** ISO 8601 timestamp of when FHIRfly last ingested this data */
|
|
42
|
+
fhirfly_updated_at?: string;
|
|
43
|
+
/** Version of the FHIRfly ETL pipeline that processed this data */
|
|
44
|
+
fhirfly_etl_version?: string;
|
|
45
|
+
/** Component data sources (used when a dataset combines multiple sources, e.g., NPI = NPPES + NUCC) */
|
|
46
|
+
components?: Array<{
|
|
47
|
+
name: string;
|
|
48
|
+
version: string;
|
|
49
|
+
url?: string;
|
|
50
|
+
}>;
|
|
51
|
+
}
|
|
30
52
|
/**
|
|
31
53
|
* Metadata included in all API responses.
|
|
32
54
|
*/
|
|
@@ -66,6 +88,8 @@ interface BatchResponse<T> {
|
|
|
66
88
|
/** Response metadata */
|
|
67
89
|
meta: {
|
|
68
90
|
legal: LegalInfo;
|
|
91
|
+
/** Provenance information. Included when shape=full. */
|
|
92
|
+
source?: SourceInfo;
|
|
69
93
|
};
|
|
70
94
|
}
|
|
71
95
|
/**
|
|
@@ -2292,6 +2316,244 @@ declare class ClaimsEndpoint {
|
|
|
2292
2316
|
checkCoverage(hcpcs: string, options?: CoverageCheckOptions): Promise<CoverageCheckResponse>;
|
|
2293
2317
|
}
|
|
2294
2318
|
|
|
2319
|
+
/**
|
|
2320
|
+
* SMA Endpoint Directory API types.
|
|
2321
|
+
*
|
|
2322
|
+
* Types for looking up state Medicaid agency FHIR endpoint implementation
|
|
2323
|
+
* status, including patient access and provider directory endpoints.
|
|
2324
|
+
*/
|
|
2325
|
+
/**
|
|
2326
|
+
* Options for filtering the SMA states list.
|
|
2327
|
+
*/
|
|
2328
|
+
interface SmaListOptions {
|
|
2329
|
+
/** Filter by implementation status */
|
|
2330
|
+
implemented?: boolean;
|
|
2331
|
+
/** Filter by API vendor (e.g., "Epic") */
|
|
2332
|
+
vendor?: string;
|
|
2333
|
+
/** Filter by patient access status */
|
|
2334
|
+
status?: string;
|
|
2335
|
+
/** Filter by FHIR version (e.g., "4.0.1") */
|
|
2336
|
+
fhir_version?: string;
|
|
2337
|
+
}
|
|
2338
|
+
/**
|
|
2339
|
+
* Summary of a state's SMA endpoint implementation status.
|
|
2340
|
+
*/
|
|
2341
|
+
interface SmaStateSummary {
|
|
2342
|
+
/** State identifier (e.g., "california") */
|
|
2343
|
+
id: string;
|
|
2344
|
+
/** State display name (e.g., "California") */
|
|
2345
|
+
state: string;
|
|
2346
|
+
/** Two-letter abbreviation (e.g., "CA") or null for territories */
|
|
2347
|
+
abbreviation: string | null;
|
|
2348
|
+
/** Whether the state has implemented FHIR endpoints */
|
|
2349
|
+
is_implemented: boolean;
|
|
2350
|
+
/** API vendor (e.g., "Epic") or null */
|
|
2351
|
+
api_vendor: string | null;
|
|
2352
|
+
/** Patient access API status */
|
|
2353
|
+
patient_access_status: string | null;
|
|
2354
|
+
/** Provider directory API status */
|
|
2355
|
+
provider_directory_status: string | null;
|
|
2356
|
+
/** Number of production endpoint URLs */
|
|
2357
|
+
production_url_count: number;
|
|
2358
|
+
/** FHIR version (e.g., "4.0.1") */
|
|
2359
|
+
fhir_version: string | null;
|
|
2360
|
+
}
|
|
2361
|
+
/**
|
|
2362
|
+
* Response metadata for SMA lookups.
|
|
2363
|
+
*/
|
|
2364
|
+
interface SmaMetaResponse {
|
|
2365
|
+
/** Timestamp of when data was last updated */
|
|
2366
|
+
data_as_of: string;
|
|
2367
|
+
/** Data source name */
|
|
2368
|
+
source: string;
|
|
2369
|
+
/** URL to the source data */
|
|
2370
|
+
source_url: string;
|
|
2371
|
+
}
|
|
2372
|
+
/**
|
|
2373
|
+
* List of states with SMA endpoint implementation status.
|
|
2374
|
+
*/
|
|
2375
|
+
interface SmaStatesListResponse {
|
|
2376
|
+
/** Array of state summaries */
|
|
2377
|
+
states: SmaStateSummary[];
|
|
2378
|
+
/** Total number of states returned */
|
|
2379
|
+
total: number;
|
|
2380
|
+
/** Response metadata */
|
|
2381
|
+
meta: SmaMetaResponse;
|
|
2382
|
+
}
|
|
2383
|
+
/**
|
|
2384
|
+
* Full detail for a single state's SMA endpoint implementation.
|
|
2385
|
+
*/
|
|
2386
|
+
interface SmaStateDetailResponse {
|
|
2387
|
+
/** State identifier (e.g., "california") */
|
|
2388
|
+
id: string;
|
|
2389
|
+
/** State display name */
|
|
2390
|
+
state: string;
|
|
2391
|
+
/** Two-letter abbreviation or null */
|
|
2392
|
+
abbreviation: string | null;
|
|
2393
|
+
/** API vendor or null */
|
|
2394
|
+
api_vendor: string | null;
|
|
2395
|
+
/** Date of most recent survey or null */
|
|
2396
|
+
survey_date: string | null;
|
|
2397
|
+
/** Whether FHIR endpoints are implemented */
|
|
2398
|
+
is_implemented: boolean;
|
|
2399
|
+
/** Patient access API details */
|
|
2400
|
+
patient_access: {
|
|
2401
|
+
status: string | null;
|
|
2402
|
+
implementation_date: string | null;
|
|
2403
|
+
fhir_version: string | null;
|
|
2404
|
+
auth_protocol: string | null;
|
|
2405
|
+
refresh_frequency: string | null;
|
|
2406
|
+
endpoints: {
|
|
2407
|
+
claims: string[];
|
|
2408
|
+
pdex: string[];
|
|
2409
|
+
formulary: string[];
|
|
2410
|
+
chip: string[];
|
|
2411
|
+
capability_statement: string[];
|
|
2412
|
+
sandbox: string[];
|
|
2413
|
+
};
|
|
2414
|
+
};
|
|
2415
|
+
/** Provider directory API details */
|
|
2416
|
+
provider_directory: {
|
|
2417
|
+
status: string | null;
|
|
2418
|
+
implementation_date: string | null;
|
|
2419
|
+
fhir_version: string | null;
|
|
2420
|
+
is_public: boolean | null;
|
|
2421
|
+
refresh_frequency: string | null;
|
|
2422
|
+
endpoints: {
|
|
2423
|
+
production: string[];
|
|
2424
|
+
capability_statement: string[];
|
|
2425
|
+
sandbox: string[];
|
|
2426
|
+
};
|
|
2427
|
+
};
|
|
2428
|
+
/** Contact information */
|
|
2429
|
+
contacts: {
|
|
2430
|
+
member_phone: string | null;
|
|
2431
|
+
member_email: string | null;
|
|
2432
|
+
developer_contact: string | null;
|
|
2433
|
+
pd_developer_contact: string | null;
|
|
2434
|
+
registration_info: string | null;
|
|
2435
|
+
pd_registration_info: string | null;
|
|
2436
|
+
};
|
|
2437
|
+
/** All production endpoint URLs */
|
|
2438
|
+
all_production_urls: string[];
|
|
2439
|
+
/** Response metadata (includes ingested_at) */
|
|
2440
|
+
meta: SmaMetaResponse & {
|
|
2441
|
+
ingested_at: string;
|
|
2442
|
+
};
|
|
2443
|
+
}
|
|
2444
|
+
/**
|
|
2445
|
+
* Aggregate statistics across all SMA endpoint implementations.
|
|
2446
|
+
*/
|
|
2447
|
+
interface SmaStatsResponse {
|
|
2448
|
+
/** Summary counts */
|
|
2449
|
+
summary: {
|
|
2450
|
+
total_states: number;
|
|
2451
|
+
implemented: number;
|
|
2452
|
+
not_implemented: number;
|
|
2453
|
+
total_production_urls: number;
|
|
2454
|
+
};
|
|
2455
|
+
/** Counts by API vendor */
|
|
2456
|
+
by_vendor: Record<string, number>;
|
|
2457
|
+
/** Counts by patient access status */
|
|
2458
|
+
by_patient_access_status: Record<string, number>;
|
|
2459
|
+
/** Counts by FHIR version */
|
|
2460
|
+
by_fhir_version: Record<string, number>;
|
|
2461
|
+
/** Counts by authentication protocol */
|
|
2462
|
+
by_auth_protocol: Record<string, number>;
|
|
2463
|
+
/** Provider directory statistics */
|
|
2464
|
+
provider_directory: {
|
|
2465
|
+
total_with_pd: number;
|
|
2466
|
+
by_status: Record<string, number>;
|
|
2467
|
+
};
|
|
2468
|
+
/** Response metadata */
|
|
2469
|
+
meta: SmaMetaResponse;
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
/**
|
|
2473
|
+
* SMA (State Medicaid Agency) Endpoint Directory API endpoints.
|
|
2474
|
+
*
|
|
2475
|
+
* Provides access to CMS SMA Endpoint Directory data showing which state
|
|
2476
|
+
* Medicaid agencies have implemented FHIR-based patient access and provider
|
|
2477
|
+
* directory APIs.
|
|
2478
|
+
*
|
|
2479
|
+
* All SMA endpoints require the `connectivity.read` scope.
|
|
2480
|
+
*
|
|
2481
|
+
* @example
|
|
2482
|
+
* ```ts
|
|
2483
|
+
* // List all implemented states
|
|
2484
|
+
* const list = await client.sma.listStates({ implemented: true });
|
|
2485
|
+
* console.log(`${list.total} states have FHIR endpoints`);
|
|
2486
|
+
*
|
|
2487
|
+
* // Get details for California
|
|
2488
|
+
* const ca = await client.sma.getState("CA");
|
|
2489
|
+
* console.log(`Vendor: ${ca.api_vendor}`);
|
|
2490
|
+
* console.log(`Claims endpoints: ${ca.patient_access.endpoints.claims.length}`);
|
|
2491
|
+
*
|
|
2492
|
+
* // Get aggregate statistics
|
|
2493
|
+
* const stats = await client.sma.stats();
|
|
2494
|
+
* console.log(`${stats.summary.implemented} of ${stats.summary.total_states} implemented`);
|
|
2495
|
+
* ```
|
|
2496
|
+
*/
|
|
2497
|
+
declare class SmaEndpoint {
|
|
2498
|
+
private readonly http;
|
|
2499
|
+
constructor(http: HttpClient);
|
|
2500
|
+
/**
|
|
2501
|
+
* List all states with SMA endpoint implementation status.
|
|
2502
|
+
*
|
|
2503
|
+
* @param options - Optional filters (implemented, vendor, status, fhir_version)
|
|
2504
|
+
* @returns List of state summaries with implementation status
|
|
2505
|
+
*
|
|
2506
|
+
* @example
|
|
2507
|
+
* ```ts
|
|
2508
|
+
* // All states
|
|
2509
|
+
* const all = await client.sma.listStates();
|
|
2510
|
+
*
|
|
2511
|
+
* // Only Epic-based implementations
|
|
2512
|
+
* const epic = await client.sma.listStates({ vendor: "Epic" });
|
|
2513
|
+
*
|
|
2514
|
+
* // Only implemented states
|
|
2515
|
+
* const live = await client.sma.listStates({ implemented: true });
|
|
2516
|
+
* ```
|
|
2517
|
+
*/
|
|
2518
|
+
listStates(options?: SmaListOptions): Promise<SmaStatesListResponse>;
|
|
2519
|
+
/**
|
|
2520
|
+
* Get full SMA details for a specific state.
|
|
2521
|
+
*
|
|
2522
|
+
* Accepts state abbreviation (CA), underscore ID (california), or
|
|
2523
|
+
* display name (California).
|
|
2524
|
+
*
|
|
2525
|
+
* @param state - State identifier (abbreviation, ID, or display name)
|
|
2526
|
+
* @returns Full state detail with endpoints, contacts, and metadata
|
|
2527
|
+
*
|
|
2528
|
+
* @example
|
|
2529
|
+
* ```ts
|
|
2530
|
+
* const ca = await client.sma.getState("CA");
|
|
2531
|
+
* console.log(`${ca.state}: ${ca.is_implemented ? "Implemented" : "Not implemented"}`);
|
|
2532
|
+
*
|
|
2533
|
+
* for (const url of ca.patient_access.endpoints.claims) {
|
|
2534
|
+
* console.log(`Claims endpoint: ${url}`);
|
|
2535
|
+
* }
|
|
2536
|
+
* ```
|
|
2537
|
+
*/
|
|
2538
|
+
getState(state: string): Promise<SmaStateDetailResponse>;
|
|
2539
|
+
/**
|
|
2540
|
+
* Get aggregate SMA statistics.
|
|
2541
|
+
*
|
|
2542
|
+
* Returns implementation counts, breakdowns by vendor/status/FHIR version,
|
|
2543
|
+
* and provider directory statistics.
|
|
2544
|
+
*
|
|
2545
|
+
* @returns Aggregate statistics across all states
|
|
2546
|
+
*
|
|
2547
|
+
* @example
|
|
2548
|
+
* ```ts
|
|
2549
|
+
* const stats = await client.sma.stats();
|
|
2550
|
+
* console.log(`${stats.summary.implemented} / ${stats.summary.total_states} states implemented`);
|
|
2551
|
+
* console.log(`Total production URLs: ${stats.summary.total_production_urls}`);
|
|
2552
|
+
* ```
|
|
2553
|
+
*/
|
|
2554
|
+
stats(): Promise<SmaStatsResponse>;
|
|
2555
|
+
}
|
|
2556
|
+
|
|
2295
2557
|
/**
|
|
2296
2558
|
* Base configuration options shared by all auth modes.
|
|
2297
2559
|
*/
|
|
@@ -2434,6 +2696,11 @@ declare class Fhirfly {
|
|
|
2434
2696
|
* NCCI PTP validation, MUE limits, PFS/RVU fee schedule, LCD/NCD coverage.
|
|
2435
2697
|
*/
|
|
2436
2698
|
readonly claims: ClaimsEndpoint;
|
|
2699
|
+
/**
|
|
2700
|
+
* SMA (State Medicaid Agency) Endpoint Directory (requires `connectivity.read` scope).
|
|
2701
|
+
* State FHIR endpoint implementation status, patient access, and provider directories.
|
|
2702
|
+
*/
|
|
2703
|
+
readonly sma: SmaEndpoint;
|
|
2437
2704
|
/**
|
|
2438
2705
|
* Create a new FHIRfly client.
|
|
2439
2706
|
*
|
|
@@ -2519,4 +2786,4 @@ declare class TimeoutError extends FhirflyError {
|
|
|
2519
2786
|
constructor(timeoutMs: number);
|
|
2520
2787
|
}
|
|
2521
2788
|
|
|
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 };
|
|
2789
|
+
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 };
|