Changeset 1166


Ignore:
Timestamp:
May 3, 2011, 5:32:56 AM (13 years ago)
Author:
Sam Habiel
Message:

Various Radiology-related Modifications:
DAL: ScheduleRadiologyExam and CancelRadiologyExam methods to DB
CGSchedLib: Organize usings
CGView:

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

Legend:

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

    r1050 r1166  
    2828// by using the '*' as shown below:
    2929
    30 [assembly: AssemblyVersion("1.5.0.*")]
     30[assembly: AssemblyVersion("1.5.1.*")]
    3131
    3232//
     
    5858[assembly: AssemblyKeyFile("")]
    5959[assembly: AssemblyKeyName("")]
    60 [assembly: AssemblyFileVersionAttribute("1.5.0.0")]
     60[assembly: AssemblyFileVersionAttribute("1.5.1.0")]
    6161[assembly: ComVisibleAttribute(false)]
  • Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/CGSchedLib.cs

    r1097 r1166  
    22using System.Data;
    33using System.Collections;
    4 using System.Diagnostics;
    5 using System.Drawing;
    64
    75namespace IndianHealthService.ClinicalScheduling
  • Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/CGView.cs

    r1140 r1166  
    4949                private System.Windows.Forms.Panel panelBottom;
    5050                private System.Windows.Forms.Label lblResource;
    51                 private System.Windows.Forms.ContextMenu contextMenu1;
     51                private System.Windows.Forms.ContextMenu ctxResourceTree;
    5252                private System.Windows.Forms.MenuItem ctxOpenSchedule;
    5353                private System.Windows.Forms.MenuItem ctxEditAvailability;
     
    9191                private System.Windows.Forms.MenuItem mnuPrintCancellationLetters;
    9292                private System.Windows.Forms.MenuItem mnuWalkIn;
    93                 private System.Windows.Forms.MenuItem menuItem5;
    94                 private System.Windows.Forms.MenuItem menuItem8;
     93                private System.Windows.Forms.MenuItem sepApptMenu1;
     94                private System.Windows.Forms.MenuItem sepApptMenu2;
    9595                private System.Windows.Forms.MenuItem ctxCalGridWalkin;
    9696                private System.Windows.Forms.MenuItem menuItem2;
     
    109109        private MenuItem ctxCalGridMkRadAppt;
    110110        private MenuItem ctxCalGridCancelRadAppt;
     111        private MenuItem mnuMkRadAppt;
     112        private MenuItem mnuCancelRadAppt;
     113        private MenuItem mnuUndoCheckin;
     114        private MenuItem sepApptMenu3;
     115        private MenuItem mnuReprintApptSlip;
    111116        private IContainer components;
    112117
     
    197202            this.mnuAppointment = new System.Windows.Forms.MenuItem();
    198203            this.mnuNewAppointment = new System.Windows.Forms.MenuItem();
     204            this.mnuWalkIn = new System.Windows.Forms.MenuItem();
     205            this.mnuMkRadAppt = new System.Windows.Forms.MenuItem();
    199206            this.mnuEditAppointment = new System.Windows.Forms.MenuItem();
    200207            this.mnuDeleteAppointment = new System.Windows.Forms.MenuItem();
    201             this.menuItem5 = new System.Windows.Forms.MenuItem();
     208            this.mnuCancelRadAppt = new System.Windows.Forms.MenuItem();
     209            this.sepApptMenu1 = new System.Windows.Forms.MenuItem();
    202210            this.mnuNoShow = new System.Windows.Forms.MenuItem();
    203211            this.mnuNoShowUndo = new System.Windows.Forms.MenuItem();
    204             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();
    205217            this.mnuCopyAppointment = new System.Windows.Forms.MenuItem();
    206             this.mnuWalkIn = new System.Windows.Forms.MenuItem();
    207             this.mnuFindAppt = new System.Windows.Forms.MenuItem();
    208             this.mnuCheckIn = new System.Windows.Forms.MenuItem();
    209218            this.mnuViewPatientAppts = new System.Windows.Forms.MenuItem();
     219            this.mnuReprintApptSlip = new System.Windows.Forms.MenuItem();
    210220            this.mnuCalendar = new System.Windows.Forms.MenuItem();
    211221            this.mnuDisplayWalkIns = new System.Windows.Forms.MenuItem();
     
    228238            this.mnuTest1 = new System.Windows.Forms.MenuItem();
    229239            this.tvSchedules = new System.Windows.Forms.TreeView();
    230             this.contextMenu1 = new System.Windows.Forms.ContextMenu();
     240            this.ctxResourceTree = new System.Windows.Forms.ContextMenu();
    231241            this.ctxOpenSchedule = new System.Windows.Forms.MenuItem();
    232242            this.ctxEditAvailability = new System.Windows.Forms.MenuItem();
     
    247257            this.lblResource = new System.Windows.Forms.Label();
    248258            this.panelCenter = new System.Windows.Forms.Panel();
     259            this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
    249260            this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu();
    250261            this.ctxCalGridAdd = new System.Windows.Forms.MenuItem();
     
    266277            this.splitter1 = new System.Windows.Forms.Splitter();
    267278            this.splitter2 = new System.Windows.Forms.Splitter();
    268             this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
    269279            this.panelRight.SuspendLayout();
    270280            this.panelClip.SuspendLayout();
     
    416426            this.mnuAppointment.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    417427            this.mnuNewAppointment,
     428            this.mnuWalkIn,
     429            this.mnuMkRadAppt,
    418430            this.mnuEditAppointment,
    419431            this.mnuDeleteAppointment,
    420             this.menuItem5,
     432            this.mnuCancelRadAppt,
     433            this.sepApptMenu1,
    421434            this.mnuNoShow,
    422435            this.mnuNoShowUndo,
    423             this.menuItem8,
     436            this.sepApptMenu2,
     437            this.mnuCheckIn,
     438            this.mnuUndoCheckin,
     439            this.sepApptMenu3,
     440            this.mnuFindAppt,
    424441            this.mnuCopyAppointment,
    425             this.mnuWalkIn,
    426             this.mnuFindAppt,
    427             this.mnuCheckIn,
    428             this.mnuViewPatientAppts});
     442            this.mnuViewPatientAppts,
     443            this.mnuReprintApptSlip});
    429444            this.mnuAppointment.Text = "&Appointment";
    430445            this.mnuAppointment.Popup += new System.EventHandler(this.mnuAppointment_Popup);
     
    433448            //
    434449            this.mnuNewAppointment.Index = 0;
     450            this.mnuNewAppointment.Shortcut = System.Windows.Forms.Shortcut.Ins;
    435451            this.mnuNewAppointment.Text = "&New Appointment";
    436452            this.mnuNewAppointment.Click += new System.EventHandler(this.mnuNewAppointment_Click);
    437453            //
     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.Ins;
     465            this.mnuMkRadAppt.Text = "Make Radiology Appointment";
     466            //
    438467            // mnuEditAppointment
    439468            //
    440             this.mnuEditAppointment.Index = 1;
     469            this.mnuEditAppointment.Index = 3;
     470            this.mnuEditAppointment.Shortcut = System.Windows.Forms.Shortcut.F2;
    441471            this.mnuEditAppointment.Text = "&Edit Appointment";
    442472            this.mnuEditAppointment.Click += new System.EventHandler(this.mnuEditAppointment_Click);
     
    444474            // mnuDeleteAppointment
    445475            //
    446             this.mnuDeleteAppointment.Index = 2;
     476            this.mnuDeleteAppointment.Index = 4;
     477            this.mnuDeleteAppointment.Shortcut = System.Windows.Forms.Shortcut.Del;
    447478            this.mnuDeleteAppointment.Text = "Cance&l Appointment";
    448479            this.mnuDeleteAppointment.Click += new System.EventHandler(this.mnuDeleteAppointment_Click);
    449480            //
    450             // menuItem5
    451             //
    452             this.menuItem5.Index = 3;
    453             this.menuItem5.Text = "-";
     481            // mnuCancelRadAppt
     482            //
     483            this.mnuCancelRadAppt.Index = 5;
     484            this.mnuCancelRadAppt.Shortcut = System.Windows.Forms.Shortcut.Del;
     485            this.mnuCancelRadAppt.Text = "Cancel Radiology Appointment";
     486            //
     487            // sepApptMenu1
     488            //
     489            this.sepApptMenu1.Index = 6;
     490            this.sepApptMenu1.Text = "-";
    454491            //
    455492            // mnuNoShow
    456493            //
    457             this.mnuNoShow.Index = 4;
     494            this.mnuNoShow.Index = 7;
    458495            this.mnuNoShow.Text = "Mark as No Sho&w";
    459496            this.mnuNoShow.Click += new System.EventHandler(this.mnuNoShow_Click);
     
    461498            // mnuNoShowUndo
    462499            //
    463             this.mnuNoShowUndo.Index = 5;
     500            this.mnuNoShowUndo.Index = 8;
    464501            this.mnuNoShowUndo.Text = "&Undo No Show";
    465502            this.mnuNoShowUndo.Click += new System.EventHandler(this.mnuNoShowUndo_Click);
    466503            //
    467             // menuItem8
    468             //
    469             this.menuItem8.Index = 6;
    470             this.menuItem8.Text = "-";
    471             //
    472             // mnuCopyAppointment
    473             //
    474             this.mnuCopyAppointment.Index = 7;
    475             this.mnuCopyAppointment.Text = "&Copy  Appointment to Clipboard";
    476             this.mnuCopyAppointment.Click += new System.EventHandler(this.mnuCopyAppointment_Click);
    477             //
    478             // mnuWalkIn
    479             //
    480             this.mnuWalkIn.Index = 8;
    481             this.mnuWalkIn.Text = "Create Wal&k-In Appointment";
    482             this.mnuWalkIn.Click += new System.EventHandler(this.mnuWalkIn_Click);
     504            // sepApptMenu2
     505            //
     506            this.sepApptMenu2.Index = 9;
     507            this.sepApptMenu2.Text = "-";
     508            //
     509            // mnuCheckIn
     510            //
     511            this.mnuCheckIn.Index = 10;
     512            this.mnuCheckIn.Text = "Check &In Patient";
     513            this.mnuCheckIn.Click += new System.EventHandler(this.mnuCheckIn_Click);
     514            //
     515            // mnuUndoCheckin
     516            //
     517            this.mnuUndoCheckin.Index = 11;
     518            this.mnuUndoCheckin.Text = "Undo Checkin";
     519            //
     520            // sepApptMenu3
     521            //
     522            this.sepApptMenu3.Index = 12;
     523            this.sepApptMenu3.Text = "-";
    483524            //
    484525            // mnuFindAppt
    485526            //
    486             this.mnuFindAppt.Index = 9;
     527            this.mnuFindAppt.Index = 13;
    487528            this.mnuFindAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlF;
    488529            this.mnuFindAppt.Text = "&Find Available Appointment";
    489530            this.mnuFindAppt.Click += new System.EventHandler(this.mnuFindAppt_Click);
    490531            //
    491             // mnuCheckIn
    492             //
    493             this.mnuCheckIn.Index = 10;
    494             this.mnuCheckIn.Text = "Check &In Patient";
    495             this.mnuCheckIn.Click += new System.EventHandler(this.mnuCheckIn_Click);
     532            // mnuCopyAppointment
     533            //
     534            this.mnuCopyAppointment.Index = 14;
     535            this.mnuCopyAppointment.Text = "&Copy  Appointment to Clipboard";
     536            this.mnuCopyAppointment.Click += new System.EventHandler(this.mnuCopyAppointment_Click);
    496537            //
    497538            // mnuViewPatientAppts
    498539            //
    499             this.mnuViewPatientAppts.Index = 11;
     540            this.mnuViewPatientAppts.Index = 15;
    500541            this.mnuViewPatientAppts.Text = "&View Patient Appointments";
    501542            this.mnuViewPatientAppts.Click += new System.EventHandler(this.mnuViewPatientAppts_Click);
     543            //
     544            // mnuReprintApptSlip
     545            //
     546            this.mnuReprintApptSlip.Index = 16;
     547            this.mnuReprintApptSlip.Text = "Reprint Appointment Slip";
    502548            //
    503549            // mnuCalendar
     
    521567            this.mnuDisplayWalkIns.Checked = true;
    522568            this.mnuDisplayWalkIns.Index = 0;
     569            this.mnuDisplayWalkIns.Shortcut = System.Windows.Forms.Shortcut.F12;
    523570            this.mnuDisplayWalkIns.Text = "&Display Walk-Ins";
    524571            this.mnuDisplayWalkIns.Click += new System.EventHandler(this.mnuDisplayWalkIns_Click);
     
    594641            // mnuViewScheduleTree
    595642            //
     643            this.mnuViewScheduleTree.Checked = true;
    596644            this.mnuViewScheduleTree.Index = 6;
     645            this.mnuViewScheduleTree.Shortcut = System.Windows.Forms.Shortcut.F4;
    597646            this.mnuViewScheduleTree.Text = "&Schedule Tree";
    598647            this.mnuViewScheduleTree.Click += new System.EventHandler(this.mnuViewScheduleTree_Click);
     
    647696            //
    648697            this.tvSchedules.BackColor = System.Drawing.SystemColors.ControlLight;
    649             this.tvSchedules.ContextMenu = this.contextMenu1;
     698            this.tvSchedules.ContextMenu = this.ctxResourceTree;
    650699            this.tvSchedules.Dock = System.Windows.Forms.DockStyle.Left;
    651700            this.tvSchedules.HotTracking = true;
    652701            this.tvSchedules.Location = new System.Drawing.Point(0, 0);
    653702            this.tvSchedules.Name = "tvSchedules";
    654             this.tvSchedules.Size = new System.Drawing.Size(128, 254);
     703            this.tvSchedules.Size = new System.Drawing.Size(128, 396);
    655704            this.tvSchedules.Sorted = true;
    656705            this.tvSchedules.TabIndex = 1;
     
    660709            this.tvSchedules.MouseEnter += new System.EventHandler(this.tvSchedules_MouseEnter);
    661710            //
    662             // contextMenu1
    663             //
    664             this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     711            // ctxResourceTree
     712            //
     713            this.ctxResourceTree.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    665714            this.ctxOpenSchedule,
    666715            this.ctxEditAvailability,
     
    670719            this.ctxPrintScheduleT1,
    671720            this.ctxPrintScheduleT3});
    672             this.contextMenu1.Popup += new System.EventHandler(this.contextMenu1_Popup);
     721            this.ctxResourceTree.Popup += new System.EventHandler(this.contextMenu1_Popup);
    673722            //
    674723            // ctxOpenSchedule
     
    721770            this.panelRight.Location = new System.Drawing.Point(996, 0);
    722771            this.panelRight.Name = "panelRight";
    723             this.panelRight.Size = new System.Drawing.Size(128, 254);
     772            this.panelRight.Size = new System.Drawing.Size(128, 396);
    724773            this.panelRight.TabIndex = 3;
    725774            this.panelRight.Visible = false;
     
    817866            this.panelCenter.Location = new System.Drawing.Point(136, 24);
    818867            this.panelCenter.Name = "panelCenter";
    819             this.panelCenter.Size = new System.Drawing.Size(857, 206);
     868            this.panelCenter.Size = new System.Drawing.Size(857, 348);
    820869            this.panelCenter.TabIndex = 7;
    821             //
    822             // ctxCalendarGrid
    823             //
    824             this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    825             this.ctxCalGridAdd,
    826             this.ctxCalGridMkRadAppt,
    827             this.ctxCalGridEdit,
    828             this.ctxCalGridDelete,
    829             this.ctxCalGridCancelRadAppt,
    830             this.ctxCalGridCheckIn,
    831             this.ctxCalGridUndoCheckin,
    832             this.menuItem2,
    833             this.ctxCalGridNoShow,
    834             this.ctxCalGridNoShowUndo,
    835             this.menuItem9,
    836             this.ctxCalGridWalkin,
    837             this.menuItem10,
    838             this.ctxCalGridReprintApptSlip});
    839             this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
    840             //
    841             // ctxCalGridAdd
    842             //
    843             this.ctxCalGridAdd.Index = 0;
    844             this.ctxCalGridAdd.Text = "Add Appointment";
    845             this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
    846             //
    847             // ctxCalGridMkRadAppt
    848             //
    849             this.ctxCalGridMkRadAppt.Index = 1;
    850             this.ctxCalGridMkRadAppt.Text = "Make Radiology Appointment";
    851             this.ctxCalGridMkRadAppt.Click += new System.EventHandler(this.ctxCalGridMkRadAppt_Click);
    852             //
    853             // ctxCalGridEdit
    854             //
    855             this.ctxCalGridEdit.Index = 2;
    856             this.ctxCalGridEdit.Text = "Edit Appointment";
    857             this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
    858             //
    859             // ctxCalGridDelete
    860             //
    861             this.ctxCalGridDelete.Index = 3;
    862             this.ctxCalGridDelete.Text = "Cancel Appointment";
    863             this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
    864             //
    865             // ctxCalGridCancelRadAppt
    866             //
    867             this.ctxCalGridCancelRadAppt.Index = 4;
    868             this.ctxCalGridCancelRadAppt.Text = "Cancel Radiology Appointment";
    869             //
    870             // ctxCalGridCheckIn
    871             //
    872             this.ctxCalGridCheckIn.Index = 5;
    873             this.ctxCalGridCheckIn.Text = "Check In Patient";
    874             this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
    875             //
    876             // ctxCalGridUndoCheckin
    877             //
    878             this.ctxCalGridUndoCheckin.Index = 6;
    879             this.ctxCalGridUndoCheckin.Text = "&Undo Check In";
    880             this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click);
    881             //
    882             // menuItem2
    883             //
    884             this.menuItem2.Index = 7;
    885             this.menuItem2.Text = "-";
    886             //
    887             // ctxCalGridNoShow
    888             //
    889             this.ctxCalGridNoShow.Index = 8;
    890             this.ctxCalGridNoShow.Text = "Mark as No Show";
    891             this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);
    892             //
    893             // ctxCalGridNoShowUndo
    894             //
    895             this.ctxCalGridNoShowUndo.Index = 9;
    896             this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
    897             this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
    898             //
    899             // menuItem9
    900             //
    901             this.menuItem9.Index = 10;
    902             this.menuItem9.Text = "-";
    903             //
    904             // ctxCalGridWalkin
    905             //
    906             this.ctxCalGridWalkin.Index = 11;
    907             this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";
    908             this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);
    909             //
    910             // menuItem10
    911             //
    912             this.menuItem10.Index = 12;
    913             this.menuItem10.Text = "-";
    914             //
    915             // ctxCalGridReprintApptSlip
    916             //
    917             this.ctxCalGridReprintApptSlip.Index = 13;
    918             this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip";
    919             this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click);
    920             //
    921             // panelBottom
    922             //
    923             this.panelBottom.Controls.Add(this.statusBar1);
    924             this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
    925             this.panelBottom.Location = new System.Drawing.Point(136, 230);
    926             this.panelBottom.Name = "panelBottom";
    927             this.panelBottom.Size = new System.Drawing.Size(857, 24);
    928             this.panelBottom.TabIndex = 8;
    929             //
    930             // statusBar1
    931             //
    932             this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;
    933             this.statusBar1.Location = new System.Drawing.Point(0, 0);
    934             this.statusBar1.Name = "statusBar1";
    935             this.statusBar1.Size = new System.Drawing.Size(857, 24);
    936             this.statusBar1.SizingGrip = false;
    937             this.statusBar1.TabIndex = 0;
    938             //
    939             // splitter1
    940             //
    941             this.splitter1.Location = new System.Drawing.Point(128, 24);
    942             this.splitter1.Name = "splitter1";
    943             this.splitter1.Size = new System.Drawing.Size(8, 230);
    944             this.splitter1.TabIndex = 9;
    945             this.splitter1.TabStop = false;
    946             //
    947             // splitter2
    948             //
    949             this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
    950             this.splitter2.Location = new System.Drawing.Point(993, 24);
    951             this.splitter2.Name = "splitter2";
    952             this.splitter2.Size = new System.Drawing.Size(3, 230);
    953             this.splitter2.TabIndex = 10;
    954             this.splitter2.TabStop = false;
    955870            //
    956871            // calendarGrid1
     
    973888            this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources")));
    974889            this.calendarGrid1.SelectedAppointment = 0;
    975             this.calendarGrid1.Size = new System.Drawing.Size(857, 206);
     890            this.calendarGrid1.Size = new System.Drawing.Size(857, 348);
    976891            this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0);
    977892            this.calendarGrid1.TabIndex = 0;
     
    983898            this.calendarGrid1.MouseEnter += new System.EventHandler(this.calendarGrid1_MouseEnter);
    984899            //
     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            //
    9851035            // CGView
    9861036            //
    9871037            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
    988             this.ClientSize = new System.Drawing.Size(1124, 254);
     1038            this.ClientSize = new System.Drawing.Size(1124, 396);
    9891039            this.Controls.Add(this.panelCenter);
    9901040            this.Controls.Add(this.panelBottom);
     
    10971147                #endregion
    10981148
    1099 
    11001149                #region AppointmentMenu Handlers
    11011150
    11021151                private void mnuAppointment_Popup(object sender, System.EventArgs e)
    11031152                {
    1104                         bool bEnabled = (this.Document.Resources.Count > 0)? true : false ;
    1105                         this.mnuFindAppt.Enabled = bEnabled;
    1106 
    1107                         //Toggle availability of make, edit, checkin and delete appointments
    1108                         //based on whether a range is selected.
    1109 
    1110                         mnuNewAppointment.Enabled = AddAppointmentEnabled();
    1111                         this.mnuWalkIn.Enabled = mnuNewAppointment.Enabled;
    1112                         bool bEditAppointments = this.EditAppointmentEnabled();
    1113 
    1114                         mnuDeleteAppointment.Enabled = bEditAppointments;
    1115                         mnuCheckIn.Enabled = bEditAppointments;
    1116                         mnuEditAppointment.Enabled = bEditAppointments;
    1117                         mnuNoShow.Enabled = bEditAppointments;
    1118                         mnuNoShowUndo.Enabled = bEditAppointments;
     1153            // our flags
     1154                        bool _findApptsEnabled = (this.Document.Resources.Count > 0)? true : false ;
     1155            bool _addApptsEnabled = AddAppointmentEnabled();
     1156            bool _editApptsEnabled = EditAppointmentEnabled();
     1157            bool _isRadAppt = IsThisARadiologyResource();
     1158            bool _noShowEnabled = NoShowEnabled();
     1159            bool _undoCheckinEnabled = UndoCheckinEnabled();
     1160            //end flags
     1161
     1162            mnuNewAppointment.Enabled = _addApptsEnabled && !_isRadAppt;
     1163            mnuWalkIn.Enabled = _addApptsEnabled && !_isRadAppt;
     1164            mnuMkRadAppt.Enabled = _isRadAppt && _addApptsEnabled;
     1165
     1166            mnuEditAppointment.Enabled = _editApptsEnabled && !_isRadAppt;
     1167            mnuDeleteAppointment.Enabled = _editApptsEnabled && !_isRadAppt;
     1168            mnuCancelRadAppt.Enabled = _isRadAppt && _editApptsEnabled;
     1169            mnuNoShow.Enabled = _noShowEnabled && _editApptsEnabled;
     1170            mnuNoShowUndo.Enabled = !_noShowEnabled && _editApptsEnabled;
     1171            mnuCheckIn.Enabled = _editApptsEnabled && !_isRadAppt;
     1172            mnuUndoCheckin.Enabled = _undoCheckinEnabled && !_isRadAppt;
     1173
     1174            mnuFindAppt.Enabled = _findApptsEnabled;
     1175            mnuCopyAppointment.Enabled = _editApptsEnabled && !_isRadAppt;
     1176            mnuViewPatientAppts.Enabled = true;
     1177            mnuReprintApptSlip.Enabled = _editApptsEnabled;
    11191178                }
    11201179
     
    11291188                        //add to the clip list
    11301189                        //and add to m_ClipList
    1131                         try
    1132                         {
    1133                                 foreach (CGAppointment a in this.calendarGrid1.SelectedAppointments.AppointmentTable.Values)
    1134                                 {
    1135                                         if (m_ClipList.AppointmentTable.Contains((int) a.AppointmentKey))
    1136                                         {
    1137                                                 return;
    1138                                         }
    1139                                         m_ClipList.AddAppointment(a);
    1140                                         lstClip.Items.Add(a.PatientName);
    1141                                 }
    1142                         }
    1143                         catch (Exception ex)
    1144                         {
    1145                                 string s = ex.Message;
    1146                                 Debug.Write(s);
    1147                                 return;
    1148                         }
     1190            try
     1191            {
     1192                foreach (CGAppointment a in this.calendarGrid1.SelectedAppointments.AppointmentTable.Values)
     1193                {
     1194                    if (m_ClipList.AppointmentTable.Contains((int)a.AppointmentKey))
     1195                    {
     1196                        return;
     1197                    }
     1198                    m_ClipList.AddAppointment(a);
     1199                    lstClip.Items.Add(a);
     1200                }
     1201            }
     1202            catch (Exception ex)
     1203            {
     1204                string s = ex.Message;
     1205                Debug.Write(s);
     1206                return;
     1207            }
    11491208                }
    11501209
     
    13951454                }
    13961455
     1456        private void ctxCalGridMkRadAppt_Click(object sender, EventArgs e)
     1457        {
     1458            AppointmentAddNewRadiology();
     1459        }
     1460
     1461        private void ctxCalGridCancelRadAppt_Click(object sender, EventArgs e)
     1462        {
     1463            AppointmentDeleteOneRadiology();
     1464        }
     1465
    13971466        //new code smh
    13981467        private void ctxCalGridReprintApptSlip_Click(object sender, EventArgs e)
     
    14131482        private bool IsThisARadiologyResource()
    14141483        {
    1415             // I don't like this logic!!!
     1484            // I don't like this logic!!! but works for now!
     1485            //If no cell is selected AND no appointment is selected, then it's false
    14161486            if (this.calendarGrid1.SelectedRange.Cells.CellCount < 1 && this.calendarGrid1.SelectedAppointment < 1)
    14171487                return false;
     1488
     1489            //If an appointment is selected then...
    14181490            if (this.calendarGrid1.SelectedAppointment > 0)
    1419                 if ((this.Appointments.AppointmentTable[this.calendarGrid1.SelectedAppointment] as CGAppointment).RadiologyExamIEN > 0)
    1420                     return true;
    1421 
     1491            {
     1492                CGAppointment appt = this.Appointments.AppointmentTable[this.calendarGrid1.SelectedAppointment] as CGAppointment;
     1493                if (appt.RadiologyExamIEN.HasValue && appt.RadiologyExamIEN.Value > 0) return true;
     1494                else return false;
     1495
     1496            }
     1497
     1498            //Otherwise, we are forsure dealing with a cell.
     1499            //We need to determine if the cell resource is mapped to a Radiology Hospital Location.
    14221500            DateTime dStart;
    14231501            DateTime dEnd;
    14241502            string sResource;
     1503           
     1504            // Get resource
    14251505            bool bRet = this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource);
     1506           
     1507            // If we fail, return false (but this is not supposed to ever happen)
    14261508            if (bRet == false)
    14271509            {
     
    14291511            }
    14301512
     1513            // see if resource is mapped to a Radiology Hospital Location.
    14311514            return (from hl in CGDocumentManager.Current.GlobalDataSet.Tables["HospitalLocation"].AsEnumerable()
    14321515                       where hl.Field<string>("IS_RADIOLOGY_LOCATION")=="1"
     
    20472130                }
    20482131
     2132        private void AppointmentDeleteOneRadiology()
     2133        {
     2134            Debug.Assert(this.calendarGrid1.SelectedAppointment > 0);
     2135
     2136            CGAppointment a = this.Appointments.AppointmentTable[this.calendarGrid1.SelectedAppointment] as CGAppointment;
     2137
     2138            Debug.Assert(a.RadiologyExamIEN.HasValue);
     2139
     2140            //Cancel Radiology Exam
     2141            CGDocumentManager.Current.DAL.CancelRadiologyExam(a.PatientID, a.RadiologyExamIEN.Value);
     2142
     2143            //Now, Cancel the appointment
     2144            this.Document.DeleteAppointment(a.AppointmentKey);
     2145
     2146            //redraw the grid to display new set of appointments after this appt was removed.
     2147            this.UpdateArrays();
     2148        }
     2149
    20492150                /// <summary>
    20502151                /// Delete appointment ApptID
     
    24482549                }
    24492550
     2551        private void AppointmentAddNewRadiology()
     2552        {
     2553            DateTime dStart, dEnd;
     2554            string sResource;
     2555            int nAccessTypeID = 0;
     2556
     2557            this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource);
     2558            this.calendarGrid1.GetSelectedType(out nAccessTypeID);
     2559            //Display a dialog to collect Patient Name
     2560            DPatientLookup dPat = new DPatientLookup();
     2561            dPat.DocManager = m_DocManager;
     2562
     2563            if (dPat.ShowDialog(this) == DialogResult.Cancel)
     2564            {
     2565                return;
     2566            }
     2567
     2568            int DFN = Int32.Parse(dPat.PatientIEN);
     2569            int hlIEN = (from resource in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable()
     2570                         where resource.Field<string>("RESOURCE_NAME") == sResource
     2571                         select resource.Field<int>("HOSPITAL_LOCATION_ID")).FirstOrDefault();
     2572
     2573            List<RadiologyExam> _radExams = CGDocumentManager.Current.DAL.GetRadiologyExamsForPatientinHL(DFN, hlIEN);
     2574
     2575            if (!_radExams.Any())
     2576            {
     2577                MessageBox.Show("Patient does not have any radiology exams to register.");
     2578                return;
     2579            }
     2580
     2581            DRadExamsSelect _radform = new DRadExamsSelect(_radExams);
     2582
     2583            if (_radform.ShowDialog() == DialogResult.Cancel) return;
     2584
     2585            int _examien = _radform.ExamIEN;
     2586            string _procedurename = _radform.ProcedureName;
     2587
     2588            CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien);
     2589
     2590            //Now create and save the appointment
     2591            CGAppointment appt = new CGAppointment();
     2592            string _sNote = "Radiology Exam (" + _examien + "): " + _procedurename;
     2593            appt.CreateAppointment(dStart, dEnd, _sNote, 0, sResource);
     2594            appt.PatientID = Int32.Parse(dPat.PatientIEN);
     2595            appt.PatientName = dPat.PatientName;
     2596            appt.AccessTypeID = nAccessTypeID;
     2597            appt.RadiologyExamIEN = _examien;
     2598            this.Document.CreateAppointment(appt);
     2599
     2600            //Now redraw the grid to display the new appointments
     2601            this.UpdateArrays();
     2602        }
     2603
     2604
    24502605        #region BMX Event Processing and Callbacks
    24512606        /// <summary>
     
    29623117                        try
    29633118                        {
    2964                                 if (e.Appointment.CheckInTime.Ticks > 0)
    2965                                 {
    2966                                         MessageBox.Show("You cannot change the appointment time because the patient has already checked in.", "Clinical Scheduling",  MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
     3119                // added April 13 2011
     3120                // Can't edit radiology appointments (Why? b/c it's intimately tied to Radiology Entry of the Hosp Loc)
     3121                if (e.Appointment.RadiologyExamIEN.HasValue && e.Appointment.RadiologyExamIEN.Value > 0)
     3122                {
     3123                    MessageBox.Show("You cannot move a radiology appointment.", "Clinical Scheduling");
     3124                    return;
     3125                }
     3126               
     3127                if (e.Appointment.CheckInTime.Ticks > 0)
     3128                                {
     3129                                        MessageBox.Show("You cannot change the appointment time because the patient has already checked in.", "Clinical Scheduling");
    29673130                                        return;
    29683131                                }
     
    36243787        }
    36253788
    3626         private void ctxCalGridMkRadAppt_Click(object sender, EventArgs e)
    3627         {
    3628             DateTime dStart, dEnd;
    3629             string sResource;
    3630             int nAccessTypeID = 0;
    3631 
    3632             this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource);
    3633             this.calendarGrid1.GetSelectedType(out nAccessTypeID);
    3634             //Display a dialog to collect Patient Name
    3635             DPatientLookup dPat = new DPatientLookup();
    3636             dPat.DocManager = m_DocManager;
    3637 
    3638             if (dPat.ShowDialog(this) == DialogResult.Cancel)
    3639             {
    3640                 return;
    3641             }
    3642 
    3643             int DFN = Int32.Parse(dPat.PatientIEN);
    3644             int hlIEN = (from resource in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable()
    3645                         where resource.Field<string>("RESOURCE_NAME") == sResource
    3646                         select resource.Field<int>("HOSPITAL_LOCATION_ID")).FirstOrDefault();
    3647 
    3648             List<RadiologyExam> _radExams = CGDocumentManager.Current.DAL.GetRadiologyExamsForPatientinHL(DFN, hlIEN);
    3649 
    3650             if (!_radExams.Any())
    3651             {
    3652                 MessageBox.Show("Patient does not have any radiology exams to register.");
    3653                 return;
    3654             }
    3655 
    3656             DRadExamsSelect _radform = new DRadExamsSelect(_radExams);
    3657 
    3658             if (_radform.ShowDialog() == DialogResult.Cancel) return;
    3659 
    3660             int _examien = _radform.ExamIEN;
    3661             string _procedurename = _radform.ProcedureName;
    3662 
    3663             CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien);
    3664 
    3665             //Now create and save the appointment
    3666             CGAppointment appt = new CGAppointment();
    3667             string _sNote = "Radiology Exam (" + _examien + "): " + _procedurename;
    3668             appt.CreateAppointment(dStart, dEnd, _sNote, 0, sResource);
    3669             appt.PatientID = Int32.Parse(dPat.PatientIEN);
    3670             appt.PatientName = dPat.PatientName;
    3671             appt.AccessTypeID = nAccessTypeID;
    3672             appt.RadiologyExamIEN = _examien;
    3673             this.Document.CreateAppointment(appt);
    3674 
    3675             //Now redraw the grid to display the new appointments
    3676             this.UpdateArrays();
    3677         }
    3678 
    3679 
    3680 
    3681 
    3682 
    36833789    }//End class
    36843790}
  • Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/CGView.resx

    r1110 r1166  
    121121    <value>17, 17</value>
    122122  </metadata>
    123   <metadata name="contextMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     123  <metadata name="ctxResourceTree.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    124124    <value>126, 17</value>
    125125  </metadata>
  • Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/DAL.cs

    r1140 r1166  
    206206        }
    207207
     208        /// <summary>
     209        /// TODO
     210        /// </summary>
     211        /// <param name="DFN"></param>
     212        /// <param name="examIEN"></param>
     213        /// <returns></returns>
    208214        public bool ScheduleRadiologyExam(int DFN, int examIEN)
    209215        {
    210216            string result = _thisConnection.bmxNetLib.TransmitRPC("BSDX SCHEDULE RAD EXAM", string.Format("{0}^{1}",DFN,examIEN));
     217            return result == "1" ? true : false;
     218        }
     219
     220        /// <summary>
     221        /// TODO
     222        /// </summary>
     223        /// <param name="DFN"></param>
     224        /// <param name="examIEN"></param>
     225        /// <returns></returns>
     226        public bool CancelRadiologyExam(int DFN, int examIEN)
     227        {
     228            string result = _thisConnection.bmxNetLib.TransmitRPC("BSDX HOLD RAD EXAM", string.Format("{0}^{1}", DFN, examIEN));
    211229            return result == "1" ? true : false;
    212230        }
Note: See TracChangeset for help on using the changeset viewer.