diff --git a/ui/app/common/displaycontrols/observation/directives/bahmniObservation.js b/ui/app/common/displaycontrols/observation/directives/bahmniObservation.js
index 10ac971308..d65a52d605 100644
--- a/ui/app/common/displaycontrols/observation/directives/bahmniObservation.js
+++ b/ui/app/common/displaycontrols/observation/directives/bahmniObservation.js
@@ -19,7 +19,8 @@ angular.module('bahmni.common.displaycontrol.observation')
if ($scope.config.conceptNames) {
observations = _.filter(observations, function (observation) {
return _.some($scope.config.conceptNames, function (conceptName) {
- return _.toLower(conceptName) === _.toLower(_.get(observation, 'concept.name'));
+ var comparableAttr = observation.conceptFSN != null ? 'conceptFSN' : 'concept.name';
+ return _.toLower(conceptName) === _.toLower(_.get(observation, comparableAttr));
});
});
}
diff --git a/ui/app/common/displaycontrols/observation/views/observationDisplayControl.html b/ui/app/common/displaycontrols/observation/views/observationDisplayControl.html
index 593d8f5478..651d425653 100644
--- a/ui/app/common/displaycontrols/observation/views/observationDisplayControl.html
+++ b/ui/app/common/displaycontrols/observation/views/observationDisplayControl.html
@@ -29,7 +29,7 @@
+ level="2" display-name-type="::config.displayNameType">
@@ -37,17 +37,17 @@
class="print-observations hidden-print obs-groups-container">
+ level="2" config-is-observation-for-images="::config.isObservationForImages" display-name-type="::config.displayNameType">
+ level="2" config-is-observation-for-images="::config.isObservationForImages" display-name-type="::config.displayNameType">
+ level="2" config-is-observation-for-images="::config.isObservationForImages" display-name-type="::config.displayNameType">
diff --git a/ui/app/common/obs/directives/showObservation.js b/ui/app/common/obs/directives/showObservation.js
index e58f7ceb46..1d166d4ac4 100644
--- a/ui/app/common/obs/directives/showObservation.js
+++ b/ui/app/common/obs/directives/showObservation.js
@@ -31,6 +31,13 @@ angular.module('bahmni.common.obs')
}
});
};
+ $scope.displayLabel = function (observation) {
+ if ($scope.displayNameType === 'FSN') {
+ return observation.concept.name;
+ } else {
+ return (observation.concept.shortName.charAt(0).toUpperCase() + observation.concept.shortName.slice(1)) || observation.concept.name;
+ }
+ };
};
return {
restrict: 'E',
@@ -40,7 +47,8 @@ angular.module('bahmni.common.obs')
showDate: "=?",
showTime: "=?",
showDetailsButton: "=?",
- configIsObservationForImages: "=?"
+ configIsObservationForImages: "=?",
+ displayNameType: "=?"
},
controller: controller,
template: ''
diff --git a/ui/app/common/obs/views/showObservation.html b/ui/app/common/obs/views/showObservation.html
index 2b380e053d..d4c7e174eb 100644
--- a/ui/app/common/obs/views/showObservation.html
+++ b/ui/app/common/obs/views/showObservation.html
@@ -13,7 +13,7 @@
-
+
+ ng-class="{'video-concept-show': member.isVideoConcept()}" display-name-type="::displayNameType">
+ config-is-observation-for-images="::configIsObservationForImages" display-name-type="::displayNameType">