HUM-917, refactor code to use patient cohort and individual sql commands to retrieve additional fields