source: Scheduling/branches/GUI1.2/DAppointPage.cs@ 1646

Last change on this file since 1646 was 772, checked in by Sam Habiel, 15 years ago

Removal of Crystal Reports
Partial Rework of Clinic Patient List report
Other reports that used Crystal don't work yet.
Fixes for Strongly typed DataTables (change the RESOURCEID from uint to int) to support table merge from untyped table.
Support for command line arguments: /s= for server /p= for port /a= for access code /v= for verify code
Only the following combinations work: none; /s and /p; /s, /p, /a, /v

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