- Timestamp:
- May 5, 2011, 5:11:02 AM (14 years ago)
- Location:
- Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode
- Files:
-
- 20 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/CGDocument.cs
r1140 r1168 238 238 sWalkIn = r["WALKIN"].ToString(); 239 239 bWalkIn = (sWalkIn == "1") ? true : false; 240 int? RadiologyExamIEN = r["RADIOLOGY_EXAM"] as Int32?; 240 int? RadiologyExamIEN = r["RADIOLOGY_EXAM"] as Int32?; //new in v 1.6 - Get Radiology Exam 241 241 242 242 Patient pt = new Patient() … … 1018 1018 if (sErrorID == "-1") 1019 1019 pAppt.Note = sNote; 1020 1021 if (this.m_appointments.AppointmentTable.ContainsKey(nApptID))1022 {1023 bool bRet = RefreshAvailabilitySchedule();1024 UpdateAllViews();1025 1020 } 1026 }1027 1021 catch (Exception ex) 1028 1022 { … … 1081 1075 } 1082 1076 1083 //TODO: MUST SEE IF RADIOLOGY STUFF WORKS WITH THIS ***1084 1077 public string AutoRebook(CGAppointment a, int nSearchType, int nMinimumDays, int nMaximumDays, out CGAppointment aRebook) 1085 1078 { -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
r1131 r1168 400 400 catch (System.Net.Sockets.SocketException) 401 401 { 402 MessageBox.Show("Cannot connect to VistA.Network Error");402 m_ds.RemoteMsgBox("Can't connect to server! Network Error"); 403 403 return false; 404 404 } … … 438 438 catch (System.Net.Sockets.SocketException) 439 439 { 440 MessageBox.Show("Cannot connect to VistA. Network Error");440 m_ds.RemoteMsgBox("Cannot connect to VistA. Network Error"); 441 441 } 442 442 catch (BMXNetException ex) 443 443 { 444 if ( MessageBox.Show("Unable to connect to VistA. " + ex.Message, "Clinical Scheduling", MessageBoxButtons.RetryCancel) == DialogResult.Retry)444 if (m_ds.RemoteMsgBox("Unable to connect to VistA. " + ex.Message, "Clinical Scheduling", MessageBoxButtons.RetryCancel) == DialogResult.Retry) 445 445 { 446 446 bRetry = true; -
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 } -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/CalendarGrid.cs
r1140 r1168 9 9 using System.Runtime.InteropServices; 10 10 using System.Windows.Forms; 11 using System.Linq; 11 12 12 13 /// <summary> … … 125 126 try 126 127 { 128 //calculate each cell's height 127 129 SizeF ef = g.MeasureString("Test", this.m_fCell); 128 130 this.m_cellHeight = ((int) ef.Height) + 4; 129 int nColumns = this.m_nColumns; 130 int num2 = 60 / this.m_nTimeScale; 131 int num3 = 24 * num2; 132 nColumns++; 133 num3++; 134 this.m_cellWidth = 600 / nColumns; 131 132 int nColumns = this.m_nColumns; // columns set via property 133 int slotsPerHour = 60 / this.m_nTimeScale; //time scale set via property 134 int slotsPerDay = 24 * slotsPerHour; 135 nColumns++; // add extra column for time display 136 slotsPerDay++; // not sure here why that's don't 137 138 //calculate each cell's height 139 this.m_cellWidth = 600 / nColumns; // base size is 600 pixels 140 // if larger: 135 141 if (base.ClientRectangle.Width > 600) 136 142 { 137 143 this.m_cellWidth = (base.ClientRectangle.Width - this.m_col0Width) / (nColumns - 1); 138 144 } 145 // if only one column 139 146 if (this.m_nColumns == 1) 140 147 { 141 148 this.m_cellWidth = base.ClientRectangle.Width - this.m_col0Width; 142 149 } 150 //next line seems to be useless (we don't use X and Y below) 143 151 g.TranslateTransform((float) base.AutoScrollPosition.X, (float) base.AutoScrollPosition.Y); 144 for (int i = num3; i > -1; i--) 152 153 //now, build the grid cells 154 for (int i = slotsPerDay; i > -1; i--) 145 155 { 146 156 for (int j = 1; j < nColumns; j++) … … 233 243 } 234 244 245 void CalendarGrid_DragOver(object sender, DragEventArgs e) 246 { 247 //Translate point to client point 248 Point pt = this.PointToClient(new Point(e.X, e.Y)); 249 250 //clear selections 251 foreach (DictionaryEntry entry in this.m_gridCells.CellHashTable) 252 { 253 CGCell cell = (CGCell)entry.Value; 254 cell.IsSelected = false; 255 } 256 this.m_selectedRange.Cells.ClearAllCells(); 257 258 //select a cell based on current drag position to visually assist the user 259 int nRow = -1; 260 int nCol = -1; 261 if (this.HitTest(pt.X, pt.Y, ref nRow, ref nCol)) 262 { 263 CGCell cellFromRowCol = this.m_gridCells.GetCellFromRowCol(nRow, nCol); 264 if (cellFromRowCol != null) 265 { 266 this.m_currentCell = cellFromRowCol; 267 this.m_selectedRange.StartCell = null; 268 this.m_selectedRange.EndCell = null; 269 this.m_selectedRange.CreateRange(this.m_gridCells, cellFromRowCol, cellFromRowCol); 270 271 cellFromRowCol.IsSelected = true; 272 } 273 274 base.Invalidate(); 275 } 276 277 //if Y axis is outside the top or bottom 278 279 if ((pt.Y + 40 >= this.ClientRectangle.Bottom) || (pt.Y - 40 <= this.ClientRectangle.Top)) 280 { 281 //start auto scrolling. m_bScrollDown decides whether we scroll up or down. 282 this.m_bScrollDown = (pt.Y + 40) >= this.ClientRectangle.Bottom; 283 AutoDragStart(); 284 } 285 286 //if Y axis within client rectagle, stop dragging (whether you started or not) 287 if ((pt.Y + 40 < this.ClientRectangle.Bottom) && (pt.Y - 40 > this.ClientRectangle.Top)) 288 { 289 AutoDragStop(); 290 } 291 } 292 235 293 private void CalendarGrid_MouseDown(object sender, MouseEventArgs e) 236 294 { … … 247 305 this.OnLButtonDown(e.X, e.Y, true); 248 306 } 307 //new code!!! smh 4/13/2011 -- refactor later 308 309 else if (e.Button == MouseButtons.Right) 310 { 311 // clear all selected cells, but ONLY if the the pointer is NOT over one of the cells in 312 // the selected range 313 314 int nRow = -1; 315 int nCol = -1; 316 CGCell cellFromRowCol = null; 317 bool _isCellInRange = false; 318 if (this.HitTest(e.X, e.Y, ref nRow, ref nCol)) 319 { 320 cellFromRowCol = this.m_gridCells.GetCellFromRowCol(nRow, nCol); 321 } 322 323 if (cellFromRowCol != null) 324 _isCellInRange = this.m_selectedRange.CellIsInRange(cellFromRowCol); 325 326 if (!_isCellInRange) 327 { 328 foreach (DictionaryEntry entry in this.m_gridCells.CellHashTable) 329 { 330 CGCell cell = (CGCell)entry.Value; 331 cell.IsSelected = false; 332 } 333 this.m_selectedRange.Cells.ClearAllCells(); 334 } 335 336 // clear all selected appointments 337 this.m_SelectedAppointments.ClearAllAppointments(); 338 foreach (CGAppointment a in this.m_Appointments.AppointmentTable.Values) a.Selected = false; 339 this.m_nSelectID = 0; 340 341 OnRButtonDown(e.X, e.Y, _isCellInRange); 342 } 343 344 //end new code!!! /smh 4/13/2011 249 345 } 250 346 251 347 private void CalendarGrid_MouseMove(object Sender, MouseEventArgs e) 252 348 { 253 //test254 //System.Diagnostics.Debug.Write(watch.ElapsedMilliseconds + "\n");255 //test256 349 257 350 //if the left mouse button is down and we are moving the mouse... … … 292 385 else 293 386 { 294 //test 295 AutoDragStop(); //is this needed? 296 //test 387 388 AutoDragStop(); //is this needed? //just in case maybe 389 390 //this code below displays the tooltip if we are moving the mouse over an appointment 297 391 int y = e.Y - base.AutoScrollPosition.Y; 298 392 int x = e.X - base.AutoScrollPosition.X; … … 307 401 } 308 402 this.m_toolTip.RemoveAll(); 309 310 ////smh new code -- select cell311 //int nRow = -1;312 //int nCol = -1;313 314 ////Is the mouse over a known cell? If so, highlight cell315 //if (this.HitTest(x, y, ref nRow, ref nCol))316 //{317 // CGCell cellFromRowCol = this.m_gridCells.GetCellFromRowCol(nRow, nCol);318 // if (cellFromRowCol != null)319 // {320 // this.m_currentCell = cellFromRowCol;321 // this.m_selectedRange.StartCell = null;322 // this.m_selectedRange.EndCell = null;323 // this.m_selectedRange.CreateRange(this.m_gridCells, cellFromRowCol, cellFromRowCol);324 // this.m_bSelectingRange = true;325 // cellFromRowCol.IsSelected = true;326 // base.Invalidate(this.m_currentCell.CellRectangle);327 // //base.Invalidate();328 // }329 //}330 331 332 403 } 333 404 } … … 515 586 // flag is true only if there are no cells what so ever in the screen 516 587 // Only true when no resource is selected. 517 bool flag = this.m_gridCells.CellCount == 0;588 bool noCellsFlag = this.m_gridCells.CellCount == 0; 518 589 519 590 // Move the base point from the client screen to the scrolling region top-left corner. … … 600 671 num12 = this.m_col0Width; 601 672 } 602 if (k > 1) // 673 if (k > 1) // if we are subsequent columns, adjust accordingly 603 674 { 604 675 num12 = this.m_col0Width + (this.m_cellWidth * (k - 1)); 605 676 } 677 //make a rectangle for the cell 606 678 Point point4 = new Point(num12, j * this.m_cellHeight); 607 679 Rectangle r = new Rectangle(point4.X, point4.Y, this.m_cellWidth, this.m_cellHeight); 608 if (j != 0) 609 { 610 CGCell cellFromRowCol = null; 611 if ( flag)680 if (j != 0) // if we are not at the top (we are starting from the bottom) 681 { 682 CGCell cellFromRowCol = null; 683 if (noCellsFlag) //if there are no cells, create the cell 612 684 { 613 685 cellFromRowCol = new CGCell(r, j, k); 614 686 this.m_gridCells.AddCell(cellFromRowCol); 615 687 } 616 else 688 else // otherwise, get the cell from the m_gridCells array 617 689 { 618 690 cellFromRowCol = this.m_gridCells.GetCellFromRowCol(j, k); 619 691 cellFromRowCol.CellRectangle = r; 620 692 } 621 if (this.m_sResourcesArray.Count > 0) 693 if (this.m_sResourcesArray.Count > 0) // if we have any resources open 622 694 { 623 695 //IMP 624 696 //this is the place where we the selected cells are drawn in Light Light Blue. 625 697 //IMP 698 // if cell is selected, draw it in Aquamarine (light light blue) 626 699 if (this.m_selectedRange.CellIsInRange(cellFromRowCol)) 627 700 { … … 629 702 //g.FillRectangle(Brushes.AntiqueWhite, r); 630 703 } 704 // otherwise, draw it from Appointment Type Color set by BuildGridCellsArray() 631 705 else 632 706 { 633 707 g.FillRectangle(cellFromRowCol.AppointmentTypeColor, r); 634 708 } 709 // finally the drawing 635 710 g.DrawRectangle(pen, r.X, r.Y, r.Width, r.Height); 711 // once done with availabilities, draw the appointments 636 712 if (j == 1) 637 713 { … … 641 717 continue; 642 718 } 719 720 //Below draws the top column either containing the dates or resources 643 721 if (!this.m_bScroll) 644 722 { … … 922 1000 this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.CalendarGrid_MouseUp); 923 1001 this.DragEnter += new System.Windows.Forms.DragEventHandler(this.CalendarGrid_DragEnter); 1002 this.DragOver += new DragEventHandler(CalendarGrid_DragOver); 924 1003 this.ResumeLayout(false); 925 1004 926 1005 } 927 1006 1007 928 1008 private static int MinSince80(DateTime d) 929 1009 { … … 931 1011 TimeSpan span = (TimeSpan) (d - time); 932 1012 return (int) span.TotalMinutes; 1013 } 1014 1015 //new code1!! smh 4/14/2011 1016 private void OnRButtonDown(int X, int Y, bool RangeAlreadySelected) 1017 { 1018 //if right mouse button is clicked, select an appointment if mouse hovers over one 1019 foreach (CGAppointment appointment3 in this.m_Appointments.AppointmentTable.Values) 1020 { 1021 int y = Y - base.AutoScrollPosition.Y; 1022 int x = X - base.AutoScrollPosition.X; 1023 Point pt = new Point(x, y); 1024 1025 if (!appointment3.GridRectangle.Contains(pt)) 1026 { 1027 continue; 1028 } 1029 this.m_bMouseDown = false; 1030 1031 this.m_SelectedAppointments.AddAppointment(appointment3); 1032 appointment3.Selected = true; 1033 this.m_nSelectID = appointment3.AppointmentKey; 1034 //this.m_bGridEnter = true; 1035 } 1036 1037 // if we find an appointment, redraw the grid 1038 if (this.m_SelectedAppointments.AppointmentCount > 0) 1039 { 1040 base.Invalidate(); 1041 return; 1042 } 1043 1044 // Otherwise, select a cell, but only if we don't don't have an existing range 1045 if (RangeAlreadySelected) return; 1046 1047 // Ok, select cell here 1048 int nRow = -1; 1049 int nCol = -1; 1050 if (this.HitTest(X, Y, ref nRow, ref nCol)) 1051 { 1052 CGCell cellFromRowCol = this.m_gridCells.GetCellFromRowCol(nRow, nCol); 1053 if (cellFromRowCol != null) 1054 { 1055 this.m_currentCell = cellFromRowCol; 1056 this.m_selectedRange.StartCell = null; 1057 this.m_selectedRange.EndCell = null; 1058 this.m_selectedRange.CreateRange(this.m_gridCells, cellFromRowCol, cellFromRowCol); 1059 1060 cellFromRowCol.IsSelected = true; 1061 } 1062 1063 base.Invalidate(); 1064 return; 1065 } 933 1066 } 934 1067 … … 1067 1200 if (this.m_gridCells.CellCount != 0) 1068 1201 { 1202 // this happens for the CGAVView Grid 1069 1203 foreach (DictionaryEntry entry in this.m_gridCells.CellHashTable) 1070 1204 { … … 1072 1206 cell.AppointmentTypeColor = (this.m_GridBackColor == "blue") ? Brushes.CornflowerBlue : Brushes.Khaki; 1073 1207 } 1208 // won't happen for CGAVView Grid b/c it has no availabilites 1209 // BUT, will happen for normal CGView Grid if there any availabilies 1074 1210 if ((this.m_pAvArray != null) && (this.m_pAvArray.Count != 0)) 1075 1211 { … … 1080 1216 int num3 = 0; 1081 1217 int num4 = 0; 1218 // pick the color from the availability 1082 1219 Brush brush = new SolidBrush(Color.FromArgb(availability.Red, availability.Green, availability.Blue)); 1220 // get starting and ending cell 1083 1221 this.GetCellFromTime(availability.StartTime, ref nRow, ref nCol, true, availability.ResourceList); 1084 1222 this.GetCellFromTime(availability.EndTime, ref num3, ref num4, false, availability.ResourceList); 1223 // for each of the range cells between starting and ending, change their color 1085 1224 for (int i = nCol; i <= num4; i++) 1086 1225 { … … 1328 1467 { 1329 1468 this.m_nColumns = value; 1330 this.m_gridCells.ClearAllCells(); 1331 this.m_selectedRange.Cells.ClearAllCells(); 1469 //new line 1470 this.SetColumnInfo(); // redoes the columns if we have multiple resources 1471 //end new line 1472 this.m_gridCells.ClearAllCells(); //remove all cells 1473 this.m_selectedRange.Cells.ClearAllCells(); //remove selected range 1332 1474 Graphics g = base.CreateGraphics(); 1333 this.BuildGridCellsArray(g); 1334 this.SetAppointmentTypes(); 1335 base.Invalidate(); 1475 this.BuildGridCellsArray(g); //rebuild the cells 1476 this.SetAppointmentTypes(); //set the colors on the cells for availabilities 1477 base.Invalidate(); //Fire paint to call DrawGrid 1336 1478 } 1337 1479 } -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user
r1140 r1168 37 37 </RemoteDebugMachine> 38 38 <StartAction>Project</StartAction> 39 <StartArguments>/s=172.16.16.108 /p=9255 /a=s.habiel /v=catdog. 66</StartArguments>39 <StartArguments>/s=172.16.16.108 /p=9255 /a=s.habiel /v=catdog.77</StartArguments> 40 40 <StartPage> 41 41 </StartPage> -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/DAL.cs
r1166 r1168 1 using System; 1 /* Licensed under LGPL */ 2 3 using System; 2 4 using System.Collections.Generic; 3 5 using System.Linq; … … 187 189 188 190 /// <summary> 189 /// TODO191 /// Gets All radiology exams for a Patient in a specific hospital location 190 192 /// </summary> 191 193 /// <param name="DFN"></param> 192 /// <param name="SCIEN"> </param>193 /// <returns> </returns>194 /// <param name="SCIEN">Hospital Location IEN</param> 195 /// <returns>Generic List of type RadiologyExam</returns> 194 196 public List<RadiologyExam> GetRadiologyExamsForPatientinHL(int DFN, int SCIEN) 195 197 { … … 207 209 208 210 /// <summary> 209 /// TODO211 /// Schedules a Single Radiology Exam for a patient 210 212 /// </summary> 211 213 /// <param name="DFN"></param> 212 /// <param name="examIEN"></param> 213 /// <returns></returns> 214 public bool ScheduleRadiologyExam(int DFN, int examIEN) 215 { 216 string result = _thisConnection.bmxNetLib.TransmitRPC("BSDX SCHEDULE RAD EXAM", string.Format("{0}^{1}",DFN,examIEN)); 214 /// <param name="examIEN">IEN of exam in 75.1 (RAD/NUC MED ORDERS) file</param> 215 /// <param name="dStart">Start DateTime of appointment</param> 216 /// <returns>should always return true</returns> 217 public bool ScheduleRadiologyExam(int DFN, int examIEN, DateTime dStart) 218 { 219 string fmStartDate = FMDateTime.Create(dStart).FMDateString; 220 string result = _thisConnection.bmxNetLib.TransmitRPC("BSDX SCHEDULE RAD EXAM", string.Format("{0}^{1}^{2}", DFN, examIEN, fmStartDate)); 217 221 return result == "1" ? true : false; 218 222 } 219 223 220 224 /// <summary> 221 /// TODO225 /// Put the radiology exam on Hold because the appointment has been cancelled for it 222 226 /// </summary> 223 227 /// <param name="DFN"></param> 224 /// <param name="examIEN"> </param>225 /// <returns> </returns>228 /// <param name="examIEN">IEN of exam in 75.1 (RAD/NUC MED ORDERS) file</param> 229 /// <returns>should always return true</returns> 226 230 public bool CancelRadiologyExam(int DFN, int examIEN) 227 231 { -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/DApptSearch.cs
r1123 r1168 5 5 using System.Data; 6 6 using System.Linq; 7 //using System.Data.OleDb;8 7 9 8 namespace IndianHealthService.ClinicalScheduling … … 114 113 { 115 114 116 this.Text = "Searching for Appointments in: " + string.Join(" | ", alResources.Cast<string>());115 this.Text = "Searching for available slots in: " + string.Join(" | ", alResources.Cast<string>()); 117 116 118 117 this.m_DocManager = docManager; … … 275 274 { 276 275 this.panel1 = new System.Windows.Forms.Panel(); 276 this.lblMessage = new System.Windows.Forms.Label(); 277 277 this.cmdSearch = new System.Windows.Forms.Button(); 278 278 this.cmdCancel = new System.Windows.Forms.Button(); … … 313 313 this.colSlots = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 314 314 this.colAccessType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 315 this.lblMessage = new System.Windows.Forms.Label();316 315 this.panel1.SuspendLayout(); 317 316 this.pnlDescription.SuspendLayout(); … … 335 334 this.panel1.TabIndex = 4; 336 335 // 336 // lblMessage 337 // 338 this.lblMessage.AutoSize = true; 339 this.lblMessage.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 340 this.lblMessage.ForeColor = System.Drawing.Color.Red; 341 this.lblMessage.Location = new System.Drawing.Point(337, 16); 342 this.lblMessage.Name = "lblMessage"; 343 this.lblMessage.Size = new System.Drawing.Size(0, 16); 344 this.lblMessage.TabIndex = 3; 345 // 337 346 // cmdSearch 338 347 // … … 390 399 this.lblDescription.Size = new System.Drawing.Size(917, 45); 391 400 this.lblDescription.TabIndex = 1; 392 this.lblDescription.Text = "Search for available appointment times using this panel. You may narrow your sea" +393 " rch by selecting an access type or by selecting specific days of the week or tim" +394 " es ofday.";401 this.lblDescription.Text = "Search for available slots times using this panel. You may narrow your search by" + 402 " selecting an access type or by selecting specific days of the week or times of " + 403 "day."; 395 404 // 396 405 // groupBox1 … … 676 685 this.colAccessType.Text = "Access Type"; 677 686 this.colAccessType.Width = 101; 678 //679 // lblMessage680 //681 this.lblMessage.AutoSize = true;682 this.lblMessage.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));683 this.lblMessage.ForeColor = System.Drawing.Color.Red;684 this.lblMessage.Location = new System.Drawing.Point(337, 16);685 this.lblMessage.Name = "lblMessage";686 this.lblMessage.Size = new System.Drawing.Size(0, 16);687 this.lblMessage.TabIndex = 3;688 687 // 689 688 // DApptSearch … … 899 898 900 899 if (items.Length > 0) lstResults.Items.AddRange(items); // add new data 901 else this.lblMessage.Text = "No available Appointment Slots Found!";900 else this.lblMessage.Text = "No available slots found!"; 902 901 903 902 lstResults.EndUpdate(); // ok done adding items, draw now. … … 944 943 { 945 944 this.DialogResult = DialogResult.None; 946 lblMessage.Text = "No Appointment Slot selected!";945 lblMessage.Text = "No slot selected!"; 947 946 return; 948 947 } 949 948 950 long availabilityKey = long.Parse(lstResults.SelectedItems[0].SubItems[0].Text);949 int availabilityKey = Int32.Parse(lstResults.SelectedItems[0].SubItems[0].Text); 951 950 _selectedAvailability = (from av in lstResultantAvailabilities 952 951 where av.AvailabilityType == availabilityKey -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/DRadExamsSelect.Designer.cs
r1140 r1168 33 33 this.btnOK = new System.Windows.Forms.Button(); 34 34 this.btnCancel = new System.Windows.Forms.Button(); 35 this.l abel1= new System.Windows.Forms.Label();35 this.lblInfo = new System.Windows.Forms.Label(); 36 36 this.splitContainer1 = new System.Windows.Forms.SplitContainer(); 37 this.splitContainer2 = new System.Windows.Forms.SplitContainer(); 38 this.chkPrint = new System.Windows.Forms.CheckBox(); 37 39 this.tableOKCancel.SuspendLayout(); 38 40 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); … … 40 42 this.splitContainer1.Panel2.SuspendLayout(); 41 43 this.splitContainer1.SuspendLayout(); 44 ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); 45 this.splitContainer2.Panel1.SuspendLayout(); 46 this.splitContainer2.Panel2.SuspendLayout(); 47 this.splitContainer2.SuspendLayout(); 42 48 this.SuspendLayout(); 43 49 // … … 48 54 this.lstExams.Location = new System.Drawing.Point(0, 0); 49 55 this.lstExams.Name = "lstExams"; 50 this.lstExams.Size = new System.Drawing.Size(497, 193);56 this.lstExams.Size = new System.Drawing.Size(497, 237); 51 57 this.lstExams.TabIndex = 0; 52 58 this.lstExams.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.lstExams_MouseDoubleClick); … … 60 66 this.tableOKCancel.Controls.Add(this.btnOK, 0, 0); 61 67 this.tableOKCancel.Controls.Add(this.btnCancel, 1, 0); 62 this.tableOKCancel.Location = new System.Drawing.Point(328, 5);68 this.tableOKCancel.Location = new System.Drawing.Point(328, -1); 63 69 this.tableOKCancel.Name = "tableOKCancel"; 64 70 this.tableOKCancel.RowCount = 1; … … 87 93 this.btnCancel.UseVisualStyleBackColor = true; 88 94 // 89 // l abel195 // lblInfo 90 96 // 91 this.label1.AutoSize = true; 92 this.label1.Location = new System.Drawing.Point(12, 9); 93 this.label1.Name = "label1"; 94 this.label1.Size = new System.Drawing.Size(245, 13); 95 this.label1.TabIndex = 2; 96 this.label1.Text = "Select an Exam from the exams listed to Schedule"; 97 this.lblInfo.Anchor = System.Windows.Forms.AnchorStyles.Left; 98 this.lblInfo.AutoSize = true; 99 this.lblInfo.Location = new System.Drawing.Point(4, 6); 100 this.lblInfo.Name = "lblInfo"; 101 this.lblInfo.Size = new System.Drawing.Size(245, 13); 102 this.lblInfo.TabIndex = 2; 103 this.lblInfo.Text = "Select an Exam from the exams listed to Schedule"; 97 104 // 98 105 // splitContainer1 … … 109 116 // splitContainer1.Panel2 110 117 // 111 this.splitContainer1.Panel2.Controls.Add(this.tableOKCancel); 112 this.splitContainer1.Panel2.Controls.Add(this.label1); 113 this.splitContainer1.Size = new System.Drawing.Size(497, 234); 114 this.splitContainer1.SplitterDistance = 193; 118 this.splitContainer1.Panel2.Controls.Add(this.splitContainer2); 119 this.splitContainer1.Size = new System.Drawing.Size(497, 302); 120 this.splitContainer1.SplitterDistance = 237; 115 121 this.splitContainer1.TabIndex = 3; 122 // 123 // splitContainer2 124 // 125 this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; 126 this.splitContainer2.Location = new System.Drawing.Point(0, 0); 127 this.splitContainer2.Name = "splitContainer2"; 128 this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; 129 // 130 // splitContainer2.Panel1 131 // 132 this.splitContainer2.Panel1.Controls.Add(this.lblInfo); 133 // 134 // splitContainer2.Panel2 135 // 136 this.splitContainer2.Panel2.Controls.Add(this.chkPrint); 137 this.splitContainer2.Panel2.Controls.Add(this.tableOKCancel); 138 this.splitContainer2.Size = new System.Drawing.Size(497, 61); 139 this.splitContainer2.SplitterDistance = 25; 140 this.splitContainer2.TabIndex = 3; 141 // 142 // chkPrint 143 // 144 this.chkPrint.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 145 this.chkPrint.AutoSize = true; 146 this.chkPrint.Location = new System.Drawing.Point(3, 11); 147 this.chkPrint.Name = "chkPrint"; 148 this.chkPrint.Size = new System.Drawing.Size(131, 17); 149 this.chkPrint.TabIndex = 2; 150 this.chkPrint.Text = "Print Appointment Slip"; 151 this.chkPrint.UseVisualStyleBackColor = true; 152 this.chkPrint.CheckedChanged += new System.EventHandler(this.chkPrint_CheckedChanged); 116 153 // 117 154 // DRadExamsSelect … … 121 158 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 122 159 this.CancelButton = this.btnCancel; 123 this.ClientSize = new System.Drawing.Size(497, 234);160 this.ClientSize = new System.Drawing.Size(497, 302); 124 161 this.ControlBox = false; 125 162 this.Controls.Add(this.splitContainer1); … … 130 167 this.splitContainer1.Panel1.ResumeLayout(false); 131 168 this.splitContainer1.Panel2.ResumeLayout(false); 132 this.splitContainer1.Panel2.PerformLayout();133 169 ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); 134 170 this.splitContainer1.ResumeLayout(false); 171 this.splitContainer2.Panel1.ResumeLayout(false); 172 this.splitContainer2.Panel1.PerformLayout(); 173 this.splitContainer2.Panel2.ResumeLayout(false); 174 this.splitContainer2.Panel2.PerformLayout(); 175 ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); 176 this.splitContainer2.ResumeLayout(false); 135 177 this.ResumeLayout(false); 136 178 … … 143 185 private System.Windows.Forms.Button btnOK; 144 186 private System.Windows.Forms.Button btnCancel; 145 private System.Windows.Forms.Label l abel1;187 private System.Windows.Forms.Label lblInfo; 146 188 private System.Windows.Forms.SplitContainer splitContainer1; 189 private System.Windows.Forms.SplitContainer splitContainer2; 190 private System.Windows.Forms.CheckBox chkPrint; 147 191 148 192 -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/DRadExamsSelect.cs
r1140 r1168 19 19 public int ExamIEN { get; private set; } 20 20 public string ProcedureName { get; private set; } 21 public bool PrintAppointmentSlip { get { return chkPrint.Checked; } } 21 22 //end return values 23 24 //private fields 25 public bool _myCodeIsFiringIstheCheckBoxChangedEvent = false; 26 //private fields 22 27 23 28 /// <summary> … … 31 36 this.lstExams.DataSource = _radExams; 32 37 this.lstExams.SelectionMode = SelectionMode.One; 38 39 //Set Default Checkbox 40 _myCodeIsFiringIstheCheckBoxChangedEvent = true; 41 chkPrint.Checked = CGDocumentManager.Current.UserPreferences.PrintAppointmentSlipAutomacially; 42 _myCodeIsFiringIstheCheckBoxChangedEvent = false; 33 43 } 34 44 … … 56 66 } 57 67 68 /// <summary> 69 /// Save preference for Auto Printing Appointment Slip in the DB 70 /// </summary> 71 /// <param name="sender"></param> 72 /// <param name="e"></param> 73 private void chkPrint_CheckedChanged(object sender, EventArgs e) 74 { 75 if (_myCodeIsFiringIstheCheckBoxChangedEvent) return; 76 77 CGDocumentManager.Current.UserPreferences.PrintAppointmentSlipAutomacially = chkPrint.Checked; 78 } 79 58 80 59 81 } -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/DSplash.cs
r1061 r1168 8 8 { 9 9 /// <summary> 10 /// Summary description for DSplash. 10 /// Program loading splash screen. Notice the numerous remote methods intended 11 /// to mickey mouse the form from another thread. 12 /// 13 /// I don't know of a better way of doing this right now. 11 14 /// </summary> 12 15 public class DSplash : System.Windows.Forms.Form … … 147 150 public delegate void dAny(); 148 151 public delegate void dProgressBarSet(int number); 152 public delegate DialogResult dMessageBox(IWin32Window owner, string message); 153 public delegate DialogResult dMessageBox2(IWin32Window owner, string message, string caption, MessageBoxButtons btns); 149 154 150 155 public void SetStatus(string sStatus) … … 165 170 } 166 171 172 public DialogResult RemoteMsgBox(string msg) 173 { 174 dMessageBox d = new dMessageBox(MessageBox.Show); 175 return (DialogResult)this.Invoke(d, this, msg); 176 } 177 178 public DialogResult RemoteMsgBox(string msg, string caption, MessageBoxButtons btns) 179 { 180 dMessageBox2 d = new dMessageBox2(MessageBox.Show); 181 return (DialogResult)this.Invoke(d, this, msg, caption, btns); 182 } 183 167 184 public void RemoteClose() 168 185 { 169 186 dAny d = new dAny(this.Close); 187 this.Invoke(d); 188 } 189 190 public void RemoteActivate() 191 { 192 dAny d = new dAny(this.Activate); 193 this.Invoke(d); 194 } 195 196 public void RemoteHide() 197 { 198 dAny d = new dAny(this.Hide); 170 199 this.Invoke(d); 171 200 } -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/FMDateTime.cs
r850 r1168 17 17 * 18 18 19 Mod s by Sam Habiel to use in Scheduling GUI.19 Modified by Sam Habiel to use in Scheduling GUI. Modified class licensed under LGPL. 20 20 */ 21 21 … … 250 250 } 251 251 252 public static string FMDate (this DateTime d) 253 { 254 return Create(d, FMDateTimePrecision.DateAndTime).FMDateString; 255 } 256 257 252 258 public static FMDateTime Parse (string str) 253 259 { -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/Printing.cs
r1131 r1168 156 156 X = e.MarginBounds.X, 157 157 Y = e.PageBounds.Y, 158 Height = e.MarginBounds.Y - e.PageBounds.Y ,158 Height = e.MarginBounds.Y - e.PageBounds.Y - 50, 159 159 Width = e.MarginBounds.Width 160 160 }; … … 553 553 /// </summary> 554 554 /// <param name="a">Appointment Data Structure</param> 555 /// <param name=" title">String to print for title</param>555 /// <param name="apptOrder">Order of Appointment</param> 556 556 /// <param name="e">etc</param> 557 557 public virtual void PrintRoutingSlip(CGAppointment appt, int apptOrder, PrintPageEventArgs e) … … 563 563 Rectangle headerArea = new Rectangle() 564 564 { 565 X = e.MarginBounds.X, 566 Y = e.PageBounds.Y, 567 Height = e.MarginBounds.Y - e.PageBounds.Y ,565 X = e.MarginBounds.X, 566 Y = e.PageBounds.Y, //0 567 Height = e.MarginBounds.Y - e.PageBounds.Y - 50, //100px - 50px 568 568 Width = e.MarginBounds.Width 569 569 }; … … 697 697 s = strings.ScratchArea; 698 698 g.DrawString(s, fGroupTitle, Brushes.Black, printArea, sf3); 699 699 700 /* Per Al-Najjar, we don't want the next appointment instructions section 700 701 // move down 701 702 printArea.Y += 240; … … 713 714 s = strings.NextAppointmentInstructions; 714 715 g.DrawString(s, fGroupTitle, Brushes.Black, printArea, sf3); 716 */ 715 717 716 718 // Draw Footer -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/RadiologyExam.cs
r1140 r1168 1 using System; 1 /* Licensed under LGPL */ 2 3 using System; 2 4 using System.Collections.Generic; 3 5 using System.Linq; … … 7 9 { 8 10 /// <summary> 9 /// TODO: Sam would like to document this later 11 /// Class to stand for a Radiology Exam Order from file 75.1 (RAD/NUC MED ORDERS) 12 /// IEN: IEN in file 75.1 13 /// Status: Text: Pending or Hold 14 /// Procedure: Text 15 /// RequestDate: Time procedure was requested by physician 10 16 /// </summary> 11 17 public class RadiologyExam -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/UserPreferences.cs
r1117 r1168 1 using System; 1 /*Licensed under LGPL*/ 2 3 using System; 2 4 using System.Collections.Generic; 3 5 using System.Linq; -
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/strings.ar.resx
r1131 r1168 197 197 </data> 198 198 <data name="RoutingSlip" xml:space="preserve"> 199 <value> قسيمة التوجيه</value>199 <value>بطاقة الزيارة</value> 200 200 </data> 201 201 <data name="ScratchArea" xml:space="preserve"> 202 <value>ملاح ضات زائدة</value>202 <value>ملاحظات زائدة</value> 203 203 </data> 204 204 </root>
Note:
See TracChangeset
for help on using the changeset viewer.