Medicare opt-out is specific to the provider NPI. If a provider opts-out, and then works part-time in a facility that bills non-emergency services, then that provider's services will be denied reimbursement. There is a very narrow exception for emergency services, but many employers are unwilling to underwrite the risk of non-reimbursement.
When considering opting-out of Medicare, we encourage a robust examination of the implications (both positive and negative) over time, as opting-out can mean the inability to secure a job for up to 2 years. For primary income earners, this is often reason enough to stay opted-in and simply not see Medicare patients in a DPC setting.
DPCs with a commitment to Medicare populations will often develop hybrids so they can continue to care for this group of patients while maintaining their DPC practice for non-Medicare patients. There is a similar model for Medicaid recipients, though the financial projections have to be carefully monitored for continued viability.
Hope this is helpful!