Runs properly now - still needs to be tested

Updated so that it actually works....although it doesn't look for
medications or for a subset of subjects yet....that's for after lunch ;)