ผู้เขียน หัวข้อ: พบปัญหารายงานค่ารักษาพยาบาลผู้ป่วยใน (แยกประเภทรายวัน)  (อ่าน 3289 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ roxas

  • Jr. Member
  • **
  • กระทู้: 74
  • Respect: 0
    • ดูรายละเอียด
กำลังทดลอง version 2.49.10.20 ครับ เข้าเมนู รายงานค่ารักษาพยาบาล -> รายงานค่ารักษาพยาบาลผู้ป่วยใน (ชำระเงินแยกประเภท รายวัน) แล้วเกิดข้อความ error ดังนี้ครับ

EurekaLog 5.1.9

Application:
-------------------------------------------------------
  1.1 Start Date      : Sun, 22 Oct 2006 13:41:20 +0700
  1.2 Name/Description: HOSMy.exe
  1.3 Version Number  : 2.49.10.20
  1.4 Parameters      :
  1.5 Compilation Date: Fri, 20 Oct 2006 09:54:18 +0700

Exception:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  2.1 Date   : Sun, 22 Oct 2006 13:43:01 +0700
  2.2 Address: 007574B0
  2.3 Module : HOSMy.exe
  2.4 Type   : EOleException
  2.5 Message: SQL Error:_You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'declare @sdate char(10)
               set @sdate='2006-10-20'
               select distinct(i1.an+convert(' at line 1.

Active Controls:
--------------------------------------------
  3.1 Form Class   : TReportPrintForm
  3.2 Form Text    : Prepare to Print Report
  3.3 Control Class: TSeSkinButton
  3.4 Control Text :

Computer:
-------------------------------------------------------------
  4.1 Name          : PHAR2
  4.2 User          : Administrator
  4.3 Total Memory  : 511 Mb
  4.4 Free Memory   : 178 Mb
  4.5 Total Disk    : 39.06 Gb
  4.6 Free Disk     : 20.39 Gb
  4.7 System Up Time: 1 day, 21 hours, 26 minutes, 17 seconds
  4.8 Processor     : Intel(R) Pentium(R) 4 CPU 3.00GHz
  4.9 Display Mode  : 1024 x 768, 32 bit

Operating System:
------------------------------------
  5.1 Type    : Microsoft Windows XP
  5.2 Build # : 2600
  5.3 Update  : Service Pack 2
  5.4 Language: Thai

Network:
---------------------------------
  6.1 IP Address: 172.020.055.004
  6.2 Submask   : 255.255.255.000
  6.3 Gateway   : 172.020.055.250
  6.4 DNS 1     : 172.020.055.250
  6.5 DNS 2     : 000.000.000.000
  6.6 DHCP      : OFF           

Other Information:
---------------------------------------------------------------------------------------------------------------------------------------------------------------
  7.1 : Hospital Code = 11181 [รพช. สันติสุข]
        Database Type = MySQL
        Database Protocol = mysql-4.1
        Last 3 SQL Statement
        .
        No 1 = declare @sdate char(10)
        set @sdate='2006-10-20'
        select distinct(i1.an+convert(varchar(20),i1.incdate,121)+convert(varchar(20),i1.inctime,121))
        as id,i1.an as hn,i1.rcpno,i1.incdate,i1.inctime,
        rtrim(rtrim(pt.pname)+rtrim(pt.fname)+' '+rtrim(pt.lname)) as ptname,
        (select sum(rcptamt)  from incith where incith.an=i1.an and incdate=i1.incdate and inctime=i1.inctime and paidst='00') as money0,
        (select sum(rcptamt)  from incith where incith.an=i1.an and incdate=i1.incdate and inctime=i1.inctime and paidst='01') as money1,
        (select sum(rcptamt)  from incith where incith.an=i1.an and incdate=i1.incdate and inctime=i1.inctime and paidst='02') as money2,
        (select sum(rcptamt)  from incith where incith.an=i1.an and incdate=i1.incdate and inctime=i1.inctime ) as totmoney,
        (select pttype.name from pttype where pttype = (select pttype from ipt where ipt.an=i1.an and regdate=i1.incdate and regtime=i1.inctime)) as pttypecode
        from incith i1
        join ipt on ipt.an=i1.an
        left outer join patient pt on pt.hn=ipt.hn
        .
        where convert(char(10),i1.billdate,121)=@sdate and rtrim(i1.rcpno)<>''
        .
        group by i1.an,i1.incdate,i1.inctime,i1.inctime,i1.paidst,i1.rcpno,pt.pname,pt.fname,pt.lname
        order by pttypecode,i1.rcpno,i1.incdate,i1.an
        .
        .
        No 2 = select * from reporttemplate where name='IPD-INCOME-SUMMARY-DAY'
        .
        No 3 = select * from reporttemplate where name='IPD-INCOME-SUMMARY-DAY'
        .
        Server variable

ไม่ทราบว่าเกิดจากอะไรครับ และต้องแก้ยังไงครับ (อยากได้รายงานนี้มากเลยครับ)
โรงพยาบาลสันติสุข
อำเภอสันติสุข จังหวัดน่าน

ออฟไลน์ manoi

  • Hero Member
  • *****
  • กระทู้: 8,669
  • Respect: +170
    • ดูรายละเอียด
    • HOSxP Community Center
แนะนำให้เรียกรายงานจาก
รายงาน -> รายงานระบบ
นะครับ
HOSxP Project Manager / Cheif Developer / BMS MD