Drop-down list of countries

Hi, Community

In the " [Foreign-born]" field of the WHO TB Tracker package: How to put a drop-down list of countries in this field.

Thank you for your support.

3 Likes

The best way i think is to create option set where you will include all the countires as options, then use this option set in you Data element, it will give you the dropdown list of countires.

4 Likes

Hi @elmoujarrade,

Please go to the data element named Foreign-born, and edit it to check if it has an option set associated with the field or not. (similar to the snapshot below):

if the value is empty, you need to add an option set and if the option set for countries is not predefined you can import it from the WHO TB Tracker package.

You can refer to this link for more details on how to import metadata: Home - DHIS2 Documentation I hope this answers your question :grinning:

3 Likes

Just to follow up these useful comments:

“Foreign born” in TB CS package is a tracked entity attribute, with an option set for Yes/No/Unknown.

The Common Metadata Library package includes an option set of 249 countries with their ISO 3166-1 alpha-2 country codes.

View option set on demo instance here

You can download the package and read more docs here.

Importing the package into your instance will allow you to add the GEN - Countries option set to any data element, or in this case, your Tracked Entity Attribute for “Foreign-born”.

Note that if you already have a values for this Tracked Entity Attribute with the previous Yes/No/Unknown option set, you will need to delete these in the database before you can update the option set to “Countries”.

5 Likes

A short addition to all previous comments.

The TB Case surveillance tracker includes metadata (minimal requirements) to help collect data required for eg. GTB.

One of the disaggregations is TB notifications among foreign born individuals.

Therefore we integrated the check in the enrolment stage.

If you would like to extend the data entry form and add the country of origin, I would recommend the following:

Keep the Dropdown foreign born as it is.

Then add an attribute suggested by @brian in the previous comment to the data entry form.
Then use program rules to assign the “home” country to the option set, if not foreign born.

If foreign born, the user will have to select the country from the drop-down list.

If Unknown, you can hide the option set and leave the value blank.

This is just a suggestion.
Hope that helps

4 Likes

Thank you for all these comments.

I want to apply your idea @YuryR. I will not modify the " [Foreign-born]" field with the Yes/No/Unknown option and I will add another field “Country” which will only appear if the answer is “yes” in the " [Foreign-born]" field .

Now; I just want to know how to import the “GEN - Country” option set on my Dhis2 instance.

Note that the WHO TB Tracker package does not include the “GEN - Country” option set.
Thank you for your support.

2 Likes

Hi @elmoujarrade ! To import the attribute and the option set, I would suggest the following:

depending on the dhis2 version, you can download one of these packages:
D2.36
D2.37
D2.38

The archive contains several files, you can import the tracker related file:
GEN_LIB_TRK_1.0.0_DHIS2.3x.json

Once imported, go to Maintenance/program
select the TB Case Surveillance and add the tracked entity attribute “Country of residence” to the program tracked entity attributes.
It will then appear in the registration form

In order to create program rules based on the selected “foreign born” attribute, you will need to create an attribute program rule variable.

Hope that helps.

3 Likes

Done.
Thank you dear experts for your support.

4 Likes

Hi @YuryR ,

Thank you for your previous response regarding the import of the “Country of residence” attribute and option set. It was very helpful.

I am currently working with DHIS2 version 2.40, and I would like to know if a compatible version of the GEN_LIB_TRK_1.0.0_DHIS2.3x.json file is available. If so, could you please let me know where I can find it or share it with me?

Thank you in advance for your valuable assistance.

Best regards,