instruction: indicate the daily average amount of heartrate for patient 012-29497 during their first hospital visit.
response: SELECT AVG(vitalperiodic.heartrate) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-29497' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1)) AND NOT vitalperiodic.heartrate IS NULL GROUP BY STRFTIME('%y-%m-%d', vitalperiodic.observationtime)