Posted on behalf of my co-worker, Wen Nutt. He manages our current monthly NPI updates.
Currently the Monthly Full
Update is named inconsistently from month to month, some months
are abbreviated (NPPES_Data_Dissemination_Apr_2014.zip) while others are
not(NPPES_Data_Dissemination_August_2014.zip). I would
like to suggest two possible solutions to make it easier to
pragmatically access the NPI data files.
A) Consistent Naming Convention
Name files by four digit Year and two digit numeric month(examples
below) would make predicting the download url far more consistent.
Monthly Full Replacement
NPPES_Monthly_2014_07.zip
NPPES_Monthly_2014_08.zip
Monthly Deactivation
NPPES_Monthly_Deactivated_2014_07.zip
NPPES_Monthly_Deactivated_2014_08.zip
Weekly Incremental
NPPES_Weekly_2014_08_04.zip
NPPES_Weekly_2014_08_11.zip
B) Permanent/Fixed URL
Since only the current files are available for download, a
permanent or fixed URL could be a simple solution as long as the last
modified time can be attained from a headers only request. Something
like the above file names without the trailing '_YYYY_MM(_DD)'.
Here is an example using curl to retrieve only the headers for the current Monthly Full Replacement file
$ curl -I http://nppes.viva-it.com/NPPES_Data_Dissemination_August_2014.zip
HTTP/1.1 200 OK
Server: Apache
Accept-Ranges: bytes
X-Permitted-Cross-Domain-Policies: all
Content-Type: application/zip
X-Pad: avoid browser bug
Age: 53716
Date: Mon, 18 Aug 2014 18:56:30 GMT
Last-Modified: Tue, 12 Aug 2014 20:25:17 GMT
Content-Length: 478098456
Connection: keep-alive
Here is an example of a file from CMS(CMS-2552-10 FY2014) where the
header does not contain a Last-Modified or similar attribute.