ผู้เขียน หัวข้อ: ช่วยแก้ไข RB1T02 หน่อยครับ  (อ่าน 4657 ครั้ง)

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

ออฟไลน์ Knott

  • Hero Member
  • *****
  • กระทู้: 883
  • Respect: +1
    • ดูรายละเอียด
ช่วยแก้ไข RB1T02 หน่อยครับ
« เมื่อ: พฤษภาคม 08, 2009, 11:22:04 AM »
0
ผมกต้องการเพิ่มเบอร์โทรผู้แจ้งลงใน รบ 1 ต 02 แต่ไม่ขึ้นครับ ตาม script นี้ครับ ไม่ทราบว่าควรเพิ่มอย่างไรครับ

select r1.name as HN,r1.name1 as Pt_Name,r1.name2 as Pt_Age,r1.name3 as FullAddress,r1.name4 as Sex,r1.date1 as BirthDay,
r2.name as Occupation,r2.name1 as MarryStatus,r2.name2 as Nationality,r2.name3 as Citizenship,r2.name4 as Religion,
r3.name as BloodGroup,r3.name1 as DrugAllergy,r3.name2 as HomeTel,r3.name3 as InformName,r3.name4 as InformAddr,r3.name5 as InformTel,
r4.name as InformRelation,r4.name1 as Father,r4.name2 as Mother,r4.name3 as SPSName,r4.name4 as CardName,
r5.name as CardCODE,r5.name1 as PtRight,r5.name2 as PtRightCode,r5.date1 as RightExpire,
p.po_code

from tempreport r1
left outer join tempreport r2 on r2.reportname=r1.reportname and r2.id=r1.id and r2.num=2
left outer join tempreport r3 on r3.reportname=r1.reportname and r3.id=r1.id and r3.num=3
left outer join tempreport r4 on r4.reportname=r1.reportname and r4.id=r1.id and r4.num=4
left outer join tempreport r5 on r5.reportname=r1.reportname and r5.id=r1.id and r5.num=5
left outer join patient p on p.hn=r1.name
where
r1.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r2.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r3.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r4.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r5.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r1.reportname="RB1T02" and r1.num=1

limit 1
รพช.วัดโบสถ์ จ.พิษณุโลก
ขึ้นระบบ 1 เมษายน 2551 (ขึ้นระบบเอง)
Server : IBM x3250 M2, RAM 4 GB, FreeBSD 7.2, Mysql 5.1.30
HOSxP Version 3.56.1.15

doramon

  • บุคคลทั่วไป
Re: ช่วยแก้ไข RB1T02 หน่อยครับ
« ตอบกลับ #1 เมื่อ: พฤษภาคม 08, 2009, 11:49:09 AM »
0
select r1.name as HN,r1.name1 as Pt_Name,r1.name2 as Pt_Age,r1.name3 as FullAddress,r1.name4 as Sex,r1.date1 as BirthDay,
r2.name as Occupation,r2.name1 as MarryStatus,r2.name2 as Nationality,r2.name3 as Citizenship,r2.name4 as Religion,
r3.name as BloodGroup,r3.name1 as DrugAllergy,r3.name2 as HomeTel,r3.name3 as InformName,r3.name4 as InformAddr,p.InformTel,
r4.name as InformRelation,r4.name1 as Father,r4.name2 as Mother,r4.name3 as SPSName,r4.name4 as CardName,
r5.name as CardCODE,r5.name1 as PtRight,r5.name2 as PtRightCode,r5.date1 as RightExpire,
p.po_code

from tempreport r1
left outer join tempreport r2 on r2.reportname=r1.reportname and r2.id=r1.id and r2.num=2
left outer join tempreport r3 on r3.reportname=r1.reportname and r3.id=r1.id and r3.num=3
left outer join tempreport r4 on r4.reportname=r1.reportname and r4.id=r1.id and r4.num=4
left outer join tempreport r5 on r5.reportname=r1.reportname and r5.id=r1.id and r5.num=5
left outer join patient p on p.hn=r1.name
where
r1.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r2.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r3.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r4.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r5.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r1.reportname="RB1T02" and r1.num=1

limit 1

ออฟไลน์ Knott

  • Hero Member
  • *****
  • กระทู้: 883
  • Respect: +1
    • ดูรายละเอียด
Re: ช่วยแก้ไข RB1T02 หน่อยครับ
« ตอบกลับ #2 เมื่อ: พฤษภาคม 08, 2009, 12:08:38 PM »
0
ขอบคุณมากครับ
รพช.วัดโบสถ์ จ.พิษณุโลก
ขึ้นระบบ 1 เมษายน 2551 (ขึ้นระบบเอง)
Server : IBM x3250 M2, RAM 4 GB, FreeBSD 7.2, Mysql 5.1.30
HOSxP Version 3.56.1.15

ออฟไลน์ bannok

  • Hero Member
  • *****
  • กระทู้: 763
  • Respect: +8
    • ดูรายละเอียด
Re: ช่วยแก้ไข RB1T02 หน่อยครับ
« ตอบกลับ #3 เมื่อ: กันยายน 10, 2009, 11:34:40 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

ออฟไลน์ bannok

  • Hero Member
  • *****
  • กระทู้: 763
  • Respect: +8
    • ดูรายละเอียด
Re: ช่วยแก้ไข RB1T02 หน่อยครับ
« ตอบกลับ #4 เมื่อ: กันยายน 10, 2009, 13:03:22 PM »
0
ตัวนี้ครับ

select r1.name as HN,r1.name1 as Pt_Name,r1.name2 as Pt_Age,r1.name3 as FullAddress,r1.name4 as Sex,r1.date1 as BirthDay,
r2.name as Occupation,r2.name1 as MarryStatus,r2.name2 as Nationality,r2.name3 as Citizenship,r2.name4 as Religion,
r3.name as BloodGroup,r3.name1 as DrugAllergy,r3.name2 as HomeTel,r3.name3 as InformName,r3.name4 as InformAddr,r3.name5 as informtel,
r4.name as InformRelation,r4.name1 as Father,r4.name2 as Mother,r4.name3 as SPSName,r4.name4 as CardName,
r5.name as CardCODE,r5.name1 as PtRight,r5.name2 as PtRightCode,r5.date1 as RightExpire

from tempreport r1
left outer join tempreport r2 on r2.reportname=r1.reportname and r2.id=r1.id and r2.num=2
left outer join tempreport r3 on r3.reportname=r1.reportname and r3.id=r1.id and r3.num=3
left outer join tempreport r4 on r4.reportname=r1.reportname and r4.id=r1.id and r4.num=4
left outer join tempreport r5 on r5.reportname=r1.reportname and r5.id=r1.id and r5.num=5
where
r1.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r2.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r3.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r4.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r5.id="ID-{7A982941-8457-46C2-B99F-839EFFDFA90D}"  and
r1.reportname="RB1T02" and r1.num=1
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

ออฟไลน์ MR.KRAPONG<>

  • Sr. Member
  • ****
  • กระทู้: 333
  • Respect: 0
    • ดูรายละเอียด
Re: ช่วยแก้ไข RB1T02 หน่อยครับ
« ตอบกลับ #5 เมื่อ: กรกฎาคม 03, 2013, 17:28:41 PM »
0
ตามหน้าฟอร์มหากเราจะเพิ่มเงื่อนไขว่า ถ้าใส่ข้อมูลไม่ครบจะไม่สามารถบันทึกได้ เราต้องใบใส่เงื่อนไขหรือคำสั่งอะไรครับ
แล้วสามารถทำได้ไหมครับ
(รักษาการผู้ดูแลระบบ)เจ้าหน้าที่โรงพยาบาลแม่แจ่ม
73 หมู่ 4 ต.ช่างเคิ่ง อ.แม่แจ่ม จ.เชียงใหม่
phone : 053-485099ต่อ133  หรือ 080-1301641
e-mail : nana-natee@hotmail.com,natee.krapong@gmail.com
------------------------------------------------------------------------
server
OS = centos 5.3   ram 4 G   SQL 5.1.39 percona
------------------------------------------------------------------------
ขึ้นระบบ วันที่ 1 มีนาคม 2551
ขึ้นระบบโดยทีมงานคุณวีระวัฒน์ ใจอินผล(พี่เอก)
------------------------------------------------------------------------
ตอนนี้กำลังศึกษาครับ ช่วยแนะแนวและแนะนำด้วยนะครับ

ออฟไลน์ snhosxp

  • Full Member
  • ***
  • กระทู้: 123
  • Respect: 0
    • ดูรายละเอียด
Re: ช่วยแก้ไข RB1T02 หน่อยครับ
« ตอบกลับ #6 เมื่อ: กรกฎาคม 04, 2013, 08:07:43 AM »
0
ผมต้องการเพิ่มผู้ทำการเปิด visit คนไข้ใหม่ต้องทำไงครับ