1 | using System;
|
---|
2 | using System.Drawing;
|
---|
3 | using System.Collections;
|
---|
4 | using System.ComponentModel;
|
---|
5 | using System.Windows.Forms;
|
---|
6 | using System.Data;
|
---|
7 | //using System.Data.OleDb;
|
---|
8 | using System.Diagnostics;
|
---|
9 | using IndianHealthService.BMXNet;
|
---|
10 |
|
---|
11 | namespace IndianHealthService.ClinicalScheduling
|
---|
12 | {
|
---|
13 | /// <summary>
|
---|
14 | /// Appointment Info Dialog
|
---|
15 | /// </summary>
|
---|
16 | public class DAppointPage : System.Windows.Forms.Form
|
---|
17 | {
|
---|
18 | private System.Windows.Forms.TabControl tabControl1;
|
---|
19 | private System.Windows.Forms.TabPage tabPatientInfo;
|
---|
20 | private System.Windows.Forms.TabPage tabAppointment;
|
---|
21 | private System.Windows.Forms.Panel panel1;
|
---|
22 | private System.Windows.Forms.Button cmdOK;
|
---|
23 | private System.Windows.Forms.Button cmdCancel;
|
---|
24 | private System.Windows.Forms.GroupBox groupBox2;
|
---|
25 | private System.Windows.Forms.TextBox txtCity;
|
---|
26 | private System.Windows.Forms.Label label8;
|
---|
27 | private System.Windows.Forms.Label label9;
|
---|
28 | private System.Windows.Forms.TextBox txtZip;
|
---|
29 | private System.Windows.Forms.Label label10;
|
---|
30 | private System.Windows.Forms.TextBox txtState;
|
---|
31 | private System.Windows.Forms.Label label11;
|
---|
32 | private System.Windows.Forms.TextBox txtStreet;
|
---|
33 | private System.Windows.Forms.Label label12;
|
---|
34 | private System.Windows.Forms.TextBox txtPhoneOffice;
|
---|
35 | private System.Windows.Forms.Label label13;
|
---|
36 | private System.Windows.Forms.TextBox txtPhoneHome;
|
---|
37 | private System.Windows.Forms.GroupBox groupBox1;
|
---|
38 | private System.Windows.Forms.TextBox txtCommunity;
|
---|
39 | private System.Windows.Forms.Label label7;
|
---|
40 | private System.Windows.Forms.Label label6;
|
---|
41 | private System.Windows.Forms.TextBox txtSSN;
|
---|
42 | private System.Windows.Forms.Label label5;
|
---|
43 | private System.Windows.Forms.TextBox txtDOB;
|
---|
44 | private System.Windows.Forms.Label label2;
|
---|
45 | private System.Windows.Forms.TextBox txtPatientName;
|
---|
46 | private System.Windows.Forms.GroupBox groupBox3;
|
---|
47 | private System.Windows.Forms.Label lblClinic;
|
---|
48 | private System.Windows.Forms.Label label15;
|
---|
49 | private System.Windows.Forms.TextBox txtNote;
|
---|
50 | private System.Windows.Forms.Label label1;
|
---|
51 | private System.Windows.Forms.Label lblDuration;
|
---|
52 | private System.Windows.Forms.Label lblStartTime;
|
---|
53 | private System.Windows.Forms.Label label4;
|
---|
54 | private System.Windows.Forms.Label label3;
|
---|
55 | private System.Windows.Forms.Label label14;
|
---|
56 | private System.Windows.Forms.TextBox txtHRN;
|
---|
57 | private System.Windows.Forms.Button cmdViewAppointments;
|
---|
58 | private System.Windows.Forms.Button cmdPrintLetter;
|
---|
59 | /// <summary>
|
---|
60 | /// Required designer variable.
|
---|
61 | /// </summary>
|
---|
62 | private System.ComponentModel.Container components = null;
|
---|
63 |
|
---|
64 | public DAppointPage()
|
---|
65 | {
|
---|
66 | InitializeComponent();
|
---|
67 | }
|
---|
68 |
|
---|
69 | #region Windows Form Designer generated code
|
---|
70 | /// <summary>
|
---|
71 | /// Required method for Designer support - do not modify
|
---|
72 | /// the contents of this method with the code editor.
|
---|
73 | /// </summary>
|
---|
74 | private void InitializeComponent()
|
---|
75 | {
|
---|
76 | this.tabControl1 = new System.Windows.Forms.TabControl();
|
---|
77 | this.tabAppointment = new System.Windows.Forms.TabPage();
|
---|
78 | this.groupBox3 = new System.Windows.Forms.GroupBox();
|
---|
79 | this.lblClinic = new System.Windows.Forms.Label();
|
---|
80 | this.label15 = new System.Windows.Forms.Label();
|
---|
81 | this.txtNote = new System.Windows.Forms.TextBox();
|
---|
82 | this.label1 = new System.Windows.Forms.Label();
|
---|
83 | this.lblDuration = new System.Windows.Forms.Label();
|
---|
84 | this.lblStartTime = new System.Windows.Forms.Label();
|
---|
85 | this.label4 = new System.Windows.Forms.Label();
|
---|
86 | this.label3 = new System.Windows.Forms.Label();
|
---|
87 | this.groupBox1 = new System.Windows.Forms.GroupBox();
|
---|
88 | this.label14 = new System.Windows.Forms.Label();
|
---|
89 | this.txtHRN = new System.Windows.Forms.TextBox();
|
---|
90 | this.txtCommunity = new System.Windows.Forms.TextBox();
|
---|
91 | this.label7 = new System.Windows.Forms.Label();
|
---|
92 | this.label6 = new System.Windows.Forms.Label();
|
---|
93 | this.txtSSN = new System.Windows.Forms.TextBox();
|
---|
94 | this.label5 = new System.Windows.Forms.Label();
|
---|
95 | this.txtDOB = new System.Windows.Forms.TextBox();
|
---|
96 | this.label2 = new System.Windows.Forms.Label();
|
---|
97 | this.txtPatientName = new System.Windows.Forms.TextBox();
|
---|
98 | this.tabPatientInfo = new System.Windows.Forms.TabPage();
|
---|
99 | this.groupBox2 = new System.Windows.Forms.GroupBox();
|
---|
100 | this.label12 = new System.Windows.Forms.Label();
|
---|
101 | this.txtPhoneOffice = new System.Windows.Forms.TextBox();
|
---|
102 | this.label13 = new System.Windows.Forms.Label();
|
---|
103 | this.txtPhoneHome = new System.Windows.Forms.TextBox();
|
---|
104 | this.txtCity = new System.Windows.Forms.TextBox();
|
---|
105 | this.label8 = new System.Windows.Forms.Label();
|
---|
106 | this.label9 = new System.Windows.Forms.Label();
|
---|
107 | this.txtZip = new System.Windows.Forms.TextBox();
|
---|
108 | this.label10 = new System.Windows.Forms.Label();
|
---|
109 | this.txtState = new System.Windows.Forms.TextBox();
|
---|
110 | this.label11 = new System.Windows.Forms.Label();
|
---|
111 | this.txtStreet = new System.Windows.Forms.TextBox();
|
---|
112 | this.panel1 = new System.Windows.Forms.Panel();
|
---|
113 | this.cmdPrintLetter = new System.Windows.Forms.Button();
|
---|
114 | this.cmdViewAppointments = new System.Windows.Forms.Button();
|
---|
115 | this.cmdCancel = new System.Windows.Forms.Button();
|
---|
116 | this.cmdOK = new System.Windows.Forms.Button();
|
---|
117 | this.tabControl1.SuspendLayout();
|
---|
118 | this.tabAppointment.SuspendLayout();
|
---|
119 | this.groupBox3.SuspendLayout();
|
---|
120 | this.groupBox1.SuspendLayout();
|
---|
121 | this.tabPatientInfo.SuspendLayout();
|
---|
122 | this.groupBox2.SuspendLayout();
|
---|
123 | this.panel1.SuspendLayout();
|
---|
124 | this.SuspendLayout();
|
---|
125 | //
|
---|
126 | // tabControl1
|
---|
127 | //
|
---|
128 | this.tabControl1.Controls.Add(this.tabAppointment);
|
---|
129 | this.tabControl1.Controls.Add(this.tabPatientInfo);
|
---|
130 | this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
---|
131 | this.tabControl1.Location = new System.Drawing.Point(0, 0);
|
---|
132 | this.tabControl1.Name = "tabControl1";
|
---|
133 | this.tabControl1.SelectedIndex = 0;
|
---|
134 | this.tabControl1.Size = new System.Drawing.Size(463, 374);
|
---|
135 | this.tabControl1.TabIndex = 0;
|
---|
136 | //
|
---|
137 | // tabAppointment
|
---|
138 | //
|
---|
139 | this.tabAppointment.Controls.Add(this.groupBox3);
|
---|
140 | this.tabAppointment.Controls.Add(this.groupBox1);
|
---|
141 | this.tabAppointment.Location = new System.Drawing.Point(4, 22);
|
---|
142 | this.tabAppointment.Name = "tabAppointment";
|
---|
143 | this.tabAppointment.Size = new System.Drawing.Size(455, 348);
|
---|
144 | this.tabAppointment.TabIndex = 1;
|
---|
145 | this.tabAppointment.Text = "Appointment";
|
---|
146 | //
|
---|
147 | // groupBox3
|
---|
148 | //
|
---|
149 | this.groupBox3.Controls.Add(this.lblClinic);
|
---|
150 | this.groupBox3.Controls.Add(this.label15);
|
---|
151 | this.groupBox3.Controls.Add(this.txtNote);
|
---|
152 | this.groupBox3.Controls.Add(this.label1);
|
---|
153 | this.groupBox3.Controls.Add(this.lblDuration);
|
---|
154 | this.groupBox3.Controls.Add(this.lblStartTime);
|
---|
155 | this.groupBox3.Controls.Add(this.label4);
|
---|
156 | this.groupBox3.Controls.Add(this.label3);
|
---|
157 | this.groupBox3.Location = new System.Drawing.Point(8, 136);
|
---|
158 | this.groupBox3.Name = "groupBox3";
|
---|
159 | this.groupBox3.Size = new System.Drawing.Size(439, 168);
|
---|
160 | this.groupBox3.TabIndex = 13;
|
---|
161 | this.groupBox3.TabStop = false;
|
---|
162 | this.groupBox3.Text = "Appointment";
|
---|
163 | //
|
---|
164 | // lblClinic
|
---|
165 | //
|
---|
166 | this.lblClinic.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
---|
167 | this.lblClinic.Location = new System.Drawing.Point(200, 48);
|
---|
168 | this.lblClinic.Name = "lblClinic";
|
---|
169 | this.lblClinic.Size = new System.Drawing.Size(233, 16);
|
---|
170 | this.lblClinic.TabIndex = 19;
|
---|
171 | //
|
---|
172 | // label15
|
---|
173 | //
|
---|
174 | this.label15.Location = new System.Drawing.Point(152, 48);
|
---|
175 | this.label15.Name = "label15";
|
---|
176 | this.label15.Size = new System.Drawing.Size(40, 16);
|
---|
177 | this.label15.TabIndex = 18;
|
---|
178 | this.label15.Text = "Clinic:";
|
---|
179 | this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
180 | //
|
---|
181 | // txtNote
|
---|
182 | //
|
---|
183 | this.txtNote.AcceptsReturn = true;
|
---|
184 | this.txtNote.Location = new System.Drawing.Point(80, 72);
|
---|
185 | this.txtNote.Multiline = true;
|
---|
186 | this.txtNote.Name = "txtNote";
|
---|
187 | this.txtNote.Size = new System.Drawing.Size(353, 88);
|
---|
188 | this.txtNote.TabIndex = 17;
|
---|
189 | //
|
---|
190 | // label1
|
---|
191 | //
|
---|
192 | this.label1.Location = new System.Drawing.Point(4, 80);
|
---|
193 | this.label1.Name = "label1";
|
---|
194 | this.label1.Size = new System.Drawing.Size(56, 16);
|
---|
195 | this.label1.TabIndex = 16;
|
---|
196 | this.label1.Text = "Notes:";
|
---|
197 | this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
198 | //
|
---|
199 | // lblDuration
|
---|
200 | //
|
---|
201 | this.lblDuration.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
---|
202 | this.lblDuration.Location = new System.Drawing.Point(80, 48);
|
---|
203 | this.lblDuration.Name = "lblDuration";
|
---|
204 | this.lblDuration.Size = new System.Drawing.Size(56, 16);
|
---|
205 | this.lblDuration.TabIndex = 15;
|
---|
206 | //
|
---|
207 | // lblStartTime
|
---|
208 | //
|
---|
209 | this.lblStartTime.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
---|
210 | this.lblStartTime.Location = new System.Drawing.Point(80, 24);
|
---|
211 | this.lblStartTime.Name = "lblStartTime";
|
---|
212 | this.lblStartTime.Size = new System.Drawing.Size(353, 16);
|
---|
213 | this.lblStartTime.TabIndex = 14;
|
---|
214 | //
|
---|
215 | // label4
|
---|
216 | //
|
---|
217 | this.label4.Location = new System.Drawing.Point(16, 48);
|
---|
218 | this.label4.Name = "label4";
|
---|
219 | this.label4.Size = new System.Drawing.Size(56, 16);
|
---|
220 | this.label4.TabIndex = 13;
|
---|
221 | this.label4.Text = "Duration:";
|
---|
222 | this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
223 | //
|
---|
224 | // label3
|
---|
225 | //
|
---|
226 | this.label3.Location = new System.Drawing.Point(8, 24);
|
---|
227 | this.label3.Name = "label3";
|
---|
228 | this.label3.Size = new System.Drawing.Size(64, 16);
|
---|
229 | this.label3.TabIndex = 12;
|
---|
230 | this.label3.Text = "Start Time:";
|
---|
231 | this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
232 | //
|
---|
233 | // groupBox1
|
---|
234 | //
|
---|
235 | this.groupBox1.Controls.Add(this.label14);
|
---|
236 | this.groupBox1.Controls.Add(this.txtHRN);
|
---|
237 | this.groupBox1.Controls.Add(this.txtCommunity);
|
---|
238 | this.groupBox1.Controls.Add(this.label7);
|
---|
239 | this.groupBox1.Controls.Add(this.label6);
|
---|
240 | this.groupBox1.Controls.Add(this.txtSSN);
|
---|
241 | this.groupBox1.Controls.Add(this.label5);
|
---|
242 | this.groupBox1.Controls.Add(this.txtDOB);
|
---|
243 | this.groupBox1.Controls.Add(this.label2);
|
---|
244 | this.groupBox1.Controls.Add(this.txtPatientName);
|
---|
245 | this.groupBox1.Location = new System.Drawing.Point(8, 8);
|
---|
246 | this.groupBox1.Name = "groupBox1";
|
---|
247 | this.groupBox1.Size = new System.Drawing.Size(439, 120);
|
---|
248 | this.groupBox1.TabIndex = 12;
|
---|
249 | this.groupBox1.TabStop = false;
|
---|
250 | this.groupBox1.Text = "Patient ID";
|
---|
251 | //
|
---|
252 | // label14
|
---|
253 | //
|
---|
254 | this.label14.Location = new System.Drawing.Point(56, 64);
|
---|
255 | this.label14.Name = "label14";
|
---|
256 | this.label14.Size = new System.Drawing.Size(40, 16);
|
---|
257 | this.label14.TabIndex = 13;
|
---|
258 | this.label14.Text = "HRN:";
|
---|
259 | this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
260 | //
|
---|
261 | // txtHRN
|
---|
262 | //
|
---|
263 | this.txtHRN.Location = new System.Drawing.Point(96, 64);
|
---|
264 | this.txtHRN.Name = "txtHRN";
|
---|
265 | this.txtHRN.ReadOnly = true;
|
---|
266 | this.txtHRN.Size = new System.Drawing.Size(120, 20);
|
---|
267 | this.txtHRN.TabIndex = 12;
|
---|
268 | //
|
---|
269 | // txtCommunity
|
---|
270 | //
|
---|
271 | this.txtCommunity.Location = new System.Drawing.Point(96, 88);
|
---|
272 | this.txtCommunity.Name = "txtCommunity";
|
---|
273 | this.txtCommunity.ReadOnly = true;
|
---|
274 | this.txtCommunity.Size = new System.Drawing.Size(337, 20);
|
---|
275 | this.txtCommunity.TabIndex = 10;
|
---|
276 | //
|
---|
277 | // label7
|
---|
278 | //
|
---|
279 | this.label7.Location = new System.Drawing.Point(24, 88);
|
---|
280 | this.label7.Name = "label7";
|
---|
281 | this.label7.Size = new System.Drawing.Size(72, 16);
|
---|
282 | this.label7.TabIndex = 11;
|
---|
283 | this.label7.Text = "Community:";
|
---|
284 | this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
285 | //
|
---|
286 | // label6
|
---|
287 | //
|
---|
288 | this.label6.Location = new System.Drawing.Point(224, 40);
|
---|
289 | this.label6.Name = "label6";
|
---|
290 | this.label6.Size = new System.Drawing.Size(40, 16);
|
---|
291 | this.label6.TabIndex = 9;
|
---|
292 | this.label6.Text = "SSN:";
|
---|
293 | this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
294 | //
|
---|
295 | // txtSSN
|
---|
296 | //
|
---|
297 | this.txtSSN.Location = new System.Drawing.Point(272, 40);
|
---|
298 | this.txtSSN.Name = "txtSSN";
|
---|
299 | this.txtSSN.ReadOnly = true;
|
---|
300 | this.txtSSN.Size = new System.Drawing.Size(161, 20);
|
---|
301 | this.txtSSN.TabIndex = 8;
|
---|
302 | //
|
---|
303 | // label5
|
---|
304 | //
|
---|
305 | this.label5.Location = new System.Drawing.Point(64, 40);
|
---|
306 | this.label5.Name = "label5";
|
---|
307 | this.label5.Size = new System.Drawing.Size(32, 16);
|
---|
308 | this.label5.TabIndex = 7;
|
---|
309 | this.label5.Text = "DOB:";
|
---|
310 | this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
311 | //
|
---|
312 | // txtDOB
|
---|
313 | //
|
---|
314 | this.txtDOB.Location = new System.Drawing.Point(96, 40);
|
---|
315 | this.txtDOB.Name = "txtDOB";
|
---|
316 | this.txtDOB.ReadOnly = true;
|
---|
317 | this.txtDOB.Size = new System.Drawing.Size(120, 20);
|
---|
318 | this.txtDOB.TabIndex = 6;
|
---|
319 | //
|
---|
320 | // label2
|
---|
321 | //
|
---|
322 | this.label2.Location = new System.Drawing.Point(56, 16);
|
---|
323 | this.label2.Name = "label2";
|
---|
324 | this.label2.Size = new System.Drawing.Size(40, 16);
|
---|
325 | this.label2.TabIndex = 5;
|
---|
326 | this.label2.Text = "Name:";
|
---|
327 | this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
328 | //
|
---|
329 | // txtPatientName
|
---|
330 | //
|
---|
331 | this.txtPatientName.Location = new System.Drawing.Point(96, 16);
|
---|
332 | this.txtPatientName.Name = "txtPatientName";
|
---|
333 | this.txtPatientName.ReadOnly = true;
|
---|
334 | this.txtPatientName.Size = new System.Drawing.Size(337, 20);
|
---|
335 | this.txtPatientName.TabIndex = 0;
|
---|
336 | //
|
---|
337 | // tabPatientInfo
|
---|
338 | //
|
---|
339 | this.tabPatientInfo.Controls.Add(this.groupBox2);
|
---|
340 | this.tabPatientInfo.Location = new System.Drawing.Point(4, 22);
|
---|
341 | this.tabPatientInfo.Name = "tabPatientInfo";
|
---|
342 | this.tabPatientInfo.Size = new System.Drawing.Size(455, 348);
|
---|
343 | this.tabPatientInfo.TabIndex = 0;
|
---|
344 | this.tabPatientInfo.Text = "Contact Information";
|
---|
345 | //
|
---|
346 | // groupBox2
|
---|
347 | //
|
---|
348 | this.groupBox2.Controls.Add(this.label12);
|
---|
349 | this.groupBox2.Controls.Add(this.txtPhoneOffice);
|
---|
350 | this.groupBox2.Controls.Add(this.label13);
|
---|
351 | this.groupBox2.Controls.Add(this.txtPhoneHome);
|
---|
352 | this.groupBox2.Controls.Add(this.txtCity);
|
---|
353 | this.groupBox2.Controls.Add(this.label8);
|
---|
354 | this.groupBox2.Controls.Add(this.label9);
|
---|
355 | this.groupBox2.Controls.Add(this.txtZip);
|
---|
356 | this.groupBox2.Controls.Add(this.label10);
|
---|
357 | this.groupBox2.Controls.Add(this.txtState);
|
---|
358 | this.groupBox2.Controls.Add(this.label11);
|
---|
359 | this.groupBox2.Controls.Add(this.txtStreet);
|
---|
360 | this.groupBox2.Location = new System.Drawing.Point(8, 16);
|
---|
361 | this.groupBox2.Name = "groupBox2";
|
---|
362 | this.groupBox2.Size = new System.Drawing.Size(444, 128);
|
---|
363 | this.groupBox2.TabIndex = 1;
|
---|
364 | this.groupBox2.TabStop = false;
|
---|
365 | this.groupBox2.Text = "Address";
|
---|
366 | //
|
---|
367 | // label12
|
---|
368 | //
|
---|
369 | this.label12.Location = new System.Drawing.Point(224, 96);
|
---|
370 | this.label12.Name = "label12";
|
---|
371 | this.label12.Size = new System.Drawing.Size(40, 16);
|
---|
372 | this.label12.TabIndex = 23;
|
---|
373 | this.label12.Text = "Ofc:";
|
---|
374 | this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
375 | //
|
---|
376 | // txtPhoneOffice
|
---|
377 | //
|
---|
378 | this.txtPhoneOffice.Location = new System.Drawing.Point(272, 96);
|
---|
379 | this.txtPhoneOffice.Name = "txtPhoneOffice";
|
---|
380 | this.txtPhoneOffice.ReadOnly = true;
|
---|
381 | this.txtPhoneOffice.Size = new System.Drawing.Size(166, 20);
|
---|
382 | this.txtPhoneOffice.TabIndex = 22;
|
---|
383 | //
|
---|
384 | // label13
|
---|
385 | //
|
---|
386 | this.label13.Location = new System.Drawing.Point(8, 96);
|
---|
387 | this.label13.Name = "label13";
|
---|
388 | this.label13.Size = new System.Drawing.Size(88, 16);
|
---|
389 | this.label13.TabIndex = 21;
|
---|
390 | this.label13.Text = "Phone (Home):";
|
---|
391 | this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
392 | //
|
---|
393 | // txtPhoneHome
|
---|
394 | //
|
---|
395 | this.txtPhoneHome.Location = new System.Drawing.Point(96, 96);
|
---|
396 | this.txtPhoneHome.Name = "txtPhoneHome";
|
---|
397 | this.txtPhoneHome.ReadOnly = true;
|
---|
398 | this.txtPhoneHome.Size = new System.Drawing.Size(120, 20);
|
---|
399 | this.txtPhoneHome.TabIndex = 20;
|
---|
400 | //
|
---|
401 | // txtCity
|
---|
402 | //
|
---|
403 | this.txtCity.Location = new System.Drawing.Point(96, 48);
|
---|
404 | this.txtCity.Name = "txtCity";
|
---|
405 | this.txtCity.ReadOnly = true;
|
---|
406 | this.txtCity.Size = new System.Drawing.Size(342, 20);
|
---|
407 | this.txtCity.TabIndex = 18;
|
---|
408 | //
|
---|
409 | // label8
|
---|
410 | //
|
---|
411 | this.label8.Location = new System.Drawing.Point(16, 48);
|
---|
412 | this.label8.Name = "label8";
|
---|
413 | this.label8.Size = new System.Drawing.Size(72, 16);
|
---|
414 | this.label8.TabIndex = 19;
|
---|
415 | this.label8.Text = "City:";
|
---|
416 | this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
417 | //
|
---|
418 | // label9
|
---|
419 | //
|
---|
420 | this.label9.Location = new System.Drawing.Point(224, 72);
|
---|
421 | this.label9.Name = "label9";
|
---|
422 | this.label9.Size = new System.Drawing.Size(40, 16);
|
---|
423 | this.label9.TabIndex = 17;
|
---|
424 | this.label9.Text = "Zip:";
|
---|
425 | this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
426 | //
|
---|
427 | // txtZip
|
---|
428 | //
|
---|
429 | this.txtZip.Location = new System.Drawing.Point(272, 72);
|
---|
430 | this.txtZip.Name = "txtZip";
|
---|
431 | this.txtZip.ReadOnly = true;
|
---|
432 | this.txtZip.Size = new System.Drawing.Size(166, 20);
|
---|
433 | this.txtZip.TabIndex = 16;
|
---|
434 | //
|
---|
435 | // label10
|
---|
436 | //
|
---|
437 | this.label10.Location = new System.Drawing.Point(56, 72);
|
---|
438 | this.label10.Name = "label10";
|
---|
439 | this.label10.Size = new System.Drawing.Size(40, 16);
|
---|
440 | this.label10.TabIndex = 15;
|
---|
441 | this.label10.Text = "State:";
|
---|
442 | this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
443 | //
|
---|
444 | // txtState
|
---|
445 | //
|
---|
446 | this.txtState.Location = new System.Drawing.Point(96, 72);
|
---|
447 | this.txtState.Name = "txtState";
|
---|
448 | this.txtState.ReadOnly = true;
|
---|
449 | this.txtState.Size = new System.Drawing.Size(120, 20);
|
---|
450 | this.txtState.TabIndex = 14;
|
---|
451 | //
|
---|
452 | // label11
|
---|
453 | //
|
---|
454 | this.label11.Location = new System.Drawing.Point(56, 22);
|
---|
455 | this.label11.Name = "label11";
|
---|
456 | this.label11.Size = new System.Drawing.Size(40, 16);
|
---|
457 | this.label11.TabIndex = 13;
|
---|
458 | this.label11.Text = "Street:";
|
---|
459 | this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
---|
460 | //
|
---|
461 | // txtStreet
|
---|
462 | //
|
---|
463 | this.txtStreet.Location = new System.Drawing.Point(96, 22);
|
---|
464 | this.txtStreet.Name = "txtStreet";
|
---|
465 | this.txtStreet.ReadOnly = true;
|
---|
466 | this.txtStreet.Size = new System.Drawing.Size(342, 20);
|
---|
467 | this.txtStreet.TabIndex = 12;
|
---|
468 | //
|
---|
469 | // panel1
|
---|
470 | //
|
---|
471 | this.panel1.Controls.Add(this.cmdPrintLetter);
|
---|
472 | this.panel1.Controls.Add(this.cmdViewAppointments);
|
---|
473 | this.panel1.Controls.Add(this.cmdCancel);
|
---|
474 | this.panel1.Controls.Add(this.cmdOK);
|
---|
475 | this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
---|
476 | this.panel1.Location = new System.Drawing.Point(0, 334);
|
---|
477 | this.panel1.Name = "panel1";
|
---|
478 | this.panel1.Size = new System.Drawing.Size(463, 40);
|
---|
479 | this.panel1.TabIndex = 1;
|
---|
480 | //
|
---|
481 | // cmdPrintLetter
|
---|
482 | //
|
---|
483 | this.cmdPrintLetter.CausesValidation = false;
|
---|
484 | this.cmdPrintLetter.Location = new System.Drawing.Point(208, 8);
|
---|
485 | this.cmdPrintLetter.Name = "cmdPrintLetter";
|
---|
486 | this.cmdPrintLetter.Size = new System.Drawing.Size(68, 24);
|
---|
487 | this.cmdPrintLetter.TabIndex = 3;
|
---|
488 | this.cmdPrintLetter.Text = "Print Letter";
|
---|
489 | this.cmdPrintLetter.Click += new System.EventHandler(this.cmdPrintLetter_Click);
|
---|
490 | //
|
---|
491 | // cmdViewAppointments
|
---|
492 | //
|
---|
493 | this.cmdViewAppointments.CausesValidation = false;
|
---|
494 | this.cmdViewAppointments.Location = new System.Drawing.Point(12, 8);
|
---|
495 | this.cmdViewAppointments.Name = "cmdViewAppointments";
|
---|
496 | this.cmdViewAppointments.Size = new System.Drawing.Size(112, 24);
|
---|
497 | this.cmdViewAppointments.TabIndex = 2;
|
---|
498 | this.cmdViewAppointments.Text = "View Appointments";
|
---|
499 | this.cmdViewAppointments.Click += new System.EventHandler(this.cmdViewAppointments_Click);
|
---|
500 | //
|
---|
501 | // cmdCancel
|
---|
502 | //
|
---|
503 | this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
---|
504 | this.cmdCancel.Location = new System.Drawing.Point(387, 8);
|
---|
505 | this.cmdCancel.Name = "cmdCancel";
|
---|
506 | this.cmdCancel.Size = new System.Drawing.Size(64, 24);
|
---|
507 | this.cmdCancel.TabIndex = 1;
|
---|
508 | this.cmdCancel.Text = "Cancel";
|
---|
509 | //
|
---|
510 | // cmdOK
|
---|
511 | //
|
---|
512 | this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
|
---|
513 | this.cmdOK.Location = new System.Drawing.Point(317, 8);
|
---|
514 | this.cmdOK.Name = "cmdOK";
|
---|
515 | this.cmdOK.Size = new System.Drawing.Size(64, 24);
|
---|
516 | this.cmdOK.TabIndex = 0;
|
---|
517 | this.cmdOK.Text = "OK";
|
---|
518 | this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
|
---|
519 | //
|
---|
520 | // DAppointPage
|
---|
521 | //
|
---|
522 | this.AcceptButton = this.cmdOK;
|
---|
523 | this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
|
---|
524 | this.CancelButton = this.cmdCancel;
|
---|
525 | this.ClientSize = new System.Drawing.Size(463, 374);
|
---|
526 | this.Controls.Add(this.panel1);
|
---|
527 | this.Controls.Add(this.tabControl1);
|
---|
528 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
---|
529 | this.Name = "DAppointPage";
|
---|
530 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
---|
531 | this.Text = "Patient Appointment";
|
---|
532 | this.Load += new System.EventHandler(this.DAppointPage_Load);
|
---|
533 | this.tabControl1.ResumeLayout(false);
|
---|
534 | this.tabAppointment.ResumeLayout(false);
|
---|
535 | this.groupBox3.ResumeLayout(false);
|
---|
536 | this.groupBox3.PerformLayout();
|
---|
537 | this.groupBox1.ResumeLayout(false);
|
---|
538 | this.groupBox1.PerformLayout();
|
---|
539 | this.tabPatientInfo.ResumeLayout(false);
|
---|
540 | this.groupBox2.ResumeLayout(false);
|
---|
541 | this.groupBox2.PerformLayout();
|
---|
542 | this.panel1.ResumeLayout(false);
|
---|
543 | this.ResumeLayout(false);
|
---|
544 |
|
---|
545 | }
|
---|
546 | #endregion
|
---|
547 |
|
---|
548 | #region Fields
|
---|
549 |
|
---|
550 | private CGDocumentManager m_DocManager;
|
---|
551 |
|
---|
552 | private string m_sPatientName;
|
---|
553 | private string m_sPatientHRN;
|
---|
554 | private string m_sPatientIEN;
|
---|
555 | private string m_sPatientDOB;
|
---|
556 | private string m_sPatientSSN;
|
---|
557 |
|
---|
558 | private string m_sCity;
|
---|
559 | private string m_sPhoneHome;
|
---|
560 | private string m_sPhoneOffice;
|
---|
561 | private string m_sState;
|
---|
562 | private string m_sStreet;
|
---|
563 | private string m_sZip;
|
---|
564 |
|
---|
565 | private string m_sNote;
|
---|
566 | private DateTime m_dStartTime;
|
---|
567 | private int m_nDuration;
|
---|
568 | private string m_sClinic;
|
---|
569 |
|
---|
570 | #endregion //fields
|
---|
571 |
|
---|
572 | #region Methods
|
---|
573 |
|
---|
574 | public void InitializePage(CGAppointment a)
|
---|
575 | {
|
---|
576 | InitializePage(a.PatientID.ToString(), a.StartTime, a.Duration, "", a.Note);
|
---|
577 | }
|
---|
578 |
|
---|
579 | public void InitializePage(string sPatientIEN, DateTime dStart, int nDuration, string sClinic, string sNote)
|
---|
580 | {
|
---|
581 | m_dStartTime = dStart;
|
---|
582 | m_nDuration = nDuration;
|
---|
583 | m_sClinic = sClinic;
|
---|
584 | m_sPatientIEN = sPatientIEN;
|
---|
585 | m_sNote = sNote;
|
---|
586 | try
|
---|
587 | {
|
---|
588 | string sSql;
|
---|
589 | sSql = "BSDX GET BASIC REG INFO^" + m_sPatientIEN;
|
---|
590 |
|
---|
591 | DataTable tb = m_DocManager.RPMSDataTable(sSql, "PatientRegInfo");
|
---|
592 |
|
---|
593 | Debug.Assert(tb.Rows.Count == 1);
|
---|
594 | DataRow r = tb.Rows[0];
|
---|
595 | this.m_sPatientName = r["NAME"].ToString();
|
---|
596 | this.m_sPatientHRN = r["HRN"].ToString();
|
---|
597 | this.m_sPatientIEN = r["IEN"].ToString();
|
---|
598 | this.m_sPatientSSN = r["SSN"].ToString();
|
---|
599 | DateTime dDob =(DateTime) r["DOB"]; //what if it's null?
|
---|
600 | this.m_sPatientDOB = dDob.ToShortDateString();
|
---|
601 | this.m_sStreet = r["STREET"].ToString();
|
---|
602 | this.m_sCity = r["CITY"].ToString();
|
---|
603 | this.m_sPhoneOffice = r["OFCPHONE"].ToString();
|
---|
604 | this.m_sState = r["STATE"].ToString();
|
---|
605 | this.m_sZip = r["ZIP"].ToString();
|
---|
606 | this.m_sPhoneHome = r["HOMEPHONE"].ToString();
|
---|
607 |
|
---|
608 | this.UpdateDialogData(true);
|
---|
609 | }
|
---|
610 | catch(Exception e)
|
---|
611 | {
|
---|
612 | MessageBox.Show("DAppointPage::InitializePage -- Unable to retrieve patient information from VistA. " + e.Message);
|
---|
613 | }
|
---|
614 |
|
---|
615 | }
|
---|
616 | /// <summary>
|
---|
617 | /// Move data from member variables to controls (b == true)
|
---|
618 | /// or from controls to member variables (b == false)
|
---|
619 | /// </summary>
|
---|
620 | /// <param name="b"></param>
|
---|
621 | private void UpdateDialogData(bool b)
|
---|
622 | {
|
---|
623 | if (b == true) //move member vars into control data
|
---|
624 | {
|
---|
625 | lblClinic.Text = m_sClinic;
|
---|
626 | lblDuration.Text = m_nDuration.ToString();
|
---|
627 | lblStartTime.Text = m_dStartTime.ToShortDateString() + " " + m_dStartTime.ToShortTimeString();
|
---|
628 |
|
---|
629 | txtCity.Text = this.m_sCity;
|
---|
630 | txtDOB.Text = this.m_sPatientDOB;
|
---|
631 | txtHRN.Text = this.m_sPatientHRN;
|
---|
632 | txtNote.Text = this.m_sNote;
|
---|
633 | txtPatientName.Text = m_sPatientName;
|
---|
634 | txtPhoneHome.Text = this.m_sPhoneHome;
|
---|
635 | txtPhoneOffice.Text = this.m_sPhoneOffice;
|
---|
636 | txtSSN.Text = this.m_sPatientSSN;
|
---|
637 | txtState.Text = this.m_sState;
|
---|
638 | txtStreet.Text = this.m_sStreet;
|
---|
639 | txtZip.Text = this.m_sZip;
|
---|
640 |
|
---|
641 | }
|
---|
642 | else //move control data into member vars
|
---|
643 | {
|
---|
644 | string sNote = txtNote.Text;
|
---|
645 | sNote = sNote.Replace("^", " ");
|
---|
646 | this.m_sNote = sNote;
|
---|
647 | }
|
---|
648 |
|
---|
649 | }
|
---|
650 | private void cmdOK_Click(object sender, System.EventArgs e)
|
---|
651 | {
|
---|
652 | this.UpdateDialogData(false);
|
---|
653 | }
|
---|
654 |
|
---|
655 | /// <summary>
|
---|
656 | /// Clean up any resources being used.
|
---|
657 | /// </summary>
|
---|
658 | protected override void Dispose( bool disposing )
|
---|
659 | {
|
---|
660 | if( disposing )
|
---|
661 | {
|
---|
662 | if(components != null)
|
---|
663 | {
|
---|
664 | components.Dispose();
|
---|
665 | }
|
---|
666 | }
|
---|
667 | base.Dispose( disposing );
|
---|
668 | }
|
---|
669 |
|
---|
670 | private void cmdViewAppointments_Click(object sender, System.EventArgs e)
|
---|
671 | {
|
---|
672 | try
|
---|
673 | {
|
---|
674 | Debug.Assert(m_sPatientIEN != "");
|
---|
675 | int nPatientID = Convert.ToInt32(m_sPatientIEN);
|
---|
676 | ViewPatientAppointments(nPatientID);
|
---|
677 | }
|
---|
678 | catch (Exception ex)
|
---|
679 | {
|
---|
680 | MessageBox.Show(this, ex.Message, "Clinical Scheduling", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
---|
681 | }
|
---|
682 | }
|
---|
683 |
|
---|
684 | public void ViewPatientAppointments(int PatientID)
|
---|
685 | {
|
---|
686 | DPatientApptDisplay dPa = new DPatientApptDisplay();
|
---|
687 |
|
---|
688 | dPa.InitializeForm(this.DocManager, PatientID);
|
---|
689 |
|
---|
690 | if (dPa.ShowDialog(this) != DialogResult.Cancel)
|
---|
691 | {
|
---|
692 | return;
|
---|
693 | }
|
---|
694 | }
|
---|
695 |
|
---|
696 |
|
---|
697 | private void cmdPrintLetter_Click(object sender, System.EventArgs e)
|
---|
698 | {
|
---|
699 | try
|
---|
700 | {
|
---|
701 | Debug.Assert(m_sPatientIEN != "");
|
---|
702 | int nPatientID = Convert.ToInt32(m_sPatientIEN);
|
---|
703 | PrintPatientLetter(nPatientID);
|
---|
704 | }
|
---|
705 | catch (Exception ex)
|
---|
706 | {
|
---|
707 | MessageBox.Show(this, ex.Message, "Clinical Scheduling", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
---|
708 | }
|
---|
709 | }
|
---|
710 |
|
---|
711 | private void PrintPatientLetter(int PatientID)
|
---|
712 | {
|
---|
713 | //Print letter for individual patient
|
---|
714 | try
|
---|
715 | {
|
---|
716 | DPatientLetter dPa = new DPatientLetter();
|
---|
717 | dPa.InitializeForm(DocManager, PatientID);
|
---|
718 |
|
---|
719 | if (dPa.ShowDialog(this) != DialogResult.Cancel)
|
---|
720 | {
|
---|
721 | return;
|
---|
722 | }
|
---|
723 | }
|
---|
724 | catch (Exception ex)
|
---|
725 | {
|
---|
726 | throw ex;
|
---|
727 | }
|
---|
728 | }
|
---|
729 |
|
---|
730 | private void DAppointPage_Load(object sender, System.EventArgs e)
|
---|
731 | {
|
---|
732 | cmdPrintLetter.Enabled = !(m_dStartTime < DateTime.Today);
|
---|
733 | }
|
---|
734 |
|
---|
735 | #endregion //Methods
|
---|
736 |
|
---|
737 | #region Properties
|
---|
738 |
|
---|
739 | public string Note
|
---|
740 | {
|
---|
741 | get
|
---|
742 | {
|
---|
743 | return m_sNote;
|
---|
744 | }
|
---|
745 | set
|
---|
746 | {
|
---|
747 | m_sNote = value;
|
---|
748 | }
|
---|
749 | }
|
---|
750 |
|
---|
751 | public CGDocumentManager DocManager
|
---|
752 | {
|
---|
753 | get
|
---|
754 | {
|
---|
755 | return m_DocManager;
|
---|
756 | }
|
---|
757 | set
|
---|
758 | {
|
---|
759 | m_DocManager = value;
|
---|
760 | }
|
---|
761 | }
|
---|
762 |
|
---|
763 | #endregion //Properties
|
---|
764 |
|
---|
765 | } //end Class
|
---|
766 | }
|
---|