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

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

Updated Appointment Page:
Adds the following fields in Contact Info tab:

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