BMS-HOSxP Community
HOSxP => แจ้งปัญหา / ขอความช่วยเหลือ => ข้อความที่เริ่มโดย: 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 ไปใส่
ไม่ทราบว่าต้องแก้ไขอย่างไรครับ
-
แก้ไขเงื่อนไขในการดึงใหม่ครับ
-
แก้ไขเงื่อนไขในการดึงใหม่ครับ
ช่วยดูคำสั่งให้น่อยครับ ใช้ 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"
-
แก้ไขเงื่อนไขในการดึงใหม่ครับ
ช่วยดูคำสั่งให้น่อยครับ ใช้ 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"
-
ลองเอาไปดูครับ
-
แก้ไขเงื่อนไขในการดึงใหม่ครับ
ช่วยดูคำสั่งให้น่อยครับ ใช้ 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 อย่างเดียว แต่ก็ไม่ออกครับ
-
แก้ได้แล้วครับ ขอบคุณครับ :) :) :)