- Timestamp:
- Jun 6, 2010, 8:59:53 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/DPatientLetter.cs
r788 r789 31 31 dsPatientApptDisplay2 _dsApptDisplay; 32 32 private PrintDocument printCancelLetters; 33 private PrintDocument printRebookLetters; 33 34 dsRebookAppts _dsRebookAppts; 34 35 #endregion Fields … … 73 74 } 74 75 75 public void InitializeFormRebookLetters(CGDocumentManager docManager, 76 /// <summary> 77 /// Print Rebook Letters by Date 78 /// </summary> 79 /// <param name="docManager">This docManger</param> 80 /// <param name="sClinicList">Clinics for which to print</param> 81 /// <param name="dtBegin">Beginning Date</param> 82 /// <param name="dtEnd">End Date</param> 83 public void InitializeFormRebookLetters(CGDocumentManager docManager, 76 84 string sClinicList, 77 85 DateTime dtBegin, … … 89 97 90 98 //Call RPC to get list of appt ids that have been rebooked for these clinics on these dates 91 string sSql1 = "BSDX REBOOK CLINIC LIST^" + sClinicList + "^" + sBegin + "^" + sEnd; 92 DataTable dtLetters = docManager.RPMSDataTable(sSql1, "PatientAppts"); 93 99 string sSql1 = "BSDX REBOOK CLINIC LIST^" + sClinicList + "^" + sBegin + "^" + sEnd; 94 100 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList; 95 DataTable dt = docManager.RPMSDataTable(sSql2, "Resources"); 101 102 _dsRebookAppts = new dsRebookAppts(); 103 _dsRebookAppts.PatientAppts.Merge(docManager.RPMSDataTable(sSql1, "PatientAppts")); 104 _dsRebookAppts.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources")); 105 96 106 } 97 107 catch (Exception ex) … … 99 109 throw ex; 100 110 } 101 } 111 112 PrintPreviewControl.Document = printRebookLetters; 113 114 } 115 116 /// <summary> 117 /// Print Rebook Letters by Date 118 /// </summary> 119 /// <param name="docManager">This docManger</param> 120 /// <param name="sClinicList">Clinics for which to print</param> 121 /// <param name="sApptIDList">List of appointments IENs in ^BSDXAPPT, delimited by |</param> 102 122 public void InitializeFormRebookLetters(CGDocumentManager docManager, 103 123 string sClinicList, … … 111 131 } 112 132 113 string sSql = "BSDX REBOOK LIST^" + sApptIDList; 114 DataTable dtLetters = docManager.RPMSDataTable(sSql, "PatientAppts"); 115 133 string sSql1 = "BSDX REBOOK LIST^" + sApptIDList; 116 134 string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList; 117 DataTable dt = docManager.RPMSDataTable(sSql2, "Resources"); 135 136 _dsRebookAppts = new dsRebookAppts(); 137 _dsRebookAppts.PatientAppts.Merge(docManager.RPMSDataTable(sSql1, "PatientAppts")); 138 _dsRebookAppts.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources")); 139 118 140 119 141 } … … 122 144 throw ex; 123 145 } 146 147 PrintPreviewControl.Document = printRebookLetters; 124 148 } 125 149 … … 203 227 } 204 228 205 229 /// <summary> 230 /// Ctor 231 /// </summary> 206 232 public DPatientLetter() : base() 207 233 { … … 241 267 this.printReminderLetters = new System.Drawing.Printing.PrintDocument(); 242 268 this.printCancelLetters = new System.Drawing.Printing.PrintDocument(); 269 this.printRebookLetters = new System.Drawing.Printing.PrintDocument(); 243 270 this.SuspendLayout(); 244 271 // … … 254 281 // 255 282 this.printCancelLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printCancelLetters_PrintPage); 283 // 284 // printRebookLetters 285 // 286 this.printRebookLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printRebookLetters_PrintPage); 256 287 // 257 288 // DPatientLetter … … 332 363 333 364 } 365 366 private void printRebookLetters_PrintPage(object sender, PrintPageEventArgs e) 367 { 368 // no patients 369 if (_dsRebookAppts.PatientAppts.Count == 0) 370 { 371 ClinicalScheduling.Printing.PrintMessage("No Appointments found", e); 372 return; 373 } 374 // if there are patients 375 else if (_currentApptPrinting < _dsRebookAppts.PatientAppts.Count) 376 { 377 dsRebookAppts.BSDXResourceRow c = (dsRebookAppts.BSDXResourceRow) 378 _dsRebookAppts.PatientAppts[_currentApptPrinting].GetParentRow(_dsRebookAppts.Relations[0]); 379 //XXX: Rebook letter rather oddly currently stored in NO SHOW LETTER field. What gives??? 380 ClinicalScheduling.Printing.PrintRebookLetter(_dsRebookAppts.PatientAppts[_currentApptPrinting], e, c.NO_SHOW_LETTER, "Rebook Letter"); 381 _currentApptPrinting++; 382 if (_currentApptPrinting < _dsRebookAppts.PatientAppts.Count) 383 e.HasMorePages = true; 384 } 385 } 334 386 } 335 387 }
Note:
See TracChangeset
for help on using the changeset viewer.