แสดงกระทู้

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 ... 7 8 [9]
401
ลองคำสั่งนี้ดูมั๊ยครับ ตรงกับความต้องการหรือไม่?
select a.xn,concat(b.pname,b.fname,' ',b.lname) as name,d.xray_items_code,e.xray_items_name
from xrayxn a left join patient b on a.hn=b.hn
left join xray_head c on a.xn=c.pt_xn
left join xray_report d on c.vn=d.vn
left join xray_items e on d.xray_items_code=e.xray_items_code
where a.xn=4901973

402
อาจารย์ครับ ผมจะตรวจสอบว่า VN นี้มีการสั่งยาหรือไม่
ใช้ table อะไรบ้างครับ

403
select a.hn,concat(b.pname,b.fname,' ',b.lname) as name,a.staff,c.groupname from ovst a,patient b,opduser c
where a.hn=b.hn and a.staff=c.loginname
and a.vstdate='2006-12-15'
order by c.loginname,a.hn
แบบนี้รึปล่าว เปลี่ยนวันที่เอาเองนะ

404
ระบบผู้ป่วยนอก->บันทึกผลการรักษา
สภาพหลังการตรวจ จะขึ้น 99 ให้อัติโนมัติ
ในกรณียังไม่ลงโรคจากห้องตรวจ
ถ้าผมแก้เป็นอย่างอื่น เช่น Admit หรือ Refer(54)
จะต้องเข้าถึง 2 ครั้ง
ถ้าแก้ไข Refer ข้อมูล Refer เดิมก็ไม่ขึ้นมาด้วย

405
รูปแบบการส่งรายงาน 504/505 เป็นแบบไหนกันบ้างครับ
ที่ สสจ.กำแพงเพชร ยังรับแบบ DBF ไฟล์
*****
ส่วนประกอบของไฟล์
Hosp c(12)  ซึ่งเป็นรหัสหน่วยงานแบบเก่า ใน table hospcode ไม่มี
Date c(4)     =yymm
Case1....Case? n(5)
*****
ผมลองส่งตัวอย่างมาให้ดู

406
Development / รายงาน 505 ผิดพลาดรึปล่าวครับ
« เมื่อ: พฤศจิกายน 25, 2006, 02:55:27 AM »
ผมลองทดลองรายงาน 505 แล้วน่าจะมีข้อผิดพลาดครับ
*****
ทดลองข้อที่ 2
select a.an,a.dchdate,b.icd10 from ipt a,iptdiag b
where a.an=b.an and b.icd10 between 'A03' and 'A0999'
and a.dchdate between '2006-11-1' and '2006-11-30'
ได้ค่าหนึ่ง แล้วจากรายงานได้อีกค่าครับ
มีหลายข้ออยู่เหมือนกันครับ

407
ตัวอย่างที่ผมลองทำครับ ดึงเฉพาะข้อมูล
unit RP504;

var
  MainForm: TForm;
  OKButton, SaveButton, PrintButton, ExitButton: TButton;
  ds1, ds2: TDateEdit;
  lds1, lds2, lcode, lid, lname,lpath: TLabel;
  tcode, tid, tname,tpath: TEdit;
  FAborting: boolean;
  yymm:string;
  rp:TTzDBF;
  rphosp:TStringField;
  rpdate:TStringField;
  rpcase1:TStringField;
  rpcase2:TStringField;
  rpcase3:TStringField;
  rpcase4:TStringField;
  rpcase5:TStringField;
  rpcase6:TStringField;
  rpcase7:TStringField;
  rpcase8:TStringField;
  rpcase9:TStringField;
  rpcase10:TStringField;
  rpcase11:TStringField;
  rpcase12:TStringField;
  rpcase13:TStringField;
  rpcase14:TStringField;
  rpcase15:TStringField;
  rpcase16:TStringField;
  rpcase17:TStringField;
  rpcase18:TStringField;
  rpcase19:TStringField;
  rpcase20:TStringField;
  rpcase21:TStringField;

implementation

procedure OKClick(Sender: TObject);
var
  sdate,edate:tdatetime;
  tc:Tclientdataset;
begin
  yymm:=formatdatetime('yymm',strtodate(ds2.text));
  sdate:=ds1.text;
  edate:=ds2.text;
  tc:=TClientDataset.create(nil);
  tc.data:=HOSxP_GetDataset('select a.*,ifnull(d.amount,0) as amount from rpt_504_name a left join '+
  ' (select b.id,count(b.id) as amount from rpt_504_code b,ovstdiag c '+
  ' where c.icd10 between b.code1 and b.code2 and c.icd10 is not null '+
  ' and c.vstdate between "'+formatdatetime('yyyy-mm-dd',sdate)+'" and "'+formatdatetime('yyyy-mm-dd',edate)+'"'+
  ' group by b.id) d on d.id=a.id'+
  ' order by a.id');
  while not tc.eof do
  begin
  showmessage(tc.fieldbyname('id').asstring+'=>'+tc.fieldbyname('amount').asstring);
  tc.next;
  end;
end;

procedure ExitClick(Sender: TObject);
begin
  mainform.close
end;

procedure Main;
begin
  MainForm := TForm.Create(nil);
  MainForm.top := 200;
  MainForm.left := 200;
  MainForm.Width := 400;
  MainForm.Height := 400;

  lcode := tlabel.create(mainform);
  lcode.parent := mainform;
  lcode.top := 10;
  lcode.left := 10;
  lcode.caption := 'Code';

  tcode := tedit.create(mainform);
  tcode.parent := mainform;
  tcode.top := 10;
  tcode.left := 70;
  tcode.width := 85;
  tcode.text := '110962100000';

  lid := tlabel.create(mainform);
  lid.parent := mainform;
  lid.top := 35;
  lid.left := 10;
  lid.caption := 'Off_ID';

  tid := tedit.create(mainform);
  tid.parent := mainform;
  tid.top := 35;
  tid.left := 70;
  tid.width := 40;
  tid.text := VarToStr(GetSQLData('select hospitalcode from opdconfig'));

  lname := tlabel.create(mainform);
  lname.parent := mainform;
  lname.top := 60;
  lname.left := 10;
  lname.caption := 'Name';

  tname := tedit.create(mainform);
  tname.parent := mainform;
  tname.top := 60;
  tname.left := 70;
  tname.width := 200;
  tname.text := VarToStr(GetSQLData('select hospitalname from opdconfig'));

  lds1 := tlabel.create(mainform);
  lds1.parent := mainform;
  lds1.top := 85;
  lds1.left := 10;
  lds1.caption := 'Begin Date';

  ds1 := TDateEdit.Create(MainForm);
  ds1.parent := mainForm;
  ds1.left := 70;
  ds1.top := 85;
  ds1.Width := 85;
  ds1.text := now-formatdatetime('dd',now)+1;

  lds2 := tlabel.create(mainform);
  lds2.parent := mainform;
  lds2.top := 85;
  lds2.left := 200;
  lds2.caption := 'End Date';

  ds2 := TDateEdit.Create(MainForm);
  ds2.parent := mainForm;
  ds2.left := 270;
  ds2.top := 85;
  ds2.Width := 85;
  ds2.text := now;

  lpath := tlabel.create(mainform);
  lpath.parent := mainform;
  lpath.top := 110;
  lpath.left := 10;
  lpath.caption := 'Send To';

  tpath := tedit.create(mainform);
  tpath.parent := mainform;
  tpath.top := 110;
  tpath.left := 70;
  tpath.width := 200;
  tpath.text := 'C:\TEMP';

  OKButton := TButton.Create(MainForm);
  OKButton.parent := mainForm;
  OKButton.left := 30;
  OKButton.top := 180;
  OKButton.Width := 60;
  OKButton.caption := 'OK';
  OKButton.OnClick := OKClick;

  ExitButton := TButton.Create(MainForm);
  ExitButton.parent := mainForm;
  ExitButton.left := 140;
  ExitButton.top := 180;
  ExitButton.Width := 60;
  ExitButton.caption := 'Exit';
  ExitButton.OnClick := ExitClick;

  MainForm.Caption := 'ÃÒ§ҹ 504';
  MainForm.Showmodal;
  MainForm.free;
end;

end.

408
พอดีจะทำ Export ของ 504 เป็น DBF ครับ
โดยโครงสร้าง DBF เป็น
HOSP C(12)
DATE C(4)
CASE1...CASE21 N(5)
*****
ลองทำส่วนดึงข้อมูลพอทำได้
แต่ทำส่วน Export ไม่เป็นครับ
*****
ตอนนี้ Exoprt โดยใช้ VFP ครับ

409
ผมว่า cid ว่างดีอยู่แล้ว เอาไว้ตรวจสอบ
ตอนลงทะเบียนตรวจ จะได้เป็น double check อีกทีครับ
*****
การ update table ถ้าเราสั่งผิดจะมีผลกระทบมากมายนะ
*****
update patient set cid='1111111111111' where cid is null
ระวังนะครับ

410
ผมขอเฉพาะ rpt_504_code ได้รึปล่าวครับ
หรือเป็น text ไฟล์ก้อได้ เดี๋ยวผมจะลองเพิ่มเองครับ
*****
ผมยังส่งรายงานเป็นแบบ DBF ไฟล์
มีตัวอย่าง หรือ script เกี่ยวกับการ export/import file
ออกไป folder หรือ drive รึปล่าวครับ
ขอบคุณครับ
*****
แฟ้ม update ขนาดใหญ่ ใช้อะไร d/l ครับ

411
ในข้อ 19 ของ rpt_504_code เห็นมีแต่ X40-X49 แล้ว รหัส X อื่นอยู่ในข้อใดครับ


412
ช่วยบอกเกี่ยวกับ Menu Bar หน่อย
อะไรเป็น menu หลัก,อะไรอยู่ให้ Sub menu ใด
อะไรเป็น tool bar
ผมต้องการให้ user เห็นเฉพาะงานนั้น
ขอบคุณครับ

413
เนื่องจากมีบุคลากร ทำการทดลองลงข้อมูลกับฐานข้อมูลจริง
ซึ่งทำการตั้งแต่ทำบัตร ลงเบียน Admit จ่ายยา ชำระเงิน
เราต้องลบข้อมูล table ใดบ้าง
ฃอแยกเป้น OPD,IPD,ห้องจ่ายยา.ห้องชำระเงิน ได้มั๊ยครับ
*****
เคยลองลบจาก ลงทะเบียนผู้ป่วยนอก มีบางครั้งมีติด Admit หรือไม่ก็มีการสั่งยา
เลยไม่แน่ใจจะลบอย่างไรบ้าง
*****
ขอบคุณครับ

414
แจ้งปัญหา / ขอความช่วยเหลือ / hos_guid
« เมื่อ: ตุลาคม 11, 2006, 00:20:01 AM »
ขอวิธีหา HOS_GUID ของ Patient บ้างได้มั๊ยครับ
ขอบคุณครับ

415
ขอบคุณครับ
*****
ถ้าเขียนคำสั่งแบบนี้
_connect ="Driver={MySQL ODBC 3.51 Driver};Server=myServer;UID=sa;PASSWORD=sa;Database=hos;Port=3306;Option=0;"
แล้วใช้ sqlstringconnect() ของ vfp
ต้องกำหนดอะไรเพิ่มเติมมั๊ยครับ

416
ขอรายละเอียดเพิ่มเติมมากกว่านี้ได้มั๊ยครับ
เช่น ไปปรับตรงไหน ตรง my.ini รึปล่าว,char เป็น TIS620 หรือ UFT8

417
ผมลองเปิด table [PATIENT] ด้วย Access แล้วภาษาไทยเป็นตัว ? ครับ
ใช้ MySQl กับ MyODBC อยู่ครับ

หน้า: 1 ... 7 8 [9]