private void FillPlanData() { gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col; //col=new ODGridColumn(Lan.g("TableInsPlans","#"),20); //gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Subscriber"), 140); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Ins Carrier"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Date Effect."), 90); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Date Term."), 90); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Used By"), 90); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; //PatPlan[] patPlanArray; InsPlan plan; for (int i = 0; i < SubList.Count; i++) { row = new ODGridRow(); //row.Cells.Add((i+1).ToString()); row.Cells.Add(FamCur.GetNameInFamLF(SubList[i].Subscriber)); plan = InsPlans.GetPlan(SubList[i].PlanNum, PlanList); row.Cells.Add(Carriers.GetName(plan.CarrierNum)); if (SubList[i].DateEffective.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateEffective.ToString("d")); } if (SubList[i].DateTerm.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateTerm.ToString("d")); } int countPatPlans = PatPlans.GetCountBySubNum(SubList[i].InsSubNum); row.Cells.Add(countPatPlans.ToString()); gridMain.Rows.Add(row); } gridMain.EndUpdate(); listRelat.Items.Clear(); for (int i = 0; i < Enum.GetNames(typeof(Relat)).Length; i++) { listRelat.Items.Add(Lan.g("enumRelat", Enum.GetNames(typeof(Relat))[i])); } }
private void FillGrid() { SubList = InsSubs.RefreshForFam(FamCur); if (!InsSubs.ValidatePlanNumForList(SubList.Select(x => x.InsSubNum).ToList())) { SubList = InsSubs.RefreshForFam(FamCur); } PlanList = InsPlans.RefreshForSubList(SubList); gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col; //=new ODGridColumn(Lan.g("TableInsPlans","#"),20); //gridMain.Columns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Subscriber"), 140); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Ins Carrier"), 100); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Date Effect."), 90); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Date Term."), 90); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Used By"), 90); gridMain.ListGridColumns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; //PatPlan[] patPlanArray; InsPlan plan; for (int i = 0; i < SubList.Count; i++) { plan = InsPlans.GetPlan(SubList[i].PlanNum, PlanList); row = new GridRow(); row.Cells.Add(FamCur.GetNameInFamLF(SubList[i].Subscriber)); row.Cells.Add(Carriers.GetName(plan.CarrierNum)); if (SubList[i].DateEffective.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateEffective.ToString("d")); } if (SubList[i].DateTerm.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateTerm.ToString("d")); } int countPatPlans = PatPlans.GetCountBySubNum(SubList[i].InsSubNum); row.Cells.Add(countPatPlans.ToString()); gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); }
private void butCurrent_Click(object sender, EventArgs e) { if (FormOpenDental.CurPatNum == 0) { return; } Family fam = Patients.GetFamily(FormOpenDental.CurPatNum); textPatient.Text = fam.GetNameInFamLF(FormOpenDental.CurPatNum); _listSelectedFamPatNums = fam.ListPats.Select(x => x.PatNum).ToList(); FillGrid(); }
private void FillPlanData() { gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g("TableInsPlans", "#"), 20); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Subscriber"), 140); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Ins Carrier"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Date Effect."), 90); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Date Term."), 90); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; for (int i = 0; i < PlanList.Length; i++) { row = new ODGridRow(); row.Cells.Add((i + 1).ToString()); row.Cells.Add(FamCur.GetNameInFamLF(PlanList[i].Subscriber)); row.Cells.Add(Carriers.GetName(PlanList[i].CarrierNum)); if (PlanList[i].DateEffective.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(PlanList[i].DateEffective.ToString("d")); } if (PlanList[i].DateTerm.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(PlanList[i].DateTerm.ToString("d")); } gridMain.Rows.Add(row); } gridMain.EndUpdate(); listRelat.Items.Clear(); for (int i = 0; i < Enum.GetNames(typeof(Relat)).Length; i++) { listRelat.Items.Add(Lan.g("enumRelat", Enum.GetNames(typeof(Relat))[i])); } }
private void butFind_Click(object sender, EventArgs e) { FormPatientSelect FormPS = new FormPatientSelect(); FormPS.SelectionModeOnly = true; if (FormPS.ShowDialog() != DialogResult.OK) { return; } Family fam = Patients.GetFamily(FormPS.SelectedPatNum); textPatient.Text = fam.GetNameInFamLF(FormPS.SelectedPatNum); _listSelectedFamPatNums = fam.ListPats.Select(x => x.PatNum).ToList(); FillGrid(); }
private void FillGrid() { PlanList = InsPlans.Refresh(FamCur); gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g("TableInsPlans", "#"), 20); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Subscriber"), 140); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Ins Carrier"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Date Effect."), 90); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("TableInsPlans", "Date Term."), 90); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; for (int i = 0; i < PlanList.Length; i++) { row = new ODGridRow(); row.Cells.Add((i + 1).ToString()); row.Cells.Add(FamCur.GetNameInFamLF(PlanList[i].Subscriber)); row.Cells.Add(Carriers.GetName(PlanList[i].CarrierNum)); if (PlanList[i].DateEffective.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(PlanList[i].DateEffective.ToString("d")); } if (PlanList[i].DateTerm.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(PlanList[i].DateTerm.ToString("d")); } gridMain.Rows.Add(row); } gridMain.EndUpdate(); }
/* * private void FillClaimForms(){ * for(int i=0;i<ClaimForms.ListShort.Length;i++) { * comboClaimForm.Items.Add(ClaimForms.ListShort[i].Description); * if(ClaimForms.ListShort[i].ClaimFormNum==PrefC.GetLong(PrefName.DefaultClaimForm)) { * comboClaimForm.SelectedIndex=i; * } * } * }*/ private void FillPlanData() { gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col = new GridColumn(Lan.g("TableInsPlans", "Plan"), 50); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Subscriber"), 140); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Ins Carrier"), 100); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Date Effect."), 90); gridMain.ListGridColumns.Add(col); col = new GridColumn(Lan.g("TableInsPlans", "Date Term."), 90); gridMain.ListGridColumns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; List <GridRow> listRows = new List <GridRow>(); //create a list of gridrows so that we can order them by Ordinal after creating them. for (int i = 0; i < SubList.Count; i++) { row = new GridRow(); if (!checkShowPlansNotInUse.Checked && //Only show insurance plans for PatCur. !_listPatCurPatPlans.Exists(x => x.InsSubNum == SubList[i].InsSubNum)) { continue; } else if (checkShowPlansNotInUse.Checked && !_listPatCurPatPlans.Exists(x => x.InsSubNum == SubList[i].InsSubNum)) { row.Cells.Add("Not Used"); } else { PatPlan patPlan = _listPatCurPatPlans.FirstOrDefault(x => x.InsSubNum == SubList[i].InsSubNum); if (patPlan == null) { continue; } if (patPlan.Ordinal == 1) { row.Cells.Add("Pri"); } else if (patPlan.Ordinal == 2) { row.Cells.Add("Sec"); } else { row.Cells.Add("Other"); } } InsPlan plan = InsPlans.GetPlan(SubList[i].PlanNum, PlanList); row.Tag = SubList[i]; row.Cells.Add(FamCur.GetNameInFamLF(SubList[i].Subscriber)); row.Cells.Add(Carriers.GetName(plan.CarrierNum)); if (SubList[i].DateEffective.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateEffective.ToString("d")); } if (SubList[i].DateTerm.Year < 1880) { row.Cells.Add(""); } else { row.Cells.Add(SubList[i].DateTerm.ToString("d")); } listRows.Add(row); } listRows = listRows.OrderBy(x => x.Cells[0].Text != "Pri") .ThenBy(x => x.Cells[0].Text != "Sec") .ThenBy(x => x.Cells[0].Text != "Other") .ThenBy(x => x.Cells[0].Text != "Not Used").ToList(); for (int i = 0; i < listRows.Count; i++) { gridMain.ListGridRows.Add(listRows[i]); } gridMain.EndUpdate(); listRelat.Items.Clear(); for (int i = 0; i < Enum.GetNames(typeof(Relat)).Length; i++) { listRelat.Items.Add(Lan.g("enumRelat", Enum.GetNames(typeof(Relat))[i])); } }
private void FormTsiHistory_Load(object sender, EventArgs e) { SetFilterControlsAndAction(() => FillGrid(), datePicker, checkShowPatNums); #region Fill Clinics _listClinics = new List <Clinic>(); if (PrefC.HasClinicsEnabled) { _listClinics.AddRange( Clinics.GetForUserod(Security.CurUser, true).OrderBy(x => x.ClinicNum != 0).ThenBy(x => x.ItemOrder) ); } else //clinics disabled { _listClinics.Add(Clinics.GetPracticeAsClinicZero(Lan.g(this, "Unassigned"))); } #endregion Fill Clinics #region Fill Client IDs comboBoxMultiClientIDs.Items.Add(Lan.g(this, "All")); comboBoxMultiClientIDs.SetSelected(0, true); _listClientIDs = new List <string>(); long progNum = Programs.GetProgramNum(ProgramName.Transworld); if (progNum > 0) { _listClientIDs = ProgramProperties.GetWhere(x => x.ProgramNum == progNum && x.PropertyDesc.In("ClientIdAccelerator", "ClientIdCollection")) .Select(x => x.PropertyValue).Distinct().ToList(); } _listClientIDs.ForEach(x => comboBoxMultiClientIDs.Items.Add(x)); #endregion Fill Client IDs #region Fill Trans Types _listTransTypes = Enum.GetValues(typeof(TsiTransType)).OfType <TsiTransType>().ToList(); comboBoxMultiTransTypes.Items.Add(Lan.g(this, "All")); comboBoxMultiTransTypes.SetSelected(0, true); _listTransTypes.ForEach(x => comboBoxMultiTransTypes.Items.Add(x.GetDescription())); #endregion Fill Trans Types #region Fill Account Statuses _listAcctStatuses = new[] { "Active", "Suspended", "Inactive" }.ToList(); comboBoxMultiAcctStatuses.Items.Add(Lan.g(this, "All")); comboBoxMultiAcctStatuses.SetSelected(0, true); _listAcctStatuses.ForEach(x => comboBoxMultiAcctStatuses.Items.Add(x)); #endregion Fill Account Statuses #region Get Selected Family PatNums _listSelectedFamPatNums = new List <long>(); if (FormOpenDental.CurPatNum > 0) { Family fam = Patients.GetFamily(FormOpenDental.CurPatNum); textPatient.Text = fam.GetNameInFamLF(FormOpenDental.CurPatNum); _listSelectedFamPatNums = fam.ListPats.Select(x => x.PatNum).ToList(); } #endregion Get Selected Family PatNums #region Get All TsiTransLogs _listTsiTransLogsAll = TsiTransLogs.GetAll(); #endregion Get All TsiTransLogs #region Add ClientIDs No Longer In Use List <string> listLogClientIDs = _listTsiTransLogsAll.Select(x => x.ClientId).Distinct().Where(x => !_listClientIDs.Contains(x)).ToList(); foreach (string clientIDCur in listLogClientIDs) { _listClientIDs.Add(clientIDCur); comboBoxMultiClientIDs.Items.Add(clientIDCur + " (no longer used)"); } #endregion Add ClientIDs No Longer In Use _dictPatLims = Patients.GetLimForPats(_listTsiTransLogsAll.Select(x => x.PatNum).Distinct().ToList() /*,true*/).ToDictionary(x => x.PatNum); datePicker.SetDateTimeFrom(DateTime.Today.AddDays(-1)); //Set start to yesterday datePicker.SetDateTimeTo(DateTime.Today); //Set stop date to today to limit the number of messages that load immediately _selectedLog = null; FillGrid(); }