Hello @Gassim ,
Just for context. There are applications in production right now that generate the UID in the client side and when saved the System does not generate the UID but instead uses the client generated UID.
To the question of my algorithm:
I am trying to create TEI offline and save them on a database(Offline). The TEI that is offline also has enrollments and events associated with it. With this in mind, I want to sync all of the data to the server, and given these associations, I have to create the UID at the client-side. So you see I have no other choice but to create the UID on the client-side.
Not to mention there are already implementations where this was working but to my surprise that does not seem to be the case now. Something tells me it is a bug but I need to be sure it is not an implementation change on the part of the DHIS2 Software itself.