BMS-HOSxP Community

HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: nksawan2011 ที่ ตุลาคม 03, 2011, 11:33:54 AM

หัวข้อ: อยากเพิ่มข้อความเตือนใน สจ.รบ.2013
เริ่มหัวข้อโดย: nksawan2011 ที่ ตุลาคม 03, 2011, 11:33:54 AM
อยากเพิ่มข้อความเตือนพิมพ์ใบนี้ตรับ โดยถ้าผู้ป่วยใช้สิทธิ์ประกันสังคม (17) ให้แสดงข้อความเตือน 'กรุณาตรวจสอบใบแรกรับ จากแพทย์' จะต้องเพิ่มคำสั่งตรงไหนครับ (REPORT-RG501)ช่วยชี้แนะด้วยครับ
หัวข้อ: Re: อยากเพิ่มข้อความเตือนใน สจ.รบ.2013
เริ่มหัวข้อโดย: nksawan2011 ที่ ตุลาคม 03, 2011, 15:28:28 PM
ลักษณะอย่างด้านล่างครับ แต่เงื่อนไขคือ ถ้า pttype=17 ให้แสดงข้อความที่ต้องการ


procedure GlobalOnCreate;
begin
          showmessage('ÃÒ§ҹ¤èÒÃÑ¡ÉÒ¾ÂÒºÒżÙé»èǹ͡ ẺÃÒ§ҹ ¹¤.1 '+'Ẻ·Õè 1 ᡵÒÁ¡ÅØèÁÊÔ·¸Ô UC ¹Í¡à¢µ·Ñé§ËÁ´');


    pttype_in :=' "74" ';
    pttype_name := getsqlsubquerydata('select concat(pttype," ",name)as pttname from pttype where pttype in ('+pttype_in+') order by pttype');
    showmessage('¤Ø³àÅ×Í¡ÊÔ·¸Ô = '+pttype_name);

       GetDateRangeDialog(date1, date2);
       ds1:=formatdatetime('yyyy-mm-dd',date1);
    ds2:=formatdatetime('yyyy-mm-dd',date2);

      hospcode_list:=getsqlsubquerydata('select distinct hospmain from vn_stat where pttype in('+pttype_in+') and vstdate between "'+ds1+'" and "'+ds2+'" ');
      hospcode_list := getpickuplist('select concat(hospcode,":",hosptype," ",name) as name from hospcode where hospcode in ('+
     hospcode_list+')order by hospcode ');

    ChangeReportSQL('select v.* from vn_stat v '+
   ' left outer join ovst o on o.vn = v.vn '+
   ' where v.pttype in ('+pttype_in+') and v.vstdate between "'+ds1+'" and "'+ds2+'" '+
   ' and v.hospmain="'+copy(hospcode_list,1,5)+'" and o.an is null order by v.vn ');


end;