Who is a medical student?
An individual who is enrolled in an organized healthcare education or training program leading to a degree, certification, registration, and/or licensure to provide healthcare. They are sometimes also referred to as medical students, interns, residents etc.

If interns or trainees are permitted to prescribe medications for patients whose prescriptions are filled by pharmacies, refer patients to other health care providers, or order test for patients, those pharmacies and other health care providers will need to identify them as prescribers or as providers for patients in the claims transactions that they submit to health plans. Thus, students also require NPI number for identification purposes. They may change their taxonomy after completion of their education or after getting practice license from the state.

What is a NPI Number? : The National Provider Identifier (NPI) is a unique identification number for covered health care providers. The NPI is a 10-position, intelligence-free numeric identifier (10-digit number). This means that the numbers do not carry other information about healthcare providers, such as the state in which they live or their medical specialty.
The NPI must be used in lieu of legacy provider identifiers in the HIPAA standards transactions. Covered health care providers and all health plans and health care clearinghouses must use the NPIs in the administrative and financial transactions adopted under HIPAA (Health Insurance Portability and Accountability Act).

Where NPI should be used? : The NPI must be used in place of legacy provider identifiers, such as a Unique Provider Identification Number (UPIN), Online Survey Certification & Reporting (OSCAR) and National Supplier Clearinghouse (NSC) in HIPAA standard transactions. There are two categories of health care providers for NPI enumeration purposes. Entity Type 1 providers are individual providers who render health care (e.g., physicians, dentists, nurses).
Sole proprietors and sole proprietorships are Entity Type 1 (Individual) providers. Organization health care providers (e.g., hospitals, home health agencies, ambulance companies) are considered Entity Type 2 (Organization) providers.

Who must obtain NPI? : All health care providers who are HIPAA-covered entities, whether they are individuals (e.g., physicians, nurses, dentists, chiropractors, physical therapists, or pharmacists) or organizations (e.g., hospitals, home health agencies, clinics, nursing homes, residential treatment centers, laboratories, ambulance companies, group practices, Health Maintenance Organizations [HMOs], suppliers of durable medical equipment, pharmacies) must obtain an NPI.
The NPI will be used by HIPAA-covered entities (e.g., health plans, health care clearinghouses, and certain health care providers) to identify health care providers in HIPAA standard transactions. A covered health care provider, under HIPAA, is any health care provider who transmits health information in electronic form in connection with a transaction for which the Secretary of Health and Human Services has adopted a standard, even if the health care provider uses a business associate to do so.