calculate the three year survival rate among the patients who were prescribed oxycodone (immediate release) after being diagnosed with mal neo brain stem.
select sum( case when patients.dod is null then 1 when strftime('%j',patients.dod) - strftime('%j',t4.charttime) > 3 * 365 then 1 else 0 end ) * 100 / count(*) from ( select t2.subject_id, t2.charttime from ( select t1.subject_id, t1.charttime from ( select admissions.subject_id, diagnoses_icd.charttime from diagnoses_icd join admissions on diagnoses_icd.hadm_id = admissions.hadm_id where diagnoses_icd.icd9_code = ( select d_icd_diagnoses.icd9_code from d_icd_diagnoses where d_icd_diagnoses.short_title = 'mal neo brain stem' ) group by admissions.subject_id having min(diagnoses_icd.charttime) = diagnoses_icd.charttime ) as t1 where strftime('%j',current_time) - strftime('%j',t1.charttime) > 3 * 365 ) as t2 join ( select admissions.subject_id, prescriptions.startdate from prescriptions join admissions on prescriptions.hadm_id = admissions.hadm_id where prescriptions.drug = 'oxycodone (immediate release)' ) as t3 on t2.subject_id = t3.subject_id where t2.charttime < t3.startdate ) as t4 join patients on t4.subject_id = patients.subject_id