Dhis2.33 Data Element and TextPattern

Hello all,

Please how to create a Data Element (Tracker Domain Type ) based on TextPattern (Like Unique ID Patient in Event) ?

Regards

Hi @didate,

Have you read through the docs on TextPattern? https://docs.dhis2.org/2.34/en/user/html/dhis2_user_manual_en_full.html#working-with-textpattern

Also tagging @Stian here since he is the most familiar with TextPattern.

Best regards,
Karoline

Hello @Karoline thank you for your response.

I have already used TextPattern with Tracked Entity Attributte, But I haven’t seen how to use it with Data Element.

@Karoline and @Stian Very interested in this discussion as well! Now that my project is (very happily) using capture app for event program models, we’d love to be able to creating some unique number variables to assign to structures when going to the field. the textpattern of RANDOM(######) would work beautifully for us, if infact we could use a program rule within the event program to assign it to either a data element or program rule variable.

Outside of this, definitely curious if there is a workaround; doesn’t seem that V{event_date} or the such are going to have time associations that I know exist when an event is created; things like this could help us get to a “random” assortment of values, more than likely. Geometry inclusion into variables would be amazing for us on the Android side, as that might get us very far (or there completely) with the decimal values of longitude & lattitude.

Any ideas are definitely appreciated!