some clean up and bug squashing as a result of javascript now doing all the error checking for assigning patients