public Prefs() { Ap = new Ap(); Is = new Is(); Lan = new Lan(); Rta = new Rta(); }
public void LanCreate() { Configure(); lan = new Lan { Properties = new LanProperties { Public = true, Name = ".Net V2 - Test " + DateTime.Now.ToShortTimeString() } }; lan = lanApi.Create(datacenter.Id, lan); DoWait(lan.Request); Assert.IsNotNull(lan); }
private void FillGrid() { Cursor = Cursors.WaitCursor; gridMain.BeginUpdate(); List <DisplayField> fields = DisplayFields.GetForCategory(DisplayFieldCategory.CEMTSearchPatients); if (gridMain.Columns.Count == 0) //Init only once. { foreach (DisplayField field in fields) { string heading = field.InternalName; if (string.IsNullOrEmpty(heading)) { heading = field.Description; } gridMain.Columns.Add(new ODGridColumn(heading, field.ColumnWidth)); } } gridMain.Rows.Clear(); ODGridRow row; for (int i = 0; i < _dataConnPats.Tables.Count; i++) { for (int j = 0; j < _dataConnPats.Tables[i].Rows.Count; j++) { row = new ODGridRow(); foreach (DisplayField field in fields) { switch (field.InternalName) { #region Row Cell Filling case "Conn": row.Cells.Add(_dataConnPats.Tables[i].TableName); break; case "PatNum": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["PatNum"].ToString()); break; case "LName": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["LName"].ToString()); break; case "FName": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["FName"].ToString()); break; case "SSN": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["SSN"].ToString()); break; case "PatStatus": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["PatStatus"].ToString()); break; case "Age": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["age"].ToString()); break; case "City": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["City"].ToString()); break; case "State": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["State"].ToString()); break; case "Address": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["Address"].ToString()); break; case "Wk Phone": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["WkPhone"].ToString()); break; case "Email": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["Email"].ToString()); break; case "ChartNum": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["ChartNumber"].ToString()); break; case "MI": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["MiddleI"].ToString()); break; case "Pref Name": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["Preferred"].ToString()); break; case "Hm Phone": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["HmPhone"].ToString()); break; case "Bill Type": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["BillingType"].ToString()); break; case "Pri Prov": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["PriProv"].ToString()); break; case "Birthdate": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["Birthdate"].ToString()); break; case "Site": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["site"].ToString()); break; case "Clinic": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["clinic"].ToString()); break; case "Wireless Ph": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["WirelessPhone"].ToString()); break; case "Sec Prov": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["SecProv"].ToString()); break; case "LastVisit": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["lastVisit"].ToString()); break; case "NextVisit": row.Cells.Add(_dataConnPats.Tables[i].Rows[j]["nextVisit"].ToString()); break; #endregion } } row.Tag = ListConns.Find(x => ((x.ServerName + ", " + x.DatabaseName) == _dataConnPats.Tables[i].TableName || x.ServiceURI == _dataConnPats.Tables[i].TableName)); gridMain.Rows.Add(row); } } gridMain.EndUpdate(); Cursor = Cursors.Default; if (_complConnAmt == ListConns.Count) { ODThread.QuitSyncThreadsByGroupName(1, "FetchPats"); //Clean up finished threads. butRefresh.Text = Lans.g(this, "Refresh"); labelFetch.Visible = false; if (!_hasWarningShown && _invalidConnsLog != "") { _hasWarningShown = true; //Keeps the message box from showing up for subsequent threads. MessageBox.Show(this, Lan.g(this, "Could not connect to the following servers") + ":" + _invalidConnsLog); } } else { butRefresh.Text = Lans.g(this, "Stop Refresh"); labelFetch.Visible = true; } }
protected override void OnPatientStoreOpened(EventArgs e, object sender) { if (Patient.ImageFolder == "") //creates new folder for patient if none present { string name = Patient.LName + Patient.FName; string folder = ""; for (int i = 0; i < name.Length; i++) { if (Char.IsLetter(name, i)) { folder += name.Substring(i, 1); } } folder += Patient.PatNum.ToString(); //ensures unique name try { Patient PatOld = Patient.Copy(); Patient.ImageFolder = folder; patFolder = ODFileUtils.CombinePaths(new string[] { FileStoreSettings.GetPreferredImagePath, Patient.ImageFolder.Substring(0, 1).ToUpper(), Patient.ImageFolder }); Directory.CreateDirectory(patFolder); ImageStore.UpdatePatient(Patient, PatOld); } catch { throw new Exception(Lan.g("ContrDocs", "Error. Could not create folder for patient. ")); return; } } else //patient folder already created once { patFolder = ODFileUtils.CombinePaths(new string[] { FileStoreSettings.GetPreferredImagePath, Patient.ImageFolder.Substring(0, 1).ToUpper(), Patient.ImageFolder }); } if (!Directory.Exists(patFolder)) //this makes it more resiliant and allows copies //of the opendentaldata folder to be used in read-only situations. { try { Directory.CreateDirectory(patFolder); } catch { throw new Exception(Lan.g("ContrDocs", "Error. Could not create folder for patient. ")); } } //now find all files in the patient folder that are not in the db and add them DirectoryInfo di = new DirectoryInfo(patFolder); FileInfo[] fiList = di.GetFiles(); string[] fileList = new string[fiList.Length]; for (int i = 0; i < fileList.Length; i++) { fileList[i] = fiList[i].Name; } int countAdded = Documents.InsertMissing(Patient, fileList); if (countAdded > 0) { Debug.WriteLine(countAdded.ToString() + " documents found and added to the first category."); } //it will refresh in FillDocList }
/// <summary> /// Create a Lan Creates a LAN within the datacenter /// </summary> /// <param name="datacenterId"></param> /// <param name="lan">Lan to be created</param> /// <param name="parameter">Controls whether response is pretty-printed (with indentation and new lines)</param> /// <param name="depth">Controls the details depth of response objects. \nEg. GET /datacenters/[ID]\n - depth=0: only direct properties are included. Children (servers etc.) are not included\n - depth=1: direct properties and children references are included\n - depth=2: direct properties and children properties are included\n - depth=3: direct properties and children properties and children's children are included\n - depth=... and so on</param> /// <returns>Task of ApiResponse (Lan)</returns> public async System.Threading.Tasks.Task<ApiResponse<Lan>> CreateAsyncWithHttpInfo(string datacenterId, Lan lan, bool? parameter = null, int? depth = null) { // verify the required parameter 'datacenterId' is set if (datacenterId == null) throw new ApiException(400, "Missing required parameter 'datacenterId' when calling Create"); // verify the required parameter 'lan' is set if (lan == null) throw new ApiException(400, "Missing required parameter 'lan' when calling Create"); var path_ = "/datacenters/{datacenterId}/lans"; var pathParams = new Dictionary<String, String>(); var queryParams = new Dictionary<String, String>(); var headerParams = new Dictionary<String, String>(); var formParams = new Dictionary<String, String>(); var fileParams = new Dictionary<String, FileParameter>(); Object postBody = null; // to determine the Content-Type header String[] httpContentTypes = new String[] { "application/json", "application/vnd.profitbricks.resource+json" }; String httpContentType = Configuration.ApiClient.SelectHeaderContentType(httpContentTypes); // to determine the Accept header String[] httpHeaderAccepts = new String[] { "application/vnd.profitbricks.resource+json" }; String httpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(httpHeaderAccepts); if (httpHeaderAccept != null) headerParams.Add("Accept", httpHeaderAccept); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); if (datacenterId != null) pathParams.Add("datacenterId", Configuration.ApiClient.ParameterToString(datacenterId)); // path parameter if (parameter != null) queryParams.Add("parameter", Configuration.ApiClient.ParameterToString(parameter)); // query parameter if (depth != null) queryParams.Add("depth", Configuration.ApiClient.ParameterToString(depth)); // query parameter postBody = Configuration.ApiClient.Serialize(lan); // http body (model) parameter // authentication (basicAuth) required // http basic authentication required if (!String.IsNullOrEmpty(Configuration.Username) || !String.IsNullOrEmpty(Configuration.Password)) { headerParams["Authorization"] = "Basic " + ApiClient.Base64Encode(Configuration.Username + ":" + Configuration.Password); } // make the HTTP request IRestResponse response = (IRestResponse)await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, httpContentType); int statusCode = (int)response.StatusCode; if (statusCode >= 400) throw new ApiException(statusCode, "Error calling Create: " + response.Content, response.Content); else if (statusCode == 0) throw new ApiException(statusCode, "Error calling Create: " + response.ErrorMessage, response.ErrorMessage); return new ApiResponse<Lan>(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (Lan)Configuration.ApiClient.Deserialize(response, typeof(Lan))); }
/// <summary> /// Create a Lan Creates a LAN within the datacenter /// </summary> /// <param name="datacenterId"></param> /// <param name="lan">Lan to be created</param> /// <param name="parameter">Controls whether response is pretty-printed (with indentation and new lines)</param> /// <param name="depth">Controls the details depth of response objects. \nEg. GET /datacenters/[ID]\n - depth=0: only direct properties are included. Children (servers etc.) are not included\n - depth=1: direct properties and children references are included\n - depth=2: direct properties and children properties are included\n - depth=3: direct properties and children properties and children's children are included\n - depth=... and so on</param> /// <returns>Task of Lan</returns> public async System.Threading.Tasks.Task<Lan> CreateAsync(string datacenterId, Lan lan, bool? parameter = null, int? depth = null) { ApiResponse<Lan> response = await CreateAsyncWithHttpInfo(datacenterId, lan, parameter, depth); return response.Data; }
/// <summary> /// Create a Lan Creates a LAN within the datacenter /// </summary> /// <param name="datacenterId"></param> /// <param name="lan">Lan to be created</param> /// <param name="parameter">Controls whether response is pretty-printed (with indentation and new lines)</param> /// <param name="depth">Controls the details depth of response objects. \nEg. GET /datacenters/[ID]\n - depth=0: only direct properties are included. Children (servers etc.) are not included\n - depth=1: direct properties and children references are included\n - depth=2: direct properties and children properties are included\n - depth=3: direct properties and children properties and children's children are included\n - depth=... and so on</param> /// <returns>Lan</returns> public Lan Create(string datacenterId, Lan lan, bool? parameter = null, int? depth = null) { ApiResponse<Lan> response = CreateWithHttpInfo(datacenterId, lan, parameter, depth); response.Data.Request = response.Headers["Location"]; return response.Data; }
/// <summary> /// Modify a Lan You can use update attributes of a resource /// </summary> /// <param name="datacenterId"></param> /// <param name="lanId"></param> /// <param name="lan">Modified Lan</param> /// <param name="parameter">Controls whether response is pretty-printed (with indentation and new lines)</param> /// <param name="depth">Controls the details depth of response objects. \nEg. GET /datacenters/[ID]\n - depth=0: only direct properties are included. Children (servers etc.) are not included\n - depth=1: direct properties and children references are included\n - depth=2: direct properties and children properties are included\n - depth=3: direct properties and children properties and children's children are included\n - depth=... and so on</param> /// <returns>Lan</returns> public Lan Update(string datacenterId, string lanId, Lan lan, bool? parameter = null, int? depth = null) { ApiResponse<Lan> response = UpdateWithHttpInfo(datacenterId, lanId, lan, parameter, depth); return response.Data; }
///<summary> ///This is the new version of SendData that should be linux compliant. ///Advoids the kernal32.WritePrivateProfileString call ///</summary> public static void SendData(Program ProgramCur, Patient pat) { string path = Programs.GetProgramPath(ProgramCur); List <ProgramProperty> ForProgram = ProgramProperties.GetForProgram(ProgramCur.ProgramNum); ProgramProperty PPCur = ProgramProperties.GetCur(ForProgram, "Tiger1.ini path"); string bDayFormat = ProgramProperties.GetCur(ForProgram, "Birthdate format (default MM/dd/yy)").PropertyValue; iniFile = PPCur.PropertyValue; System.Collections.Hashtable htKeyVals = new Hashtable(); if (pat != null) { if (!File.Exists(iniFile)) { MessageBox.Show("Could not find " + iniFile); return; } htKeyVals["LastName"] = pat.LName; htKeyVals["FirstName"] = pat.FName; //Patient Id can be any string format. PPCur = ProgramProperties.GetCur(ForProgram, "Enter 0 to use PatientNum, or 1 to use ChartNum"); if (PPCur.PropertyValue == "0") { htKeyVals["PatientID"] = pat.PatNum.ToString(); } else { htKeyVals["PatientID"] = pat.ChartNumber; } htKeyVals["PatientSSN"] = pat.SSN; //WriteValue("SubscriberSSN",pat); if (pat.Gender == PatientGender.Female) { htKeyVals["Gender"] = "Female"; } else { htKeyVals["Gender"] = "Male"; } htKeyVals["DOB"] = pat.Birthdate.ToString(bDayFormat); //WriteValue("ClaimID",pat);??huh htKeyVals["AddrStreetNo"] = pat.Address; //WriteValue("AddrStreetName",pat);?? //WriteValue("AddrSuiteNo",pat);?? htKeyVals["AddrCity"] = pat.City; htKeyVals["AddrState"] = pat.State; htKeyVals["AddrZip"] = pat.Zip; htKeyVals["PhHome"] = LimitLength(pat.HmPhone, 13); htKeyVals["PhWork"] = LimitLength(pat.WkPhone, 13); if (!WritePrivatePofileString2("Slave", htKeyVals, iniFile)) { MessageBox.Show(Lan.g(null, "Unable to start external program: ") + path); } else { try { ODFileUtils.ProcessStart(path, ProgramCur.CommandLine); } catch { MessageBox.Show(path + " is not available."); } } } //if patient is loaded else { try { ODFileUtils.ProcessStart(path); //should start TigerView without bringing up a pt. } catch { MessageBox.Show(path + " is not available."); } } }
public FormKPIDowntime() { InitializeComponent(); Lan.F(this); }
private void FillControl() { labelClinicName.Text = Signup.ClinicNum != 0 ? Clinics.GetDesc(Signup.ClinicNum) : Lan.g(this, "Headquarters"); labelEnabled.Text = Signup.IsEnabled ? Lan.g(this, "Enabled") : Lan.g(this, "Disabled"); FillGrid(); }
/// <summary> /// Returns a list of guarantors that require allocation. /// Will look for a half finished job from previous. /// Returns null if user does not want to continue a suspended job. /// </summary> private int[] Generate_GuarantorList_ToAllocate() { int[] rValue = null; // Check status of an incomplete last run. Did it complete well? string TempTableName = TABLENAME + "_temp"; bool TempTableExists = TableExists(TempTableName); int[] FullyProcessedGuarantors = null; int[] PartiallyProcessedGuarantors = null; List <int> OD_Guarantors = new List <int>(); List <int> OD_Guarantors_NeedProcessing = null; // new List<int>(); // Find fully processed Guarantors #region Check with users on continuing an incomplete batch run if (TempTableExists) { DialogResult dr = MessageBox.Show(Lan.g(this, "Processing was incomplete during last\n" + "run of the batch allocation process. Do you want to start over?\n" + "This will likely result in a loss of data but the data will\n" + "be rebuilt\n\nDO YOU WANT TO START OVER?"), "Warning", MessageBoxButtons.YesNo); if (dr == DialogResult.Yes) // THEY Want to START OVER --DROP TABLE AND RECREATE { string dropCommand = "DROP TABLE " + TABLENAME + "_temp"; Db.NonQOld(dropCommand); dropCommand = "DROP TABLE " + TABLENAME; Db.NonQOld(dropCommand); Db.NonQOld(CreatTableString(DatabaseType.MySql)); Db.NonQOld(Create_AP_temp_table_string(DatabaseType.MySql)); } if (dr == DialogResult.No) // Don't want to start over { DialogResult dr2 = MessageBox.Show(Lan.g(this, "Do you want to continue from where you left of?\n" + "If you state no the allocation process will be aborted.\n\nContinue?"), Lan.g(this, "Continue?"), MessageBoxButtons.YesNo); if (dr2 == DialogResult.No) { return(null); // don't want to continue } } } else // Temp table does not exists so create it! { Db.NonQOld(Create_AP_temp_table_string(DatabaseType.MySql)); } #endregion // Here is what needs to be done: // 1) Find Guarantors with incomplete processing // 2) Drop the entries in the allocation_provier table associated with this guarantor // 3) Set _temp table Status for this guarantor // 4) Generate a list of unprocessed guarantors. // continuing #region Handle Incomplete Proccessed Guarantors string cmd2 = "SELECT tempIndex, Guarantor, AllocStatus FROM " + TempTableName + " WHERE AllocStatus = " + ((int)ProcessingState.Started_and_Incomplete).ToString(); DataTable dt = Db.GetTableOld(cmd2); if (dt.Rows.Count != 0) { string deleteCommand1 = "DELETE FROM " + TABLENAME + " WHERE "; string updateCommand1 = "UPDATE " + TABLENAME + "_temp SET AllocStatus = " + ((int)ProcessingState.NeverStarted).ToString() + "\n WHERE "; PartiallyProcessedGuarantors = new int[dt.Rows.Count]; for (int i = 0; i < dt.Rows.Count; i++) { PartiallyProcessedGuarantors[i] = Int32.Parse(dt.Rows[i][1].ToString()); deleteCommand1 += "\nGuarantor = " + PartiallyProcessedGuarantors[i].ToString() + "\n"; updateCommand1 += "\nGuarantor = " + PartiallyProcessedGuarantors[i].ToString() + "\n"; if (i < dt.Rows.Count - 1) { deleteCommand1 += "OR "; updateCommand1 += "OR "; } } Db.NonQOld(deleteCommand1); // deletes entries from allocation_provider Db.NonQOld(updateCommand1); // updates status in allocation_provider_temp } #endregion #region Generate a list of unprocessed guarantors string ProccessedGuarantors_command = "SELECT Guarantor FROM " + TABLENAME + "_temp WHERE AllocStatus = " + ((int)ProcessingState.Complete); DataTable dt3 = Db.GetTableOld(ProccessedGuarantors_command); DataTable dtODGuarantors = Db.GetTableOld("SELECT DISTINCT(Guarantor) FROM Patient"); for (int i = 0; i < dtODGuarantors.Rows.Count; i++) { OD_Guarantors.Add(Int32.Parse(dtODGuarantors.Rows[i][0].ToString())); } if (dt3.Rows.Count != 0) { FullyProcessedGuarantors = new int[dt3.Rows.Count]; OD_Guarantors_NeedProcessing = new List <int>(); OD_Guarantors_NeedProcessing.AddRange(OD_Guarantors); for (int i = 0; i < dt3.Rows.Count; i++) { FullyProcessedGuarantors[i] = Int32.Parse(dt3.Rows[i][0].ToString()); if (OD_Guarantors_NeedProcessing.Contains(FullyProcessedGuarantors[i])) { OD_Guarantors_NeedProcessing.Remove(FullyProcessedGuarantors[i]); } } } else { OD_Guarantors_NeedProcessing = OD_Guarantors; } #endregion if (OD_Guarantors_NeedProcessing != null) { rValue = OD_Guarantors_NeedProcessing.ToArray(); } return(rValue); }
private bool CheckTableStatus() { bool rValOK_TO_RUN = false; if (!TableExists(TABLENAME)) { DialogResult dr = MessageBox.Show(Lan.g(this, "The Table for holding provider split infomation generated\n" + "by MyAllocator1 does not exist." + "Creation of this table is required create set up allocation by provider\n" + "according to the rules in MyAllocator1.\n\n" + "Do you want to create this table?"), Lan.g(this, "Create Table"), MessageBoxButtons.YesNoCancel); if (dr == DialogResult.Yes) { Db.NonQOld(MyAllocator1_ProviderPayment.CreatTableString(DatabaseType.MySql)); } } rValOK_TO_RUN = TableExists(TABLENAME); return(rValOK_TO_RUN); }
private void FillGrid() { Color needsAttnCol = OpenDental.SetupWizard.GetColor(ODSetupStatus.NeedsAttention); gridMain.BeginUpdate(); gridMain.Columns.Clear(); ODGridColumn col; if (PrefC.HasClinicsEnabled) { col = new ODGridColumn(Lan.g("FormSetupWizard", "OpName"), 110); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "Abbrev"), 110); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "Clinic"), 110); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "ProvDentist"), 110); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "ProvHygienist"), 110); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "IsHygiene"), 60, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "IsHidden"), 60, HorizontalAlignment.Center); gridMain.Columns.Add(col); } else { col = new ODGridColumn(Lan.g("FormSetupWizard", "OpName"), 135); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "Abbrev"), 120); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "ProvDentist"), 130); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "ProvHygienist"), 130); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "IsHygiene"), 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); col = new ODGridColumn(Lan.g("FormSetupWizard", "IsHidden"), 80, HorizontalAlignment.Center); gridMain.Columns.Add(col); } //col = new ODGridColumn("Clinic",120); //gridMain.Columns.Add(col); gridMain.Rows.Clear(); ODGridRow row; bool IsAllComplete = true; if (_listOps.Count == 0) { IsAllComplete = false; } foreach (Operatory opCur in _listOps) { row = new ODGridRow(); row.Cells.Add(opCur.OpName); if (string.IsNullOrEmpty(opCur.OpName)) { row.Cells[row.Cells.Count - 1].CellColor = needsAttnCol; IsAllComplete = false; } row.Cells.Add(opCur.Abbrev); if (string.IsNullOrEmpty(opCur.Abbrev)) { row.Cells[row.Cells.Count - 1].CellColor = needsAttnCol; IsAllComplete = false; } if (PrefC.HasClinicsEnabled) { row.Cells.Add(Clinics.GetAbbr(opCur.ClinicNum)); } //not a required field row.Cells.Add(Providers.GetAbbr(opCur.ProvDentist)); //not a required field row.Cells.Add(Providers.GetAbbr(opCur.ProvHygienist)); //not a required field row.Cells.Add(opCur.IsHygiene ? "X" : ""); //not a required field row.Cells.Add(opCur.IsHidden ? "X" : ""); //not a required field //row = new ODGridRow(); //row.Cells.Add(opCur.OpName); //if(string.IsNullOrEmpty(opCur.OpName)) { // row.Cells[row.Cells.Count-1].CellColor=needsAttnCol; // IsAllComplete=false; //} row.Tag = opCur; gridMain.Rows.Add(row); } gridMain.EndUpdate(); if (IsAllComplete) { IsDone = true; } else { IsDone = false; } }
///<summary>Adds the xml for one statement.</summary> public static void GenerateOneStatement(XmlWriter writer, Statement stmt, Patient pat, Family fam, DataSet dataSet) { Patient guar = fam.ListPats[0]; writer.WriteStartElement("Statement"); //writer.WriteAttributeString("CreditCardChoice",PrefC.GetString(PrefName.BillingElectCreditCardChoices")); //remit address---------------------------------------------------------- writer.WriteStartElement("RemitAddress"); if (!PrefC.GetBool(PrefName.EasyNoClinics) && Clinics.List.Length > 0 && //if using clinics Clinics.GetClinic(guar.ClinicNum) != null) //and this guar is assigned to a clinic { Clinic clinic = Clinics.GetClinic(guar.ClinicNum); writer.WriteElementString("Name", clinic.Description); writer.WriteElementString("Address", clinic.Address); writer.WriteElementString("Address2", clinic.Address2); writer.WriteElementString("City", clinic.City); writer.WriteElementString("State", clinic.State); writer.WriteElementString("Zip", clinic.Zip); string phone = ""; if (clinic.Phone.Length == 10) { phone = "(" + clinic.Phone.Substring(0, 3) + ")" + clinic.Phone.Substring(3, 3) + "-" + clinic.Phone.Substring(6); } writer.WriteElementString("Phone", phone); } else //not using clinics { writer.WriteElementString("Name", PrefC.GetString(PrefName.PracticeTitle)); writer.WriteElementString("Address", PrefC.GetString(PrefName.PracticeAddress)); writer.WriteElementString("Address2", PrefC.GetString(PrefName.PracticeAddress2)); writer.WriteElementString("City", PrefC.GetString(PrefName.PracticeCity)); writer.WriteElementString("State", PrefC.GetString(PrefName.PracticeST)); writer.WriteElementString("Zip", PrefC.GetString(PrefName.PracticeZip)); writer.WriteElementString("Phone", PrefC.GetString(PrefName.PracticePhone)); } writer.WriteEndElement(); //RemitAddress //Patient------------------------------------------------------------------------------- writer.WriteStartElement("Patient"); writer.WriteElementString("Name", guar.GetNameFLFormal()); writer.WriteElementString("AccountNum", guar.PatNum.ToString()); writer.WriteElementString("Address", guar.Address); writer.WriteElementString("Address2", guar.Address2); writer.WriteElementString("City", guar.City); writer.WriteElementString("State", guar.State); writer.WriteElementString("Zip", guar.Zip); writer.WriteEndElement(); //Patient //Account summary----------------------------------------------------------------------- writer.WriteStartElement("AccountSummary"); if (PrefC.GetLong(PrefName.StatementsCalcDueDate) == -1) { writer.WriteElementString("DueDate", Lan.g("FormRpStatement", "Upon Receipt")); } else { DateTime dueDate = DateTime.Today.AddDays(PrefC.GetLong(PrefName.StatementsCalcDueDate)); writer.WriteElementString("DueDate", dueDate.ToString("MM/dd/yyyy")); } writer.WriteElementString("StatementDate", stmt.DateSent.ToString("MM/dd/yyyy")); DataTable tableAccount = null; for (int i = 0; i < dataSet.Tables.Count; i++) { if (dataSet.Tables[i].TableName.StartsWith("account")) { tableAccount = dataSet.Tables[i]; } } //on a regular printed statement, the amount due at the top might be different from the balance at the middle right. //This is because of payment plan balances. //But in e-bills, there is only one amount due. //Insurance estimate is already subtracted, and payment plan balance is already added. double amountDue = guar.BalTotal; //add payplan due amt: for (int m = 0; m < dataSet.Tables["misc"].Rows.Count; m++) { if (dataSet.Tables["misc"].Rows[m]["descript"].ToString() == "payPlanDue") { amountDue += PIn.Double(dataSet.Tables["misc"].Rows[m]["value"].ToString()); } } if (PrefC.GetBool(PrefName.BalancesDontSubtractIns)) { writer.WriteElementString("EstInsPayments", ""); writer.WriteElementString("AmountDue", amountDue.ToString("F2")); } else //this is typical { writer.WriteElementString("EstInsPayments", guar.InsEst.ToString("F2")); amountDue -= guar.InsEst; writer.WriteElementString("AmountDue", amountDue.ToString("F2")); } writer.WriteElementString("Bal_0_30", guar.Bal_0_30.ToString("F2")); writer.WriteElementString("Bal_31_60", guar.Bal_31_60.ToString("F2")); writer.WriteElementString("Bal_61_90", guar.Bal_61_90.ToString("F2")); writer.WriteElementString("BalOver90", guar.BalOver90.ToString("F2")); writer.WriteEndElement(); //AccountSummary //Notes----------------------------------------------------------------------------------- writer.WriteStartElement("Notes"); if (stmt.NoteBold != "") { writer.WriteStartElement("Note"); writer.WriteAttributeString("FgColor", ColorToHexString(Color.DarkRed)); writer.WriteCData(stmt.NoteBold); writer.WriteEndElement(); //Note } if (stmt.Note != "") { writer.WriteStartElement("Note"); writer.WriteAttributeString("FgColor", ColorToHexString(Color.Black)); writer.WriteCData(stmt.Note); writer.WriteEndElement(); //Note } writer.WriteEndElement(); //Notes //Detail items------------------------------------------------------------------------------ writer.WriteStartElement("DetailItems"); string descript; string fulldesc; string procCode; string tth; string[] lineArray; List <string> lines; DateTime date; int seq = 0; for (int i = 0; i < tableAccount.Rows.Count; i++) { procCode = tableAccount.Rows[i]["ProcCode"].ToString(); tth = tableAccount.Rows[i]["tth"].ToString(); descript = tableAccount.Rows[i]["description"].ToString(); fulldesc = procCode + " " + tth + " " + descript; lineArray = fulldesc.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); lines = new List <string>(lineArray); //We assume that the line limit is 40 char. if (lines[0].Length > 40) { string newline = lines[0].Substring(40); lines[0] = lines[0].Substring(0, 40); //first half lines.Insert(1, newline); //second half } for (int li = 0; li < lines.Count; li++) { writer.WriteStartElement("Item"); writer.WriteAttributeString("sequence", seq.ToString()); if (li == 0) { date = (DateTime)tableAccount.Rows[i]["DateTime"]; writer.WriteElementString("Date", date.ToString("MM/dd/yyyy")); writer.WriteElementString("PatientName", tableAccount.Rows[i]["patient"].ToString()); } else { writer.WriteElementString("Date", ""); writer.WriteElementString("PatientName", ""); } writer.WriteElementString("Description", lines[li]); if (li == 0) { writer.WriteElementString("Charges", tableAccount.Rows[i]["charges"].ToString()); writer.WriteElementString("Credits", tableAccount.Rows[i]["credits"].ToString()); writer.WriteElementString("Balance", tableAccount.Rows[i]["balance"].ToString()); } else { writer.WriteElementString("Charges", ""); writer.WriteElementString("Credits", ""); writer.WriteElementString("Balance", ""); } writer.WriteEndElement(); //Item seq++; } } writer.WriteEndElement(); //DetailItems writer.WriteEndElement(); //Statement }
public UserControlSetupWizComplete(string name) { InitializeComponent(); labelDone.Text = Lan.g(this, "Congratulations! You have finished setting up your " + name + "!"); labelEnd.Text = "\r\n" + Lan.g(this, "You can always go back through this setup wizard if you need to make any modifications to your " + name + "."); }
private void FillClinics() { if(!Db.HasDatabaseConnection && !Security.IsUserLoggedIn) { return; } try { if(!PrefC.HasClinicsEnabled) { Visible=false; return; } Items.Clear(); List<Clinic> listClinics=Clinics.GetForUserod(Security.CurUser); if(!Security.CurUser.ClinicIsRestricted || listClinics.Count > 1) { Items.Add(new ODBoxItem<Clinic>(Lan.g("ComboBoxClinicMulti","All"),new Clinic { Abbr=Lan.g("ComboBoxClinicMulti","All"), Description=Lan.g("ComboBoxClinicMulti","All"),ClinicNum=CLINIC_NUM_ALL })); } if(!Security.CurUser.ClinicIsRestricted) { Items.Add(new ODBoxItem<Clinic>(Lan.g("ComboBoxClinicMulti",HqDescription),new Clinic { Abbr=Lan.g("ComboBoxClinicMulti",HqDescription), Description=Lan.g("ComboBoxClinicMulti",HqDescription),ClinicNum=0 })); } foreach(Clinic clinic in listClinics.OrderBy(x => x.Abbr)) { Items.Add(new ODBoxItem<Clinic>(clinic.Abbr,clinic)); } if(Items.Count > 0) { ListSelectedClinicNums=new List<long> { Clinics.ClinicNum }; } } catch(Exception ex) { ex.DoNothing(); } }
public FormTrophyNamePick() { InitializeComponent(); Lan.F(this); }