When you applied for your National Provider Identifier (NPI), you typed in addresses and phone numbers, then picked a taxonomy code, which says what kind of provider you are. CMS calls the NPI itself "intelligence-free": the 10 digits carry no information about you, such as the state you live in or your specialty. The record behind the number is a different story. Much of that record is public.
CMS posts the full NPI file every month as a free public download, and anyone can search the NPI Registry by name, also for free. The public fields include your name and credential, your mailing and practice addresses and phone numbers, your license number and state, and your taxonomy code. There's no opt-out.
Start with the addresses. If you applied in medical school and gave your apartment address, check whether it's still listed. CMS says providers "should not report their residential address unless it is their Business Mailing Address or Business Practice Location." That address can't be deleted, but it can be updated.
Then the taxonomy code. The student code, 390200000X, has an official definition that covers someone enrolled in a training program "leading to a degree, certification, registration, and/or licensure to provide health care." If you hold only a training license, it can be the right code. North Carolina Medicaid, for one, allows it only for residents and interns without a full medical license and denies the enrollment application if the applicant holds one.
So you don't switch codes when you become a resident. There's no resident code. The switch comes with a full license. CMS says that if you selected the student code and later became a fully licensed provider without updating it, your NPI information "is not updated and accurate as required by the NPI Final Rule." CMS also warns that an analysis of the data may still characterize you as a student and "lead to unnecessary inquiries about your credentials." And it says to check that your taxonomy "still correctly describes you as a health care provider."
Before you apply to moonlight, start a fellowship, or take your first job, do three things. First, search your name on the NPI Registry and read what a stranger sees. Second, if a home address appears, log in to NPPES, the CMS system behind the Registry, and replace it with the address where you work or get work mail. Third, once you hold a full license, replace the student code with your specialty's code as your primary taxonomy.
The number was built to say nothing about you. The record behind it says much of what you typed in.