แสดงกระทู้

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - chitvichai

หน้า: 1 [2] 3
51
ที่ต้องเผื่อ / ให้เยอะก็เพราะว่าตัว Xtrabackup จะสำรองข้อมูลไปไว้ใน / ก่อนครับ เกรงว่าจะมีพื้นที่เหลือไม่พอน่ะครับ

ผมเคยลองแล้วติดปัญหา / พื้นที่ไม่พอครับ
เลยอยากให้อาจารย์ทำตัวเลือกระบุ path เป็น /bck หรื่อ /อื่น ๆ แล้วแต่จะกำหนดครับ
แล้วให้ / เป็นค่า Default ได้เปล่าครับ

52
ขอแสดงความเสียใจด้วยครับ

53
ขอบคุณครับ

รายงานทำเสร็จแล้วแบ่งให้ใช้บ้างก็ดีครับ ;D

54
ดัน ๆๆๆๆ ครับ

โค๊ด: [Select]

set @hn:='';
set @cc:=0;
set @cd:=0;
select if(if(@hn<>p.hn,@cc:=1,@cc:=@cc+1)>0,@cd:=@cd+1,0) as `ÅӴѺ`,
@hn:=p.hn as hn,@cc as `¤ÃÑé·Õè` ,p.vstdate
from physic_main_ipd p
left outer join an_stat a on p.an=a.an
where  p.send_ward='01' and p.vstdate between '2012-01-01' and '2012-01-31'
order by p.hn,p.vstdate

ลอง copy โค็ดไปทดสอบน่ะครับว่าใช่หรือเปล่า

55
ผมอัพเกรด 3.55.8.30 แล้ว มันไปหยุดอยู่ที่ คำสั่ง alter table opdscreen add 'macro_albumin' int null
และก็ค้างไม่ไปไหนเลย ผลเลย EndTask จากนั้นเข้า HosXp ใหม่ เข้ามาที่สายฟ้า สั่ง
select * from opdscreen limit 200 แล้วรัน  ปรากฏว่า เปิดตารางนี้ไม่ได้ เลยไป repair table
มันก็ค้าง ไม่เสร็จซักที แก้ยังไงดีครับ

ตอน alter table ระบบ จะ rename table เป็น tmp table ก่อนครับ
ดังนั้นต้องกลับเข้าไป rename file tmp_opdscreen.ibd  tmp_opdscreen.fbd tmp_opdscreen.Myd tmp_opdscreen.myi ใน server

/var/lib/mysql/hos/
แล้ว chown mysql:mysql opdscreen.*
แล้ว chmod 600 opdscreen.*
ลองดูครับ
ไม่งั้นก็ restore จาก backup file ได้ครับ

56
ถ้าทำเป็นปี พ.ศ น่าจะเป็นแบบนี้ใช่ไหมคร้บ  ;D
select date_format(birthday+5430000,'%Y%m%d') as birthday  from patient  limit 100

1: select concat(date_format(birthday,'%Y%m%d')+5430000) as birthday  from patient  limit 100

or

2: select concat(replace(birthday,'-','')+5430000) as birthday from patient limit 100

1: ใช้ date_format function จะได้แต่ปี ค.ศ. แล้ว +5430000 จะเป็น ตัวแล้ว ต้องใช้ string function ช่วยเปลี่ยนเป็น พ.ศ.

2: ใช้ string function


57
ต้องเขียนแบบไหนครับ ผมเขียนไม่ออก  ;D
select concat(fname," ",lname) as fullname,DATE_FORMAT(birthdate(),"%Y%m%d") from patient  limit 100
DATE_FORMAT(birthdate,"%Y%m%d")
ลองดูครับ
โค๊ด: [Select]
select concat(fname," ",lname) as fullname,
replace(birthday,"-","") as addate,/*ค.ศ.*/
concat(replace(birthday,"-","")  +5430000) as bddate /*พ.ศ.*/
from patient
limit 100

58
??? ??? ทดลองนำเข้าแล้ว ขึ้น Error ยังงี้ แก้ไขงัยครับ  ??? ???
ใช้ HOSxP PCU V 3.55.8.9 ส่งออก

ปล.แนบไฟล์ Zip มาให้ทดสอบด้วยครับ
ผมเอาไฟล์ zip ที่ให้มาลองแล้วก็นำเข้าได้ครับ
น่าจะมาจากไฟล์เป็นไฟล์ของ หน่วยบริการ 05342
ดังน้นก่อนนำเข้าต้องตั้งค่าหน่วยบริการเป็น 05342 ก่อนครับ

59
อีกอาการครับ คือ โปรแกรมไม่จำค่า ติ๊ก "พิมพ์ใบ Refer" และ Printer ที่เลือกไว้
หรือว่าเป็นอาการปกติครับ  ;D ;D
เป็นเหมือนกันครับ  :D

60
Report Exchange / Re: ช่วยดู Code รายงาน CMI ให้ทีจ้า
« เมื่อ: สิงหาคม 01, 2012, 11:57:10 AM »
select i.mdc ,SUBSTRING(i.drg,3,2) as dd
from an_stat a
left outer join ipt i on i.an=a.an
where a.dchdate between '2012-01-01'and '2012-01-31 ' and i.mdc=1
-----------------------------------------------------
ติดปัญหาตรงที่ฟิว drg มีตัวเลขทั้งหมด 5 หลักแต่ผมต้องการแค่ 2 หลัก ก็เลยดึงมีแค่สองตัว และอยากได้นำฟิว dd มากำหนดค่า dd < 49 หรือ dd > 49 เพื่อหาคนที่ มีผ่าตัดและไม่มีผ่าตัด
ช่วยแก้ Code ให้ทีนะครับ
ขอบคุณครับ
โค๊ด: [Select]
select i.mdc ,SUBSTRING(i.drg,3,2) as dd, if(SUBSTRING(i.drg,3,2)>49,"N","Y") as op
from an_stat a
left outer join ipt i on i.an=a.an
where a.dchdate between '2012-01-01'and '2012-01-31 '

61
แจ้งปัญหา / ขอความช่วยเหลือ / Re: NHSO UCSearch Client V.3
« เมื่อ: กรกฎาคม 26, 2012, 19:14:41 PM »
ตรงเนี๊ย !!! โทรฯเข้า IT helpdesk ก็ไม่สามารถติดต่อได้ ???
ติด รหัสผ่านเหมือนกันครับ ใครได้แล้วบอกทีครับ

62
Development / HOSxP Upgrade 3.55.7.21 new update
« เมื่อ: กรกฎาคม 22, 2012, 08:42:41 AM »
ลองทดสอบกันนะครับ  :) :) :)


http://hosxp.net/bms/HOSxP_Upgrade_3.55.7.21.exe

กำลัง up struc ...on slave ครับใครอยากลอง โหลด โลด.......

63
Development / Re: ReportBuilder end user function
« เมื่อ: กรกฎาคม 13, 2012, 14:47:35 PM »

ช่วยอธิบายความหมายของแต่ละ grade 0-5 หน่อยครับว่าคืออะไร เพราะมีบาง case แบ่ง grade ไม่ได้ครับ
เช่นผู้ป่วย วัด bps 139 bpd 93 result:= ''

อ้อ อันนี้หมอเขาต้องการดู grade ของคนไข้ความดันครับ
ถ้าในกรณี  bps 139 bpd 93 result:= '0'  ผลลัพก็จะได้  0 ครับ
แต่ความหมายในทางการวิเคราะห์ผมก็ไม่ทราบครับ  เขาอยากแบ่งแบบนี้ครับ 
เดี่ยวไปถามพี่พยาบาลก่อนนะครับ
ผมลอง แล้วครับ GetGradebp('139','93');
มัน return value ='' ครับ ไม่ใช่ 0 นะครับ

64
Development / Re: ReportBuilder end user function
« เมื่อ: กรกฎาคม 13, 2012, 11:28:10 AM »
// //ตัวนี้เอาไว้หาคะแนน  ของผลแลป bp  ครับ  แต่ค่าคงที่ยัง fix ตายตัวอยู่  ยังหาที่เก็บไว้ไม่ได้ครับ
โค๊ด: Delphi
  1. function GetGradebp(bps,bpd:string): string;
  2. begin
  3.   result := '';
  4.  
  5.   case strtoint(bps)  of
  6.      1..140   : begin
  7.                      if strtoint(bpd)<=90 then
  8.                      result := '5';
  9.                 end;
  10.      141..150 : begin
  11.                      if strtoint(bpd)<=90 then
  12.                      result := '4'
  13.                      else if strtoint(bpd)<=95 then
  14.                           result := '3';
  15.                 end;
  16.      151..160 : begin
  17.                      if strtoint(bpd)>95  then
  18.                      result := '2'
  19.                      else
  20.                      result := '2';
  21.                 end;
  22.      161..300 : begin
  23.                      if strtoint(bpd)>100  then
  24.                      result := '1'
  25.                      else
  26.                      result := '1';
  27.                 end;
  28.      else result := '0';
  29.   end;
  30. end;
ช่วยอธิบายความหมายของแต่ละ grade 0-5 หน่อยครับว่าคืออะไร เพราะมีบาง case แบ่ง grade ไม่ได้ครับ
เช่นผู้ป่วย วัด bps 139 bpd 93 result:= ''

65
elect * from replicate_log where 'sql' like "%550004481%"   limit 20
ใส่ ฟันหนูได้หรือเปล่าครับ


ใส่แล้วก็ยังไม่ได้ครับ
ลอง copy Code นี้ดูครับ ใช้ Alt+96 แทนฟันหนูครับ
โค๊ด: [Select]
select * from replicate_log where `sql` like "%550004481%"   limit 20

66
SQL Error: Table 'hos.tmp_opitemrece_repl' doesn't exist
select * from opitemrece where vn = '550630085705'
 ต้องแก้อย่างไรครับ


ต้องแก้ตามกระทู้นี้เลยครับ
คลิก ตรง drop triger ในหน้า upgrade struct....
;D ;D ;D
ตรงนี้ครับ
 ;D ;D ;D
;D ;D ;D
แฟ้ม PERSON สปสช.คิดเป็นแฟ้มสำรวจสะสม ส่งข้อมูลปีละครั้ง (1 กรกฏาคม 2555) หมายถึงแฟ้มนี้ต้องส่งออกข้อมูล PERSON ทั้งหมดเข้าไปแต่ผมทดสอบส่งออกแบบเลือก All PP Data แล้วข้อมูลแฟ้มนี้ออกมาไม่หมด รบกวนอาจารย์ตรวจสอบด้วยครับเพราะต้องส่งเดือนกรกฏาฯนี้แล้วครับ
 ;D ;D ;D

ฝากทดสอบอีกครั้งใน 3.55.6.30 นะครับ
3.55.6.30 ยังโหลดไม่ได้ครับ

67
เพียงแต่ยกตัวอย่างให้เห็นเฉยๆครับว่า กรณีที่เราต้องการนับจำนวนคนไข้จากตารางเดียวกัน เงื่อนไขเดียวกัน ทำไมยอดออกมาไม่ตรงกัน
ก็เพราะ count(distinct if(month(vstdate)=10,vn,0)) มันนับ 0 ด้วยครับ เลยเกิน มา 1

68
ต้องหา icode ของยาในกลุ่ม n-said มาก่อนแล้วค่อยรัน sql ดังนี้
อ้างถึง
select o.hn,o.vn,sum(icode in (
'icode 1.diclofenac tab',
'icode 2.ibuprofen 200mg',
'icode 3.ibuprofen 400 mg', 
'icode 4.indomethanacin cap', 
'icode 5.mefenamic acid cap',
'icode 6.naproxen tab',
'icode 7.celecoxib cap',
'icode 8.etoricoxib(arcoxia)tab',
'icode 9.froctafenine tab',   
'icode 10.aspirin 81 mg',
'icode 11.aspirin  300 mg', 
'icode 12.diclofenac inj', 
'icode 13.nabumetone tab',   
'icode 14.parecoxib')) as `n-said`
from opitemrece o
where o.vstdate between '2011-10-01' and '2012-03-31' and o.vn is not null
group by o.hn,o.vn
having    `n-said`>1
order by o.hn,o.vn desc

หรือ

กำหนดใน ทะเบียนเวชภัณฑ์ของยาว่าอยู่ใน category 'n-said' ซึ่งย่อมาจาก 'NON-STEROIDAL ANTI-INFLAMMATORIES'

อ้างถึง
select o.hn,o.vn,sum(icode in (select d.icode from drugitems d where d.drugcategory like '%NON-STEROIDAL ANTI-INFLAMMATORIES%')) as `n-said`
from opitemrece o
where o.vstdate between '2011-10-01' and '2012-03-31' and o.vn is not null
group by o.hn,o.vn
having    `n-said`>1
order by o.hn,o.vn desc
[/quot]

69
ก็ยังไม่ได้นะครับ

คือผมต้องการให้เวลาเราคำนวณค่าออกมาเป็น สมมมุติว่า datecount = 10 ในค่า 10 นี้ไม่ให้นับวันหยุดที่อยู่ในตาราง holiday นะครับ

day(i.receive_chart_date_time)-day(i.dchdate) as datecount ตรงนี้นะครับ ทำไงให้ไม่เอาวันหยุดมาคำนวณด้วยนะครับ
อ้างถึง
แต่ตารางวันหยุดต้องมีวันหยุดครบนะครับ
โค๊ด: [Select]

day(i.receive_chart_date_time)-day(i.dchdate) as `นับรวมวันหยุด`,
(select count(x.*) from holiday x
where x.holidaydate between i.dchdate and i.recive_chart_date_time) as `นับวันหยุด`,
day(i.receive_chart_date_time)-day(i.dchdate)-
(select count(x.*) from holiday x
where x.holidaydate between i.dchdate and i.recive_chart_date_time) as `ไม่นับวันหยุด`

70
ลองใช้ ifnull() ดู
เช่น
select ifnull(null,0)+1 as 'sum'


ลองแล้วไม่ได้ผลครับ ยังออกมาเป็น Null เหมือนเดิม เจอปัญหานี้เหมือนกันบ่อยครั้งเลยที่จนปัญญา
ของผมใช้งานเกี่ยวกับรายงานยกตัวอย่างนะครับ การดึงอาหารที่สั่งจาก ipd ของโรงพยาบาลผม คนนึงสั่ง1อย่างมี 2อย่างมี ผมเลย ใช้ select ซ้อน select โดยตัวแรก limit 0,1 ตัวที่ 2  limit 1,1 แล้วเอาทั้งคู่มา concat(ตัวแรก,"/",ตัวที่ 2) ผลคือคนที่มีอาหาร 2 รายการปกติดี แต่คนที่มีรายการเดียวกลายเป็น Null ไปซะ เพราะ Null จากรายการที่ 2 concat ไม่ได้ จึงอยากทราบวิธีเหมือนกันครับว่า ถ้าcolumที่มีให้ค่า null ให้แสดงค่า "xxx" ต้องทำไงครับ ช่วยทำบุญแผ่ความรู้แด่ผู่โง่เขลารายนี้ด้วยเทิญ ^_^ 

โค๊ด: [Select]
ใช้ได้ใน mysql นะครับ
 concat(if(A is null,"",A), if(B is null,"",B) )



71
ยินดีต้อนรับ / HOSxP 3.55.1.11 มาแล้วนะครับ
« เมื่อ: มกราคม 11, 2012, 13:22:00 PM »
HOSxP 3.55.1.11 มาแล้วนะครับ  :) :)
Change Log
- แก้ไข bug รหัสแพทย์สั่ง Lab ล่วงหน้า
- เพิ่มตัวเลือกใน System setting การส่งข้อมูลตรงเบิกเงินชดเชยยา สปสช. (Dispensing drug)
- ปรับปรุงระบบรักษาความปลอดภัยของ Datacenter เกี่ยวกับนโยบายการเปลี่ยนรหัสผ่าน ต้องเปลี่ยนทุก 7 วัน และถ้าลืมระบบจะส่งรหัสผ่านไปให้ผ่านทางระบบ SMS (ช่วงนี้ใช้ free ผ่าน gateway ของ BMS ไปได้ก่อนครับ)
- ปรับปรุงระบบ Refer online
- ปรับปรุงระบบ Inventory
- ปรับปรุงระบบบัญชี 2
- เพิ่ม Lab link urine_albumin และ urine_creatinine
Rev.b
- ปรับปรุงระบบส่งข้อมูล 21 แฟ้ม / oppp nhso ให้ส่งข้อมูลจากหัตถการแพทย์แผนไทย

http://hosxp.net/bms/HOSxP_Upgrade_3.55.1.11b.exe

72
เนื่องจาก รพ.ของผมมีคนไข้ไม่มาตามนัดประมาณ 2000 กว่าราย ทางเวชระเบียนจึงของความช่วยเหลือมายังศุนย์คอม
ทางกระผมเลยใช้วิธีคำสั่ง

insert into ovstdiag(vn,icd10,hn,vstdate,vsttime,hcode) select vn_stat.vn,vn_stat.pdx,vn_stat.hn,vn_stat.vstdate
,ovst.vsttime,vn_stat.hcode from vn_stat left outer join ovst on  vn_stat.vn=ovst.vn
 where vn_stat.vn like "5410%" and  vn_stat.pdx ="Z532"  and vn_stat.dx_doctor=""

แต่ติดที่ ovst_diag_id มีค่าซ้ำไม่ได้ ช่วยแก้โค๊ดหน่อยครับ

โค๊ด: [Select]
insert into ovstdiag(ovst_diag_id,vn,icd10,hn,vstdate,vsttime,hcode) 
select @x:=@x+1 as ovst_diag_id,vn_stat.vn,vn_stat.pdx,vn_stat.hn,vn_stat.vstdate
,ovst.vsttime,vn_stat.hcode from vn_stat left outer join ovst on  vn_stat.vn=ovst.vn  ,
(select  @x:=0 ) as a // เปลี่ยน 0  เป็น ovst_diag_id ที่มากสุดนะตอนนี้นะครับ

  where vn_stat.vn like "5410%" and  vn_stat.pdx ="Z532"  and vn_stat.dx_doctor=""
 

73
ตอนนี้ผมใช้ v.3.54.10.6 เรื่องมีอยู่ว่าบันทึกซ้ำการวัด BP ไม่ได้ครับผม โปรแกรมไม่บันทึกให้ และจะเก็บค่าสุดท้ายที่บันทึกไว้ครับผม ไม่ทราบจะต้องแก้ไขอย่างไรบ้างครับ

http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=23239.msg199318#msg199318
หรือ
update serial set serial_no=(select opdscreen_bp_id from opdscreen_bp  order by opdscreen_bp_id desc limit 1) where name ='opdscreen_bp_id'

74
รพ.เมืองปาน รับ ลูกจ้างชั่วคราว เจ้าหน้าที่คอมฯ
รายละเอียดยังไม่เสร็จเลยครับ
ใครพอมีแนวข้อสอบเกี่ยวกับ การดูแลซ่อมบำรุงคอมฯ บ้างครับ  ;D

75
ใช้งาน HOSxP ตั้งแต่ปี 49 ก็ล่วงเลยมาหลายปีเคยเช็ค Table ไม่เคย Check Table หลัง Check and Repair Table บ้างตารางมีปัญหาแก้ไขอย่างไรดีครับ


hospcrh.xray_template check warning 1 client is using or hasn't closed the table properly
hospcrh.village_temple_type check warning 1 client is using or hasn't closed the table properly
hospcrh.village_temple check warning 1 client is using or hasn't closed the table properly
hospcrh.vn_lock check warning 2 clients are using or haven't closed the table properly
hospcrh.village_temple_type check warning 1 client is using or hasn't closed the table properly
hospcrh.village_temple check warning 1 client is using or hasn't closed the table properly
hospcrh.serial check warning 2 clients are using or haven't closed the table properly
hospcrh.report_access_log check warning 2 clients are using or haven't closed the table properly
hospcrh.pttype_log check warning 2 clients are using or haven't closed the table properly
hospcrh.patient_log check warning 2 clients are using or haven't closed the table properly
hospcrh.patient_image check warning 2 clients are using or haven't closed the table properly
hospcrh.patient_emr_log check warning 2 clients are using or haven't closed the table properly
hospcrh.opitemrece_log check warning 2 clients are using or haven't closed the table properly
hospcrh.opitemrece_finance_log check warning 2 clients are using or haven't closed the table properly
hospcrh.lab_order_image check warning 2 clients are using or haven't closed the table properly
hospcrh.lab_entry_log check warning 2 clients are using or haven't closed the table properly
hospcrh.lab_access_log check warning 2 clients are using or haven't closed the table properly
hospcrh.ksklog check warning 2 clients are using or haven't closed the table properly
hospcrh.ipt_diagnosis_log check warning 1 client is using or hasn't closed the table properly
hospcrh.ipt_chart_location_log check warning 2 clients are using or haven't closed the table properly
hospcrh.house_image check warning 2 clients are using or haven't closed the table properly
hospcrh.hnlock check warning 2 clients are using or haven't closed the table properly
hospcrh.er_image check warning 2 clients are using or haven't closed the table properly
hospcrh.doctor_order_print check warning 2 clients are using or haven't closed the table properly
hospcrh.anlock check warning 2 clients are using or haven't closed the table properly

ขอบคุณทุกความช่วยเหลือ
ตารางถูกใช้งานอยู่เลยไม่สามารถ check ได้ครับไม่มีปัญหานี่ครับ

76
โรงพยาบาลเมืองปาน (ขนาด 30 เตียง) จังหวัดลำปาง โทร 054-276345-6
Server : ประกอบเอง Pentium D 3.0 GHz Ram 1 GB  HDDSATA 160 GB  Fedora 8.0 Linux MySQL 5.0.45
Client : windows XP Sp2
ขึ้นระบบ 1 มิ.ย.50
ท่าน chitvichai ไม่ Update MySQL สักหน่อยเหรอครับ

ปล.เปลื่ยนแล้วครับ :)

77

มีคำสั่งแบบไม่ใช้ตัวแปรไม๊ครับ ที่ดึง 1 คน มีหลายผล lab ในแถวเดียวกัน โดยดึงผ่านตัว sql น่ะครับ เผื่อไว้จะไปประยุกต์ใช้กับงานอื่นด้วยครับ

ขอบคุณครับ

ดึงผ่าน sql query ได้เลยครับ
แก้เฉพาะตัวแปรข้างบน
@a=วันที่เริ่มต้น
@b=วันที่สิ้นสุด
@c="ชื่อแลบ%" หรือ ถ้าเป็น "ncdlab%" หมายถึง ผลแลปตามคอลัม ncd ทั้งหมดมี fbs+chol+tri+...
@d=min ของผลแลปที่แสดง ถ้ากำหนด 0 หมายถึงไม่ระบุค่า min หรือ มากกว่า 0
@e=max ของผลแลปที่แสดง ถ้ากำหนด 0 หมายถึงไม่ระบุค่า max
@f="dm" หรือ "ht" หรือ "all" dm หมายถึง เบาหวาน ht หมายถึงความดัน all หมายถึง ไม่ระบุโรค

ลองดูครับนำไปประยุกต์ได้ครับ

โค๊ด: [Select]
set @a="2010-10-01";
set @b="2011-03-31";
set @c="ncdlab%";
set @d=6;
set @e=10;
set @f="all";
SELECT ovst.vstdate,month(ovst.vstdate) as mx,ovst.hn, concat(patient.pname,
 patient.fname, " ", patient.lname) as ptname,patient.moopart,
concat(patient.chwpart,patient.amppart,patient.tmbpart) as tbc,   
if(@f="all","ไม่ระบุโรค",concat(@f,"==",
ovstdiag.icd10)) as icd10,
if(@c <>"ncdlab%",lab_items_name_ref,"ncdlab") as labset,if(@c <>"ncdlab%",r.lab_order_result,"ncdlab") as lab,
 max(if(lab_items_name_ref like "fbs%",r.lab_order_result,0)) as fbs,
 max(if(lab_items_name_ref like "choles%",r.lab_order_result,0)) as `Cholesterol`,
 max(if(lab_items_name_ref like "trigly%",r.lab_order_result,0)) as `Triglyceride`,
 max(if(lab_items_name_ref like "hdl%",r.lab_order_result,0)) as HDL,
 max(if(lab_items_name_ref like "ldl%",r.lab_order_result,0)) as LDL,
 max(if(lab_items_name_ref like "Urine albumin%",r.lab_order_result,0)) as `Urine albumin`,
 max(if(lab_items_name_ref like "Micro Albumin Urine%",r.lab_order_result,0)) as `Micro Albumin`,
 max(if(lab_items_name_ref like "hba1%",r.lab_order_result,0)) as Hba1c,
 max(if(lab_items_name_ref like "bun%",r.lab_order_result,0)) as Bun,
 max(if(lab_items_name_ref like "Creatinine%",r.lab_order_result,0)) as Creatinine



FROM  ovst left outer join ovstdiag ON ovst.vn = ovstdiag.vn
left outer join lab_head l on l.vn=ovst.vn
left outer join lab_order r on l.lab_order_number=r.lab_order_number
left outer join patient   ON patient.hn = ovst.hn

WHERE ovst.vstdate Between @a And @b
AND ((@f="dm" and ovstdiag.icd10 Like "E1%") or (@f="ht" and ovstdiag.icd10 Like "I10%") or (@f="all")) and

((@c="ncdlab%" and (lab_items_name_ref like "fbs%"
or lab_items_name_ref like "chol%"
or lab_items_name_ref like "tri%"
or lab_items_name_ref like "hdl%"
or lab_items_name_ref like "ldl%"
or lab_items_name_ref like "urine%"
or lab_items_name_ref like "micro%"
or lab_items_name_ref like "%micro%"
or lab_items_name_ref like "hba1%"
or lab_items_name_ref like "creati%"
or lab_items_name_ref like "bun%"


)  )
or (@c <>"ncdlab%" and lab_items_name_ref like @c) )

and
r.lab_order_result > 0 and ((@d=0 or r.lab_order_result >= @d) and (@e=0 or r.lab_order_result <= @e))
group by tbc,moopart,hn,ovst.vn
order by tbc,moopart,mx,hn,ovst.vn


78
ลองทำดูแล้วไม่ได้ครับตามรูปครับ
hn_ward เป็น ตัวแปร ไม่ใช่ฟิล์ด
น่าจะเป็น
Value :=GetPatientAddress ('"'+hn_ward+'"');
มากกว่า

Value :=GetPatientAddress (hn_ward); ได้เลยครับลองดู
หรือ ไม่ต้องผ่านตัวแปรครับ
Value :=GetPatientAddress (GetSQLStringData('select hn from ipt where hn="'+DBPipeline['name2']+'"'));

79
ตรวจสอบตามรูปครับ สิทธที่ใช้โอนไป person นั้นอยู่ที่ patient [หน้าจอลงทะเบียน] ไม่ใช่หน้าส่งตรวจนะครับ

81
โค๊ด: [Select]

< ?php
$location="/home/jgoddard/Desktop/images/";

$db = mysql_pconnect("localhost","user","password");
mysql_select_db("images",$db);

$sql="SELECT imageid, image from images";

$rs = mysql_query($sql,$db);

echo "<h2>EXPORTING INTO $location</h2>";
$counter=0;
while ($row=mysql_fetch_object($rs)) {
$filename=$location.$row->imageid.”.jpg”;
$file=fopen($filename,’w');
if (fwrite($file,$row->image)) {
echo $filename.”<br />”;
$counter++;
}
}

echo “<h2>$counter images exported</h2>”;
? >

82
มี Version ใหม่แล้วนะครับ

สามารถสร้าง Replication slave ได้แบบอัตโนมัติเลยครับ  ;D

ของผมดิดปัญหาตอน mysql ของ main มีการตั้งรหัสของ root@localhost ไว้
อยากให้มีการระบุ รหัสผ่านตอนเชื่อมต่อเป็น ตามที่กำหนดไว้ได้ไหมครับ

83
เราต้องเปลี่ยนตอน query
โดย ใช้ as `ชื่อฟิลด์ที่ต้องการแสดง`
อย่างเช่น select concat(pt.pname,pt.fname," ",pt.lname) as `ชื่อ สกุล` from patient pt
ชื่อฟิลด์เสมือน หลังคำสั่ง as ถ้าต้องการภาษาไทย หรือ ช่องไฟ หรือ คำสงวนต้องใช้ alt 96 ` เปิด และ ปิด ชื่อฟิลด์เสมือน


84
Report Exchange / Re: ถามการเขียนใน Oncreate ครับ
« เมื่อ: มีนาคม 31, 2011, 10:30:57 AM »
ต้องอาศัย from pascal รับข้อมูลเก็บในตาราง tempreport ก่อนแล้วค่อย query ใน oncreate ดังนึ้ครับ

procedure GlobalOnCreate;
begin
   sql:='select o.vstdate,concat(p.pname,p.fname," ",p.lname) as ptname ,o.vsttime ' +
        ' from ovst o ' +
        ' left outer join vn_stat v on v.vn = o.vn ' +
        ' left outer join patient p on p.hn = o.hn ' +
        ' where o.vstdate in(select date1 from tempreport where reportname="test4date" and id="11157") '+
        ' and o.pt_subtype = "'+GetUserParameter(0)+'" ' +
        ' order by o.vstdate,o.vsttime ';
     ChangeReportSQL(sql);
end;

85
ลอง

select p.*,pt.hn from ptcardno p left outer join patient pt on p.hn=pt.hn where pt.hn is null

ไปรันดูครับว่ามี หรือเปล่า

มีข้อมูลครับ แล้วต้องทำไงต่อครับ  :'(
แสดงว่า ในตาราง patient มีการลบข้อมูลคนไข้โดยไม่ลบ ใน ptcardno ทำให้ เมื่อกับมาบันทึกใหม่ระบบจะฟ้องว่ามีการใช้ cid ไปแล้ว การแก้ไขเบื่องต้นตรวจสอบ hn ใน ptcardno ว่ามีการใช้อยู่หรือเปล่า
ถ้าไม่มีการใช้แล้วก็ลบข้อมูลใน ptcardno ได้เลยครับ

86
ลอง

select p.*,pt.hn from ptcardno p left outer join patient pt on p.hn=pt.hn where pt.hn is null

ไปรันดูครับว่ามี หรือเปล่า

87
ผมนำเข้าไม่ได้ครับ error

EurekaLog 6.1.01

Application:
-------------------------------------------------------
  1.1 Start Date      : Thu, 24 Feb 2011 09:06:12 +0700
  1.2 Name/Description: HOSMy_RPTBuilder.exe
  1.3 Version Number  : 3.54.2.10
  1.4 Parameters      :
  1.5 Compilation Date: Thu, 10 Feb 2011 10:50:50 +0700
  1.6 Up Time         : 16 seconds

Exception:
-----------------------------------------------------
  2.1 Date          : Thu, 24 Feb 2011 09:06:28 +0700
  2.2 Address       : 004A9A20
  2.3 Module Name   : HOSMy_RPTBuilder.exe
  2.4 Module Version: 3.54.2.10
  2.5 Type          : EDatabaseError
  2.6 Message       : fcds: Field 'name' not found.
  2.7 ID            : 8FD6
  2.8 Count         : 1
  2.9 Status        : New
  2.10 Note         :
  

จากรูปน่าจะ นำเข้าใน HOSMy_RPTBuilder.exe หรื่อเปล่า ถึงได้ error ดังภาพ
ใช้ mysql query appen เข้าตาราง holiday ครับ ไม่ใช่ report design import

88
โค๊ด: [Select]
select vn.hn,concat(pt.pname,pt.fname,'  ',pt.lname)as name,vn.age_y,vn.pdx,vn.dx0,vn.dx1,vn.dx2,vn.dx3,vn.dx4,vn.dx5 from vn_stat vn
left outer join patient pt on vn.hn = pt.hn

where vn.vstdate between '2011-01-01' and '2011-01-31'
and vn.pdx in ('E10','E101','E102','E103','E104','E105','E106','E107','E108','E109'
,'E11','E110','E111','E112','E113','E114','E115','E116','E117','E118','E119','E162','R739')
and ( vn.dx0 in('E781','E785')
or vn.dx1 in('E781','E785')
or vn.dx2 in('E781','E785')
or vn.dx3 in('E781','E785')
or vn.dx4 in('E781','E785')
or vn.dx5 in('E781','E785') )

group by vn.hn
limit 10

89
นอกเรื่อง / Re: วันนี้วันเกิดพี่กิจ ครับ
« เมื่อ: มกราคม 21, 2011, 10:01:11 AM »
สุขสันวันเกิดครับ คิดอะไรก็ขอให้
     ::)สมหวังนะ  . . . ครับผม

90
ผมลองแก้ SQL ใบผลแล็บ ใน Form รายงาน FORM-LabReport1 และ FORM-LabReport2
แล้ว ลองหา VN มาใส่แล้ว Preview ดูใน Report Designer แล้ว
ข้อมูลก็ออกมาเป็นปกติครับ  แต่สั่งจากในโปรแกรมแล้ว หน้าต่าง Preview ก่อนปริ้นท์
แสดงเป็นหน้าว่างๆ ออกมาครับ ก็เลยอาจเป็นสาเหตุให้ปริ้นท์ไม่ออกก็ได้ครับ
เท่าที่เดาดูนะครับ   ???

แต่เรื่องใบนัดสามารถเลือกฟอร์มปริ้นท์ได้ เลยจบไป เหลือเรื่องใบผลแล็บ
เรื่องเดียวครับ  ???

ผมลองทำใบนัดขึ้นใหม่ แล้วเลือกฟอร์มเอา ปริ้นท์ออกครับ
แต่ Lab ยังไม่เคลียร์ครับ

ลองเปลี่ยนค่า parameter เป็นค่าอื่น ทีี่มีในฐานข้อมูลของเราของตารางที่ join ไว้บ้างหรือยังครับ แล้ว save ใหม่   และ ออกจากโปรแกรมอีกทีก่อนสั่งพิมพ์

ฟอร์ม FORM-LabReport1 โปรแกรมจะส่ง parameter เป็น lab_head.lab_order_number ครับไม่ใช่ vn
ฟอร์ม FORM-LabReport2 โปรแกรมจะส่ง parameter เป็น lab_head.vn and lab_head.form_name ครับ

91
Development / Re: HOSxP 3.53.12.29b
« เมื่อ: มกราคม 01, 2011, 10:38:14 AM »
ไม่ทราบใครเป็นเหมือนผมบ้าง ;)
ที่ ห้องตรวจ ใช้ กด ENTER ใช้ HN ไม่ได้ครับ
ต้องกด  0 นำหน้าที่รายเลยครับ แพทย์บ่น มา ครับ

92
ดูรายการใบสั่งยาที่มีรายการยามากกว่า 10  รายการ
โค๊ด: [Select]
select o2.cc,o.* from opitemrece o inner join
(select x.vn,count(x.icode) as cc from opitemrece x
 inner join drugitems d on x.icode=d.icode
where x.an is null and x.vstdate between '2010-10-01' and '2010-10-31'
group by x.vn having cc > 10 ) o2 on o.vn=o2.vn

93
นอกเรื่อง / Re: อาลัยกับการจากไปของ Admin HOSxP
« เมื่อ: พฤศจิกายน 05, 2010, 13:40:04 PM »
 :'( :'( :'( แสดงความเสียใจจริง ๆ ครับ

94
MySQL / Re: อยากได้คำสั่ง mysql แบบตั้งเวลา เฉพาะ Table
« เมื่อ: พฤศจิกายน 02, 2010, 15:25:52 PM »
เป็น bat ไฟล์ใช้แทน initial import

95
 ;D 15000 + ไปแน่ ๆ
 :)
ไกล้บ้าน 555

96
HOSxP PCU / Re: JHCIS to Hosxp_PCU
« เมื่อ: กุมภาพันธ์ 03, 2010, 09:01:37 AM »
รพ.เมืองปาน hosp11157@yahoo.com ขอด้วยครับ

97
ตอนนี้ E-claim 1.0.18.0 ออกให้ Download แล้งครับ  ;D

98
ยินดีต้อนรับ / Re: เป็นกำลังใจให้ อ.mn
« เมื่อ: ตุลาคม 24, 2008, 10:57:54 AM »
 ;D ;D เห็นด้วยกับความเห็นทุกความเห็นครับ เป็นกำัลังใจให้อีกคน ครับ  :D :D

99
Development / Re: CSMBS 2.3 !!!
« เมื่อ: ตุลาคม 17, 2008, 15:15:07 PM »
ผมกดลง ค่าใช้จ่ายไม่ได้ เลย ครับ พอกดไปเรื่อยๆเป้น ปุ่ม รีเซ็ท ครับ รพ ไหน ลงได้ ช่วยแนะ นำ หน่อยนะครับ 2.3 เนี้ย ครับ ไม่มี กดเพิ่มเลย งง มาก ครับ หรือต้องใช้ คีย์ ลัด


100
ลอง setup เป็นเวอร์ชัน mysql แล้ว
ใช้ mysql บน linux พบปัญหา
ตารางใน linux จะมี err เกี่ยวกับ ชื่อ ตาราง ต้องเป็นตัว พิมพ์ใหญ่

ต้อง start mysql ใน linux โดยต้องเพิ่มคำสั่ง --lower_case_table_names=1

 ;) ;)โอ ชัยน้องรัก  พึ่งโผล่มา  ดักซุ่มอ่านเก็บกระทู้เสียนาน น่าจะมาตั้งนานแล้ว ;D ;D

 ??? ???ชัย  อธิบายให้ชัดเจนอีกหน่อย  พี่อ่านแล้วต้องตีความ ตกลงจะโพสตอบกระทู้
       หรือว่าแนะนำMysql ??? ???

      ;D ;D  พี่ขอถามอีกหน่อย ชัยแก้ Mysql แล้ว นำเข้า 18 แฟ้มได้ไหม ;D ;D
ลองแล้วนำเข้า 18 แ ฟ้ม ไ ม่ได้เช่นกันครับ
ตาม ....
E-Claim 1.0.0.16 จากที่ Staff BMS ประสานงานกับ สปสช. ได้ความว่ายังนำเข้า 18 แฟ้มไม่ได้นะครับ อาจจะได้ใน E-Claim รุ่นหน้าครับ

หน้า: 1 [2] 3