The Detroit Medical Center (DMC) sold off its retail and outpatient pharmacy business to Walgreens, a unit of Walgreens Boots Alliance (NYSE: WBA), for an undisclosed amount, according to Crain’s Detroit Business. The deal includes seven specialty pharmacy sites and one mail-order service business.

The DMC made the move as part of a pharmacy reorganization, a process that has resulted in layoffs or reassignments of some two dozen employees. The hospital is part of Tenet Healthcare Corp. (NYSE: THC), which has been in the process of selling non-core hospitals and reorganizing to pare down debt.

Walgreens will operate branded specialty pharmacy outlets at some of DMC’s six hospitals. It will also coordinate with DMC’s discharge planners to have prescriptions filled by the new, in-house Walgreens outlets.

The retail giant operates approximately 300 community-based specialty pharmacy locations in the United States, two-thirds of which are located inside a hospital or medical office building.

The transaction is scheduled to close this summer.