พฤษภาคม 2024
จ. อ. พ. พฤ. ศ. ส. อา.
« มี.ค.    
 12345
6789101112
13141516171819
20212223242526
2728293031  
พฤษภาคม 2024
จ. อ. พ. พฤ. ศ. ส. อา.
« มี.ค.    
 12345
6789101112
13141516171819
20212223242526
2728293031  

การดึงผล LAB ออกมาแสดงในรายงาน DHDC2 ในส่วนของ Electronic Health Record (EHR)




 

ขอขอบคุณเจ้าของผลงาน HDHC2  ครับ
District Health Data Checker, Web:20170101.27.1 , Db:2017.01.27
พัฒนาโดย :UTEHN PHNU

SELECT l.labtest,if(l.labtest =’0531002′ or l.labtest =’01’ ,’01 ตรวจน้ำตาลในเลือด จากเส้นเลือดดำ หลังอดอาหาร’,
if(l.labtest=’0531004′ or l.labtest =’02’,’02 ตรวจน้ำตาลในเลือด จากเส้นเลือดดำ โดยไม่อดอาหาร’,
if(l.labtest=’0531101′ or l.labtest =’03’,’03 ตรวจน้ำตาลในเลือด จากเส้นเลือดฝอย หลังอดอาหาร’,
if(l.labtest=’0531102′ or l.labtest =’04’,’04 ตรวจน้ำตาลในเลือด จากเส้นเลือดฝอย โดยไม่อดอาหาร’,
if(l.labtest=’0531601′ or l.labtest =’05’,’05 ตรวจ HbA1C’,
if(l.labtest=’0546602′ or l.labtest =’06’,’06 ตรวจ Trglyceride’,
if(l.labtest=’0541601′ or l.labtest =’07’,’07 ตรวจ Total Cholesterol’,
if(l.labtest=’0541202′ or l.labtest =’08’,’08 ตรวจ HDL Cholesterol’,
if(l.labtest=’0541402′ or l.labtest =’09’,’09 ตรวจ LDL Cholesterol’,
if(l.labtest=’0583001′ or l.labtest =’10’,’10 ตรวจ BUN ในเลือด’,
if(l.labtest=’0581902′ or l.labtest =’11’,’11 ตรวจ Creatinine ในเลือด’,
if(l.labtest=’0581902′ or l.labtest =’12’,’12 ตรวจโปรตีน Microalbumin ในปัสสาวะ’,
if(l.labtest=’0581903′ or l.labtest =’13’,’13 ตรวจ CREATININE ในปัสสาวะ’,
if(l.labtest=’0446203′ or l.labtest =’14’,’14 ตรวจโปรตีน Macroalbumin ในปัสสาวะ’,
if(l.labtest=’0581904′ or l.labtest =’15’,’15 ตรวจ eGFR สูตร CKD-EPI’,
if(l.labtest=’0621401′ or l.labtest =’16’,’16 ตรวจ Hb’,
if(l.labtest=’0440205′ or l.labtest =’17’,’17 ตรวจ UPCR’,
if(l.labtest=’0511402′ or l.labtest =’18’,’18 ตรวจ K ckd stage 3 หรือยา ACEI//ARBs’,
if(l.labtest=’0510402′ or l.labtest =’19’,’19 ตรวจ Bicarb ckd stage 3′,
if(l.labtest=’0511202′ or l.labtest =’20’,’20 ตรวจ phosphate ckd stage 3′,
if(l.labtest=’0614402′ or l.labtest =’21’,’21 ตรวจ PTH ckd stage 3′,
Null))))))))))))))))))))) AS tlname,labresult
FROM tmp_labfu l
LEFT JOIN clabtest t ON t.id_labtest = l.labtest
WHERE cid =’$cid’
AND seq=’$seq’ AND hospcode = ‘$hospcode’

ปิดการแสดงความเห็น