1.0.0 • Published 7 months ago

@evokegroup/nppes v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

@evokegroup/nppes

Library for querying the NPPES NPI Registry. See the NPPES API help page.

NppesClient

constructor()

ParameterTypeDefaultDescription
urlstringhttps://npiregistry.cms.hhs.gov/api/
versionstring2.1

Methods

search()

ParameterTypeDefaultDescription
paramsISearchParamsThe search parameters
optsISearchOpts{}Search options

returns Promise<ISearchResults>

Example

Get a result for a single NPI number.

import { NppesClient } from '@evokegroup/nppes';

const client = new NppesClient();
client.search({ number: '0123456789' })
  .then((searchResults) => {
    // do something
  })
  .catch((ex) => {
    // do something
  });

Example

Get all individuals in a given city/state with a given last name

import { NppesClient, EnumerationType } from '@evokegroup/nppes';

const client = new NppesClient();
client.search({
  enumeration_type: EnumerationType.Individual,
  last_name: 'Doe',
  city: 'Brooklyn',
  state: 'NY'
}, {
  retrieveAll: true
})
  .then((searchResults) => {
    // do something
  })
  .catch((ex) => {
    // do something
  });

Example

Get all individuals in a given postal code who have a given specialty

import { NppesClient, EnumerationType } from '@evokegroup/nppes';

const client = new NppesClient();
client.search({
  enumeration_type: EnumerationType.Individual,
  taxonomy_description: 'gastro*',
  postal_code: '12345'
}, {
  retrieveAll: true
})
  .then((searchResults) => {
    // do something
  })
  .catch((ex) => {
    // do something
  });

EnumerationType

NameValue
IndividualNPI-1
OrganizationNPI-2

NamePurpose

'AO' | 'Provider'

AddressPurpose

'LOCATION' | 'MAILING' | 'PRIMARY' | 'SECONDARY'

ISearchParams

NameTypeDefaultDescription
numberstringThe NPI number
enumeration_typeEnumerationTypeThe type of records to return
taxonomy_descriptionstring
name_purposeNamePurpose
first_namestring
use_first_name_aliasboolean
last_namestring
organization_namestring
address_purposeAddressPurpose
citystring
statestring
postal_codestring
country_codestring
limitnumber10
skipnumber

ISearchOpts

NameTypeDefaultDescription
retrieveAllbooleanRetreive all NPI records up to RESULT_MAX

ISearchResults

NameType
result_countnumber
resultsISearchResult[]

ISearchResult

NameType
created_epochnumber
enumeration_typeEnumerationType
last_updated_epochnumber
numberstring
addressesIResultAddress[]
practiceLocationsIResultAddress[]
basicIResultIndividualName ¦ IResultOrganizationName
taxonomiesIResultTaxonomy[]
identifiersIResultIdentifier[]
other_namesIResultIndividualOtherName[] ¦ IResultOrganizationOtherName[]
endpointsIResultEndpoint[]

IResultBasic

NameType
enumeration_datestring
last_updatedstring
statusstring
replacement_npistring
deactivation_reason_codestring
deactivation_datestring
reactivation_datestring
certification_datestring

IResultIndividualName

extends IResultBasic

NameType
first_namestring
last_namestring
middle_namestring
credentialstring
sole_proprietorstring
genderstring
name_prefixstring
name_suffixstring

IResultOrganizationName

extends IResultBasic

NameType
einstring
organization_namestring
organizational_subpartstring
authorized_official_first_namestring
authorized_official_last_namestring
authorized_official_middle_namestring
authorized_official_telephone_numberstring
authorized_official_title_or_positionstring
authorized_official_name_prefixstring
authorized_official_name_suffixstring
authorized_official_credentialstring
parent_organization_legal_business_namestring
parent_organization_einstring

IResultOtherName

NameType
typestring
codestring

IResultIndividualOtherName

extends IResultOtherName

NameType
first_namestring
last_namestring
middle_namestring
prefixstring
suffixstring

IResultOrganizationOtherName

extends IResultOtherName

NameType
organization_namestring

IResultAddress

NameType
country_codestring
country_namestring
address_purposestring
address_typestring
address_1string
address_2string
citystring
statestring
postal_codestring
telephone_numberstring
fax_numberstring

IResultTaxonomy

NameType
codestring
taxonomy_groupstring
descstring
statestring
licensestring
primaryboolean

IResultIdentifier

NameType
codestring
descstring
issuerstring
identifierstring
statestring

IResultEndpoint

NameType
endpointTypestring
endpointTypeDescriptionstring
endpointstring
endpointDescriptionstring
affiliationstring
affliationNamestring
usestring
useDescriptionstring
contentTypestring
contentTypeDescriptionstring
contentOtherDescriptionstring
address_typestring
address_1string
address_2string
citystring
statestring
postal_codestring
country_codestring
country_namestring
1.0.0

7 months ago