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

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

Initial committ of scheduling package

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