How can we anonymize patientName using Lua script to initialize each name with the two 1st letter

I would lıke to write a Lua script that allows anonymization of patient data on Orthanc.The script should modifies each patient name with the two first character of their name.

Hello,

You can find the list of DICOM Data Elements here:

http://dicom.nema.org/medical/dicom/current/output/html/part06.html

Use the element "Keyword" in your request to modify request to Orthanc
(i.e. "ReferringPhysicianName", "ReferringPhysicianAddress", ...).

See the previously linked Orthanc documentation for how to delete (i.e.
specify the tags in the "Remove" property array).

PS: I encourage you to keep the discussion on-list (this might be
helpful for others) unless you have a private request to Osimis or
myself.

Thank you for your help