Vishal #674 Fixing queries for cases where patient starts treatment in middle of week