Here is the Medicare guidance on this from the Claims Processing Manual, Chapter 12:
If more than one evaluation and management (face-to-face) service is provided on the same day to the same patient by the same physician or more than one physician in the same specialty in the same group, only one evaluation and management service may be reported unless the evaluation and management services are for unrelated problems. Instead of billing separately, the physicians should select a level of service representative of the combined visits and submit the appropriate code for that level.
When an E/M service is a shared/split encounter between a physician and a non-physician practitioner (NP, PA, CNS or CNM), the service is considered to have been performed “incident to” if the requirements for “incident to” are met and the patient is an established patient. If “incident to” requirements are not met for the shared/split E/M service, the service must be billed under the NPP’s UPIN/PIN, and payment will be made at the appropriate physician fee schedule payment.
You may find different payers do this differently or have different guidelines, and some may or may not consider the NP to of the same specialty as the MD. You may also have to appeal denials with records to support two E&M services billed on the same day for different reasons if you decide to bill both.