Index: Scheduling/trunk/cs/bsdx0200GUISourceCode/DCheckIn.cs
===================================================================
--- Scheduling/trunk/cs/bsdx0200GUISourceCode/DCheckIn.cs	(revision 964)
+++ Scheduling/trunk/cs/bsdx0200GUISourceCode/DCheckIn.cs	(revision 1062)
@@ -44,13 +44,5 @@
         private System.Windows.Forms.Label label2;
         private System.Windows.Forms.ComboBox cboProvider;
-        private System.Windows.Forms.ComboBox cboStopCode;
-        private System.Windows.Forms.Label lblStopCode;
         private System.Windows.Forms.CheckBox chkRoutingSlip;
-        private System.Windows.Forms.GroupBox grpPCCPlus;
-        private System.Windows.Forms.ComboBox cboPCCPlusClinic;
-        private System.Windows.Forms.Label label4;
-        private System.Windows.Forms.ComboBox cboPCCPlusForm;
-        private System.Windows.Forms.Label label5;
-        private System.Windows.Forms.CheckBox chkPCCOutGuide;
 
         private string m_sPatientName;
@@ -58,6 +50,4 @@
         private string m_sProvider;
         private string m_sProviderIEN;
-        private string m_sStopCode;
-        private string m_sStopCodeIEN;
         private CGDocumentManager m_DocManager;
         private DataSet m_dsGlobal;
@@ -71,15 +61,6 @@
         private bool m_bInit;
         public bool m_bPrintRouteSlip;
-        private DateTime m_dAuxTime;
-
-        /*
-         * PCC Variables
-         */
-        private bool m_bPCC;
-        private string m_sPCCClinicIEN;
-        private string m_sPCCFormIEN;
         private ToolTip toolTip1;
-        private bool m_bPCCOutGuide;
-
+        
         #endregion Fields
 
@@ -98,67 +79,21 @@
 
         /// <summary>
-        /// Returns string representation of IEN of Clinic in VEN EHP CLINIC file
-        /// </summary>
-        public string PCCClinicIEN
+        /// Returns 'true' if routing slip to be printed; otherwise 'false'
+        /// </summary>
+        public bool PrintRouteSlip
         {
             get
             {
-                return this.m_sPCCClinicIEN;
-            }
-        }
-
-        /// <summary>
-        /// Returns string representation of IEN of template entry in VEN PCC TEMPLATE
-        /// </summary>
-        public string PCCFormIEN
+                return m_bPrintRouteSlip;
+            }
+        }
+
+        /// <summary>
+        /// Appointment checkin time
+        /// </summary>
+        public DateTime CheckInTime
         {
             get
             {
-                return m_sPCCFormIEN;
-            }
-        }
-
-        /// <summary>
-        /// Returns 'true' if outguide to be printed; otherwise returns 'false'
-        /// </summary>
-        public string PCCOutGuide
-        {
-            get
-            {
-                string sRet = (this.m_bPCCOutGuide == true) ? "true" : "false";
-                return sRet;
-            }
-        }
-
-        /// <summary>
-        /// Returns string representation of IEN of CLINIC STOP
-        /// </summary>
-        public string ClinicStopIEN
-        {
-            get
-            {
-                return this.m_sStopCodeIEN;
-            }
-        }
-
-        /// <summary>
-        /// Returns 'true' if routing slip to be printed; otherwise 'false'
-        /// </summary>
-        public string PrintRouteSlip
-        {
-            get
-            {
-                string sRet = (this.m_bPrintRouteSlip == true) ? "true" : "false";
-                return sRet;
-            }
-        }
-
-        /// <summary>
-        /// Appointment checkin time
-        /// </summary>
-        public DateTime CheckInTime
-        {
-            get
-            {
                 return m_dCheckIn;
             }
@@ -169,18 +104,4 @@
         }
 
-        /// <summary>
-        /// Appointment end time
-        /// </summary>
-        public DateTime AuxTime
-        {
-            get
-            {
-                return m_dAuxTime;
-            }
-            set
-            {
-                m_dAuxTime = value;
-            }
-        }
         #endregion Properties
 
@@ -193,11 +114,6 @@
         /// <param name="docManager">Document Manager</param>
         /// <param name="sDefaultProvider">Default provider</param>
-        /// <param name="bProviderRequired">not used</param>
-        /// <param name="bGeneratePCCPlus">not used</param>
-        /// <param name="bMultCodes">not used</param>
-        /// <param name="sStopCode">Stop Code</param>
         public void InitializePage(CGAppointment a, CGDocumentManager docManager,
-            string sDefaultProvider, bool bProviderRequired, bool bGeneratePCCPlus,
-            bool bMultCodes, string sStopCode, int nHospLoc)
+            string sDefaultProvider, int nHospLoc)
         {
             m_bInit = true;
@@ -205,7 +121,4 @@
             m_dsGlobal = m_DocManager.GlobalDataSet;
             int nFind = 0;
-
-            //Provider processing
-            m_bProviderRequired = bProviderRequired; //not used in VISTA --remove
 
             //smh new code
@@ -239,9 +152,4 @@
                 cboProvider.SelectedIndex = nFind;
 
-                //an experiment (doesn't work yet, but leaving for future enlightenment): LINQ
-                var defProv = from Provider in m_dtProvider.AsEnumerable() 
-                              where Provider.Field<string>("DEFAULT") == "YES" 
-                              select Provider;
-
             }
             //otherwise, just use the default provider table
@@ -266,40 +174,4 @@
 
 
-            //Stop code processing
-            //TODO: Remove... not in VISTA.
-            this.lblStopCode.Visible = false;
-            this.cboStopCode.Visible = false;
-            m_dvCS = new DataView(m_dsGlobal.Tables["ClinicStop"]);
-            m_dvCS.Sort = "NAME ASC";
-            m_sStopCode = sStopCode;
-            m_sStopCodeIEN = "";
-            if (m_sStopCode != "")
-            {
-                //Get the IEN of the clinic stop code
-                nFind = m_dvCS.Find((string)m_sStopCode);
-                Debug.Assert(nFind > -1);
-                if (nFind > -1)
-                {
-                    m_sStopCodeIEN = m_dvCS[nFind].Row["BMXIEN"].ToString();
-                }
-            }
-
-            if (bMultCodes == true)
-            {
-                this.lblStopCode.Visible = true;
-                this.cboStopCode.Visible = true;
-                cboStopCode.DataSource = m_dvCS;
-                cboStopCode.DisplayMember = "NAME";
-                cboStopCode.ValueMember = "BMXIEN";
-                if (m_sStopCode != "")
-                {
-                    nFind = m_dvCS.Find((string)m_sStopCode);
-                    cboStopCode.SelectedIndex = nFind;
-                }
-            }
-
-            m_bPCC = bGeneratePCCPlus;
-            PCCPlus();
-
             m_sPatientName = a.PatientName;
             if (a.CheckInTime.Ticks != 0)
@@ -314,66 +186,9 @@
                 m_dCheckIn = DateTime.Now;
             }
+
             UpdateDialogData(true);
             m_bInit = false;
-
-            //Synchronize PCCForm with Clinic
-            if (m_bPCC == true)
-            {
-                cboPCCPlusClinic_SelectedIndexChanged(this, new System.EventArgs());
-            }
-        }
-
-        /// <summary>
-        /// Not used in VISTA. Needs to be removed
-        /// <remarks>Not used in VISTA.</remarks>
-        /// </summary>
-        private void PCCPlus()
-        {
-            //PCCPlus processing
-            /*Can't do PCCPlus if no stop code
-                * or if PRINT PCC PLUS FORM field in CLINIC SETUP PARAMETERS is false
-                */
-            if ((m_bPCC == false) || (m_sStopCode == ""))
-            {
-                grpPCCPlus.Enabled = false;
-                return;
-            }
-            else
-            {
-                grpPCCPlus.Enabled = true;
-                //Populate combo box with recordset of clinics based on m_sStopCode
-                string sCmd = "SELECT BMXIEN, NAME, DEPARTMENT, DEFAULT_ENCOUNTER_FORM, NEVER_PRINT_OUTGUIDE FROM VEN_EHP_CLINIC WHERE DEPARTMENT = '" + m_sStopCode + "'";
-                m_dtClinic = m_DocManager.ConnectInfo.RPMSDataTable(sCmd, "CLINIC");
-                m_dvClinic = new DataView(m_dtClinic);
-                m_dvClinic.Sort = "NAME ASC";
-
-                cboPCCPlusClinic.DataSource = m_dvClinic;
-                cboPCCPlusClinic.DisplayMember = "NAME";
-                cboPCCPlusClinic.ValueMember = "BMXIEN";
-
-
-                //Populate combo box with recordset of all forms
-                sCmd = "SELECT BMXIEN, TEMPLATE FROM VEN_EHP_EF_TEMPLATES";
-                m_dtForm = m_DocManager.ConnectInfo.RPMSDataTable(sCmd, "FORM");
-                m_dvForm = new DataView(m_dtForm);
-                m_dvForm.Sort = "TEMPLATE ASC";
-
-                cboPCCPlusForm.DataSource = m_dvForm;
-                cboPCCPlusForm.DisplayMember = "TEMPLATE";
-                cboPCCPlusForm.ValueMember = "BMXIEN";
-
-                if ((m_dtClinic.Rows.Count == 0) || (m_dtForm.Rows.Count == 0))
-                {
-                    //No PCCPlus clinics for current stop code
-                    //or no forms available
-                    grpPCCPlus.Enabled = false;
-                    return;
-                }
-
-                cboPCCPlusClinic.SelectedIndex = 0;
-                cboPCCPlusClinic_SelectedIndexChanged(this, new System.EventArgs());
-
-            }
-        }
+        }
+
 
         /// <summary>
@@ -391,46 +206,7 @@
             else //Move data to member variables from dialog controls
             {
-
-                /*
-                 * Need to return Provider, ClinicStop, PrintRouteSlip, 
-                 * PCC Clinic, PCC Form, Print OutGuide
-                 */
-
                 m_dCheckIn = this.dtpCheckIn.Value;
                 m_sProviderIEN = this.cboProvider.SelectedValue.ToString();
                 m_bPrintRouteSlip = chkRoutingSlip.Checked;
-
-                /*
-                 * Don't get value from CLINIC STOP combo since
-                 * it may not be enabled, and
-                 * it updates the member variable whenever the selection changes
-                 */
-
-                /*
-                 * PCCPlus
-                 */
-
-                if (grpPCCPlus.Enabled == false)
-                {
-                    m_bPCC = false;
-                    m_sPCCClinicIEN = "";
-                    m_sPCCFormIEN = "";
-                    m_bPCCOutGuide = false;
-                }
-                else
-                {
-                    m_bPCC = true;
-                    m_sPCCClinicIEN = this.cboPCCPlusClinic.SelectedValue.ToString();
-                    m_sPCCFormIEN = this.cboPCCPlusForm.SelectedValue.ToString();
-                    if (chkPCCOutGuide.Enabled == false)
-                    {
-                        m_bPCCOutGuide = false;
-                    }
-                    else
-                    {
-                        m_bPCCOutGuide = this.chkPCCOutGuide.Checked;
-                    }
-                }
-
             }
         }
@@ -460,5 +236,4 @@
         {
             this.components = new System.ComponentModel.Container();
-            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DCheckIn));
             this.pnlPageBottom = new System.Windows.Forms.Panel();
             this.cmdCancel = new System.Windows.Forms.Button();
@@ -474,18 +249,9 @@
             this.cboProvider = new System.Windows.Forms.ComboBox();
             this.label2 = new System.Windows.Forms.Label();
-            this.cboStopCode = new System.Windows.Forms.ComboBox();
-            this.lblStopCode = new System.Windows.Forms.Label();
             this.chkRoutingSlip = new System.Windows.Forms.CheckBox();
-            this.grpPCCPlus = new System.Windows.Forms.GroupBox();
-            this.chkPCCOutGuide = new System.Windows.Forms.CheckBox();
-            this.label4 = new System.Windows.Forms.Label();
-            this.cboPCCPlusClinic = new System.Windows.Forms.ComboBox();
-            this.cboPCCPlusForm = new System.Windows.Forms.ComboBox();
-            this.label5 = new System.Windows.Forms.Label();
             this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
             this.pnlPageBottom.SuspendLayout();
             this.pnlDescription.SuspendLayout();
             this.grpDescriptionResourceGroup.SuspendLayout();
-            this.grpPCCPlus.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -495,5 +261,5 @@
             this.pnlPageBottom.Controls.Add(this.cmdOK);
             this.pnlPageBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.pnlPageBottom.Location = new System.Drawing.Point(0, 360);
+            this.pnlPageBottom.Location = new System.Drawing.Point(0, 203);
             this.pnlPageBottom.Name = "pnlPageBottom";
             this.pnlPageBottom.Size = new System.Drawing.Size(520, 40);
@@ -523,5 +289,5 @@
             this.pnlDescription.Controls.Add(this.grpDescriptionResourceGroup);
             this.pnlDescription.Dock = System.Windows.Forms.DockStyle.Bottom;
-            this.pnlDescription.Location = new System.Drawing.Point(0, 288);
+            this.pnlDescription.Location = new System.Drawing.Point(0, 131);
             this.pnlDescription.Name = "pnlDescription";
             this.pnlDescription.Size = new System.Drawing.Size(520, 72);
@@ -546,5 +312,6 @@
             this.lblDescriptionResourceGroup.Size = new System.Drawing.Size(514, 53);
             this.lblDescriptionResourceGroup.TabIndex = 0;
-            this.lblDescriptionResourceGroup.Text = resources.GetString("lblDescriptionResourceGroup.Text");
+            this.lblDescriptionResourceGroup.Text = "Use this panel to check in an appointment. A patient may only be checked-in once." +
+                "";
             // 
             // label1
@@ -584,5 +351,5 @@
             this.label3.Size = new System.Drawing.Size(80, 16);
             this.label3.TabIndex = 7;
-            this.label3.Text = "CheckIn Time:";
+            this.label3.Text = "Check-in Time:";
             // 
             // lblPatientName
@@ -609,23 +376,7 @@
             this.label2.Text = "Visit Provider:";
             // 
-            // cboStopCode
-            // 
-            this.cboStopCode.Location = new System.Drawing.Point(96, 128);
-            this.cboStopCode.Name = "cboStopCode";
-            this.cboStopCode.Size = new System.Drawing.Size(240, 21);
-            this.cboStopCode.TabIndex = 13;
-            this.cboStopCode.SelectedIndexChanged += new System.EventHandler(this.cboStopCode_SelectedIndexChanged);
-            // 
-            // lblStopCode
-            // 
-            this.lblStopCode.Location = new System.Drawing.Point(16, 128);
-            this.lblStopCode.Name = "lblStopCode";
-            this.lblStopCode.Size = new System.Drawing.Size(80, 16);
-            this.lblStopCode.TabIndex = 7;
-            this.lblStopCode.Text = "Stop Code:";
-            // 
             // chkRoutingSlip
             // 
-            this.chkRoutingSlip.Location = new System.Drawing.Point(368, 88);
+            this.chkRoutingSlip.Location = new System.Drawing.Point(380, 93);
             this.chkRoutingSlip.Name = "chkRoutingSlip";
             this.chkRoutingSlip.Size = new System.Drawing.Size(128, 16);
@@ -634,64 +385,9 @@
             this.toolTip1.SetToolTip(this.chkRoutingSlip, "Prints routing slip to the Windows Default Printer");
             // 
-            // grpPCCPlus
-            // 
-            this.grpPCCPlus.Controls.Add(this.chkPCCOutGuide);
-            this.grpPCCPlus.Controls.Add(this.label4);
-            this.grpPCCPlus.Controls.Add(this.cboPCCPlusClinic);
-            this.grpPCCPlus.Controls.Add(this.cboPCCPlusForm);
-            this.grpPCCPlus.Controls.Add(this.label5);
-            this.grpPCCPlus.Location = new System.Drawing.Point(8, 168);
-            this.grpPCCPlus.Name = "grpPCCPlus";
-            this.grpPCCPlus.Size = new System.Drawing.Size(488, 104);
-            this.grpPCCPlus.TabIndex = 15;
-            this.grpPCCPlus.TabStop = false;
-            this.grpPCCPlus.Text = "PCC Plus";
-            // 
-            // chkPCCOutGuide
-            // 
-            this.chkPCCOutGuide.Location = new System.Drawing.Point(360, 24);
-            this.chkPCCOutGuide.Name = "chkPCCOutGuide";
-            this.chkPCCOutGuide.Size = new System.Drawing.Size(96, 16);
-            this.chkPCCOutGuide.TabIndex = 15;
-            this.chkPCCOutGuide.Text = "Print Outguide";
-            // 
-            // label4
-            // 
-            this.label4.Location = new System.Drawing.Point(8, 24);
-            this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(72, 16);
-            this.label4.TabIndex = 8;
-            this.label4.Text = "PCC+ Clinic:";
-            // 
-            // cboPCCPlusClinic
-            // 
-            this.cboPCCPlusClinic.Location = new System.Drawing.Point(88, 24);
-            this.cboPCCPlusClinic.Name = "cboPCCPlusClinic";
-            this.cboPCCPlusClinic.Size = new System.Drawing.Size(240, 21);
-            this.cboPCCPlusClinic.TabIndex = 0;
-            this.cboPCCPlusClinic.SelectedIndexChanged += new System.EventHandler(this.cboPCCPlusClinic_SelectedIndexChanged);
-            // 
-            // cboPCCPlusForm
-            // 
-            this.cboPCCPlusForm.Location = new System.Drawing.Point(88, 64);
-            this.cboPCCPlusForm.Name = "cboPCCPlusForm";
-            this.cboPCCPlusForm.Size = new System.Drawing.Size(240, 21);
-            this.cboPCCPlusForm.TabIndex = 0;
-            // 
-            // label5
-            // 
-            this.label5.Location = new System.Drawing.Point(8, 64);
-            this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(72, 16);
-            this.label5.TabIndex = 8;
-            this.label5.Text = "PCC+ Form:";
-            // 
             // DCheckIn
             // 
             this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
-            this.ClientSize = new System.Drawing.Size(520, 400);
-            this.Controls.Add(this.grpPCCPlus);
+            this.ClientSize = new System.Drawing.Size(520, 243);
             this.Controls.Add(this.chkRoutingSlip);
-            this.Controls.Add(this.cboStopCode);
             this.Controls.Add(this.cboProvider);
             this.Controls.Add(this.lblPatientName);
@@ -703,5 +399,4 @@
             this.Controls.Add(this.label3);
             this.Controls.Add(this.label2);
-            this.Controls.Add(this.lblStopCode);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
             this.Name = "DCheckIn";
@@ -711,5 +406,4 @@
             this.pnlDescription.ResumeLayout(false);
             this.grpDescriptionResourceGroup.ResumeLayout(false);
-            this.grpPCCPlus.ResumeLayout(false);
             this.ResumeLayout(false);
 
@@ -724,44 +418,5 @@
         }
 
-        private void cboStopCode_SelectedIndexChanged(object sender, System.EventArgs e)
-        {
-            /*
-             * Whenever the stop code changes, the set of PCCPlus Clinic Selections change
-             * except during init.
-             */
-            if (m_bInit == true)
-                return;
-
-            //Change the value of m_sStopCode
-            DataRowView drv = (DataRowView)this.cboStopCode.SelectedItem;
-            string sStopCode = drv.Row["NAME"].ToString();
-            m_sStopCode = sStopCode;
-            m_sStopCodeIEN = drv.Row["BMXIEN"].ToString();
-            PCCPlus();
-        }
-
-        private void cboPCCPlusClinic_SelectedIndexChanged(object sender, System.EventArgs e)
-        {
-            /*
-             * Whenever the PCCPlus Clinic changes, the default EF TEMPLATE changes
-             */
-            if (m_bInit == true)
-                return;
-
-            if (this.cboPCCPlusClinic.SelectedItem == null)
-                return;
-
-            DataRowView drv = (DataRowView)this.cboPCCPlusClinic.SelectedItem;
-            string sDefaultForm = drv.Row["DEFAULT_ENCOUNTER_FORM"].ToString();
-
-            int nFind = this.m_dvForm.Find(sDefaultForm);
-            if (nFind > -1)
-            {
-                this.cboPCCPlusForm.SelectedIndex = nFind;
-            }
-        }
         #endregion Events
-
-
     }
 }
