แสดงกระทู้

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 - woravet

หน้า: [1] 2 3 ... 9
1
ถ้าเป้นแบบนี้..ยอด an_stat.rcpt_money ก้อไม่ถูกต้องซิคับ
แล้วความหมายของฟิล์ด rcpt_money คืออะไรคับ

2
เกิดจากสาเหตุใดคับ...หรือเป็น bug
แต่ an_stat.rcpt_money เท่ากับ sum(rcpt_print.bill_amount)
แต่มีการจ่ายด้วยบัตรเครดิตร่วมด้วย

3
อยากให้มีการตรวจสอบตารางว่าเป็น base table หรือ view
ก่อนทำการ replicate หรือ backup หรือ transferdata
เพื่อป้องกันการ error หรือไม่พบตารางดังกล่าว

4
สามารถใช้ GetGlobalValue(parameter) หาได้มั๊ยคับ
มีวิธีใช้บางมั๊ยคับ
parameter มีอะไรบ้าง
เท่าที่เห็น VN,CURRENT_COMPUTER,CURRENT_DEPCODE

6
อยากเขียน vn script ให้แต่ละฟอร์ม
หรือตรวจสอบว่า ฟอร์ม ที่เปิดอยู่ชื่ออะไร
เช่น ฟอร์มส่งตรวจผู้ป่วยนอก ฟอร์มโต๊ะทำงานซักประวัติ หรือ ฟอร์มโต๊ะทำงานตรวจรักษา
ถ้าไม่ได้เปิดฟอร์มเหล่านี้..vn script ไม่ต้องทำงาน
ตอนนี้ตรวจแค่การ login ว่า user อะไร dep ไหน

7
ก้อ..deliver_type=4=ไม่คลอด...ไม่ใช่เหรอคับ
ไม่น่าจะต้องถูกตรวจสอบ..ใช่มั๊ยคับ

8
จากรูป ตรวจสอบบัญชี 2 จากส่วนไหนได้บ้าง

9
โปรแกรม BMSWebSocketFingerFaceReader
ใช้กับ windows version ไหนคับ
ใช้กับ fingerscan รุ่นไหนได้บ้าง

10
การเขียน SQL Script / Re: แสดงผลเป็นเดือน
« เมื่อ: ธันวาคม 18, 2020, 12:23:24 PM »
select count(*) cc from an_stat where year(regdtae)=2020 and month(regdate)=10 and dchdate is null

11
format(sum(ov.income),2)

12
select o.*
from ovst o
left join lab_head lh on lh.vn=o.vn
where o.vstdate between '2020-1-1' and '2020-1-1'
and lh.vn is null

13
น่าจะเลือกส่วนนี้

14
HOSxP PCU / Re: รบกวนสอนเขียนคำสั่ง SQL ใน PCU ทีครับ
« เมื่อ: มิถุนายน 28, 2018, 18:41:35 PM »
select v.vn,v.hn,v.vstdate,v.age_y age
,pdx,dx0,dx1,dx2,dx3,dx4,dx5
,icd10tm_operation_code icd10tm
from vn_stat v
join dtmain dt on dt.vn=v.vn
join dttm tm on tm.code=dt.tmcode
where v.vstdate between '2017-10-1' and '2018-6-30'
and v.age_y=12
and icd10tm_operation_code in ('2330011','2338610')
*****
กรุณาถามโจทย์ที่ชัดเจน
เช่น หัตถการนี้..เป็นหัตถการของทันตกรรม เป้นต้น

15
MySQL / Re: คำสั่งดึงข้อมูลล่าสุด
« เมื่อ: มิถุนายน 19, 2018, 09:50:32 AM »
ลองใช้ของ opdscreen
select s.hn
,substring_index(group_concat(distinct s.vstdate order by vn desc),',',1) vstdate
,substring_index(group_concat(hba1c order by vn desc),',',1) hba1c
from opdscreen s
where s.vstdate between '2017-10-1' and '2018-9-30'
and s.hba1c>0
group by s.hn

16
ตรง warning using a password on the command line interface can be insecure ครับ
ปกติ ... ต้องไม่ขึ้นอะไร กลับมาที่ prompt

17
ผม restore ด้วย mysql.exe แล้วขึ้น error แบบนี้
พอมีวิธีแก้ไขบ้างมั๊ยคับ

18
ให้ support กับ mysql server

19
ฟิล์ด promote_visit ในตาราง ovst_seq
เกิดจากการประมวลผลด้วยเงื่อนไขอะไร
จึงจะมีค่าเท่ากับ Y

20
จำนวนผู้ป่วย PP
ที่ ovst_seq->promote_visit='Y'
เกิดจากเงื่อนไขอะไรบ้าง...หรือคำนวณจากอะไรครับ

21
ลองตรวจสอบเบื้องต้น
pttype->round_money ถ้ามีเป็น null
จะมีค่าเท่ากับ Y คือ ปัดเศาราคา
แต่ตรง ติ๊ก ปัดเศษราคา จะไม่ถูกติ๊ก
อาจเป็น bug

22
ค่าใช้จ่าย คือ vn_stat.income
รวม คือ qty*unitprice
ทั้งที่เราไม่ติ๊กปัดเศษราคา..แต่ income ยังปัดเศษ
หรือเข้าใจผิดตรงไหนรึป่าว

23
ตรวจสอบ parameter ของรายงานดีๆคับ
Doc. อาจใช้ค่าของ VN ไม่ได้ใช้ค่าของ Lab_Order_Number

24
ไม่ทราบรายละเอียดการตาย ของ บัญชี 1 Person
ไม่ยอมบันทึก...ทั้งที่ ติ๊ก ไว้
พอเปิดมาดูใหม่..ไม่ปรากฏขึ้น
เหมือนทะเบียนของ patient

25
set @ds:=curdate();
select @ds type,'' cc
union
select 'OPD',(select count(*) from ovst where vstdate=@ds) cc
union
select 'Admit',(select count(*) from ipt where regdate=@ds) cc
union
select 'Stay',(select count(*) from ipt where dchdate is null) cc
union
select 'Stay ICU',(select count(*) from ipt where dchdate is null and ward in (select ward from ward where name regexp 'ICU')) cc

26
ตรวจสอบกับ service ด้วยคับ
ว่ามี error อะไรมั๊ย

27
แก้ข้อความ popup 506 ได้มั๊ยคับ

28
สร้าง popup ห้องตรวจแพทย์ลง dx ชื่ออะไรคับ
อยากให้ขึ้นตอนลงรหัส เหมือนเตือน popup 506
sys_vn_script ก้อจะขึ้นที่หลังการบันทึกสิ้นสุด

29
Report Exchange / Re: รายงาน color chart DM HT
« เมื่อ: ตุลาคม 09, 2015, 10:19:53 AM »
color chart ไม่เอาผล cholesterol มาคำนวณ ทำไมเหรอ?
ให้คำนวณจากรูป chart ข้างล่าง
โดยไมมีผล cholesterol เหรอ
*****
ตรงแถบสีแดง เปลี่ยนเป็น has="N"

30
1.คิวรี่หา HN ที่ pdx = F900
2.คิวรี่หา HN ที่ pdx = F910 หรือ F910
แล้วมาเทียบกัน ว่า ข้อ(1) กับ (2) มี HN ตรงกัน
ก้อจะได้ HN ที่เปลี่ยนแปง pdx
*****
FB:วรเวทย์ เอี่ยมพร/woravet12@hotmail.com

31
Report Exchange / Re: รายงาน color chart DM HT
« เมื่อ: ตุลาคม 05, 2015, 18:15:01 PM »
คลิ๊กขวาที่ variable ที่ column Cholesterol เลือก visible
หรือ ลบ variable นั้นออกไปเลย
*****
ไม่ต้องการผล อย่างไงคับ

32
patient_hospital_officer->is_officer='Y'

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

34
select oo.icode,concat(d.name," ", d.unit) name
,sum(oo.qty) qty,sum(oo.sum_price) sum_price
from opitemrece oo
join nondrugitems d on oo.icode=d.icode
left join income inc on inc.income=oo.income
where oo.vstdate between '2015-1-1' and '2015-1-31'
and inc.income_group=12
group by d.icode
order by sum_price desc
ตาราง nondrugitems ของผมไม่มีฟิล์ด strength,units

35
select left(rcpno,locate(':',rcpno)-1) No
,min(rcpno) minNo,max(rcpno) maxNo

from rcpt_print a
join inc_opd_stat i on a.vn=i.vn
where i.vstdate between '2006-11-1' and '2006-11-30'
group by no

36
select n.name,count(distinct o.hn) as PERSON
,count(distinct if(o.vn is null,o.an,o.vn))as VISIT
,sum(o.sum_price) as Total
,sum(if(o.paidst in (01,03),o.sum_price,0)) OK
,sum(if(o.paidst not in (01,03),o.sum_price,0)) NO
from opitemrece o
left outer join patient p on p.hn=o.hn
left outer join nationality n on n.nationality=p.nationality
where vstdate between "2014-10-01" and "2015-09-30"
and p.nationality <> "99"
group by p.nationality

37
ลองคิวรี่นี่ดู
select v.village_moo,v.village_name
,count(distinct p.person_id) cc
,count(distinct if(pv1.export_vaccine_code="073"
or pv2.export_vaccine_code="073",p.person_id,null)) mmr
from village v
left join person p on v.village_id=p.village_id

left join person_vaccine_list pl on p.person_id=pl.person_id
left join person_vaccine pv1 on pv1.person_vaccine_id=pl.person_vaccine_id

left join (select o.hn,ov.person_vaccine_id from ovst o
join ovst_vaccine ov on ov.vn=o.vn) ov on ov.hn=p.patient_hn
left join person_vaccine pv2 on pv2.person_vaccine_id=ov.person_vaccine_id

where v.village_moo<>0
and p.birthdate between "2008-06-01" and "2012-01-31"
and p.house_regist_type_id in (1,2,3) /*ไม่แน่ใจบ้านว่าแค่ 1,3 รึป่าว*/
and p.death<>"Y"
group by v.village_moo
order by cast(v.village_moo as signed)

เพราะอาจจับแค่ ovst_vaccine ยังขาด person_vaccine_list รึป่าว

38
select o.rxdate,count(o.icode) All_Drug
,sum(d.drugaccount<>'' or d.drugaccount is not null) NED_Drug
from opitemrece o
join drugitems d on d.icode=o.icode
where o.rxdate between '2014-10-01' and '2014-10-31'
and o.an is null
group by rxdate

39
select i.an,i.hn,concat(pt.pname,pt.pname,' ',pt.lname) ptname,pt.cid
,i.regdate,i.regtime,i.dchdate,i.dchtime
,inc.income_group income,g.name incomename
,oo.icode,concat(d.name,' ',d.strength) drug
,sum(oo.qty) qty
,oo.unitprice
,sum(if(oo.paidst=02,oo.sum_price,0)) 'OK'
,sum(if(oo.paidst<>02,oo.sum_price,0)) 'NOK'
,sum(oo.sum_price) total
from ipt i
join opitemrece oo on oo.an=i.an
join patient pt on i.hn=pt.hn
left join income inc on inc.income=oo.income
left join income_group g on inc.income_group=g.income_group
join s_drugitems d on oo.icode=d.icode
where  i.an=580000001
group by oo.icode
order by income

40
select s.vn,o.an,s.hn,concat(pt.pname,pt.fname," ",pt.lname) ptname
,s.vstdate,s.bmi,s.bw,s.height
from (
select  max(vn) vn
from opdscreen
where vstdate between "2014-10-01" and "2015-03-31"
and bmi between 25 and 29.9
group by hn) a
join opdscreen s on s.vn=a.vn
join patient pt on pt.hn=s.hn

41
รพ.บึงสามัคคี จ.กำแพงเพชร ครับ ติดตั้งแล้ว แต่ยังไม่ได้ใช้ครับ ทดสอบอยู่ครับ
รพ.บึงสามัคคี 14135 ครับ

42
น่าจะ

43
มีสูตร
height_level
ืีnutrition_level บ้างมั๊ยคับ

45
รายเดือน แก้ (a.date) เป็น month(a.date)
รายปี แก้ (a.date) เป็น year(a.date)
ดูช่วงเวลาด้วยนะคับ

47
set @ds1:='2013-10-1',@ds2:='2014-9-30';
select 'รายวัน' type,round(avg(opd)) OPD,round(avg(ipd)) IPD
from (select (a.date) MyGroup,sum(type='OPD') OPD,sum(type='IPD') IPD
from (select  o.vstdate date,o.vn,o.hn,null as an,'OPD' type
from ovst o
where o.vstdate between @ds1 and @ds2
union all
select i.regdate,null as  vn,i.hn,i.an,'IPD' type
from ipt i
where i.regdate between @ds1 and @ds2) a
group by MyGroup) a

48
ตรวจสอบจำนวนวันลากลับบ้าน(LeaveDay)

49
select year(vstdate) year,month(vstdate) month
,date(date_format(vstdate,'%Y-%m-01')) firstday
,last_day(vstdate) lastday
,if(month(vstdate) in (10,11,12),1
,if(month(vstdate) in(1,2,3),2
,if(month(vstdate) in(4,5,6),3
,if(month(vstdate) in(7,8,9),4,0)))) TriMonth
from ovst
where vstdate between '2012-10-1' and '2013-9-30'
group by month
order by year,month

50
เห็นด้วยอย่างยิ่งครับ

หน้า: [1] 2 3 ... 9