switch patient querying to use nested filter
cleanup and better script null handling
use reportxform #value conventions
wip refactoring of xform query using nested