I am using Bahmni on vagrant and have set up the dev environment and am editing the files in /Projects/bahmni/bahmni-core
What I want to achieve:
I wanted to create my own query to retrieve patients from the Db.
What I Have done until now:
So I used the same logic from PatientSearchController and created my own Controller. PatientSearchController uses the url–>/rest/bahmnicore/search/patient and I used a different one for my controller.I also made the corresponding DAO,DAOImpl,Service,ServiceImpl for my search functionality.For now,I have used the same code and havent made any changes to the logic.
My Problem:
How do I compile the code so that my search functionality is available for me to use in Bahmni?
Edit:I ran mvn clean install on bahmnicore-api and bahmnicore-omod.But it only generated the omod in bahmnicore-omod and not in bahmnicore-api.Am I doing something wrong?
You need to provide a lot more info than this for anybody else to understand where you are coming from, the exact steps you have followed and where exactly you hit the problem.
In bahmni registration module–>create new page,I was calling the getPatients() function which is at the following url /rest/bahmnicore/search/patient .Now I have created my own getPatients() function which is at /rest/bahmnicore/search/soundex .When calling it I am getting the error which says,“The requested information does not exist” .
When I created my own getPatients() ,I compiled it using the steps you mentioned . Dont know why I am getting the error. Thanks for your reply !
Where you should substitute user, pass and your_domain with the appropriate values. You might also switch http to https if that’s relevant for your setup.
Note that I doubt the part that you provided /rest/bahmnicore/search/soundex to be a valid end piece of the URL. If anything the whole thing should rather look like this: /openmrs/ws/rest/v1/bahmnicore/search/soundex (note the ‘v1’).
You really must provide detailed and accurate information, otherwise it’ll be difficult to move forward.
I added the -k option as suggested in the message that you reported.
Also when trying this through the app (so via your web browser as in your screenshot), look for any errors in the Chrome JavaScript console that relate to the URL in question. Finally keep an eye on the OpenMRS log as well (in /opt/openmrs/openmrs.log).
You would get an IllegalArgumentException because more arguments need to be provided to yield an actual response. But the resource is found, functions and returns an expected error.