Upon final hearing, judgment for the department shall include all sums expended during the pendency of the action. When the department of public welfare [health care authority department] recovers judgments under this act [27-2-30, 27-2-31 N.M. Stat. Ann.], it may enforce, compromise or settle the judgments in any way considered by the board of public welfare to be in the public interest. Any proceeds of judgments or settlements shall be retained by the department for its authorized activities and required reimbursements to the federal government.