private void SetRadiologyHearing(int?tpr_id) { try { using (InhCheckupDataContext cdc = new InhCheckupDataContext()) { string hearing = cdc.trn_patient_events .Where(x => x.tpr_id == tpr_id && x.mst_event.mvt_code == "HS") .Select(x => x.mst_event.mvt_ename) .FirstOrDefault(); if (!string.IsNullOrEmpty(hearing)) { Usercontrols.RadiologyUC.BtnRadiology HearingBtn = new Usercontrols.RadiologyUC.BtnRadiology(); HearingBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(HearingBtn_btnRadiologyClick); HearingBtn.tooltipText = hearing; rlgHearing.AddButtonRadiology(HearingBtn); } } } catch (Exception ex) { Program.MessageError(this.Name, "SetRadiologyHearing()", ex, false); } }
private void SetRadiologyPhyExam(int?tpr_id) { try { Usercontrols.RadiologyUC.BtnRadiology PhyExamBtn = new Usercontrols.RadiologyUC.BtnRadiology(); PhyExamBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(PhyExamBtn_btnRadiologyClick); PhyExamBtn.tooltipText = "Physical Exam"; rlgPhyEx.AddButtonRadiology(PhyExamBtn); } catch (Exception ex) { Program.MessageError(this.Name, "SetRadiologyPhyExam()", ex, false); } }
private void SetRadiologyEST(int?tpr_id) { try { using (InhCheckupDataContext cdc = new InhCheckupDataContext()) { int est = cdc.trn_patient_events .Where(x => x.tpr_id == tpr_id && x.mst_event.mvt_code == "ES") .Count(); if (est > 0) { Usercontrols.RadiologyUC.BtnRadiology ESTBtn = new Usercontrols.RadiologyUC.BtnRadiology(); ESTBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(ESTBtn_btnRadiologyClick); ESTBtn.tooltipText = "EST"; rlgEST.AddButtonRadiology(ESTBtn); } } } catch (Exception ex) { Program.MessageError(this.Name, "SetRadiologyEST()", ex, false); } }
private void SetRadiologyXray(int?tpr_id) { try { using (InhCheckupDataContext cdc = new InhCheckupDataContext()) { trn_patient_regi patientRegis = cdc.trn_patient_regis.Where(x => x.tpr_id == tpr_id).FirstOrDefault(); string xr = cdc.trn_patient_events .Where(x => x.tpr_id == tpr_id && x.mst_event.mvt_code == "XR") .Select(x => x.mst_event.mvt_ename) .FirstOrDefault(); if (!string.IsNullOrEmpty(xr)) { Usercontrols.RadiologyUC.BtnRadiology XrayBtn = new Usercontrols.RadiologyUC.BtnRadiology(); XrayBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(XrayBtn_btnRadiologyClick); rlgXray.AddButtonRadiology(XrayBtn); trn_chest_xray chestXray = patientRegis.trn_chest_xrays.Where(x => x.tcx_en_no == x.trn_patient_regi.tpr_en_no).OrderByDescending(x => x.tcx_result_date).FirstOrDefault(); if (chestXray != null) { XrayBtn.tooltipText = chestXray.tcx_result; } else { XrayBtn.tooltipText = xr; } } string dm = cdc.trn_patient_events .Where(x => x.tpr_id == tpr_id && x.mst_event.mvt_code == "DM") .Select(x => x.mst_event.mvt_ename) .FirstOrDefault(); if (!string.IsNullOrEmpty(dm)) { Usercontrols.RadiologyUC.BtnRadiology mamBtn = new Usercontrols.RadiologyUC.BtnRadiology(); mamBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(mamBtn_btnRadiologyClick); rlgXray.AddButtonRadiology(mamBtn); trn_mammogram mam = patientRegis.trn_mammograms.Where(x => x.tmg_en_no == x.trn_patient_regi.tpr_en_no).OrderByDescending(x => x.tmg_result_date).FirstOrDefault(); if (mam != null) { mamBtn.tooltipText = mam.tmg_result; } else { mamBtn.tooltipText = dm; } } string uw = cdc.trn_patient_events .Where(x => x.tpr_id == tpr_id && x.mst_event.mvt_code == "UW") .Select(x => x.mst_event.mvt_ename) .FirstOrDefault(); if (!string.IsNullOrEmpty(uw)) { Usercontrols.RadiologyUC.BtnRadiology uwBtn = new Usercontrols.RadiologyUC.BtnRadiology(); uwBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(uwBtn_btnRadiologyClick); rlgXray.AddButtonRadiology(uwBtn); trn_ultrasound usUW = patientRegis.trn_ultrasounds.Where(x => x.tus_ultra_type == "UW" && x.tus_en_no == x.trn_patient_regi.tpr_en_no).OrderByDescending(x => x.tus_result_date).FirstOrDefault(); if (usUW != null) { uwBtn.tooltipText = usUW.tus_result; } else { uwBtn.tooltipText = uw; } } string uu = cdc.trn_patient_events .Where(x => x.tpr_id == tpr_id && x.mst_event.mvt_code == "UU") .Select(x => x.mst_event.mvt_ename) .FirstOrDefault(); if (!string.IsNullOrEmpty(uu)) { Usercontrols.RadiologyUC.BtnRadiology uuBtn = new Usercontrols.RadiologyUC.BtnRadiology(); uuBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(uuBtn_btnRadiologyClick); rlgXray.AddButtonRadiology(uuBtn); trn_ultrasound usUU = patientRegis.trn_ultrasounds.Where(x => x.tus_ultra_type == "UU" && x.tus_en_no == x.trn_patient_regi.tpr_en_no).OrderByDescending(x => x.tus_result_date).FirstOrDefault(); if (usUU != null) { uuBtn.tooltipText = usUU.tus_result; } else { uuBtn.tooltipText = uu; } } string ul = cdc.trn_patient_events .Where(x => x.tpr_id == tpr_id && x.mst_event.mvt_code == "UL") .Select(x => x.mst_event.mvt_ename) .FirstOrDefault(); if (!string.IsNullOrEmpty(ul)) { Usercontrols.RadiologyUC.BtnRadiology ulBtn = new Usercontrols.RadiologyUC.BtnRadiology(); ulBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(ulBtn_btnRadiologyClick); rlgXray.AddButtonRadiology(ulBtn); trn_ultrasound usUL = patientRegis.trn_ultrasounds.Where(x => x.tus_ultra_type == "UL" && x.tus_en_no == x.trn_patient_regi.tpr_en_no).OrderByDescending(x => x.tus_result_date).FirstOrDefault(); if (usUL != null) { ulBtn.tooltipText = usUL.tus_result; } else { ulBtn.tooltipText = ul; } } string ub = cdc.trn_patient_events .Where(x => x.tpr_id == tpr_id && x.mst_event.mvt_code == "UB") .Select(x => x.mst_event.mvt_ename) .FirstOrDefault(); if (!string.IsNullOrEmpty(ub)) { Usercontrols.RadiologyUC.BtnRadiology ubBtn = new Usercontrols.RadiologyUC.BtnRadiology(); ubBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(ubBtn_btnRadiologyClick); rlgXray.AddButtonRadiology(ubBtn); trn_ultrasound usUB = patientRegis.trn_ultrasounds.Where(x => x.tus_ultra_type == "UB" && x.tus_en_no == x.trn_patient_regi.tpr_en_no).OrderByDescending(x => x.tus_result_date).FirstOrDefault(); if (usUB != null) { ubBtn.tooltipText = usUB.tus_result; } else { ubBtn.tooltipText = ub; } } string bd = cdc.trn_patient_events .Where(x => x.tpr_id == tpr_id && x.mst_event.mvt_code == "BD") .Select(x => x.mst_event.mvt_ename) .FirstOrDefault(); if (!string.IsNullOrEmpty(bd)) { Usercontrols.RadiologyUC.BtnRadiology bmdBtn = new Usercontrols.RadiologyUC.BtnRadiology(); bmdBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(bmdBtn_btnRadiologyClick); rlgXray.AddButtonRadiology(bmdBtn); trn_bmd bmd = patientRegis.trn_bmds.Where(x => x.bmd_en_no == x.trn_patient_regi.tpr_en_no).OrderByDescending(x => x.bmd_result_date).FirstOrDefault(); if (bmd != null) { bmdBtn.tooltipText = bmd.bmd_result; } else { bmdBtn.tooltipText = bd; } } string ug = cdc.trn_patient_events .Where(x => x.tpr_id == tpr_id && x.mst_event.mvt_code == "UG") .Select(x => x.mst_event.mvt_ename) .FirstOrDefault(); if (!string.IsNullOrEmpty(ug)) { Usercontrols.RadiologyUC.BtnRadiology ugiBtn = new Usercontrols.RadiologyUC.BtnRadiology(); ugiBtn.btnRadiologyClick += new Usercontrols.RadiologyUC.BtnRadiology.OnBtnRadiologyClick(ugiBtn_btnRadiologyClick); rlgXray.AddButtonRadiology(ugiBtn); trn_ugi_xray ugi = patientRegis.trn_ugi_xrays.Where(x => x.tug_en_no == x.trn_patient_regi.tpr_en_no).OrderByDescending(x => x.tug_result_date).FirstOrDefault(); if (ugi != null) { ugiBtn.tooltipText = ugi.tug_result; } else { ugiBtn.tooltipText = ug; } } } } catch (Exception ex) { Program.MessageError(this.Name, "SetRadiologyXray(ref trn_patient_regi _patientRegis)", ex, false); } }