Completed the database query for Medication