Beispiel #1
0
 private void getLab(int tpr_id)
 {
     try
     {
         using (InhCheckupDataContext dbc = new InhCheckupDataContext())
         {
             var labResult = dbc.sp_med_exm_report(tpr_id).FirstOrDefault();
             if (labResult.ecg_normal == null && labResult.ecg_abnormal == null)
             {
                 pnlECG.Tag = null;
             }
             else if (labResult.ecg_normal.Length > 0)
             {
                 pnlECG.Tag = 'N';
             }
             else if (labResult.ecg_abnormal.Length > 0)
             {
                 pnlECG.Tag = 'A';
             }
             txtSugar.Text       = "";
             txtAlbumin.Text     = labResult.C0060;
             txtMicro.Text       = labResult.E0020;
             txtCholesterol.Text = "";
             txtTrig.Text        = "";
             txtHDL.Text         = "";
         }
     }
     catch (Exception ex)
     {
         Program.MessageError(this.Name, "getLab", ex, false);
     }
 }
Beispiel #2
0
        private void ShowLabResult(int?tpr_id)
        {
            try
            {
                using (InhCheckupDataContext dbc = new InhCheckupDataContext())
                {
                    trn_doctor_aviation DoctorAviation = bsDoctorAviation.OfType <trn_doctor_aviation>().FirstOrDefault();
                    var labResult = dbc.sp_med_exm_report(tpr_id).FirstOrDefault();
                    if (labResult != null)
                    {
                        txtBlgr.Text  = labResult.A0200;
                        txtRh.Text    = labResult.L0030;
                        txtHb.Text    = labResult.A0001;
                        txtVpc.Text   = "";
                        txtFBS.Text   = labResult.C0180;
                        txtChol.Text  = labResult.C0130;
                        txtTrig.Text  = labResult.C0140;
                        txtHDL.Text   = labResult.C0150;
                        txtLDL.Text   = labResult.C0159;
                        txtSGOT.Text  = labResult.C0040;
                        txtSGPT.Text  = labResult.C0030;
                        txtAlk.Text   = labResult.C0010;
                        txtBun.Text   = labResult.C0080;
                        txtCreat.Text = labResult.C0070;
                        txtUric.Text  = labResult.C0320;
                        txtVDRL.Text  = labResult.P1015;
                        //txtHIV.Text = labResult.X0012 == null ? "Not Test" : "Tested";
                        txtHIV.Text     = labResult.X0012;
                        txtHBsAg.Text   = labResult.N7014;
                        txtSugar.Text   = labResult.D1105;
                        txtAlbumin.Text = labResult.C0060;
                        txtMicro.Text   = labResult.E0020;

                        if (labResult.ecg_normal == null && labResult.ecg_abnormal == null)
                        {
                            radioButton78.Checked = false;
                            radioButton79.Checked = false;
                        }
                        else if (labResult.ecg_normal.Length != 0)
                        {
                            radioButton78.Checked = true;
                        }
                        else if (labResult.ecg_normal.Length != 0)
                        {
                            radioButton79.Checked = true;
                        }

                        if (labResult.chest_x_normal == null && labResult.chest_x_abnormal == null)
                        {
                            radioButton80.Checked = false;
                            radioButton81.Checked = false;
                        }
                        else if (labResult.chest_x_normal.Length != 0)
                        {
                            radioButton80.Checked = true;
                        }
                        else if (labResult.chest_x_normal.Length != 0)
                        {
                            radioButton81.Checked = true;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Program.MessageError(this.Name, "ShowLabResult", ex, false);
            }
        }