Fix medication saving and page-specific js