예제 #1
0
 private void ABIbtn_btnRadiologyClick(object sender, EventArgs e)
 {
     using (DialogABI dialog = new DialogABI())
     {
         dialog.tpr_id = Program.CurrentRegis.tpr_id;
         dialog.ShowDialog();
     }
 }
예제 #2
0
        //private void showfrm(string pagecode, int tprID, int mhs_id)
        //{
        //    Program.FooterIsclick = false;

        //    InhCheckupDataContext dbc = new InhCheckupDataContext();
        //    mst_room_dtl currentmrd = new mst_room_dtl();
        //    var currentRoomdtl = (from t1 in dbc.mst_room_dtls
        //                          where t1.mst_room_hdr.mrm_code == pagecode
        //                          select t1).FirstOrDefault();
        //    if (currentRoomdtl != null)
        //    {
        //        currentmrd = Program.CurrentRoom;
        //        //Program.CurrentRoom = null;
        //        Program.CurrentRoom = currentRoomdtl;
        //    }
        //    switch (pagecode)
        //    {
        //        case "RG": frmScreeningPage frmRG = new frmScreeningPage();
        //            frmRG.SetTprID = tprID;
        //            frmRG.siteitem = mhs_id;
        //            frmRG.WindowState = FormWindowState.Maximized;
        //            frmRG.ShowDialog();
        //            break;
        //        case "BM": frmBasicMeasurement frmBM = new frmBasicMeasurement();
        //            frmBM.SetTprID = tprID;
        //            frmBM.siteitem = mhs_id;
        //            frmBM.ShowDialog();
        //            break;
        //        case "AB":
        //            //frmABI2 frmAB = new frmABI2();
        //            //frmAB.SetTprID = tprID;
        //            //frmAB.siteitem = mhs_id;
        //            //frmAB.ShowDialog();
        //            openForm("BKvs2010.Forms.ABIFrm", tprID);
        //            break;
        //        case "HS":
        //            //frmHearing frmHS = new frmHearing();
        //            //frmHS.SetTprID = tprID;
        //            //frmHS.siteitem = mhs_id;
        //            //frmHS.ShowDialog();
        //            openForm("BKvs2010.Forms.HearingFrm", tprID);
        //            break;
        //        case "EN":
        //        case "EM":
        //            //frmEye1 frmEM = new frmEye1();
        //            //frmEM.SetTprID = tprID;
        //            //frmEM.siteitem = mhs_id;
        //            //frmEM.ShowDialog();
        //            openForm("BKvs2010.Forms.EyesFrm", tprID);
        //            break;
        //        case "SC": frmScreeningPage frmSC = new frmScreeningPage();
        //            frmSC.SetTprID = tprID; frmSC.siteitem = mhs_id;
        //            frmSC.ShowDialog();
        //            break;
        //        case "PT": frmObstetrics frmPT = new frmObstetrics();
        //            frmPT.SetTprID = tprID; frmPT.siteitem = mhs_id;
        //            frmPT.WindowState = FormWindowState.Maximized;
        //            frmPT.ShowDialog();
        //            break;
        //        case "ES": frmEST frmES = new frmEST();
        //            frmES.SetTprID = tprID; frmES.siteitem = mhs_id;
        //            frmES.WindowState = FormWindowState.Maximized;
        //            frmES.ShowDialog();
        //            break;
        //        case "EK": frmEKG frmEK = new frmEKG();
        //            frmEK.SetTprID = tprID; frmEK.siteitem = mhs_id;
        //            frmEK.ShowDialog();
        //            break;
        //        case "CD": frmCarotid_2 frmCD = new frmCarotid_2();
        //            frmCD.SetTprID = tprID;
        //            frmCD.siteitem = mhs_id;
        //            frmCD.ShowDialog(); break;
        //        case "TE": frmTeeth frmTE = new frmTeeth();
        //            //frmTE.SetTprID = tprID; frmTE.siteitem = mhs_id;
        //            //frmTE.ShowDialog();
        //            openForm("BKvs2010.Forms.DentalFrm", tprID);
        //            break;
        //        case "DM": frmMammogramPage frmDM = new frmMammogramPage();
        //            frmDM.SetTprID = tprID; frmDM.siteitem = mhs_id;
        //            frmDM.WindowState = FormWindowState.Maximized;
        //            frmDM.ShowDialog();
        //            break;
        //        case "DC":
        //            //break;
        //            if (!_isEditEMR)
        //            {
        //                //frmPE frmPE = new frmPE();
        //                //frmPE.SetTprID = tprID;frmPE.siteitem = mhs_id;
        //                //frmPE.WindowState = FormWindowState.Maximized;
        //                //frmPE.ShowDialog();
        //                //break;
        //            }
        //            else
        //            {
        //                frmPE_OutQueue frmPEOut = new frmPE_OutQueue();
        //                frmPEOut.SetTprID = tprID;
        //                frmPEOut.WindowState = FormWindowState.Maximized;
        //                frmPEOut.ShowDialog();
        //            }
        //            break;
        //        case "CC": /*frmCheckPointC frmCC = new frmCheckPointC(); frmCC.ShowDialog();*/ break;
        //        case "XR": frmChestXRay frmXR = new frmChestXRay();
        //            frmXR.SetTprID = tprID; frmXR.siteitem = mhs_id;
        //            frmXR.WindowState = FormWindowState.Maximized;
        //            frmXR.ShowDialog();
        //            break;
        //        case "UG": frmUgiXRay frmUGI = new frmUgiXRay();
        //            frmUGI.SetTprID = tprID;
        //            frmUGI.siteitem = mhs_id;
        //            frmUGI.WindowState = FormWindowState.Maximized;
        //            frmUGI.ShowDialog();
        //            break;
        //        case "PF": frmPFT frmPFT = new frmPFT();
        //            frmPFT.SetTprID = tprID;
        //            frmPFT.siteitem = mhs_id;
        //            frmPFT.WindowState = FormWindowState.Maximized;
        //            frmPFT.ShowDialog();
        //            break;
        //        case "OB":
        //            frmObstetrics frmobg = new frmObstetrics();
        //            frmobg.SetTprID = tprID;
        //            frmobg.siteitem = mhs_id;
        //            frmobg.ShowDialog(); break;
        //        case "BD": frmBMD frmbd = new frmBMD();
        //            frmbd.SetTprID = tprID;
        //            frmbd.siteitem = mhs_id;
        //            frmbd.ShowDialog(); break;
        //        case "PH": frmPHM frmPH = new frmPHM();
        //            frmPH.SetTprID = tprID;
        //            frmPH.siteitem = mhs_id;
        //            frmPH.ShowDialog(); break;
        //        case "CB": /*frmCheckpointB2 frmCB = new frmCheckpointB2(); frmCB.ShowDialog();*/ break;
        //        case "US": frmUltrasound2 frmus = new frmUltrasound2();
        //            frmus.SetTprID = tprID;
        //            frmus.siteitem = mhs_id;
        //            frmus.ShowDialog(); break;
        //        case "BK": break;
        //    }

        //    Program.CurrentRoom = currentmrd;
        //    Program.FooterIsclick = true;
        //    GC.Collect();
        //}
        private void showfrm(string pagecode, int tprID, int mhs_id)
        {
            Program.FooterIsclick = false;

            InhCheckupDataContext dbc        = new InhCheckupDataContext();
            mst_room_dtl          currentmrd = new mst_room_dtl();
            var currentRoomdtl = (from t1 in dbc.mst_room_dtls
                                  where t1.mst_room_hdr.mrm_code == pagecode
                                  select t1).FirstOrDefault();
            var patientDetail = dbc.trn_patient_regis
                                .Where(x => x.tpr_id == tprID)
                                .Select(x => new
            {
                x.trn_patient.tpt_hn_no,
                x.trn_patient.tpt_othername
            }).FirstOrDefault();

            if (currentRoomdtl != null)
            {
                currentmrd = Program.CurrentRoom;
                //Program.CurrentRoom = null;
                Program.CurrentRoom = currentRoomdtl;
            }
            switch (pagecode)
            {
            case "RG": frmScreeningPage frmRG = new frmScreeningPage();
                frmRG.SetTprID    = tprID;
                frmRG.siteitem    = mhs_id;
                frmRG.WindowState = FormWindowState.Maximized;
                frmRG.ShowDialog();
                break;

            case "BM": frmBasicMeasurement frmBM = new frmBasicMeasurement();
                frmBM.SetTprID = tprID;
                frmBM.siteitem = mhs_id;
                frmBM.ShowDialog();
                break;

            case "AB":
                //openForm("BKvs2010.Forms.ABIFrm", tprID);
                using (DialogABI abi = new DialogABI())
                {
                    abi.Text   = abi.Text + " HN : " + patientDetail.tpt_hn_no + " Name : " + patientDetail.tpt_othername;
                    abi.tpr_id = tprID;
                    abi.ShowDialog();
                }
                break;

            case "HS":
                //openForm("BKvs2010.Forms.HearingFrm", tprID);
                using (DialogAudio audio = new DialogAudio())
                {
                    audio.Text   = audio.Text + " HN : " + patientDetail.tpt_hn_no + " Name : " + patientDetail.tpt_othername;
                    audio.tpr_id = tprID;
                    audio.ShowDialog();
                }
                break;

            case "EN":
            case "EM":
                //openForm("BKvs2010.Forms.EyesFrm", tprID);
                using (DialogEyes eyes = new DialogEyes())
                {
                    eyes.Text   = eyes.Text + " HN : " + patientDetail.tpt_hn_no + " Name : " + patientDetail.tpt_othername;
                    eyes.tpr_id = tprID;
                    eyes.ShowDialog();
                }
                break;

            case "SC": frmScreeningPage frmSC = new frmScreeningPage();
                frmSC.SetTprID = tprID; frmSC.siteitem = mhs_id;
                frmSC.ShowDialog();
                break;

            case "PT":
                //frmObstetrics frmPT = new frmObstetrics();
                //frmPT.SetTprID = tprID; frmPT.siteitem = mhs_id;
                //frmPT.WindowState = FormWindowState.Maximized;
                //frmPT.ShowDialog();
                //openForm("BKvs2010.Forms.GYNFrm", tprID);
                using (DialogPAP pap = new DialogPAP())
                {
                    pap.Text   = pap.Text + " HN : " + patientDetail.tpt_hn_no + " Name : " + patientDetail.tpt_othername;
                    pap.tpr_id = tprID;
                    pap.ShowDialog();
                }
                break;

            case "ES":
                //frmEST frmES = new frmEST();
                //frmES.SetTprID = tprID; frmES.siteitem = mhs_id;
                //frmES.WindowState = FormWindowState.Maximized;
                //frmES.ShowDialog();
                //openForm("BKvs2010.Forms.ESTFrm", tprID);
                break;

            case "EK":
                //frmEKG frmEK = new frmEKG();
                //frmEK.SetTprID = tprID; frmEK.siteitem = mhs_id;
                //frmEK.ShowDialog();'
                //openForm("BKvs2010.Forms.EKGFrm", tprID);
                break;

            case "CD":
                //frmCarotid_2 frmCD = new frmCarotid_2();
                //frmCD.SetTprID = tprID;
                //frmCD.siteitem = mhs_id;
                //frmCD.ShowDialog();
                using (DialogCarotid carotid = new DialogCarotid())
                {
                    carotid.Text   = carotid.Text + " HN : " + patientDetail.tpt_hn_no + " Name : " + patientDetail.tpt_othername;
                    carotid.tpr_id = tprID;
                    carotid.ShowDialog();
                }
                break;

            case "TE":
                //openForm("BKvs2010.Forms.DentalFrm", tprID);
                using (DialogDental dental = new DialogDental())
                {
                    dental.Text   = dental.Text + " HN : " + patientDetail.tpt_hn_no + " Name : " + patientDetail.tpt_othername;
                    dental.tpr_id = tprID;
                    dental.ShowDialog();
                }
                break;

            case "DM":
                //frmMammogramPage frmDM = new frmMammogramPage();
                //frmDM.SetTprID = tprID; frmDM.siteitem = mhs_id;
                //frmDM.WindowState = FormWindowState.Maximized;
                //frmDM.ShowDialog();
                //openForm("BKvs2010.Forms.MammogramFrm", tprID);
                break;

            case "DC":
                ////break;
                //if (!_isEditEMR)
                //{
                //    //frmPE frmPE = new frmPE();
                //    //frmPE.SetTprID = tprID;frmPE.siteitem = mhs_id;
                //    //frmPE.WindowState = FormWindowState.Maximized;
                //    //frmPE.ShowDialog();
                //    //break;
                //}
                //else
                //{
                //    frmPE_OutQueue frmPEOut = new frmPE_OutQueue();
                //    frmPEOut.SetTprID = tprID;
                //    frmPEOut.WindowState = FormWindowState.Maximized;
                //    frmPEOut.ShowDialog();
                //}
                break;

            case "XR":
                //openForm("BKvs2010.Forms.ChestXrayFrm", tprID);
                //frmChestXRay frmXR = new frmChestXRay();
                //frmXR.SetTprID = tprID; frmXR.siteitem = mhs_id;
                //frmXR.WindowState = FormWindowState.Maximized;
                //frmXR.ShowDialog();
                break;

            case "UG":
                //openForm("BKvs2010.Forms.UGIFrm", tprID);
                //frmUgiXRay frmUGI = new frmUgiXRay();
                //frmUGI.SetTprID = tprID;
                //frmUGI.siteitem = mhs_id;
                //frmUGI.WindowState = FormWindowState.Maximized;
                //frmUGI.ShowDialog();
                break;

            case "PF":
                //openForm("BKvs2010.Forms.PFTFrm", tprID);
                //frmPFT frmPFT = new frmPFT();
                //frmPFT.SetTprID = tprID;
                //frmPFT.siteitem = mhs_id;
                //frmPFT.WindowState = FormWindowState.Maximized;
                //frmPFT.ShowDialog();
                using (DialogPFT pft = new DialogPFT())
                {
                    pft.Text   = pft.Text + " HN : " + patientDetail.tpt_hn_no + " Name : " + patientDetail.tpt_othername;
                    pft.tpr_id = tprID;
                    pft.ShowDialog();
                }
                break;

            case "OB":
                //frmObstetrics frmobg = new frmObstetrics();
                //frmobg.SetTprID = tprID;
                //frmobg.siteitem = mhs_id;
                //frmobg.ShowDialog();
                using (DialogPAP pap = new DialogPAP())
                {
                    pap.Text   = pap.Text + " HN : " + patientDetail.tpt_hn_no + " Name : " + patientDetail.tpt_othername;
                    pap.tpr_id = tprID;
                    pap.ShowDialog();
                }
                break;

            case "BD":
                //openForm("BKvs2010.Forms.BMDFrm", tprID);
                //frmBMD frmbd = new frmBMD();
                //frmbd.SetTprID = tprID;
                //frmbd.siteitem = mhs_id;
                //frmbd.ShowDialog();
                break;

            case "PH":
            //frmPHM frmPH = new frmPHM();
            //frmPH.SetTprID = tprID;
            //frmPH.siteitem = mhs_id;
            //frmPH.ShowDialog();
            //break;
            case "US":
                //openForm("BKvs2010.Forms.UltrasoundFrm", tprID);
                //frmUltrasound2 frmus = new frmUltrasound2();
                //frmus.SetTprID = tprID;
                //frmus.siteitem = mhs_id;
                //frmus.ShowDialog();
                break;

            case "BK":
            case "CB":
            case "CC":
                break;
            }

            Program.CurrentRoom   = currentmrd;
            Program.FooterIsclick = true;
            GC.Collect();
        }