instruction: when was the last time patient 030-58018 has been diagnosed with malignancy - cancer with metastases to the lung until 1 year ago?
response: SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-58018')) AND diagnosis.diagnosisname = 'malignancy - cancer with metastases to the lung' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-1 year') ORDER BY diagnosis.diagnosistime DESC LIMIT 1