adesigns / nppes-api
PHP Library to interact with the NPPES NPI Registry API
Installs: 4 431
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 5
Forks: 3
Open Issues: 2
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-11-23 07:46:48 UTC
README
This API allows you to easily look up providers using the NPI Registry API (https://npiregistry.cms.hhs.gov/registry/help-api).
Installation
via composer:
composer require adesigns/nppes-api
Basic Usage
1. Search for providers by any number of parameters. Will return an ApiResponse object with all providers.
To search the registry by a non-unique parameter (IE number), pass an array of parameters to the search() method. Available parameters can be seen in the NPPES Demo @ https://npiregistry.cms.hhs.gov/api/demo
$client = new NPPESApi(); $results = $client->search(array('last_name' => "Smith")); var_dump($results);
1. Search for a single provider by NPI Number. Will return a single Provider object.
$client = new NPPESApi(); /** @var Provider **/ $provider = $client->searchByNumber(1234567890); var_dump($provider);