/// <summary> /// /// </summary> /// <param name="patComp"></param> public NextActionOverviewControl(ISPDBL patComp) { InitializeComponent(); this.patComp = patComp; listViewNextActions.View = View.Details; listViewNextActions.LabelEdit = false; listViewNextActions.AllowColumnReorder = true; listViewNextActions.FullRowSelect = true; listViewNextActions.Columns.Add("PID", 40); listViewNextActions.Columns.Add("Name", 200); listViewNextActions.Columns.Add("Age", 45); listViewNextActions.Columns.Add("Sex", 45); listViewNextActions.Columns.Add("Phone", 100); listViewNextActions.Columns.Add("ToDo", 180); listViewNextActions.Columns.Add("Diagnoses", 180); listViewNextActions.Columns.Add("Therapy", 180); foreach (String action in Enum.GetNames(new ActionKind().GetType())) { this.listBoxAction.Items.Add(action); } this.listBoxHalfYear.Items.Add(1); this.listBoxHalfYear.Items.Add(2); }
/// <summary> /// Constructor /// </summary> public DatabaseSettingsForm(ISPDBL patComp) { InitializeComponent(); this.patComp = patComp; DatabaseSettings databaseSettings = this.patComp.GetDatabaseSettings(); if (databaseSettings == null) { this.Enabled = false; this.buttonCancel.Enabled = true; return; } foreach (String database in Enum.GetNames(new Databases().GetType())) { if (!Databases.Undefined.ToString().Equals(database)) { this.listBoxDatabases.Items.Add(database); } } if (databaseSettings.Database != Databases.Undefined) { this.listBoxDatabases.SelectedItem = databaseSettings.Database.ToString(); } this.textBoxAccessFile.Text = databaseSettings.AccessFile; this.textBoxAccess2007File.Text = databaseSettings.Access2007File; this.textBoxMySQLDatabase.Text = databaseSettings.MySQLDatabase; this.textBoxMySQLHostIP.Text = databaseSettings.MySQLServer; this.textBoxMySQLPassword.Text = databaseSettings.MySQLPassword; this.textBoxMySQLPort.Text = databaseSettings.MySQLPort; this.textBoxMySQLUser.Text = databaseSettings.MySQLUser; this.textBoxPostgreSQLDatabase.Text = databaseSettings.PostgreSQLDatabase; this.textBoxPostgreSQLHostIP.Text = databaseSettings.PostgreSQLServer; this.textBoxPostgreSQLPassword.Text = databaseSettings.PostgreSQLPassword; this.textBoxPostgreSQLPort.Text = databaseSettings.PostgreSQLPort; this.textBoxPostgreSQLUser.Text = databaseSettings.PostgreSQLUser; }
/// <summary> /// Initializes a new instance of the <see cref="OverviewControl" /> class. /// </summary> /// <param name="patComp">The pat comp.</param> public OverviewControl(BL.Interfaces.ISPDBL patComp) { InitializeComponent(); this.patComp = patComp; listViewOverview.View = View.Details; listViewOverview.LabelEdit = false; listViewOverview.AllowColumnReorder = true; listViewOverview.FullRowSelect = true; // Create columns for the items and subitems. listViewOverview.Columns.Add("PID", 30); listViewOverview.Columns.Add("Last name", 60); listViewOverview.Columns.Add("First name", 60); listViewOverview.Columns.Add("#visits", 45); listViewOverview.Columns.Add("#ops", 40); listViewOverview.Columns.Add("fist visit", 70); listViewOverview.Columns.Add("last visit", 70); listViewOverview.Columns.Add("first op", 70); listViewOverview.Columns.Add("last op", 70); listViewOverview.Columns.Add("diagnose group", 70); listViewOverview.Columns.Add("finished", 50); listViewOverview.Columns.Add("first visit diagnose", 120); listViewOverview.Columns.Add("performed first op", 120); listViewOverview.Columns.Add("performed last op", 120); }
/// <summary> /// Inits the specified backup path. /// </summary> /// <param name="patComp">The pat comp.</param> public void Init( ISPDBL patComp) { this.patComp = patComp; textBoxBackupPath.Text = this.patComp.BackupPath(); this.textBoxInfo.Text = ""; this.buttonBackupNow.Enabled = true; }
/// <summary> /// Initializes a new instance of the <see cref="NewPatientControl"/> class. /// </summary> public NewPatientControl(ISPDBL patComp) { InitializeComponent(); this.patComp = patComp; foreach (String sex in Enum.GetNames(new Sex().GetType())) { this.listBoxSex.Items.Add(sex); } foreach (String ambulant in Enum.GetNames(new Ambulant().GetType())) { this.listBoxAmbulant.Items.Add(ambulant); } foreach (String resident in Enum.GetNames(new ResidentOfAsmara().GetType())) { this.listBoxResidentOfAsmara.Items.Add(resident); } foreach (String finished in Enum.GetNames(new Finished().GetType())) { this.listBoxFinished.Items.Add(finished); } foreach (String linz in Enum.GetNames(new Linz().GetType())) { this.listBoxLinz.Items.Add(linz); } this.labelLastHighestPiD.Text = ""; }
private static String allPatients(ISPDBL patComp, IList<PatientData> patients, bool useOPData) { StringBuilder sb = new StringBuilder(); foreach(PatientData patient in patients) { sb.Append(onePatient(patient, patComp, useOPData)); } return sb.ToString(); }
private static String allPatients(ISPDBL patComp, IList<PatientData> patients, long year, long halfyear, ActionKind actionKind) { StringBuilder sb = new StringBuilder(); foreach(PatientData patient in patients) { sb.Append(onePatient(patient, patComp, year, halfyear, actionKind)); } return sb.ToString(); }
/// <summary> /// Initializes a new instance of the <see cref="DiagnoseGroupSettingsForm"/> class. /// </summary> /// <param name="patComp">The pat comp.</param> public DiagnoseGroupSettingsForm(ISPDBL patComp) { InitializeComponent(); this.patComp = patComp; refreshListBox(); }
public MainWindow() { InitializeComponent(); patCom = new SPDBL(); searchPanel.Visibility = Visibility.Collapsed; detailPanel.Visibility = Visibility.Collapsed; }
public OPWriterForm() { InitializeComponent(); try { patComp = new SPDBL(); } catch (Exception) { } this.Text = Application.ProductName + " - " + Application.ProductVersion; // + " - Development Version!!"; }
/// <summary> /// Initts the specified pat comp. /// </summary> /// <param name="patComp">The pat comp.</param> internal void Init(ISPDBL patComp) { this.patComp = patComp; listViewAllPatients.Items.Clear(); List<ListViewItem> items = new List<ListViewItem>(); foreach(PatientData patient in this.patComp.GetAllPatients()) { ListViewItem item = new ListViewItem(patient.Id.ToString()); item.SubItems.Add(patient.SurName); item.SubItems.Add(patient.FirstName); item.SubItems.Add(CommonUtilities.StaticUtilities.getAgeFromBirthDate(patient.DateOfBirth)); item.SubItems.Add(patient.Sex.ToString()); item.SubItems.Add(patient.Address); item.SubItems.Add(patient.Weight.ToString()); item.SubItems.Add(patient.Phone); //listViewAllPatients.Items.Add(item); items.Add(item); } Application.DoEvents(); listViewAllPatients.Items.AddRange(items.ToArray()); this.checkBoxVisits.Checked = true; this.checkBoxFurtherTreatment.Checked = true; this.checkBoxPhotoLinks.Checked = true; this.checkBoxOperations.Checked = true; this.textBoxTopBorder.Text = SPD.GUI.Properties.Settings.Default.TopBorder.ToString(); this.textBoxLeftBorder.Text = SPD.GUI.Properties.Settings.Default.LeftBorder.ToString(); this.textBoxNumberOfColumns.Text = SPD.GUI.Properties.Settings.Default.NoOfColumns.ToString(); this.textBoxNumberOfRows.Text = SPD.GUI.Properties.Settings.Default.NoOfRows.ToString(); this.textBoxLabelFontSize.Text = SPD.GUI.Properties.Settings.Default.LabelFontSize.ToString(); this.textBoxStartingRow.Text = "1"; listBoxHalfYear.Items.Clear(); listBoxAction.Items.Clear(); comboBoxNextActionYear.Items.Clear(); foreach (String action in Enum.GetNames(new ActionKind().GetType())) { this.listBoxAction.Items.Add(action); } this.listBoxAction.SelectedIndex = 1; this.listBoxHalfYear.Items.Add("1"); this.listBoxHalfYear.Items.Add("2"); this.listBoxHalfYear.SelectedIndex = (DateTime.Now.Month <= 6) ? 1 : 0; for (int i = 0; i < 10; i++) { this.comboBoxNextActionYear.Items.Add(i + DateTime.Now.Year - 1); } this.comboBoxNextActionYear.Text = (DateTime.Now.Month <= 6) ? DateTime.Now.Year.ToString() : (DateTime.Now.Year + 1).ToString(); listViewAllPatients.Select(); }
public static string getFullHtml(ISPDBL patComp, IList<PatientData> patients, string headlineStr, bool useOPData) { StringBuilder sb = new StringBuilder(); sb.Append("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"" + Environment.NewLine); sb.Append("\"http://www.w3.org/TR/html4/loose.dtd\">" + Environment.NewLine); sb.Append("<html><head><title>SPD-NextAction</title>" + Environment.NewLine); sb.Append(css()); sb.Append("</head>" + Environment.NewLine + "<body>" + Environment.NewLine); sb.Append("<table style='width:100%'>"); sb.Append(headline(headlineStr, patients.Count)); sb.Append(allPatients(patComp, patients, useOPData)); sb.Append("</table>" + Environment.NewLine); sb.Append("</body>" + Environment.NewLine + "</html>"); return sb.ToString(); }
/// <summary> /// Initializes a new instance of the <see cref="NextActionControl"/> class. /// </summary> public NextActionControl(ISPDBL patComp) { InitializeComponent(); this.patComp = patComp; foreach(String action in Enum.GetNames(new ActionKind().GetType())) { this.listBoxAction.Items.Add(action); } this.listBoxHalfYear.Items.Add("1"); this.listBoxHalfYear.Items.Add("2"); for(int i = 0; i < 10; i++) { this.listBoxYear.Items.Add((i + DateTime.Now.Year).ToString()); } }
private static String onePatient(PatientData patient, ISPDBL patComp) { StringBuilder sb = new StringBuilder(); OperationData operation = patComp.GetLastOperationByPatientID(patient.Id); VisitData visit = patComp.GetLastVisitByPatientID(patient.Id); StringBuilder toDoSB = new StringBuilder(); sb.Append(firstLine(patient)); sb.Append(name(patient)); sb.Append(opDiagnoses(operation)); if (operation == null || String.IsNullOrEmpty(operation.Diagnoses)) { sb.Append(visitDiagnoses(visit)); } sb.Append(opPerformed(operation)); sb.Append(opTeam(operation)); sb.Append(seperator()); return sb.ToString(); }
private static String onePatient(PatientData patient, ISPDBL patComp, long year, long halfyear, ActionKind actionKind) { StringBuilder sb = new StringBuilder(); OperationData operation = patComp.GetLastOperationByPatientID(patient.Id); VisitData visit = patComp.GetLastVisitByPatientID(patient.Id); StringBuilder toDoSB = new StringBuilder(); foreach (NextActionData nextAction in patComp.GetNextActionsByPatientID(patient.Id)) { if (nextAction.ActionYear == year && nextAction.ActionhalfYear == halfyear && nextAction.ActionKind == actionKind && !String.IsNullOrEmpty(nextAction.Todo)) { toDoSB.Append(nextAction.Todo); } } sb.Append(firstLine(patient)); sb.Append(name(patient)); sb.Append(opDiagnoses(operation)); sb.Append(visitDiagnoses(visit)); sb.Append(visitTherapy(visit)); sb.Append(toDo(toDoSB.ToString())); sb.Append(seperator()); return sb.ToString(); }
/// <summary> /// Inits the specified final report. /// </summary> /// <param name="finalReport">The final report.</param> /// <param name="patComp">The pat comp.</param> public void Init(string finalReport, ISPDBL patComp) { this.finalReport = finalReport; this.patComp = patComp; Clear(); if (this.finalReport != null) { if (finalReport.Equals("")) { textBoxFinalReport.Text = finalReport + new System.Globalization.DateTimeFormatInfo().GetDayName(DateTime.Now.DayOfWeek) + ", " + new System.Globalization.DateTimeFormatInfo().GetMonthName(DateTime.Now.Month) + " " + DateTime.Now.Day.ToString() + ". " + DateTime.Now.Year.ToString() + "\r\n"; } else { textBoxFinalReport.Text = finalReport + "\r\n" + new System.Globalization.DateTimeFormatInfo().GetDayName(DateTime.Now.DayOfWeek) + ", " + new System.Globalization.DateTimeFormatInfo().GetMonthName(DateTime.Now.Month) + " " + DateTime.Now.Day.ToString() + ". " + DateTime.Now.Year.ToString() + "\r\n"; } } if (currentPatient != null) { this.labelCurrentPatient.Text = currentPatient.Id.ToString() + " " + currentPatient.FirstName + " " + currentPatient.SurName; } if (SPD.GUI.Properties.Settings.Default.FinalReportTextElements != null && SPD.GUI.Properties.Settings.Default.FinalReportTextElements.Count != 0) { foreach (string textElement in SPD.GUI.Properties.Settings.Default.FinalReportTextElements) { listBoxFinalReportTextElements.Items.Add(textElement); } } }
/// <summary> /// Initializes a new instance of the <see cref="ImportControl"/> class. /// </summary> /// <param name="patComp">The pat comp.</param> public ImportControl(ISPDBL patComp) { InitializeComponent(); this.patComp = patComp; }
/// <summary> /// Inits the specified current patient. /// </summary> /// <param name="currentPatient">The current patient.</param> /// <param name="patComp">The pat comp.</param> internal void Init(PatientData currentPatient, ISPDBL patComp) { this.currentPatient = currentPatient; this.operationsList = patComp.GetOperationsByPatientID(currentPatient.Id); this.patComp = patComp; Clear(); fillOperationList(); if (currentPatient != null) { this.labelPatientData.Text = currentPatient.Id.ToString() + " " + currentPatient.FirstName + " " + currentPatient.SurName; } }
/// <summary> /// Initializes a new instance of the <see cref="NewVisit"/> class. /// </summary> public NewVisit(ISPDBL patComp) { this.patComp = patComp; InitializeComponent(); }
private void constructor(ISPDBL patComp) { this.patComp = patComp; InitializeComponent(); foreach(String s in Enum.GetNames(new PPPS().GetType())) { this.comboBoxPPPS.Items.Add(s); } foreach(String s in Enum.GetNames(new Organ().GetType())) { this.comboBoxOrgan.Items.Add(s); } foreach (String s in Enum.GetNames(new Result().GetType())) { this.comboBoxResult.Items.Add(s); } for (int i = 0; i < 20; i++) { comboBoxKathDays.Items.Add(i); } this.listBoxDays.Items.AddRange(new object[] {"12", "24"}); this.listBoxCopys.Items.AddRange(new object[] {"1", "2"}); this.listBoxDays.SelectedIndex = 0; this.listBoxCopys.SelectedIndex = 1; Clear(); }
/// <summary> /// Initializes a new instance of the <see cref="OPControl"/> class. /// </summary> public OPControl(ISPDBL patComp) { constructor(patComp); }
/// <summary> /// Initializes a new instance of the <see cref="NextAppointmentForm"/> class. /// </summary> /// <param name="patComp">The pat comp.</param> /// <param name="patient">The patient.</param> public NextAppointmentForm(ISPDBL patComp, PatientData patient) { InitializeComponent(); this.patComp = patComp; this.patient = patient; }
public static PatientBean convert(PatientData patientData, ISPDBL patComp) { PatientBean patientBean = new PatientBean(); patientBean.ID = patientData.Id; patientBean.FirstName = patientData.FirstName; patientBean.SurName = patientData.SurName; patientBean.Age = StaticUtilities.getAgeFromBirthDate(patientData.DateOfBirth); patientBean.Phone = patientData.Phone; patientBean.Sex = patientData.Sex.ToString(); patientBean.Weight = patientData.Weight.ToString(); patientBean.Address = patientData.Address; switch (patientData.ResidentOfAsmara) { case ResidentOfAsmara.yes : patientBean.ResidentOfAsmara = "yes"; break; case ResidentOfAsmara.no : patientBean.ResidentOfAsmara = "no"; break; case ResidentOfAsmara.undefined: patientBean.ResidentOfAsmara = string.Empty; break; default: throw new InvalidOperationException(patientData.ResidentOfAsmara + "not supportet!!"); } switch (patientData.Ambulant) { case Ambulant.ambulant: patientBean.Ambulant = "yes"; break; case Ambulant.notAmbulant: patientBean.Ambulant = "no"; break; default: throw new InvalidOperationException(patientData.Ambulant + "not supportet!!"); } switch (patientData.Finished) { case Finished.finished: patientBean.Finished = "yes"; break; case Finished.notFinished: patientBean.Finished = "no"; break; case Finished.undefined: patientBean.Finished = string.Empty; break; default: throw new InvalidOperationException(patientData.Finished + "not supportet!!"); } switch (patientData.Linz) { case Linz.finished: patientBean.Linz = "finished"; break; case Linz.notPlanned: patientBean.Linz = string.Empty; break; case Linz.undefined: patientBean.Linz = string.Empty; break; case Linz.running: patientBean.Linz = "running"; break; case Linz.planned: patientBean.Linz = "planed"; break; default: throw new InvalidOperationException(patientData.Linz + "not supportet!!"); } patientBean.WaitListStartDate = patientData.WaitListStartDate == null ? string.Empty : ((DateTime)patientData.WaitListStartDate).ToShortDateString(); patientBean.NoOfOPs = patComp.GetOperationsByPatientID(patientData.Id).Count.ToString(); patientBean.NoOfVisits = patComp.GetVisitsByPatientID(patientData.Id).Count.ToString(); VisitData lastVisit = patComp.GetLastVisitByPatientID(patientData.Id); if (lastVisit == null) { patientBean.VisitDiagnosis = string.Empty; patientBean.VisitProcedure = string.Empty; } else { patientBean.VisitDiagnosis = lastVisit.ExtraDiagnosis; patientBean.VisitProcedure = lastVisit.Procedure; } return patientBean; }
//private delegate void fillComboBoxesDelegate(); /// <summary> /// Inits the specified currend patient. /// </summary> /// <param name="currendPatient">The currend patient.</param> /// <param name="patComp">The pat comp.</param> public void Init(PatientData currendPatient, ISPDBL patComp) { //DateTime dt = DateTime.Now; //string zeit = ""; this.patComp = patComp; //zeit = zeit + "\r\n" + (DateTime.Now - dt).ToString(); if (currendPatient != null) { this.Clear(false); listViewPatients.Items.Add(createPatientListViewItem(currendPatient)); if (listViewPatients.Items.Count > 0) { listViewPatients.SelectedIndices.Add(0); } listViewPatients.Focus(); } else { //zeit = zeit + "\r\n" + (DateTime.Now - dt).ToString(); this.Clear(true); } //zeit = zeit + "\r\n" + (DateTime.Now - dt).ToString(); //MessageBox.Show(zeit); comboBoxDiagnoseGroups.Items.Clear(); foreach(DiagnoseGroupData dgd in patComp.FindAllDiagnoseGroups()) { comboBoxDiagnoseGroups.Items.Add(dgd); } }
/// <summary> /// Initializes a new instance of the <see cref="SPDPrint"/> class. /// </summary> /// <param name="patComp">The pat comp.</param> public SPDPrint(ISPDBL patComp) { this.patComp = patComp; }
/// <summary> /// Initializes a new instance of the <see cref="MainForm"/> class. /// </summary> public MainForm() { //this.tmrFade = new System.Timers.Timer(); //((System.ComponentModel.ISupportInitialize)(this.tmrFade)).BeginInit(); InitializeComponent(); //((System.ComponentModel.ISupportInitialize)(this.tmrFade)).EndInit(); ////Shows Dialog for BL selection //ServerSelectionForm serverSelectionForm = new ServerSelectionForm(); //serverSelectionForm.TopMost = true; //serverSelectionForm.ShowDialog(); ////Generate the Selected BusinessLogic //patComp = SPDLFactory.GetBussinessLogicObject(ServerSelectionForm.GetEndPointData());//new SPDBL(); patComp = new SPDBL(); this.newOperation = new OPControl(this.patComp); this.newOperation.Store += new NewOperationStoreEventHandler(newOperation_Store); this.newPatientControl = new NewPatientControl(this.patComp); this.newPatientControl.Store += new NewPatientStoreEventHandler(this.patientStore); this.patientSearchControl = new PatientSearchControl(); this.patientSearchControl.AddVisit += new AddVisitEventHandler(patientSearchControl_AddVisit); this.patientSearchControl.ChangePatientData += new ChangePatientDataEventHandler(patientSearchControl_ChangePatientData); this.patientSearchControl.ShowPatientData += new ShowPatientDataEventHandler(patientSearchControl_ShowPatientData); this.patientSearchControl.ShowVisits += new ShowVisitsEventHandler(patientSearchControl_ShowVisits); this.patientSearchControl.AddOperation += new AddOperationEventHandler(patientSearchControl_AddOperation); this.patientSearchControl.AddFurtherTreatment += new AddFurtherTreatmentEventHandler(patientSearchControl_AddFurtherTreatment); this.patientSearchControl.ShowOperations += new ShowOperationsEventHandler(patientSearchControl_ShowOperations); this.patientSearchControl.AddImages += new ImagesEventHandler(patientSearchControl_AddImages); this.patientSearchControl.SelectionChange += new SelectionChangeEventHandler(patientSearchControl_SelectionChange); this.patientSearchControl.PlanOP += new PlanOPEventHandler(patientSearchControl_PlanOP); this.patientSearchControl.NextAction += new NextActionEventHandler(patientSearchControl_NextAction); this.imagesControl = new ImagesControl(); this.imagesControl.Store += new PhotoStoreEventHandler(imagesControl_Store); this.imagesControl.Delete += new DeleteImageEventHandler(imagesControl_Delete); this.showOperationsControl = new ShowOperationsControl(); this.showOperationsControl.ChangeOP += new ChangeOPEventHandler(showOperationsControl_ChangeOP); this.newVisit = new NewVisit(this.patComp); this.visitsControl = new VisitsControl(); this.visitsControl.Change += new VisitChangeEventHandler(visitControl_VisitChange); this.newVisit.Store +=new NewVisitStoreEventHandler(this.visitStore); this.furtherTreatmentControl = new FinalReportControl(); this.furtherTreatmentControl.Store += new NewFinalReportStoreEventHandler(furtherTreatmentControl_Store); this.printMorePatientsControl = new PrintMorePatientsControl(); this.barDiagramm = new BarDiagram(); this.backupForm = new BackupForm(); this.nextActionControl = new NextActionControl(this.patComp); this.nextActionOverviewControl = new NextActionOverviewControl(this.patComp); this.importControl = new ImportControl(this.patComp); this.overviewControl = new OverviewControl(this.patComp); Bitmap img; img = SPD.GUI.Properties.Resources.logogross; PictureBox picBox = new PictureBox(); picBox.Image = img; picBox.Size = new Size(591, 383); picBox.Location = new System.Drawing.Point(200, 10); this.Controls.Add(picBox); img = SPD.GUI.Properties.Resources.KinderurologieLogo; picBox = new PictureBox(); picBox.Image = img; picBox.Size = new Size(482, 323); picBox.Location = new System.Drawing.Point(259, 435); this.Controls.Add(picBox); // // tmrFade // //this.tmrFade.Interval = 10; //this.tmrFade.SynchronizingObject = this; //this.tmrFade.Elapsed += new System.Timers.ElapsedEventHandler(this.tmrFade_Elapsed); //this.Opacity = 0; //this.Show(); //tmrFade.Enabled = true; this.Text = Application.ProductName + " - " + Application.ProductVersion; // + " - Development Version!!"; this.menuStrip.Items["backupToolStripMenuItem"].Enabled = patComp.SupportsBackup(); ((ToolStripMenuItem)this.menuStrip.Items["settingsToolStripMenuItem"]).DropDownItems["databaseSettingsToolStripMenuItem"].Enabled = patComp.SupportDatabaseManagement(); }