instruction: when first did patient 018-20179 have the maximum heartrate on the first intensive care unit visit?
response: SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-20179') AND NOT patient.unitdischargetime IS NULL ORDER BY patient.unitadmittime LIMIT 1) AND NOT vitalperiodic.heartrate IS NULL ORDER BY vitalperiodic.heartrate DESC, vitalperiodic.observationtime LIMIT 1