Move javascript functions to separate file for view/drugs/prescription