Additional TEXTPATTERN segments

Hi all,
Thank you for adding the TEXTPATTERN feature, where UIDs can be generated using a mix of plain text, the current date at the time of generation, an org unit code, and then random or sequential numbers. I understand that usually a UID should not include other personal information, but it would be helpful to have more segment options based on other attributes or data elements - such a code for the person enrolling (data clerk), a portion of the TEI’s last name, their sex or DOB, etc. More flexibility in configuring this feature to suit our needs would be helpful. Thoughts?
I should say I am basing this on 2.29 - perhaps I am missing something or more options are available in later versions.

Dear Natalie,

You can use ASSIGN to a given attribute or data element using the program rules, that way you can substring, or add an entire values form the different data elements and attributes.

See example below

d2:concatenate(V{orgunit_code}, ‘/’, A{InPatientNo}, ‘/’,d2:substring( V{enrollment_date}, 5, 7 ),‘/’, d2:left(V{enrollment_date}, 4))



Hi Prosper, thanks, that is a great idea!

1 Like