There are 3 different types of icons that can show up in departments. The exclamation mark with a staff icon appears when your department doesn’t work, because there isn’t any staff assigned to it, or all the staff assigned is out of stamina. Pressing this alert will open the management mode, where you can switch staff members.
The big red exclamation mark appears when the department can't work because it needs something to start or end the cycle. For example, the reception doesn't have space for more patients, or the operation room doesn't have patients to start the treatment, or beds for the treated patients to rest in. Pressing this alert shows more information about the issue.
The exclamation mark with a bed appears only in the ward. It shows that all the beds in the ward are used, resulting in patients not being able to be admitted to the wards. Pressing this alert shows information about the beds of the ward, from here you can also free up beds, which will cost you some golden hearts.