คำนวณความน่าจะเป็นในการรอดชีวิตหนึ่งปีของผู้ป่วยที่ได้รับยา plas cont ipratropium-albuterol 0.5-2.5 (3) มก./3 มล. ในสารละลาย 3 มล. หลังจากได้รับการวินิจฉัยว่าเป็นโรคหลอดเลือดหัวใจเฉียบพลัน - s/p ptca หรือไม่ไม่จำเป็นต้องใช้ทั้งหมด โต๊ะ.
calculate the one year survival probability of patients that were prescribed 3 ml plas cont ipratropium-albuterol 0.5-2.5 (3) mg/3ml in soln after they were diagnosed with acute coronary syndrome - s/p ptca?It is not neccessary to use all the tables.
 diagnosis:  diagnosisid [ number]  patientunitstayid [ number]  diagnosisname [ text]  diagnosistime [ time]  icd9code [ text] 
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute coronary syndrome - s/p ptca' GROUP BY patient.uniquepid HAVING MIN(diagnosis.diagnosistime) = diagnosis.diagnosistime) AS t1) AS t2 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = '3 ml plas cont: ipratropium-albuterol 0.5-2.5 (3) mg/3ml in soln') AS t3 ON t2.uniquepid = t3.uniquepid WHERE t2.diagnosistime < t3.drugstarttime) AS t4 JOIN patient ON t4.uniquepid = patient.uniquepid