Skip to content

Validate NPI numbers for healthcare physicians or organizations

License

Notifications You must be signed in to change notification settings

coryasilva/npi-validator

Repository files navigation

npi-validator

Validation function for National Provider Identifier (NPI) numbers. Works for healthcare physicians and organizations in the United States or other countries that use the NPI standard.

This is an implementation of the Luhn formula (mod 10 double add double) check digit, see the CMS.gov specification for more information.

Install

npm install npi-validator

Usage

import npiValid from 'npi-validator';

const npi = 1234567893;
const valid = npiValid(npi);

console.log(valid);
//=> true

API

function npiValid(id: string | number, prefix?: string | number): boolean

import npiValid from 'npi-validator';

const npi = 1234567893;
const valid = npiValid(npi);

console.log(valid);
//=> true

About

Validate NPI numbers for healthcare physicians or organizations

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published