Medical::NHSNumber - Check if an NHS number is valid
Version 0.04
Everyone registered with the NHS in England and Wales has their own unique NHS number. The NHS number enables health care professionals in the UK to obtain, link and index electronic health records for an individual across a multiple sources of clinical information.
Given a new-style NHS number, returns true if the number is valid and false if the number appears to be invalid.
use Medical::NHSNumber; my $nhs_no = '1234561234'; my $rv = Medical::NHSNumber::is_valid( $nhs_no );
The validation is performed using the Modulus 11 algorith. More details on the exact implementation followed can be found on the NHS Connecting for Health website at http://www.connectingforhealth.nhs.uk/industry/docs/pds/index.html?dat_nhs_no.htm
Additional information on Modulus 11 can also be found on this HP site http://docs.hp.com/en/32209-90024/apds02.html
Please note, this module will only check the validity of new style NHS numbers i.e. ten digit numbers. There are over 21 different formats for older styles of NHS numbers which currently, this module does not support. If you do happen to know the specifics for the older versions and would like to tell me, I would be more than happy to incorporate some logic for them.
my $rv = Medical::NHSNumber::is_valid( $nhs_no );
Dr Spiros Denaxas, <s.denaxas at gmail.com>
<s.denaxas at gmail.com>
Please report any bugs or feature requests to bug-medical-nhsnumber at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Medical-NHSNumber. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-medical-nhsnumber at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Medical::NHSNumber
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Medical-NHSNumber
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Medical-NHSNumber
CPAN Ratings
http://cpanratings.perl.org/d/Medical-NHSNumber
Search CPAN
http://search.cpan.org/dist/Medical-NHSNumber/
Source code
The source code can be found on github https://github.com/spiros/Medical-NHSNumber
Copyright 2009 Dr Spiros Denaxas.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install Medical::NHSNumber, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Medical::NHSNumber
CPAN shell
perl -MCPAN -e shell install Medical::NHSNumber
For more information on module installation, please visit the detailed CPAN module installation guide.