Yes, edit the medication and uncheck "Is Active". You will not see the medication in the "Daily View" but it will be in the history.

Note: doing this will delete any reminders for that medication.