adesigns / nppes-api
PHP 库,用于与 NPPES NPI 注册 API 交互
v1.0.6
2023-02-23 03:41 UTC
Requires
- php: ^7.4|^8.0
- netresearch/jsonmapper: ^1.3|^2|^3|^4
- tcdent/php-restclient: ^0.1.7
Requires (Dev)
- phpunit/phpunit: ~4.8.36
This package is auto-updated.
Last update: 2024-09-23 07:22:49 UTC
README
此 API 允许您通过 NPI 注册 API (https://npiregistry.cms.hhs.gov/registry/help-api) 轻松查找提供者。
安装
通过 composer
composer require adesigns/nppes-api
基本用法
1. 通过任意数量的参数搜索提供者。将返回包含所有提供者的 ApiResponse 对象。
要按非唯一参数(例如号码)搜索注册,请向 search() 方法传递参数数组。可用参数可以在 NPPES 演示中查看 @ https://npiregistry.cms.hhs.gov/api/demo
$client = new NPPESApi(); $results = $client->search(array('last_name' => "Smith")); var_dump($results);
1. 通过 NPI 号码搜索单个提供者。将返回单个 Provider 对象。
$client = new NPPESApi(); /** @var Provider **/ $provider = $client->searchByNumber(1234567890); var_dump($provider);