Changeset 1174 for Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
- Timestamp:
- May 8, 2011, 5:17:53 AM (13 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode
-
Property svn:mergeinfo
set to (toggle deleted branches)
/Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode 1134-1171
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
r1159 r1174 1 1 using System; 2 2 using System.Collections; 3 using System.Collections.Generic; 3 4 using System.ComponentModel; 4 5 using System.Windows.Forms; … … 48 49 private System.Windows.Forms.Panel panelBottom; 49 50 private System.Windows.Forms.Label lblResource; 50 private System.Windows.Forms.ContextMenu c ontextMenu1;51 private System.Windows.Forms.ContextMenu ctxResourceTree; 51 52 private System.Windows.Forms.MenuItem ctxOpenSchedule; 52 53 private System.Windows.Forms.MenuItem ctxEditAvailability; … … 90 91 private System.Windows.Forms.MenuItem mnuPrintCancellationLetters; 91 92 private System.Windows.Forms.MenuItem mnuWalkIn; 92 private System.Windows.Forms.MenuItem menuItem5;93 private System.Windows.Forms.MenuItem menuItem8;93 private System.Windows.Forms.MenuItem sepApptMenu1; 94 private System.Windows.Forms.MenuItem sepApptMenu2; 94 95 private System.Windows.Forms.MenuItem ctxCalGridWalkin; 95 private System.Windows.Forms.MenuItem menuItem2;96 private System.Windows.Forms.MenuItem menuItem9;96 private System.Windows.Forms.MenuItem ctxCalGridSep1; 97 private System.Windows.Forms.MenuItem ctxCalGridSep2; 97 98 private System.Windows.Forms.MenuItem mnuOpenMultipleSchedules; 98 99 private System.Windows.Forms.MenuItem mnuDisplayWalkIns; 99 100 private System.Windows.Forms.MenuItem mnuRPMSDivision; 100 private MenuItem menuItem10;101 private MenuItem ctxCalGridSep3; 101 102 private MenuItem ctxCalGridReprintApptSlip; 102 103 private MenuItem ctxCalGridUndoCheckin; … … 106 107 private MenuItem menuItem12; 107 108 private MenuItem mnuRefresh; 109 private MenuItem ctxCalGridMkRadAppt; 110 private MenuItem ctxCalGridCancelRadAppt; 111 private MenuItem mnuMkRadAppt; 112 private MenuItem mnuCancelRadAppt; 113 private MenuItem mnuUndoCheckin; 114 private MenuItem sepApptMenu3; 115 private MenuItem mnuReprintApptSlip; 108 116 private IContainer components; 109 117 … … 194 202 this.mnuAppointment = new System.Windows.Forms.MenuItem(); 195 203 this.mnuNewAppointment = new System.Windows.Forms.MenuItem(); 204 this.mnuWalkIn = new System.Windows.Forms.MenuItem(); 205 this.mnuMkRadAppt = new System.Windows.Forms.MenuItem(); 196 206 this.mnuEditAppointment = new System.Windows.Forms.MenuItem(); 197 207 this.mnuDeleteAppointment = new System.Windows.Forms.MenuItem(); 198 this.menuItem5 = new System.Windows.Forms.MenuItem(); 208 this.mnuCancelRadAppt = new System.Windows.Forms.MenuItem(); 209 this.sepApptMenu1 = new System.Windows.Forms.MenuItem(); 199 210 this.mnuNoShow = new System.Windows.Forms.MenuItem(); 200 211 this.mnuNoShowUndo = new System.Windows.Forms.MenuItem(); 201 this.menuItem8 = new System.Windows.Forms.MenuItem(); 212 this.sepApptMenu2 = new System.Windows.Forms.MenuItem(); 213 this.mnuCheckIn = new System.Windows.Forms.MenuItem(); 214 this.mnuUndoCheckin = new System.Windows.Forms.MenuItem(); 215 this.sepApptMenu3 = new System.Windows.Forms.MenuItem(); 216 this.mnuFindAppt = new System.Windows.Forms.MenuItem(); 202 217 this.mnuCopyAppointment = new System.Windows.Forms.MenuItem(); 203 this.mnuWalkIn = new System.Windows.Forms.MenuItem();204 this.mnuFindAppt = new System.Windows.Forms.MenuItem();205 this.mnuCheckIn = new System.Windows.Forms.MenuItem();206 218 this.mnuViewPatientAppts = new System.Windows.Forms.MenuItem(); 219 this.mnuReprintApptSlip = new System.Windows.Forms.MenuItem(); 207 220 this.mnuCalendar = new System.Windows.Forms.MenuItem(); 208 221 this.mnuDisplayWalkIns = new System.Windows.Forms.MenuItem(); … … 225 238 this.mnuTest1 = new System.Windows.Forms.MenuItem(); 226 239 this.tvSchedules = new System.Windows.Forms.TreeView(); 227 this.c ontextMenu1= new System.Windows.Forms.ContextMenu();240 this.ctxResourceTree = new System.Windows.Forms.ContextMenu(); 228 241 this.ctxOpenSchedule = new System.Windows.Forms.MenuItem(); 229 242 this.ctxEditAvailability = new System.Windows.Forms.MenuItem(); … … 246 259 this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu(); 247 260 this.ctxCalGridAdd = new System.Windows.Forms.MenuItem(); 261 this.ctxCalGridMkRadAppt = new System.Windows.Forms.MenuItem(); 248 262 this.ctxCalGridEdit = new System.Windows.Forms.MenuItem(); 249 263 this.ctxCalGridDelete = new System.Windows.Forms.MenuItem(); 264 this.ctxCalGridCancelRadAppt = new System.Windows.Forms.MenuItem(); 250 265 this.ctxCalGridCheckIn = new System.Windows.Forms.MenuItem(); 251 266 this.ctxCalGridUndoCheckin = new System.Windows.Forms.MenuItem(); 252 this. menuItem2= new System.Windows.Forms.MenuItem();267 this.ctxCalGridSep1 = new System.Windows.Forms.MenuItem(); 253 268 this.ctxCalGridNoShow = new System.Windows.Forms.MenuItem(); 254 269 this.ctxCalGridNoShowUndo = new System.Windows.Forms.MenuItem(); 255 this. menuItem9= new System.Windows.Forms.MenuItem();270 this.ctxCalGridSep2 = new System.Windows.Forms.MenuItem(); 256 271 this.ctxCalGridWalkin = new System.Windows.Forms.MenuItem(); 257 this. menuItem10= new System.Windows.Forms.MenuItem();272 this.ctxCalGridSep3 = new System.Windows.Forms.MenuItem(); 258 273 this.ctxCalGridReprintApptSlip = new System.Windows.Forms.MenuItem(); 259 274 this.panelBottom = new System.Windows.Forms.Panel(); … … 369 384 // 370 385 this.mnuPrintReminderLetters.Index = 10; 371 this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.Ctrl I;386 this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlE; 372 387 this.mnuPrintReminderLetters.Text = "Print Rem&inder Letters"; 373 388 this.mnuPrintReminderLetters.Click += new System.EventHandler(this.mnuPrintReminderLetters_Click); … … 411 426 this.mnuAppointment.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 412 427 this.mnuNewAppointment, 428 this.mnuWalkIn, 429 this.mnuMkRadAppt, 413 430 this.mnuEditAppointment, 414 431 this.mnuDeleteAppointment, 415 this.menuItem5, 432 this.mnuCancelRadAppt, 433 this.sepApptMenu1, 416 434 this.mnuNoShow, 417 435 this.mnuNoShowUndo, 418 this.menuItem8, 436 this.sepApptMenu2, 437 this.mnuCheckIn, 438 this.mnuUndoCheckin, 439 this.sepApptMenu3, 440 this.mnuFindAppt, 419 441 this.mnuCopyAppointment, 420 this.mnuWalkIn, 421 this.mnuFindAppt, 422 this.mnuCheckIn, 423 this.mnuViewPatientAppts}); 442 this.mnuViewPatientAppts, 443 this.mnuReprintApptSlip}); 424 444 this.mnuAppointment.Text = "&Appointment"; 425 445 this.mnuAppointment.Popup += new System.EventHandler(this.mnuAppointment_Popup); … … 432 452 this.mnuNewAppointment.Click += new System.EventHandler(this.mnuNewAppointment_Click); 433 453 // 454 // mnuWalkIn 455 // 456 this.mnuWalkIn.Index = 1; 457 this.mnuWalkIn.Shortcut = System.Windows.Forms.Shortcut.ShiftIns; 458 this.mnuWalkIn.Text = "Create Wal&k-In Appointment"; 459 this.mnuWalkIn.Click += new System.EventHandler(this.mnuWalkIn_Click); 460 // 461 // mnuMkRadAppt 462 // 463 this.mnuMkRadAppt.Index = 2; 464 this.mnuMkRadAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlIns; 465 this.mnuMkRadAppt.Text = "Make Radiology Appointment"; 466 this.mnuMkRadAppt.Click += new System.EventHandler(this.mnuMkRadAppt_Click); 467 // 434 468 // mnuEditAppointment 435 469 // 436 this.mnuEditAppointment.Index = 1;470 this.mnuEditAppointment.Index = 3; 437 471 this.mnuEditAppointment.Shortcut = System.Windows.Forms.Shortcut.F2; 438 472 this.mnuEditAppointment.Text = "&Edit Appointment"; … … 441 475 // mnuDeleteAppointment 442 476 // 443 this.mnuDeleteAppointment.Index = 2;477 this.mnuDeleteAppointment.Index = 4; 444 478 this.mnuDeleteAppointment.Shortcut = System.Windows.Forms.Shortcut.Del; 445 479 this.mnuDeleteAppointment.Text = "Cance&l Appointment"; 446 480 this.mnuDeleteAppointment.Click += new System.EventHandler(this.mnuDeleteAppointment_Click); 447 481 // 448 // menuItem5 449 // 450 this.menuItem5.Index = 3; 451 this.menuItem5.Text = "-"; 482 // mnuCancelRadAppt 483 // 484 this.mnuCancelRadAppt.Index = 5; 485 this.mnuCancelRadAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlDel; 486 this.mnuCancelRadAppt.Text = "Cancel Radiology Appointment"; 487 this.mnuCancelRadAppt.Click += new System.EventHandler(this.mnuCancelRadAppt_Click); 488 // 489 // sepApptMenu1 490 // 491 this.sepApptMenu1.Index = 6; 492 this.sepApptMenu1.Text = "-"; 452 493 // 453 494 // mnuNoShow 454 495 // 455 this.mnuNoShow.Index = 4; 496 this.mnuNoShow.Index = 7; 497 this.mnuNoShow.Shortcut = System.Windows.Forms.Shortcut.CtrlN; 456 498 this.mnuNoShow.Text = "Mark as No Sho&w"; 457 499 this.mnuNoShow.Click += new System.EventHandler(this.mnuNoShow_Click); … … 459 501 // mnuNoShowUndo 460 502 // 461 this.mnuNoShowUndo.Index = 5; 503 this.mnuNoShowUndo.Index = 8; 504 this.mnuNoShowUndo.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftN; 462 505 this.mnuNoShowUndo.Text = "&Undo No Show"; 463 506 this.mnuNoShowUndo.Click += new System.EventHandler(this.mnuNoShowUndo_Click); 464 507 // 465 // menuItem8 466 // 467 this.menuItem8.Index = 6; 468 this.menuItem8.Text = "-"; 469 // 470 // mnuCopyAppointment 471 // 472 this.mnuCopyAppointment.Index = 7; 473 this.mnuCopyAppointment.Text = "&Copy Appointment to Clipboard"; 474 this.mnuCopyAppointment.Click += new System.EventHandler(this.mnuCopyAppointment_Click); 475 // 476 // mnuWalkIn 477 // 478 this.mnuWalkIn.Index = 8; 479 this.mnuWalkIn.Text = "Create Wal&k-In Appointment"; 480 this.mnuWalkIn.Click += new System.EventHandler(this.mnuWalkIn_Click); 508 // sepApptMenu2 509 // 510 this.sepApptMenu2.Index = 9; 511 this.sepApptMenu2.Text = "-"; 512 // 513 // mnuCheckIn 514 // 515 this.mnuCheckIn.Index = 10; 516 this.mnuCheckIn.Shortcut = System.Windows.Forms.Shortcut.CtrlI; 517 this.mnuCheckIn.Text = "Check &In Patient"; 518 this.mnuCheckIn.Click += new System.EventHandler(this.mnuCheckIn_Click); 519 // 520 // mnuUndoCheckin 521 // 522 this.mnuUndoCheckin.Index = 11; 523 this.mnuUndoCheckin.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftI; 524 this.mnuUndoCheckin.Text = "Undo Checkin"; 525 this.mnuUndoCheckin.Click += new System.EventHandler(this.mnuUndoCheckin_Click); 526 // 527 // sepApptMenu3 528 // 529 this.sepApptMenu3.Index = 12; 530 this.sepApptMenu3.Text = "-"; 481 531 // 482 532 // mnuFindAppt 483 533 // 484 this.mnuFindAppt.Index = 9;534 this.mnuFindAppt.Index = 13; 485 535 this.mnuFindAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlF; 486 536 this.mnuFindAppt.Text = "&Find Empty Slots"; 487 537 this.mnuFindAppt.Click += new System.EventHandler(this.mnuFindAppt_Click); 488 538 // 489 // mnuCheckIn 490 // 491 this.mnuCheckIn.Index = 10; 492 this.mnuCheckIn.Text = "Check &In Patient"; 493 this.mnuCheckIn.Click += new System.EventHandler(this.mnuCheckIn_Click); 539 // mnuCopyAppointment 540 // 541 this.mnuCopyAppointment.Index = 14; 542 this.mnuCopyAppointment.Shortcut = System.Windows.Forms.Shortcut.CtrlC; 543 this.mnuCopyAppointment.Text = "&Copy Appointment to Clipboard"; 544 this.mnuCopyAppointment.Click += new System.EventHandler(this.mnuCopyAppointment_Click); 494 545 // 495 546 // mnuViewPatientAppts 496 547 // 497 this.mnuViewPatientAppts.Index = 11; 548 this.mnuViewPatientAppts.Index = 15; 549 this.mnuViewPatientAppts.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftZ; 498 550 this.mnuViewPatientAppts.Text = "&View Patient Appointments"; 499 551 this.mnuViewPatientAppts.Click += new System.EventHandler(this.mnuViewPatientAppts_Click); 552 // 553 // mnuReprintApptSlip 554 // 555 this.mnuReprintApptSlip.Index = 16; 556 this.mnuReprintApptSlip.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftP; 557 this.mnuReprintApptSlip.Text = "Reprint Appointment Slip"; 558 this.mnuReprintApptSlip.Click += new System.EventHandler(this.mnuReprintApptSlip_Click); 500 559 // 501 560 // mnuCalendar … … 519 578 this.mnuDisplayWalkIns.Checked = true; 520 579 this.mnuDisplayWalkIns.Index = 0; 580 this.mnuDisplayWalkIns.Shortcut = System.Windows.Forms.Shortcut.F12; 521 581 this.mnuDisplayWalkIns.Text = "&Display Walk-Ins"; 522 582 this.mnuDisplayWalkIns.Click += new System.EventHandler(this.mnuDisplayWalkIns_Click); … … 592 652 // mnuViewScheduleTree 593 653 // 654 this.mnuViewScheduleTree.Checked = true; 594 655 this.mnuViewScheduleTree.Index = 6; 656 this.mnuViewScheduleTree.Shortcut = System.Windows.Forms.Shortcut.F4; 595 657 this.mnuViewScheduleTree.Text = "&Schedule Tree"; 596 658 this.mnuViewScheduleTree.Click += new System.EventHandler(this.mnuViewScheduleTree_Click); … … 645 707 // 646 708 this.tvSchedules.BackColor = System.Drawing.SystemColors.ControlLight; 647 this.tvSchedules.ContextMenu = this.c ontextMenu1;709 this.tvSchedules.ContextMenu = this.ctxResourceTree; 648 710 this.tvSchedules.Dock = System.Windows.Forms.DockStyle.Left; 649 711 this.tvSchedules.HotTracking = true; 650 712 this.tvSchedules.Location = new System.Drawing.Point(0, 0); 651 713 this.tvSchedules.Name = "tvSchedules"; 652 this.tvSchedules.Size = new System.Drawing.Size(128, 3 17);714 this.tvSchedules.Size = new System.Drawing.Size(128, 392); 653 715 this.tvSchedules.Sorted = true; 654 716 this.tvSchedules.TabIndex = 1; … … 658 720 this.tvSchedules.MouseEnter += new System.EventHandler(this.tvSchedules_MouseEnter); 659 721 // 660 // c ontextMenu1661 // 662 this.c ontextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {722 // ctxResourceTree 723 // 724 this.ctxResourceTree.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 663 725 this.ctxOpenSchedule, 664 726 this.ctxEditAvailability, … … 668 730 this.ctxPrintScheduleT1, 669 731 this.ctxPrintScheduleT3}); 670 this.c ontextMenu1.Popup += new System.EventHandler(this.contextMenu1_Popup);732 this.ctxResourceTree.Popup += new System.EventHandler(this.contextMenu1_Popup); 671 733 // 672 734 // ctxOpenSchedule … … 719 781 this.panelRight.Location = new System.Drawing.Point(996, 0); 720 782 this.panelRight.Name = "panelRight"; 721 this.panelRight.Size = new System.Drawing.Size(128, 3 17);783 this.panelRight.Size = new System.Drawing.Size(128, 392); 722 784 this.panelRight.TabIndex = 3; 723 785 this.panelRight.Visible = false; … … 815 877 this.panelCenter.Location = new System.Drawing.Point(136, 24); 816 878 this.panelCenter.Name = "panelCenter"; 817 this.panelCenter.Size = new System.Drawing.Size(857, 269);879 this.panelCenter.Size = new System.Drawing.Size(857, 344); 818 880 this.panelCenter.TabIndex = 7; 819 881 // … … 822 884 this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 823 885 this.ctxCalGridAdd, 886 this.ctxCalGridMkRadAppt, 824 887 this.ctxCalGridEdit, 825 888 this.ctxCalGridDelete, 889 this.ctxCalGridCancelRadAppt, 826 890 this.ctxCalGridCheckIn, 827 891 this.ctxCalGridUndoCheckin, 828 this. menuItem2,892 this.ctxCalGridSep1, 829 893 this.ctxCalGridNoShow, 830 894 this.ctxCalGridNoShowUndo, 831 this. menuItem9,895 this.ctxCalGridSep2, 832 896 this.ctxCalGridWalkin, 833 this. menuItem10,897 this.ctxCalGridSep3, 834 898 this.ctxCalGridReprintApptSlip}); 835 899 this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup); … … 841 905 this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click); 842 906 // 907 // ctxCalGridMkRadAppt 908 // 909 this.ctxCalGridMkRadAppt.Index = 1; 910 this.ctxCalGridMkRadAppt.Text = "Make Radiology Appointment"; 911 this.ctxCalGridMkRadAppt.Click += new System.EventHandler(this.ctxCalGridMkRadAppt_Click); 912 // 843 913 // ctxCalGridEdit 844 914 // 845 this.ctxCalGridEdit.Index = 1;915 this.ctxCalGridEdit.Index = 2; 846 916 this.ctxCalGridEdit.Text = "Edit Appointment"; 847 917 this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click); … … 849 919 // ctxCalGridDelete 850 920 // 851 this.ctxCalGridDelete.Index = 2;921 this.ctxCalGridDelete.Index = 3; 852 922 this.ctxCalGridDelete.Text = "Cancel Appointment"; 853 923 this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click); 854 924 // 925 // ctxCalGridCancelRadAppt 926 // 927 this.ctxCalGridCancelRadAppt.Index = 4; 928 this.ctxCalGridCancelRadAppt.Text = "Cancel Radiology Appointment"; 929 this.ctxCalGridCancelRadAppt.Click += new System.EventHandler(this.ctxCalGridCancelRadAppt_Click); 930 // 855 931 // ctxCalGridCheckIn 856 932 // 857 this.ctxCalGridCheckIn.Index = 3;933 this.ctxCalGridCheckIn.Index = 5; 858 934 this.ctxCalGridCheckIn.Text = "Check In Patient"; 859 935 this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click); … … 861 937 // ctxCalGridUndoCheckin 862 938 // 863 this.ctxCalGridUndoCheckin.Index = 4;939 this.ctxCalGridUndoCheckin.Index = 6; 864 940 this.ctxCalGridUndoCheckin.Text = "&Undo Check In"; 865 941 this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click); 866 942 // 867 // menuItem2868 // 869 this. menuItem2.Index = 5;870 this. menuItem2.Text = "-";943 // ctxCalGridSep1 944 // 945 this.ctxCalGridSep1.Index = 7; 946 this.ctxCalGridSep1.Text = "-"; 871 947 // 872 948 // ctxCalGridNoShow 873 949 // 874 this.ctxCalGridNoShow.Index = 6;950 this.ctxCalGridNoShow.Index = 8; 875 951 this.ctxCalGridNoShow.Text = "Mark as No Show"; 876 952 this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click); … … 878 954 // ctxCalGridNoShowUndo 879 955 // 880 this.ctxCalGridNoShowUndo.Index = 7;956 this.ctxCalGridNoShowUndo.Index = 9; 881 957 this.ctxCalGridNoShowUndo.Text = "Undo NoShow"; 882 958 this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click); 883 959 // 884 // menuItem9885 // 886 this. menuItem9.Index = 8;887 this. menuItem9.Text = "-";960 // ctxCalGridSep2 961 // 962 this.ctxCalGridSep2.Index = 10; 963 this.ctxCalGridSep2.Text = "-"; 888 964 // 889 965 // ctxCalGridWalkin 890 966 // 891 this.ctxCalGridWalkin.Index = 9;967 this.ctxCalGridWalkin.Index = 11; 892 968 this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment"; 893 969 this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click); 894 970 // 895 // menuItem10896 // 897 this. menuItem10.Index = 10;898 this. menuItem10.Text = "-";971 // ctxCalGridSep3 972 // 973 this.ctxCalGridSep3.Index = 12; 974 this.ctxCalGridSep3.Text = "-"; 899 975 // 900 976 // ctxCalGridReprintApptSlip 901 977 // 902 this.ctxCalGridReprintApptSlip.Index = 1 1;978 this.ctxCalGridReprintApptSlip.Index = 13; 903 979 this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip"; 904 980 this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click); … … 908 984 this.panelBottom.Controls.Add(this.statusBar1); 909 985 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 910 this.panelBottom.Location = new System.Drawing.Point(136, 293);986 this.panelBottom.Location = new System.Drawing.Point(136, 368); 911 987 this.panelBottom.Name = "panelBottom"; 912 988 this.panelBottom.Size = new System.Drawing.Size(857, 24); … … 926 1002 this.splitter1.Location = new System.Drawing.Point(128, 24); 927 1003 this.splitter1.Name = "splitter1"; 928 this.splitter1.Size = new System.Drawing.Size(8, 293);1004 this.splitter1.Size = new System.Drawing.Size(8, 368); 929 1005 this.splitter1.TabIndex = 9; 930 1006 this.splitter1.TabStop = false; … … 935 1011 this.splitter2.Location = new System.Drawing.Point(993, 24); 936 1012 this.splitter2.Name = "splitter2"; 937 this.splitter2.Size = new System.Drawing.Size(3, 293);1013 this.splitter2.Size = new System.Drawing.Size(3, 368); 938 1014 this.splitter2.TabIndex = 10; 939 1015 this.splitter2.TabStop = false; … … 958 1034 this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources"))); 959 1035 this.calendarGrid1.SelectedAppointment = 0; 960 this.calendarGrid1.Size = new System.Drawing.Size(857, 269);1036 this.calendarGrid1.Size = new System.Drawing.Size(857, 344); 961 1037 this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0); 962 1038 this.calendarGrid1.TabIndex = 0; … … 971 1047 // 972 1048 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 973 this.ClientSize = new System.Drawing.Size(1124, 3 17);1049 this.ClientSize = new System.Drawing.Size(1124, 392); 974 1050 this.Controls.Add(this.panelCenter); 975 1051 this.Controls.Add(this.panelBottom); … … 1082 1158 #endregion 1083 1159 1084 1085 1160 #region AppointmentMenu Handlers 1086 1161 1087 1162 private void mnuAppointment_Popup(object sender, System.EventArgs e) 1088 1163 { 1089 bool bEnabled = (this.Document.Resources.Count > 0)? true : false ; 1090 this.mnuFindAppt.Enabled = bEnabled; 1091 1092 //Toggle availability of make, edit, checkin and delete appointments 1093 //based on whether a range is selected. 1094 1095 mnuNewAppointment.Enabled = AddAppointmentEnabled(); 1096 this.mnuWalkIn.Enabled = mnuNewAppointment.Enabled; 1097 bool bEditAppointments = this.EditAppointmentEnabled(); 1098 1099 mnuDeleteAppointment.Enabled = bEditAppointments; 1100 mnuCheckIn.Enabled = bEditAppointments; 1101 mnuEditAppointment.Enabled = bEditAppointments; 1102 mnuNoShow.Enabled = bEditAppointments; 1103 mnuNoShowUndo.Enabled = bEditAppointments; 1164 // our flags 1165 bool _findApptsEnabled = (this.Document.Resources.Count > 0)? true : false ; 1166 bool _addApptsEnabled = AddAppointmentEnabled(); 1167 bool _editApptsEnabled = EditAppointmentEnabled(); 1168 bool _isRadAppt = IsThisARadiologyResource(); 1169 bool _noShowEnabled = NoShowEnabled(); 1170 bool _undoCheckinEnabled = UndoCheckinEnabled(); 1171 //end flags 1172 1173 mnuNewAppointment.Enabled = _addApptsEnabled && !_isRadAppt; 1174 mnuWalkIn.Enabled = _addApptsEnabled && !_isRadAppt; 1175 mnuMkRadAppt.Enabled = _isRadAppt && _addApptsEnabled; 1176 1177 mnuEditAppointment.Enabled = _editApptsEnabled && !_isRadAppt; 1178 mnuDeleteAppointment.Enabled = _editApptsEnabled && !_isRadAppt; 1179 mnuCancelRadAppt.Enabled = _isRadAppt && _editApptsEnabled; 1180 mnuNoShow.Enabled = _noShowEnabled && _editApptsEnabled; 1181 mnuNoShowUndo.Enabled = !_noShowEnabled && _editApptsEnabled; 1182 mnuCheckIn.Enabled = _editApptsEnabled && !_isRadAppt; 1183 mnuUndoCheckin.Enabled = _undoCheckinEnabled && !_isRadAppt; 1184 1185 mnuFindAppt.Enabled = _findApptsEnabled; 1186 mnuCopyAppointment.Enabled = _editApptsEnabled && !_isRadAppt; 1187 mnuViewPatientAppts.Enabled = true; 1188 mnuReprintApptSlip.Enabled = _editApptsEnabled; 1104 1189 } 1105 1190 … … 1118 1203 foreach (CGAppointment a in this.calendarGrid1.SelectedAppointments.AppointmentTable.Values) 1119 1204 { 1120 if (m_ClipList.AppointmentTable.Contains((int)a.AppointmentKey))1205 if (m_ClipList.AppointmentTable.Contains((int)a.AppointmentKey)) 1121 1206 { 1122 1207 return; 1123 1208 } 1124 1209 m_ClipList.AddAppointment(a); 1125 lstClip.Items.Add(a.PatientName);1210 lstClip.Items.Add(a); 1126 1211 } 1127 1212 } … … 1162 1247 { 1163 1248 AppointmentUndoCheckin(); 1249 } 1250 1251 private void mnuMkRadAppt_Click(object sender, EventArgs e) 1252 { 1253 AppointmentAddNewRadiology(); 1254 } 1255 1256 private void mnuCancelRadAppt_Click(object sender, EventArgs e) 1257 { 1258 AppointmentDeleteOneRadiology(); 1259 } 1260 1261 private void mnuUndoCheckin_Click(object sender, EventArgs e) 1262 { 1263 AppointmentUndoCheckin(); 1264 } 1265 1266 private void mnuReprintApptSlip_Click(object sender, EventArgs e) 1267 { 1268 int apptID = this.CGrid.SelectedAppointment; 1269 if (apptID <= 0) return; 1270 1271 CGAppointment a = (CGAppointment)this.Appointments.AppointmentTable[apptID]; 1272 1273 PrintAppointmentSlip(a); 1164 1274 } 1165 1275 … … 1292 1402 private void ctxCalendarGrid_Popup(object sender, System.EventArgs e) 1293 1403 { 1404 bool bEditAppointments = (EditAppointmentEnabled() && (calendarGrid1.SelectedAppointment > 0)) ; 1405 1406 if (IsThisARadiologyResource())//this is a radiology resource 1407 { 1408 ctxCalGridAdd.Visible = false; 1409 ctxCalGridDelete.Visible = false; 1410 ctxCalGridEdit.Visible = false; 1411 ctxCalGridCheckIn.Visible = false; 1412 ctxCalGridNoShow.Visible = false; 1413 ctxCalGridNoShowUndo.Visible = false; 1414 ctxCalGridWalkin.Visible = false; 1415 ctxCalGridUndoCheckin.Visible = false; 1416 ctxCalGridSep1.Visible = false; 1417 ctxCalGridSep2.Visible = false; 1418 1419 ctxCalGridMkRadAppt.Visible = true; 1420 ctxCalGridCancelRadAppt.Visible = true; 1421 1422 1423 } 1424 1425 else // this is a normal resource 1426 { 1427 ctxCalGridAdd.Visible = true; 1428 ctxCalGridDelete.Visible = true; 1429 ctxCalGridEdit.Visible = true; 1430 ctxCalGridCheckIn.Visible = true; 1431 ctxCalGridNoShow.Visible = true; 1432 ctxCalGridNoShowUndo.Visible = true; 1433 ctxCalGridWalkin.Visible = true; 1434 ctxCalGridUndoCheckin.Visible = true; 1435 ctxCalGridSep1.Visible = true; 1436 ctxCalGridSep2.Visible = true; 1437 1438 ctxCalGridMkRadAppt.Visible = false; 1439 ctxCalGridCancelRadAppt.Visible = false; 1440 } 1441 1294 1442 //Toggle availability of make, edit, checkin and delete appointments 1295 1443 //based on whether appropriate element is selected. 1296 1444 ctxCalGridAdd.Enabled = AddAppointmentEnabled(); 1297 bool bEditAppointments = (EditAppointmentEnabled() && (calendarGrid1.SelectedAppointment > 0)) ;1445 1298 1446 ctxCalGridDelete.Enabled = bEditAppointments; 1299 1447 ctxCalGridEdit.Enabled = bEditAppointments; … … 1302 1450 ctxCalGridNoShowUndo.Enabled = !NoShowEnabled() && calendarGrid1.SelectedAppointment > 0; 1303 1451 ctxCalGridWalkin.Enabled = ctxCalGridAdd.Enabled; 1304 //smh new code1305 1452 ctxCalGridReprintApptSlip.Enabled = bEditAppointments; 1306 1453 ctxCalGridUndoCheckin.Enabled = UndoCheckinEnabled(); 1307 //end new code 1454 1455 //if the rad ones are visible, then these apply 1456 ctxCalGridMkRadAppt.Enabled = !bEditAppointments; 1457 ctxCalGridCancelRadAppt.Enabled = bEditAppointments; 1308 1458 } 1309 1459 … … 1344 1494 } 1345 1495 1346 //new code smh 1496 private void ctxCalGridMkRadAppt_Click(object sender, EventArgs e) 1497 { 1498 AppointmentAddNewRadiology(); 1499 } 1500 1501 private void ctxCalGridCancelRadAppt_Click(object sender, EventArgs e) 1502 { 1503 AppointmentDeleteOneRadiology(); 1504 } 1505 1347 1506 private void ctxCalGridReprintApptSlip_Click(object sender, EventArgs e) 1348 1507 { … … 1354 1513 PrintAppointmentSlip(a); 1355 1514 } 1356 //end new code1357 1515 1358 1516 #endregion ctxCalGridMenu Handlers 1359 1517 1360 1518 #region Methods 1519 1520 /// <summary> 1521 /// Decides whether this is a Radiology Resource. Local Helper to decide what menu items to enable/display 1522 /// </summary> 1523 /// <returns></returns> 1524 private bool IsThisARadiologyResource() 1525 { 1526 //I don't like this logic!!! but works for now! 1527 //Note: I use banana peeling model below 1528 1529 //If no cell is selected AND no appointment is selected, then it's false 1530 if (this.calendarGrid1.SelectedRange.Cells.CellCount < 1 && this.calendarGrid1.SelectedAppointment < 1) 1531 return false; 1532 1533 //If an appointment is selected then... 1534 if (this.calendarGrid1.SelectedAppointment > 0) 1535 { 1536 CGAppointment appt = this.Appointments.AppointmentTable[this.calendarGrid1.SelectedAppointment] as CGAppointment; 1537 if (appt == null) return false; //appt doesn't exist; old appointment and grid wasn't refreshed yet 1538 if (appt.RadiologyExamIEN.HasValue && appt.RadiologyExamIEN.Value > 0) return true; //this appointment is a radiology appointment since it has that member 1539 else return false; 1540 1541 } 1542 1543 //Otherwise, we are for sure dealing with a cell. 1544 //We need to determine if the cell resource is mapped to a Radiology Hospital Location. 1545 DateTime dStart; 1546 DateTime dEnd; 1547 string sResource; 1548 1549 // Get resource 1550 bool bRet = this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource); 1551 1552 // If we fail, return false (but this is not supposed to ever happen) 1553 if (bRet == false) 1554 { 1555 return false; 1556 } 1557 1558 // see if resource is mapped to a Radiology Hospital Location. 1559 return IsThisARadiologyResource(sResource); 1560 } 1561 1562 private bool IsThisARadiologyResource(string sResource) 1563 { 1564 // see if resource is mapped to a Radiology Hospital Location. 1565 return ( //select all Hospital Locations which are radiology locations 1566 from hl in CGDocumentManager.Current.GlobalDataSet.Tables["HospitalLocation"].AsEnumerable() 1567 where hl.Field<string>("IS_RADIOLOGY_LOCATION") == "1" 1568 //join this to the resources table using the foreign ID (plain jane relational join) 1569 join res in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable() 1570 on hl.Field<int>("HOSPITAL_LOCATION_ID") equals res.Field<int>("HOSPITAL_LOCATION_ID") 1571 //then filter this down to the resource that we have 1572 where res.Field<string>("RESOURCE_NAME") == sResource 1573 //if we have any row left, then it is true. 1574 select hl).Any(); 1575 } 1361 1576 1362 1577 private bool EditAppointmentEnabled() … … 1981 2196 1982 2197 /// <summary> 2198 /// Delete one Radiology Appointment 2199 /// </summary> 2200 private void AppointmentDeleteOneRadiology() 2201 { 2202 Debug.Assert(this.calendarGrid1.SelectedAppointment > 0); 2203 2204 CGAppointment a = this.Appointments.AppointmentTable[this.calendarGrid1.SelectedAppointment] as CGAppointment; 2205 2206 Debug.Assert(a.RadiologyExamIEN.HasValue); 2207 2208 //Prior to making expensive db calls, tell the grid nothing is selected anymore so nobody would try to pick it up 2209 this.calendarGrid1.SelectedAppointment = 0; 2210 2211 //Cancel Radiology Exam 2212 CGDocumentManager.Current.DAL.CancelRadiologyExam(a.PatientID, a.RadiologyExamIEN.Value); 2213 2214 //Now, Cancel the appointment 2215 this.Document.DeleteAppointment(a.AppointmentKey); 2216 2217 //redraw the grid to display new set of appointments after this appt was removed. 2218 this.UpdateArrays(); 2219 } 2220 2221 /// <summary> 1983 2222 /// Delete appointment ApptID 1984 2223 /// </summary> … … 2015 2254 return; 2016 2255 } 2256 2257 //At this point, the appointment will be deleted... 2258 //Remove the Selected Appointment from the grid because we don't anybody to think there's still 2259 //an appointment selected while we are still updating the grid 2260 this.calendarGrid1.SelectedAppointment = 0; 2017 2261 2018 2262 bool bClinic = dCancel.ClinicCancelled; … … 2381 2625 } 2382 2626 2627 /// <summary> 2628 /// Add a new Radiology Appointment to VISTA (ÒÝÊì as my mom calls it) 2629 /// </summary> 2630 private void AppointmentAddNewRadiology() 2631 { 2632 DateTime dStart, dEnd; //return vales for below 2633 string sResource; //ditto 2634 int nAccessTypeID = 0; //ditto 2635 2636 this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource); 2637 this.calendarGrid1.GetSelectedType(out nAccessTypeID); 2638 2639 Debug.Assert(sResource != null); 2640 Debug.Assert(dStart > DateTime.MinValue); 2641 2642 //Display a dialog to collect Patient Name 2643 DPatientLookup dPat = new DPatientLookup(); 2644 dPat.DocManager = m_DocManager; 2645 2646 if (dPat.ShowDialog(this) == DialogResult.Cancel) 2647 { 2648 return; 2649 } 2650 2651 int DFN = Int32.Parse(dPat.PatientIEN); 2652 // Hospital Location IEN 2653 int hlIEN = (from resource in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable() 2654 where resource.Field<string>("RESOURCE_NAME") == sResource 2655 select resource.Field<int>("HOSPITAL_LOCATION_ID")).FirstOrDefault(); 2656 2657 //Get Radiology Exams from the DB 2658 List<RadiologyExam> _radExams = CGDocumentManager.Current.DAL.GetRadiologyExamsForPatientinHL(DFN, hlIEN); 2659 2660 //If none found... 2661 if (!_radExams.Any()) 2662 { 2663 MessageBox.Show("Patient does not have any radiology exams to register."); 2664 return; 2665 } 2666 2667 //Display a form for the user to select radiology exams. 2668 DRadExamsSelect _radform = new DRadExamsSelect(_radExams); 2669 2670 if (_radform.ShowDialog() == DialogResult.Cancel) return; 2671 2672 //Get some return values 2673 int _examien = _radform.ExamIEN; 2674 string _procedurename = _radform.ProcedureName; 2675 2676 //Save Radiology Exam Schedule Info to Radiology Package 2677 CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien, dStart); 2678 2679 //Now create and save the appointment 2680 CGAppointment appt = new CGAppointment(); 2681 string _sNote = "Radiology Exam (" + _examien + "): " + _procedurename; 2682 appt.CreateAppointment(dStart, dEnd, _sNote, 0, sResource); 2683 appt.PatientID = Int32.Parse(dPat.PatientIEN); 2684 appt.PatientName = dPat.PatientName; 2685 appt.AccessTypeID = nAccessTypeID; 2686 appt.RadiologyExamIEN = _examien; 2687 appt.Patient = new Patient 2688 { 2689 DFN = Convert.ToInt32(dPat.PatientIEN), 2690 ID = dPat.PatientPID, 2691 Name = dPat.PatientName, 2692 HRN = dPat.HealthRecordNumber, 2693 DOB = dPat.PatientDOB 2694 }; 2695 2696 this.Document.CreateAppointment(appt); 2697 2698 //Print Appointment Slip if requested 2699 if (_radform.PrintAppointmentSlip) this.PrintAppointmentSlip(appt); 2700 2701 //Now redraw the grid to display the new appointments 2702 this.UpdateArrays(); 2703 } 2704 2705 2383 2706 #region BMX Event Processing and Callbacks 2384 2707 /// <summary> … … 2892 3215 try 2893 3216 { 3217 // added April 13 2011 3218 // Can't edit radiology appointments (Why? b/c it's intimately tied to Radiology Entry of the Hosp Loc) 3219 if (e.Appointment.RadiologyExamIEN.HasValue && e.Appointment.RadiologyExamIEN.Value > 0) 3220 { 3221 MessageBox.Show("You cannot move a radiology appointment.", "Clinical Scheduling"); 3222 return; 3223 } 3224 3225 // added May 5 2011 3226 // Can't move an appointment to a radiology resource 3227 if (IsThisARadiologyResource(e.Resource)) 3228 { 3229 MessageBox.Show("You cannot move an appointment to a radiology location.", "Clinical Scheduling"); 3230 return; 3231 } 3232 2894 3233 if (e.Appointment.CheckInTime.Ticks > 0) 2895 3234 { 2896 MessageBox.Show("You cannot change the appointment time because the patient has already checked in.", "Clinical Scheduling" , MessageBoxButtons.OKCancel, MessageBoxIcon.Information);3235 MessageBox.Show("You cannot change the appointment time because the patient has already checked in.", "Clinical Scheduling"); 2897 3236 return; 2898 3237 } … … 3566 3905 3567 3906 3568 3569 3570 3571 3907 }//End class 3572 3908 }
Note:
See TracChangeset
for help on using the changeset viewer.