ผู้เขียน หัวข้อ: YindeeAndTan Tool For HOSxP 55.12.25  (อ่าน 12675 ครั้ง)

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

ออฟไลน์ naj

  • Hero Member
  • *****
  • กระทู้: 2,449
  • Respect: +8
    • ดูรายละเอียด
    • http://www.luangphopern-hospital.com
YindeeAndTan Tool For HOSxP 55.12.25
« เมื่อ: ธันวาคม 25, 2012, 17:04:51 PM »
0
สำหรับใช้แก้ปัญหาปัญหาการส่งตรวจและ Admit ผิดคน ครับ  :)

คำเตือน:
  tool นี้ไม่มี undo นะครับ  :) :) :) :)
Yindee And Tan

ออฟไลน์ naj

  • Hero Member
  • *****
  • กระทู้: 2,449
  • Respect: +8
    • ดูรายละเอียด
    • http://www.luangphopern-hospital.com
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #1 เมื่อ: ธันวาคม 25, 2012, 17:10:30 PM »
0
ถ้าสนใจ ติดต่อน้อง IT ที่ รพ ได้เลยครับ น้องเขาจะส่งโปรแกรมไปให้พร้อมคำแนะนำดีๆในการใช้และข้อควรระวัง  ;D ;D ;D ;D
หมายเหตุ:
     การกระทำใดๆอันเกิดจากน้อง IT ที่ รพ. ผมได้กระทำลงไป ขอให้น้องเขาเป้นผู้รับผิดชอบแต่เพียงผู้เดียวเท่านั้น ครอบครัว เข็มแข็ง ไม่เกี่ยวนะครับ.... ;D ;D ;D ;D ;D
« แก้ไขครั้งสุดท้าย: ธันวาคม 25, 2012, 19:27:47 PM โดย naj »
Yindee And Tan

ออฟไลน์ jdadmin1

  • Hero Member
  • *****
  • กระทู้: 6,468
  • "เครื่องชำรุด...งดใช้งานชั่วคราว"
  • Respect: +33
    • ดูรายละเอียด
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #2 เมื่อ: ธันวาคม 25, 2012, 18:30:05 PM »
0
อ้างถึง
การกระทำใดๆอันเกิดจากน้อง IT ที่ รพ. ผมได้กระทำลงไป ขอให้น้องเขาเป้นผู้รับผิดชอบแต่เพียงผู้เดียวเท่านั้น ครอบครัว เข็มแข็ง ไม่เกี่ยวนะครับ.... Grin Grin Grin Grin Grin
;D ;D ;D
อิ อิ อิ Family man เป็นคนรักครอบครัวอย่างอบอุ่น แต่แบบนี้แถวบ้านผมเรียกว่ารักน้องจริง.....ทิ้งน้องเห็น ๆ จะจะ ครับ
 ;D ;D ;D
« แก้ไขครั้งสุดท้าย: ธันวาคม 25, 2012, 18:32:18 PM โดย jdadmin1 »
โรงพยาบาลพระสมุทรเจดีย์สวาทยานนท์ จังหวัดสมุทรปราการ
Master   : HOSxP 3.66.12.28
Slave1   : HOSxP 3.66.12.28
Upgrade 23/12/2566
Facebook : Suntad Mamak

ออฟไลน์ naj

  • Hero Member
  • *****
  • กระทู้: 2,449
  • Respect: +8
    • ดูรายละเอียด
    • http://www.luangphopern-hospital.com
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #3 เมื่อ: ธันวาคม 25, 2012, 19:18:43 PM »
0
ขออภัยด้วยที่ไม่ได้แจกมาบน Board นี้ครับ แต่ถ้าใครสนใจที่จะช่วยร่วมทดสอบการใช้งานให้แจ้งมาที่ mail  ของ น้อง IT  opendead100@gmail.com  เนื่องจากน้องเขากำลังตรวจสอบความถูกต้องก่อนครับ ถ้าทดสอบจนมั่นใจว่าใช้งานได้แน่นอนถูกต้อง จะ upload ตัว STABLE ให้ต่อไปครับ   :) :) :) :) :) :)
Yindee And Tan

ออฟไลน์ naj

  • Hero Member
  • *****
  • กระทู้: 2,449
  • Respect: +8
    • ดูรายละเอียด
    • http://www.luangphopern-hospital.com
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #4 เมื่อ: ธันวาคม 25, 2012, 19:26:43 PM »
0
น้องเข้าตั้งใจทำครับ  :) :) :)
Yindee And Tan

ออฟไลน์ bannok

  • Hero Member
  • *****
  • กระทู้: 763
  • Respect: +8
    • ดูรายละเอียด
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #5 เมื่อ: ธันวาคม 26, 2012, 08:51:55 AM »
0
ช่วงนี้เมล์ใช้ไม่ได้เลย น่าจะแจกบนบอร์ดนะครับ
Somchai  Lenyee  Promkiri Hospital  tel 075396123 ต่อ 165
เมล์ arsan_2005@hotmail.com
server IBM SYSTEM x3650M5  ram 32 G.
server IBM SYSTEM x3500M3  ram 16 G.
 Hosxp 3.63.3.10
OS:centos 7 mysql 10.1.10 MariaDB

ออฟไลน์ เข้ม

  • Hero Member
  • *****
  • กระทู้: 2,805
  • Respect: +4
    • ดูรายละเอียด
    • phichit hospital
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #6 เมื่อ: ธันวาคม 26, 2012, 09:05:05 AM »
0
opendead100

... อิอิ แค่ชื่อก็กินขาดแล้วครับ  ;D ;D ;D

แสดงว่า อ.นาจ กำลังจะวางมือ (ไม่รู้โดนบังคับหรือป่าว .. อิอิ)

 ... Yindee Tan หมายถึง มาแทนยินดี หรือว่าลูกคนที่สองครับ ...
Phichit Hospital
HOSxP 3.61.10.31 on FreeBSD 9.2
By BMS - Dec 26, 2007

ออฟไลน์ chitvichai

  • Full Member
  • ***
  • กระทู้: 103
  • Respect: +5
    • ดูรายละเอียด
    • รพ.เมืองปาน
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #7 เมื่อ: ธันวาคม 26, 2012, 09:26:41 AM »
0
สำหรับใช้แก้ปัญหาปัญหาการส่งตรวจและ Admit ผิดคน ครับ  :)

คำเตือน:
  tool นี้ไม่มี undo นะครับ  :) :) :) :)

ผมว่าถ้าจะ undo ก็ทำกลับกันได้ไหมครับ
เช่น จาก แก้จาก hnเดิม 5600001 --> 56000002
เป็น  56000002 -->  5600001 ก็น่าจะเป็นการ undo ที่สมบูรณ์นะครับ โดยใช้ vn เหมือนกัน

sql สำหรับแก้ส่งตรวจผิดคนน่าจะประมาณนี้นะครับ
โค๊ด: [Select]
update an_stat set hn='5600002' where vn='560101000000' and hn='5600001';
update anc_detail set hn='5600002' where vn='560101000000' and hn='5600001';
update approve_doctor set hn='5600002' where vn='560101000000' and hn='5600001';
update ar_head set hn='5600002' where vn='560101000000' and hn='5600001';
update blood_request set hn='5600002' where vn='560101000000' and hn='5600001';
update cancer_nursenote set hn='5600002' where vn='560101000000' and hn='5600001';
update cancer_nursenote_icrt set hn='5600002' where vn='560101000000' and hn='5600001';
update clinic_cormobidity_diabete set hn='5600002' where vn='560101000000' and hn='5600001';
update clinic_visit set hn='5600002' where vn='560101000000' and hn='5600001';
update clinicmember_cormobidity_screen set hn='5600002' where vn='560101000000' and hn='5600001';
update doctor_cert set hn='5600002' where vn='560101000000' and hn='5600001';
update doctor_consult set hn='5600002' where vn='560101000000' and hn='5600001';
update doctor_fee_list set hn='5600002' where vn='560101000000' and hn='5600001';
update doctor_order_print set hn='5600002' where vn='560101000000' and hn='5600001';
update doctor_order_print_queue set hn='5600002' where vn='560101000000' and hn='5600001';
update doctorptotlist set hn='5600002' where vn='560101000000' and hn='5600001';
update doctorscreen set hn='5600002' where vn='560101000000' and hn='5600001';
update dtmain set hn='5600002' where vn='560101000000' and hn='5600001';
update dtmain_save set hn='5600002' where vn='560101000000' and hn='5600001';
update ekg_request set hn='5600002' where vn='560101000000' and hn='5600001';
update enoc_member set hn='5600002' where vn='560101000000' and hn='5600001';
update enoc_member_dw set hn='5600002' where vn='560101000000' and hn='5600001';
update factordm set hn='5600002' where vn='560101000000' and hn='5600001';
update fbshistory set hn='5600002' where vn='560101000000' and hn='5600001';
update finance_check set hn='5600002' where vn='560101000000' and hn='5600001';
update finance_deposit set hn='5600002' where vn='560101000000' and hn='5600001';
update health_med_queue set hn='5600002' where vn='560101000000' and hn='5600001';
update health_med_service set hn='5600002' where vn='560101000000' and hn='5600001';
update inc_opd_stat set hn='5600002' where vn='560101000000' and hn='5600001';
update inc_std_opd_stat set hn='5600002' where vn='560101000000' and hn='5600001';
update incoth set hn='5600002' where vn='560101000000' and hn='5600001';
update ipt set hn='5600002' where vn='560101000000' and hn='5600001';
update ipt_admit_queue set hn='5600002' where vn='560101000000' and hn='5600001';
update lab_app_head set hn='5600002' where vn='560101000000' and hn='5600001';
update lab_head set hn='5600002' where vn='560101000000' and hn='5600001';
update medplan_ipd_wait set hn='5600002' where vn='560101000000' and hn='5600001';
update oapp set hn='5600002' where vn='560101000000' and hn='5600001';
update oapp_cancel set hn='5600002' where vn='560101000000' and hn='5600001';
update oapp_temp set hn='5600002' where vn='560101000000' and hn='5600001';
update opd_card_request set hn='5600002' where vn='560101000000' and hn='5600001';
update opd_presc_machine set hn='5600002' where vn='560101000000' and hn='5600001';
update opdscan set hn='5600002' where vn='560101000000' and hn='5600001';
update opdscreen set hn='5600002' where vn='560101000000' and hn='5600001';
update opdscreening set hn='5600002' where vn='560101000000' and hn='5600001';
update operation_cancel set hn='5600002' where vn='560101000000' and hn='5600001';
update operation_list set hn='5600002' where vn='560101000000' and hn='5600001';
update opitemrece set hn='5600002' where vn='560101000000' and hn='5600001';
update opitemrece_arc set hn='5600002' where vn='560101000000' and hn='5600001';
update opitemrece_bak set hn='5600002' where vn='560101000000' and hn='5600001';
update opitemrece_delta set hn='5600002' where vn='560101000000' and hn='5600001';
update opitemrece_finance_delete set hn='5600002' where vn='560101000000' and hn='5600001';
update opitemrece_innodb set hn='5600002' where vn='560101000000' and hn='5600001';
update opitemrece_ipd set hn='5600002' where vn='560101000000' and hn='5600001';
update opitemrece_trx set hn='5600002' where vn='560101000000' and hn='5600001';
update ovaccident set hn='5600002' where vn='560101000000' and hn='5600001';
update ovst set hn='5600002' where vn='560101000000' and hn='5600001';
update ovst_department set hn='5600002' where vn='560101000000' and hn='5600001';
update ovstdiag set hn='5600002' where vn='560101000000' and hn='5600001';
update patient_cancer_interrogate set hn='5600002' where vn='560101000000' and hn='5600001';
update patient_cancer_order_3dcrt set hn='5600002' where vn='560101000000' and hn='5600001';
update patient_history_pe_visit set hn='5600002' where vn='560101000000' and hn='5600001';
update patient_opd_scan set hn='5600002' where vn='560101000000' and hn='5600001';
update physic_main set hn='5600002' where vn='560101000000' and hn='5600001';
update pq_rxorder set hn='5600002' where vn='560101000000' and hn='5600001';
update provis_direct_person_op set hn='5600002' where vn='560101000000' and hn='5600001';
update psychia_service_list set hn='5600002' where vn='560101000000' and hn='5600001';
update psychia_visit set hn='5600002' where vn='560101000000' and hn='5600001';
update ptdepart set hn='5600002' where vn='560101000000' and hn='5600001';
update pteroprt set hn='5600002' where vn='560101000000' and hn='5600001';
update rcpt_abort set hn='5600002' where vn='560101000000' and hn='5600001';
update rcpt_arrear set hn='5600002' where vn='560101000000' and hn='5600001';
update rcpt_credit set hn='5600002' where vn='560101000000' and hn='5600001';
update rcpt_current set hn='5600002' where vn='560101000000' and hn='5600001';
update rcpt_debt set hn='5600002' where vn='560101000000' and hn='5600001';
update rcpt_debt_cancel set hn='5600002' where vn='560101000000' and hn='5600001';
update rcpt_print set hn='5600002' where vn='560101000000' and hn='5600001';
update referin set hn='5600002' where vn='560101000000' and hn='5600001';
update referout set hn='5600002' where vn='560101000000' and hn='5600001';
update report_sks set hn='5600002' where vn='560101000000' and hn='5600001';
update rvp_accident set hn='5600002' where vn='560101000000' and hn='5600001';
update service_time set hn='5600002' where vn='560101000000' and hn='5600001';
update sti_patient_counseling set hn='5600002' where vn='560101000000' and hn='5600001';
update sti_patient_queue set hn='5600002' where vn='560101000000' and hn='5600001';
update sti_patient_std set hn='5600002' where vn='560101000000' and hn='5600001';
update sti_queue set hn='5600002' where vn='560101000000' and hn='5600001';
update surveil_member set hn='5600002' where vn='560101000000' and hn='5600001';
update surveil_member_507 set hn='5600002' where vn='560101000000' and hn='5600001';
update surveil_member_dw set hn='5600002' where vn='560101000000' and hn='5600001';
update temp412a061 set hn='5600002' where vn='560101000000' and hn='5600001';
update temp412a071 set hn='5600002' where vn='560101000000' and hn='5600001';
update temp412a091 set hn='5600002' where vn='560101000000' and hn='5600001';
update temp412b031 set hn='5600002' where vn='560101000000' and hn='5600001';
update temp412b051 set hn='5600002' where vn='560101000000' and hn='5600001';
update temp412b091 set hn='5600002' where vn='560101000000' and hn='5600001';
update temp421d071 set hn='5600002' where vn='560101000000' and hn='5600001';
update tempblue_command1 set hn='5600002' where vn='560101000000' and hn='5600001';
update tempcom41 set hn='5600002' where vn='560101000000' and hn='5600001';
update tempdental1 set hn='5600002' where vn='560101000000' and hn='5600001';
update universal_head set hn='5600002' where vn='560101000000' and hn='5600001';
update visit_name set hn='5600002' where vn='560101000000' and hn='5600001';
update visit_pay_plan set hn='5600002' where vn='560101000000' and hn='5600001';
update vital_sign_data set hn='5600002' where vn='560101000000' and hn='5600001';
update vn_stat set hn='5600002' where vn='560101000000' and hn='5600001';
update xray_head set hn='5600002' where vn='560101000000' and hn='5600001';
update xray_report set hn='5600002' where vn='560101000000' and hn='5600001';
« แก้ไขครั้งสุดท้าย: ธันวาคม 26, 2012, 09:29:29 AM โดย chitvichai »
โรงพยาบาลเมืองปาน (ขนาด 30 เตียง) จังหวัดลำปาง โทร 054-276345-6
Master Server : HP Proliant DL360G7 Ram DDR3 1333 ECC 2x2 GB  HDD 2x146 GB  CentOS 6.2 Linux MySQL 5.5.11
Slave Server I : Acer Altos G540 Ram DDR2 667 ECC 2x1 GB HDD 2x146 GB Redhat Ent 5.2 Linux Mysql 5.1.29
Slave Server II : คอมประกอบ Ram DDR2 667  2x2 GB HDD SATA 160 GB Endian Firewall Community release 2.4.1 Mysql 5.5.24
Client : Windows XP Sp2
ขึ้นระบบ 1 มิ.ย.50

ออฟไลน์ naj

  • Hero Member
  • *****
  • กระทู้: 2,449
  • Respect: +8
    • ดูรายละเอียด
    • http://www.luangphopern-hospital.com
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #8 เมื่อ: ธันวาคม 26, 2012, 11:51:13 AM »
0
รอสักครู่ ช่วงบ่ายผมจะ upload ให้ครับ  :) :) :)
Yindee And Tan

ออฟไลน์ Bond_007

  • Hero Member
  • *****
  • กระทู้: 1,533
  • เมื่อก่อนเคยรักมากเท่าไหร่มันยังคงรักมากเท่านั้น
  • Respect: +2
    • ดูรายละเอียด
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #9 เมื่อ: ธันวาคม 26, 2012, 13:35:15 PM »
0
ขอ source code ด้วยได้ไหมครับจะได้เอาเป็นแรงบันดาลใจ  ;D ;D
โรงพยาบาลศิริเวชลำพูน
Hosxp version 3.53.7.16
ขอขบคุณ อาจารย์ชัยพร,อ.อ็อด,อ.เกื้อ,พี่เอก,พี่กิติศักดิ์,พี่เข้ม,พี่ไสว,พี่ terminator 2010,พี่pikepid,พี่udomchock ,พี่ขวด,พี่เจมส์,ป๋าJdadmin,พี่กานดา admin ทุกๆท่าน และนางฟ้า BMS

ทำเพื่อใครสักคนฉันได้ทำเพื่อความรัก
ร้องให้สักคนฉันก็ร้องจากหัวใจ
รักที่มันต้องจบมันก็ยังงดงาม ฉันยังจำไว้

Nologo How to be hosxp star

ออฟไลน์ naj

  • Hero Member
  • *****
  • กระทู้: 2,449
  • Respect: +8
    • ดูรายละเอียด
    • http://www.luangphopern-hospital.com
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #10 เมื่อ: ธันวาคม 26, 2012, 14:03:37 PM »
0
upload ให้แล้ว  file จะอยู่ด้านล่างของกระทู้นี้ครับ YindeeAndTan Tool For HOSxP 3.55.12.26
code ที่แก้ไขกรณีเป็น IPD Case
procedure TIPDAdmitEditForm.cxButton2Click(Sender: TObject);
var   i,i1:integer;
   begin
   if cxTextEdit1.Text=''  then
   begin
      ShowMessage('ไม่ได้กำหนด HN ที่ส่งตรวจผิด');
         cxTextEdit1.SetFocus;
     Exit;
   end;
   if cxTextEdit2.Text=''  then
     begin
        ShowMessage('ไม่ได้กำหนด AN');
     cxTextEdit2.SetFocus;
     Exit;
     end;
     if Length(cxTextEdit2.Text)<>9 then
     begin
      ShowMessage('AN ต้องเท่ากับ 9 หลัก');
     cxTextEdit2.SetFocus;
     Exit;
     end;
  if cxTextEdit3.Text<>'' then
  begin

   TC.Close;
   tc.data:=hosxp_getdataset('select * from hosxp_ddl_field  where field_name ="an"');
   ClientDataSet1.Close;
   ClientDataSet1.data:=HOSxP_GetDataSet('select sys_value from  '+
   'sys_var where sys_name="hn_digit"');
   i1:=StrToInt(ClientDataSet1.FieldByName('sys_value').AsString);
   {PatientCDS.Close;
   PatientCDS.Data:=HOSxP_GetDataSet('select concat(pname,fname,"  ",lname) as ptname '+
   'from patient where hn="'+addzero(cxtextedit3.text,i1)+'" limit 1') ;}
   ProgressBar1.position:=0;
   ProgressBar1.max:=tc.recordcount;
   i:=0;
   while not tc.eof do
   begin
     i:=i+1;
     label1.caption:='ตารางที่:'+inttostr(i)+': ชื่อ: '+tc.fields[0].asstring;
     if tc.fields[1].asstring ='an' then
     begin
      Memo1.lines.add('Table...'+tc.fields[0].asstring);
     try
      hosxp_getdataset('update '+tc.fields[0].asstring+'  set hn="'+
       addzero(cxtextedit3.text,i1)+'" where an="'+
       cxTextEdit2.text+'" and hn="'+AddZero(cxtextedit1.text,i1)+'" ');
       HOSxP_GetDataSet('update lab_head set '+
       'hn="'+addzero(cxtextedit3.text,i1)+'" '+
       'where vn="'+ cxTextEdit2.text+'" ') ;
       HOSxP_GetDataSet('update patient  set '+
       'admit="Y" '+
       'where hn="'+ addzero(cxtextedit3.text,i1)+'"  limit 1') ;
              HOSxP_GetDataSet('update patient  set '+
       'admit="N" '+
       'where hn="'+ addzero(cxtextedit1.text,i1)+'"  limit 1') ;
     except end;
     end;
    memo1.lines.add('Change...'+'update '+tc.fields[0].asstring+'  set hn="'
    +addzero(cxtextedit3.text,i1)+'" where an="'+cxtextedit2.text+'" and hn="'+
    AddZero(cxtextedit1.text,i1)+'" ---> OK');
    ProgressBar1.position:=ProgressBar1.position+1;
     application.processmessages;
     tc.next;
   end;
   Memo1.Lines.Add('--------------------------------------------------------------------------------------------------------------------');
   Memo1.Lines.Add('Data Update Successfull...');
   tc.close;
   ClientDataSet1.Close;
   PatientCDS.Close;
      showmessage('Done.');
  end else
  begin
   ShowMessage('ไม่ได้กำนด HN ที่ถูกต้อง') ;
   cxTextEdit3.SetFocus;
   Exit;
  end;
end;

//////////////////////////////////////////////////////////////////
code กรณีเป็น OPD CASE
procedure TOPDvisitEditForm.cxButton2Click(Sender: TObject);
var   i,i1:integer;
   begin
   if cxTextEdit1.Text=''  then
   begin
      ShowMessage('ไม่ได้กำหนด HN ที่ส่งตรวจผิด');
         cxTextEdit1.SetFocus;
     Exit;
   end;
   if cxTextEdit2.Text=''  then
     begin
        ShowMessage('ไม่ได้กำหนด VN');
     cxTextEdit2.SetFocus;
     Exit;
     end;
     if Length(cxTextEdit2.Text)<>12 then
     begin
      ShowMessage('VN ต้องเท่ากับ 12 หลัก');
     cxTextEdit2.SetFocus;
     Exit;
     end;
     
  if cxTextEdit3.Text<>'' then
  begin

   TC.Close;
   tc.data:=hosxp_getdataset('select * from hosxp_ddl_field  where field_name ="vn"');
   ClientDataSet1.Close;
   ClientDataSet1.data:=HOSxP_GetDataSet('select sys_value from  '+
   'sys_var where sys_name="hn_digit"');
   i1:=StrToInt(ClientDataSet1.FieldByName('sys_value').AsString);
   PatientCDS.Close;
   PatientCDS.Data:=HOSxP_GetDataSet('select concat(pname,fname,"  ",lname) as ptname '+
   'from patient where hn="'+addzero(cxtextedit3.text,i1)+'" limit 1') ;
   ProgressBar1.position:=0;
   ProgressBar1.max:=tc.recordcount;
   i:=0;
   while not tc.eof do
   begin
     i:=i+1;
     label1.caption:='ตารางที่:'+inttostr(i)+' ชื่อ '+tc.fields[0].asstring+' Done...';
     if tc.fields[1].asstring ='vn' then
     begin
      Memo1.lines.add('Table...'+tc.fields[0].asstring);
     try
      hosxp_getdataset('update '+tc.fields[0].asstring+'  set hn="'+
       addzero(cxtextedit3.text,i1)+'" where vn="'+
       cxTextEdit2.text+'" and hn="'+AddZero(cxtextedit1.text,i1)+'" ');
       HOSxP_GetDataSet('update visit_name set '+
       'patient_name="'+patientcds.FieldByName('ptname').AsString+'" '+
       'where vn="'+ cxTextEdit2.text+'" ') ;
     except end;
     end;
    memo1.lines.add('Change...'+'update '+tc.fields[0].asstring+'  set hn="'
    +addzero(cxtextedit3.text,i1)+'" where vn="'+cxtextedit2.text+'" and hn="'+
    AddZero(cxtextedit1.text,i1)+'" ---> OK');
    ProgressBar1.position:=ProgressBar1.position+1;
     application.processmessages;
     tc.next;
   end;
   Memo1.Lines.Add('--------------------------------------------------------------------------------------------------------------------');
   Memo1.Lines.Add('Data Update Successfull...');
   tc.close;
   ClientDataSet1.Close;
   PatientCDS.Close;
      showmessage('Done.');
  end else
  begin
  ShowMessage('ไม่ได้กำหนด HN ที่ถูกต้อง') ;
  cxTextEdit3.SetFocus;
   Exit;
  end;
end;

« แก้ไขครั้งสุดท้าย: ธันวาคม 26, 2012, 14:16:24 PM โดย naj »
Yindee And Tan

ออฟไลน์ naj

  • Hero Member
  • *****
  • กระทู้: 2,449
  • Respect: +8
    • ดูรายละเอียด
    • http://www.luangphopern-hospital.com
Re: YindeeAndTan Tool For HOSxP 55.12.25
« ตอบกลับ #11 เมื่อ: ธันวาคม 26, 2012, 14:14:54 PM »
+1
สิ่งที่โปรแกรมตรวจสอบ
   เงื่อนไขทุกช่องต้องมีข้อมูล ว่างไม่ได้
สิ่งที่ไม่ได้ตรวจสอบ
   hn,vn,an มีจริงอยู่ในฐานข้อมูลหรือไม่  น้องเขาไม่ได้ทำระบบ search
   AN,VN เป็นของ HN ที่ส่งตรวจผิดหรือเปล่า

ดังนั้น ตอนที่นำไปใช้งานต้องแน่ใจว่าถูกต้อง  :) :) :) :) :)
เป็น Tool เล็กๆที่ใช้สำหรับแก้ปัญหาเฉพาะหน้าให้กับ admin  :)
Yindee And Tan