- Timestamp:
- May 5, 2011, 5:11:02 AM (13 years ago)
- Location:
- Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode
-
Property svn:mergeinfo
set to
/Scheduling/trunk/cs/bsdx0200GUISourceCode merged eligible
-
Property svn:mergeinfo
set to
-
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/CGView.cs
r1166 r1168 94 94 private System.Windows.Forms.MenuItem sepApptMenu2; 95 95 private System.Windows.Forms.MenuItem ctxCalGridWalkin; 96 private System.Windows.Forms.MenuItem menuItem2;97 private System.Windows.Forms.MenuItem menuItem9;96 private System.Windows.Forms.MenuItem ctxCalGridSep1; 97 private System.Windows.Forms.MenuItem ctxCalGridSep2; 98 98 private System.Windows.Forms.MenuItem mnuOpenMultipleSchedules; 99 99 private System.Windows.Forms.MenuItem mnuDisplayWalkIns; 100 100 private System.Windows.Forms.MenuItem mnuRPMSDivision; 101 private MenuItem menuItem10;101 private MenuItem ctxCalGridSep3; 102 102 private MenuItem ctxCalGridReprintApptSlip; 103 103 private MenuItem ctxCalGridUndoCheckin; … … 257 257 this.lblResource = new System.Windows.Forms.Label(); 258 258 this.panelCenter = new System.Windows.Forms.Panel(); 259 this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();260 259 this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu(); 261 260 this.ctxCalGridAdd = new System.Windows.Forms.MenuItem(); … … 266 265 this.ctxCalGridCheckIn = new System.Windows.Forms.MenuItem(); 267 266 this.ctxCalGridUndoCheckin = new System.Windows.Forms.MenuItem(); 268 this. menuItem2= new System.Windows.Forms.MenuItem();267 this.ctxCalGridSep1 = new System.Windows.Forms.MenuItem(); 269 268 this.ctxCalGridNoShow = new System.Windows.Forms.MenuItem(); 270 269 this.ctxCalGridNoShowUndo = new System.Windows.Forms.MenuItem(); 271 this. menuItem9= new System.Windows.Forms.MenuItem();270 this.ctxCalGridSep2 = new System.Windows.Forms.MenuItem(); 272 271 this.ctxCalGridWalkin = new System.Windows.Forms.MenuItem(); 273 this. menuItem10= new System.Windows.Forms.MenuItem();272 this.ctxCalGridSep3 = new System.Windows.Forms.MenuItem(); 274 273 this.ctxCalGridReprintApptSlip = new System.Windows.Forms.MenuItem(); 275 274 this.panelBottom = new System.Windows.Forms.Panel(); … … 277 276 this.splitter1 = new System.Windows.Forms.Splitter(); 278 277 this.splitter2 = new System.Windows.Forms.Splitter(); 278 this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid(); 279 279 this.panelRight.SuspendLayout(); 280 280 this.panelClip.SuspendLayout(); … … 384 384 // 385 385 this.mnuPrintReminderLetters.Index = 10; 386 this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.Ctrl I;386 this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlE; 387 387 this.mnuPrintReminderLetters.Text = "Print Rem&inder Letters"; 388 388 this.mnuPrintReminderLetters.Click += new System.EventHandler(this.mnuPrintReminderLetters_Click); … … 462 462 // 463 463 this.mnuMkRadAppt.Index = 2; 464 this.mnuMkRadAppt.Shortcut = System.Windows.Forms.Shortcut. Ins;464 this.mnuMkRadAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlIns; 465 465 this.mnuMkRadAppt.Text = "Make Radiology Appointment"; 466 this.mnuMkRadAppt.Click += new System.EventHandler(this.mnuMkRadAppt_Click); 466 467 // 467 468 // mnuEditAppointment … … 482 483 // 483 484 this.mnuCancelRadAppt.Index = 5; 484 this.mnuCancelRadAppt.Shortcut = System.Windows.Forms.Shortcut. Del;485 this.mnuCancelRadAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlDel; 485 486 this.mnuCancelRadAppt.Text = "Cancel Radiology Appointment"; 487 this.mnuCancelRadAppt.Click += new System.EventHandler(this.mnuCancelRadAppt_Click); 486 488 // 487 489 // sepApptMenu1 … … 493 495 // 494 496 this.mnuNoShow.Index = 7; 497 this.mnuNoShow.Shortcut = System.Windows.Forms.Shortcut.CtrlN; 495 498 this.mnuNoShow.Text = "Mark as No Sho&w"; 496 499 this.mnuNoShow.Click += new System.EventHandler(this.mnuNoShow_Click); … … 499 502 // 500 503 this.mnuNoShowUndo.Index = 8; 504 this.mnuNoShowUndo.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftN; 501 505 this.mnuNoShowUndo.Text = "&Undo No Show"; 502 506 this.mnuNoShowUndo.Click += new System.EventHandler(this.mnuNoShowUndo_Click); … … 510 514 // 511 515 this.mnuCheckIn.Index = 10; 516 this.mnuCheckIn.Shortcut = System.Windows.Forms.Shortcut.CtrlI; 512 517 this.mnuCheckIn.Text = "Check &In Patient"; 513 518 this.mnuCheckIn.Click += new System.EventHandler(this.mnuCheckIn_Click); … … 516 521 // 517 522 this.mnuUndoCheckin.Index = 11; 523 this.mnuUndoCheckin.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftI; 518 524 this.mnuUndoCheckin.Text = "Undo Checkin"; 525 this.mnuUndoCheckin.Click += new System.EventHandler(this.mnuUndoCheckin_Click); 519 526 // 520 527 // sepApptMenu3 … … 527 534 this.mnuFindAppt.Index = 13; 528 535 this.mnuFindAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlF; 529 this.mnuFindAppt.Text = "&Find Available Appointment";536 this.mnuFindAppt.Text = "&Find Empty Slots"; 530 537 this.mnuFindAppt.Click += new System.EventHandler(this.mnuFindAppt_Click); 531 538 // … … 533 540 // 534 541 this.mnuCopyAppointment.Index = 14; 542 this.mnuCopyAppointment.Shortcut = System.Windows.Forms.Shortcut.CtrlC; 535 543 this.mnuCopyAppointment.Text = "&Copy Appointment to Clipboard"; 536 544 this.mnuCopyAppointment.Click += new System.EventHandler(this.mnuCopyAppointment_Click); … … 539 547 // 540 548 this.mnuViewPatientAppts.Index = 15; 549 this.mnuViewPatientAppts.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftZ; 541 550 this.mnuViewPatientAppts.Text = "&View Patient Appointments"; 542 551 this.mnuViewPatientAppts.Click += new System.EventHandler(this.mnuViewPatientAppts_Click); … … 545 554 // 546 555 this.mnuReprintApptSlip.Index = 16; 556 this.mnuReprintApptSlip.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftP; 547 557 this.mnuReprintApptSlip.Text = "Reprint Appointment Slip"; 558 this.mnuReprintApptSlip.Click += new System.EventHandler(this.mnuReprintApptSlip_Click); 548 559 // 549 560 // mnuCalendar … … 701 712 this.tvSchedules.Location = new System.Drawing.Point(0, 0); 702 713 this.tvSchedules.Name = "tvSchedules"; 703 this.tvSchedules.Size = new System.Drawing.Size(128, 39 6);714 this.tvSchedules.Size = new System.Drawing.Size(128, 392); 704 715 this.tvSchedules.Sorted = true; 705 716 this.tvSchedules.TabIndex = 1; … … 743 754 // 744 755 this.ctxFindAppt.Index = 3; 745 this.ctxFindAppt.Text = "&Find Available Appointment";756 this.ctxFindAppt.Text = "&Find Empty Slots"; 746 757 this.ctxFindAppt.Click += new System.EventHandler(this.ctxFindAppt_Click); 747 758 // … … 770 781 this.panelRight.Location = new System.Drawing.Point(996, 0); 771 782 this.panelRight.Name = "panelRight"; 772 this.panelRight.Size = new System.Drawing.Size(128, 39 6);783 this.panelRight.Size = new System.Drawing.Size(128, 392); 773 784 this.panelRight.TabIndex = 3; 774 785 this.panelRight.Visible = false; … … 866 877 this.panelCenter.Location = new System.Drawing.Point(136, 24); 867 878 this.panelCenter.Name = "panelCenter"; 868 this.panelCenter.Size = new System.Drawing.Size(857, 34 8);879 this.panelCenter.Size = new System.Drawing.Size(857, 344); 869 880 this.panelCenter.TabIndex = 7; 881 // 882 // ctxCalendarGrid 883 // 884 this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 885 this.ctxCalGridAdd, 886 this.ctxCalGridMkRadAppt, 887 this.ctxCalGridEdit, 888 this.ctxCalGridDelete, 889 this.ctxCalGridCancelRadAppt, 890 this.ctxCalGridCheckIn, 891 this.ctxCalGridUndoCheckin, 892 this.ctxCalGridSep1, 893 this.ctxCalGridNoShow, 894 this.ctxCalGridNoShowUndo, 895 this.ctxCalGridSep2, 896 this.ctxCalGridWalkin, 897 this.ctxCalGridSep3, 898 this.ctxCalGridReprintApptSlip}); 899 this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup); 900 // 901 // ctxCalGridAdd 902 // 903 this.ctxCalGridAdd.Index = 0; 904 this.ctxCalGridAdd.Text = "Add Appointment"; 905 this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click); 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 // 913 // ctxCalGridEdit 914 // 915 this.ctxCalGridEdit.Index = 2; 916 this.ctxCalGridEdit.Text = "Edit Appointment"; 917 this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click); 918 // 919 // ctxCalGridDelete 920 // 921 this.ctxCalGridDelete.Index = 3; 922 this.ctxCalGridDelete.Text = "Cancel Appointment"; 923 this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click); 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 // 931 // ctxCalGridCheckIn 932 // 933 this.ctxCalGridCheckIn.Index = 5; 934 this.ctxCalGridCheckIn.Text = "Check In Patient"; 935 this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click); 936 // 937 // ctxCalGridUndoCheckin 938 // 939 this.ctxCalGridUndoCheckin.Index = 6; 940 this.ctxCalGridUndoCheckin.Text = "&Undo Check In"; 941 this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click); 942 // 943 // ctxCalGridSep1 944 // 945 this.ctxCalGridSep1.Index = 7; 946 this.ctxCalGridSep1.Text = "-"; 947 // 948 // ctxCalGridNoShow 949 // 950 this.ctxCalGridNoShow.Index = 8; 951 this.ctxCalGridNoShow.Text = "Mark as No Show"; 952 this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click); 953 // 954 // ctxCalGridNoShowUndo 955 // 956 this.ctxCalGridNoShowUndo.Index = 9; 957 this.ctxCalGridNoShowUndo.Text = "Undo NoShow"; 958 this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click); 959 // 960 // ctxCalGridSep2 961 // 962 this.ctxCalGridSep2.Index = 10; 963 this.ctxCalGridSep2.Text = "-"; 964 // 965 // ctxCalGridWalkin 966 // 967 this.ctxCalGridWalkin.Index = 11; 968 this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment"; 969 this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click); 970 // 971 // ctxCalGridSep3 972 // 973 this.ctxCalGridSep3.Index = 12; 974 this.ctxCalGridSep3.Text = "-"; 975 // 976 // ctxCalGridReprintApptSlip 977 // 978 this.ctxCalGridReprintApptSlip.Index = 13; 979 this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip"; 980 this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click); 981 // 982 // panelBottom 983 // 984 this.panelBottom.Controls.Add(this.statusBar1); 985 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 986 this.panelBottom.Location = new System.Drawing.Point(136, 368); 987 this.panelBottom.Name = "panelBottom"; 988 this.panelBottom.Size = new System.Drawing.Size(857, 24); 989 this.panelBottom.TabIndex = 8; 990 // 991 // statusBar1 992 // 993 this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill; 994 this.statusBar1.Location = new System.Drawing.Point(0, 0); 995 this.statusBar1.Name = "statusBar1"; 996 this.statusBar1.Size = new System.Drawing.Size(857, 24); 997 this.statusBar1.SizingGrip = false; 998 this.statusBar1.TabIndex = 0; 999 // 1000 // splitter1 1001 // 1002 this.splitter1.Location = new System.Drawing.Point(128, 24); 1003 this.splitter1.Name = "splitter1"; 1004 this.splitter1.Size = new System.Drawing.Size(8, 368); 1005 this.splitter1.TabIndex = 9; 1006 this.splitter1.TabStop = false; 1007 // 1008 // splitter2 1009 // 1010 this.splitter2.Dock = System.Windows.Forms.DockStyle.Right; 1011 this.splitter2.Location = new System.Drawing.Point(993, 24); 1012 this.splitter2.Name = "splitter2"; 1013 this.splitter2.Size = new System.Drawing.Size(3, 368); 1014 this.splitter2.TabIndex = 10; 1015 this.splitter2.TabStop = false; 870 1016 // 871 1017 // calendarGrid1 … … 888 1034 this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources"))); 889 1035 this.calendarGrid1.SelectedAppointment = 0; 890 this.calendarGrid1.Size = new System.Drawing.Size(857, 34 8);1036 this.calendarGrid1.Size = new System.Drawing.Size(857, 344); 891 1037 this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0); 892 1038 this.calendarGrid1.TabIndex = 0; … … 898 1044 this.calendarGrid1.MouseEnter += new System.EventHandler(this.calendarGrid1_MouseEnter); 899 1045 // 900 // ctxCalendarGrid901 //902 this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {903 this.ctxCalGridAdd,904 this.ctxCalGridMkRadAppt,905 this.ctxCalGridEdit,906 this.ctxCalGridDelete,907 this.ctxCalGridCancelRadAppt,908 this.ctxCalGridCheckIn,909 this.ctxCalGridUndoCheckin,910 this.menuItem2,911 this.ctxCalGridNoShow,912 this.ctxCalGridNoShowUndo,913 this.menuItem9,914 this.ctxCalGridWalkin,915 this.menuItem10,916 this.ctxCalGridReprintApptSlip});917 this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);918 //919 // ctxCalGridAdd920 //921 this.ctxCalGridAdd.Index = 0;922 this.ctxCalGridAdd.Text = "Add Appointment";923 this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);924 //925 // ctxCalGridMkRadAppt926 //927 this.ctxCalGridMkRadAppt.Index = 1;928 this.ctxCalGridMkRadAppt.Text = "Make Radiology Appointment";929 this.ctxCalGridMkRadAppt.Click += new System.EventHandler(this.ctxCalGridMkRadAppt_Click);930 //931 // ctxCalGridEdit932 //933 this.ctxCalGridEdit.Index = 2;934 this.ctxCalGridEdit.Text = "Edit Appointment";935 this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);936 //937 // ctxCalGridDelete938 //939 this.ctxCalGridDelete.Index = 3;940 this.ctxCalGridDelete.Text = "Cancel Appointment";941 this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);942 //943 // ctxCalGridCancelRadAppt944 //945 this.ctxCalGridCancelRadAppt.Index = 4;946 this.ctxCalGridCancelRadAppt.Text = "Cancel Radiology Appointment";947 this.ctxCalGridCancelRadAppt.Click += new System.EventHandler(this.ctxCalGridCancelRadAppt_Click);948 //949 // ctxCalGridCheckIn950 //951 this.ctxCalGridCheckIn.Index = 5;952 this.ctxCalGridCheckIn.Text = "Check In Patient";953 this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);954 //955 // ctxCalGridUndoCheckin956 //957 this.ctxCalGridUndoCheckin.Index = 6;958 this.ctxCalGridUndoCheckin.Text = "&Undo Check In";959 this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click);960 //961 // menuItem2962 //963 this.menuItem2.Index = 7;964 this.menuItem2.Text = "-";965 //966 // ctxCalGridNoShow967 //968 this.ctxCalGridNoShow.Index = 8;969 this.ctxCalGridNoShow.Text = "Mark as No Show";970 this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);971 //972 // ctxCalGridNoShowUndo973 //974 this.ctxCalGridNoShowUndo.Index = 9;975 this.ctxCalGridNoShowUndo.Text = "Undo NoShow";976 this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);977 //978 // menuItem9979 //980 this.menuItem9.Index = 10;981 this.menuItem9.Text = "-";982 //983 // ctxCalGridWalkin984 //985 this.ctxCalGridWalkin.Index = 11;986 this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";987 this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);988 //989 // menuItem10990 //991 this.menuItem10.Index = 12;992 this.menuItem10.Text = "-";993 //994 // ctxCalGridReprintApptSlip995 //996 this.ctxCalGridReprintApptSlip.Index = 13;997 this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip";998 this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click);999 //1000 // panelBottom1001 //1002 this.panelBottom.Controls.Add(this.statusBar1);1003 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;1004 this.panelBottom.Location = new System.Drawing.Point(136, 372);1005 this.panelBottom.Name = "panelBottom";1006 this.panelBottom.Size = new System.Drawing.Size(857, 24);1007 this.panelBottom.TabIndex = 8;1008 //1009 // statusBar11010 //1011 this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;1012 this.statusBar1.Location = new System.Drawing.Point(0, 0);1013 this.statusBar1.Name = "statusBar1";1014 this.statusBar1.Size = new System.Drawing.Size(857, 24);1015 this.statusBar1.SizingGrip = false;1016 this.statusBar1.TabIndex = 0;1017 //1018 // splitter11019 //1020 this.splitter1.Location = new System.Drawing.Point(128, 24);1021 this.splitter1.Name = "splitter1";1022 this.splitter1.Size = new System.Drawing.Size(8, 372);1023 this.splitter1.TabIndex = 9;1024 this.splitter1.TabStop = false;1025 //1026 // splitter21027 //1028 this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;1029 this.splitter2.Location = new System.Drawing.Point(993, 24);1030 this.splitter2.Name = "splitter2";1031 this.splitter2.Size = new System.Drawing.Size(3, 372);1032 this.splitter2.TabIndex = 10;1033 this.splitter2.TabStop = false;1034 //1035 1046 // CGView 1036 1047 // 1037 1048 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 1038 this.ClientSize = new System.Drawing.Size(1124, 39 6);1049 this.ClientSize = new System.Drawing.Size(1124, 392); 1039 1050 this.Controls.Add(this.panelCenter); 1040 1051 this.Controls.Add(this.panelBottom); … … 1238 1249 } 1239 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); 1274 } 1275 1240 1276 #endregion AppointmentMenu Handlers 1241 1277 … … 1378 1414 ctxCalGridWalkin.Visible = false; 1379 1415 ctxCalGridUndoCheckin.Visible = false; 1416 ctxCalGridSep1.Visible = false; 1417 ctxCalGridSep2.Visible = false; 1380 1418 1381 1419 ctxCalGridMkRadAppt.Visible = true; … … 1395 1433 ctxCalGridWalkin.Visible = true; 1396 1434 ctxCalGridUndoCheckin.Visible = true; 1435 ctxCalGridSep1.Visible = true; 1436 ctxCalGridSep2.Visible = true; 1397 1437 1398 1438 ctxCalGridMkRadAppt.Visible = false; … … 1464 1504 } 1465 1505 1466 //new code smh1467 1506 private void ctxCalGridReprintApptSlip_Click(object sender, EventArgs e) 1468 1507 { … … 1474 1513 PrintAppointmentSlip(a); 1475 1514 } 1476 //end new code1477 1515 1478 1516 #endregion ctxCalGridMenu Handlers … … 1480 1518 #region Methods 1481 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> 1482 1524 private bool IsThisARadiologyResource() 1483 1525 { 1484 // I don't like this logic!!! but works for now! 1526 //I don't like this logic!!! but works for now! 1527 //Note: I use banana peeling model below 1528 1485 1529 //If no cell is selected AND no appointment is selected, then it's false 1486 1530 if (this.calendarGrid1.SelectedRange.Cells.CellCount < 1 && this.calendarGrid1.SelectedAppointment < 1) … … 1491 1535 { 1492 1536 CGAppointment appt = this.Appointments.AppointmentTable[this.calendarGrid1.SelectedAppointment] as CGAppointment; 1493 if (appt.RadiologyExamIEN.HasValue && appt.RadiologyExamIEN.Value > 0) return true; 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 1494 1539 else return false; 1495 1540 1496 1541 } 1497 1542 1498 //Otherwise, we are for sure dealing with a cell.1543 //Otherwise, we are for sure dealing with a cell. 1499 1544 //We need to determine if the cell resource is mapped to a Radiology Hospital Location. 1500 1545 DateTime dStart; … … 1512 1557 1513 1558 // see if resource is mapped to a Radiology Hospital Location. 1514 return (from hl in CGDocumentManager.Current.GlobalDataSet.Tables["HospitalLocation"].AsEnumerable() 1515 where hl.Field<string>("IS_RADIOLOGY_LOCATION")=="1" 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) 1516 1569 join res in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable() 1517 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 1518 1572 where res.Field<string>("RESOURCE_NAME") == sResource 1573 //if we have any row left, then it is true. 1519 1574 select hl).Any(); 1520 1575 } 1521 1576 1522 1577 private bool EditAppointmentEnabled() 1523 1578 { … … 1980 2035 this.Document.EditAppointment(a, sNote); 1981 2036 2037 if (dAppt.PrintAppointmentSlip) 2038 { 2039 PrintAppointmentSlip(a); 2040 } 2041 2042 //Redraw appointments 2043 this.UpdateArrays(); 2044 2045 //Then tell RPMS that we are updated 2046 RaiseRPMSEvent("BSDX SCHEDULE", a.Resource); 1982 2047 } 1983 2048 catch (Exception ex) … … 2130 2195 } 2131 2196 2197 /// <summary> 2198 /// Delete one Radiology Appointment 2199 /// </summary> 2132 2200 private void AppointmentDeleteOneRadiology() 2133 2201 { … … 2137 2205 2138 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; 2139 2210 2140 2211 //Cancel Radiology Exam … … 2171 2242 if (a.CheckInTime.Ticks > 0) 2172 2243 { 2173 MessageBox.Show("You must Un-checkin the appointment first before removing it.");2244 MessageBox.Show("You must undo the check-in first before removing the appointment."); 2174 2245 return; 2175 2246 } … … 2183 2254 return; 2184 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; 2185 2261 2186 2262 bool bClinic = dCancel.ClinicCancelled; … … 2549 2625 } 2550 2626 2627 /// <summary> 2628 /// Add a new Radiology Appointment to VISTA (ÒÝÊì as my mom calls it) 2629 /// </summary> 2551 2630 private void AppointmentAddNewRadiology() 2552 2631 { 2553 DateTime dStart, dEnd; 2554 string sResource; 2555 int nAccessTypeID = 0; 2632 DateTime dStart, dEnd; //return vales for below 2633 string sResource; //ditto 2634 int nAccessTypeID = 0; //ditto 2556 2635 2557 2636 this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource); 2558 2637 this.calendarGrid1.GetSelectedType(out nAccessTypeID); 2638 2639 Debug.Assert(sResource != null); 2640 Debug.Assert(dStart > DateTime.MinValue); 2641 2559 2642 //Display a dialog to collect Patient Name 2560 2643 DPatientLookup dPat = new DPatientLookup(); … … 2567 2650 2568 2651 int DFN = Int32.Parse(dPat.PatientIEN); 2652 // Hospital Location IEN 2569 2653 int hlIEN = (from resource in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable() 2570 2654 where resource.Field<string>("RESOURCE_NAME") == sResource 2571 2655 select resource.Field<int>("HOSPITAL_LOCATION_ID")).FirstOrDefault(); 2572 2656 2657 //Get Radiology Exams from the DB 2573 2658 List<RadiologyExam> _radExams = CGDocumentManager.Current.DAL.GetRadiologyExamsForPatientinHL(DFN, hlIEN); 2574 2659 2660 //If none found... 2575 2661 if (!_radExams.Any()) 2576 2662 { … … 2579 2665 } 2580 2666 2667 //Display a form for the user to select radiology exams. 2581 2668 DRadExamsSelect _radform = new DRadExamsSelect(_radExams); 2582 2669 2583 2670 if (_radform.ShowDialog() == DialogResult.Cancel) return; 2584 2671 2672 //Get some return values 2585 2673 int _examien = _radform.ExamIEN; 2586 2674 string _procedurename = _radform.ProcedureName; 2587 2675 2588 CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien); 2676 //Save Radiology Exam Schedule Info to Radiology Package 2677 CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien, dStart); 2589 2678 2590 2679 //Now create and save the appointment … … 2596 2685 appt.AccessTypeID = nAccessTypeID; 2597 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 2598 2696 this.Document.CreateAppointment(appt); 2697 2698 //Print Appointment Slip if requested 2699 if (_radform.PrintAppointmentSlip) this.PrintAppointmentSlip(appt); 2599 2700 2600 2701 //Now redraw the grid to display the new appointments … … 2919 3020 this.calendarGrid1.Columns = 5; 2920 3021 this.Document.m_nColumnCount = 5; // MJL 1/17/2007 2921 //this.Document.UpdateAllViews();2922 //TODO: Is there a way to just reuse the existing arrays? How far in the future do they go?2923 3022 RequestRefreshGrid(); 2924 3023 } … … 2928 3027 this.calendarGrid1.Columns = 7; 2929 3028 this.Document.m_nColumnCount = 7; // MJL 1/17/2007 2930 //TODO: Is there a way to just reuse the existing arrays? How far in the future do they go?2931 3029 RequestRefreshGrid(); 2932 3030 } … … 3122 3220 { 3123 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"); 3124 3230 return; 3125 3231 } … … 3196 3302 appt.HealthRecordNumber = e.Appointment.HealthRecordNumber; 3197 3303 appt.AccessTypeID = e.AccessTypeID; 3304 appt.Patient = e.Appointment.Patient; 3305 3198 3306 this.Document.CreateAppointment(appt); 3199 3307 … … 3751 3859 } 3752 3860 3753 LoadingSplash _loadingSplash; // Splash object a data point in class 3861 //private delegate DialogResult dLoadingSplash(IWin32Window owner); 3862 string _tempStatusBartext; 3754 3863 3755 3864 /// <summary> 3756 /// Loads a splash that says "Loading" 3865 /// Loads a splash that says "Loading" -- removed it april 13 2010 3757 3866 /// </summary> 3758 3867 private void LoadSplash() 3759 3868 { 3760 _loadingSplash = new LoadingSplash(); 3761 _loadingSplash.StartPosition = FormStartPosition.CenterScreen; //XXX: Don't like this, but will do for now. 3762 _loadingSplash.UseWaitCursor = true; // tell user we are working 3763 Thread threadSplash = new Thread(new ThreadStart(() => _loadingSplash.ShowDialog())); // lambda 3764 threadSplash.IsBackground = true; //expendable thread -- exit even if still running. 3765 threadSplash.Name = "Loading Thread"; 3766 threadSplash.Start(); 3869 _tempStatusBartext = this.statusBar1.Text; 3870 this.statusBar1.Text = "Refreshing Schedule..."; 3871 //_loadingSplash = new LoadingSplash(); 3872 //_loadingSplash.StartPosition = FormStartPosition.CenterScreen; //XXX: Don't like this, but will do for now. 3873 //_loadingSplash.UseWaitCursor = true; // tell user we are working 3874 //_loadingSplash.Show(this); 3875 //Thread threadSplash = new Thread(tstart); 3876 //threadSplash.IsBackground = true; 3877 //threadSplash.Name = "Loading Thread"; 3878 //threadSplash.Start(this); 3879 3880 //Thread threadSplash = new Thread(new ThreadStart(() => _loadingSplash.ShowDialog())); // lambda 3881 //threadSplash.IsBackground = true; //expendable thread -- exit even if still running. 3882 //threadSplash.Name = "Loading Thread"; 3883 //threadSplash.Start(); 3767 3884 } 3768 3885 3769 3886 private void StopSplash() 3770 3887 { 3771 _loadingSplash.RemoteClose();3888 this.statusBar1.Text = _tempStatusBartext; 3772 3889 } 3773 3890 … … 3787 3904 } 3788 3905 3906 3789 3907 }//End class 3790 3908 }
Note:
See TracChangeset
for help on using the changeset viewer.