Changeset 900 for Scheduling/trunk/cs


Ignore:
Timestamp:
Aug 10, 2010, 8:00:01 AM (14 years ago)
Author:
Sam Habiel
Message:
  1. Fix bug of not showing appointments in 7 day view if arabic locale on machine.
  2. Fix printing of routing slip (add clinic and fix appointment time and HRN)
  3. Add RTL support for letters printed in Arabic Locale.
Location:
Scheduling/trunk/cs/bsdx0200GUISourceCode
Files:
5 edited

Legend:

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

    r622 r900  
    4242        public override string ToString()
    4343        {
     44            //StringFormat sf = new StringFormat();
     45            //sf.SetDigitSubstitution(System.Threading.Thread.CurrentThread.CurrentCulture.LCID, StringDigitSubstitute.National);
    4446            string patientName = "";
    4547            if (this.m_bAccessBlock)
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs

    r846 r900  
    659659            DateTime endTime = a.EndTime;
    660660            string resource = a.Resource;
    661             int num = 0;
    662             int num2 = 0;
    663             int num3 = 0;
    664             int num4 = 0;
    665             int num5 = 0;
     661            int originX = 0;
     662            int originY = 0;
     663            int recHeight = 0;
     664            int recWidth = 0;
     665            int columnToPutAppt = 0;
    666666            Rectangle rectangle = new Rectangle();
    667             int totalMinutes = (int) startTime.TimeOfDay.TotalMinutes;
    668             int num7 = (int) endTime.TimeOfDay.TotalMinutes;
     667            int startTotalMinutesoffset = (int) startTime.TimeOfDay.TotalMinutes;
     668            int endTotalMinutesoffset = (int) endTime.TimeOfDay.TotalMinutes;
     669            // if grid has more than one reource
    669670            if (this.m_sResourcesArray.Count > 1)
    670671            {
    671                 num5 = (int) this.m_ColumnInfoTable[resource];
    672                 num5++;
     672                // get zero based index
     673                columnToPutAppt = (int) this.m_ColumnInfoTable[resource];
     674                // increment to 1 based index
     675                columnToPutAppt++;
    673676            }
    674677            else
    675678            {
    676                 num5 = ((int) (startTime.DayOfWeek - this.m_dtStart.DayOfWeek)) + 1;
    677             }
    678             if (num5 < 1)
     679                columnToPutAppt = (startTime - this.m_dtStart).Days + 1;
     680            }
     681            if (columnToPutAppt < 1)
    679682            {
    680683                bRet = false;
    681684                return rectangle;
    682685            }
    683             num = col0Width + (cellWidth * (num5 - 1));
    684             int num8 = totalMinutes + this.m_nTimeScale;
    685             int num9 = (num7 > 0) ? num7 : 0x5a0;
    686             num9 -= totalMinutes;
    687             num2 = (cellHeight * num8) / this.m_nTimeScale;
    688             num3 = (cellHeight * num9) / this.m_nTimeScale;
    689             num4 = cellWidth;
    690             rectangle.X = num;
    691             rectangle.Y = num2;
    692             rectangle.Width = num4;
    693             rectangle.Height = num3;
     686            originX = col0Width + (cellWidth * (columnToPutAppt - 1));
     687            int num8 = startTotalMinutesoffset + this.m_nTimeScale;
     688            int num9 = (endTotalMinutesoffset > 0) ? endTotalMinutesoffset : 0x5a0;
     689            num9 -= startTotalMinutesoffset;
     690            originY = (cellHeight * num8) / this.m_nTimeScale;
     691            recHeight = (cellHeight * num9) / this.m_nTimeScale;
     692            recWidth = cellWidth;
     693            rectangle.X = originX;
     694            rectangle.Y = originY;
     695            rectangle.Width = recWidth;
     696            rectangle.Height = recHeight;
    694697            bRet = true;
    695698            return rectangle;
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user

    r884 r900  
    3636    </RemoteDebugMachine>
    3737    <StartAction>Project</StartAction>
    38     <StartArguments>/s=172.16.17.51 /p=9240 /a=shabiel12 /v=catdog.44 /e=windows-1256</StartArguments>
     38    <StartArguments>/s=10.161.20.25 /p=9235 /a=shabiel12 /v=abc,123! /e=windows-1256</StartArguments>
    3939    <StartPage>
    4040    </StartPage>
     
    5555    </RemoteDebugMachine>
    5656    <StartAction>Project</StartAction>
    57     <StartArguments>/s=172.16.17.51 /p=9240 /a=shabiel12 /v=catdog.44 /e=windows-1256</StartArguments>
     57    <StartArguments>/s=10.161.20.25 /p=9235 /a=shabiel12 /v=abc,123! /e=windows-1256</StartArguments>
    5858    <StartPage>
    5959    </StartPage>
  • Scheduling/trunk/cs/bsdx0200GUISourceCode/Printing.cs

    r804 r900  
    8686               
    8787                StringBuilder apptPrintStr = new StringBuilder(200);
    88                 apptPrintStr.AppendLine(a.ApptDate.ToString() + "\t" + a.Name + "(" + a.Sex + ")" + "\t" + "DOB: " + a.DOB.ToString("dd-MMM-yyyy") + "\t" + "ID: " + a.HRN);
     88                apptPrintStr.AppendLine(a.ApptDate.ToString() + "\t" + a.Name + " (" + a.Sex + ")" + "\t" + "DOB: " + a.DOB.ToShortDateString() + "\t" + "ID: " + a.HRN);
    8989                apptPrintStr.AppendLine("P: " + a.HOMEPHONE + "\t" + "Address: " + a.STREET + ", " + a.CITY + ", " + a.STATE + " " + a.ZIP);
    9090                apptPrintStr.AppendLine("Note: " + a.NOTE);
     
    158158            printArea.Height -= strHeight;
    159159
     160            //Text Direction
     161            StringFormat sf2 = new StringFormat();
     162            if (System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft)
     163                sf2.FormatFlags = StringFormatFlags.DirectionRightToLeft;
     164
    160165            // write missive
    161             g.DrawString(letter, fBody, Brushes.Black, printArea);
     166            g.DrawString(letter, fBody, Brushes.Black, printArea, sf2);
    162167
    163168            //print Address in lower left corner for windowed envolopes
     
    209214            printArea.Height -= strHeight;
    210215
     216            //Text Direction
     217            StringFormat sf2 = new StringFormat();
     218            if (System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft)
     219                sf2.FormatFlags = StringFormatFlags.DirectionRightToLeft;
     220           
    211221            // write missive
    212             g.DrawString(letter, fBody, Brushes.Black, printArea);
     222            g.DrawString(letter, fBody, Brushes.Black, printArea, sf2);
    213223
    214224            //print Address in lower left corner for windowed envolopes
     
    261271            printArea.Height -= strHeight;
    262272
     273            //Text Direction
     274            StringFormat sf2 = new StringFormat();
     275            if (System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft)
     276                sf2.FormatFlags = StringFormatFlags.DirectionRightToLeft;
     277
    263278            // write missive
    264             g.DrawString(letter, fBody, Brushes.Black, printArea);
     279            g.DrawString(letter, fBody, Brushes.Black, printArea, sf2);
    265280
    266281            //print Address in lower left corner for windowed envolopes
     
    313328            // draw underline
    314329            g.DrawLine(Pens.Black, printArea.Location, new Point(printArea.Right, printArea.Y));
     330
     331            // move down
    315332            printArea.Y += 15;
    316333            printArea.Height -= 15;
    317334
    318335            //construct what to print
    319             string toprint = "Patient: " + a.PatientName + "\t" + "ID: " + a.PatientID;
     336            string toprint = "Patient: " + a.PatientName + "\t" + "ID: " + a.HealthRecordNumber;
    320337            toprint += "\n\n";
    321             toprint += "Appointment Time: " + a.StartTime.ToLongDateString() + " " + a.StartTime.ToLongTimeString();
     338            toprint += "Clinic: " + a.Resource;
     339            toprint += "\n\n";
     340            toprint += "Appointment Time: " + a.StartTime;
    322341            toprint += "\n\n";
    323342            toprint += "Notes:\n" + a.Note;
Note: See TracChangeset for help on using the changeset viewer.