Unable to call searchPatients() from a different controller

I am trying to call the searchPatients() function which is in searchPatientController.js from patientCommonController.js.

searchPatients() in turn calls search() from defaultPatientServiceStratergy.js .So I copied and pasted the search() in patientCommonController and passed the appropriate parameters.But I am getting the following error when the search() is called from patientCommonController :

Cannot read property ‘identifier’ of undefined .

What am I doing wrong?

@krishnanspace we cannot see your error ,can you put it at pastebin.com ?

It’s solved now.Thanks for the response.

1 Like

Glad it’s solved !

@krishnanspace can you share what was the solution, so that someone else seeing this thread later can learn from your experience?

I had forgotten to import my new patientCommonController.js in my index.html file :smiley: