Dignity Health, a three-state hospital chain based in San Francisco, has agreed to pay the government $37 million to settle claims that it overbilled Medicare and a military health care program for years.

The Justice Department said Dignity, formerly known as Catholic Healthcare West, submitted bills for inpatient care at 13 of its 39 hospitals in California, Nevada and Arizona that should have been charged at less-expensive outpatient rates.