Welcome to Health Care Magic
The pain in the rib could be from injury
to the bone or nerve
(intercostal) at the time of surgery.
Reactive pleural / pericardial pain (Dressler's syndrome) should be considered.
Examination, followed if necessary by an EKG enzyme, ECHO and chest x-ray will clarify.
Wishing speedy recovery