The secretary shall have the power, and it shall be his or her duty, to install and maintain in the department a proper cost accounting system of accounts for each of the institutions under the control of the department, for the purpose of detecting and avoiding unprofitable expenditures and operations.