Recent versions of OsiriX allow one to import an Anonymization Template. If you want one for a Teaching File, download mine here and import it as follows:
Open the Anonymization window in OsiriX and click on the Template item to reveal the Import function:
Navigate to the downloaded template and select it.
This Template should remove most personal information, most of the time, but no template is perfect (particularly with respect to Private dicom tags).
You should still check the metadata of the case and manually remove any personal identifiers still there.