updated encounters controller for saving procedures