เริ่มมีปัญหาตั้งแต่เมื่อวานนี้ตอนเย็นครับ พบว่า เวลาที่สั่งยา (จากห้องตรวจแพทย์ หรือห้องยา) จะมีข้อความเตือน 'Invalid price for' ' Could not convert variant of type (Null) into type (Currency)' ทุกรายการยาครับ ก่อนหน้านี้ไม่เคยมีอาการนี้มาก่อน
รบกวนอ. MN ช่วยดูด้วยครับ นี่เป็นรายการ SQL ที่เกิดขึ้น หลังจากเลือกยาแล้ว ก่อนที่จะขึ้นหน้าต่าง pop up error ดังกล่าวครับ ผมสังเกตว่า ถ้าเราสั่ง รายการที่ไม่ใช่ยา จะไม่มี error นี้เกิดขึ้น (เป็นเฉพาะสั่งยา)
Date Time Type Exec Time SQL Text
50-04-19 19:30:40.843 SQL 0 select icode from s_drugitems where rtrim(concat(name,' ',strength,' ',units))='Paracetamol 500 mg. àÁç´' 50-04-19 19:30:40.875 SQL 0 select price_type from pttype where pttype='68' 50-04-19 19:30:40.890 SQL 0 select unitprice from drugitems where icode='1000227' 50-04-19 19:30:40.906 SQL 0 select default_qty from drugitems where icode='1000227' 50-04-19 19:30:40.937 SQL 0 select displaycolor from s_drugitems where icode='1000227' 50-04-19 19:30:40.953 SQL 0 select count(*) as cc from drugitems_inc where icode='1000227' 50-04-19 19:30:40.968 SQL 15 SHOW TABLES FROM hos LIKE 'drugitems_inc' 50-04-19 19:30:40.968 SQL 0 SHOW COLUMNS FROM hos.drugitems_inc LIKE '%' 50-04-19 19:30:40.984 SQL 0 select * from drugitems_inc where icode='1000227' 50-04-19 19:30:40.984 SQL 0 SHOW KEYS FROM hos.drugitems_inc 50-04-19 19:30:41.031 SQL 0 select concat(name,' ',strength,' ',units) as name from s_drugitems where icode='1000227' 50-04-19 19:30:41.046 SQL 0 select price_type from pttype where pttype='68' 50-04-19 19:30:41.062 SQL 0 select unitprice from drugitems where icode='1000227' 50-04-19 19:30:41.093 SQL 0 select drugusage from drugitems where icode='1000227' 50-04-19 19:30:41.109 SQL 0 select shortlist from drugusage where drugusage='0153' 50-04-19 19:30:41.109 SQL 0 SHOW KEYS FROM hos.drugusage 50-04-19 19:30:41.125 SQL 0 select istatus, icode from drugitems where concat(name,' ',strength,' ',units)='Paracetamol 500 mg. àÁç´' 50-04-19 19:30:41.171 SQL 15 select price_lock from s_drugitems where icode='1000227' 50-04-19 19:30:41.187 SQL 0 select unitprice from drugitems where icode='1000227' 50-04-19 19:30:41.203 SQL 0 select displaycolor from s_drugitems where icode='1000227' 50-04-19 19:30:41.234 SQL 0 select check_user_group from drugitems where icode='1000227' 50-04-19 19:30:41.250 SQL 0 select check_user_name from drugitems where icode='1000227' 50-04-19 19:30:41.265 SQL 0 select empty from drugitems where icode='1000227' 50-04-19 19:30:41.296 SQL 0 select maxunitperdose from drugitems where icode='1000227' 50-04-19 19:30:41.312 SQL 0 select must_paid,high_cost,use_right from drugitems where icode='1000227' 50-04-19 19:30:41.359 SQL 0 select concat(name,' ',strength,' ',units) as name from s_drugitems where icode='' 50-04-19 19:30:41.390 SQL 0 select price_type from pttype where pttype='68' 50-04-19 19:30:41.406 SQL 0 select price from nondrugitems where icode=''
ได้ลองแก้ไขหลายวิธี (รวมทั้งวิธีของคุณ Khuad50) คือ 1.delete from 3 tables --> append data cds ทั้งจากของเก่าของมะการักษ์ที่ post ไว้ ทั้งจากของคุณ Khuad50 และ data จาก Server ทดลอง --> update search list --> error 2.drop 3 tables --> create 3 tables (จากคำสั่ง show create table) --> append data จาก server ตัวทดลองที่ยังใช้ได้ --> update search list --> error 3. drop 3 tables --> update structure ใหม่ โปรแกรมจะสร้างตารางทั้ง 3 ให้ใหม่ แล้วนำข้อมูลจากตัวโปรแกรมใส่ให้ --> delete data append data cds ทั้งจากของเก่าของมะการักษ์ที่ post ไว้ ทั้งจากของคุณ Khuad50 และ data จาก Server ทดลอง --> update search list --> error
สรุปว่า ตอนนี้ยังแก้ปัญหาไม่ตกเลย สงสารแพทย์ที่ต้องกด OK ทุกบรรทัดที่สั่งยาเลยครับ
ผมก็คิดว่า คงจะต้อง up MySQL เป็น ver 5 ซะเลย น่าจะดีกว่า (อ.MN ก็เห็นด้วย) ตอนนี้คงต้องทดลอง up MySQL ใน Server สำรองตัวนี้ดูก่อนครับ กันพลาด ....กำลังเล็งๆ Cluster น่าสนใจมากครับ...