fix ecg query bug
add ecg loader function