Skip to content

Commit

Permalink
BAH-3472 | Deepti,Sweety,Mohan,Soorya | Refactor bahmniCommonsSearchU…
Browse files Browse the repository at this point in the history
…rl for patient search.
  • Loading branch information
sweetysTW authored and rahu1ramesh committed Jan 16, 2024
1 parent 03a13d1 commit b78c1d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ui/app/registration/services/patientService.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ angular.module('bahmni.registration')
};

var searchByIdentifier = function (identifier) {
return $http.get(Bahmni.Common.Constants.bahmniSearchUrl + "/patient", {
return $http.get(Bahmni.Common.Constants.bahmniCommonsSearchUrl + "/patient", {
method: "GET",
params: {
identifier: identifier,
Expand All @@ -42,7 +42,7 @@ angular.module('bahmni.registration')
};

var searchByNameOrIdentifier = function (query, limit) {
return $http.get(Bahmni.Common.Constants.bahmniSearchUrl + "/patient", {
return $http.get(Bahmni.Common.Constants.bahmniCommonsSearchUrl + "/patient", {
method: "GET",
params: {
q: query,
Expand Down
2 changes: 1 addition & 1 deletion ui/test/unit/registration/services/patientService.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ describe('Patient resource', function () {
var query = "demo";
patientService.searchByNameOrIdentifier(query, 100);
expect(mockHttp.get).toHaveBeenCalled();
expect(mockHttp.get.calls.mostRecent().args[0]).toBe(Bahmni.Common.Constants.bahmniSearchUrl + "/patient");
expect(mockHttp.get.calls.mostRecent().args[0]).toBe(Bahmni.Common.Constants.bahmniCommonsSearchUrl + "/patient");
expect(mockHttp.get.calls.mostRecent().args[1].params.q).toBe(query);
expect(mockHttp.get.calls.mostRecent().args[1].params.limit).toBe(100);
expect(mockHttp.get.calls.mostRecent().args[1].params.s).toBe("byIdOrName");
Expand Down

0 comments on commit b78c1d6

Please sign in to comment.