public PatientSectionHeaderView(PatientTableSource patTableSource,PatientListView patListController,nint section)
     : base("PatientSectionHeaderView", null)
 {
     this.patTableSource = patTableSource;
     this.patListController = patListController;
     this.section = section;
 }
Пример #2
0
        public PatientTableSource Filter(UISearchBar searchBar,List<PatientItemGroup> tableItems,PatientListView patListControllerObj)
        {
            PatientTableSource tableSource;

            //if (searchBar.Text.Trim () != string.Empty) {
                List<PatientItemGroup> filteredTableItems = new List<PatientItemGroup> ();

                List<IncompleteCases> incompList = (tableItems [0].ListItems).Cast<IncompleteCases> ().ToList ();

                if(searchBar.SelectedScopeButtonIndex ==0)
                    incompList = incompList.FindAll (x => x.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));

                if (searchBar.SelectedScopeButtonIndex == 1) {
                    List<IncompleteCases> surgeonIncompList = new List<IncompleteCases> ();
                    foreach (IncompleteCases inCompCase in incompList) {
                        Dictionary<string, int?> lstSurgeon = new Dictionary<string, int?> ();
                        lstSurgeon.Add ("Surgeon", inCompCase.Surgeon);
                        lstSurgeon.Add ("Surgeon2", inCompCase.Surgeon2);
                        lstSurgeon.Add ("Surgeon3", inCompCase.Surgeon3);

                        string surgeonName = iProPQRSPortableLib.Consts.GetSurgeon (lstSurgeon);

                        if(surgeonName.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()) || searchBar.Text.Trim() == string.Empty )
                            surgeonIncompList.Add(inCompCase);
                    }
                    incompList = surgeonIncompList;
                }

                if (searchBar.SelectedScopeButtonIndex == 2) {
                    List<IncompleteCases> anesthesioIncompList = new List<IncompleteCases> ();
                    foreach (IncompleteCases inCompCase in incompList) {
                        Dictionary<string, int?> lstAnesthesiologists = new Dictionary<string, int?> ();
                        lstAnesthesiologists.Add ("Anesthesiologist1", inCompCase.Anesthesiologist1);
                        lstAnesthesiologists.Add ("Anesthesiologist2", inCompCase.Anesthesiologist2);
                        lstAnesthesiologists.Add ("Anesthesiologist3", inCompCase.Anesthesiologist3);
                        lstAnesthesiologists.Add ("Anesthesiologist4", inCompCase.Anesthesiologist4);

                        string anesthesiologist = iProPQRSPortableLib.Consts.GetAnesthesiologist (lstAnesthesiologists);

                        if(anesthesiologist.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()) || searchBar.Text.Trim() == string.Empty)
                            anesthesioIncompList.Add(inCompCase);
                    }
                    incompList = anesthesioIncompList;
                }

                if (searchBar.SelectedScopeButtonIndex == 3 && !string.IsNullOrEmpty(iProPQRSPortableLib.Consts.mId)) {
                    List<IncompleteCases> anesthesioIncompList = new List<IncompleteCases> ();
                    foreach (IncompleteCases myCase in incompList.FindAll(u=>u.Anesthesiologist1.ToString()==iProPQRSPortableLib.Consts.mId
                    ||u.Anesthesiologist2.ToString()==iProPQRSPortableLib.Consts.mId
                    ||u.Anesthesiologist3.ToString()==iProPQRSPortableLib.Consts.mId
                    ||u.Anesthesiologist4.ToString()==iProPQRSPortableLib.Consts.mId
                    ||u.CRNA1.ToString()==iProPQRSPortableLib.Consts.mId
                    ||u.CRNA2.ToString()==iProPQRSPortableLib.Consts.mId
                    ||u.CRNA3.ToString()==iProPQRSPortableLib.Consts.mId
                    ||u.CRNA4.ToString()==iProPQRSPortableLib.Consts.mId
                    ||u.SRNA1.ToString()==iProPQRSPortableLib.Consts.mId)) {
                        if (searchBar.Text.Trim() == string.Empty|| myCase.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()))
                            anesthesioIncompList.Add (myCase);
                    }
                    incompList = anesthesioIncompList;
                }

                PatientItemGroup tGroup = new PatientItemGroup () {
                    Name="Incomplete Cases"
                };
                foreach (IncompleteCases filtereditem in incompList) {
                    tGroup.ListItems.Add (filtereditem);
                }
                filteredTableItems.Add (tGroup);

                List<ScheduledCases> schedList = (tableItems [1].ListItems).Cast<ScheduledCases> ().ToList ();
                if(searchBar.SelectedScopeButtonIndex ==0)
                    schedList = schedList.FindAll (x => x.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));

                if (searchBar.SelectedScopeButtonIndex == 1) {
                    List<ScheduledCases> surgeonSchedList = new List<ScheduledCases> ();
                    foreach (ScheduledCases schedCase in schedList) {
                        Dictionary<string, int?> lstSurgeon = new Dictionary<string, int?> ();
                        lstSurgeon.Add ("Surgeon", schedCase.Surgeon);
                        lstSurgeon.Add ("Surgeon2", schedCase.Surgeon2);
                        lstSurgeon.Add ("Surgeon3", schedCase.Surgeon3);

                        string surgeonName = iProPQRSPortableLib.Consts.GetSurgeon (lstSurgeon);

                        if(surgeonName.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()) || searchBar.Text.Trim() == string.Empty)
                            surgeonSchedList.Add(schedCase);
                    }
                    schedList = surgeonSchedList;
                }

                if (searchBar.SelectedScopeButtonIndex == 2) {
                    List<ScheduledCases> anesthesioSchedList = new List<ScheduledCases> ();
                    foreach (ScheduledCases schedCase in schedList) {
                        Dictionary<string, int?> lstAnesthesiologists = new Dictionary<string, int?> ();
                        lstAnesthesiologists.Add ("Anesthesiologist1", schedCase.Anesthesiologist1);
                        lstAnesthesiologists.Add ("Anesthesiologist2", schedCase.Anesthesiologist2);
                        lstAnesthesiologists.Add ("Anesthesiologist3", schedCase.Anesthesiologist3);
                        lstAnesthesiologists.Add ("Anesthesiologist4", schedCase.Anesthesiologist4);

                        string anesthesiologist = iProPQRSPortableLib.Consts.GetAnesthesiologist (lstAnesthesiologists);

                        if(anesthesiologist.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()) || searchBar.Text.Trim() == string.Empty)
                            anesthesioSchedList.Add(schedCase);
                    }
                    schedList = anesthesioSchedList;
                }
            if (searchBar.SelectedScopeButtonIndex == 3 && !string.IsNullOrEmpty(iProPQRSPortableLib.Consts.mId)) {

                List<ScheduledCases> ScheduledCasesList = new List<ScheduledCases> ();
                foreach (ScheduledCases myCase in ScheduledCasesList.FindAll(u=>u.Anesthesiologist1.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist2.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist3.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist4.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA1.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA2.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA3.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA4.ToString()==iProPQRSPortableLib.Consts.mId||u.SRNA1.ToString()==iProPQRSPortableLib.Consts.mId)) {
                    if (searchBar.Text.Trim() == string.Empty|| myCase.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()))
                        ScheduledCasesList.Add (myCase);
                }
                schedList = ScheduledCasesList;
            }

                PatientItemGroup tGroup2 = new PatientItemGroup () {
                    Name="Scheduled Cases"
                };
                foreach (ScheduledCases filtereditem in schedList) {
                    tGroup2.ListItems.Add (filtereditem);
                }
                filteredTableItems.Add (tGroup2);

                //In Processs Cases

                List<InProcessCases> inProcesssList = (tableItems [2].ListItems).Cast<InProcessCases> ().ToList ();
                if(searchBar.SelectedScopeButtonIndex ==0)
                    inProcesssList = inProcesssList.FindAll (x => x.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));

                if (searchBar.SelectedScopeButtonIndex == 1) {
                    List<InProcessCases> surgeonInProcessList = new List<InProcessCases> ();
                    foreach (InProcessCases inProcessCase in inProcesssList) {
                        Dictionary<string, int?> lstSurgeon = new Dictionary<string, int?> ();
                        lstSurgeon.Add ("Surgeon", inProcessCase.Surgeon);
                        lstSurgeon.Add ("Surgeon2", inProcessCase.Surgeon2);
                        lstSurgeon.Add ("Surgeon3", inProcessCase.Surgeon3);

                        string surgeonName = iProPQRSPortableLib.Consts.GetSurgeon (lstSurgeon);

                        if(surgeonName.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()) || searchBar.Text.Trim() == string.Empty)
                            surgeonInProcessList.Add(inProcessCase);
                    }
                    inProcesssList = surgeonInProcessList;
                }

                if (searchBar.SelectedScopeButtonIndex == 2) {
                    List<InProcessCases> anesthesioInProcessList = new List<InProcessCases> ();
                    foreach (InProcessCases inProcessCase in inProcesssList) {
                        Dictionary<string, int?> lstAnesthesiologists = new Dictionary<string, int?> ();
                        lstAnesthesiologists.Add ("Anesthesiologist1", inProcessCase.Anesthesiologist1);
                        lstAnesthesiologists.Add ("Anesthesiologist2", inProcessCase.Anesthesiologist2);
                        lstAnesthesiologists.Add ("Anesthesiologist3", inProcessCase.Anesthesiologist3);
                        lstAnesthesiologists.Add ("Anesthesiologist4", inProcessCase.Anesthesiologist4);

                        string anesthesiologist = iProPQRSPortableLib.Consts.GetAnesthesiologist (lstAnesthesiologists);

                        if(anesthesiologist.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()) || searchBar.Text.Trim() == string.Empty)
                            anesthesioInProcessList.Add(inProcessCase);
                    }
                    inProcesssList = anesthesioInProcessList;
                }
            if (searchBar.SelectedScopeButtonIndex == 3 && !string.IsNullOrEmpty(iProPQRSPortableLib.Consts.mId)) {

                List<InProcessCases> InProcessCasesList = new List<InProcessCases> ();
                foreach (InProcessCases myCase in InProcessCasesList.FindAll(u=>u.Anesthesiologist1.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist2.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist3.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist4.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA1.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA2.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA3.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA4.ToString()==iProPQRSPortableLib.Consts.mId||u.SRNA1.ToString()==iProPQRSPortableLib.Consts.mId)) {
                        if (searchBar.Text.Trim() == string.Empty|| myCase.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()))
                        InProcessCasesList.Add (myCase);
                    }
                inProcesssList = InProcessCasesList;
                }
                PatientItemGroup tGroup3 = new PatientItemGroup () {
                    Name="In Processs Cases"
                };
                foreach (InProcessCases filtereditem in inProcesssList) {
                    tGroup3.ListItems.Add (filtereditem);
                }
                filteredTableItems.Add (tGroup3);

                // Completed Cases

                List<CompletedCases> CompletedList = (tableItems [3].ListItems).Cast<CompletedCases> ().ToList ();
                if(searchBar.SelectedScopeButtonIndex ==0)
                    CompletedList = CompletedList.FindAll (x => x.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));

                if (searchBar.SelectedScopeButtonIndex == 1) {
                    List<CompletedCases> surgeonCompleteList = new List<CompletedCases> ();
                    foreach (CompletedCases completeCase in CompletedList) {
                        Dictionary<string, int?> lstSurgeon = new Dictionary<string, int?> ();
                        lstSurgeon.Add ("Surgeon", completeCase.Surgeon);
                        lstSurgeon.Add ("Surgeon2", completeCase.Surgeon2);
                        lstSurgeon.Add ("Surgeon3", completeCase.Surgeon3);

                        string surgeonName = iProPQRSPortableLib.Consts.GetSurgeon (lstSurgeon);

                        if(surgeonName.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()) || searchBar.Text.Trim() == string.Empty)
                            surgeonCompleteList.Add(completeCase);
                    }
                    CompletedList = surgeonCompleteList;
                }

                if (searchBar.SelectedScopeButtonIndex == 2) {
                    List<CompletedCases> anesthesioCompleteList = new List<CompletedCases> ();
                    foreach (CompletedCases completeCase in CompletedList) {
                        Dictionary<string, int?> lstAnesthesiologists = new Dictionary<string, int?> ();
                        lstAnesthesiologists.Add ("Anesthesiologist1", completeCase.Anesthesiologist1);
                        lstAnesthesiologists.Add ("Anesthesiologist2", completeCase.Anesthesiologist2);
                        lstAnesthesiologists.Add ("Anesthesiologist3", completeCase.Anesthesiologist3);
                        lstAnesthesiologists.Add ("Anesthesiologist4", completeCase.Anesthesiologist4);

                        string anesthesiologist = iProPQRSPortableLib.Consts.GetAnesthesiologist (lstAnesthesiologists);

                        if(anesthesiologist.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()) || searchBar.Text.Trim() == string.Empty)
                            anesthesioCompleteList.Add(completeCase);
                    }
                    CompletedList = anesthesioCompleteList;
                }
            if (searchBar.SelectedScopeButtonIndex == 3 && !string.IsNullOrEmpty(iProPQRSPortableLib.Consts.mId)) {

                List<CompletedCases> CompletedCasesList = new List<CompletedCases> ();
                foreach (CompletedCases myCase in CompletedCasesList.FindAll(u=>u.Anesthesiologist1.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist2.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist3.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist4.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA1.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA2.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA3.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA4.ToString()==iProPQRSPortableLib.Consts.mId||u.SRNA1.ToString()==iProPQRSPortableLib.Consts.mId)) {
                        if (searchBar.Text.Trim() == string.Empty|| myCase.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()))
                        CompletedCasesList.Add (myCase);
                    }
                CompletedList = CompletedCasesList;
                }
                PatientItemGroup tGroup4 = new PatientItemGroup () {
                    Name="Completed Cases"
                };
                foreach (CompletedCases filtereditem in CompletedList) {
                    tGroup4.ListItems.Add (filtereditem);
                }
                filteredTableItems.Add (tGroup4);

                //Cancelled cases

                List<CancelledCases> CancelledList = (tableItems [4].ListItems).Cast<CancelledCases> ().ToList ();
                if(searchBar.SelectedScopeButtonIndex ==0)
                    CancelledList = CancelledList.FindAll (x => x.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));

                if (searchBar.SelectedScopeButtonIndex == 1) {
                    List<CancelledCases> surgeonCancelledList = new List<CancelledCases> ();
                    foreach (CancelledCases cancelledCase in CancelledList) {
                        Dictionary<string, int?> lstSurgeon = new Dictionary<string, int?> ();
                        lstSurgeon.Add ("Surgeon", cancelledCase.Surgeon);
                        lstSurgeon.Add ("Surgeon2", cancelledCase.Surgeon2);
                        lstSurgeon.Add ("Surgeon3", cancelledCase.Surgeon3);

                        string surgeonName = iProPQRSPortableLib.Consts.GetSurgeon (lstSurgeon);

                        if(surgeonName.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()) || searchBar.Text.Trim() == string.Empty)
                            surgeonCancelledList.Add(cancelledCase);
                    }
                    CancelledList = surgeonCancelledList;
                }

                if (searchBar.SelectedScopeButtonIndex == 2) {
                    List<CancelledCases> anesthesioCancelledList = new List<CancelledCases> ();
                    foreach (CancelledCases cancelledCase in CancelledList) {
                        Dictionary<string, int?> lstAnesthesiologists = new Dictionary<string, int?> ();
                        lstAnesthesiologists.Add ("Anesthesiologist1", cancelledCase.Anesthesiologist1);
                        lstAnesthesiologists.Add ("Anesthesiologist2", cancelledCase.Anesthesiologist2);
                        lstAnesthesiologists.Add ("Anesthesiologist3", cancelledCase.Anesthesiologist3);
                        lstAnesthesiologists.Add ("Anesthesiologist4", cancelledCase.Anesthesiologist4);

                        string anesthesiologist = iProPQRSPortableLib.Consts.GetAnesthesiologist (lstAnesthesiologists);

                        if(anesthesiologist.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()) || searchBar.Text.Trim() == string.Empty)
                            anesthesioCancelledList.Add(cancelledCase);
                    }
                    CancelledList = anesthesioCancelledList;
                }
            if (searchBar.SelectedScopeButtonIndex == 3 && !string.IsNullOrEmpty(iProPQRSPortableLib.Consts.mId)) {

                List<CancelledCases> CancelledCasesList = new List<CancelledCases> ();
                foreach (CancelledCases myCase in CancelledCasesList.FindAll(u=>u.Anesthesiologist1.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist2.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist3.ToString()==iProPQRSPortableLib.Consts.mId||u.Anesthesiologist4.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA1.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA2.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA3.ToString()==iProPQRSPortableLib.Consts.mId||u.CRNA4.ToString()==iProPQRSPortableLib.Consts.mId||u.SRNA1.ToString()==iProPQRSPortableLib.Consts.mId)) {
                        if (searchBar.Text.Trim() == string.Empty|| myCase.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()))
                        CancelledCasesList.Add (myCase);
                    }
                CancelledList = CancelledCasesList;
                }
                PatientItemGroup tGroup5 = new PatientItemGroup () {
                    Name="Cancelled cases"
                };
                foreach (CancelledCases filtereditem in CancelledList) {
                    tGroup4.ListItems.Add (filtereditem);
                }
                filteredTableItems.Add (tGroup5);

                tableSource = new PatientTableSource (filteredTableItems, patListControllerObj);
            //}else
            //	tableSource = new PatientTableSource (tableItems, patListControllerObj);

            return tableSource;
        }
Пример #3
0
        public PatientTableSource FilterTable(UISearchBar searchBar,List<ProcedureItemGroup> sentTableItems,PatientListView patListControllerObj)
        {
            PatientTableSource tableSource;
            List<ProcedureItemGroup> filteredTableItems = new List<ProcedureItemGroup> ();

            ProcedureItemGroup tGroup;
            List<PatientProcedureDetails> inCompleteCases = new List<PatientProcedureDetails>();
            List<PatientProcedureDetails> scheduledCases = new List<PatientProcedureDetails>();
            List<PatientProcedureDetails> inProcessCases = new List<PatientProcedureDetails>();
            List<PatientProcedureDetails> completedCases = new List<PatientProcedureDetails>();
            List<PatientProcedureDetails> cancelledCases = new List<PatientProcedureDetails>();

            if (searchBar.SelectedScopeButtonIndex == 0) {
                inCompleteCases = sentTableItems [0].PatientProcedureListItems.FindAll (x => x.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
                scheduledCases = sentTableItems [1].PatientProcedureListItems.FindAll (x => x.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
                inProcessCases = sentTableItems [2].PatientProcedureListItems.FindAll (x => x.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
                completedCases = sentTableItems [3].PatientProcedureListItems.FindAll (x => x.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
                cancelledCases = sentTableItems [4].PatientProcedureListItems.FindAll (x => x.PatientName.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
            }

            if (searchBar.SelectedScopeButtonIndex == 1) {
                inCompleteCases = sentTableItems [0].PatientProcedureListItems.FindAll (x => x.surgeon != null && x.surgeon.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
                scheduledCases = sentTableItems [1].PatientProcedureListItems.FindAll (x => x.surgeon != null &&  x.surgeon.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
                inProcessCases = sentTableItems [2].PatientProcedureListItems.FindAll (x => x.surgeon != null &&  x.surgeon.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
                completedCases = sentTableItems [3].PatientProcedureListItems.FindAll (x => x.surgeon != null &&  x.surgeon.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
                cancelledCases = sentTableItems [4].PatientProcedureListItems.FindAll (x => x.surgeon != null &&  x.surgeon.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
            }

            if (searchBar.SelectedScopeButtonIndex == 2) {
                inCompleteCases = sentTableItems [0].PatientProcedureListItems.FindAll (x => x.Anestheologist!=null && x.Anestheologist.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()));
                scheduledCases = sentTableItems [1].PatientProcedureListItems.FindAll (x => x.Anestheologist!=null &&  x.Anestheologist.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()));
                inProcessCases = sentTableItems [2].PatientProcedureListItems.FindAll (x => x.Anestheologist!=null &&  x.Anestheologist.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()));
                completedCases = sentTableItems [3].PatientProcedureListItems.FindAll (x => x.Anestheologist!=null &&  x.Anestheologist.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()));
                cancelledCases = sentTableItems [4].PatientProcedureListItems.FindAll (x => x.Anestheologist!=null &&  x.Anestheologist.Trim().ToLower().Contains(searchBar.Text.Trim().ToLower()));
            }

            if (searchBar.SelectedScopeButtonIndex == 3 && !string.IsNullOrEmpty(iProPQRSPortableLib.Consts.mId)) {
                //NAHID Ahmed, July 23, 2015
                //Need to discuss with Anand and get details related to Anesthesiologist1,2,3,4 and
                //CRNA1,2,3,4 and SRNA1
            }

            if (searchBar.SelectedScopeButtonIndex == 3 ) {
            //				inCompleteCases = sentTableItems [0].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null && x.Anestheologist.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
            //				scheduledCases = sentTableItems [1].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null && x.Anestheologist.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
            //				inProcessCases = sentTableItems [2].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null && x.Anestheologist.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
            //				completedCases = sentTableItems [3].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null && x.Anestheologist.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
            //				cancelledCases = sentTableItems [4].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null && x.Anestheologist.Trim ().ToLower ().Contains (searchBar.Text.Trim ().ToLower ()));
            //				string anestheologist = string.Empty;
            //				if (iProPQRSPortableLib.Consts.LoginUserFullName.Trim () != string.Empty) {
            //					string[] anesArr = iProPQRSPortableLib.Consts.LoginUserFullName.Split (',');
            //					if(anesArr.Length > 1)
            //						anestheologist = anesArr [1].Trim().ToLower() + " " + anesArr [0].Trim().ToLower();
            //				}
            //				inCompleteCases = sentTableItems [0].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null && x.Anestheologist.Trim ().ToLower ().Contains (anestheologist));
            //				scheduledCases = sentTableItems [1].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null && x.Anestheologist.Trim ().ToLower ().Contains (anestheologist));
            //				inProcessCases = sentTableItems [2].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null && x.Anestheologist.Trim ().ToLower ().Contains (anestheologist));
            //				completedCases = sentTableItems [3].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null && x.Anestheologist.Trim ().ToLower ().Contains (anestheologist));
            //				cancelledCases = sentTableItems [4].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null && x.Anestheologist.Trim ().ToLower ().Contains (anestheologist));
                inCompleteCases = sentTableItems [0].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null);
                scheduledCases = sentTableItems [1].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null);
                inProcessCases = sentTableItems [2].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null);
                completedCases = sentTableItems [3].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null);
                cancelledCases = sentTableItems [4].PatientProcedureListItems.FindAll (x => x.IsMyCase == true &&  x.Anestheologist!=null);
            }

            tGroup = new ProcedureItemGroup () {
                StatusName="Incomplete Cases"
            };
            foreach (PatientProcedureDetails filtereditem in inCompleteCases) {
                tGroup.PatientProcedureListItems.Add (filtereditem);
            }
            filteredTableItems.Add (tGroup);

            tGroup = new ProcedureItemGroup () {
                StatusName="Scheduled Cases"
            };
            foreach (PatientProcedureDetails filtereditem in scheduledCases) {
                tGroup.PatientProcedureListItems.Add (filtereditem);
            }
            filteredTableItems.Add (tGroup);

            tGroup = new ProcedureItemGroup () {
                StatusName="Inprocess Cases"
            };
            foreach (PatientProcedureDetails filtereditem in inProcessCases) {
                tGroup.PatientProcedureListItems.Add (filtereditem);
            }
            filteredTableItems.Add (tGroup);

            tGroup = new ProcedureItemGroup () {
                StatusName="Completed Cases"
            };
            foreach (PatientProcedureDetails filtereditem in completedCases) {
                tGroup.PatientProcedureListItems.Add (filtereditem);
            }
            filteredTableItems.Add (tGroup);

            tGroup = new ProcedureItemGroup () {
                StatusName="Cancelled Cases"
            };
            foreach (PatientProcedureDetails filtereditem in cancelledCases) {
                tGroup.PatientProcedureListItems.Add (filtereditem);
            }
            filteredTableItems.Add (tGroup);

            tableSource = new PatientTableSource (filteredTableItems, patListControllerObj);

            return tableSource;
        }
Пример #4
0
		protected void PopulateTableItems()
		{
			procTableItems = new List<ProcedureItemGroup> ();
		

			ProcedureItemGroup tGroup = new ProcedureItemGroup ();
			tGroup.StatusName = "Incomplete Cases";
			if (iProPQRSPortableLib.Consts.PatientInfo.result != null) {

				List<PatientProcedureDetails> inCompleteCases = iProPQRSPortableLib.Consts.PatientInfo.result.FindAll ((PatientProcedureDetails obj) => obj.Status == "Incomplete");
				foreach (PatientProcedureDetails patDet in inCompleteCases) {
					patDet.PatientName = patDet.LastName + ", " + patDet.FirstName;
					tGroup.PatientProcedureListItems.Add (patDet);
				}
				procTableItems.Add (tGroup);

				tGroup = new ProcedureItemGroup ();
				tGroup.StatusName = "Scheduled Cases";

				List<PatientProcedureDetails> scheduledCases = iProPQRSPortableLib.Consts.PatientInfo.result.FindAll ((PatientProcedureDetails obj) => obj.Status == "Scheduled");
				foreach (PatientProcedureDetails patDet in scheduledCases) {
					patDet.PatientName = patDet.LastName + ", " + patDet.FirstName;
					tGroup.PatientProcedureListItems.Add (patDet);
				}
				procTableItems.Add (tGroup);

				tGroup = new ProcedureItemGroup ();
				tGroup.StatusName = "In Process Cases";

				List<PatientProcedureDetails> inProcessCases = iProPQRSPortableLib.Consts.PatientInfo.result.FindAll ((PatientProcedureDetails obj) => obj.Status == "In Process");
				foreach (PatientProcedureDetails patDet in inProcessCases) {
					patDet.PatientName = patDet.LastName + ", " + patDet.FirstName;
					tGroup.PatientProcedureListItems.Add (patDet);
				}
			}
			procTableItems.Add (tGroup);


			tGroup = new ProcedureItemGroup ();
			tGroup.StatusName = "Completed Cases";

			List<PatientProcedureDetails> completedCases = iProPQRSPortableLib.Consts.PatientInfo.result.FindAll ((PatientProcedureDetails obj) => obj.Status == "Completed");
			foreach (PatientProcedureDetails patDet in completedCases) {
				patDet.PatientName = patDet.LastName + ", " + patDet.FirstName;
				tGroup.PatientProcedureListItems.Add (patDet);
			}
			procTableItems.Add (tGroup);

			tGroup = new ProcedureItemGroup ();
			tGroup.StatusName = "Cancelled Cases";

			List<PatientProcedureDetails> cancelledCases = iProPQRSPortableLib.Consts.PatientInfo.result.FindAll ((PatientProcedureDetails obj) => obj.Status == "Cancelled");
			foreach (PatientProcedureDetails patDet in cancelledCases) {
				patDet.PatientName = patDet.LastName + ", " + patDet.FirstName;
				tGroup.PatientProcedureListItems.Add (patDet);
			}
			procTableItems.Add (tGroup);
			tableSource = new PatientTableSource (procTableItems,this);

		}