ผ่านไปกี่วันแล้วนับตั้งแต่ครั้งแรกที่คนไข้ 012-66291 ทำหัตถการในการเข้ารับการรักษาในโรงพยาบาลปัจจุบัน?ไม่จำเป็นต้องใช้ตารางทั้งหมด
how many days have elapsed since the first time that patient 012-66291 had a procedure on the current hospital encounter?It is not neccessary to use all the tables.
 patient:  uniquepid [ text]  patienthealthsystemstayid [ number]  patientunitstayid [ number]  gender [ text]  age [ text]  ethnicity [ text]  hospitalid [ number]  wardid [ number]  admissionheight [ number]  admissionweight [ number]  dischargeweight [ number]  hospitaladmittime [ time]  hospitaladmitsource [ text]  unitadmittime [ time]  unitdischargetime [ time]  hospitaldischargetime [ time]  hospitaldischargestatus [ text] 
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-66291' AND patient.hospitaldischargetime IS NULL)) ORDER BY treatment.treatmenttime LIMIT 1