private void FillClinics() { comboClinic.Items.Clear(); List <Clinic> listClinics = Clinics.GetForUserod(Security.CurUser); if (!Security.CurUser.ClinicIsRestricted) { comboClinic.Items.Add(new ComboClinicItem(Lan.g(this, "Default"), 0)); comboClinic.SelectedIndex = 0; } for (int i = 0; i < listClinics.Count; i++) { int addedIdx = comboClinic.Items.Add(new ComboClinicItem(listClinics[i].Abbr, listClinics[i].ClinicNum)); if (listClinics[i].ClinicNum == Clinics.ClinicNum) { comboClinic.SelectedIndex = addedIdx; } } }
///<summary></summary> public void PrintReferral(Referral referralCur) { ReferralCur = referralCur.Copy(); pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler(pd_PrintPageReferral); pd.DefaultPageSettings.Margins = new Margins(0, 0, 0, 0); pd.OriginAtMargins = true; pd.DefaultPageSettings.Landscape = false; if (!Printers.SetPrinter(pd, PrintSituation.LabelSingle)) { return; } try { pd.Print(); } catch { MessageBox.Show(Lan.g("Label", "Printer not available")); } }
private void FillGrid() { int curSelection = gridMain.GetSelectedIndex(); gridMain.BeginUpdate(); gridMain.Columns.Clear(); gridMain.Columns.Add(new ODGridColumn(Lan.g("TableLabImage", "Attached"), 60, HorizontalAlignment.Center)); gridMain.Columns.Add(new ODGridColumn(Lan.g("TableLabImage", "Date"), 80, HorizontalAlignment.Center)); gridMain.Columns.Add(new ODGridColumn(Lan.g("TableLabImage", "Category"), 80, HorizontalAlignment.Center)); gridMain.Columns.Add(new ODGridColumn(Lan.g("TableLabImage", "Desc"), 180, HorizontalAlignment.Left)); gridMain.Rows.Clear(); ODGridRow row; for (int i = 0; i < _listPatientDocuments.Count; i++) { if (_listPatientDocuments[i].DocNum <= 0) //Invalid doc num indicates 'Waiting for images'. This flag is set in the Load event. { continue; } //Test if this is a valid image. Bitmap bmp = ImageStore.OpenImage(_listPatientDocuments[i], _patFolder); if (bmp == null) { continue; } bmp.Dispose(); bmp = null; bool isAttached = EhrLabImages.GetDocNumExistsInList(_ehrLabNum, _listPatientDocuments[i].DocNum, _listAttached); row = new ODGridRow(); row.Cells.Add(isAttached?"X":""); row.Cells.Add(_listPatientDocuments[i].DateCreated.ToString()); row.Cells.Add(Defs.GetName(DefCat.ImageCats, _listPatientDocuments[i].DocCategory)); row.Cells.Add(_listPatientDocuments[i].Description); row.Tag = _listPatientDocuments[i]; gridMain.Rows.Add(row); } gridMain.EndUpdate(); if (curSelection >= 0) { gridMain.SetSelected(curSelection, true); } }
private void FormRpPayPlans_Load(object sender, System.EventArgs e) { dateStart.Value = DateTime.Today; dateEnd.Value = DateTime.Today; checkHideCompletePlans.Checked = true; _listProviders = Providers.GetListReports(); for (int i = 0; i < _listProviders.Count; i++) { listProv.Items.Add(_listProviders[i].GetLongDesc()); listProv.SelectedIndices.Add(i); } checkAllProv.Checked = true; if (!PrefC.HasClinicsEnabled) { listClin.Visible = false; labelClin.Visible = false; checkAllClin.Visible = false; } else { _listClinics = Clinics.GetForUserod(Security.CurUser); if (!Security.CurUser.ClinicIsRestricted) { listClin.Items.Add(Lan.g(this, "Unassigned")); listClin.SetSelected(0, true); } for (int i = 0; i < _listClinics.Count; i++) { int curIndex = listClin.Items.Add(_listClinics[i].Abbr); if (Clinics.ClinicNum == 0) { listClin.SetSelected(curIndex, true); checkAllClin.Checked = true; } if (_listClinics[i].ClinicNum == Clinics.ClinicNum) { listClin.SelectedIndices.Clear(); listClin.SetSelected(curIndex, true); } } } }
private string GetItemDescForImages(string itemValue) { string retVal = ""; if (itemValue.Contains("X")) { retVal = Lan.g(this, "ChartModule"); } if (itemValue.Contains("F")) { if (retVal != "") { retVal += ", "; } retVal += Lan.g(this, "PatientForm"); } if (itemValue.Contains("P")) { if (retVal != "") { retVal += ", "; } retVal += Lan.g(this, "PatientPic"); } if (itemValue.Contains("S")) { if (retVal != "") { retVal += ", "; } retVal += Lan.g(this, "Statement"); } if (itemValue.Contains("T")) { if (retVal != "") { retVal += ", "; } retVal += Lan.g(this, "ToothChart"); } return(retVal); }
private void FillGrid() { //Changes made in this window do not get saved until after this window closes. //But if you double click on a row, then you will end up saving. That shouldn't hurt anything, but could be improved. //also calculates totals for this "payment" //the payment itself is imaginary and is simply the sum of the claimprocs on this form gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col; col = new ODGridColumn(Lan.g(this, "Code"), 50); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Tth"), 35); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Description"), 120); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Fee"), 55, HorizontalAlignment.Right); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Estimate"), 55, HorizontalAlignment.Right, true); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Remarks"), 170, true); gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; Procedure ProcCur; for (int i = 0; i < ClaimProcsToEdit.Count; i++) { row = new ODGridRow(); row.Height = 19; //To handle the isEditable functionality ProcCur = Procedures.GetProcFromList(ProcList, ClaimProcsToEdit[i].ProcNum); row.Cells.Add(ProcedureCodes.GetProcCode(ProcCur.CodeNum).ProcCode); row.Cells.Add(ProcCur.ToothNum); row.Cells.Add(ProcedureCodes.GetProcCode(ProcCur.CodeNum).Descript); row.Cells.Add(ClaimProcsToEdit[i].FeeBilled.ToString("F")); row.Cells.Add(ClaimProcsToEdit[i].InsPayEst.ToString("F")); row.Cells.Add(ClaimProcsToEdit[i].Remarks); gridMain.Rows.Add(row); } gridMain.EndUpdate(); FillTotals(); }
private void FillGrid() { gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g(this, "LName"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "FName"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Reports"), 60); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Key"), 100); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Charge"), 60, HorizontalAlignment.Right); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "FTE"), 35, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g(this, "Notes"), 100); gridMain.Columns.Add(col); listKeys = EhrProvKeys.RefreshForFam(Guarantor); gridMain.Rows.Clear(); ODGridRow row; decimal feeTotal = 0; decimal fee = 0; for (int i = 0; i < listKeys.Count; i++) { row = new ODGridRow(); row.Cells.Add(listKeys[i].LName); row.Cells.Add(listKeys[i].FName); row.Cells.Add(listKeys[i].HasReportAccess?"X":""); row.Cells.Add(listKeys[i].ProvKey); fee = (decimal)(60f * listKeys[i].FullTimeEquiv); feeTotal += fee; row.Cells.Add(fee.ToString("c")); row.Cells.Add(listKeys[i].FullTimeEquiv.ToString()); row.Cells.Add(listKeys[i].Notes); gridMain.Rows.Add(row); } gridMain.EndUpdate(); textCharge.Text = feeTotal.ToString("c"); }
private void butAddExist_Click(object sender, EventArgs e) { if (gridMedExisting.SelectedIndices.Length == 0) { MsgBox.Show(this, "A row must be selected to add"); return; } MedicationPat medP; int skipCount = 0; bool isValid; for (int i = 0; i < gridMedExisting.SelectedIndices.Length; i++) { isValid = true; //Since gridMedImport and ListMedicationPatNew are a 1:1 list we can use the selected index position to get our medP medP = _listMedicationPatCur[gridMedExisting.SelectedIndices[i]]; for (int j = 0; j < gridMedReconcile.Rows.Count; j++) { if (medP.RxCui > 0 && medP.RxCui == _listMedicationPatReconcile[j].RxCui) { isValid = false; skipCount++; break; } if (medP.MedicationNum == _listMedicationPatReconcile[j].MedicationNum) { isValid = false; skipCount++; break; } } if (isValid) { _listMedicationPatReconcile.Add(medP); } } if (skipCount > 0) { MessageBox.Show(Lan.g(this, " Row(s) skipped because medication already present in the reconcile list") + ": " + skipCount); } FillReconcileGrid(); }
private MigraDoc.DocumentObjectModel.Document CreatePrintDocument() { string text; MigraDoc.DocumentObjectModel.Document doc = new MigraDoc.DocumentObjectModel.Document(); doc.DefaultPageSetup.PageWidth = Unit.FromInch(8.5); doc.DefaultPageSetup.PageHeight = Unit.FromInch(11); doc.DefaultPageSetup.TopMargin = Unit.FromInch(.5); doc.DefaultPageSetup.LeftMargin = Unit.FromInch(.5); doc.DefaultPageSetup.RightMargin = Unit.FromInch(.5); MigraDoc.DocumentObjectModel.Section section = doc.AddSection(); MigraDoc.DocumentObjectModel.Font headingFont = MigraDocHelper.CreateFont(13, true); MigraDoc.DocumentObjectModel.Font bodyFontx = MigraDocHelper.CreateFont(9, false); MigraDoc.DocumentObjectModel.Font nameFontx = MigraDocHelper.CreateFont(9, true); MigraDoc.DocumentObjectModel.Font totalFontx = MigraDocHelper.CreateFont(9, true); Paragraph par = section.AddParagraph(); ParagraphFormat parformat = new ParagraphFormat(); parformat.Alignment = ParagraphAlignment.Center; parformat.Font = MigraDocHelper.CreateFont(14, true); par.Format = parformat; //Render the reconcile grid. par = section.AddParagraph(); par.Format.Alignment = ParagraphAlignment.Center; par.AddFormattedText(Lan.g(this, "RECONCILE"), totalFontx); par.AddLineBreak(); text = Accounts.GetAccount(ReconcileCur.AccountNum).Description.ToUpper(); par.AddFormattedText(text, totalFontx); par.AddLineBreak(); text = PrefC.GetString(PrefName.PracticeTitle); par.AddText(text); par.AddLineBreak(); text = PrefC.GetString(PrefName.PracticePhone); if (text.Length == 10 && Application.CurrentCulture.Name == "en-US") { text = "(" + text.Substring(0, 3) + ")" + text.Substring(3, 3) + "-" + text.Substring(6); } par.AddText(text); MigraDocHelper.InsertSpacer(section, 10); MigraDocHelper.DrawGrid(section, gridMain); return(doc); }
private void FillGrid() { long course=(comboCourse.SelectedIndex==0) ? 0:_listSchoolCourses[comboCourse.SelectedIndex-1].SchoolCourseNum; long instructor=(comboInstructor.SelectedIndex==0) ? 0:_listInstructor[comboInstructor.SelectedIndex-1].ProvNum; DataTable table=Evaluations.GetFilteredList(DateTime.Parse(textDateStart.Text),DateTime.Parse(textDateEnd.Text),textLastName.Text,textFirstName.Text,PIn.Long(textProvNum.Text),course,instructor); gridMain.BeginUpdate(); gridMain.ListGridColumns.Clear(); GridColumn col=new GridColumn(Lan.g("TableEvaluations","Date"),70,HorizontalAlignment.Center); gridMain.ListGridColumns.Add(col); col=new GridColumn(Lan.g("TableEvaluations","Title"),90); gridMain.ListGridColumns.Add(col); col=new GridColumn(Lan.g("TableEvaluations","Instructor"),90); gridMain.ListGridColumns.Add(col); col=new GridColumn(Lan.g("TableEvaluations","ProvNum"),60); gridMain.ListGridColumns.Add(col); col=new GridColumn(Lan.g("TableEvaluations","Last Name"),90); gridMain.ListGridColumns.Add(col); col=new GridColumn(Lan.g("TableEvaluations","First Name"),80); gridMain.ListGridColumns.Add(col); col=new GridColumn(Lan.g("TableEvaluations","Course"),90); gridMain.ListGridColumns.Add(col); col=new GridColumn(Lan.g("TableEvaluations","Grade"),60); gridMain.ListGridColumns.Add(col); col=new GridColumn(Lan.g("TableEvaluations","Grading Scale"),90); gridMain.ListGridColumns.Add(col); gridMain.ListGridRows.Clear(); GridRow row; for(int i=0;i<table.Rows.Count;i++) { row=new GridRow(); row.Cells.Add(DateTime.Parse(table.Rows[i]["DateEval"].ToString()).ToShortDateString()); row.Cells.Add(table.Rows[i]["EvalTitle"].ToString()); row.Cells.Add(table.Rows[i]["InstructNum"].ToString()); row.Cells.Add(table.Rows[i]["StudentNum"].ToString()); row.Cells.Add(table.Rows[i]["LName"].ToString()); row.Cells.Add(table.Rows[i]["FName"].ToString()); row.Cells.Add(table.Rows[i]["CourseID"].ToString()); row.Cells.Add(table.Rows[i]["OverallgradeShowing"].ToString()); row.Cells.Add(table.Rows[i]["Description"].ToString()); row.Tag=table.Rows[i]["EvaluationNum"].ToString();//To keep the correct reference to the Evaluation even when filtering the list. gridMain.ListGridRows.Add(row); } gridMain.EndUpdate(); }
private void FormTaskListEdit_Load(object sender, System.EventArgs e) { textDescript.Text = Cur.Descript; if (Cur.DateTL.Year > 1880) { textDateTL.Text = Cur.DateTL.ToShortDateString(); } for (int i = 0; i < Enum.GetNames(typeof(TaskDateType)).Length; i++) { listDateType.Items.Add(Lan.g("enumTaskDateType", Enum.GetNames(typeof(TaskDateType))[i])); if ((int)Cur.DateType == i) { listDateType.SelectedIndex = i; } } if (Cur.FromNum == 0) { checkFromNum.Checked = false; checkFromNum.Enabled = false; } else { checkFromNum.Checked = true; } if (Cur.IsRepeating) { textDateTL.Enabled = false; listObjectType.Enabled = false; if (Cur.Parent != 0) //not a main parent { listDateType.Enabled = false; } } for (int i = 0; i < Enum.GetNames(typeof(TaskObjectType)).Length; i++) { listObjectType.Items.Add(Lan.g("enumTaskObjectType", Enum.GetNames(typeof(TaskObjectType))[i])); if ((int)Cur.ObjectType == i) { listObjectType.SelectedIndex = i; } } }
private void FillGrid() { List <DiscountPlan> listDiscountPlans = DiscountPlans.GetAll(checkShowHidden.Checked); List <Patient> listPatientsOnPlan = DiscountPlans.GetPatsForPlans(listDiscountPlans.Select(x => x.DiscountPlanNum).ToList()); listDiscountPlans.Sort(DiscountPlanComparer); gridMain.BeginUpdate(); gridMain.Columns.Clear(); gridMain.Columns.Add(new ODGridColumn(Lan.g("TableDiscountPlans", "Description"), 200)); gridMain.Columns.Add(new ODGridColumn(Lan.g("TableDiscountPlans", "Fee Schedule"), 170)); gridMain.Columns.Add(new ODGridColumn(Lan.g("TableDiscountPlans", "Adjustment Type"), checkShowHidden.Checked ? 150 : 170)); gridMain.Columns.Add(new ODGridColumn(Lan.g("TableDiscountPlans", "Pats"), 40)); if (checkShowHidden.Checked) { gridMain.Columns.Add(new ODGridColumn(Lan.g("TableDiscountPlans", "Hidden"), 20, HorizontalAlignment.Center)); } gridMain.Rows.Clear(); ODGridRow row; int selectedIdx = -1; for (int i = 0; i < listDiscountPlans.Count; i++) { Def adjType = Defs.GetDef(DefCat.AdjTypes, listDiscountPlans[i].DefNum); row = new ODGridRow(); row.Cells.Add(listDiscountPlans[i].Description); row.Cells.Add(FeeScheds.GetDescription(listDiscountPlans[i].FeeSchedNum)); row.Cells.Add((adjType == null) ? "" : adjType.ItemName); row.Cells.Add(listPatientsOnPlan.FindAll(x => x.DiscountPlanNum == listDiscountPlans[i].DiscountPlanNum).Count.ToString()); if (checkShowHidden.Checked) { row.Cells.Add(listDiscountPlans[i].IsHidden ? "X" : ""); } row.Tag = listDiscountPlans[i]; gridMain.Rows.Add(row); if (SelectedPlan != null && listDiscountPlans[i].DiscountPlanNum == SelectedPlan.DiscountPlanNum) { selectedIdx = i; } } gridMain.EndUpdate(); gridMain.SetSelected(selectedIdx, true); }
///<summary>Uses the report complex pattern to print the same report generated by FillGrid()</summary> private void butRunReport_Click(object sender, EventArgs e) { if (!ValidateFilters()) { return; } ReportComplex report = new ReportComplex(true, false); List <long> listClinicNums = comboClinicMulti.ListSelectedClinicNums; DataTable table = RpClaimNotSent.GetClaimsNotSent(_startDate, _endDate, listClinicNums, true, (ClaimNotSentStatuses)comboBoxInsFilter.SelectedItem); string subtitleClinics = ""; subtitleClinics = comboClinicMulti.GetStringSelectedClinics(); report.ReportName = Lan.g(this, "Claims Not Sent"); report.AddTitle("Title", Lan.g(this, "Claims Not Sent")); if (PrefC.HasClinicsEnabled) { report.AddSubTitle("Clinics", subtitleClinics); } QueryObject query = report.AddQuery(table, "Date: " + DateTimeOD.Today.ToShortDateString()); if (PrefC.HasClinicsEnabled) { query.AddColumn("Clinic", 60, FieldValueType.String); } query.AddColumn("Date", 85, FieldValueType.Date); query.GetColumnDetail("Date").StringFormat = "d"; query.AddColumn("Type", 90, FieldValueType.String); query.AddColumn("Claim Status", 100, FieldValueType.String); query.AddColumn("Patient Name", 150, FieldValueType.String); query.AddColumn("Insurance Carrier", 150, FieldValueType.String); query.AddColumn("Amount", 90, FieldValueType.Number); query.AddColumn("Proc Codes", 90); report.AddPageNum(); if (!report.SubmitQueries()) { return; } FormReportComplex FormR = new FormReportComplex(report); FormR.ShowDialog(); DialogResult = DialogResult.OK; }
private void FillMeds() { Medications.Refresh(); medList = MedicationPats.Refresh(PatCur.PatNum, checkDiscontinued.Checked); gridMeds.BeginUpdate(); gridMeds.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g("TableMedications", "Medication"), 120); gridMeds.Columns.Add(col); col = new ODGridColumn(Lan.g("TableMedications", "Notes"), 200); gridMeds.Columns.Add(col); col = new ODGridColumn(Lan.g("TableMedications", "Notes for Patient"), 200); gridMeds.Columns.Add(col); col = new ODGridColumn(Lan.g("TableMedications", "Status"), 60, HorizontalAlignment.Center); gridMeds.Columns.Add(col); gridMeds.Rows.Clear(); ODGridRow row; for (int i = 0; i < medList.Count; i++) { row = new ODGridRow(); Medication generic = Medications.GetGeneric(medList[i].MedicationNum); string medName = Medications.GetMedication(medList[i].MedicationNum).MedName; if (generic.MedicationNum != medList[i].MedicationNum) //not generic { medName += " (" + generic.MedName + ")"; } row.Cells.Add(medName); row.Cells.Add(Medications.GetGeneric(medList[i].MedicationNum).Notes); row.Cells.Add(medList[i].PatNote); if (medList[i].DateStop.Year > 1880) { row.Cells.Add("Inactive"); } else { row.Cells.Add("Active"); } gridMeds.Rows.Add(row); } gridMeds.EndUpdate(); }
private void FormUpdate_Load(object sender, System.EventArgs e) { if (ODBuild.IsWeb()) { MsgBox.Show(this, "Updates are not allowed manually from within the program. Please call support."); Close(); return; } SetButtonVisibility(); labelVersion.Text = Lan.g(this, "Using Version:") + " " + Application.ProductVersion; UpdateHistory updateHistory = UpdateHistories.GetForVersion(Application.ProductVersion); if (updateHistory != null) { labelVersion.Text += " " + Lan.g(this, "Since") + ": " + updateHistory.DateTimeUpdated.ToShortDateString(); } if (PrefC.GetBool(PrefName.UpdateWindowShowsClassicView)) { //Default location is (74,9). We move it 5 pixels up since butShowPrev is 5 pixels bigger then labelVersion butShowPrev.Location = new Point(74 + labelVersion.Width + 2, 9 - 5); panelClassic.Visible = true; panelClassic.Location = new Point(67, 29); textUpdateCode.Text = PrefC.GetString(PrefName.UpdateCode); textWebsitePath.Text = PrefC.GetString(PrefName.UpdateWebsitePath); //should include trailing / butDownload.Enabled = false; if (!Security.IsAuthorized(Permissions.Setup)) //gives a message box if no permission { butCheck.Enabled = false; } } else { if (Security.IsAuthorized(Permissions.Setup, true)) { butCheck2.Visible = true; } else { textConnectionMessage.Text = Lan.g(this, "Not authorized for") + " " + GroupPermissions.GetDesc(Permissions.Setup); } } }
///<summary>Downloads Canadian procedure codes from our website and updates _codeList accordingly.</summary> private void CanadaDownloadProcedureCodes() { Cursor = Cursors.WaitCursor; _codeList = new List <ProcedureCode>(); string url = @"http://www.opendental.com/feescanada/procedurecodes.txt"; string tempFile = PrefC.GetRandomTempFile(".tmp"); WebClient myWebClient = new WebClient(); try { myWebClient.DownloadFile(url, tempFile); } catch (Exception ex) { MessageBox.Show(Lan.g(this, "Failed to download procedure codes") + ":\r\n" + ex.Message); Cursor = Cursors.Default; return; } string codeData = File.ReadAllText(tempFile); File.Delete(tempFile); string[] codeLines = codeData.Split('\n'); for (int i = 0; i < codeLines.Length; i++) { string[] fields = codeLines[i].Split('\t'); if (fields.Length < 1) //Skip blank lines if they exist. { continue; } ProcedureCode procCode = new ProcedureCode(); procCode.ProcCode = PIn.String(fields[0]); //0 ProcCode procCode.Descript = PIn.String(fields[1]); //1 Description procCode.TreatArea = (TreatmentArea)PIn.Int(fields[2]); //2 TreatArea procCode.NoBillIns = PIn.Bool(fields[3]); //3 NoBillIns procCode.IsProsth = PIn.Bool(fields[4]); //4 IsProsth procCode.IsHygiene = PIn.Bool(fields[5]); //5 IsHygiene procCode.PaintType = (ToothPaintingType)PIn.Int(fields[6]); //6 PaintType procCode.ProcCatDescript = PIn.String(fields[7]); //7 ProcCatDescript procCode.ProcTime = PIn.String(fields[8]); //8 ProcTime procCode.AbbrDesc = PIn.String(fields[9]); //9 AbbrDesc _codeList.Add(procCode); } Cursor = Cursors.Default; }
///<summary></summary> private void FillGridCustom() { ClaimFormItems.RefreshCache(); ClaimForms.RefreshCache(); comboReassign.Items.Clear(); gridCustom.BeginUpdate(); gridCustom.Columns.Clear(); gridCustom.Columns.Add(new ODGridColumn(Lan.g("TableClaimFormsCustom", "ClaimForm"), 145)); gridCustom.Columns.Add(new ODGridColumn(Lan.g("TableClaimFormsCustom", "Default"), 50, HorizontalAlignment.Center)); gridCustom.Columns.Add(new ODGridColumn(Lan.g("TableClaimFormsCustom", "Hidden"), 0, HorizontalAlignment.Center)); gridCustom.Rows.Clear(); string description; foreach (ClaimForm claimFormCur in ClaimForms.GetDeepCopy()) { description = claimFormCur.Description; ODGridRow row = new ODGridRow(); row.Cells.Add(claimFormCur.Description); if (claimFormCur.ClaimFormNum == PrefC.GetLong(PrefName.DefaultClaimForm)) { description += " " + Lan.g(this, "(default)"); row.Cells.Add("X"); } else { row.Cells.Add(""); } if (claimFormCur.IsHidden) { description += " " + Lan.g(this, "(hidden)"); row.Cells.Add("X"); } else { row.Cells.Add(""); } row.Tag = claimFormCur; gridCustom.Rows.Add(row); comboReassign.Items.Add(new ODBoxItem <ClaimForm>(description, claimFormCur)); } gridCustom.EndUpdate(); }
private void FormRecallTypeEdit_Load(object sender, System.EventArgs e) { textDescription.Text = RecallTypeCur.Description; defaultIntervalOld = RecallTypeCur.DefaultInterval; comboSpecial.Items.Add(Lan.g(this, "none")); comboSpecial.Items.Add(Lan.g(this, "Prophy")); comboSpecial.Items.Add(Lan.g(this, "ChildProphy")); comboSpecial.Items.Add(Lan.g(this, "Perio")); SetSpecialIdx(); CountForType = Recalls.GetCountForType(RecallTypeCur.RecallTypeNum); TriggerList = RecallTriggers.GetForType(RecallTypeCur.RecallTypeNum); //works if 0, too. SetSpecialText(); FillTriggers(); textYears.Text = RecallTypeCur.DefaultInterval.Years.ToString(); textMonths.Text = RecallTypeCur.DefaultInterval.Months.ToString(); textWeeks.Text = RecallTypeCur.DefaultInterval.Weeks.ToString(); textDays.Text = RecallTypeCur.DefaultInterval.Days.ToString(); textPattern.Text = RecallTypeCur.TimePattern; FillProcs(); }
private void butEdit_Click(object sender, System.EventArgs e) { if (listMatches.SelectedIndex == -1) { MessageBox.Show(Lan.g(this, "Please select an item first.")); return; } FormZipCodeEdit FormZCE = new FormZipCodeEdit(); FormZCE.ZipCodeCur = _listZipCodes[listMatches.SelectedIndex]; FormZCE.ShowDialog(); if (FormZCE.DialogResult != DialogResult.OK) { return; } changed = true; ZipCodes.RefreshCache(); ZipCodes.GetALMatches(FormZCE.ZipCodeCur.ZipCodeDigits); FillList(); }
private void butViewParent_Click(object sender, EventArgs e) { EhrLab ehrLabParent = null; ehrLabParent = EhrLabs.GetByGUID(EhrLabCur.ParentPlacerOrderUniversalID, EhrLabCur.ParentPlacerOrderNum); if (ehrLabParent == null) { ehrLabParent = EhrLabs.GetByGUID(EhrLabCur.ParentFillerOrderUniversalID, EhrLabCur.ParentFillerOrderNum); } if (ehrLabParent == null) { return; } FormEhrLabOrderEdit2014 FormELOE = new FormEhrLabOrderEdit2014(); FormELOE.EhrLabCur = ehrLabParent; FormELOE.IsViewOnly = true; FormELOE.Text = Lan.g(this, "Parent Lab Order - READ ONLY"); FormELOE.ShowDialog(); }
private void butDownNote_Click(object sender, System.EventArgs e) { if (listNote.SelectedIndex == -1) { MessageBox.Show(Lan.g(this, "Please select a note first.")); return; } if (listNote.SelectedIndex == notesForCat.Length - 1) { return; //can't go down any more } notesForCat[listNote.SelectedIndex].ItemOrder++; QuickPasteNotes.Update(notesForCat[listNote.SelectedIndex]); notesForCat[listNote.SelectedIndex + 1].ItemOrder--; QuickPasteNotes.Update(notesForCat[listNote.SelectedIndex + 1]); listNote.SelectedIndex++; QuickPasteNotes.Refresh(); FillNotes(); localChanged = true; }
private void butAddAge_Click(object sender, EventArgs e) { //30525-0 = Age (Actual). There are 3 other age LOINCS that should also be checked. Stored as " Age(Operand)(Value) " //21611-7 = Estimated //21612-7 = Reported //29553-5 = Calculated InputBox IB = new InputBox(Lan.g(this, "Input age criterion as (operand)(value). Examples: <18, >55, =22, <=35.")); if (IB.ShowDialog() != DialogResult.OK || string.IsNullOrEmpty(IB.textResult.Text)) { return; } if (!Regex.IsMatch(IB.textResult.Text, @"^(<|<=|>|>=|=)\d+$")) //Starts with <,>,=,<=, or >= followed by numbers, and nothing else. { MsgBox.Show(this, "Invalid format."); return; } EhrTriggerCur.DemographicsList += " age," + IB.textResult.Text.Trim() + " "; FillGrid(); }
private void FormMessagingButSetup_Load(object sender, EventArgs e) { _listComputers = Computers.GetDeepCopy(); listComputers.Items.Clear(); listComputers.Items.Add(Lan.g(this, "All")); string s; for (int i = 0; i < _listComputers.Count; i++) { s = _listComputers[i].CompName; if (SystemInformation.ComputerName == _listComputers[i].CompName) { s += " " + Lan.g(this, "(this computer)"); } listComputers.Items.Add(s); } listComputers.SelectedIndex = 0; _arraySigButDefs = SigButDefs.GetByComputer(""); FillList(); }
private void butOK_Click(object sender, System.EventArgs e) { if (textTitle.Text == "") { MessageBox.Show(Lan.g(this, "Please enter a title first.")); return; } UserQueryCur.Description = textTitle.Text; UserQueryCur.QueryText = textQuery.Text; UserQueryCur.FileName = textFileName.Text; if (IsNew) { UserQueries.Insert(UserQueryCur); } else { UserQueries.Update(UserQueryCur); } DialogResult = DialogResult.OK; }
private void FillPat() { if(FormOpenDental.CurPatNum==0) { labelPatient.Text=Lan.g(this,"none"); labelSheets.Visible=false; listSheets.Visible=false; butLoad.Visible=false; } else { Patient pat=Patients.GetLim(FormOpenDental.CurPatNum); labelPatient.Text=pat.GetNameFL(); labelSheets.Visible=true; listSheets.Visible=true; butLoad.Visible=true; listSheets.Items.Clear(); List<Sheet> sheetList=Sheets.GetForTerminal(FormOpenDental.CurPatNum); for(int i=0;i<sheetList.Count;i++) { listSheets.Items.Add(sheetList[i].Description); } } }
private void Print_Click(){ PrintDocument pd=new PrintDocument(); pd.DocumentName=viewer.SourceFile; pd.PrinterSettings.FromPage=1; pd.PrinterSettings.ToPage=viewer.PageCount; pd.PrinterSettings.MaximumPage=viewer.PageCount; pd.PrinterSettings.MinimumPage=1; pd.DefaultPageSettings.Landscape=viewer.PageWidth>viewer.PageHeight; try{ if(Printers.SetPrinter(pd,PrintSituation.Default)){ if(pd.PrinterSettings.PrintRange==PrintRange.Selection) { pd.PrinterSettings.FromPage=viewer.PageCurrent; } viewer.Print(pd); } } catch{ MessageBox.Show(Lan.g(this,"Printer not available")); } }
private void butExport_Click(object sender, System.EventArgs e) { saveFileDialog2 = new SaveFileDialog(); saveFileDialog2.AddExtension = true; saveFileDialog2.Title = Lan.g(this, "Select Folder to Save Image To"); saveFileDialog2.InitialDirectory = PrefC.GetString(PrefName.ExportPath); saveFileDialog2.DefaultExt = "jpg"; saveFileDialog2.Filter = "jpg files(*.jpg)|*.jpg|All files(*.*)|*.*"; saveFileDialog2.FilterIndex = 1; if (saveFileDialog2.ShowDialog() != DialogResult.OK) { return; } try{ imageTemp.Save(saveFileDialog2.FileName, ImageFormat.Jpeg); } catch { MessageBox.Show(Lan.g(this, "File in use by another program. Close and try again.")); } }
private void butOK_Click(object sender, System.EventArgs e) { if (gridMain.GetSelectedIndex() == -1) { MessageBox.Show(Lan.g(this, "Please select a plan first.")); return; } if (ViewRelat && listRelat.SelectedIndex == -1) { MessageBox.Show(Lan.g(this, "Please select a relationship first.")); return; } if (ViewRelat) { PatRelat = (Relat)listRelat.SelectedIndex; } SelectedSub = (InsSub)gridMain.Rows[gridMain.GetSelectedIndex()].Tag; SelectedPlan = InsPlans.GetPlan(SelectedSub.PlanNum, PlanList); DialogResult = DialogResult.OK; }
///<summary>Causes the toolbar to be laid out again.</summary> public void LayoutToolBar(){ ToolBarMain.Buttons.Clear(); ToolBarMain.Buttons.Add(new ODToolBarButton(Lan.g(this,"Print"),0,"","Print")); ToolBarMain.Buttons.Add(new ODToolBarButton(Lan.g(this,"Save PDF"),4,"Save as Adobe PDF","PDF")); ToolBarMain.Buttons.Add(new ODToolBarButton(Lan.g(this,"Export"),3,"","Export")); ToolBarMain.Buttons.Add(new ODToolBarButton(ODToolBarButtonStyle.Separator)); //ToolBarMain.Buttons.Add(new ODToolBarButton("",1,"Go Back One Page","Back")); //ODToolBarButton button=new ODToolBarButton("",-1,"","PageNum"); //button.Style=ODToolBarButtonStyle.Label; //ToolBarMain.Buttons.Add(button); //ToolBarMain.Buttons.Add(new ODToolBarButton("",2,"Go Forward One Page","Fwd")); ToolBarMain.Buttons.Add(new ODToolBarButton(Lan.g(this,"Zoom In"),6,"","Zoom")); //ODToolBarButton button=new ODToolBarButton("Scroll Mode",-1,"",""); //button.Style=ODToolBarButtonStyle.DropDownButton; //button.DropDownMenu=menuScrollMode; //ToolBarMain.Buttons.Add(button); ToolBarMain.Buttons.Add(new ODToolBarButton(ODToolBarButtonStyle.Separator)); ToolBarMain.Buttons.Add(new ODToolBarButton(Lan.g(this,"Close"),-1,"Close This Window","Close")); //ToolBarMain.Invalidate(); }
private void FillGrid() { InsFilingCodeSubtypes.RefreshCache(); insFilingCodeSubtypes = InsFilingCodeSubtypes.GetForInsFilingCode(InsFilingCodeCur.InsFilingCodeNum); gridInsFilingCodeSubtypes.BeginUpdate(); gridInsFilingCodeSubtypes.Columns.Clear(); ODGridColumn col = new ODGridColumn(Lan.g("TableInsFilingCodes", "Description"), 100); gridInsFilingCodeSubtypes.Columns.Add(col); gridInsFilingCodeSubtypes.Rows.Clear(); ODGridRow row; for (int i = 0; i < insFilingCodeSubtypes.Count; i++) { row = new ODGridRow(); row.Cells.Add(insFilingCodeSubtypes[i].Descript); gridInsFilingCodeSubtypes.Rows.Add(row); } gridInsFilingCodeSubtypes.EndUpdate(); }