We have come across a NullPointerException when attempting to
preview a cohort query from it's creation page (prior to being saved). After the query is saved, it previews and runs with no problems. What I believe may be the case is that somewhere in the OpenMRS code for cohort queries it specifies that a query must be saved before it can be run or previewed. Though I am not positive that this is the case, the queries can only be previewed after they are saved. If anyone has any information regarding this, please do not hesitate to respond.
I have attached screenshots depicting this error that is thrown on the creation page and not the saved page. As you can see in the one image (screenshot 1) behind the error, the cohort query has yet to be saved and in the completed query image (screenshot 2) the query has been saved and the background page is on the Cohort Query manager page.
Thanks,
Justin & the Moravian community