{{ ::'MEDICATION_NO_RECENT_TREATMENT' | translate }}
+
diff --git a/ui/app/common/constants.js b/ui/app/common/constants.js
index 9fee2e0da5..d79aa3ee33 100644
--- a/ui/app/common/constants.js
+++ b/ui/app/common/constants.js
@@ -218,6 +218,7 @@ Bahmni.Common = Bahmni.Common || {};
ordersUrl: RESTWS_V1 + "/order",
formDataUrl: RESTWS_V1 + "/obs",
providerUrl: RESTWS_V1 + "/provider",
+ providerAttributeUrl: RESTWS_V1 + "/provider/{{providerUuid}}/attribute",
drugUrl: RESTWS_V1 + "/drug",
orderTypeUrl: RESTWS_V1 + "/ordertype",
userUrl: RESTWS_V1 + "/user",
diff --git a/ui/app/common/domain/services/providerService.js b/ui/app/common/domain/services/providerService.js
index d1fd1875a1..526a48487e 100644
--- a/ui/app/common/domain/services/providerService.js
+++ b/ui/app/common/domain/services/providerService.js
@@ -1,7 +1,7 @@
'use strict';
angular.module('bahmni.common.domain')
- .factory('providerService', ['$http', function ($http) {
+ .factory('providerService', ['$http', 'appService', function ($http, appService) {
var search = function (fieldValue) {
return $http.get(Bahmni.Common.Constants.providerUrl, {
method: "GET",
@@ -28,9 +28,19 @@ angular.module('bahmni.common.domain')
});
};
+ var getAttributesForProvider = function (providerUuid) {
+ var providerAttributeUrl = appService.getAppDescriptor().formatUrl(Bahmni.Common.Constants.providerAttributeUrl, {'providerUuid': providerUuid});
+ return $http.get(providerAttributeUrl, {
+ method: "GET",
+ withCredentials: true,
+ cache: false
+ });
+ };
+
return {
search: search,
searchByUuid: searchByUuid,
- list: list
+ list: list,
+ getAttributesForProvider: getAttributesForProvider
};
}]);
diff --git a/ui/app/common/patient/mappers/patientMapper.js b/ui/app/common/patient/mappers/patientMapper.js
index b9f3fb229c..6d2e5206a0 100644
--- a/ui/app/common/patient/mappers/patientMapper.js
+++ b/ui/app/common/patient/mappers/patientMapper.js
@@ -81,10 +81,13 @@ Bahmni.PatientMapper = function (patientConfig, $rootScope, $translate) {
"address1": preferredAddress.address1,
"address2": preferredAddress.address2,
"address3": preferredAddress.address3,
+ "address4": preferredAddress.address4,
+ "address5": preferredAddress.address5,
"cityVillage": preferredAddress.cityVillage,
"countyDistrict": preferredAddress.countyDistrict === null ? '' : preferredAddress.countyDistrict,
"stateProvince": preferredAddress.stateProvince,
- "postalCode": preferredAddress.postalCode ? preferredAddress.postalCode : ""
+ "postalCode": preferredAddress.postalCode ? preferredAddress.postalCode : "",
+ "country": preferredAddress.country ? preferredAddress.country : ""
} : {};
};
diff --git a/ui/app/common/ui-helper/printer.js b/ui/app/common/ui-helper/printer.js
index 10177822e5..54e045cbd8 100644
--- a/ui/app/common/ui-helper/printer.js
+++ b/ui/app/common/ui-helper/printer.js
@@ -30,7 +30,8 @@ angular.module('bahmni.common.uiHelper')
}, false);
};
- var print = function (templateUrl, data) {
+ var print = function (templateUrl, data, pageTitle) {
+ pageTitle = pageTitle || null;
$rootScope.isBeingPrinted = true;
$http.get(templateUrl).then(function (templateData) {
var template = templateData.data;
@@ -38,6 +39,8 @@ angular.module('bahmni.common.uiHelper')
angular.extend(printScope, data);
var element = $compile($('