Described herein are various technologies pertaining to de-identifying patient data. A computing system removes protected health information and/or sensitive information from patient data by selectively replacing data in the patient data to retain the clinical relevance of the patient data after the patient data is de-identified, thereby retaining the utility of the de-identified patient data for tasks such as statistical analysis of patient data, testing of healthcare software functionality, and others.