Incorrect nesting error for medications check

Put some code inside the wrong closing bracket in last commit - fixing