| [614] | 1 | using System;
|
|---|
| 2 | using System.Drawing;
|
|---|
| 3 | using System.Collections;
|
|---|
| 4 | using System.ComponentModel;
|
|---|
| 5 | using System.Windows.Forms;
|
|---|
| 6 | using CrystalDecisions.Windows;
|
|---|
| 7 | using CrystalDecisions.Shared;
|
|---|
| 8 | using CrystalDecisions.CrystalReports.Engine;
|
|---|
| 9 | using IndianHealthService.BMXNet;
|
|---|
| 10 | using System.Data;
|
|---|
| 11 |
|
|---|
| 12 | namespace IndianHealthService.ClinicalScheduling
|
|---|
| 13 | {
|
|---|
| 14 | /// <summary>
|
|---|
| 15 | /// Summary description for DPatientApptDisplay.
|
|---|
| 16 | /// </summary>
|
|---|
| 17 | public class DPatientApptDisplay : System.Windows.Forms.Form
|
|---|
| 18 | {
|
|---|
| 19 | private System.Windows.Forms.Panel panel1;
|
|---|
| 20 | private System.Windows.Forms.Panel panel2;
|
|---|
| 21 | private CrystalDecisions.Windows.Forms.CrystalReportViewer crViewer1;
|
|---|
| 22 | private System.Windows.Forms.CheckBox chkIncludePast;
|
|---|
| 23 | /// <summary>
|
|---|
| 24 | /// Required designer variable.
|
|---|
| 25 | /// </summary>
|
|---|
| 26 | private System.ComponentModel.Container components = null;
|
|---|
| 27 |
|
|---|
| 28 | public void InitializeForm(CGDocumentManager docManager, int nPatientID)
|
|---|
| 29 | {
|
|---|
| 30 | try
|
|---|
| 31 | {
|
|---|
| 32 | crViewer1.DisplayGroupTree = false;
|
|---|
| 33 |
|
|---|
| 34 | ClinicalScheduling.crPatientApptDisplay cr = new crPatientApptDisplay();
|
|---|
| 35 | string sSql = "BSDX PATIENT APPT DISPLAY^" + nPatientID.ToString();
|
|---|
| 36 |
|
|---|
| 37 | System.Data.DataSet ds = new System.Data.DataSet();
|
|---|
| 38 | DataTable dtAppt = docManager.RPMSDataTable(sSql, "PatientAppts");
|
|---|
| 39 | ds.Tables.Add(dtAppt.Copy());
|
|---|
| 40 |
|
|---|
| 41 | cr.Database.Tables[0].SetDataSource(ds);
|
|---|
| 42 | this.crViewer1.ReportSource = cr;
|
|---|
| 43 |
|
|---|
| 44 | }
|
|---|
| 45 | catch (Exception ex)
|
|---|
| 46 | {
|
|---|
| 47 | MessageBox.Show(ex.Message);
|
|---|
| 48 | }
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | public DPatientApptDisplay()
|
|---|
| 52 | {
|
|---|
| 53 | //
|
|---|
| 54 | // Required for Windows Form Designer support
|
|---|
| 55 | //
|
|---|
| 56 | InitializeComponent();
|
|---|
| 57 |
|
|---|
| 58 | //
|
|---|
| 59 | // TODO: Add any constructor code after InitializeComponent call
|
|---|
| 60 | //
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | /// <summary>
|
|---|
| 64 | /// Clean up any resources being used.
|
|---|
| 65 | /// </summary>
|
|---|
| 66 | protected override void Dispose( bool disposing )
|
|---|
| 67 | {
|
|---|
| 68 | if( disposing )
|
|---|
| 69 | {
|
|---|
| 70 | if(components != null)
|
|---|
| 71 | {
|
|---|
| 72 | components.Dispose();
|
|---|
| 73 | }
|
|---|
| 74 | }
|
|---|
| 75 | base.Dispose( disposing );
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | #region Windows Form Designer generated code
|
|---|
| 79 | /// <summary>
|
|---|
| 80 | /// Required method for Designer support - do not modify
|
|---|
| 81 | /// the contents of this method with the code editor.
|
|---|
| 82 | /// </summary>
|
|---|
| 83 | private void InitializeComponent()
|
|---|
| 84 | {
|
|---|
| 85 | this.panel1 = new System.Windows.Forms.Panel();
|
|---|
| 86 | this.chkIncludePast = new System.Windows.Forms.CheckBox();
|
|---|
| 87 | this.panel2 = new System.Windows.Forms.Panel();
|
|---|
| 88 | this.crViewer1 = new CrystalDecisions.Windows.Forms.CrystalReportViewer();
|
|---|
| 89 | this.panel1.SuspendLayout();
|
|---|
| 90 | this.panel2.SuspendLayout();
|
|---|
| 91 | this.SuspendLayout();
|
|---|
| 92 | //
|
|---|
| 93 | // panel1
|
|---|
| 94 | //
|
|---|
| 95 | this.panel1.Controls.Add(this.chkIncludePast);
|
|---|
| 96 | this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
|---|
| 97 | this.panel1.Location = new System.Drawing.Point(0, 0);
|
|---|
| 98 | this.panel1.Name = "panel1";
|
|---|
| 99 | this.panel1.Size = new System.Drawing.Size(664, 32);
|
|---|
| 100 | this.panel1.TabIndex = 1;
|
|---|
| 101 | //
|
|---|
| 102 | // chkIncludePast
|
|---|
| 103 | //
|
|---|
| 104 | this.chkIncludePast.Location = new System.Drawing.Point(16, 8);
|
|---|
| 105 | this.chkIncludePast.Name = "chkIncludePast";
|
|---|
| 106 | this.chkIncludePast.Size = new System.Drawing.Size(184, 16);
|
|---|
| 107 | this.chkIncludePast.TabIndex = 0;
|
|---|
| 108 | this.chkIncludePast.Text = "Include Past Appointments";
|
|---|
| 109 | this.chkIncludePast.CheckedChanged += new System.EventHandler(this.chkIncludePast_CheckedChanged);
|
|---|
| 110 | //
|
|---|
| 111 | // panel2
|
|---|
| 112 | //
|
|---|
| 113 | this.panel2.Controls.Add(this.crViewer1);
|
|---|
| 114 | this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
|---|
| 115 | this.panel2.Location = new System.Drawing.Point(0, 32);
|
|---|
| 116 | this.panel2.Name = "panel2";
|
|---|
| 117 | this.panel2.Size = new System.Drawing.Size(664, 446);
|
|---|
| 118 | this.panel2.TabIndex = 2;
|
|---|
| 119 | //
|
|---|
| 120 | // crViewer1
|
|---|
| 121 | //
|
|---|
| 122 | this.crViewer1.ActiveViewIndex = -1;
|
|---|
| 123 | this.crViewer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
|---|
| 124 | this.crViewer1.Location = new System.Drawing.Point(0, 0);
|
|---|
| 125 | this.crViewer1.Name = "crViewer1";
|
|---|
| 126 | this.crViewer1.ReportSource = null;
|
|---|
| 127 | this.crViewer1.Size = new System.Drawing.Size(664, 446);
|
|---|
| 128 | this.crViewer1.TabIndex = 1;
|
|---|
| 129 | //
|
|---|
| 130 | // DPatientApptDisplay
|
|---|
| 131 | //
|
|---|
| 132 | this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
|---|
| 133 | this.ClientSize = new System.Drawing.Size(664, 478);
|
|---|
| 134 | this.Controls.Add(this.panel2);
|
|---|
| 135 | this.Controls.Add(this.panel1);
|
|---|
| 136 | this.Name = "DPatientApptDisplay";
|
|---|
| 137 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
|---|
| 138 | this.Text = "Patient Appointments";
|
|---|
| 139 | this.panel1.ResumeLayout(false);
|
|---|
| 140 | this.panel2.ResumeLayout(false);
|
|---|
| 141 | this.ResumeLayout(false);
|
|---|
| 142 |
|
|---|
| 143 | }
|
|---|
| 144 | #endregion
|
|---|
| 145 |
|
|---|
| 146 | private void chkIncludePast_CheckedChanged(object sender, System.EventArgs e)
|
|---|
| 147 | {
|
|---|
| 148 | if (chkIncludePast.Checked == true)
|
|---|
| 149 | {
|
|---|
| 150 | this.crViewer1.SelectionFormula = "TRUE"; //MJL 9/11/2007
|
|---|
| 151 | }
|
|---|
| 152 | else
|
|---|
| 153 | {
|
|---|
| 154 | crViewer1.SelectionFormula = "{PatientAppts.ApptDate} >= CurrentDate";
|
|---|
| 155 | }
|
|---|
| 156 | crViewer1.RefreshReport();
|
|---|
| 157 | }
|
|---|
| 158 | }
|
|---|
| 159 | }
|
|---|