The study of identifying, reporting, and preventing medical errors and adverse events in healthcare settings.