Added logic for creating medications.