Refactored PIX processing in save encounter
XDS Query work in progress