Optimize consultations data export to use data definitions - #1000