ในบรรดาผู้ป่วยที่ได้รับยาเซนนาหลังจากได้รับการวินิจฉัยว่าเป็นโรคส่วนปลาย - แขนขาด้านขวาแสดงอัตราการรอดชีวิตใน 3 ปี ไม่จำเป็นต้องใช้ตารางทั้งหมด
among patients who were prescribed senna after they had been diagnosed with extremity compartment syndrome - right lower extremity show me the three year survival rate.It is not neccessary to use all the tables.
 cost:  costid [ number]  uniquepid [ text]  patienthealthsystemstayid [ number]  eventtype [ text]  eventid [ number]  chargetime [ time]  cost [ number] 
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 3 * 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 = 'extremity compartment syndrome - right lower extremity' 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 = 'senna') AS t3 ON t2.uniquepid = t3.uniquepid WHERE t2.diagnosistime < t3.drugstarttime) AS t4 JOIN patient ON t4.uniquepid = patient.uniquepid