CMS assigns each patient discharged from a hospital a diagnosis-related group based on age, sex, principal diagnosis, secondary diagnosis, procedure performed, and discharge status. Each DRG is assigned a federal reimbursement rate that is adjusted to take into account different wage levels of a geographic area (i.e. cities are paid more, rural is paid less).