Added medications functionality to version2 branch