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”
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
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.
We in Palestine have a system for the patient medical record that consists of different programs. The starting point is from registration, we register the patient in the registration program then fill a stage for the purpose of the visit. Then enroll the patient in related programs, It could be Immunization, lab, radiology…etc. The following screenshots shows the workflow:
I created a custom working list following your instructions. One for the patients assigned to the current user, and the other for the patients that are not assigned.
Now I want to created a list for the patient order depends on the event date inside the registration program. For example If Patient X came first and we filled the “Purpose of the visit” stage for him, then Patient Y came after him, the list must show Patient X in the top of the list then Patient Y then Patient Z and so on.
The date that should be followed in the filter is this date:
Yes, the equal sign is wrong. The first one is correct but then it might be that the JSON format above has a syntax error. Please check if the quotation marks are all the same? Sometimes that is something that could change because of keyboard language or copy/paste. I tried eventDate:asc and it’s working, see screenshot:
Thank you for your patience! There were updates in the API endpoint and one of the updates was was validating the properties. It seems that even in older versions ‘eventDate’ didn’t actually work but it was ignored by the API; however, with the validation, we can now see it as an error on Postman. (@Simona.Domnisoru and @Karoline, please feel free to correct me or add to this)
We can’t say it’s a bug but you did help uncover that the docs needs an update so we’ll count that.
As for now I’m not sure exactly what’s the option to use instead of eventDate but if I find out, I will let you know. If you decide to test as well, I recommend to check after each POST request whether it’s actually displaying the list as expected or not (I didn’t do that last time so that’s why we got to this.)
Thank you @Gassim for this information. I’ve gone through these views and tried to create mine, but unfortunately I didn’t find the “event date or Report date” as a parameter to be filtered or ordered. In addition, I cant choose specific stage inside a program. Can you advise? As I mentioned before, I want to order patients according to the event date/Report date of a specific stage inside a program
@hanin.saadah I understand but it seems that it’s not currently supported. Maybe there’s a workaround to this such as creating a data element that will be assigned the event date of the event using a program rule and then using that data element in the filters?
We are building workinglists that lists events from a program stage, and probably will solve your issue… Its not released yet, but it will be. This will be in the new capture app and not the old tracker capture.