Ignore:
Timestamp:
Mar 20, 2011, 3:22:11 AM (13 years ago)
Author:
Sam Habiel
Message:

CalendarGrid:

  • Support for Autoscrolling corrected.
  • A little optimization: Grid is only drawn once now when starting, not twice (don't know why original code did that).

CGAppointment:

  • Added member Patient (new Class)

CGDocument:

  • OnOpenDocument now accepts input of DateTime to decide where to open document.
  • SlotsAvailable algorithm now includes code for scaling according to timescale and code to merge Blocks if they are adjacent.

CGDocumentManager:

  • Fix bug having to do with canceling log-in after first retry. BMX lib threw an exception which was not caught.

CGView: Many changes:

  • SlotsAvailable signature changed in CGDocument. All references to it had to be changed.
  • Opening a node in the tvSchedules by clicking on the plus sign did not select it. Code changes to make it select it.
  • UpdateStatusBar now uses a string builder; and shows a more comprehensive message on the availability in the Status Bar.
  • Focus issues on various controls.
  • Support for printing a slip after an appointment is made automatically has been added.

CustomPrinting:

  • now includes a method to print a single appointment slip

DAppointPage:

  • Checkbox to decide whether to print appt slip added.
  • New readonly property to get the appointment that has been made (of type CGAppointment).

DApptSearch:

  • StartDate and EndDate now autoadjust based on each other.
  • lblMessage added to show user message if no appointments are found.
File:
1 edited

Legend:

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

    r913 r1106  
    6363        private Label label7;
    6464        private TextBox txtCountry;
     65        private CheckBox chkPrint;
    6566        private IContainer components;
    6667
     
    125126            this.dsPatientApptDisplay2BindingSource = new System.Windows.Forms.BindingSource(this.components);
    126127            this.dsPatientApptDisplay2 = new IndianHealthService.ClinicalScheduling.dsPatientApptDisplay2();
     128            this.chkPrint = new System.Windows.Forms.CheckBox();
    127129            this.tabControl1.SuspendLayout();
    128130            this.tabAppointment.SuspendLayout();
     
    532534            // panel1
    533535            //
     536            this.panel1.Controls.Add(this.chkPrint);
    534537            this.panel1.Controls.Add(this.cmdCancel);
    535538            this.panel1.Controls.Add(this.cmdOK);
     
    573576            this.dsPatientApptDisplay2.DataSetName = "dsPatientApptDisplay2";
    574577            this.dsPatientApptDisplay2.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
     578            //
     579            // chkPrint
     580            //
     581            this.chkPrint.AutoSize = true;
     582            this.chkPrint.Location = new System.Drawing.Point(13, 14);
     583            this.chkPrint.Name = "chkPrint";
     584            this.chkPrint.Size = new System.Drawing.Size(144, 17);
     585            this.chkPrint.TabIndex = 2;
     586            this.chkPrint.Text = "Print Appointment Letter";
     587            this.chkPrint.UseVisualStyleBackColor = true;
    575588            //
    576589            // DAppointPage
     
    596609            this.groupBox2.PerformLayout();
    597610            this.panel1.ResumeLayout(false);
     611            this.panel1.PerformLayout();
    598612            ((System.ComponentModel.ISupportInitialize)(this.patientApptsBindingSource)).EndInit();
    599613            ((System.ComponentModel.ISupportInitialize)(this.dsPatientApptDisplay2BindingSource)).EndInit();
     
    611625                private string                  m_sPatientHRN;
    612626                private string                  m_sPatientIEN;
    613                 private string                  m_sPatientDOB;
     627                private DateTime                m_dPatientDOB;
    614628                private string                  m_sPatientPID;
    615629
     
    623637                private string                  m_sNote;
    624638                private DateTime                m_dStartTime;
     639        private DateTime        m_dEndTime;
    625640                private int                             m_nDuration;
    626641                private string                  m_sClinic;
     
    629644        private string          m_sEmail;
    630645        private string          m_sCountry;
     646        private int          m_iAccessTypeID;
    631647
    632648                #endregion //fields
     
    636652                public void InitializePage(CGAppointment a)
    637653                {
    638                         InitializePage(a.PatientID.ToString(), a.StartTime, a.Duration, "", a.Note);
     654                        InitializePage(a.PatientID.ToString(), a.StartTime, a.EndTime, "", a.Note, a.AccessTypeID);
    639655                }
    640656
    641                 public void InitializePage(string sPatientIEN, DateTime dStart, int nDuration, string sClinic, string sNote)
     657                public void InitializePage(string sPatientIEN, DateTime dStart, DateTime dEnd, string sClinic, string sNote, int iAccessTypeID)
    642658                {
    643659                        m_dStartTime = dStart;
    644                         m_nDuration = nDuration;
     660            m_dEndTime = dEnd;
     661                        m_nDuration = (int)(dEnd - dStart).TotalMinutes;
     662            m_iAccessTypeID = iAccessTypeID;
    645663                        m_sClinic = sClinic;
    646664                        m_sPatientIEN = sPatientIEN;
     
    659677                                this.m_sPatientIEN = r["IEN"].ToString();
    660678                this.m_sPatientPID = r["PID"].ToString();
    661                                 DateTime dDob =(DateTime) r["DOB"]; //what if it's null?
    662                                 this.m_sPatientDOB = dDob.ToShortDateString();
     679                                this.m_dPatientDOB = (DateTime) r["DOB"];
    663680                                this.m_sStreet = r["STREET"].ToString();
    664681                                this.m_sCity = r["CITY"].ToString();
     
    695712
    696713                                txtCity.Text = this.m_sCity;
    697                                 txtDOB.Text = this.m_sPatientDOB;
     714                                txtDOB.Text = this.m_dPatientDOB.ToShortDateString();
    698715                                txtHRN.Text = this.m_sPatientHRN;
    699716                                txtNote.Text = this.m_sNote;
     
    767784                }
    768785
     786        public bool PrintAppointmentSlip
     787        {
     788            get { return chkPrint.Checked; }
     789        }
     790
     791        public CGAppointment Appointment
     792        {
     793            get
     794            {
     795                Patient pt = new Patient
     796                {
     797                    DFN = Int32.Parse(m_sPatientIEN),
     798                    Name = m_sPatientName,
     799                    DOB = m_dPatientDOB,
     800                    ID = m_sPatientPID,
     801                    HRN = m_sPatientHRN,
     802                    Appointments = null, //for now
     803                    Street = m_sStreet,
     804                    City = m_sCity,
     805                    State = m_sState,
     806                    Zip = m_sZip,
     807                    Country = m_sCountry,
     808                    Email = m_sEmail,
     809                    HomePhone = m_sPhoneHome,
     810                    WorkPHone = m_sPhoneOffice,
     811                    CellPhone = m_sPhoneCell
     812                };
     813
     814                CGAppointment appt = new CGAppointment()
     815                {
     816                    PatientID = Convert.ToInt32(m_sPatientIEN),
     817                    PatientName = m_sPatientName,
     818                    StartTime = m_dStartTime,
     819                    EndTime = m_dEndTime,
     820                    Resource = m_sClinic,
     821                    Note = m_sNote,
     822                    HealthRecordNumber = m_sPatientHRN,
     823                    AccessTypeID = m_iAccessTypeID,
     824                    Patient = pt
     825                };
     826
     827                return appt;
     828            }
     829        }
    769830                #endregion //Properties
    770831
Note: See TracChangeset for help on using the changeset viewer.