Question: How do I merge the 2009 Nationwide Inpatient Sample (NIS) with an external file from the Centers for Medicare and Medicaid Services (CMS) via the National Provider Identifier (NPI)?


While the Nationwide Inpatient Sample (NIS) does not include the National Provider Identifier (NPI) – a number assigned to uniquely identify institutional providers – there are steps a researcher can take to obtain a hospital’s NPI and merge the NIS with an external data file, such as Medicare Institutional Data.

Step 1: Obtain the 2009 version of the American Hospital Association (AHA) Survey Database, which includes the hospital NPI.

Step 2: Merge the NIS Core File with the NIS Hospital Weights File by the element HOSPID.

Step 3: Merge the newly merged database created in Step 2 with the AHA Annual Survey Database by the element American Hospital Association Hospital Identifier (AHAID). This merged NIS-AHA database should include both the hospitals in the NIS and the hospitals’ NPIs.

Please note that some states restrict the release of AHAID in the NIS. Thus, hospitals in these states will not be merged with the AHA data. Reference “Table 2: Data Elements in the NIS Hospital Weights Files,” in the Introduction to the HCUP Nationwide Inpatient Sample (NIS) for the states that restrict AHAID in the NIS.

Step 4: Merge the NIS-AHA database created in Step 3 with the Medicare Institutional Data by the institutional/hospital NPI.

For other HCUP questions, please contact HCUP User Support.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s