Hospital security is lax in some areas. In one local hospital by us, we can walk about freely to almost any area without notice. This opens hospitals to some possible if not likely incidents in the future.
There are numerous ways to help protect a hospital or medical facility. Many incidents happen by people that are specifically out to do harm, although many of the staff and contractors have sworn to do no harm.
It is alleged that a man has been infecting patients with hepatitis C through contaminated syringes for years. In some of those years, it may have been hard for anyone to tell that he was out to do such harm. Some of the time he was an outside technician working through a staffing agency.
Hospitals can certainly find out and demand that hired staff is qualified and has had a background check with only certain levels of criminal activity allowed. Drug use, violence, and rape could be some of the items that are not permitted, but even then the hospital is depending on the staffing agency to follow through. One way to limit those types of individuals is to have an access control system that checks with a criminal database and the hospital can determine if they should be allowed to work there.