BMS-HOSxP Community

HOSxP => Report Exchange => ข้อความที่เริ่มโดย: classical ที่ พฤศจิกายน 14, 2010, 20:21:27 PM

หัวข้อ: คุณอี้ รพ.พรเจริญครับ ช่วยอธิบายคำสั่ง นับจำนวนคนไข้ใน จาก Repor ตัวนี้ ด้วยครับ
เริ่มหัวข้อโดย: classical ที่ พฤศจิกายน 14, 2010, 20:21:27 PM
จาก Variable 1

if FormatDateTime('yyyy-mm-dd',CurrentDate) >= mm10 then

value := GetSQLIntegerData('select count(distinct an) as cc from an_stat '+
         'where regdate <= "'+em10+'" and (dchdate >= "'+mm10+'" or dchdate is null) and ward = "01" ')
else

value := 0 ;

จาก Report รายงานสรุปผลงานประจำเดือนตามตัวชี้วัด งานผู้ป่วยใน
อ้างอิง http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=11515.0 (http://hosxp.net/index.php?option=com_smf&Itemid=28&topic=11515.0)

หัวข้อ: Re: คุณอี้ รพ.พรเจริญครับ ช่วยอธิบายคำสั่ง นับจำนวนคนไข้ใน จาก Repor ตัวนี้ ด้วยครับ
เริ่มหัวข้อโดย: classical ที่ พฤศจิกายน 14, 2010, 20:31:16 PM
อ้างอิง ที่มา ครับ
Declare   
     Fyear  ,year: string;
     year_previous :string;

     bedcount:integer;
     admdate,x,y,md1,md2,md3:integer;
     daycount:integer;
     a,b,c,d,e,f,g,h,z:Double;
     
     d1 , d2 : Tdatetime;
     ds1,ds2,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10,m11,m12 : string;
     mm1,mm2,mm3,mm4,mm5,mm6,mm7,mm8,mm9,mm10,mm11,mm12 : string;
     em1,em2,em3,em4,em5,em6,em7,em8,em9,em10,em11,em12 : string;


Even   


      d1 :=GetSQLDateData('select min(vstdate) from ovst');
     d2 :=GetSQLDateData('select max(vstdate) from ovst');
     ds1 := formatdatetime('yyyy-mm-dd',d1);
     ds2 := formatdatetime('yyyy-mm-dd',d2);


     fyear := GetPickupList('select distinct(year(vstdate)) + 543 as cc  from ovst'+
    ' where vstdate between "'+ds1+'" and "'+ds2+'"'+
    ' order by cc Desc' );

     year := fyear;
     fyear := inttostr(strtoint(fyear) - 543) ;

     fyear := inttostr(strtoint(fyear) - 1) ;

     m10 := fyear+'-10-01" and "'+ fyear+'-10-31';
     mm10:= fyear+'-10-01';     
     m11 := fyear+'-11-01" and "'+ fyear+'-11-30';
     mm11:= fyear+'-11-01';
     m12 := fyear+'-12-01" and "'+ fyear+'-12-31';
     mm12:= fyear+'-12-01';

     em10:= fyear+'-10-31';
     em11:= fyear+'-11-30';
     em12:= fyear+'-12-31';
หัวข้อ: Re: คุณอี้ รพ.พรเจริญครับ ช่วยอธิบายคำสั่ง นับจำนวนคนไข้ใน จาก Repor ตัวนี้ ด้วยครับ
เริ่มหัวข้อโดย: classical ที่ พฤศจิกายน 14, 2010, 20:36:03 PM
ผมลองเช็คจากรายงานของ อี้

กับโปรแกรม  HosXP

( select count(ov.hn) as chn
from an_stat ov, ipt ovst
where ov.an=ovst.an and ov.dchdate between "2009-10-01" and  "2009-10-31"
 and ov.ward = "01" )



เห็นยอด (จำนวนคนไข้ใน) ไม่ตรงกันครับ
ขอบคุณสำหรับรายงานดีดี ยอดมาก ไม่ธรรมาเลยครับ
หัวข้อ: Re: คุณอี้ รพ.พรเจริญครับ ช่วยอธิบายคำสั่ง นับจำนวนคนไข้ใน จาก Repor ตัวนี้ ด้วยครับ
เริ่มหัวข้อโดย: por ที่ พฤศจิกายน 14, 2010, 21:19:56 PM
ปีงบประมาณ เลือกปีงบ 52 เป็นของเดือนตุลาปี 51 ใหมครับ ???
หัวข้อ: Re: คุณอี้ รพ.พรเจริญครับ ช่วยอธิบายคำสั่ง นับจำนวนคนไข้ใน จาก Repor ตัวนี้ ด้วยครับ
เริ่มหัวข้อโดย: Neo ที่ พฤศจิกายน 15, 2010, 07:50:34 AM
เป็นคำสังในการยกยอดผู้ป่วยในไปเดือนถัดไปครับ
หัวข้อ: Re: คุณอี้ รพ.พรเจริญครับ ช่วยอธิบายคำสั่ง นับจำนวนคนไข้ใน จาก Repor ตัวนี้ ด้วยครับ
เริ่มหัวข้อโดย: bannok ที่ มกราคม 13, 2011, 15:18:05 PM
ผมลองเช็คจากรายงานของ อี้

กับโปรแกรม  HosXP

( select count(ov.hn) as chn
from an_stat ov, ipt ovst
where ov.an=ovst.an and ov.dchdate between "2009-10-01" and  "2009-10-31"
 and ov.ward = "01" )



เห็นยอด (จำนวนคนไข้ใน) ไม่ตรงกันครับ
ขอบคุณสำหรับรายงานดีดี ยอดมาก ไม่ธรรมาเลยครับ


ผมก็ได้ยอดผู้ป่วยในไม่ตรงครับ