How are doctors paid in hospitals (esp. if Medicare)?

Hi there, I am doing some research on health topics in the US and I am struggling to understand how hospital doctors are paid. It would be fantastic if somebody would take the time to help me a bit! So if a Medicare patient is treated as an inpatient in a hospital, I understand that the hospital bills Medicare for the appropriate DRG. Do I get it correctly that most doctors working in hospitals are not employees but they would separately bill Medicare for each service? And how would it... How are doctors paid in hospitals (esp. if Medicare)?
Source: Student Doctor Network - Category: Universities & Medical Training Authors: Source Type: forums