instruction: when did the last time patient 025-51835 had a orthopedics consultation performed when they visited the hospital first time?
response: SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-51835' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1)) AND treatment.treatmentname = 'orthopedics consultation' ORDER BY treatment.treatmenttime DESC LIMIT 1