Generating ID with OU hierarchy, program details, and date

Dear Gassim,

I want to know if it possible to generate ID in COVID Tracker with MAI-(contry code)-Region-Code, district code, name of structure- Year of vaccination-COVAC-patient number-Register Number?
If Yes can You show me how we can do that?

1 Like

not sure what’s meant by ‘name of structure’ but I think the closest would be
MAI-(OU-Code)-COVAC-SEQUENTIAL(###)-SEQUENTIAL(###)

For the Year of vaccination, you might run a program rule to concatenate the value to the ID.

For more explanation

Exemple country Mali = Mai; Region Koulikoro = Koul

MAI-KOU-ASACOLA-2022-COVAC-001-R1

1 Like

I find it easier if the autogenerated value will be
ORG_UNIT_CODE(…)-COVAC-001-R1
(Kou)-“COVAC”-SEQUENTIAL(###)-“R”-SEQUENTIAL(#)

And then create a program rule that adds to the autogenerated value the structure ‘ASACOLA’ and the ‘year of vaccination’ both of which I couldn’t find in the text pattern functions for autogenerated values but are found in the program rules.

As for the org_unit, it doesn’t seem possible to get the hierarchy. With a description of the use case and why this is important, you could create a feature request if you believe this will be helpful. :+1:

Thanks!