ผู้ป่วยยา 64136 จ่ายยาอะไรภายใน 2 วัน หลังจากได้รับการวินิจฉัยว่าเป็น chr pulmon heart dis nec เมื่อไปโรงพยาบาลครั้งล่าสุด?ไม่จำเป็นต้องใช้ตารางทั้งหมด
what is the drug patient 64136 was prescribed for within 2 days after being diagnosed with chr pulmon heart dis nec when they visited the hospital last time?It is not neccessary to use all the tables.
 icustays:  row_id [ number]  subject_id [ number]  hadm_id [ number]  icustay_id [ number]  first_careunit [ text]  last_careunit [ text]  first_wardid [ number]  last_wardid [ number]  intime [ time]  outtime [ time] 
SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 64136 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chr pulmon heart dis nec') AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 64136 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME(t2.startdate) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 day')