Ignore:
Timestamp:
Mar 21, 2011, 8:47:45 AM (13 years ago)
Author:
Sam Habiel
Message:

CGDocument:

CGDocumentManager:

CGView: (Changes to support printing of Appointment Slip)

  • Changed name and text of context menu to say "print appointment slip"
  • Logic to Print Appointment Slip

CustomPrinting.cs renamed to Printing.cs; old Printing.Cs removed.
DAppointPage:

  • New checkbox to request printing of Appointment Slip
  • Sex of patient now pulled and included in form.

DPatientLetter:

  • Redirected to use new Printing framework.

Patient:

Printing:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs

    r1106 r1110  
    11using System;
    2 using System.Drawing;
    32using System.Collections;
    43using System.ComponentModel;
     
    98using IndianHealthService.BMXNet;
    109using System.Runtime.InteropServices;
     10using System.Drawing.Printing;
    1111
    1212namespace IndianHealthService.ClinicalScheduling
     
    9797                private System.Windows.Forms.MenuItem mnuDisplayWalkIns;
    9898        private System.Windows.Forms.MenuItem mnuRPMSDivision;
    99         private System.Drawing.Printing.PrintDocument printRoutingSlip;
    10099        private MenuItem menuItem10;
    101         private MenuItem ctxCalGridReprintRoutingSlip;
     100        private MenuItem ctxCalGridReprintApptSlip;
    102101        private IContainer components;
    103102
     
    233232            this.lblResource = new System.Windows.Forms.Label();
    234233            this.panelCenter = new System.Windows.Forms.Panel();
     234            this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
    235235            this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu();
    236236            this.ctxCalGridAdd = new System.Windows.Forms.MenuItem();
     
    244244            this.ctxCalGridWalkin = new System.Windows.Forms.MenuItem();
    245245            this.menuItem10 = new System.Windows.Forms.MenuItem();
    246             this.ctxCalGridReprintRoutingSlip = new System.Windows.Forms.MenuItem();
     246            this.ctxCalGridReprintApptSlip = new System.Windows.Forms.MenuItem();
    247247            this.panelBottom = new System.Windows.Forms.Panel();
    248248            this.statusBar1 = new System.Windows.Forms.StatusBar();
    249249            this.splitter1 = new System.Windows.Forms.Splitter();
    250250            this.splitter2 = new System.Windows.Forms.Splitter();
    251             this.printRoutingSlip = new System.Drawing.Printing.PrintDocument();
    252             this.calendarGrid1 = new IndianHealthService.ClinicalScheduling.CalendarGrid();
    253251            this.panelRight.SuspendLayout();
    254252            this.panelClip.SuspendLayout();
     
    763761            this.panelCenter.Size = new System.Drawing.Size(857, 345);
    764762            this.panelCenter.TabIndex = 7;
    765             //
    766             // ctxCalendarGrid
    767             //
    768             this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
    769             this.ctxCalGridAdd,
    770             this.ctxCalGridEdit,
    771             this.ctxCalGridDelete,
    772             this.ctxCalGridCheckIn,
    773             this.menuItem2,
    774             this.ctxCalGridNoShow,
    775             this.ctxCalGridNoShowUndo,
    776             this.menuItem9,
    777             this.ctxCalGridWalkin,
    778             this.menuItem10,
    779             this.ctxCalGridReprintRoutingSlip});
    780             this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
    781             //
    782             // ctxCalGridAdd
    783             //
    784             this.ctxCalGridAdd.Index = 0;
    785             this.ctxCalGridAdd.Text = "Add Appointment";
    786             this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
    787             //
    788             // ctxCalGridEdit
    789             //
    790             this.ctxCalGridEdit.Index = 1;
    791             this.ctxCalGridEdit.Text = "Edit Appointment";
    792             this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
    793             //
    794             // ctxCalGridDelete
    795             //
    796             this.ctxCalGridDelete.Index = 2;
    797             this.ctxCalGridDelete.Text = "Cancel Appointment";
    798             this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
    799             //
    800             // ctxCalGridCheckIn
    801             //
    802             this.ctxCalGridCheckIn.Index = 3;
    803             this.ctxCalGridCheckIn.Text = "Check In Patient";
    804             this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
    805             //
    806             // menuItem2
    807             //
    808             this.menuItem2.Index = 4;
    809             this.menuItem2.Text = "-";
    810             //
    811             // ctxCalGridNoShow
    812             //
    813             this.ctxCalGridNoShow.Index = 5;
    814             this.ctxCalGridNoShow.Text = "Mark as No Show";
    815             this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);
    816             //
    817             // ctxCalGridNoShowUndo
    818             //
    819             this.ctxCalGridNoShowUndo.Index = 6;
    820             this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
    821             this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
    822             //
    823             // menuItem9
    824             //
    825             this.menuItem9.Index = 7;
    826             this.menuItem9.Text = "-";
    827             //
    828             // ctxCalGridWalkin
    829             //
    830             this.ctxCalGridWalkin.Index = 8;
    831             this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";
    832             this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);
    833             //
    834             // menuItem10
    835             //
    836             this.menuItem10.Index = 9;
    837             this.menuItem10.Text = "-";
    838             //
    839             // ctxCalGridReprintRoutingSlip
    840             //
    841             this.ctxCalGridReprintRoutingSlip.Index = 10;
    842             this.ctxCalGridReprintRoutingSlip.Text = "&Reprint Routing Slip";
    843             this.ctxCalGridReprintRoutingSlip.Click += new System.EventHandler(this.ctxCalGridReprintRoutingSlip_Click);
    844             //
    845             // panelBottom
    846             //
    847             this.panelBottom.Controls.Add(this.statusBar1);
    848             this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
    849             this.panelBottom.Location = new System.Drawing.Point(136, 369);
    850             this.panelBottom.Name = "panelBottom";
    851             this.panelBottom.Size = new System.Drawing.Size(857, 24);
    852             this.panelBottom.TabIndex = 8;
    853             //
    854             // statusBar1
    855             //
    856             this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;
    857             this.statusBar1.Location = new System.Drawing.Point(0, 0);
    858             this.statusBar1.Name = "statusBar1";
    859             this.statusBar1.Size = new System.Drawing.Size(857, 24);
    860             this.statusBar1.SizingGrip = false;
    861             this.statusBar1.TabIndex = 0;
    862             //
    863             // splitter1
    864             //
    865             this.splitter1.Location = new System.Drawing.Point(128, 24);
    866             this.splitter1.Name = "splitter1";
    867             this.splitter1.Size = new System.Drawing.Size(8, 369);
    868             this.splitter1.TabIndex = 9;
    869             this.splitter1.TabStop = false;
    870             //
    871             // splitter2
    872             //
    873             this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
    874             this.splitter2.Location = new System.Drawing.Point(993, 24);
    875             this.splitter2.Name = "splitter2";
    876             this.splitter2.Size = new System.Drawing.Size(3, 369);
    877             this.splitter2.TabIndex = 10;
    878             this.splitter2.TabStop = false;
    879             //
    880             // printRoutingSlip
    881             //
    882             this.printRoutingSlip.DocumentName = "Routing Slip";
    883             this.printRoutingSlip.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printRoutingSlip_PrintPage);
    884763            //
    885764            // calendarGrid1
     
    912791            this.calendarGrid1.MouseEnter += new System.EventHandler(this.calendarGrid1_MouseEnter);
    913792            //
     793            // ctxCalendarGrid
     794            //
     795            this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     796            this.ctxCalGridAdd,
     797            this.ctxCalGridEdit,
     798            this.ctxCalGridDelete,
     799            this.ctxCalGridCheckIn,
     800            this.menuItem2,
     801            this.ctxCalGridNoShow,
     802            this.ctxCalGridNoShowUndo,
     803            this.menuItem9,
     804            this.ctxCalGridWalkin,
     805            this.menuItem10,
     806            this.ctxCalGridReprintApptSlip});
     807            this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup);
     808            //
     809            // ctxCalGridAdd
     810            //
     811            this.ctxCalGridAdd.Index = 0;
     812            this.ctxCalGridAdd.Text = "Add Appointment";
     813            this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click);
     814            //
     815            // ctxCalGridEdit
     816            //
     817            this.ctxCalGridEdit.Index = 1;
     818            this.ctxCalGridEdit.Text = "Edit Appointment";
     819            this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click);
     820            //
     821            // ctxCalGridDelete
     822            //
     823            this.ctxCalGridDelete.Index = 2;
     824            this.ctxCalGridDelete.Text = "Cancel Appointment";
     825            this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click);
     826            //
     827            // ctxCalGridCheckIn
     828            //
     829            this.ctxCalGridCheckIn.Index = 3;
     830            this.ctxCalGridCheckIn.Text = "Check In Patient";
     831            this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click);
     832            //
     833            // menuItem2
     834            //
     835            this.menuItem2.Index = 4;
     836            this.menuItem2.Text = "-";
     837            //
     838            // ctxCalGridNoShow
     839            //
     840            this.ctxCalGridNoShow.Index = 5;
     841            this.ctxCalGridNoShow.Text = "Mark as No Show";
     842            this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click);
     843            //
     844            // ctxCalGridNoShowUndo
     845            //
     846            this.ctxCalGridNoShowUndo.Index = 6;
     847            this.ctxCalGridNoShowUndo.Text = "Undo NoShow";
     848            this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click);
     849            //
     850            // menuItem9
     851            //
     852            this.menuItem9.Index = 7;
     853            this.menuItem9.Text = "-";
     854            //
     855            // ctxCalGridWalkin
     856            //
     857            this.ctxCalGridWalkin.Index = 8;
     858            this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment";
     859            this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click);
     860            //
     861            // menuItem10
     862            //
     863            this.menuItem10.Index = 9;
     864            this.menuItem10.Text = "-";
     865            //
     866            // ctxCalGridReprintApptSlip
     867            //
     868            this.ctxCalGridReprintApptSlip.Index = 10;
     869            this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip";
     870            this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click);
     871            //
     872            // panelBottom
     873            //
     874            this.panelBottom.Controls.Add(this.statusBar1);
     875            this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
     876            this.panelBottom.Location = new System.Drawing.Point(136, 369);
     877            this.panelBottom.Name = "panelBottom";
     878            this.panelBottom.Size = new System.Drawing.Size(857, 24);
     879            this.panelBottom.TabIndex = 8;
     880            //
     881            // statusBar1
     882            //
     883            this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;
     884            this.statusBar1.Location = new System.Drawing.Point(0, 0);
     885            this.statusBar1.Name = "statusBar1";
     886            this.statusBar1.Size = new System.Drawing.Size(857, 24);
     887            this.statusBar1.SizingGrip = false;
     888            this.statusBar1.TabIndex = 0;
     889            //
     890            // splitter1
     891            //
     892            this.splitter1.Location = new System.Drawing.Point(128, 24);
     893            this.splitter1.Name = "splitter1";
     894            this.splitter1.Size = new System.Drawing.Size(8, 369);
     895            this.splitter1.TabIndex = 9;
     896            this.splitter1.TabStop = false;
     897            //
     898            // splitter2
     899            //
     900            this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
     901            this.splitter2.Location = new System.Drawing.Point(993, 24);
     902            this.splitter2.Name = "splitter2";
     903            this.splitter2.Size = new System.Drawing.Size(3, 369);
     904            this.splitter2.TabIndex = 10;
     905            this.splitter2.TabStop = false;
     906            //
    914907            // CGView
    915908            //
     
    12241217                        ctxCalGridWalkin.Enabled = ctxCalGridAdd.Enabled;
    12251218            //smh new code
    1226             ctxCalGridReprintRoutingSlip.Enabled = ctxCalGridEdit.Enabled;
     1219            ctxCalGridReprintApptSlip.Enabled = ctxCalGridEdit.Enabled;
    12271220                    //end new code
    12281221        }
     
    12651258
    12661259        //new code smh
    1267         private void ctxCalGridReprintRoutingSlip_Click(object sender, EventArgs e)
     1260        private void ctxCalGridReprintApptSlip_Click(object sender, EventArgs e)
    12681261        {
    1269             printRoutingSlip.Print();
     1262            int apptID = this.CGrid.SelectedAppointment;
     1263            if (apptID <= 0) return;
     1264
     1265            CGAppointment a = (CGAppointment) this.Appointments.AppointmentTable[apptID];
     1266           
     1267            PrintDocument pd = new PrintDocument() { DocumentName = "Appointment Slip for Appt " + apptID };  //Autoinit for DocName
     1268            pd.PrintPage += (s, pe) =>  //son of a lambda
     1269            {
     1270                CGDocumentManager.Current.PrintingObject.PrintAppointmentSlip(a, pe);
     1271            };
     1272           
     1273            pd.Print();
    12701274        }
    12711275        //end new code
     
    19962000                //smh new code
    19972001                if (dlgCheckin.PrintRouteSlip)
    1998                     this.printRoutingSlip.Print();
     2002                 //   this.printRoutingSlip.Print();
    19992003                // end new code
    20002004
     
    32473251            int nApptID = this.calendarGrid1.SelectedAppointment;
    32483252            CGAppointment a = (CGAppointment)this.Appointments.AppointmentTable[nApptID];
    3249             ClinicalScheduling.Printing.PrintRoutingSlip(a, "Routing Slip", e);
     3253            CGDocumentManager.Current.PrintingObject.PrintRoutingSlip(a, "Routing Slip", e);
    32503254        }
    32513255
Note: See TracChangeset for help on using the changeset viewer.