I am currently working on Cohort Builder’s Concept/Observation. Currently, the numeric input does not have any effect on the query result. The endpoint being used is reportingrest/adhocquery.
I’ve searched and can’t find any documentation on this endpoint. Does anyone here know if this is the correct endpoint/how to structure the query?
I can query with the existing code but the returned result is not accurate. For example, using Weight (kg) concept, querying any observation with the values below returns the same result:
As adviced by @dkayiwa, I did a search on the old Cohort Builder to determine if there is any difference in the result returned in the old Cohort Builder and the new one and couldn’t find any instance where the results were different.
I took my search further and decided to try the query both on the old and new Cohort Builder in the refapp. On trying the query in the old Cohort Builder on the refapp, I get an error. Here is a link to the error I got: https://pastebin.com/bmKBHwYM
@dkayiwa I’m now able to query on the old Cohort Builder without any errors but the new Cohort Builder now returns a 500 Internal server Error when request is made to reportingrest/adhocquery endpoint
I can’t view the server logs. The error is the response gotten when a request is sent to the reportingrest/adhocquery endpoint. The request is sent using JS. I have attached a screenshot of my browser console displaying this error.
The major problem here is not testing with local server or refapp actually. The problem here is that the result returned on both the old Cohort Builder and the new Cohort Builder are the same when tested locally. The results from the new Cohort Builder have been reported to be inaccurate that’s why I also wanted to confirm using the old and new Cohort Builder in the refapp.
Is it possible for me to go through the code that handles the reportingrest/adhocquery endpoint? I’m sure that will help in some way
I have updated modules-refapp with the latest snapshot version of the reportingrest module. Are you able to still reproduce the problem? If yes, what are the exact steps.
I’ve tried but still not able to query using the new Cohort Builder on refapp. I still get the 500 Internal server Error response. Here’s a link to the logs
https://pastebin.com/2Rt0F4gG
On the Search by Concepts and Observations textbox, enter ‘weight’ without the quotes and click on ‘Weight (kg)’ in the result list
On the ‘Patients with observations whose question is Weight (kg)’ tab, select any of the options and enter any value in the values field and click on search
This will bring up Search error occurred, check the server log for more details error notification.
On inspecting the browser’s console in the developer tools, a 500 Internal Server Error is returned as shown in the image below:
I no longer get an error and I have gotten the confirmation I’m looking for. The query result in the old Cohort Builder is different from the new Cohort Builder in the refapp. The issue now is how to format the query request to the endpoint