- Timestamp:
- Mar 20, 2011, 3:22:11 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/DAppointPage.cs
r913 r1106 63 63 private Label label7; 64 64 private TextBox txtCountry; 65 private CheckBox chkPrint; 65 66 private IContainer components; 66 67 … … 125 126 this.dsPatientApptDisplay2BindingSource = new System.Windows.Forms.BindingSource(this.components); 126 127 this.dsPatientApptDisplay2 = new IndianHealthService.ClinicalScheduling.dsPatientApptDisplay2(); 128 this.chkPrint = new System.Windows.Forms.CheckBox(); 127 129 this.tabControl1.SuspendLayout(); 128 130 this.tabAppointment.SuspendLayout(); … … 532 534 // panel1 533 535 // 536 this.panel1.Controls.Add(this.chkPrint); 534 537 this.panel1.Controls.Add(this.cmdCancel); 535 538 this.panel1.Controls.Add(this.cmdOK); … … 573 576 this.dsPatientApptDisplay2.DataSetName = "dsPatientApptDisplay2"; 574 577 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; 575 588 // 576 589 // DAppointPage … … 596 609 this.groupBox2.PerformLayout(); 597 610 this.panel1.ResumeLayout(false); 611 this.panel1.PerformLayout(); 598 612 ((System.ComponentModel.ISupportInitialize)(this.patientApptsBindingSource)).EndInit(); 599 613 ((System.ComponentModel.ISupportInitialize)(this.dsPatientApptDisplay2BindingSource)).EndInit(); … … 611 625 private string m_sPatientHRN; 612 626 private string m_sPatientIEN; 613 private string m_sPatientDOB;627 private DateTime m_dPatientDOB; 614 628 private string m_sPatientPID; 615 629 … … 623 637 private string m_sNote; 624 638 private DateTime m_dStartTime; 639 private DateTime m_dEndTime; 625 640 private int m_nDuration; 626 641 private string m_sClinic; … … 629 644 private string m_sEmail; 630 645 private string m_sCountry; 646 private int m_iAccessTypeID; 631 647 632 648 #endregion //fields … … 636 652 public void InitializePage(CGAppointment a) 637 653 { 638 InitializePage(a.PatientID.ToString(), a.StartTime, a. Duration, "", a.Note);654 InitializePage(a.PatientID.ToString(), a.StartTime, a.EndTime, "", a.Note, a.AccessTypeID); 639 655 } 640 656 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) 642 658 { 643 659 m_dStartTime = dStart; 644 m_nDuration = nDuration; 660 m_dEndTime = dEnd; 661 m_nDuration = (int)(dEnd - dStart).TotalMinutes; 662 m_iAccessTypeID = iAccessTypeID; 645 663 m_sClinic = sClinic; 646 664 m_sPatientIEN = sPatientIEN; … … 659 677 this.m_sPatientIEN = r["IEN"].ToString(); 660 678 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"]; 663 680 this.m_sStreet = r["STREET"].ToString(); 664 681 this.m_sCity = r["CITY"].ToString(); … … 695 712 696 713 txtCity.Text = this.m_sCity; 697 txtDOB.Text = this.m_ sPatientDOB;714 txtDOB.Text = this.m_dPatientDOB.ToShortDateString(); 698 715 txtHRN.Text = this.m_sPatientHRN; 699 716 txtNote.Text = this.m_sNote; … … 767 784 } 768 785 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 } 769 830 #endregion //Properties 770 831
Note:
See TracChangeset
for help on using the changeset viewer.