Ignore:
Timestamp:
May 8, 2011, 5:17:53 AM (13 years ago)
Author:
Sam Habiel
Message:

Absorbed all changed from Radiology Support branch.
Patient and Provider classes now serializable to address new bug: Availablity slots cannot be saved b/c these classes are not serializable.

Location:
Scheduling/trunk/cs/bsdx0200GUISourceCode
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode

    • Property svn:mergeinfo set to (toggle deleted branches)
      /Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode1134-1171
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs

    r1159 r1174  
    11using System;
    22using System.Collections;
     3using System.Collections.Generic;
    34using System.ComponentModel;
    45using System.Windows.Forms;
     
    4849                private System.Windows.Forms.Panel panelBottom;
    4950                private System.Windows.Forms.Label lblResource;
    50                 private System.Windows.Forms.ContextMenu contextMenu1;
     51                private System.Windows.Forms.ContextMenu ctxResourceTree;
    5152                private System.Windows.Forms.MenuItem ctxOpenSchedule;
    5253                private System.Windows.Forms.MenuItem ctxEditAvailability;
     
    9091                private System.Windows.Forms.MenuItem mnuPrintCancellationLetters;
    9192                private System.Windows.Forms.MenuItem mnuWalkIn;
    92                 private System.Windows.Forms.MenuItem menuItem5;
    93                 private System.Windows.Forms.MenuItem menuItem8;
     93                private System.Windows.Forms.MenuItem sepApptMenu1;
     94                private System.Windows.Forms.MenuItem sepApptMenu2;
    9495                private System.Windows.Forms.MenuItem ctxCalGridWalkin;
    95                 private System.Windows.Forms.MenuItem menuItem2;
    96                 private System.Windows.Forms.MenuItem menuItem9;
     96                private System.Windows.Forms.MenuItem ctxCalGridSep1;
     97                private System.Windows.Forms.MenuItem ctxCalGridSep2;
    9798                private System.Windows.Forms.MenuItem mnuOpenMultipleSchedules;
    9899                private System.Windows.Forms.MenuItem mnuDisplayWalkIns;
    99100        private System.Windows.Forms.MenuItem mnuRPMSDivision;
    100         private MenuItem menuItem10;
     101        private MenuItem ctxCalGridSep3;
    101102        private MenuItem ctxCalGridReprintApptSlip;
    102103        private MenuItem ctxCalGridUndoCheckin;
     
    106107        private MenuItem menuItem12;
    107108        private MenuItem mnuRefresh;
     109        private MenuItem ctxCalGridMkRadAppt;
     110        private MenuItem ctxCalGridCancelRadAppt;
     111        private MenuItem mnuMkRadAppt;
     112        private MenuItem mnuCancelRadAppt;
     113        private MenuItem mnuUndoCheckin;
     114        private MenuItem sepApptMenu3;
     115        private MenuItem mnuReprintApptSlip;
    108116        private IContainer components;
    109117
     
    194202            this.mnuAppointment = new System.Windows.Forms.MenuItem();
    195203            this.mnuNewAppointment = new System.Windows.Forms.MenuItem();
     204            this.mnuWalkIn = new System.Windows.Forms.MenuItem();
     205            this.mnuMkRadAppt = new System.Windows.Forms.MenuItem();
    196206            this.mnuEditAppointment = new System.Windows.Forms.MenuItem();
    197207            this.mnuDeleteAppointment = new System.Windows.Forms.MenuItem();
    198             this.menuItem5 = new System.Windows.Forms.MenuItem();
     208            this.mnuCancelRadAppt = new System.Windows.Forms.MenuItem();
     209            this.sepApptMenu1 = new System.Windows.Forms.MenuItem();
    199210            this.mnuNoShow = new System.Windows.Forms.MenuItem();
    200211            this.mnuNoShowUndo = new System.Windows.Forms.MenuItem();
    201             this.menuItem8 = new System.Windows.Forms.MenuItem();
     212            this.sepApptMenu2 = new System.Windows.Forms.MenuItem();
     213            this.mnuCheckIn = new System.Windows.Forms.MenuItem();
     214            this.mnuUndoCheckin = new System.Windows.Forms.MenuItem();
     215            this.sepApptMenu3 = new System.Windows.Forms.MenuItem();
     216            this.mnuFindAppt = new System.Windows.Forms.MenuItem();
    202217            this.mnuCopyAppointment = new System.Windows.Forms.MenuItem();
    203             this.mnuWalkIn = new System.Windows.Forms.MenuItem();
    204             this.mnuFindAppt = new System.Windows.Forms.MenuItem();
    205             this.mnuCheckIn = new System.Windows.Forms.MenuItem();
    206218            this.mnuViewPatientAppts = new System.Windows.Forms.MenuItem();
     219            this.mnuReprintApptSlip = new System.Windows.Forms.MenuItem();
    207220            this.mnuCalendar = new System.Windows.Forms.MenuItem();
    208221            this.mnuDisplayWalkIns = new System.Windows.Forms.MenuItem();
     
    225238            this.mnuTest1 = new System.Windows.Forms.MenuItem();
    226239            this.tvSchedules = new System.Windows.Forms.TreeView();
    227             this.contextMenu1 = new System.Windows.Forms.ContextMenu();
     240            this.ctxResourceTree = new System.Windows.Forms.ContextMenu();
    228241            this.ctxOpenSchedule = new System.Windows.Forms.MenuItem();
    229242            this.ctxEditAvailability = new System.Windows.Forms.MenuItem();
     
    246259            this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu();
    247260            this.ctxCalGridAdd = new System.Windows.Forms.MenuItem();
     261            this.ctxCalGridMkRadAppt = new System.Windows.Forms.MenuItem();
    248262            this.ctxCalGridEdit = new System.Windows.Forms.MenuItem();
    249263            this.ctxCalGridDelete = new System.Windows.Forms.MenuItem();
     264            this.ctxCalGridCancelRadAppt = new System.Windows.Forms.MenuItem();
    250265            this.ctxCalGridCheckIn = new System.Windows.Forms.MenuItem();
    251266            this.ctxCalGridUndoCheckin = new System.Windows.Forms.MenuItem();
    252             this.menuItem2 = new System.Windows.Forms.MenuItem();
     267            this.ctxCalGridSep1 = new System.Windows.Forms.MenuItem();
    253268            this.ctxCalGridNoShow = new System.Windows.Forms.MenuItem();
    254269            this.ctxCalGridNoShowUndo = new System.Windows.Forms.MenuItem();
    255             this.menuItem9 = new System.Windows.Forms.MenuItem();
     270            this.ctxCalGridSep2 = new System.Windows.Forms.MenuItem();
    256271            this.ctxCalGridWalkin = new System.Windows.Forms.MenuItem();
    257             this.menuItem10 = new System.Windows.Forms.MenuItem();
     272            this.ctxCalGridSep3 = new System.Windows.Forms.MenuItem();
    258273            this.ctxCalGridReprintApptSlip = new System.Windows.Forms.MenuItem();
    259274            this.panelBottom = new System.Windows.Forms.Panel();
     
    369384            //
    370385            this.mnuPrintReminderLetters.Index = 10;
    371             this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlI;
     386            this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
    372387            this.mnuPrintReminderLetters.Text = "Print Rem&inder Letters";
    373388            this.mnuPrintReminderLetters.Click += new System.EventHandler(this.mnuPrintReminderLetters_Click);
     
    411426            this.mnuAppointment.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    412427            this.mnuNewAppointment,
     428            this.mnuWalkIn,
     429            this.mnuMkRadAppt,
    413430            this.mnuEditAppointment,
    414431            this.mnuDeleteAppointment,
    415             this.menuItem5,
     432            this.mnuCancelRadAppt,
     433            this.sepApptMenu1,
    416434            this.mnuNoShow,
    417435            this.mnuNoShowUndo,
    418             this.menuItem8,
     436            this.sepApptMenu2,
     437            this.mnuCheckIn,
     438            this.mnuUndoCheckin,
     439            this.sepApptMenu3,
     440            this.mnuFindAppt,
    419441            this.mnuCopyAppointment,
    420             this.mnuWalkIn,
    421             this.mnuFindAppt,
    422             this.mnuCheckIn,
    423             this.mnuViewPatientAppts});
     442            this.mnuViewPatientAppts,
     443            this.mnuReprintApptSlip});
    424444            this.mnuAppointment.Text = "&Appointment";
    425445            this.mnuAppointment.Popup += new System.EventHandler(this.mnuAppointment_Popup);
     
    432452            this.mnuNewAppointment.Click += new System.EventHandler(this.mnuNewAppointment_Click);
    433453            //
     454            // mnuWalkIn
     455            //
     456            this.mnuWalkIn.Index = 1;
     457            this.mnuWalkIn.Shortcut = System.Windows.Forms.Shortcut.ShiftIns;
     458            this.mnuWalkIn.Text = "Create Wal&k-In Appointment";
     459            this.mnuWalkIn.Click += new System.EventHandler(this.mnuWalkIn_Click);
     460            //
     461            // mnuMkRadAppt
     462            //
     463            this.mnuMkRadAppt.Index = 2;
     464            this.mnuMkRadAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlIns;
     465            this.mnuMkRadAppt.Text = "Make Radiology Appointment";
     466            this.mnuMkRadAppt.Click += new System.EventHandler(this.mnuMkRadAppt_Click);
     467            //
    434468            // mnuEditAppointment
    435469            //
    436             this.mnuEditAppointment.Index = 1;
     470            this.mnuEditAppointment.Index = 3;
    437471            this.mnuEditAppointment.Shortcut = System.Windows.Forms.Shortcut.F2;
    438472            this.mnuEditAppointment.Text = "&Edit Appointment";
     
    441475            // mnuDeleteAppointment
    442476            //
    443             this.mnuDeleteAppointment.Index = 2;
     477            this.mnuDeleteAppointment.Index = 4;
    444478            this.mnuDeleteAppointment.Shortcut = System.Windows.Forms.Shortcut.Del;
    445479            this.mnuDeleteAppointment.Text = "Cance&l Appointment";
    446480            this.mnuDeleteAppointment.Click += new System.EventHandler(this.mnuDeleteAppointment_Click);
    447481            //
    448             // menuItem5
    449             //
    450             this.menuItem5.Index = 3;
    451             this.menuItem5.Text = "-";
     482            // mnuCancelRadAppt
     483            //
     484            this.mnuCancelRadAppt.Index = 5;
     485            this.mnuCancelRadAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlDel;
     486            this.mnuCancelRadAppt.Text = "Cancel Radiology Appointment";
     487            this.mnuCancelRadAppt.Click += new System.EventHandler(this.mnuCancelRadAppt_Click);
     488            //
     489            // sepApptMenu1
     490            //
     491            this.sepApptMenu1.Index = 6;
     492            this.sepApptMenu1.Text = "-";
    452493            //
    453494            // mnuNoShow
    454495            //
    455             this.mnuNoShow.Index = 4;
     496            this.mnuNoShow.Index = 7;
     497            this.mnuNoShow.Shortcut = System.Windows.Forms.Shortcut.CtrlN;
    456498            this.mnuNoShow.Text = "Mark as No Sho&w";
    457499            this.mnuNoShow.Click += new System.EventHandler(this.mnuNoShow_Click);
     
    459501            // mnuNoShowUndo
    460502            //
    461             this.mnuNoShowUndo.Index = 5;
     503            this.mnuNoShowUndo.Index = 8;
     504            this.mnuNoShowUndo.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftN;
    462505            this.mnuNoShowUndo.Text = "&Undo No Show";
    463506            this.mnuNoShowUndo.Click += new System.EventHandler(this.mnuNoShowUndo_Click);
    464507            //
    465             // menuItem8
    466             //
    467             this.menuItem8.Index = 6;
    468             this.menuItem8.Text = "-";
    469             //
    470             // mnuCopyAppointment
    471             //
    472             this.mnuCopyAppointment.Index = 7;
    473             this.mnuCopyAppointment.Text = "&Copy  Appointment to Clipboard";
    474             this.mnuCopyAppointment.Click += new System.EventHandler(this.mnuCopyAppointment_Click);
    475             //
    476             // mnuWalkIn
    477             //
    478             this.mnuWalkIn.Index = 8;
    479             this.mnuWalkIn.Text = "Create Wal&k-In Appointment";
    480             this.mnuWalkIn.Click += new System.EventHandler(this.mnuWalkIn_Click);
     508            // sepApptMenu2
     509            //
     510            this.sepApptMenu2.Index = 9;
     511            this.sepApptMenu2.Text = "-";
     512            //
     513            // mnuCheckIn
     514            //
     515            this.mnuCheckIn.Index = 10;
     516            this.mnuCheckIn.Shortcut = System.Windows.Forms.Shortcut.CtrlI;
     517            this.mnuCheckIn.Text = "Check &In Patient";
     518            this.mnuCheckIn.Click += new System.EventHandler(this.mnuCheckIn_Click);
     519            //
     520            // mnuUndoCheckin
     521            //
     522            this.mnuUndoCheckin.Index = 11;
     523            this.mnuUndoCheckin.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftI;
     524            this.mnuUndoCheckin.Text = "Undo Checkin";
     525            this.mnuUndoCheckin.Click += new System.EventHandler(this.mnuUndoCheckin_Click);
     526            //
     527            // sepApptMenu3
     528            //
     529            this.sepApptMenu3.Index = 12;
     530            this.sepApptMenu3.Text = "-";
    481531            //
    482532            // mnuFindAppt
    483533            //
    484             this.mnuFindAppt.Index = 9;
     534            this.mnuFindAppt.Index = 13;
    485535            this.mnuFindAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlF;
    486536            this.mnuFindAppt.Text = "&Find Empty Slots";
    487537            this.mnuFindAppt.Click += new System.EventHandler(this.mnuFindAppt_Click);
    488538            //
    489             // mnuCheckIn
    490             //
    491             this.mnuCheckIn.Index = 10;
    492             this.mnuCheckIn.Text = "Check &In Patient";
    493             this.mnuCheckIn.Click += new System.EventHandler(this.mnuCheckIn_Click);
     539            // mnuCopyAppointment
     540            //
     541            this.mnuCopyAppointment.Index = 14;
     542            this.mnuCopyAppointment.Shortcut = System.Windows.Forms.Shortcut.CtrlC;
     543            this.mnuCopyAppointment.Text = "&Copy  Appointment to Clipboard";
     544            this.mnuCopyAppointment.Click += new System.EventHandler(this.mnuCopyAppointment_Click);
    494545            //
    495546            // mnuViewPatientAppts
    496547            //
    497             this.mnuViewPatientAppts.Index = 11;
     548            this.mnuViewPatientAppts.Index = 15;
     549            this.mnuViewPatientAppts.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftZ;
    498550            this.mnuViewPatientAppts.Text = "&View Patient Appointments";
    499551            this.mnuViewPatientAppts.Click += new System.EventHandler(this.mnuViewPatientAppts_Click);
     552            //
     553            // mnuReprintApptSlip
     554            //
     555            this.mnuReprintApptSlip.Index = 16;
     556            this.mnuReprintApptSlip.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftP;
     557            this.mnuReprintApptSlip.Text = "Reprint Appointment Slip";
     558            this.mnuReprintApptSlip.Click += new System.EventHandler(this.mnuReprintApptSlip_Click);
    500559            //
    501560            // mnuCalendar
     
    519578            this.mnuDisplayWalkIns.Checked = true;
    520579            this.mnuDisplayWalkIns.Index = 0;
     580            this.mnuDisplayWalkIns.Shortcut = System.Windows.Forms.Shortcut.F12;
    521581            this.mnuDisplayWalkIns.Text = "&Display Walk-Ins";
    522582            this.mnuDisplayWalkIns.Click += new System.EventHandler(this.mnuDisplayWalkIns_Click);
     
    592652            // mnuViewScheduleTree
    593653            //
     654            this.mnuViewScheduleTree.Checked = true;
    594655            this.mnuViewScheduleTree.Index = 6;
     656            this.mnuViewScheduleTree.Shortcut = System.Windows.Forms.Shortcut.F4;
    595657            this.mnuViewScheduleTree.Text = "&Schedule Tree";
    596658            this.mnuViewScheduleTree.Click += new System.EventHandler(this.mnuViewScheduleTree_Click);
     
    645707            //
    646708            this.tvSchedules.BackColor = System.Drawing.SystemColors.ControlLight;
    647             this.tvSchedules.ContextMenu = this.contextMenu1;
     709            this.tvSchedules.ContextMenu = this.ctxResourceTree;
    648710            this.tvSchedules.Dock = System.Windows.Forms.DockStyle.Left;
    649711            this.tvSchedules.HotTracking = true;
    650712            this.tvSchedules.Location = new System.Drawing.Point(0, 0);
    651713            this.tvSchedules.Name = "tvSchedules";
    652             this.tvSchedules.Size = new System.Drawing.Size(128, 317);
     714            this.tvSchedules.Size = new System.Drawing.Size(128, 392);
    653715            this.tvSchedules.Sorted = true;
    654716            this.tvSchedules.TabIndex = 1;
     
    658720            this.tvSchedules.MouseEnter += new System.EventHandler(this.tvSchedules_MouseEnter);
    659721            //
    660             // contextMenu1
    661             //
    662             this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     722            // ctxResourceTree
     723            //
     724            this.ctxResourceTree.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    663725            this.ctxOpenSchedule,
    664726            this.ctxEditAvailability,
     
    668730            this.ctxPrintScheduleT1,
    669731            this.ctxPrintScheduleT3});
    670             this.contextMenu1.Popup += new System.EventHandler(this.contextMenu1_Popup);
     732            this.ctxResourceTree.Popup += new System.EventHandler(this.contextMenu1_Popup);
    671733            //
    672734            // ctxOpenSchedule
     
    719781            this.panelRight.Location = new System.Drawing.Point(996, 0);
    720782            this.panelRight.Name = "panelRight";
    721             this.panelRight.Size = new System.Drawing.Size(128, 317);
     783            this.panelRight.Size = new System.Drawing.Size(128, 392);
    722784            this.panelRight.TabIndex = 3;
    723785            this.panelRight.Visible = false;
     
    815877            this.panelCenter.Location = new System.Drawing.Point(136, 24);
    816878            this.panelCenter.Name = "panelCenter";
    817             this.panelCenter.Size = new System.Drawing.Size(857, 269);
     879            this.panelCenter.Size = new System.Drawing.Size(857, 344);
    818880            this.panelCenter.TabIndex = 7;
    819881            //
     
    822884            this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    823885            this.ctxCalGridAdd,
     886            this.ctxCalGridMkRadAppt,
    824887            this.ctxCalGridEdit,
    825888            this.ctxCalGridDelete,
     889            this.ctxCalGridCancelRadAppt,
    826890            this.ctxCalGridCheckIn,
    827891            this.ctxCalGridUndoCheckin,
    828             this.menuItem2,
     892            this.ctxCalGridSep1,
    829893            this.ctxCalGridNoShow,
    830894            this.ctxCalGridNoShowUndo,
    831             this.menuItem9,
     895            this.ctxCalGridSep2,
    832896            this.ctxCalGridWalkin,
    833             this.menuItem10,
     897            this.ctxCalGridSep3,
    834898            this.ctxCalGridReprintApptSlip});
    835899            this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
     
    841905            this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
    842906            //
     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            //
    843913            // ctxCalGridEdit
    844914            //
    845             this.ctxCalGridEdit.Index = 1;
     915            this.ctxCalGridEdit.Index = 2;
    846916            this.ctxCalGridEdit.Text = "Edit Appointment";
    847917            this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
     
    849919            // ctxCalGridDelete
    850920            //
    851             this.ctxCalGridDelete.Index = 2;
     921            this.ctxCalGridDelete.Index = 3;
    852922            this.ctxCalGridDelete.Text = "Cancel Appointment";
    853923            this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
    854924            //
     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            //
    855931            // ctxCalGridCheckIn
    856932            //
    857             this.ctxCalGridCheckIn.Index = 3;
     933            this.ctxCalGridCheckIn.Index = 5;
    858934            this.ctxCalGridCheckIn.Text = "Check In Patient";
    859935            this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
     
    861937            // ctxCalGridUndoCheckin
    862938            //
    863             this.ctxCalGridUndoCheckin.Index = 4;
     939            this.ctxCalGridUndoCheckin.Index = 6;
    864940            this.ctxCalGridUndoCheckin.Text = "&Undo Check In";
    865941            this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click);
    866942            //
    867             // menuItem2
    868             //
    869             this.menuItem2.Index = 5;
    870             this.menuItem2.Text = "-";
     943            // ctxCalGridSep1
     944            //
     945            this.ctxCalGridSep1.Index = 7;
     946            this.ctxCalGridSep1.Text = "-";
    871947            //
    872948            // ctxCalGridNoShow
    873949            //
    874             this.ctxCalGridNoShow.Index = 6;
     950            this.ctxCalGridNoShow.Index = 8;
    875951            this.ctxCalGridNoShow.Text = "Mark as No Show";
    876952            this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);
     
    878954            // ctxCalGridNoShowUndo
    879955            //
    880             this.ctxCalGridNoShowUndo.Index = 7;
     956            this.ctxCalGridNoShowUndo.Index = 9;
    881957            this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
    882958            this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
    883959            //
    884             // menuItem9
    885             //
    886             this.menuItem9.Index = 8;
    887             this.menuItem9.Text = "-";
     960            // ctxCalGridSep2
     961            //
     962            this.ctxCalGridSep2.Index = 10;
     963            this.ctxCalGridSep2.Text = "-";
    888964            //
    889965            // ctxCalGridWalkin
    890966            //
    891             this.ctxCalGridWalkin.Index = 9;
     967            this.ctxCalGridWalkin.Index = 11;
    892968            this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";
    893969            this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);
    894970            //
    895             // menuItem10
    896             //
    897             this.menuItem10.Index = 10;
    898             this.menuItem10.Text = "-";
     971            // ctxCalGridSep3
     972            //
     973            this.ctxCalGridSep3.Index = 12;
     974            this.ctxCalGridSep3.Text = "-";
    899975            //
    900976            // ctxCalGridReprintApptSlip
    901977            //
    902             this.ctxCalGridReprintApptSlip.Index = 11;
     978            this.ctxCalGridReprintApptSlip.Index = 13;
    903979            this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip";
    904980            this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click);
     
    908984            this.panelBottom.Controls.Add(this.statusBar1);
    909985            this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
    910             this.panelBottom.Location = new System.Drawing.Point(136, 293);
     986            this.panelBottom.Location = new System.Drawing.Point(136, 368);
    911987            this.panelBottom.Name = "panelBottom";
    912988            this.panelBottom.Size = new System.Drawing.Size(857, 24);
     
    9261002            this.splitter1.Location = new System.Drawing.Point(128, 24);
    9271003            this.splitter1.Name = "splitter1";
    928             this.splitter1.Size = new System.Drawing.Size(8, 293);
     1004            this.splitter1.Size = new System.Drawing.Size(8, 368);
    9291005            this.splitter1.TabIndex = 9;
    9301006            this.splitter1.TabStop = false;
     
    9351011            this.splitter2.Location = new System.Drawing.Point(993, 24);
    9361012            this.splitter2.Name = "splitter2";
    937             this.splitter2.Size = new System.Drawing.Size(3, 293);
     1013            this.splitter2.Size = new System.Drawing.Size(3, 368);
    9381014            this.splitter2.TabIndex = 10;
    9391015            this.splitter2.TabStop = false;
     
    9581034            this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources")));
    9591035            this.calendarGrid1.SelectedAppointment = 0;
    960             this.calendarGrid1.Size = new System.Drawing.Size(857, 269);
     1036            this.calendarGrid1.Size = new System.Drawing.Size(857, 344);
    9611037            this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0);
    9621038            this.calendarGrid1.TabIndex = 0;
     
    9711047            //
    9721048            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    973             this.ClientSize = new System.Drawing.Size(1124, 317);
     1049            this.ClientSize = new System.Drawing.Size(1124, 392);
    9741050            this.Controls.Add(this.panelCenter);
    9751051            this.Controls.Add(this.panelBottom);
     
    10821158                #endregion
    10831159
    1084 
    10851160                #region AppointmentMenu Handlers
    10861161
    10871162                private void mnuAppointment_Popup(object sender, System.EventArgs e)
    10881163                {
    1089                         bool bEnabled = (this.Document.Resources.Count > 0)? true : false ;
    1090                         this.mnuFindAppt.Enabled = bEnabled;
    1091 
    1092                         //Toggle availability of make, edit, checkin and delete appointments
    1093                         //based on whether a range is selected.
    1094 
    1095                         mnuNewAppointment.Enabled = AddAppointmentEnabled();
    1096                         this.mnuWalkIn.Enabled = mnuNewAppointment.Enabled;
    1097                         bool bEditAppointments = this.EditAppointmentEnabled();
    1098 
    1099                         mnuDeleteAppointment.Enabled = bEditAppointments;
    1100                         mnuCheckIn.Enabled = bEditAppointments;
    1101                         mnuEditAppointment.Enabled = bEditAppointments;
    1102                         mnuNoShow.Enabled = bEditAppointments;
    1103                         mnuNoShowUndo.Enabled = bEditAppointments;
     1164            // our flags
     1165                        bool _findApptsEnabled = (this.Document.Resources.Count > 0)? true : false ;
     1166            bool _addApptsEnabled = AddAppointmentEnabled();
     1167            bool _editApptsEnabled = EditAppointmentEnabled();
     1168            bool _isRadAppt = IsThisARadiologyResource();
     1169            bool _noShowEnabled = NoShowEnabled();
     1170            bool _undoCheckinEnabled = UndoCheckinEnabled();
     1171            //end flags
     1172
     1173            mnuNewAppointment.Enabled = _addApptsEnabled && !_isRadAppt;
     1174            mnuWalkIn.Enabled = _addApptsEnabled && !_isRadAppt;
     1175            mnuMkRadAppt.Enabled = _isRadAppt && _addApptsEnabled;
     1176
     1177            mnuEditAppointment.Enabled = _editApptsEnabled && !_isRadAppt;
     1178            mnuDeleteAppointment.Enabled = _editApptsEnabled && !_isRadAppt;
     1179            mnuCancelRadAppt.Enabled = _isRadAppt && _editApptsEnabled;
     1180            mnuNoShow.Enabled = _noShowEnabled && _editApptsEnabled;
     1181            mnuNoShowUndo.Enabled = !_noShowEnabled && _editApptsEnabled;
     1182            mnuCheckIn.Enabled = _editApptsEnabled && !_isRadAppt;
     1183            mnuUndoCheckin.Enabled = _undoCheckinEnabled && !_isRadAppt;
     1184
     1185            mnuFindAppt.Enabled = _findApptsEnabled;
     1186            mnuCopyAppointment.Enabled = _editApptsEnabled && !_isRadAppt;
     1187            mnuViewPatientAppts.Enabled = true;
     1188            mnuReprintApptSlip.Enabled = _editApptsEnabled;
    11041189                }
    11051190
     
    11181203                                foreach (CGAppointment a in this.calendarGrid1.SelectedAppointments.AppointmentTable.Values)
    11191204                                {
    1120                                         if (m_ClipList.AppointmentTable.Contains((int) a.AppointmentKey))
     1205                    if (m_ClipList.AppointmentTable.Contains((int)a.AppointmentKey))
    11211206                                        {
    11221207                                                return;
    11231208                                        }
    11241209                                        m_ClipList.AddAppointment(a);
    1125                                         lstClip.Items.Add(a.PatientName);
     1210                    lstClip.Items.Add(a);
    11261211                                }
    11271212                        }
     
    11621247        {
    11631248            AppointmentUndoCheckin();
     1249        }
     1250
     1251        private void mnuMkRadAppt_Click(object sender, EventArgs e)
     1252        {
     1253            AppointmentAddNewRadiology();
     1254        }
     1255
     1256        private void mnuCancelRadAppt_Click(object sender, EventArgs e)
     1257        {
     1258            AppointmentDeleteOneRadiology();
     1259        }
     1260
     1261        private void mnuUndoCheckin_Click(object sender, EventArgs e)
     1262        {
     1263            AppointmentUndoCheckin();
     1264        }
     1265
     1266        private void mnuReprintApptSlip_Click(object sender, EventArgs e)
     1267        {
     1268            int apptID = this.CGrid.SelectedAppointment;
     1269            if (apptID <= 0) return;
     1270
     1271            CGAppointment a = (CGAppointment)this.Appointments.AppointmentTable[apptID];
     1272
     1273            PrintAppointmentSlip(a);
    11641274        }
    11651275
     
    12921402                private void ctxCalendarGrid_Popup(object sender, System.EventArgs e)
    12931403                {
     1404            bool bEditAppointments = (EditAppointmentEnabled() && (calendarGrid1.SelectedAppointment > 0)) ;
     1405
     1406            if (IsThisARadiologyResource())//this is a radiology resource
     1407            {
     1408                ctxCalGridAdd.Visible = false;
     1409                ctxCalGridDelete.Visible = false;
     1410                ctxCalGridEdit.Visible = false;
     1411                ctxCalGridCheckIn.Visible = false;
     1412                ctxCalGridNoShow.Visible = false;
     1413                ctxCalGridNoShowUndo.Visible = false;
     1414                ctxCalGridWalkin.Visible = false;
     1415                ctxCalGridUndoCheckin.Visible = false;
     1416                ctxCalGridSep1.Visible = false;
     1417                ctxCalGridSep2.Visible = false;
     1418
     1419                ctxCalGridMkRadAppt.Visible = true;
     1420                ctxCalGridCancelRadAppt.Visible = true;
     1421
     1422               
     1423            }
     1424
     1425            else // this is a normal resource
     1426            {
     1427                ctxCalGridAdd.Visible = true;
     1428                ctxCalGridDelete.Visible = true;
     1429                ctxCalGridEdit.Visible = true;
     1430                ctxCalGridCheckIn.Visible = true;
     1431                ctxCalGridNoShow.Visible = true;
     1432                ctxCalGridNoShowUndo.Visible = true;
     1433                ctxCalGridWalkin.Visible = true;
     1434                ctxCalGridUndoCheckin.Visible = true;
     1435                ctxCalGridSep1.Visible = true;
     1436                ctxCalGridSep2.Visible = true;
     1437
     1438                ctxCalGridMkRadAppt.Visible = false;
     1439                ctxCalGridCancelRadAppt.Visible = false;
     1440            }
     1441
    12941442                        //Toggle availability of make, edit, checkin and delete appointments
    12951443                        //based on whether appropriate element is selected.
    12961444                        ctxCalGridAdd.Enabled = AddAppointmentEnabled();
    1297                         bool bEditAppointments = (EditAppointmentEnabled() && (calendarGrid1.SelectedAppointment > 0)) ;
     1445                       
    12981446                        ctxCalGridDelete.Enabled = bEditAppointments;
    12991447                        ctxCalGridEdit.Enabled = bEditAppointments;
     
    13021450            ctxCalGridNoShowUndo.Enabled = !NoShowEnabled() && calendarGrid1.SelectedAppointment > 0;
    13031451                        ctxCalGridWalkin.Enabled = ctxCalGridAdd.Enabled;
    1304             //smh new code
    13051452            ctxCalGridReprintApptSlip.Enabled = bEditAppointments;
    13061453            ctxCalGridUndoCheckin.Enabled = UndoCheckinEnabled();
    1307             //end new code
     1454
     1455            //if the rad ones are visible, then these apply
     1456            ctxCalGridMkRadAppt.Enabled = !bEditAppointments;
     1457            ctxCalGridCancelRadAppt.Enabled = bEditAppointments;
    13081458        }
    13091459
     
    13441494                }
    13451495
    1346         //new code smh
     1496        private void ctxCalGridMkRadAppt_Click(object sender, EventArgs e)
     1497        {
     1498            AppointmentAddNewRadiology();
     1499        }
     1500
     1501        private void ctxCalGridCancelRadAppt_Click(object sender, EventArgs e)
     1502        {
     1503            AppointmentDeleteOneRadiology();
     1504        }
     1505
    13471506        private void ctxCalGridReprintApptSlip_Click(object sender, EventArgs e)
    13481507        {
     
    13541513            PrintAppointmentSlip(a);
    13551514        }
    1356         //end new code
    13571515
    13581516                #endregion ctxCalGridMenu Handlers
    13591517
    13601518                #region Methods
     1519
     1520        /// <summary>
     1521        /// Decides whether this is a Radiology Resource. Local Helper to decide what menu items to enable/display
     1522        /// </summary>
     1523        /// <returns></returns>
     1524        private bool IsThisARadiologyResource()
     1525        {
     1526            //I don't like this logic!!! but works for now!
     1527            //Note: I use banana peeling model below
     1528
     1529            //If no cell is selected AND no appointment is selected, then it's false
     1530            if (this.calendarGrid1.SelectedRange.Cells.CellCount < 1 && this.calendarGrid1.SelectedAppointment < 1)
     1531                return false;
     1532
     1533            //If an appointment is selected then...
     1534            if (this.calendarGrid1.SelectedAppointment > 0)
     1535            {
     1536                CGAppointment appt = this.Appointments.AppointmentTable[this.calendarGrid1.SelectedAppointment] as CGAppointment;
     1537                if (appt == null) return false; //appt doesn't exist; old appointment and grid wasn't refreshed yet
     1538                if (appt.RadiologyExamIEN.HasValue && appt.RadiologyExamIEN.Value > 0) return true; //this appointment is a radiology appointment since it has that member
     1539                else return false;
     1540
     1541            }
     1542
     1543            //Otherwise, we are for sure dealing with a cell.
     1544            //We need to determine if the cell resource is mapped to a Radiology Hospital Location.
     1545            DateTime dStart;
     1546            DateTime dEnd;
     1547            string sResource;
     1548           
     1549            // Get resource
     1550            bool bRet = this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource);
     1551           
     1552            // If we fail, return false (but this is not supposed to ever happen)
     1553            if (bRet == false)
     1554            {
     1555                return false;
     1556            }
     1557
     1558            // see if resource is mapped to a Radiology Hospital Location.
     1559            return IsThisARadiologyResource(sResource);
     1560        }
     1561
     1562        private bool IsThisARadiologyResource(string sResource)
     1563        {
     1564            // see if resource is mapped to a Radiology Hospital Location.
     1565            return (   //select all Hospital Locations which are radiology locations
     1566                       from hl in CGDocumentManager.Current.GlobalDataSet.Tables["HospitalLocation"].AsEnumerable()
     1567                       where hl.Field<string>("IS_RADIOLOGY_LOCATION") == "1"
     1568                       //join this to the resources table using the foreign ID (plain jane relational join)
     1569                       join res in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable()
     1570                       on hl.Field<int>("HOSPITAL_LOCATION_ID") equals res.Field<int>("HOSPITAL_LOCATION_ID")
     1571                       //then filter this down to the resource that we have
     1572                       where res.Field<string>("RESOURCE_NAME") == sResource
     1573                       //if we have any row left, then it is true.
     1574                       select hl).Any();
     1575        }
    13611576
    13621577        private bool EditAppointmentEnabled()
     
    19812196
    19822197                /// <summary>
     2198        /// Delete one Radiology Appointment
     2199        /// </summary>
     2200        private void AppointmentDeleteOneRadiology()
     2201        {
     2202            Debug.Assert(this.calendarGrid1.SelectedAppointment > 0);
     2203
     2204            CGAppointment a = this.Appointments.AppointmentTable[this.calendarGrid1.SelectedAppointment] as CGAppointment;
     2205
     2206            Debug.Assert(a.RadiologyExamIEN.HasValue);
     2207
     2208            //Prior to making expensive db calls, tell the grid nothing is selected anymore so nobody would try to pick it up
     2209            this.calendarGrid1.SelectedAppointment = 0;
     2210
     2211            //Cancel Radiology Exam
     2212            CGDocumentManager.Current.DAL.CancelRadiologyExam(a.PatientID, a.RadiologyExamIEN.Value);
     2213
     2214            //Now, Cancel the appointment
     2215            this.Document.DeleteAppointment(a.AppointmentKey);
     2216
     2217            //redraw the grid to display new set of appointments after this appt was removed.
     2218            this.UpdateArrays();
     2219        }
     2220
     2221                /// <summary>
    19832222                /// Delete appointment ApptID
    19842223                /// </summary>
     
    20152254                return;
    20162255            }
     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;
    20172261
    20182262            bool bClinic = dCancel.ClinicCancelled;
     
    23812625                }
    23822626
     2627        /// <summary>
     2628        /// Add a new Radiology Appointment to VISTA (ÒÝÊì as my mom calls it)
     2629        /// </summary>
     2630        private void AppointmentAddNewRadiology()
     2631        {
     2632            DateTime dStart, dEnd;  //return vales for below
     2633            string sResource;       //ditto
     2634            int nAccessTypeID = 0;  //ditto
     2635
     2636            this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource);
     2637            this.calendarGrid1.GetSelectedType(out nAccessTypeID);
     2638
     2639            Debug.Assert(sResource != null);
     2640            Debug.Assert(dStart > DateTime.MinValue);
     2641
     2642            //Display a dialog to collect Patient Name
     2643            DPatientLookup dPat = new DPatientLookup();
     2644            dPat.DocManager = m_DocManager;
     2645
     2646            if (dPat.ShowDialog(this) == DialogResult.Cancel)
     2647            {
     2648                return;
     2649            }
     2650
     2651            int DFN = Int32.Parse(dPat.PatientIEN);
     2652            // Hospital Location IEN
     2653            int hlIEN = (from resource in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable()
     2654                         where resource.Field<string>("RESOURCE_NAME") == sResource
     2655                         select resource.Field<int>("HOSPITAL_LOCATION_ID")).FirstOrDefault();
     2656
     2657            //Get Radiology Exams from the DB
     2658            List<RadiologyExam> _radExams = CGDocumentManager.Current.DAL.GetRadiologyExamsForPatientinHL(DFN, hlIEN);
     2659
     2660            //If none found...
     2661            if (!_radExams.Any())
     2662            {
     2663                MessageBox.Show("Patient does not have any radiology exams to register.");
     2664                return;
     2665            }
     2666
     2667            //Display a form for the user to select radiology exams.
     2668            DRadExamsSelect _radform = new DRadExamsSelect(_radExams);
     2669
     2670            if (_radform.ShowDialog() == DialogResult.Cancel) return;
     2671
     2672            //Get some return values
     2673            int _examien = _radform.ExamIEN;
     2674            string _procedurename = _radform.ProcedureName;
     2675
     2676            //Save Radiology Exam Schedule Info to Radiology Package
     2677            CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien, dStart);
     2678
     2679            //Now create and save the appointment
     2680            CGAppointment appt = new CGAppointment();
     2681            string _sNote = "Radiology Exam (" + _examien + "): " + _procedurename;
     2682            appt.CreateAppointment(dStart, dEnd, _sNote, 0, sResource);
     2683            appt.PatientID = Int32.Parse(dPat.PatientIEN);
     2684            appt.PatientName = dPat.PatientName;
     2685            appt.AccessTypeID = nAccessTypeID;
     2686            appt.RadiologyExamIEN = _examien;
     2687            appt.Patient = new Patient
     2688            {
     2689                DFN = Convert.ToInt32(dPat.PatientIEN),
     2690                ID = dPat.PatientPID,
     2691                Name = dPat.PatientName,
     2692                HRN = dPat.HealthRecordNumber,
     2693                DOB = dPat.PatientDOB
     2694            };
     2695
     2696            this.Document.CreateAppointment(appt);
     2697
     2698            //Print Appointment Slip if requested
     2699            if (_radform.PrintAppointmentSlip) this.PrintAppointmentSlip(appt);
     2700
     2701            //Now redraw the grid to display the new appointments
     2702            this.UpdateArrays();
     2703        }
     2704
     2705
    23832706        #region BMX Event Processing and Callbacks
    23842707        /// <summary>
     
    28923215                        try
    28933216                        {
     3217                // added April 13 2011
     3218                // Can't edit radiology appointments (Why? b/c it's intimately tied to Radiology Entry of the Hosp Loc)
     3219                if (e.Appointment.RadiologyExamIEN.HasValue && e.Appointment.RadiologyExamIEN.Value > 0)
     3220                {
     3221                    MessageBox.Show("You cannot move a radiology appointment.", "Clinical Scheduling");
     3222                    return;
     3223                }
     3224
     3225                // added May 5 2011
     3226                // Can't move an appointment to a radiology resource
     3227                if (IsThisARadiologyResource(e.Resource))
     3228                {
     3229                    MessageBox.Show("You cannot move an appointment to a radiology location.", "Clinical Scheduling");
     3230                    return;
     3231                }
     3232               
    28943233                                if (e.Appointment.CheckInTime.Ticks > 0)
    28953234                                {
    2896                                         MessageBox.Show("You cannot change the appointment time because the patient has already checked in.", "Clinical Scheduling",  MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
     3235                                        MessageBox.Show("You cannot change the appointment time because the patient has already checked in.", "Clinical Scheduling");
    28973236                                        return;
    28983237                                }
     
    35663905
    35673906
    3568 
    3569 
    3570 
    35713907    }//End class
    35723908}
Note: See TracChangeset for help on using the changeset viewer.