Custom working list customization

Dear community members,

@Gassim would you please help me on how I can customize custom working list and base on given conditions
I want to achieve something like it is shown on below image

how can I create something like Ongoing foci responses I think if I can achieve this it can help me to track TEIs based on various conditions

1 Like

Hi @Pacifique_Hategekima,

Yes, thanks! Very nice question! (:
For the ‘custom working list’ you can choose the filters on the fly; however, for something like ‘ongoing foci responses’ list then I think you will have to use the API to create what is called trackedEntityInstanceFilters which are “a predefined set of query parameters”

For example, the ones you list in the image above are listed here: https://play.dhis2.org/2.37.2/api/trackedEntityInstanceFilters

If you would like to create these trackedEntityInstanceFilters “Working lists” using API, here’s a link to the docs (and please feel free to post back to the community with your questions and/or your experiences/ use cases):
/api/trackedEntityInstanceFilters resource - API Docs - Using the API - DHIS2 Documentation

This means that I will need to navigate API using an external tool like Postman of swagger to post my filter?
if possible would you please give me an example of post payload to create a trackedEntityInstanceFilter , that I can fire in postman to create a new one

Thanks @Gassim

Hi @Pacifique_Hategekima,
Yes, there’s no problem it’s very easy; however, the challenge is choosing the filters which will require that you go through the Payload in the docs and select exactly what you want to be filtered.

Here’s an example API POST request to https://play.dhis2.org/2.37dev/api/33/trackedEntityInstanceFilters:

{
  "name": "A 2022 Working-list",
  "displayName": "A 2022 Working-list",
  "description": "A 2022 Working-list",
  "displayDescription": "A 2022 Working-list",
  "followup": false,
  "enrollmentStatus": "ACTIVE",
  "sortOrder": 2,
  "favorite": false,
  "program": {
  "id": "IpHINAT79UW"
  },
  "attributeValues": [],
  "eventFilters": [],
  "userAccesses": []
}

1 Like