HANOVER, N.H. — DESPITE the intensely personal moments that happen in hospitals, patient privacy can be elusive. Hospitals are multimillion-dollar corporations that look like shopping malls and function like factories. Doctors knock on exam room doors to signal they are about to enter — not to ask permission. The curtain that encircles the hospital bed always lets in a crack of light.

Yet we do expect some degree of privacy in hospitals. We trust doctors with our secrets in part because they take a 2,000-year-old Hippocratic oath to respect our privacy, an oath enforced by laws like the Health Insurance Portability and Accountability Act. But sometimes, doctors have to weigh patients’ privacy against their health and safety, and that’s when things get complicated.

The use of video monitoring — covert or disclosed, of patients or providers — has proliferated as high-quality, inexpensive technology has become increasingly accessible. The possibilities range from watching elderly patients at risk of falling in their rooms to recording doctors and nurses at sinks to make sure they’re washing their hands.

My hospital, where I am chairman of the bioethics committee, recently wrestled with the question of where patient and family privacy ends. Nurses in the neonatal intensive care unit (N.I.C.U.) worried that a premature infant, whom I’ll call Rickie to protect his identity, was being harmed by his parents.