diff --git a/ui/app/registration/services/patientService.js b/ui/app/registration/services/patientService.js index f66cadcef8..d0202f7bce 100644 --- a/ui/app/registration/services/patientService.js +++ b/ui/app/registration/services/patientService.js @@ -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, @@ -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, diff --git a/ui/test/unit/registration/services/patientService.spec.js b/ui/test/unit/registration/services/patientService.spec.js index a2852eddbc..acda245ed2 100644 --- a/ui/test/unit/registration/services/patientService.spec.js +++ b/ui/test/unit/registration/services/patientService.spec.js @@ -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");