Changeset 1117 for Scheduling/trunk/cs
- Timestamp:
- Mar 29, 2011, 5:38:18 AM (14 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVDocument.cs
r1097 r1117 252 252 Debug.Write("CreateAvailabilityAuto -- new AV block created\n"); 253 253 254 UpdateAllViews();254 //UpdateAllViews(); 255 255 256 256 aCopy.AppointmentKey = nApptID; -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAVView.cs
r1097 r1117 884 884 //TODO: Create these components 885 885 this.calendarGrid1.Resources = this.m_Document.Resources; 886 this.calendarGrid1.Appointments = (CGAppointments)this.m_Document.m_AVBlocks.Clone(); 886 887 this.calendarGrid1.OnUpdateArrays(); 887 888 this.lblResource.Text = this.m_Document.DocName; … … 1042 1043 * Display dialog to collect: 1043 1044 * - Number of weeks to apply template 1044 * - Starting week Monday1045 * - Starting week (application starts on Culture WeekStartDay of selected week) 1045 1046 * - Template path & filename 1046 1047 * 1047 * for each week,1048 * Delete all availability during that week1049 * apply the template1050 1048 * 1051 1049 */ … … 1506 1504 dtStart = newStartDate; 1507 1505 int nWeeksToApply = dlg.WeeksToApply; 1508 DateTime dtEnd = dtStart.AddDays(6); // or 7? 1506 DateTime dtEnd = dtStart.AddDays(6); // or 7? smh:: not 7 for sure. 1509 1507 1510 1508 string sResourceID = this.m_Document.ResourceID.ToString(); -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs
r1112 r1117 1246 1246 } 1247 1247 1248 public string AppointmentNoShow( int nApptID, bool bNoShow)1248 public string AppointmentNoShow(CGAppointment a, bool bNoShow) 1249 1249 { 1250 1250 /* … … 1253 1253 * 1254 1254 */ 1255 1255 int nApptID = a.AppointmentKey; 1256 1256 string sTest = bNoShow.ToString(); 1257 1257 string sNoShow = (bNoShow == true) ? "1" : "0"; … … 1270 1270 } 1271 1271 1272 bool bRet = RefreshSchedule(); 1272 //All okay over here... then set appointment noshow or not no show... 1273 a.NoShow = bNoShow ? true : false; 1274 1275 //bool bRet = RefreshSchedule(); 1273 1276 1274 1277 return sErrorID; 1278 } 1279 1280 public bool AppointmentUndoCheckin(CGAppointment a, out string msg) 1281 { 1282 msg = ""; 1283 //zero good, anything else bad 1284 DataTable dt = CGDocumentManager.Current.DAL.RemoveCheckIn(a.AppointmentKey); 1285 if (dt.Rows[0][0].ToString() == "0") 1286 { 1287 a.CheckInTime = DateTime.MinValue; // remove check-in time. 1288 return true; 1289 } 1290 1291 else 1292 { 1293 msg = dt.Rows[0][0].ToString(); 1294 return false; 1295 } 1275 1296 } 1276 1297 -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocumentManager.cs
r1112 r1117 354 354 threadSplash.Start(m_ds); // pass form as parameter. 355 355 356 //There are 19steps to load the application. That's max for the progress bar.357 setMaxProgressDelegate( 19);356 //There are 21 steps to load the application. That's max for the progress bar. 357 setMaxProgressDelegate(21); 358 358 359 359 // smh--not used: System.Configuration.ConfigurationManager.GetSection("appSettings"); … … 472 472 } 473 473 474 //User Preferences Object 475 _current.UserPreferences = new UserPreferences(); 474 476 475 477 476 //User Interface Culture (m_CultureName is set from the command line flag /culture) … … 536 535 setStatusDelegate("Setting Application Context to BSDXRPC..."); 537 536 m_ConnectInfo.AppContext = "BSDXRPC"; 538 539 //Load global recordsets 537 538 //User Preferences Object 539 setProgressDelegate(4); //next number is 6 b/c two calls 540 setStatusDelegate("Getting User Preferences from the Server..."); 541 542 _current.UserPreferences = new UserPreferences(); // Does the calling to do that... 543 544 //Load global recordsets 540 545 string statusConst = "Loading VistA data tables..."; 541 546 setStatusDelegate(statusConst); … … 545 550 //Schedule User Info 546 551 // Table #4 547 setProgressDelegate( 4);552 setProgressDelegate(6); 548 553 setStatusDelegate(statusConst + " Schedule User"); 549 554 DataTable dtUser = _dal.GetUserInfo(m_ConnectInfo.DUZ); … … 560 565 //Get Access Types 561 566 // Table #5 562 setProgressDelegate( 5);567 setProgressDelegate(7); 563 568 setStatusDelegate(statusConst + " Access Types"); 564 569 DataTable dtAccessTypes = _dal.GetAccessTypes(); … … 568 573 //Get Access Groups 569 574 // Table #6 570 setProgressDelegate( 6);575 setProgressDelegate(8); 571 576 setStatusDelegate(statusConst + " Access Groups"); 572 577 LoadAccessGroupsTable(); … … 583 588 // But they are heavily referenced throughout the code. 584 589 // Table #7 585 setProgressDelegate( 7);590 setProgressDelegate(9); 586 591 setStatusDelegate(statusConst + " Access Group Types"); 587 592 LoadAccessGroupTypesTable(); … … 603 608 // Table #8 604 609 // What shows up on the tree. The groups the user has access to. 605 setProgressDelegate( 8);610 setProgressDelegate(10); 606 611 setStatusDelegate(statusConst + " Resource Groups By User"); 607 612 LoadResourceGroupTable(); … … 610 615 // Table #9 611 616 // Individual Resources 612 setProgressDelegate( 9);617 setProgressDelegate(11); 613 618 setStatusDelegate(statusConst + " Resources By User"); 614 619 LoadBSDXResourcesTable(); … … 622 627 // Table #10 623 628 // Resource Groups and Indivdual Resources together 624 setProgressDelegate(1 0);629 setProgressDelegate(12); 625 630 setStatusDelegate(statusConst + " Group Resources"); 626 631 LoadGroupResourcesTable(); … … 640 645 //HospitalLocation table 641 646 //Table #11 642 setProgressDelegate(1 1);647 setProgressDelegate(13); 643 648 setStatusDelegate(statusConst + " Clinics"); 644 649 //cmd.CommandText = "SELECT BMXIEN 'HOSPITAL_LOCATION_ID', NAME 'HOSPITAL_LOCATION', DEFAULT_PROVIDER, STOP_CODE_NUMBER, INACTIVATE_DATE, REACTIVATE_DATE FROM HOSPITAL_LOCATION"; … … 661 666 //Build ScheduleUser table 662 667 //Table #12 663 setProgressDelegate(1 2);668 setProgressDelegate(14); 664 669 setStatusDelegate(statusConst + " Schedule User"); 665 670 this.LoadScheduleUserTable(); … … 674 679 //Table #13 675 680 //Acess to Resources by [this] User 676 setProgressDelegate(1 3);681 setProgressDelegate(15); 677 682 setStatusDelegate(statusConst + " Resource User"); 678 683 this.LoadResourceUserTable(); … … 693 698 //Table #14 694 699 //TODO: Lazy load the provider table; no need to load in advance. 695 setProgressDelegate(1 4);700 setProgressDelegate(16); 696 701 setStatusDelegate(statusConst + " Providers"); 697 702 sCommandText = "SELECT BMXIEN, NAME FROM NEW_PERSON WHERE INACTIVE_DATE = '' AND BMXIEN > 1"; … … 701 706 //Build the HOLIDAY table 702 707 //Table #15 703 setProgressDelegate(1 5);708 setProgressDelegate(17); 704 709 setStatusDelegate(statusConst + " Holiday"); 705 710 sCommandText = "SELECT NAME, DATE FROM HOLIDAY WHERE INTERNAL[DATE] > '" + FMDateTime.Create(DateTime.Today).DateOnly.FMDateString + "'"; … … 721 726 setStatusDelegate("Subscribing to Server Events"); 722 727 //Table #16 723 setProgressDelegate(1 6);728 setProgressDelegate(18); 724 729 _current.m_ConnectInfo.SubscribeEvent("BSDX SCHEDULE"); 725 730 //Table #17 726 setProgressDelegate(1 7);731 setProgressDelegate(19); 727 732 _current.m_ConnectInfo.SubscribeEvent("BSDX CALL WORKSTATIONS"); 728 733 //Table #18 729 setProgressDelegate( 18);734 setProgressDelegate(20); 730 735 _current.m_ConnectInfo.SubscribeEvent("BSDX ADMIN MESSAGE"); 731 736 //Table #19 732 setProgressDelegate( 19);737 setProgressDelegate(21); 733 738 _current.m_ConnectInfo.SubscribeEvent("BSDX ADMIN SHUTDOWN"); 734 739 -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj.user
r1112 r1117 37 37 </RemoteDebugMachine> 38 38 <StartAction>Project</StartAction> 39 <StartArguments>/s=172.16.16.108 /p=9250 /a=BASMA.ALDWAIRI /v=SELEN.123 /culture= "ar-JO"</StartArguments>39 <StartArguments>/s=172.16.16.108 /p=9250 /a=BASMA.ALDWAIRI /v=SELEN.123 /culture=ar-JO</StartArguments> 40 40 <StartPage> 41 41 </StartPage> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DAL.cs
r1044 r1117 17 17 18 18 delegate DataTable RPMSDataTableDelegate(string CommandString, string TableName); // for use in calling (Sync and Async) 19 delegate string TransmitRPCAsync(string RPCName, string Params); //same idea 19 20 20 21 /// <summary> … … 174 175 175 176 /// <summary> 177 /// Remove the check-in for the appointment 178 /// </summary> 179 /// <param name="ApptID">Appointment IEN/Key</param> 180 /// <returns>Table with 1 columns: ERRORID. ErrorID of "0" is okay; 181 /// any other (negative numbers plus text) is bad</returns> 182 public DataTable RemoveCheckIn(int ApptID) 183 { 184 string cmd = string.Format("BSDX REMOVE CHECK-IN^{0}", ApptID); 185 return RPMSDataTable(cmd, ""); 186 } 187 188 /// <summary> 189 /// Save User Preference in DB For Printing Routing Slip 190 /// Uses Parameter BSDX AUTO PRINT RS 191 /// </summary> 192 /// <remarks> 193 /// Notice Code-Fu for Async Save... 194 /// </remarks> 195 public bool AutoPrintRoutingSlip 196 { 197 get 198 { 199 string val = _thisConnection.bmxNetLib.TransmitRPC("BSDX GET PARAM", "BSDX AUTO PRINT RS"); //1 = true; 0 = false; "" = not set 200 return val == "1" ? true : false; 201 } 202 set 203 { 204 TransmitRPCAsync _asyncTransmitter = new TransmitRPCAsync(_thisConnection.bmxNetLib.TransmitRPC); 205 // 0 = success; anything else is wrong. Not being tested here as its success is not critical to application use. 206 _asyncTransmitter.BeginInvoke("BSDX SET PARAM", String.Format("{0}^{1}", "BSDX AUTO PRINT RS", value ? "1" : "0"), null, null); 207 } 208 } 209 210 /// <summary> 211 /// Save User Preference in DB For Printing Routing Slip 212 /// Uses Parameter BSDX AUTO PRINT AS 213 /// </summary> 214 /// <remarks> 215 /// Notice Code-Fu for Async Save... 216 /// </remarks> 217 public bool AutoPrintAppointmentSlip 218 { 219 get 220 { 221 string val = _thisConnection.bmxNetLib.TransmitRPC("BSDX GET PARAM", "BSDX AUTO PRINT AS"); //1 = true; 0 = false; "" = not set 222 return val == "1" ? true : false; 223 } 224 set 225 { 226 TransmitRPCAsync _asyncTransmitter = new TransmitRPCAsync(_thisConnection.bmxNetLib.TransmitRPC); 227 // 0 = success; anything else is wrong. Not being tested here as its success is not critical to application use. 228 _asyncTransmitter.BeginInvoke("BSDX SET PARAM", String.Format("{0}^{1}", "BSDX AUTO PRINT AS", value ? "1" : "0"), null, null); 229 } 230 } 231 232 233 234 /// <summary> 176 235 /// Workhorse 177 236 /// </summary> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DAppointPage.cs
r1111 r1117 671 671 private string m_sCountry; 672 672 private int m_iAccessTypeID; 673 private bool _myCodeIsFiringIstheCheckBoxChangedEvent; 673 674 674 675 #endregion //fields … … 719 720 groupBox4.Controls.Add(UC); 720 721 722 _myCodeIsFiringIstheCheckBoxChangedEvent = true; 721 723 chkPrint.Checked = CGDocumentManager.Current.UserPreferences.PrintAppointmentSlipAutomacially; 724 _myCodeIsFiringIstheCheckBoxChangedEvent = false; 722 725 } 723 726 catch(Exception e) … … 862 865 863 866 /// <summary> 864 /// Save Print Slip preference in UserPreferences object. For now, it always starts false since 865 /// it isn't saved in the DB; but that will change in the future. 867 /// Save Print Slip preference in UserPreferences object. 866 868 /// </summary> 867 869 /// <param name="sender"></param> … … 869 871 private void chkPrint_CheckedChanged(object sender, EventArgs e) 870 872 { 873 if (_myCodeIsFiringIstheCheckBoxChangedEvent) return; 874 871 875 CGDocumentManager.Current.UserPreferences.PrintAppointmentSlipAutomacially = chkPrint.Checked; 872 876 } -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DCheckIn.cs
r1111 r1117 25 25 // 26 26 InitializeComponent(); 27 28 27 29 } 28 30 … … 60 62 private List<Provider> _providers; 61 63 private ToolTip toolTip1; 64 private bool _myCodeIsFiringIstheCheckBoxChangedEvent; // To prevent the event from firing when I set the control from code 62 65 63 66 #endregion Fields … … 233 236 } 234 237 235 //Print Routing Slip based on user preferences.238 _myCodeIsFiringIstheCheckBoxChangedEvent = true; 236 239 chkRoutingSlip.Checked = CGDocumentManager.Current.UserPreferences.PrintRoutingSlipAutomatically; 240 _myCodeIsFiringIstheCheckBoxChangedEvent = false; 237 241 238 242 UpdateDialogData(true); … … 475 479 private void chkRoutingSlip_CheckedChanged(object sender, EventArgs e) 476 480 { 481 if (_myCodeIsFiringIstheCheckBoxChangedEvent) return; 482 477 483 CGDocumentManager.Current.UserPreferences.PrintRoutingSlipAutomatically = chkRoutingSlip.Checked; 478 484 } -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DPatientLetter.cs
r1110 r1117 68 68 // 69 69 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 70 this.ClientSize = new System.Drawing.Size( 648, 398);70 this.ClientSize = new System.Drawing.Size(748, 443); 71 71 this.Name = "DPatientLetter"; 72 72 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; … … 404 404 _currentApptPrinting = 0; 405 405 } 406 406 407 } 407 408 } -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DPatientLetter.resx
r789 r1117 113 113 </resheader> 114 114 <resheader name="reader"> 115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>115 <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 116 116 </resheader> 117 117 <resheader name="writer"> 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="printAppts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">121 <value>1 16, 17</value>120 <metadata name="printAppts.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 121 <value>122, 17</value> 122 122 </metadata> 123 <metadata name="printReminderLetters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">124 <value>2 18, 17</value>123 <metadata name="printReminderLetters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 <value>231, 17</value> 125 125 </metadata> 126 <metadata name="printCancelLetters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">127 <value>3 74, 17</value>126 <metadata name="printCancelLetters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 127 <value>397, 17</value> 128 128 </metadata> 129 <metadata name="printRebookLetters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version= 2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">130 <value>5 15, 17</value>129 <metadata name="printRebookLetters.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 130 <value>547, 17</value> 131 131 </metadata> 132 132 </root> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/UserPreferences.cs
r1111 r1117 7 7 { 8 8 /// <summary> 9 /// Designed to keep user preferences. Very basic for now.9 /// Designed to keep user preferences. Gets settings from DB in constructor; Writes them back when changed. 10 10 /// </summary> 11 11 public class UserPreferences 12 12 { 13 bool _printAppointmentSlipAutomacially; 14 bool _printRoutingSlipAutomatically; 15 13 16 public UserPreferences() 14 17 { 15 PrintAppointmentSlipAutomacially = false; 16 PrintRoutingSlipAutomatically = false; 18 _printAppointmentSlipAutomacially = CGDocumentManager.Current.DAL.AutoPrintAppointmentSlip; 19 _printRoutingSlipAutomatically = CGDocumentManager.Current.DAL.AutoPrintRoutingSlip; 20 17 21 } 18 22 19 public bool PrintAppointmentSlipAutomacially { get; set; } 20 public bool PrintRoutingSlipAutomatically { get; set; } 23 public bool PrintAppointmentSlipAutomacially { 24 get { return _printAppointmentSlipAutomacially; } 25 set 26 { 27 CGDocumentManager.Current.DAL.AutoPrintAppointmentSlip = _printAppointmentSlipAutomacially = value; 28 } 29 } 30 31 public bool PrintRoutingSlipAutomatically 32 { 33 get { return _printRoutingSlipAutomatically; } 34 set 35 { 36 CGDocumentManager.Current.DAL.AutoPrintRoutingSlip = _printRoutingSlipAutomatically = value; 37 } 38 } 21 39 } 22 40 }
Note:
See TracChangeset
for help on using the changeset viewer.