querying database of mass health records