instruction: when was the first time during the current hospital encounter patient 017-16041 was prescribed a medication?
response: SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-16041' AND patient.hospitaldischargetime IS NULL)) ORDER BY medication.drugstarttime LIMIT 1