ผู้ป่วยที่สั่งยาตามใบสั่งแพทย์หมายเลข 012-85821 ชื่ออะไรในวันเดียวกันหลังจากได้รับการผ่าตัด vte prophylaxis - coumadin เมื่อวันที่ 04/2102? ไม่จำเป็นที่จะต้องใช้ตารางทั้งหมด
what was the name of the prescription drug patient 012-85821 was prescribed during the same day after having received a vte prophylaxis - coumadin procedure in 04/2102?It is not neccessary to use all the tables.
 microlab:  microlabid [ number]  patientunitstayid [ number]  culturesite [ text]  organism [ text]  culturetakentime [ time] 
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-85821') AND treatment.treatmentname = 'vte prophylaxis - coumadin' AND STRFTIME('%y-%m', treatment.treatmenttime) = '2102-04') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-85821') AND STRFTIME('%y-%m', medication.drugstarttime) = '2102-04') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.treatmenttime < t2.drugstarttime AND DATETIME(t1.treatmenttime, 'start of day') = DATETIME(t2.drugstarttime, 'start of day')