BMS-HOSxP Community

HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: bbbas ที่ สิงหาคม 21, 2015, 11:20:47 AM

หัวข้อ: ขอความช่วยเหลือครับ
เริ่มหัวข้อโดย: bbbas ที่ สิงหาคม 21, 2015, 11:20:47 AM
จากรูปที่ 1 ผู้ป่วยมีการวินิจฉัยอยู่ 9 diag แต่พอพิมพ์ในใบสรุป ไม่ตรงตาม diagtype ดังรูปที่ 2 ครับ คือ
diag 1 = R920 ถูกครับ
diag 2 = K703,N170,K767,D62 ถูกครับ
แต่ diag 3 ไม่ออกเลย ทั้ง ๆ ที่มีอยู่ 4 diag
diag 4 ไม่มี แต่เอา diag 3 ไปใส่
ไม่ทราบว่าต้องแก้ไขอย่างไรครับ
หัวข้อ: Re: ขอความช่วยเหลือครับ
เริ่มหัวข้อโดย: udomchok ที่ สิงหาคม 23, 2015, 00:58:15 AM
แก้ไขเงื่อนไขในการดึงใหม่ครับ
หัวข้อ: Re: ขอความช่วยเหลือครับ
เริ่มหัวข้อโดย: bbbas ที่ สิงหาคม 24, 2015, 08:52:24 AM
แก้ไขเงื่อนไขในการดึงใหม่ครับ
ช่วยดูคำสั่งให้น่อยครับ ใช้ variable แล้วใส่คำสั่งดังนี้ครับ
select if(length(i.code)=5,concat(i1.name," ",i2.name," ",i.name),i.name) as n from icd101 i '+
'left outer join icd101 i1 on i1.code=left(i.code,3)   '+
'left outer join icd101 i2 on i2.code=left(i.code,4)   '+
'where i.code in  ('+
  GetSQLSubqueryData('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="2"')+') ');
 
memo2.lines.text:=GetListFromQuery('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="2"
หัวข้อ: Re: ขอความช่วยเหลือครับ
เริ่มหัวข้อโดย: เกื้อกูล ครับ.. ที่ สิงหาคม 24, 2015, 17:51:20 PM
แก้ไขเงื่อนไขในการดึงใหม่ครับ
ช่วยดูคำสั่งให้น่อยครับ ใช้ variable แล้วใส่คำสั่งดังนี้ครับ
select if(length(i.code)=5,concat(i1.name," ",i2.name," ",i.name),i.name) as n from icd101 i '+
'left outer join icd101 i1 on i1.code=left(i.code,3)   '+
'left outer join icd101 i2 on i2.code=left(i.code,4)   '+
'where i.code in  ('+
  GetSQLSubqueryData('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="2"')+') ');
 
memo2.lines.text:=GetListFromQuery('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="2"

เอาทุกรายละเอียดไปใส่ในส่วน form designer ของท่อน Complication(3) สิครับ..แต่ปรับตรง diagtype='2' เป็น '3' ครับ..  GetSQLSubqueryData('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="3"')+') ');
 
memo2.lines.text:=GetListFromQuery('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="3"
หัวข้อ: Re: ขอความช่วยเหลือครับ
เริ่มหัวข้อโดย: udomchok ที่ สิงหาคม 24, 2015, 23:46:16 PM
ลองเอาไปดูครับ
หัวข้อ: Re: ขอความช่วยเหลือครับ
เริ่มหัวข้อโดย: bbbas ที่ สิงหาคม 25, 2015, 09:12:00 AM
แก้ไขเงื่อนไขในการดึงใหม่ครับ
ช่วยดูคำสั่งให้น่อยครับ ใช้ variable แล้วใส่คำสั่งดังนี้ครับ
select if(length(i.code)=5,concat(i1.name," ",i2.name," ",i.name),i.name) as n from icd101 i '+
'left outer join icd101 i1 on i1.code=left(i.code,3)   '+
'left outer join icd101 i2 on i2.code=left(i.code,4)   '+
'where i.code in  ('+
  GetSQLSubqueryData('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="2"')+') ');
 
memo2.lines.text:=GetListFromQuery('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="2"

เอาทุกรายละเอียดไปใส่ในส่วน form designer ของท่อน Complication(3) สิครับ..แต่ปรับตรง diagtype='2' เป็น '3' ครับ..  GetSQLSubqueryData('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="3"')+') ');
 
memo2.lines.text:=GetListFromQuery('select icd10 from iptdiag where an="'+DBPipeline['an']+'" and diagtype="3"
ของเดิมก็ทำแบบนี้อยู่ครับ ปรับแค่ diagtype อย่างเดียว แต่ก็ไม่ออกครับ
หัวข้อ: Re: ขอความช่วยเหลือครับ
เริ่มหัวข้อโดย: bbbas ที่ สิงหาคม 25, 2015, 13:32:15 PM
แก้ได้แล้วครับ ขอบคุณครับ  :) :) :)