source: Scheduling/trunk/cs/bsdx0200GUISourceCode/DAppointPage.cs@ 616

Last change on this file since 616 was 616, checked in by Sam Habiel, 14 years ago

Removed references to "View EHR" from ctxCalendarGrid and DAppointPage.

File size: 29.8 KB
Line 
1using System;
2using System.Drawing;
3using System.Collections;
4using System.ComponentModel;
5using System.Windows.Forms;
6using System.Data;
7//using System.Data.OleDb;
8using System.Diagnostics;
9using IndianHealthService.BMXNet;
10
11namespace 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.Size = new System.Drawing.Size(166, 20);
381 this.txtPhoneOffice.TabIndex = 22;
382 //
383 // label13
384 //
385 this.label13.Location = new System.Drawing.Point(8, 96);
386 this.label13.Name = "label13";
387 this.label13.Size = new System.Drawing.Size(88, 16);
388 this.label13.TabIndex = 21;
389 this.label13.Text = "Phone (Home):";
390 this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
391 //
392 // txtPhoneHome
393 //
394 this.txtPhoneHome.Location = new System.Drawing.Point(96, 96);
395 this.txtPhoneHome.Name = "txtPhoneHome";
396 this.txtPhoneHome.Size = new System.Drawing.Size(120, 20);
397 this.txtPhoneHome.TabIndex = 20;
398 //
399 // txtCity
400 //
401 this.txtCity.Location = new System.Drawing.Point(96, 48);
402 this.txtCity.Name = "txtCity";
403 this.txtCity.Size = new System.Drawing.Size(342, 20);
404 this.txtCity.TabIndex = 18;
405 //
406 // label8
407 //
408 this.label8.Location = new System.Drawing.Point(16, 48);
409 this.label8.Name = "label8";
410 this.label8.Size = new System.Drawing.Size(72, 16);
411 this.label8.TabIndex = 19;
412 this.label8.Text = "City:";
413 this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
414 //
415 // label9
416 //
417 this.label9.Location = new System.Drawing.Point(224, 72);
418 this.label9.Name = "label9";
419 this.label9.Size = new System.Drawing.Size(40, 16);
420 this.label9.TabIndex = 17;
421 this.label9.Text = "Zip:";
422 this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
423 //
424 // txtZip
425 //
426 this.txtZip.Location = new System.Drawing.Point(272, 72);
427 this.txtZip.Name = "txtZip";
428 this.txtZip.Size = new System.Drawing.Size(166, 20);
429 this.txtZip.TabIndex = 16;
430 //
431 // label10
432 //
433 this.label10.Location = new System.Drawing.Point(56, 72);
434 this.label10.Name = "label10";
435 this.label10.Size = new System.Drawing.Size(40, 16);
436 this.label10.TabIndex = 15;
437 this.label10.Text = "State:";
438 this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
439 //
440 // txtState
441 //
442 this.txtState.Location = new System.Drawing.Point(96, 72);
443 this.txtState.Name = "txtState";
444 this.txtState.Size = new System.Drawing.Size(120, 20);
445 this.txtState.TabIndex = 14;
446 //
447 // label11
448 //
449 this.label11.Location = new System.Drawing.Point(56, 22);
450 this.label11.Name = "label11";
451 this.label11.Size = new System.Drawing.Size(40, 16);
452 this.label11.TabIndex = 13;
453 this.label11.Text = "Street:";
454 this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
455 //
456 // txtStreet
457 //
458 this.txtStreet.Location = new System.Drawing.Point(96, 22);
459 this.txtStreet.Name = "txtStreet";
460 this.txtStreet.Size = new System.Drawing.Size(342, 20);
461 this.txtStreet.TabIndex = 12;
462 //
463 // panel1
464 //
465 this.panel1.Controls.Add(this.cmdPrintLetter);
466 this.panel1.Controls.Add(this.cmdViewAppointments);
467 this.panel1.Controls.Add(this.cmdCancel);
468 this.panel1.Controls.Add(this.cmdOK);
469 this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
470 this.panel1.Location = new System.Drawing.Point(0, 334);
471 this.panel1.Name = "panel1";
472 this.panel1.Size = new System.Drawing.Size(463, 40);
473 this.panel1.TabIndex = 1;
474 //
475 // cmdPrintLetter
476 //
477 this.cmdPrintLetter.CausesValidation = false;
478 this.cmdPrintLetter.Location = new System.Drawing.Point(208, 8);
479 this.cmdPrintLetter.Name = "cmdPrintLetter";
480 this.cmdPrintLetter.Size = new System.Drawing.Size(68, 24);
481 this.cmdPrintLetter.TabIndex = 3;
482 this.cmdPrintLetter.Text = "Print Letter";
483 this.cmdPrintLetter.Click += new System.EventHandler(this.cmdPrintLetter_Click);
484 //
485 // cmdViewAppointments
486 //
487 this.cmdViewAppointments.CausesValidation = false;
488 this.cmdViewAppointments.Location = new System.Drawing.Point(12, 8);
489 this.cmdViewAppointments.Name = "cmdViewAppointments";
490 this.cmdViewAppointments.Size = new System.Drawing.Size(112, 24);
491 this.cmdViewAppointments.TabIndex = 2;
492 this.cmdViewAppointments.Text = "View Appointments";
493 this.cmdViewAppointments.Click += new System.EventHandler(this.cmdViewAppointments_Click);
494 //
495 // cmdCancel
496 //
497 this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
498 this.cmdCancel.Location = new System.Drawing.Point(387, 8);
499 this.cmdCancel.Name = "cmdCancel";
500 this.cmdCancel.Size = new System.Drawing.Size(64, 24);
501 this.cmdCancel.TabIndex = 1;
502 this.cmdCancel.Text = "Cancel";
503 //
504 // cmdOK
505 //
506 this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
507 this.cmdOK.Location = new System.Drawing.Point(317, 8);
508 this.cmdOK.Name = "cmdOK";
509 this.cmdOK.Size = new System.Drawing.Size(64, 24);
510 this.cmdOK.TabIndex = 0;
511 this.cmdOK.Text = "OK";
512 this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
513 //
514 // DAppointPage
515 //
516 this.AcceptButton = this.cmdOK;
517 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
518 this.CancelButton = this.cmdCancel;
519 this.ClientSize = new System.Drawing.Size(463, 374);
520 this.Controls.Add(this.panel1);
521 this.Controls.Add(this.tabControl1);
522 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
523 this.Name = "DAppointPage";
524 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
525 this.Text = "Patient Appointment";
526 this.Load += new System.EventHandler(this.DAppointPage_Load);
527 this.tabControl1.ResumeLayout(false);
528 this.tabAppointment.ResumeLayout(false);
529 this.groupBox3.ResumeLayout(false);
530 this.groupBox3.PerformLayout();
531 this.groupBox1.ResumeLayout(false);
532 this.groupBox1.PerformLayout();
533 this.tabPatientInfo.ResumeLayout(false);
534 this.groupBox2.ResumeLayout(false);
535 this.groupBox2.PerformLayout();
536 this.panel1.ResumeLayout(false);
537 this.ResumeLayout(false);
538
539 }
540 #endregion
541
542 #region Fields
543
544 private CGDocumentManager m_DocManager;
545
546 private string m_sPatientName;
547 private string m_sPatientHRN;
548 private string m_sPatientIEN;
549 private string m_sPatientDOB;
550 private string m_sPatientSSN;
551
552 private string m_sCity;
553 private string m_sPhoneHome;
554 private string m_sPhoneOffice;
555 private string m_sState;
556 private string m_sStreet;
557 private string m_sZip;
558
559 private string m_sNote;
560 private DateTime m_dStartTime;
561 private int m_nDuration;
562 private string m_sClinic;
563
564 #endregion //fields
565
566 #region Methods
567
568 public void InitializePage(CGAppointment a)
569 {
570 InitializePage(a.PatientID.ToString(), a.StartTime, a.Duration, "", a.Note);
571 }
572
573 public void InitializePage(string sPatientIEN, DateTime dStart, int nDuration, string sClinic, string sNote)
574 {
575 m_dStartTime = dStart;
576 m_nDuration = nDuration;
577 m_sClinic = sClinic;
578 m_sPatientIEN = sPatientIEN;
579 m_sNote = sNote;
580 try
581 {
582 string sSql;
583 sSql = "BSDX GET BASIC REG INFO^" + m_sPatientIEN;
584
585 DataTable tb = m_DocManager.RPMSDataTable(sSql, "PatientRegInfo");
586
587 Debug.Assert(tb.Rows.Count == 1);
588 DataRow r = tb.Rows[0];
589 this.m_sPatientName = r["NAME"].ToString();
590 this.m_sPatientHRN = r["HRN"].ToString();
591 this.m_sPatientIEN = r["IEN"].ToString();
592 this.m_sPatientSSN = r["SSN"].ToString();
593 DateTime dDob =(DateTime) r["DOB"]; //what if it's null?
594 this.m_sPatientDOB = dDob.ToShortDateString();
595 this.m_sStreet = r["STREET"].ToString();
596 this.m_sCity = r["CITY"].ToString();
597 this.m_sPhoneOffice = r["OFCPHONE"].ToString();
598 this.m_sState = r["STATE"].ToString();
599 this.m_sZip = r["ZIP"].ToString();
600 this.m_sPhoneHome = r["HOMEPHONE"].ToString();
601
602 this.UpdateDialogData(true);
603 }
604 catch(Exception e)
605 {
606 MessageBox.Show("DAppointPage::InitializePage -- Unable to retrieve patient information from RPMS. " + e.Message);
607 }
608
609 }
610 /// <summary>
611 /// Move data from member variables to controls (b == true)
612 /// or from controls to member variables (b == false)
613 /// </summary>
614 /// <param name="b"></param>
615 private void UpdateDialogData(bool b)
616 {
617 if (b == true) //move member vars into control data
618 {
619 lblClinic.Text = m_sClinic;
620 lblDuration.Text = m_nDuration.ToString();
621 lblStartTime.Text = m_dStartTime.ToShortDateString() + " " + m_dStartTime.ToShortTimeString();
622
623 txtCity.Text = this.m_sCity;
624 txtDOB.Text = this.m_sPatientDOB;
625 txtHRN.Text = this.m_sPatientHRN;
626 txtNote.Text = this.m_sNote;
627 txtPatientName.Text = m_sPatientName;
628 txtPhoneHome.Text = this.m_sPhoneHome;
629 txtPhoneOffice.Text = this.m_sPhoneOffice;
630 txtSSN.Text = this.m_sPatientSSN;
631 txtState.Text = this.m_sState;
632 txtStreet.Text = this.m_sStreet;
633 txtZip.Text = this.m_sZip;
634
635 }
636 else //move control data into member vars
637 {
638 string sNote = txtNote.Text;
639 sNote = sNote.Replace("^", " ");
640 this.m_sNote = sNote;
641 }
642
643 }
644 private void cmdOK_Click(object sender, System.EventArgs e)
645 {
646 this.UpdateDialogData(false);
647 }
648
649 /// <summary>
650 /// Clean up any resources being used.
651 /// </summary>
652 protected override void Dispose( bool disposing )
653 {
654 if( disposing )
655 {
656 if(components != null)
657 {
658 components.Dispose();
659 }
660 }
661 base.Dispose( disposing );
662 }
663
664 private void cmdViewAppointments_Click(object sender, System.EventArgs e)
665 {
666 try
667 {
668 Debug.Assert(m_sPatientIEN != "");
669 int nPatientID = Convert.ToInt32(m_sPatientIEN);
670 ViewPatientAppointments(nPatientID);
671 }
672 catch (Exception ex)
673 {
674 MessageBox.Show(this, ex.Message, "IHS Clinical Scheduling", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
675 }
676 }
677
678 public void ViewPatientAppointments(int PatientID)
679 {
680 DPatientApptDisplay dPa = new DPatientApptDisplay();
681
682 dPa.InitializeForm(this.DocManager, PatientID);
683
684 if (dPa.ShowDialog(this) != DialogResult.Cancel)
685 {
686 return;
687 }
688 }
689
690
691 private void cmdPrintLetter_Click(object sender, System.EventArgs e)
692 {
693 try
694 {
695 Debug.Assert(m_sPatientIEN != "");
696 int nPatientID = Convert.ToInt32(m_sPatientIEN);
697 PrintPatientLetter(nPatientID);
698 }
699 catch (Exception ex)
700 {
701 MessageBox.Show(this, ex.Message, "IHS Clinical Scheduling", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
702 }
703 }
704
705 private void PrintPatientLetter(int PatientID)
706 {
707 //Print letter for individual patient
708 try
709 {
710 DPatientLetter dPa = new DPatientLetter();
711 dPa.InitializeForm(DocManager, PatientID);
712
713 if (dPa.ShowDialog(this) != DialogResult.Cancel)
714 {
715 return;
716 }
717 }
718 catch (Exception ex)
719 {
720 throw ex;
721 }
722 }
723
724 private void DAppointPage_Load(object sender, System.EventArgs e)
725 {
726 cmdPrintLetter.Enabled = !(m_dStartTime < DateTime.Today);
727 }
728
729 #endregion //Methods
730
731 #region Properties
732
733 public string Note
734 {
735 get
736 {
737 return m_sNote;
738 }
739 set
740 {
741 m_sNote = value;
742 }
743 }
744
745 public CGDocumentManager DocManager
746 {
747 get
748 {
749 return m_DocManager;
750 }
751 set
752 {
753 m_DocManager = value;
754 }
755 }
756
757 #endregion //Properties
758
759 } //end Class
760}
Note: See TracBrowser for help on using the repository browser.