modified the view to display popup to right patients