Yes, this is possible with Text Pattern as mentioned previously.
One thing I would like to point out is that you create this all in the TE attribute. Therefore, create an attribute (e.g. Unique ID) and then select “Automatically generate”.
In the pattern, you can then enter the TextPattern that you require. Please note that to create a string, you separate with - and not with +. This is an example I created:
Thanks everyone for your response. I think the text pattern is option I prefer since it is quite clear and simple to configure. However I have this error when I want to register a new TE after adding a text pattern to the identifier attribute.
Error: Code is not implemented. I am using the version 2.27 is it due to that?
This may be due to the fact that you have not attributed a Code to the thing that the pattern refers. E.g. if you have included the name of an Org unit into the pattern (as I did in my example above), then the OU needs to have a code attributed to it and that code needs to match what you have described in the pattern. In my example again, I used: “ORG_UNIT_CODE(…)” - this means that the OU will need a 3 letter code to refer as I have used 3 periods to signify the code.
exactly this is what i want to have WBG-WAU-JTH-10001 Where WBG is the Abbreviation of the State and WAU for the County and JTH is for the facility and follow by the number which will increment it self automatic whenever there’s a new enrollment.
Secondly I will need to learn the skip logic in dhis2.
and if you have pdf tutorial or video share it with me, because the previous link that you have share it not that easy to understand.
Best Regards
Dear Terence, I hope your doing well,
If you have a video tutorial or pdf Tutorial please share it with us because i tried to implement what you have said and I couldn’t implemented well.
Best Regards
Old topic from 2018. If anything new comes up or if you have a question, please open a new topic. If you believe this topic should be reopened please DM moderators.