Ignore:
Timestamp:
May 5, 2011, 5:11:02 AM (13 years ago)
Author:
Sam Habiel
Message:

Lots of Documentation updates.
Absorption of all updates from trunk.
CGView: Changes in Appointment Menu; Handlers for these; Radiology Support
DRadExamSelect: Change in form design; auto print appointment slip implemented.

Location:
Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode

  • Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/CGView.cs

    r1166 r1168  
    9494                private System.Windows.Forms.MenuItem sepApptMenu2;
    9595                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;
    9898                private System.Windows.Forms.MenuItem mnuOpenMultipleSchedules;
    9999                private System.Windows.Forms.MenuItem mnuDisplayWalkIns;
    100100        private System.Windows.Forms.MenuItem mnuRPMSDivision;
    101         private MenuItem menuItem10;
     101        private MenuItem ctxCalGridSep3;
    102102        private MenuItem ctxCalGridReprintApptSlip;
    103103        private MenuItem ctxCalGridUndoCheckin;
     
    257257            this.lblResource = new System.Windows.Forms.Label();
    258258            this.panelCenter = new System.Windows.Forms.Panel();
    259             this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
    260259            this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu();
    261260            this.ctxCalGridAdd = new System.Windows.Forms.MenuItem();
     
    266265            this.ctxCalGridCheckIn = new System.Windows.Forms.MenuItem();
    267266            this.ctxCalGridUndoCheckin = new System.Windows.Forms.MenuItem();
    268             this.menuItem2 = new System.Windows.Forms.MenuItem();
     267            this.ctxCalGridSep1 = new System.Windows.Forms.MenuItem();
    269268            this.ctxCalGridNoShow = new System.Windows.Forms.MenuItem();
    270269            this.ctxCalGridNoShowUndo = new System.Windows.Forms.MenuItem();
    271             this.menuItem9 = new System.Windows.Forms.MenuItem();
     270            this.ctxCalGridSep2 = new System.Windows.Forms.MenuItem();
    272271            this.ctxCalGridWalkin = new System.Windows.Forms.MenuItem();
    273             this.menuItem10 = new System.Windows.Forms.MenuItem();
     272            this.ctxCalGridSep3 = new System.Windows.Forms.MenuItem();
    274273            this.ctxCalGridReprintApptSlip = new System.Windows.Forms.MenuItem();
    275274            this.panelBottom = new System.Windows.Forms.Panel();
     
    277276            this.splitter1 = new System.Windows.Forms.Splitter();
    278277            this.splitter2 = new System.Windows.Forms.Splitter();
     278            this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
    279279            this.panelRight.SuspendLayout();
    280280            this.panelClip.SuspendLayout();
     
    384384            //
    385385            this.mnuPrintReminderLetters.Index = 10;
    386             this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlI;
     386            this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
    387387            this.mnuPrintReminderLetters.Text = "Print Rem&inder Letters";
    388388            this.mnuPrintReminderLetters.Click += new System.EventHandler(this.mnuPrintReminderLetters_Click);
     
    462462            //
    463463            this.mnuMkRadAppt.Index = 2;
    464             this.mnuMkRadAppt.Shortcut = System.Windows.Forms.Shortcut.Ins;
     464            this.mnuMkRadAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlIns;
    465465            this.mnuMkRadAppt.Text = "Make Radiology Appointment";
     466            this.mnuMkRadAppt.Click += new System.EventHandler(this.mnuMkRadAppt_Click);
    466467            //
    467468            // mnuEditAppointment
     
    482483            //
    483484            this.mnuCancelRadAppt.Index = 5;
    484             this.mnuCancelRadAppt.Shortcut = System.Windows.Forms.Shortcut.Del;
     485            this.mnuCancelRadAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlDel;
    485486            this.mnuCancelRadAppt.Text = "Cancel Radiology Appointment";
     487            this.mnuCancelRadAppt.Click += new System.EventHandler(this.mnuCancelRadAppt_Click);
    486488            //
    487489            // sepApptMenu1
     
    493495            //
    494496            this.mnuNoShow.Index = 7;
     497            this.mnuNoShow.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
    495498            this.mnuNoShow.Text = "Mark as No Sho&w";
    496499            this.mnuNoShow.Click += new System.EventHandler(this.mnuNoShow_Click);
     
    499502            //
    500503            this.mnuNoShowUndo.Index = 8;
     504            this.mnuNoShowUndo.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftN;
    501505            this.mnuNoShowUndo.Text = "&Undo No Show";
    502506            this.mnuNoShowUndo.Click += new System.EventHandler(this.mnuNoShowUndo_Click);
     
    510514            //
    511515            this.mnuCheckIn.Index = 10;
     516            this.mnuCheckIn.Shortcut = System.Windows.Forms.Shortcut.CtrlI;
    512517            this.mnuCheckIn.Text = "Check &In Patient";
    513518            this.mnuCheckIn.Click += new System.EventHandler(this.mnuCheckIn_Click);
     
    516521            //
    517522            this.mnuUndoCheckin.Index = 11;
     523            this.mnuUndoCheckin.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftI;
    518524            this.mnuUndoCheckin.Text = "Undo Checkin";
     525            this.mnuUndoCheckin.Click += new System.EventHandler(this.mnuUndoCheckin_Click);
    519526            //
    520527            // sepApptMenu3
     
    527534            this.mnuFindAppt.Index = 13;
    528535            this.mnuFindAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlF;
    529             this.mnuFindAppt.Text = "&Find Available Appointment";
     536            this.mnuFindAppt.Text = "&Find Empty Slots";
    530537            this.mnuFindAppt.Click += new System.EventHandler(this.mnuFindAppt_Click);
    531538            //
     
    533540            //
    534541            this.mnuCopyAppointment.Index = 14;
     542            this.mnuCopyAppointment.Shortcut = System.Windows.Forms.Shortcut.CtrlC;
    535543            this.mnuCopyAppointment.Text = "&Copy  Appointment to Clipboard";
    536544            this.mnuCopyAppointment.Click += new System.EventHandler(this.mnuCopyAppointment_Click);
     
    539547            //
    540548            this.mnuViewPatientAppts.Index = 15;
     549            this.mnuViewPatientAppts.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftZ;
    541550            this.mnuViewPatientAppts.Text = "&View Patient Appointments";
    542551            this.mnuViewPatientAppts.Click += new System.EventHandler(this.mnuViewPatientAppts_Click);
     
    545554            //
    546555            this.mnuReprintApptSlip.Index = 16;
     556            this.mnuReprintApptSlip.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftP;
    547557            this.mnuReprintApptSlip.Text = "Reprint Appointment Slip";
     558            this.mnuReprintApptSlip.Click += new System.EventHandler(this.mnuReprintApptSlip_Click);
    548559            //
    549560            // mnuCalendar
     
    701712            this.tvSchedules.Location = new System.Drawing.Point(0, 0);
    702713            this.tvSchedules.Name = "tvSchedules";
    703             this.tvSchedules.Size = new System.Drawing.Size(128, 396);
     714            this.tvSchedules.Size = new System.Drawing.Size(128, 392);
    704715            this.tvSchedules.Sorted = true;
    705716            this.tvSchedules.TabIndex = 1;
     
    743754            //
    744755            this.ctxFindAppt.Index = 3;
    745             this.ctxFindAppt.Text = "&Find Available Appointment";
     756            this.ctxFindAppt.Text = "&Find Empty Slots";
    746757            this.ctxFindAppt.Click += new System.EventHandler(this.ctxFindAppt_Click);
    747758            //
     
    770781            this.panelRight.Location = new System.Drawing.Point(996, 0);
    771782            this.panelRight.Name = "panelRight";
    772             this.panelRight.Size = new System.Drawing.Size(128, 396);
     783            this.panelRight.Size = new System.Drawing.Size(128, 392);
    773784            this.panelRight.TabIndex = 3;
    774785            this.panelRight.Visible = false;
     
    866877            this.panelCenter.Location = new System.Drawing.Point(136, 24);
    867878            this.panelCenter.Name = "panelCenter";
    868             this.panelCenter.Size = new System.Drawing.Size(857, 348);
     879            this.panelCenter.Size = new System.Drawing.Size(857, 344);
    869880            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;
    8701016            //
    8711017            // calendarGrid1
     
    8881034            this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources")));
    8891035            this.calendarGrid1.SelectedAppointment = 0;
    890             this.calendarGrid1.Size = new System.Drawing.Size(857, 348);
     1036            this.calendarGrid1.Size = new System.Drawing.Size(857, 344);
    8911037            this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0);
    8921038            this.calendarGrid1.TabIndex = 0;
     
    8981044            this.calendarGrid1.MouseEnter += new System.EventHandler(this.calendarGrid1_MouseEnter);
    8991045            //
    900             // ctxCalendarGrid
    901             //
    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             // ctxCalGridAdd
    920             //
    921             this.ctxCalGridAdd.Index = 0;
    922             this.ctxCalGridAdd.Text = "Add Appointment";
    923             this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
    924             //
    925             // ctxCalGridMkRadAppt
    926             //
    927             this.ctxCalGridMkRadAppt.Index = 1;
    928             this.ctxCalGridMkRadAppt.Text = "Make Radiology Appointment";
    929             this.ctxCalGridMkRadAppt.Click += new System.EventHandler(this.ctxCalGridMkRadAppt_Click);
    930             //
    931             // ctxCalGridEdit
    932             //
    933             this.ctxCalGridEdit.Index = 2;
    934             this.ctxCalGridEdit.Text = "Edit Appointment";
    935             this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
    936             //
    937             // ctxCalGridDelete
    938             //
    939             this.ctxCalGridDelete.Index = 3;
    940             this.ctxCalGridDelete.Text = "Cancel Appointment";
    941             this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
    942             //
    943             // ctxCalGridCancelRadAppt
    944             //
    945             this.ctxCalGridCancelRadAppt.Index = 4;
    946             this.ctxCalGridCancelRadAppt.Text = "Cancel Radiology Appointment";
    947             this.ctxCalGridCancelRadAppt.Click += new System.EventHandler(this.ctxCalGridCancelRadAppt_Click);
    948             //
    949             // ctxCalGridCheckIn
    950             //
    951             this.ctxCalGridCheckIn.Index = 5;
    952             this.ctxCalGridCheckIn.Text = "Check In Patient";
    953             this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
    954             //
    955             // ctxCalGridUndoCheckin
    956             //
    957             this.ctxCalGridUndoCheckin.Index = 6;
    958             this.ctxCalGridUndoCheckin.Text = "&Undo Check In";
    959             this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click);
    960             //
    961             // menuItem2
    962             //
    963             this.menuItem2.Index = 7;
    964             this.menuItem2.Text = "-";
    965             //
    966             // ctxCalGridNoShow
    967             //
    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             // ctxCalGridNoShowUndo
    973             //
    974             this.ctxCalGridNoShowUndo.Index = 9;
    975             this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
    976             this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
    977             //
    978             // menuItem9
    979             //
    980             this.menuItem9.Index = 10;
    981             this.menuItem9.Text = "-";
    982             //
    983             // ctxCalGridWalkin
    984             //
    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             // menuItem10
    990             //
    991             this.menuItem10.Index = 12;
    992             this.menuItem10.Text = "-";
    993             //
    994             // ctxCalGridReprintApptSlip
    995             //
    996             this.ctxCalGridReprintApptSlip.Index = 13;
    997             this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip";
    998             this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click);
    999             //
    1000             // panelBottom
    1001             //
    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             // statusBar1
    1010             //
    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             // splitter1
    1019             //
    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             // splitter2
    1027             //
    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             //
    10351046            // CGView
    10361047            //
    10371048            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    1038             this.ClientSize = new System.Drawing.Size(1124, 396);
     1049            this.ClientSize = new System.Drawing.Size(1124, 392);
    10391050            this.Controls.Add(this.panelCenter);
    10401051            this.Controls.Add(this.panelBottom);
     
    12381249        }
    12391250
     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
    12401276                #endregion AppointmentMenu Handlers
    12411277
     
    13781414                ctxCalGridWalkin.Visible = false;
    13791415                ctxCalGridUndoCheckin.Visible = false;
     1416                ctxCalGridSep1.Visible = false;
     1417                ctxCalGridSep2.Visible = false;
    13801418
    13811419                ctxCalGridMkRadAppt.Visible = true;
     
    13951433                ctxCalGridWalkin.Visible = true;
    13961434                ctxCalGridUndoCheckin.Visible = true;
     1435                ctxCalGridSep1.Visible = true;
     1436                ctxCalGridSep2.Visible = true;
    13971437
    13981438                ctxCalGridMkRadAppt.Visible = false;
     
    14641504        }
    14651505
    1466         //new code smh
    14671506        private void ctxCalGridReprintApptSlip_Click(object sender, EventArgs e)
    14681507        {
     
    14741513            PrintAppointmentSlip(a);
    14751514        }
    1476         //end new code
    14771515
    14781516                #endregion ctxCalGridMenu Handlers
     
    14801518                #region Methods
    14811519
     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>
    14821524        private bool IsThisARadiologyResource()
    14831525        {
    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
    14851529            //If no cell is selected AND no appointment is selected, then it's false
    14861530            if (this.calendarGrid1.SelectedRange.Cells.CellCount < 1 && this.calendarGrid1.SelectedAppointment < 1)
     
    14911535            {
    14921536                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
    14941539                else return false;
    14951540
    14961541            }
    14971542
    1498             //Otherwise, we are forsure dealing with a cell.
     1543            //Otherwise, we are for sure dealing with a cell.
    14991544            //We need to determine if the cell resource is mapped to a Radiology Hospital Location.
    15001545            DateTime dStart;
     
    15121557
    15131558            // 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)
    15161569                       join res in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable()
    15171570                       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
    15181572                       where res.Field<string>("RESOURCE_NAME") == sResource
     1573                       //if we have any row left, then it is true.
    15191574                       select hl).Any();
    15201575        }
    1521        
     1576
    15221577        private bool EditAppointmentEnabled()
    15231578        {
     
    19802035                                this.Document.EditAppointment(a, sNote);
    19812036
     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);
    19822047                        }
    19832048                        catch (Exception ex)
     
    21302195                }
    21312196
     2197        /// <summary>
     2198        /// Delete one Radiology Appointment
     2199        /// </summary>
    21322200        private void AppointmentDeleteOneRadiology()
    21332201        {
     
    21372205
    21382206            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;
    21392210
    21402211            //Cancel Radiology Exam
     
    21712242                if (a.CheckInTime.Ticks > 0)
    21722243                {
    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.");
    21742245                    return;
    21752246                }
     
    21832254                return;
    21842255            }
     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;
    21852261
    21862262            bool bClinic = dCancel.ClinicCancelled;
     
    25492625                }
    25502626
     2627        /// <summary>
     2628        /// Add a new Radiology Appointment to VISTA (ÒÝÊì as my mom calls it)
     2629        /// </summary>
    25512630        private void AppointmentAddNewRadiology()
    25522631        {
    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
    25562635
    25572636            this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource);
    25582637            this.calendarGrid1.GetSelectedType(out nAccessTypeID);
     2638
     2639            Debug.Assert(sResource != null);
     2640            Debug.Assert(dStart > DateTime.MinValue);
     2641
    25592642            //Display a dialog to collect Patient Name
    25602643            DPatientLookup dPat = new DPatientLookup();
     
    25672650
    25682651            int DFN = Int32.Parse(dPat.PatientIEN);
     2652            // Hospital Location IEN
    25692653            int hlIEN = (from resource in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable()
    25702654                         where resource.Field<string>("RESOURCE_NAME") == sResource
    25712655                         select resource.Field<int>("HOSPITAL_LOCATION_ID")).FirstOrDefault();
    25722656
     2657            //Get Radiology Exams from the DB
    25732658            List<RadiologyExam> _radExams = CGDocumentManager.Current.DAL.GetRadiologyExamsForPatientinHL(DFN, hlIEN);
    25742659
     2660            //If none found...
    25752661            if (!_radExams.Any())
    25762662            {
     
    25792665            }
    25802666
     2667            //Display a form for the user to select radiology exams.
    25812668            DRadExamsSelect _radform = new DRadExamsSelect(_radExams);
    25822669
    25832670            if (_radform.ShowDialog() == DialogResult.Cancel) return;
    25842671
     2672            //Get some return values
    25852673            int _examien = _radform.ExamIEN;
    25862674            string _procedurename = _radform.ProcedureName;
    25872675
    2588             CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien);
     2676            //Save Radiology Exam Schedule Info to Radiology Package
     2677            CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien, dStart);
    25892678
    25902679            //Now create and save the appointment
     
    25962685            appt.AccessTypeID = nAccessTypeID;
    25972686            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
    25982696            this.Document.CreateAppointment(appt);
     2697
     2698            //Print Appointment Slip if requested
     2699            if (_radform.PrintAppointmentSlip) this.PrintAppointmentSlip(appt);
    25992700
    26002701            //Now redraw the grid to display the new appointments
     
    29193020                        this.calendarGrid1.Columns = 5;
    29203021            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?
    29233022            RequestRefreshGrid();
    29243023                }
     
    29283027                        this.calendarGrid1.Columns = 7;
    29293028            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?
    29313029            RequestRefreshGrid();
    29323030        }
     
    31223220                {
    31233221                    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");
    31243230                    return;
    31253231                }
     
    31963302                appt.HealthRecordNumber = e.Appointment.HealthRecordNumber;
    31973303                appt.AccessTypeID = e.AccessTypeID;
     3304                appt.Patient = e.Appointment.Patient;
     3305
    31983306                this.Document.CreateAppointment(appt);
    31993307
     
    37513859        }
    37523860
    3753         LoadingSplash _loadingSplash; // Splash object a data point in class
     3861        //private delegate DialogResult dLoadingSplash(IWin32Window owner);
     3862        string _tempStatusBartext;
    37543863
    37553864        /// <summary>
    3756         /// Loads a splash that says "Loading"
     3865        /// Loads a splash that says "Loading" -- removed it april 13 2010
    37573866        /// </summary>
    37583867        private void LoadSplash()
    37593868        {
    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();
    37673884        }
    37683885
    37693886        private void StopSplash()
    37703887        {
    3771             _loadingSplash.RemoteClose();
     3888            this.statusBar1.Text = _tempStatusBartext;
    37723889        }
    37733890
     
    37873904        }
    37883905
     3906
    37893907    }//End class
    37903908}
Note: See TracChangeset for help on using the changeset viewer.