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

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

Mostly commenting the code.

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