Changeset 794 for Scheduling/trunk/cs
- Timestamp:
- Jun 10, 2010, 5:20:08 PM (14 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
r788 r794 240 240 m_ds.Refresh(); 241 241 bool bRetry = true; 242 243 //Try to connect using supplied values for Server and Port 244 //Why am I doing this? The library BMX net uses prompts for access and verify code 245 //whether you can connect or not. Not good. So I test first whether 246 //we can connect at all by doing a simple connection and disconnect. 247 //TODO: Make this more robust by sending a TCPConnect message and seeing if you get a response. 248 249 if (m_Server != "" && m_Port != 0) 250 { 251 System.Net.Sockets.TcpClient tcpClient = new System.Net.Sockets.TcpClient(); 252 try 253 { 254 tcpClient.Connect(m_Server, m_Port); // open it 255 tcpClient.Close(); // then close it 256 } 257 catch (System.Net.Sockets.SocketException ex) 258 { 259 throw ex; 260 } 261 } 242 262 do 243 263 { 244 try 245 246 247 248 249 250 251 252 264 try 265 { 266 if (bReLogin == true) 267 { 268 //Prompt for Access and Verify codes 269 _current.m_ConnectInfo.LoadConnectInfo("", ""); 270 } 271 else 272 { 253 273 if (m_Server != String.Empty && m_Port != 0 && m_AccessCode != String.Empty 254 274 && m_VerifyCode != String.Empty) 275 { 255 276 m_ConnectInfo.LoadConnectInfo(m_Server, m_Port, m_AccessCode, m_VerifyCode); 277 } 256 278 else if (m_Server != String.Empty && m_Port != 0) 257 279 m_ConnectInfo.LoadConnectInfo(m_Server, m_Port, "", ""); … … 259 281 m_ConnectInfo.LoadConnectInfo(); 260 282 } 261 bRetry = false; 262 } 263 catch (Exception ex) 264 { 265 m_ds.Close(); 266 if (MessageBox.Show("Unable to connect to VistA. " + ex.Message , "Clinical Scheduling", MessageBoxButtons.RetryCancel) == DialogResult.Retry) 267 { 268 bRetry = true; 269 _current.m_ConnectInfo.ChangeServerInfo(); 270 } 271 else 272 { 273 bRetry = false; 274 throw ex; 275 } 276 } 283 bRetry = false; 284 } 285 catch (System.Net.Sockets.SocketException) 286 { 287 MessageBox.Show("Cannot connect to VistA. "); 288 } 289 catch (Exception ex) 290 { 291 m_ds.Close(); 292 if (MessageBox.Show("Unable to connect to VistA. " + ex.Message, "Clinical Scheduling", MessageBoxButtons.RetryCancel) == DialogResult.Retry) 293 { 294 bRetry = true; 295 _current.m_ConnectInfo.ChangeServerInfo(); 296 } 297 else 298 { 299 bRetry = false; 300 throw ex; 301 } 302 } 277 303 }while (bRetry == true); 278 304 … … 415 441 } 416 442 443 //TODO:REMOVE THIS 417 444 public void LoadClinicSetupTable() 418 445 { … … 613 640 614 641 //Build active provider table 615 sCommandText = "SELECT BMXIEN, NAME FROM NEW_PERSON WHERE INACTIVE_DATE = '' AND INTERNAL[PROVIDER_CLASS] > 0";642 sCommandText = "SELECT BMXIEN, NAME FROM NEW_PERSON WHERE INACTIVE_DATE = ''"; 616 643 ConnectInfo.RPMSDataTable(sCommandText, "Provider", m_dsGlobal); 617 644 Debug.Write("LoadGlobalRecordsets -- Provider loaded\n"); … … 626 653 sCommandText = "SELECT NAME, DATE FROM HOLIDAY WHERE DATE > '" + DateTime.Today.ToShortDateString() + "'"; 627 654 ConnectInfo.RPMSDataTable(sCommandText, "HOLIDAY", m_dsGlobal); 655 Debug.Write("LoadingGlobalRecordsets -- Holidays loaded\n"); 656 657 sCommandText = @"SELECT HOSPITAL_LOCATION.BMXIEN 'BMXIEN', HOSPITAL_LOCATION.PROVIDER.PROVIDER 'PROVIDER', HOSPITAL_LOCATION.PROVIDER.DEFAULT_PROVIDER 'DEFAULT' FROM HOSPITAL_LOCATION"; 658 ConnectInfo.RPMSDataTable(sCommandText, "ClinicProviders", m_dsGlobal); 659 Debug.Write("LoadingGlobalRecordsets -- ClinicProviders loaded\n"); 628 660 629 661 //Save the xml schema -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
r789 r794 266 266 this.lblResource = new System.Windows.Forms.Label(); 267 267 this.panelCenter = new System.Windows.Forms.Panel(); 268 this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid(); 268 269 this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu(); 269 270 this.ctxCalGridAdd = new System.Windows.Forms.MenuItem(); … … 280 281 this.splitter1 = new System.Windows.Forms.Splitter(); 281 282 this.splitter2 = new System.Windows.Forms.Splitter(); 282 this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();283 283 this.panelRight.SuspendLayout(); 284 284 this.panelClip.SuspendLayout(); … … 331 331 // 332 332 this.mnuOpenMultipleSchedules.Index = 1; 333 this.mnuOpenMultipleSchedules.Shortcut = System.Windows.Forms.Shortcut.CtrlM; 333 334 this.mnuOpenMultipleSchedules.Text = "Open M&ultiple Schedules"; 334 335 this.mnuOpenMultipleSchedules.Click += new System.EventHandler(this.mnuOpenMultipleSchedules_Click); … … 533 534 // 534 535 this.mnu1Day.Index = 1; 536 this.mnu1Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl1; 535 537 this.mnu1Day.Text = "&1-Day View"; 536 538 this.mnu1Day.Click += new System.EventHandler(this.mnu1Day_Click); … … 539 541 // 540 542 this.mnu5Day.Index = 2; 543 this.mnu5Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl5; 541 544 this.mnu5Day.Text = "&5-Day View"; 542 545 this.mnu5Day.Click += new System.EventHandler(this.mnu5Day_Click); … … 545 548 // 546 549 this.mnu7Day.Index = 3; 550 this.mnu7Day.Shortcut = System.Windows.Forms.Shortcut.Ctrl7; 547 551 this.mnu7Day.Text = "&7-Day View"; 548 552 this.mnu7Day.Click += new System.EventHandler(this.mnu7Day_Click); … … 566 570 // 567 571 this.mnu10Minute.Index = 0; 572 this.mnu10Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl0; 568 573 this.mnu10Minute.Text = "&10-Minute"; 569 574 this.mnu10Minute.Click += new System.EventHandler(this.mnu10Minute_Click); … … 572 577 // 573 578 this.mnu15Minute.Index = 1; 579 this.mnu15Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl4; 574 580 this.mnu15Minute.Text = "1&5-Minute"; 575 581 this.mnu15Minute.Click += new System.EventHandler(this.mnu15Minute_Click); … … 578 584 // 579 585 this.mnu20Minute.Index = 2; 586 this.mnu20Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl3; 580 587 this.mnu20Minute.Text = "&20-Minute"; 581 588 this.mnu20Minute.Click += new System.EventHandler(this.mnu20Minute_Click); … … 584 591 // 585 592 this.mnu30Minute.Index = 3; 593 this.mnu30Minute.Shortcut = System.Windows.Forms.Shortcut.Ctrl2; 586 594 this.mnu30Minute.Text = "&30-Minute"; 587 595 this.mnu30Minute.Click += new System.EventHandler(this.mnu30Minute_Click); … … 635 643 this.tvSchedules.Location = new System.Drawing.Point(0, 0); 636 644 this.tvSchedules.Name = "tvSchedules"; 637 this.tvSchedules.Size = new System.Drawing.Size(128, 4 10);645 this.tvSchedules.Size = new System.Drawing.Size(128, 422); 638 646 this.tvSchedules.Sorted = true; 639 647 this.tvSchedules.TabIndex = 1; … … 681 689 this.panelRight.Controls.Add(this.panelClip); 682 690 this.panelRight.Dock = System.Windows.Forms.DockStyle.Right; 683 this.panelRight.Location = new System.Drawing.Point( 676, 0);691 this.panelRight.Location = new System.Drawing.Point(807, 0); 684 692 this.panelRight.Name = "panelRight"; 685 this.panelRight.Size = new System.Drawing.Size(128, 4 10);693 this.panelRight.Size = new System.Drawing.Size(128, 422); 686 694 this.panelRight.TabIndex = 3; 687 695 this.panelRight.Visible = false; … … 749 757 this.panelTop.Location = new System.Drawing.Point(128, 0); 750 758 this.panelTop.Name = "panelTop"; 751 this.panelTop.Size = new System.Drawing.Size( 548, 24);759 this.panelTop.Size = new System.Drawing.Size(679, 24); 752 760 this.panelTop.TabIndex = 6; 753 761 // … … 757 765 this.dateTimePicker1.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right; 758 766 this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Short; 759 this.dateTimePicker1.Location = new System.Drawing.Point( 420, 0);767 this.dateTimePicker1.Location = new System.Drawing.Point(551, 0); 760 768 this.dateTimePicker1.Name = "dateTimePicker1"; 761 769 this.dateTimePicker1.Size = new System.Drawing.Size(128, 20); … … 779 787 this.panelCenter.Location = new System.Drawing.Point(136, 24); 780 788 this.panelCenter.Name = "panelCenter"; 781 this.panelCenter.Size = new System.Drawing.Size( 537, 362);789 this.panelCenter.Size = new System.Drawing.Size(668, 374); 782 790 this.panelCenter.TabIndex = 7; 783 //784 // ctxCalendarGrid785 //786 this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {787 this.ctxCalGridAdd,788 this.ctxCalGridEdit,789 this.ctxCalGridDelete,790 this.ctxCalGridCheckIn,791 this.menuItem2,792 this.ctxCalGridNoShow,793 this.ctxCalGridNoShowUndo,794 this.menuItem9,795 this.ctxCalGridWalkin});796 this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);797 //798 // ctxCalGridAdd799 //800 this.ctxCalGridAdd.Index = 0;801 this.ctxCalGridAdd.Text = "Add Appointment";802 this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);803 //804 // ctxCalGridEdit805 //806 this.ctxCalGridEdit.Index = 1;807 this.ctxCalGridEdit.Text = "Edit Appointment";808 this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);809 //810 // ctxCalGridDelete811 //812 this.ctxCalGridDelete.Index = 2;813 this.ctxCalGridDelete.Text = "Cancel Appointment";814 this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);815 //816 // ctxCalGridCheckIn817 //818 this.ctxCalGridCheckIn.Index = 3;819 this.ctxCalGridCheckIn.Text = "Check In Patient";820 this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);821 //822 // menuItem2823 //824 this.menuItem2.Index = 4;825 this.menuItem2.Text = "-";826 //827 // ctxCalGridNoShow828 //829 this.ctxCalGridNoShow.Index = 5;830 this.ctxCalGridNoShow.Text = "Mark as No Show";831 this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);832 //833 // ctxCalGridNoShowUndo834 //835 this.ctxCalGridNoShowUndo.Index = 6;836 this.ctxCalGridNoShowUndo.Text = "Undo NoShow";837 this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);838 //839 // menuItem9840 //841 this.menuItem9.Index = 7;842 this.menuItem9.Text = "-";843 //844 // ctxCalGridWalkin845 //846 this.ctxCalGridWalkin.Index = 8;847 this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";848 this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);849 //850 // panelBottom851 //852 this.panelBottom.Controls.Add(this.statusBar1);853 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;854 this.panelBottom.Location = new System.Drawing.Point(136, 386);855 this.panelBottom.Name = "panelBottom";856 this.panelBottom.Size = new System.Drawing.Size(537, 24);857 this.panelBottom.TabIndex = 8;858 //859 // statusBar1860 //861 this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;862 this.statusBar1.Location = new System.Drawing.Point(0, 0);863 this.statusBar1.Name = "statusBar1";864 this.statusBar1.Size = new System.Drawing.Size(537, 24);865 this.statusBar1.SizingGrip = false;866 this.statusBar1.TabIndex = 0;867 //868 // splitter1869 //870 this.splitter1.Location = new System.Drawing.Point(128, 24);871 this.splitter1.Name = "splitter1";872 this.splitter1.Size = new System.Drawing.Size(8, 386);873 this.splitter1.TabIndex = 9;874 this.splitter1.TabStop = false;875 //876 // splitter2877 //878 this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;879 this.splitter2.Location = new System.Drawing.Point(673, 24);880 this.splitter2.Name = "splitter2";881 this.splitter2.Size = new System.Drawing.Size(3, 386);882 this.splitter2.TabIndex = 10;883 this.splitter2.TabStop = false;884 791 // 885 792 // calendarGrid1 … … 902 809 this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources"))); 903 810 this.calendarGrid1.SelectedAppointment = 0; 904 this.calendarGrid1.Size = new System.Drawing.Size( 537, 362);811 this.calendarGrid1.Size = new System.Drawing.Size(668, 374); 905 812 this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0); 906 813 this.calendarGrid1.TabIndex = 0; … … 911 818 this.calendarGrid1.CGAppointmentAdded += new IndianHealthService.ClinicalScheduling.CGAppointmentChangedHandler(this.calendarGrid1_CGAppointmentAdded); 912 819 // 820 // ctxCalendarGrid 821 // 822 this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 823 this.ctxCalGridAdd, 824 this.ctxCalGridEdit, 825 this.ctxCalGridDelete, 826 this.ctxCalGridCheckIn, 827 this.menuItem2, 828 this.ctxCalGridNoShow, 829 this.ctxCalGridNoShowUndo, 830 this.menuItem9, 831 this.ctxCalGridWalkin}); 832 this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup); 833 // 834 // ctxCalGridAdd 835 // 836 this.ctxCalGridAdd.Index = 0; 837 this.ctxCalGridAdd.Text = "Add Appointment"; 838 this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click); 839 // 840 // ctxCalGridEdit 841 // 842 this.ctxCalGridEdit.Index = 1; 843 this.ctxCalGridEdit.Text = "Edit Appointment"; 844 this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click); 845 // 846 // ctxCalGridDelete 847 // 848 this.ctxCalGridDelete.Index = 2; 849 this.ctxCalGridDelete.Text = "Cancel Appointment"; 850 this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click); 851 // 852 // ctxCalGridCheckIn 853 // 854 this.ctxCalGridCheckIn.Index = 3; 855 this.ctxCalGridCheckIn.Text = "Check In Patient"; 856 this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click); 857 // 858 // menuItem2 859 // 860 this.menuItem2.Index = 4; 861 this.menuItem2.Text = "-"; 862 // 863 // ctxCalGridNoShow 864 // 865 this.ctxCalGridNoShow.Index = 5; 866 this.ctxCalGridNoShow.Text = "Mark as No Show"; 867 this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click); 868 // 869 // ctxCalGridNoShowUndo 870 // 871 this.ctxCalGridNoShowUndo.Index = 6; 872 this.ctxCalGridNoShowUndo.Text = "Undo NoShow"; 873 this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click); 874 // 875 // menuItem9 876 // 877 this.menuItem9.Index = 7; 878 this.menuItem9.Text = "-"; 879 // 880 // ctxCalGridWalkin 881 // 882 this.ctxCalGridWalkin.Index = 8; 883 this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment"; 884 this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click); 885 // 886 // panelBottom 887 // 888 this.panelBottom.Controls.Add(this.statusBar1); 889 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 890 this.panelBottom.Location = new System.Drawing.Point(136, 398); 891 this.panelBottom.Name = "panelBottom"; 892 this.panelBottom.Size = new System.Drawing.Size(668, 24); 893 this.panelBottom.TabIndex = 8; 894 // 895 // statusBar1 896 // 897 this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill; 898 this.statusBar1.Location = new System.Drawing.Point(0, 0); 899 this.statusBar1.Name = "statusBar1"; 900 this.statusBar1.Size = new System.Drawing.Size(668, 24); 901 this.statusBar1.SizingGrip = false; 902 this.statusBar1.TabIndex = 0; 903 // 904 // splitter1 905 // 906 this.splitter1.Location = new System.Drawing.Point(128, 24); 907 this.splitter1.Name = "splitter1"; 908 this.splitter1.Size = new System.Drawing.Size(8, 398); 909 this.splitter1.TabIndex = 9; 910 this.splitter1.TabStop = false; 911 // 912 // splitter2 913 // 914 this.splitter2.Dock = System.Windows.Forms.DockStyle.Right; 915 this.splitter2.Location = new System.Drawing.Point(804, 24); 916 this.splitter2.Name = "splitter2"; 917 this.splitter2.Size = new System.Drawing.Size(3, 398); 918 this.splitter2.TabIndex = 10; 919 this.splitter2.TabStop = false; 920 // 913 921 // CGView 914 922 // 915 923 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 916 this.ClientSize = new System.Drawing.Size( 804, 410);924 this.ClientSize = new System.Drawing.Size(935, 422); 917 925 this.Controls.Add(this.panelCenter); 918 926 this.Controls.Add(this.panelBottom); … … 1950 1958 sStopCode = drHL["STOP_CODE_NUMBER"].ToString(); 1951 1959 1952 DataRow[] draCS = drHL.GetChildRows(m_DocManager.GlobalDataSet.Relations["HospitalLocationClinic"]); 1960 1961 //TODO: Remove this. This doesn't exist in VISTA. 1962 DataRow[] draCS = drHL.GetChildRows(m_DocManager.GlobalDataSet.Relations["HospitalLocationClinic"]); 1953 1963 if (draCS.GetLength(0) > 0) 1954 1964 { … … 2151 2161 Debug.Assert(nDuration > 0); 2152 2162 2153 /*2154 * 7-19-05 Added overbook prompt2155 * 8-10-05 Copied code block prior to patient selection2156 */2157 2163 this.Document.RefreshDocument(); 2158 2164 string sAccessType = ""; … … 2202 2208 appt.AccessTypeID = nAccessTypeID; 2203 2209 2204 /*2205 * 7-19-05 Added overbook prompt2206 * 8-10-05 Copied code block prior to patient selection2207 */2208 this.Document.RefreshDocument();2209 m_nSlots = m_Document.SlotsAvailable(dStart, dEnd, sResource, out sAccessType, out sAvailabilityMessage);2210 2211 if (m_nSlots < 1)2212 {2213 DialogResult dr = MessageBox.Show(this, "There are no slots available at the selected time. Do you want to overbook this appointment?", "Clinical Scheduling",MessageBoxButtons.YesNo);2214 if (dr != DialogResult.Yes)2215 {2216 return;2217 }2218 }2219 2220 2210 //Call Document to add a new appointment 2221 2211 this.Document.CreateAppointment(appt); 2212 this.Document.RefreshDocument(); 2213 2222 2214 } 2223 2215 catch (Exception ex) -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user
r788 r794 36 36 </RemoteDebugMachine> 37 37 <StartAction>Project</StartAction> 38 <StartArguments>/s= 192.168.254.129 /p=9260 /a=shabiel12 /v=catdog.44</StartArguments>38 <StartArguments>/s=s0110.sequencemanagers.com /p=8110 /a=wizard.11 /v=storm.11</StartArguments> 39 39 <StartPage> 40 40 </StartPage> … … 55 55 </RemoteDebugMachine> 56 56 <StartAction>Project</StartAction> 57 <StartArguments>/s= 192.168.254.129 /p=9260 /a=shabiel12 /v=catdog.44</StartArguments>57 <StartArguments>/s=s0110.sequencemanagers.com /p=8110 /a=wizard.11 /v=storm.11</StartArguments> 58 58 <StartPage> 59 59 </StartPage>
Note:
See TracChangeset
for help on using the changeset viewer.