Data privacy is safeguarded through regulations such as the Health Insurance Portability and Accountability Act (HIPAA) in the United States, and the General Data Protection Regulation (GDPR) in the European Union. These laws mandate stringent measures for the secure collection, storage, and sharing of personal health data to prevent unauthorized access and breaches.