source: Scheduling/trunk/cs/bsdx0200GUISourceCode/DCheckIn.cs@ 641

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

Initial committ of scheduling package

File size: 22.3 KB
Line 
1using System;
2using System.Drawing;
3using System.Collections;
4using System.ComponentModel;
5using System.Windows.Forms;
6using System.Data;
7using System.Diagnostics;
8using IndianHealthService.BMXNet;
9
10namespace IndianHealthService.ClinicalScheduling
11{
12 /// <summary>
13 /// Summary description for DCheckIn.
14 /// </summary>
15 public class DCheckIn : System.Windows.Forms.Form
16 {
17 /// <summary>
18 /// Required designer variable.
19 /// </summary>
20 private System.ComponentModel.Container components = null;
21
22 public DCheckIn()
23 {
24 //
25 // Required for Windows Form Designer support
26 //
27 InitializeComponent();
28
29 //
30 // TODO: Add any constructor code after InitializeComponent call
31 //
32 }
33
34
35 #region Fields
36 private System.Windows.Forms.Panel pnlPageBottom;
37 private System.Windows.Forms.Button cmdCancel;
38 private System.Windows.Forms.Button cmdOK;
39 private System.Windows.Forms.Panel pnlDescription;
40 private System.Windows.Forms.GroupBox grpDescriptionResourceGroup;
41 private System.Windows.Forms.Label lblDescriptionResourceGroup;
42 private System.Windows.Forms.Label label1;
43 private System.Windows.Forms.DateTimePicker dtpCheckIn;
44 private System.Windows.Forms.Label lblAlready;
45 private System.Windows.Forms.Label label3;
46 private System.Windows.Forms.Label lblPatientName;
47 private System.Windows.Forms.Label label2;
48 private System.Windows.Forms.ComboBox cboProvider;
49 private System.Windows.Forms.ComboBox cboStopCode;
50 private System.Windows.Forms.Label lblStopCode;
51 private System.Windows.Forms.CheckBox chkRoutingSlip;
52 private System.Windows.Forms.GroupBox grpPCCPlus;
53 private System.Windows.Forms.ComboBox cboPCCPlusClinic;
54 private System.Windows.Forms.Label label4;
55 private System.Windows.Forms.ComboBox cboPCCPlusForm;
56 private System.Windows.Forms.Label label5;
57 private System.Windows.Forms.CheckBox chkPCCOutGuide;
58
59 private string m_sPatientName;
60 private DateTime m_dCheckIn;
61 private string m_sProvider;
62 private string m_sProviderIEN;
63 private string m_sStopCode;
64 private string m_sStopCodeIEN;
65 private CGDocumentManager m_DocManager;
66 private DataSet m_dsGlobal;
67 private DataView m_dvProvider;
68 private DataView m_dvCS;
69 private bool m_bProviderRequired;
70 private DataTable m_dtClinic;
71 private DataTable m_dtForm;
72 private DataView m_dvClinic;
73 private DataView m_dvForm;
74 private bool m_bInit;
75 public bool m_bPrintRouteSlip;
76 private DateTime m_dAuxTime;
77
78 /*
79 * PCC Variables
80 */
81 private bool m_bPCC;
82 private string m_sPCCClinicIEN;
83 private string m_sPCCFormIEN;
84 private bool m_bPCCOutGuide;
85
86 #endregion Fields
87
88 #region Properties
89
90 /// <summary>
91 /// Returns string representation of internal entry number of Provider in PROVIDER File
92 /// </summary>
93 public string ProviderIEN
94 {
95 get
96 {
97 return this.m_sProviderIEN;
98 }
99 }
100
101 /// <summary>
102 /// Returns string representation of IEN of Clinic in VEN EHP CLINIC file
103 /// </summary>
104 public string PCCClinicIEN
105 {
106 get
107 {
108 return this.m_sPCCClinicIEN;
109 }
110 }
111
112 /// <summary>
113 /// Returns string representation of IEN of template entry in VEN PCC TEMPLATE
114 /// </summary>
115 public string PCCFormIEN
116 {
117 get
118 {
119 return m_sPCCFormIEN;
120 }
121 }
122
123 /// <summary>
124 /// Returns 'true' if outguide to be printed; otherwise returns 'false'
125 /// </summary>
126 public string PCCOutGuide
127 {
128 get
129 {
130 string sRet = (this.m_bPCCOutGuide == true)?"true":"false";
131 return sRet;
132 }
133 }
134
135 /// <summary>
136 /// Returns string representation of IEN of CLINIC STOP
137 /// </summary>
138 public string ClinicStopIEN
139 {
140 get
141 {
142 return this.m_sStopCodeIEN;
143 }
144 }
145
146 /// <summary>
147 /// Returns 'true' if routing slip to be printed; otherwise 'false'
148 /// </summary>
149 public string PrintRouteSlip
150 {
151 get
152 {
153 string sRet = (this.m_bPrintRouteSlip == true)?"true":"false";
154 return sRet;
155 }
156 }
157
158 /// <summary>
159 /// Appointment checkin time
160 /// </summary>
161 public DateTime CheckInTime
162 {
163 get
164 {
165 return m_dCheckIn;
166 }
167 set
168 {
169 m_dCheckIn = value;
170 }
171 }
172
173 /// <summary>
174 /// Appointment end time
175 /// </summary>
176 public DateTime AuxTime
177 {
178 get
179 {
180 return m_dAuxTime;
181 }
182 set
183 {
184 m_dAuxTime = value;
185 }
186 }
187 #endregion Properties
188
189 #region Methods
190
191 public void InitializePage(CGAppointment a, CGDocumentManager docManager,
192 string sDefaultProvider, bool bProviderRequired, bool bGeneratePCCPlus,
193 bool bMultCodes, string sStopCode)
194 {
195 m_bInit = true;
196 m_DocManager = docManager;
197 m_dsGlobal = m_DocManager.GlobalDataSet;
198 int nFind = 0;
199
200 //Provider processing
201 m_bProviderRequired = bProviderRequired;
202 m_dvProvider = new DataView(m_dsGlobal.Tables["Provider"]);
203 m_dvProvider.Sort = "NAME ASC";
204 cboProvider.DataSource = m_dvProvider;
205 cboProvider.DisplayMember = "NAME";
206 cboProvider.ValueMember = "BMXIEN";
207
208 nFind = m_dvProvider.Find((string) "<None>");
209 if (nFind < 0)
210 {
211 DataRowView drvProv = m_dvProvider.AddNew();
212 drvProv.BeginEdit();
213 drvProv["NAME"]="<None>";
214 drvProv["BMXIEN"]="0";
215 drvProv.EndEdit();
216 }
217 cboProvider.SelectedIndex = 0;
218
219 if (sDefaultProvider != "")
220 {
221 nFind = m_dvProvider.Find((string) sDefaultProvider);
222 cboProvider.SelectedIndex = nFind;
223 m_sProvider = sDefaultProvider;
224 }
225
226 //Stop code processing
227 this.lblStopCode.Visible = false;
228 this.cboStopCode.Visible = false;
229 m_dvCS = new DataView(m_dsGlobal.Tables["ClinicStop"]);
230 m_dvCS.Sort = "NAME ASC";
231 m_sStopCode = sStopCode;
232 m_sStopCodeIEN = "";
233 if (m_sStopCode != "")
234 {
235 //Get the IEN of the clinic stop code
236 nFind = m_dvCS.Find((string) m_sStopCode);
237 Debug.Assert(nFind > -1);
238 if (nFind > -1)
239 {
240 m_sStopCodeIEN = m_dvCS[nFind].Row["BMXIEN"].ToString();
241 }
242 }
243
244 if (bMultCodes == true)
245 {
246 this.lblStopCode.Visible = true;
247 this.cboStopCode.Visible = true;
248 cboStopCode.DataSource = m_dvCS;
249 cboStopCode.DisplayMember = "NAME";
250 cboStopCode.ValueMember = "BMXIEN";
251 if (m_sStopCode != "")
252 {
253 nFind = m_dvCS.Find((string) m_sStopCode);
254 cboStopCode.SelectedIndex = nFind;
255 }
256 }
257
258 m_bPCC = bGeneratePCCPlus;
259 PCCPlus();
260
261 m_sPatientName = a.PatientName;
262 if (a.CheckInTime.Ticks != 0)
263 {
264 m_dCheckIn = a.CheckInTime;
265 dtpCheckIn.Enabled = false;
266 this.cboProvider.Enabled = false;
267 lblAlready.Visible = true;
268 }
269 else
270 {
271 m_dCheckIn = DateTime.Now;
272 }
273 UpdateDialogData(true);
274 m_bInit = false;
275
276 //Synchronize PCCForm with Clinic
277 if (m_bPCC == true)
278 {
279 cboPCCPlusClinic_SelectedIndexChanged(this, new System.EventArgs());
280 }
281 }
282
283 private void PCCPlus()
284 {
285 //PCCPlus processing
286 /*Can't do PCCPlus if no stop code
287 * or if PRINT PCC PLUS FORM field in CLINIC SETUP PARAMETERS is false
288 */
289 if ((m_bPCC == false) ||(m_sStopCode == ""))
290 {
291 grpPCCPlus.Enabled = false;
292 return;
293 }
294 else
295 {
296 grpPCCPlus.Enabled = true;
297 //Populate combo box with recordset of clinics based on m_sStopCode
298 string sCmd = "SELECT BMXIEN, NAME, DEPARTMENT, DEFAULT_ENCOUNTER_FORM, NEVER_PRINT_OUTGUIDE FROM VEN_EHP_CLINIC WHERE DEPARTMENT = '" + m_sStopCode + "'";
299 m_dtClinic = m_DocManager.ConnectInfo.RPMSDataTable(sCmd, "CLINIC");
300 m_dvClinic = new DataView(m_dtClinic);
301 m_dvClinic.Sort = "NAME ASC";
302
303 cboPCCPlusClinic.DataSource = m_dvClinic;
304 cboPCCPlusClinic.DisplayMember = "NAME";
305 cboPCCPlusClinic.ValueMember = "BMXIEN";
306
307
308 //Populate combo box with recordset of all forms
309 sCmd = "SELECT BMXIEN, TEMPLATE FROM VEN_EHP_EF_TEMPLATES";
310 m_dtForm = m_DocManager.ConnectInfo.RPMSDataTable(sCmd, "FORM");
311 m_dvForm = new DataView(m_dtForm);
312 m_dvForm.Sort = "TEMPLATE ASC";
313
314 cboPCCPlusForm.DataSource = m_dvForm;
315 cboPCCPlusForm.DisplayMember = "TEMPLATE";
316 cboPCCPlusForm.ValueMember = "BMXIEN";
317
318 if ((m_dtClinic.Rows.Count == 0) ||(m_dtForm.Rows.Count == 0))
319 {
320 //No PCCPlus clinics for current stop code
321 //or no forms available
322 grpPCCPlus.Enabled = false;
323 return;
324 }
325
326 cboPCCPlusClinic.SelectedIndex = 0;
327 cboPCCPlusClinic_SelectedIndexChanged(this, new System.EventArgs());
328
329 }
330 }
331
332 /// <summary>
333 /// If b is true, moves member vars into control data
334 /// otherwise, moves control data into member vars
335 /// </summary>
336 /// <param name="b"></param>
337 private void UpdateDialogData(bool b)
338 {
339 if (b == true) //Move data to dialog controls from member variables
340 {
341 this.lblPatientName.Text = m_sPatientName;
342 this.dtpCheckIn.Value = m_dCheckIn;
343 }
344 else //Move data to member variables from dialog controls
345 {
346
347 /*
348 * Need to return Provider, ClinicStop, PrintRouteSlip,
349 * PCC Clinic, PCC Form, Print OutGuide
350 */
351
352 m_dCheckIn = this.dtpCheckIn.Value;
353 m_sProviderIEN = this.cboProvider.SelectedValue.ToString();
354 m_bPrintRouteSlip = chkRoutingSlip.Checked;
355
356 /*
357 * Don't get value from CLINIC STOP combo since
358 * it may not be enabled, and
359 * it updates the member variable whenever the selection changes
360 */
361
362 /*
363 * PCCPlus
364 */
365
366 if (grpPCCPlus.Enabled == false)
367 {
368 m_bPCC = false;
369 m_sPCCClinicIEN = "";
370 m_sPCCFormIEN = "";
371 m_bPCCOutGuide = false;
372 }
373 else
374 {
375 m_bPCC = true;
376 m_sPCCClinicIEN = this.cboPCCPlusClinic.SelectedValue.ToString();
377 m_sPCCFormIEN = this.cboPCCPlusForm.SelectedValue.ToString();
378 if (chkPCCOutGuide.Enabled == false)
379 {
380 m_bPCCOutGuide = false;
381 }
382 else
383 {
384 m_bPCCOutGuide = this.chkPCCOutGuide.Checked;
385 }
386 }
387
388 }
389 }
390
391 /// <summary>
392 /// Clean up any resources being used.
393 /// </summary>
394 protected override void Dispose( bool disposing )
395 {
396 if( disposing )
397 {
398 if(components != null)
399 {
400 components.Dispose();
401 }
402 }
403 base.Dispose( disposing );
404 }
405 #endregion Methods
406
407 #region Windows Form Designer generated code
408 /// <summary>
409 /// Required method for Designer support - do not modify
410 /// the contents of this method with the code editor.
411 /// </summary>
412 private void InitializeComponent()
413 {
414 this.pnlPageBottom = new System.Windows.Forms.Panel();
415 this.cmdCancel = new System.Windows.Forms.Button();
416 this.cmdOK = new System.Windows.Forms.Button();
417 this.pnlDescription = new System.Windows.Forms.Panel();
418 this.grpDescriptionResourceGroup = new System.Windows.Forms.GroupBox();
419 this.lblDescriptionResourceGroup = new System.Windows.Forms.Label();
420 this.label1 = new System.Windows.Forms.Label();
421 this.dtpCheckIn = new System.Windows.Forms.DateTimePicker();
422 this.lblAlready = new System.Windows.Forms.Label();
423 this.label3 = new System.Windows.Forms.Label();
424 this.lblPatientName = new System.Windows.Forms.Label();
425 this.cboProvider = new System.Windows.Forms.ComboBox();
426 this.label2 = new System.Windows.Forms.Label();
427 this.cboStopCode = new System.Windows.Forms.ComboBox();
428 this.lblStopCode = new System.Windows.Forms.Label();
429 this.chkRoutingSlip = new System.Windows.Forms.CheckBox();
430 this.grpPCCPlus = new System.Windows.Forms.GroupBox();
431 this.chkPCCOutGuide = new System.Windows.Forms.CheckBox();
432 this.label4 = new System.Windows.Forms.Label();
433 this.cboPCCPlusClinic = new System.Windows.Forms.ComboBox();
434 this.cboPCCPlusForm = new System.Windows.Forms.ComboBox();
435 this.label5 = new System.Windows.Forms.Label();
436 this.pnlPageBottom.SuspendLayout();
437 this.pnlDescription.SuspendLayout();
438 this.grpDescriptionResourceGroup.SuspendLayout();
439 this.grpPCCPlus.SuspendLayout();
440 this.SuspendLayout();
441 //
442 // pnlPageBottom
443 //
444 this.pnlPageBottom.Controls.Add(this.cmdCancel);
445 this.pnlPageBottom.Controls.Add(this.cmdOK);
446 this.pnlPageBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
447 this.pnlPageBottom.Location = new System.Drawing.Point(0, 360);
448 this.pnlPageBottom.Name = "pnlPageBottom";
449 this.pnlPageBottom.Size = new System.Drawing.Size(520, 40);
450 this.pnlPageBottom.TabIndex = 5;
451 //
452 // cmdCancel
453 //
454 this.cmdCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
455 this.cmdCancel.Location = new System.Drawing.Point(440, 8);
456 this.cmdCancel.Name = "cmdCancel";
457 this.cmdCancel.Size = new System.Drawing.Size(56, 24);
458 this.cmdCancel.TabIndex = 2;
459 this.cmdCancel.Text = "Cancel";
460 //
461 // cmdOK
462 //
463 this.cmdOK.DialogResult = System.Windows.Forms.DialogResult.OK;
464 this.cmdOK.Location = new System.Drawing.Point(360, 8);
465 this.cmdOK.Name = "cmdOK";
466 this.cmdOK.Size = new System.Drawing.Size(64, 24);
467 this.cmdOK.TabIndex = 1;
468 this.cmdOK.Text = "OK";
469 this.cmdOK.Click += new System.EventHandler(this.cmdOK_Click);
470 //
471 // pnlDescription
472 //
473 this.pnlDescription.Controls.Add(this.grpDescriptionResourceGroup);
474 this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom;
475 this.pnlDescription.Location = new System.Drawing.Point(0, 288);
476 this.pnlDescription.Name = "pnlDescription";
477 this.pnlDescription.Size = new System.Drawing.Size(520, 72);
478 this.pnlDescription.TabIndex = 6;
479 //
480 // grpDescriptionResourceGroup
481 //
482 this.grpDescriptionResourceGroup.Controls.Add(this.lblDescriptionResourceGroup);
483 this.grpDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
484 this.grpDescriptionResourceGroup.Location = new System.Drawing.Point(0, 0);
485 this.grpDescriptionResourceGroup.Name = "grpDescriptionResourceGroup";
486 this.grpDescriptionResourceGroup.Size = new System.Drawing.Size(520, 72);
487 this.grpDescriptionResourceGroup.TabIndex = 1;
488 this.grpDescriptionResourceGroup.TabStop = false;
489 this.grpDescriptionResourceGroup.Text = "Description";
490 //
491 // lblDescriptionResourceGroup
492 //
493 this.lblDescriptionResourceGroup.Dock = System.Windows.Forms.DockStyle.Fill;
494 this.lblDescriptionResourceGroup.Location = new System.Drawing.Point(3, 16);
495 this.lblDescriptionResourceGroup.Name = "lblDescriptionResourceGroup";
496 this.lblDescriptionResourceGroup.Size = new System.Drawing.Size(514, 53);
497 this.lblDescriptionResourceGroup.TabIndex = 0;
498 this.lblDescriptionResourceGroup.Text = "Use this panel to check in an appointment. A PCC visit will automatically be crea" +
499 "ted for this patient at the check in date and time if the clinic is set up to cr" +
500 "eate a visit at checkin. A patient may only be checked-in once.";
501 //
502 // label1
503 //
504 this.label1.Location = new System.Drawing.Point(16, 16);
505 this.label1.Name = "label1";
506 this.label1.Size = new System.Drawing.Size(80, 16);
507 this.label1.TabIndex = 7;
508 this.label1.Text = "Patient Name:";
509 //
510 // dtpCheckIn
511 //
512 this.dtpCheckIn.AllowDrop = true;
513 this.dtpCheckIn.CustomFormat = "MMMM dd yyyy H:mm";
514 this.dtpCheckIn.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
515 this.dtpCheckIn.Location = new System.Drawing.Point(96, 48);
516 this.dtpCheckIn.Name = "dtpCheckIn";
517 this.dtpCheckIn.ShowUpDown = true;
518 this.dtpCheckIn.Size = new System.Drawing.Size(176, 20);
519 this.dtpCheckIn.TabIndex = 9;
520 //
521 // lblAlready
522 //
523 this.lblAlready.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
524 this.lblAlready.ForeColor = System.Drawing.Color.Green;
525 this.lblAlready.Location = new System.Drawing.Point(288, 40);
526 this.lblAlready.Name = "lblAlready";
527 this.lblAlready.Size = new System.Drawing.Size(192, 32);
528 this.lblAlready.TabIndex = 10;
529 this.lblAlready.Text = "This Patient is already checked in.";
530 this.lblAlready.Visible = false;
531 //
532 // label3
533 //
534 this.label3.Location = new System.Drawing.Point(16, 48);
535 this.label3.Name = "label3";
536 this.label3.Size = new System.Drawing.Size(80, 16);
537 this.label3.TabIndex = 7;
538 this.label3.Text = "CheckIn Time:";
539 //
540 // lblPatientName
541 //
542 this.lblPatientName.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
543 this.lblPatientName.Location = new System.Drawing.Point(96, 16);
544 this.lblPatientName.Name = "lblPatientName";
545 this.lblPatientName.Size = new System.Drawing.Size(256, 16);
546 this.lblPatientName.TabIndex = 11;
547 //
548 // cboProvider
549 //
550 this.cboProvider.Location = new System.Drawing.Point(96, 88);
551 this.cboProvider.Name = "cboProvider";
552 this.cboProvider.Size = new System.Drawing.Size(240, 21);
553 this.cboProvider.TabIndex = 12;
554 //
555 // label2
556 //
557 this.label2.Location = new System.Drawing.Point(16, 88);
558 this.label2.Name = "label2";
559 this.label2.Size = new System.Drawing.Size(80, 16);
560 this.label2.TabIndex = 7;
561 this.label2.Text = "Visit Provider:";
562 //
563 // cboStopCode
564 //
565 this.cboStopCode.Location = new System.Drawing.Point(96, 128);
566 this.cboStopCode.Name = "cboStopCode";
567 this.cboStopCode.Size = new System.Drawing.Size(240, 21);
568 this.cboStopCode.TabIndex = 13;
569 this.cboStopCode.SelectedIndexChanged += new System.EventHandler(this.cboStopCode_SelectedIndexChanged);
570 //
571 // lblStopCode
572 //
573 this.lblStopCode.Location = new System.Drawing.Point(16, 128);
574 this.lblStopCode.Name = "lblStopCode";
575 this.lblStopCode.Size = new System.Drawing.Size(80, 16);
576 this.lblStopCode.TabIndex = 7;
577 this.lblStopCode.Text = "Stop Code:";
578 //
579 // chkRoutingSlip
580 //
581 this.chkRoutingSlip.Location = new System.Drawing.Point(368, 88);
582 this.chkRoutingSlip.Name = "chkRoutingSlip";
583 this.chkRoutingSlip.Size = new System.Drawing.Size(128, 16);
584 this.chkRoutingSlip.TabIndex = 14;
585 this.chkRoutingSlip.Text = "Print Routing Slip";
586 //
587 // grpPCCPlus
588 //
589 this.grpPCCPlus.Controls.Add(this.chkPCCOutGuide);
590 this.grpPCCPlus.Controls.Add(this.label4);
591 this.grpPCCPlus.Controls.Add(this.cboPCCPlusClinic);
592 this.grpPCCPlus.Controls.Add(this.cboPCCPlusForm);
593 this.grpPCCPlus.Controls.Add(this.label5);
594 this.grpPCCPlus.Location = new System.Drawing.Point(8, 168);
595 this.grpPCCPlus.Name = "grpPCCPlus";
596 this.grpPCCPlus.Size = new System.Drawing.Size(488, 104);
597 this.grpPCCPlus.TabIndex = 15;
598 this.grpPCCPlus.TabStop = false;
599 this.grpPCCPlus.Text = "PCC Plus";
600 //
601 // chkPCCOutGuide
602 //
603 this.chkPCCOutGuide.Location = new System.Drawing.Point(360, 24);
604 this.chkPCCOutGuide.Name = "chkPCCOutGuide";
605 this.chkPCCOutGuide.Size = new System.Drawing.Size(96, 16);
606 this.chkPCCOutGuide.TabIndex = 15;
607 this.chkPCCOutGuide.Text = "Print Outguide";
608 //
609 // label4
610 //
611 this.label4.Location = new System.Drawing.Point(8, 24);
612 this.label4.Name = "label4";
613 this.label4.Size = new System.Drawing.Size(72, 16);
614 this.label4.TabIndex = 8;
615 this.label4.Text = "PCC+ Clinic:";
616 //
617 // cboPCCPlusClinic
618 //
619 this.cboPCCPlusClinic.Location = new System.Drawing.Point(88, 24);
620 this.cboPCCPlusClinic.Name = "cboPCCPlusClinic";
621 this.cboPCCPlusClinic.Size = new System.Drawing.Size(240, 21);
622 this.cboPCCPlusClinic.TabIndex = 0;
623 this.cboPCCPlusClinic.SelectedIndexChanged += new System.EventHandler(this.cboPCCPlusClinic_SelectedIndexChanged);
624 //
625 // cboPCCPlusForm
626 //
627 this.cboPCCPlusForm.Location = new System.Drawing.Point(88, 64);
628 this.cboPCCPlusForm.Name = "cboPCCPlusForm";
629 this.cboPCCPlusForm.Size = new System.Drawing.Size(240, 21);
630 this.cboPCCPlusForm.TabIndex = 0;
631 //
632 // label5
633 //
634 this.label5.Location = new System.Drawing.Point(8, 64);
635 this.label5.Name = "label5";
636 this.label5.Size = new System.Drawing.Size(72, 16);
637 this.label5.TabIndex = 8;
638 this.label5.Text = "PCC+ Form:";
639 //
640 // DCheckIn
641 //
642 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
643 this.ClientSize = new System.Drawing.Size(520, 400);
644 this.Controls.Add(this.grpPCCPlus);
645 this.Controls.Add(this.chkRoutingSlip);
646 this.Controls.Add(this.cboStopCode);
647 this.Controls.Add(this.cboProvider);
648 this.Controls.Add(this.lblPatientName);
649 this.Controls.Add(this.lblAlready);
650 this.Controls.Add(this.dtpCheckIn);
651 this.Controls.Add(this.label1);
652 this.Controls.Add(this.pnlDescription);
653 this.Controls.Add(this.pnlPageBottom);
654 this.Controls.Add(this.label3);
655 this.Controls.Add(this.label2);
656 this.Controls.Add(this.lblStopCode);
657 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
658 this.Name = "DCheckIn";
659 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
660 this.Text = "Appointment Check In";
661 this.pnlPageBottom.ResumeLayout(false);
662 this.pnlDescription.ResumeLayout(false);
663 this.grpDescriptionResourceGroup.ResumeLayout(false);
664 this.grpPCCPlus.ResumeLayout(false);
665 this.ResumeLayout(false);
666
667 }
668 #endregion
669
670 #region Events
671
672 private void cmdOK_Click(object sender, System.EventArgs e)
673 {
674 this.UpdateDialogData(false);
675 }
676
677 private void cboStopCode_SelectedIndexChanged(object sender, System.EventArgs e)
678 {
679 /*
680 * Whenever the stop code changes, the set of PCCPlus Clinic Selections change
681 * except during init.
682 */
683 if (m_bInit == true)
684 return;
685
686 //Change the value of m_sStopCode
687 DataRowView drv = (DataRowView) this.cboStopCode.SelectedItem;
688 string sStopCode = drv.Row["NAME"].ToString();
689 m_sStopCode = sStopCode;
690 m_sStopCodeIEN = drv.Row["BMXIEN"].ToString();
691 PCCPlus();
692 }
693
694 private void cboPCCPlusClinic_SelectedIndexChanged(object sender, System.EventArgs e)
695 {
696 /*
697 * Whenever the PCCPlus Clinic changes, the default EF TEMPLATE changes
698 */
699 if (m_bInit == true)
700 return;
701
702 if (this.cboPCCPlusClinic.SelectedItem == null)
703 return;
704
705 DataRowView drv = (DataRowView) this.cboPCCPlusClinic.SelectedItem;
706 string sDefaultForm = drv.Row["DEFAULT_ENCOUNTER_FORM"].ToString();
707
708 int nFind = this.m_dvForm.Find(sDefaultForm);
709 if (nFind > -1)
710 {
711 this.cboPCCPlusForm.SelectedIndex = nFind;
712 }
713 }
714 #endregion Events
715
716
717 }
718}
Note: See TracBrowser for help on using the repository browser.