Bed Management - Wards having other parent location are also visible

Bahmni ver 0.91. When logged in to a location wards and beds of other location are also seen.

Here is the view of location hierarchy and the corresponding wards.

Shouldn’t it show wards only for the logged in location?

The login location on Bahmni only symbolizes where a clinical encounter/visit is happening. It does not limit the ward view.

Yes, I noticed it and so to meet the requirements (to show only those wards which are at the logged in location - physical location), I added this code in bahmniapps/ui/app/bedmanagement/controllers/bedManagementController.js

var loadAllWards = function () {
    return spinner.forPromise(wardService.getWardsList().success(function (wardsList) {
        $scope.wards = _.filter(wardsList.results, function(result) { return (result.ward.parentLocation.uuid == $scope.$root.visitLocationUuid) });

I am not sure if the product itself will support such code. If you want the product to support this, please raise this as a feature request and discuss in the PAT calls.

1 Like