Ignore:
Timestamp:
Mar 24, 2011, 9:26:14 AM (13 years ago)
Author:
Sam Habiel
Message:

CGDocument: Minor Change: Add appointment ID to Appointment
CGDocumentManager: added parameter /culture to set Thread.CurrentThread.CurrentUICulture
CGView: Minor changes in CheckInAppointment: Printing of Routing Slip now always happens.

Routing slip now get parameter for patient order.

Patient: i18n of UserFriendlyAge
Printing: Extensive changes. Support for i18n; new routing slip and appt slip. i18n support only for appt slip.

File:
1 edited

Legend:

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

    r1111 r1112  
    99using System.Runtime.InteropServices;
    1010using System.Drawing.Printing;
     11using System.Linq;
    1112
    1213namespace IndianHealthService.ClinicalScheduling
     
    19541955                                calendarGrid1.CGToolTip.Active = true;
    19551956
    1956                                 if (bAlreadyCheckedIn == true)
    1957                                         return;
    1958 
    1959                                 DateTime dtCheckIn = dlgCheckin.CheckInTime;
    1960 
    1961                 //Tell appointment that it is checked in, for proper coloring;
    1962                 //When you refresh from the DB, it will have this property.
    1963                 a.CheckInTime = DateTime.Now;
     1957                if (bAlreadyCheckedIn != true)
     1958                {
     1959                    DateTime dtCheckIn = dlgCheckin.CheckInTime;
     1960
     1961                    //Tell appointment that it is checked in, for proper coloring;
     1962                    //When you refresh from the DB, it will have this property.
     1963                    a.CheckInTime = DateTime.Now;
     1964
     1965                    //Save to Database
     1966                    this.Document.CheckInAppointment(nApptID, dtCheckIn);
     1967                }
    19641968               
    1965                 //Save to Database
    1966                 this.Document.CheckInAppointment(nApptID, dtCheckIn);
    1967 
    19681969                //Get Provider (XXXXXXXX: NOT SAVED TO THE DATABASE RIGHT NOW)
    19691970                a.Provider = dlgCheckin.Provider;
     
    21032104                        try
    21042105                        {
    2105                                
    2106                        
    21072106                                //Get Time and Resource from Selected Cell
    21082107                                DateTime dStart = DateTime.Today;
     
    32173216        private void PrintRoutingSlip(CGAppointment appt)
    32183217        {
     3218            //get this appointment's order
     3219            //Today's appointments
     3220            var todaysAppts = (from lkappts in this.Document.Appointments.AppointmentTable.Values.Cast<CGAppointment>()
     3221                               where lkappts.StartTime > appt.StartTime.Date && lkappts.StartTime < appt.StartTime.AddDays(1).Date
     3222                              orderby lkappts.StartTime
     3223                              select lkappts).ToList();
     3224           
     3225            //Find the order of the appointment
     3226            int apptOrder = todaysAppts.FindIndex(eachappt => eachappt.StartTime == appt.StartTime && eachappt.PatientID == appt.PatientID);
     3227 
     3228            //Index is zero based, so add 1
     3229            apptOrder++;
     3230
     3231            //Send that to the routing slip as a parameter
    32193232            PrintDocument pd = new PrintDocument() { DocumentName = "Routing Slip for Appt " + appt.AppointmentKey };
    3220             pd.PrintPage += (object s, System.Drawing.Printing.PrintPageEventArgs e) => CGDocumentManager.Current.PrintingObject.PrintRoutingSlip(appt, "Routing Slip", e);
     3233            pd.PrintPage += (object s, System.Drawing.Printing.PrintPageEventArgs e) => CGDocumentManager.Current.PrintingObject.PrintRoutingSlip(appt, apptOrder, e);
    32213234            pd.Print();
    32223235        }
Note: See TracChangeset for help on using the changeset viewer.