Chart Search ERROR

Hello all,

I tried to search for concepts using the chart search functionality. and I was encountered by the following error.

https://pastebin.com/rpv5vfW2

Any help in identifying the cause will be much appreciated.

Also, I noticed that if you edit a value of a concept and then search for it, chart search will display the previous (wich was edited) and the current value (after editing). Is there a way to fix this issue?

Which version of the module are you using? Are you able to reproduce it at? qa-refapp.openmrs.org

Thanks @dkayiwa the version is 2.0

I could not reproduce it on my own server. I created similar encounters/observation on a test patient and I could not have the same results. It is linked to a specific patient. Chart search on other test patients does not have the same issue

@dkayiwa

Regarding the second issue ((Also, I noticed that if you edit a value of a concept and then search for it, chart search will display the previous (which was edited) and the current value (after editing). Is there a way to fix this issue?))

I have reproduced this issue on qa-refapp.openmrs.org Please go here

https://qa-refapp.openmrs.org/openmrs/chartsearch/chartsearch.page?patientId=283&returnUrl=%2Fopenmrs%2Fcoreapps%2Fclinicianfacing%2Fpatient.page%3FpatientId%3D283%26

What I did is creating four observations for weight (80, 80, 120, and 100). Then, I have deleted one of them (Wt 120 kg). However, this weight is still showing on chart search.

any luck @dkayiwa

@dkayiwa I have rebuilt Search Index and then search module completely crashed.

This is what it shows when you click on search chart from patients dashboard.

https://pastebin.com/bgkKKusn

Any help is highly appreciated. It is very stressful on our end.

Thanks

Can you create a chart search ticket for fixing this NullPointerException?

@dkayiwa here it is

https://issues.openmrs.org/browse/CSM-129

Thanks in advance

Oh, looks like it was fixed here: https://issues.openmrs.org/browse/CSM-128 Are you able to compile the snapshot version of the module and test it out?

Thanks @dkayiwa Will do for sure and let you know

One more thing: Chart Search Module search for concepts and display them even if you delete them. What I did yesterday is creating four observations for weight (80, 80, 120, and 100). Then, I have deleted one of them (Wt 120 kg). However, this weight is still showing on chart search. Is this a bug or this can be solved through configuration.

https://qa-refapp.openmrs.org/openmrs/chartsearch/chartsearch.page?patientId=283&returnUrl=%2Fopenmrs%2Fcoreapps%2Fclinicianfacing%2Fpatient.page%3FpatientId%3D283%261

Thanks again

Does it still show when you rebuild the search index?

Loaded version 2.1.0 of the module at https://modules.openmrs.org/#/show/164/chart-search-module

@dkayiwa

Yes … see here

https://qa-refapp.openmrs.org/openmrs/chartsearch/chartsearch.page?patientId=283&returnUrl=%2Fopenmrs%2Fcoreapps%2Fclinicianfacing%2Fpatient.page%3FpatientId%3D283%261

Hello @dkayiwa

Do you think it is a bug or it is fixable somehow from module configuration?

I tried rebuilding the index, clearing the history of search chart, both didn’t work what I noticed is that, if you delete the concept prior to using chart search to search for it, it will not show on chart search. Once you search for it and then delete it, it will not show again on search chart.

I appreciate your help

Go to this page https://qa-refapp.openmrs.org/openmrs/module/chartsearch/commands.form, put in the numeric patientId and click “Clear index”. Does the deleted data still show up in the chartsearch?

Thanks @dkayiwa I dont think this function(as per link above) works. I received an error message : Error on pruning patients.

Here is a link where I worked. I have deleted the latest weight (kg) for the patient and it is still showing on search chart.

https://qa-refapp.openmrs.org/openmrs/module/chartsearch/commands.form

This is the patient

https://qa-refapp.openmrs.org/openmrs/chartsearch/chartsearch.page?patientId=323&returnUrl=%2Fopenmrs%2Fcoreapps%2Fclinicianfacing%2Fpatient.page%3FpatientId%3D323%26

I have just cleared the index for that patient. Are you still able to see the deleted weight in their chartsearch?

Unfortunesatly I was not able to assess it on time. What I did is copy/paste patient ID and clicked clear index but I keep getting this error: Error on pruning patients

Do you mind advising how you cleared it so I test it on my end. thanks @dkayiwa

After clearing the index, did you get any message below the patient id field? If yes, what message?

Hello @dkayiwa I tried clearing the index on the demo server (has search chart module 2.0) and I got null pointer exception Cannot get property ‘patient’ on null object

I refreshed, Then after that it worked . The deleted data was gone. I cleared the patient using “by max non using time”

Now I tried it on my server (has search chart module 2.1) and I got the following error

https://pastebin.com/K4tqPpYq