Bugfix to allow CA or CA-BC realmCodes
Fix PDC-001 query to handle null genders

Signed-off-by: Jeremy Ho <jujaga@gmail.com>
Modifications for e2e export changes made June 12, 2014