Changeset 1174 for Scheduling
- Timestamp:
- May 8, 2011, 5:17:53 AM (14 years ago)
- Location:
- Scheduling/trunk/cs/bsdx0200GUISourceCode
- Files:
-
- 18 edited
- 4 copied
Legend:
- Unmodified
- Added
- Removed
-
Scheduling/trunk/cs/bsdx0200GUISourceCode
-
Property svn:mergeinfo
set to (toggle deleted branches)
/Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode 1134-1171
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
Scheduling/trunk/cs/bsdx0200GUISourceCode/AssemblyInfo.cs
r1050 r1174 28 28 // by using the '*' as shown below: 29 29 30 [assembly: AssemblyVersion("1.5. 0.*")]30 [assembly: AssemblyVersion("1.5.1.*")] 31 31 32 32 // … … 58 58 [assembly: AssemblyKeyFile("")] 59 59 [assembly: AssemblyKeyName("")] 60 [assembly: AssemblyFileVersionAttribute("1.5. 0.0")]60 [assembly: AssemblyFileVersionAttribute("1.5.1.0")] 61 61 [assembly: ComVisibleAttribute(false)] -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointment.cs
r1111 r1174 4 4 using System.Drawing; 5 5 /// <summary> 6 /// Data Structuer to Represent an Appointment 7 /// 6 /// Data Structure to Represent an Appointment 8 7 /// </summary> 9 8 [Serializable] 10 9 public class CGAppointment 11 10 { 12 private bool m_bAccessBlock; 13 private bool m_bNoShow; 14 private bool m_bSelected = false; 15 private bool m_bWalkIn; 16 public DateTime m_dAuxTime; 17 public DateTime m_dCheckIn; 18 private DateTime m_EndTime; 19 public int m_nAccessTypeID = -1; 20 private int m_nColumn; 21 public int m_nKey; 22 private string m_Note; 23 public int m_nPatientID; 24 public int m_nSlots; 25 private Rectangle m_rectangle; 26 public string m_sAccessTypeName; 27 private string m_sHRN = ""; 28 private string m_sPatientName; 29 public string m_sResource; 30 private DateTime m_StartTime; 31 private string m_Text; 11 public int AccessTypeID { get; set; } 12 public string AccessTypeName { get; set; } 13 14 public int AppointmentKey { get; set; } 15 16 public DateTime AuxTime { get; set; } 17 public DateTime CheckInTime { get; set; } 18 public DateTime EndTime { get; set; } 19 public DateTime StartTime { get; set; } 20 21 public int GridColumn { get; set; } 22 public Rectangle GridRectangle { get; set; } 23 24 public bool IsAccessBlock { get; set; } 25 26 public bool NoShow { get; set; } 27 28 public string Note { get; set; } 29 30 public int PatientID { get; set; } 31 public string PatientName { get; set; } 32 public string Resource { get; set; } 33 public string HealthRecordNumber { get; set; } 34 35 public bool Selected { get; set; } 36 37 public int Slots { get; set; } 38 39 public bool WalkIn { get; set; } 40 41 public Patient Patient { get; set; } 42 public Provider Provider { get; set; } 43 44 public int? RadiologyExamIEN { get; set; } 45 46 47 public CGAppointment() 48 { 49 AccessTypeID = -1; 50 Selected = false; 51 HealthRecordNumber = ""; 52 } 32 53 33 54 public void CreateAppointment(DateTime StartTime, DateTime EndTime, string Note, int Key, string sResource) 34 55 { 35 this.m_StartTime = StartTime; 36 this.m_EndTime = EndTime; 37 this.m_Note = Note; 38 this.m_nKey = Key; 39 this.m_sResource = sResource; 40 } 56 this.StartTime = StartTime; 57 this.EndTime = EndTime; 58 this.Note = Note; 59 this.AppointmentKey = Key; 60 this.Resource = sResource; 61 } 62 63 public int Duration 64 { 65 get 66 { 67 TimeSpan span = (TimeSpan) (this.EndTime - this.StartTime); 68 return (int) span.TotalMinutes; 69 } 70 } 41 71 42 72 public override string ToString() 43 73 { 44 //StringFormat sf = new StringFormat();45 //sf.SetDigitSubstitution(System.Threading.Thread.CurrentThread.CurrentCulture.LCID, StringDigitSubstitute.National);46 74 string patientName = ""; 47 if (this. m_bAccessBlock)75 if (this.IsAccessBlock) 48 76 { 49 77 string str2 = (this.Slots == 1) ? " Slot, " : " Slots, "; … … 57 85 return (patientName + " " + this.Note); 58 86 } 59 60 public int AccessTypeID61 {62 get63 {64 return this.m_nAccessTypeID;65 87 } 66 set67 {68 this.m_nAccessTypeID = value;69 }70 }71 72 public string AccessTypeName73 {74 get75 {76 return this.m_sAccessTypeName;77 }78 set79 {80 this.m_sAccessTypeName = value;81 }82 }83 84 public int AppointmentKey85 {86 get87 {88 return this.m_nKey;89 }90 set91 {92 this.m_nKey = value;93 }94 }95 96 public DateTime AuxTime97 {98 get99 {100 return this.m_dAuxTime;101 }102 set103 {104 this.m_dAuxTime = value;105 }106 }107 108 public DateTime CheckInTime109 {110 get111 {112 return this.m_dCheckIn;113 }114 set115 {116 this.m_dCheckIn = value;117 }118 }119 120 public int Duration121 {122 get123 {124 TimeSpan span = (TimeSpan) (this.EndTime - this.StartTime);125 return (int) span.TotalMinutes;126 }127 }128 129 public DateTime EndTime130 {131 get132 {133 return this.m_EndTime;134 }135 set136 {137 this.m_EndTime = value;138 }139 }140 141 public int GridColumn142 {143 get144 {145 return this.m_nColumn;146 }147 set148 {149 this.m_nColumn = value;150 }151 }152 153 public Rectangle GridRectangle154 {155 get156 {157 return this.m_rectangle;158 }159 set160 {161 this.m_rectangle = value;162 }163 }164 165 public string HealthRecordNumber166 {167 get168 {169 return this.m_sHRN;170 }171 set172 {173 this.m_sHRN = value;174 }175 }176 177 public bool IsAccessBlock178 {179 get180 {181 return this.m_bAccessBlock;182 }183 set184 {185 this.m_bAccessBlock = value;186 }187 }188 189 public bool NoShow190 {191 get192 {193 return this.m_bNoShow;194 }195 set196 {197 this.m_bNoShow = value;198 }199 }200 201 public string Note202 {203 get204 {205 return this.m_Note;206 }207 set208 {209 this.m_Note = value;210 }211 }212 213 public int PatientID214 {215 get216 {217 return this.m_nPatientID;218 }219 set220 {221 this.m_nPatientID = value;222 }223 }224 225 public string PatientName226 {227 get228 {229 return this.m_sPatientName;230 }231 set232 {233 this.m_sPatientName = value;234 }235 }236 237 public string Resource238 {239 get240 {241 return this.m_sResource;242 }243 set244 {245 this.m_sResource = value;246 }247 }248 249 public bool Selected250 {251 get252 {253 return this.m_bSelected;254 }255 set256 {257 this.m_bSelected = value;258 }259 }260 261 public int Slots262 {263 get264 {265 return this.m_nSlots;266 }267 set268 {269 this.m_nSlots = value;270 }271 }272 273 public DateTime StartTime274 {275 get276 {277 return this.m_StartTime;278 }279 set280 {281 this.m_StartTime = value;282 }283 }284 285 public string Text286 {287 get288 {289 this.m_Text = this.m_sPatientName;290 return this.m_Text;291 }292 }293 294 public bool WalkIn295 {296 get297 {298 return this.m_bWalkIn;299 }300 set301 {302 this.m_bWalkIn = value;303 }304 }305 306 public Patient Patient { get; set; }307 public Provider Provider { get; set; }308 }309 88 } 310 89 -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGDocument.cs
r1143 r1174 238 238 sWalkIn = r["WALKIN"].ToString(); 239 239 bWalkIn = (sWalkIn == "1") ? true : false; 240 int? RadiologyExamIEN = r["RADIOLOGY_EXAM"] as Int32?; //new in v 1.6 - Get Radiology Exam 240 241 241 242 Patient pt = new Patient() … … 262 263 pAppointment.AccessTypeID = nAccessTypeID; 263 264 pAppointment.WalkIn = bWalkIn; 265 pAppointment.RadiologyExamIEN = RadiologyExamIEN; 264 266 this.m_appointments.AddAppointment(pAppointment); 265 267 … … 973 975 } 974 976 975 string sSql = "BSDX ADD NEW APPOINTMENT^" + sStart + "^" + sEnd + "^" + sPatID + "^" + sResource + "^" + sLen + "^" + sNote + "^" + sApptID ;977 string sSql = "BSDX ADD NEW APPOINTMENT^" + sStart + "^" + sEnd + "^" + sPatID + "^" + sResource + "^" + sLen + "^" + sNote + "^" + sApptID + "^" + rApptInfo.RadiologyExamIEN; 976 978 System.Data.DataTable dtAppt = m_DocManager.RPMSDataTable(sSql, "NewAppointment"); 977 979 -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGSchedLib.cs
r1097 r1174 2 2 using System.Data; 3 3 using System.Collections; 4 using System.Diagnostics;5 using System.Drawing;6 4 7 5 namespace IndianHealthService.ClinicalScheduling -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.cs
r1159 r1174 1 1 using System; 2 2 using System.Collections; 3 using System.Collections.Generic; 3 4 using System.ComponentModel; 4 5 using System.Windows.Forms; … … 48 49 private System.Windows.Forms.Panel panelBottom; 49 50 private System.Windows.Forms.Label lblResource; 50 private System.Windows.Forms.ContextMenu c ontextMenu1;51 private System.Windows.Forms.ContextMenu ctxResourceTree; 51 52 private System.Windows.Forms.MenuItem ctxOpenSchedule; 52 53 private System.Windows.Forms.MenuItem ctxEditAvailability; … … 90 91 private System.Windows.Forms.MenuItem mnuPrintCancellationLetters; 91 92 private System.Windows.Forms.MenuItem mnuWalkIn; 92 private System.Windows.Forms.MenuItem menuItem5;93 private System.Windows.Forms.MenuItem menuItem8;93 private System.Windows.Forms.MenuItem sepApptMenu1; 94 private System.Windows.Forms.MenuItem sepApptMenu2; 94 95 private System.Windows.Forms.MenuItem ctxCalGridWalkin; 95 private System.Windows.Forms.MenuItem menuItem2;96 private System.Windows.Forms.MenuItem menuItem9;96 private System.Windows.Forms.MenuItem ctxCalGridSep1; 97 private System.Windows.Forms.MenuItem ctxCalGridSep2; 97 98 private System.Windows.Forms.MenuItem mnuOpenMultipleSchedules; 98 99 private System.Windows.Forms.MenuItem mnuDisplayWalkIns; 99 100 private System.Windows.Forms.MenuItem mnuRPMSDivision; 100 private MenuItem menuItem10;101 private MenuItem ctxCalGridSep3; 101 102 private MenuItem ctxCalGridReprintApptSlip; 102 103 private MenuItem ctxCalGridUndoCheckin; … … 106 107 private MenuItem menuItem12; 107 108 private MenuItem mnuRefresh; 109 private MenuItem ctxCalGridMkRadAppt; 110 private MenuItem ctxCalGridCancelRadAppt; 111 private MenuItem mnuMkRadAppt; 112 private MenuItem mnuCancelRadAppt; 113 private MenuItem mnuUndoCheckin; 114 private MenuItem sepApptMenu3; 115 private MenuItem mnuReprintApptSlip; 108 116 private IContainer components; 109 117 … … 194 202 this.mnuAppointment = new System.Windows.Forms.MenuItem(); 195 203 this.mnuNewAppointment = new System.Windows.Forms.MenuItem(); 204 this.mnuWalkIn = new System.Windows.Forms.MenuItem(); 205 this.mnuMkRadAppt = new System.Windows.Forms.MenuItem(); 196 206 this.mnuEditAppointment = new System.Windows.Forms.MenuItem(); 197 207 this.mnuDeleteAppointment = new System.Windows.Forms.MenuItem(); 198 this.menuItem5 = new System.Windows.Forms.MenuItem(); 208 this.mnuCancelRadAppt = new System.Windows.Forms.MenuItem(); 209 this.sepApptMenu1 = new System.Windows.Forms.MenuItem(); 199 210 this.mnuNoShow = new System.Windows.Forms.MenuItem(); 200 211 this.mnuNoShowUndo = new System.Windows.Forms.MenuItem(); 201 this.menuItem8 = new System.Windows.Forms.MenuItem(); 212 this.sepApptMenu2 = new System.Windows.Forms.MenuItem(); 213 this.mnuCheckIn = new System.Windows.Forms.MenuItem(); 214 this.mnuUndoCheckin = new System.Windows.Forms.MenuItem(); 215 this.sepApptMenu3 = new System.Windows.Forms.MenuItem(); 216 this.mnuFindAppt = new System.Windows.Forms.MenuItem(); 202 217 this.mnuCopyAppointment = new System.Windows.Forms.MenuItem(); 203 this.mnuWalkIn = new System.Windows.Forms.MenuItem();204 this.mnuFindAppt = new System.Windows.Forms.MenuItem();205 this.mnuCheckIn = new System.Windows.Forms.MenuItem();206 218 this.mnuViewPatientAppts = new System.Windows.Forms.MenuItem(); 219 this.mnuReprintApptSlip = new System.Windows.Forms.MenuItem(); 207 220 this.mnuCalendar = new System.Windows.Forms.MenuItem(); 208 221 this.mnuDisplayWalkIns = new System.Windows.Forms.MenuItem(); … … 225 238 this.mnuTest1 = new System.Windows.Forms.MenuItem(); 226 239 this.tvSchedules = new System.Windows.Forms.TreeView(); 227 this.c ontextMenu1= new System.Windows.Forms.ContextMenu();240 this.ctxResourceTree = new System.Windows.Forms.ContextMenu(); 228 241 this.ctxOpenSchedule = new System.Windows.Forms.MenuItem(); 229 242 this.ctxEditAvailability = new System.Windows.Forms.MenuItem(); … … 246 259 this.ctxCalendarGrid = new System.Windows.Forms.ContextMenu(); 247 260 this.ctxCalGridAdd = new System.Windows.Forms.MenuItem(); 261 this.ctxCalGridMkRadAppt = new System.Windows.Forms.MenuItem(); 248 262 this.ctxCalGridEdit = new System.Windows.Forms.MenuItem(); 249 263 this.ctxCalGridDelete = new System.Windows.Forms.MenuItem(); 264 this.ctxCalGridCancelRadAppt = new System.Windows.Forms.MenuItem(); 250 265 this.ctxCalGridCheckIn = new System.Windows.Forms.MenuItem(); 251 266 this.ctxCalGridUndoCheckin = new System.Windows.Forms.MenuItem(); 252 this. menuItem2= new System.Windows.Forms.MenuItem();267 this.ctxCalGridSep1 = new System.Windows.Forms.MenuItem(); 253 268 this.ctxCalGridNoShow = new System.Windows.Forms.MenuItem(); 254 269 this.ctxCalGridNoShowUndo = new System.Windows.Forms.MenuItem(); 255 this. menuItem9= new System.Windows.Forms.MenuItem();270 this.ctxCalGridSep2 = new System.Windows.Forms.MenuItem(); 256 271 this.ctxCalGridWalkin = new System.Windows.Forms.MenuItem(); 257 this. menuItem10= new System.Windows.Forms.MenuItem();272 this.ctxCalGridSep3 = new System.Windows.Forms.MenuItem(); 258 273 this.ctxCalGridReprintApptSlip = new System.Windows.Forms.MenuItem(); 259 274 this.panelBottom = new System.Windows.Forms.Panel(); … … 369 384 // 370 385 this.mnuPrintReminderLetters.Index = 10; 371 this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.Ctrl I;386 this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlE; 372 387 this.mnuPrintReminderLetters.Text = "Print Rem&inder Letters"; 373 388 this.mnuPrintReminderLetters.Click += new System.EventHandler(this.mnuPrintReminderLetters_Click); … … 411 426 this.mnuAppointment.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 412 427 this.mnuNewAppointment, 428 this.mnuWalkIn, 429 this.mnuMkRadAppt, 413 430 this.mnuEditAppointment, 414 431 this.mnuDeleteAppointment, 415 this.menuItem5, 432 this.mnuCancelRadAppt, 433 this.sepApptMenu1, 416 434 this.mnuNoShow, 417 435 this.mnuNoShowUndo, 418 this.menuItem8, 436 this.sepApptMenu2, 437 this.mnuCheckIn, 438 this.mnuUndoCheckin, 439 this.sepApptMenu3, 440 this.mnuFindAppt, 419 441 this.mnuCopyAppointment, 420 this.mnuWalkIn, 421 this.mnuFindAppt, 422 this.mnuCheckIn, 423 this.mnuViewPatientAppts}); 442 this.mnuViewPatientAppts, 443 this.mnuReprintApptSlip}); 424 444 this.mnuAppointment.Text = "&Appointment"; 425 445 this.mnuAppointment.Popup += new System.EventHandler(this.mnuAppointment_Popup); … … 432 452 this.mnuNewAppointment.Click += new System.EventHandler(this.mnuNewAppointment_Click); 433 453 // 454 // mnuWalkIn 455 // 456 this.mnuWalkIn.Index = 1; 457 this.mnuWalkIn.Shortcut = System.Windows.Forms.Shortcut.ShiftIns; 458 this.mnuWalkIn.Text = "Create Wal&k-In Appointment"; 459 this.mnuWalkIn.Click += new System.EventHandler(this.mnuWalkIn_Click); 460 // 461 // mnuMkRadAppt 462 // 463 this.mnuMkRadAppt.Index = 2; 464 this.mnuMkRadAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlIns; 465 this.mnuMkRadAppt.Text = "Make Radiology Appointment"; 466 this.mnuMkRadAppt.Click += new System.EventHandler(this.mnuMkRadAppt_Click); 467 // 434 468 // mnuEditAppointment 435 469 // 436 this.mnuEditAppointment.Index = 1;470 this.mnuEditAppointment.Index = 3; 437 471 this.mnuEditAppointment.Shortcut = System.Windows.Forms.Shortcut.F2; 438 472 this.mnuEditAppointment.Text = "&Edit Appointment"; … … 441 475 // mnuDeleteAppointment 442 476 // 443 this.mnuDeleteAppointment.Index = 2;477 this.mnuDeleteAppointment.Index = 4; 444 478 this.mnuDeleteAppointment.Shortcut = System.Windows.Forms.Shortcut.Del; 445 479 this.mnuDeleteAppointment.Text = "Cance&l Appointment"; 446 480 this.mnuDeleteAppointment.Click += new System.EventHandler(this.mnuDeleteAppointment_Click); 447 481 // 448 // menuItem5 449 // 450 this.menuItem5.Index = 3; 451 this.menuItem5.Text = "-"; 482 // mnuCancelRadAppt 483 // 484 this.mnuCancelRadAppt.Index = 5; 485 this.mnuCancelRadAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlDel; 486 this.mnuCancelRadAppt.Text = "Cancel Radiology Appointment"; 487 this.mnuCancelRadAppt.Click += new System.EventHandler(this.mnuCancelRadAppt_Click); 488 // 489 // sepApptMenu1 490 // 491 this.sepApptMenu1.Index = 6; 492 this.sepApptMenu1.Text = "-"; 452 493 // 453 494 // mnuNoShow 454 495 // 455 this.mnuNoShow.Index = 4; 496 this.mnuNoShow.Index = 7; 497 this.mnuNoShow.Shortcut = System.Windows.Forms.Shortcut.CtrlN; 456 498 this.mnuNoShow.Text = "Mark as No Sho&w"; 457 499 this.mnuNoShow.Click += new System.EventHandler(this.mnuNoShow_Click); … … 459 501 // mnuNoShowUndo 460 502 // 461 this.mnuNoShowUndo.Index = 5; 503 this.mnuNoShowUndo.Index = 8; 504 this.mnuNoShowUndo.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftN; 462 505 this.mnuNoShowUndo.Text = "&Undo No Show"; 463 506 this.mnuNoShowUndo.Click += new System.EventHandler(this.mnuNoShowUndo_Click); 464 507 // 465 // menuItem8 466 // 467 this.menuItem8.Index = 6; 468 this.menuItem8.Text = "-"; 469 // 470 // mnuCopyAppointment 471 // 472 this.mnuCopyAppointment.Index = 7; 473 this.mnuCopyAppointment.Text = "&Copy Appointment to Clipboard"; 474 this.mnuCopyAppointment.Click += new System.EventHandler(this.mnuCopyAppointment_Click); 475 // 476 // mnuWalkIn 477 // 478 this.mnuWalkIn.Index = 8; 479 this.mnuWalkIn.Text = "Create Wal&k-In Appointment"; 480 this.mnuWalkIn.Click += new System.EventHandler(this.mnuWalkIn_Click); 508 // sepApptMenu2 509 // 510 this.sepApptMenu2.Index = 9; 511 this.sepApptMenu2.Text = "-"; 512 // 513 // mnuCheckIn 514 // 515 this.mnuCheckIn.Index = 10; 516 this.mnuCheckIn.Shortcut = System.Windows.Forms.Shortcut.CtrlI; 517 this.mnuCheckIn.Text = "Check &In Patient"; 518 this.mnuCheckIn.Click += new System.EventHandler(this.mnuCheckIn_Click); 519 // 520 // mnuUndoCheckin 521 // 522 this.mnuUndoCheckin.Index = 11; 523 this.mnuUndoCheckin.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftI; 524 this.mnuUndoCheckin.Text = "Undo Checkin"; 525 this.mnuUndoCheckin.Click += new System.EventHandler(this.mnuUndoCheckin_Click); 526 // 527 // sepApptMenu3 528 // 529 this.sepApptMenu3.Index = 12; 530 this.sepApptMenu3.Text = "-"; 481 531 // 482 532 // mnuFindAppt 483 533 // 484 this.mnuFindAppt.Index = 9;534 this.mnuFindAppt.Index = 13; 485 535 this.mnuFindAppt.Shortcut = System.Windows.Forms.Shortcut.CtrlF; 486 536 this.mnuFindAppt.Text = "&Find Empty Slots"; 487 537 this.mnuFindAppt.Click += new System.EventHandler(this.mnuFindAppt_Click); 488 538 // 489 // mnuCheckIn 490 // 491 this.mnuCheckIn.Index = 10; 492 this.mnuCheckIn.Text = "Check &In Patient"; 493 this.mnuCheckIn.Click += new System.EventHandler(this.mnuCheckIn_Click); 539 // mnuCopyAppointment 540 // 541 this.mnuCopyAppointment.Index = 14; 542 this.mnuCopyAppointment.Shortcut = System.Windows.Forms.Shortcut.CtrlC; 543 this.mnuCopyAppointment.Text = "&Copy Appointment to Clipboard"; 544 this.mnuCopyAppointment.Click += new System.EventHandler(this.mnuCopyAppointment_Click); 494 545 // 495 546 // mnuViewPatientAppts 496 547 // 497 this.mnuViewPatientAppts.Index = 11; 548 this.mnuViewPatientAppts.Index = 15; 549 this.mnuViewPatientAppts.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftZ; 498 550 this.mnuViewPatientAppts.Text = "&View Patient Appointments"; 499 551 this.mnuViewPatientAppts.Click += new System.EventHandler(this.mnuViewPatientAppts_Click); 552 // 553 // mnuReprintApptSlip 554 // 555 this.mnuReprintApptSlip.Index = 16; 556 this.mnuReprintApptSlip.Shortcut = System.Windows.Forms.Shortcut.CtrlShiftP; 557 this.mnuReprintApptSlip.Text = "Reprint Appointment Slip"; 558 this.mnuReprintApptSlip.Click += new System.EventHandler(this.mnuReprintApptSlip_Click); 500 559 // 501 560 // mnuCalendar … … 519 578 this.mnuDisplayWalkIns.Checked = true; 520 579 this.mnuDisplayWalkIns.Index = 0; 580 this.mnuDisplayWalkIns.Shortcut = System.Windows.Forms.Shortcut.F12; 521 581 this.mnuDisplayWalkIns.Text = "&Display Walk-Ins"; 522 582 this.mnuDisplayWalkIns.Click += new System.EventHandler(this.mnuDisplayWalkIns_Click); … … 592 652 // mnuViewScheduleTree 593 653 // 654 this.mnuViewScheduleTree.Checked = true; 594 655 this.mnuViewScheduleTree.Index = 6; 656 this.mnuViewScheduleTree.Shortcut = System.Windows.Forms.Shortcut.F4; 595 657 this.mnuViewScheduleTree.Text = "&Schedule Tree"; 596 658 this.mnuViewScheduleTree.Click += new System.EventHandler(this.mnuViewScheduleTree_Click); … … 645 707 // 646 708 this.tvSchedules.BackColor = System.Drawing.SystemColors.ControlLight; 647 this.tvSchedules.ContextMenu = this.c ontextMenu1;709 this.tvSchedules.ContextMenu = this.ctxResourceTree; 648 710 this.tvSchedules.Dock = System.Windows.Forms.DockStyle.Left; 649 711 this.tvSchedules.HotTracking = true; 650 712 this.tvSchedules.Location = new System.Drawing.Point(0, 0); 651 713 this.tvSchedules.Name = "tvSchedules"; 652 this.tvSchedules.Size = new System.Drawing.Size(128, 3 17);714 this.tvSchedules.Size = new System.Drawing.Size(128, 392); 653 715 this.tvSchedules.Sorted = true; 654 716 this.tvSchedules.TabIndex = 1; … … 658 720 this.tvSchedules.MouseEnter += new System.EventHandler(this.tvSchedules_MouseEnter); 659 721 // 660 // c ontextMenu1661 // 662 this.c ontextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {722 // ctxResourceTree 723 // 724 this.ctxResourceTree.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 663 725 this.ctxOpenSchedule, 664 726 this.ctxEditAvailability, … … 668 730 this.ctxPrintScheduleT1, 669 731 this.ctxPrintScheduleT3}); 670 this.c ontextMenu1.Popup += new System.EventHandler(this.contextMenu1_Popup);732 this.ctxResourceTree.Popup += new System.EventHandler(this.contextMenu1_Popup); 671 733 // 672 734 // ctxOpenSchedule … … 719 781 this.panelRight.Location = new System.Drawing.Point(996, 0); 720 782 this.panelRight.Name = "panelRight"; 721 this.panelRight.Size = new System.Drawing.Size(128, 3 17);783 this.panelRight.Size = new System.Drawing.Size(128, 392); 722 784 this.panelRight.TabIndex = 3; 723 785 this.panelRight.Visible = false; … … 815 877 this.panelCenter.Location = new System.Drawing.Point(136, 24); 816 878 this.panelCenter.Name = "panelCenter"; 817 this.panelCenter.Size = new System.Drawing.Size(857, 269);879 this.panelCenter.Size = new System.Drawing.Size(857, 344); 818 880 this.panelCenter.TabIndex = 7; 819 881 // … … 822 884 this.ctxCalendarGrid.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 823 885 this.ctxCalGridAdd, 886 this.ctxCalGridMkRadAppt, 824 887 this.ctxCalGridEdit, 825 888 this.ctxCalGridDelete, 889 this.ctxCalGridCancelRadAppt, 826 890 this.ctxCalGridCheckIn, 827 891 this.ctxCalGridUndoCheckin, 828 this. menuItem2,892 this.ctxCalGridSep1, 829 893 this.ctxCalGridNoShow, 830 894 this.ctxCalGridNoShowUndo, 831 this. menuItem9,895 this.ctxCalGridSep2, 832 896 this.ctxCalGridWalkin, 833 this. menuItem10,897 this.ctxCalGridSep3, 834 898 this.ctxCalGridReprintApptSlip}); 835 899 this.ctxCalendarGrid.Popup += new System.EventHandler(this.ctxCalendarGrid_Popup); … … 841 905 this.ctxCalGridAdd.Click += new System.EventHandler(this.ctxCalGridAdd_Click); 842 906 // 907 // ctxCalGridMkRadAppt 908 // 909 this.ctxCalGridMkRadAppt.Index = 1; 910 this.ctxCalGridMkRadAppt.Text = "Make Radiology Appointment"; 911 this.ctxCalGridMkRadAppt.Click += new System.EventHandler(this.ctxCalGridMkRadAppt_Click); 912 // 843 913 // ctxCalGridEdit 844 914 // 845 this.ctxCalGridEdit.Index = 1;915 this.ctxCalGridEdit.Index = 2; 846 916 this.ctxCalGridEdit.Text = "Edit Appointment"; 847 917 this.ctxCalGridEdit.Click += new System.EventHandler(this.ctxCalGridEdit_Click); … … 849 919 // ctxCalGridDelete 850 920 // 851 this.ctxCalGridDelete.Index = 2;921 this.ctxCalGridDelete.Index = 3; 852 922 this.ctxCalGridDelete.Text = "Cancel Appointment"; 853 923 this.ctxCalGridDelete.Click += new System.EventHandler(this.ctxCalGridDelete_Click); 854 924 // 925 // ctxCalGridCancelRadAppt 926 // 927 this.ctxCalGridCancelRadAppt.Index = 4; 928 this.ctxCalGridCancelRadAppt.Text = "Cancel Radiology Appointment"; 929 this.ctxCalGridCancelRadAppt.Click += new System.EventHandler(this.ctxCalGridCancelRadAppt_Click); 930 // 855 931 // ctxCalGridCheckIn 856 932 // 857 this.ctxCalGridCheckIn.Index = 3;933 this.ctxCalGridCheckIn.Index = 5; 858 934 this.ctxCalGridCheckIn.Text = "Check In Patient"; 859 935 this.ctxCalGridCheckIn.Click += new System.EventHandler(this.ctxCalGridCheckIn_Click); … … 861 937 // ctxCalGridUndoCheckin 862 938 // 863 this.ctxCalGridUndoCheckin.Index = 4;939 this.ctxCalGridUndoCheckin.Index = 6; 864 940 this.ctxCalGridUndoCheckin.Text = "&Undo Check In"; 865 941 this.ctxCalGridUndoCheckin.Click += new System.EventHandler(this.ctxCalGridUndoCheckin_Click); 866 942 // 867 // menuItem2868 // 869 this. menuItem2.Index = 5;870 this. menuItem2.Text = "-";943 // ctxCalGridSep1 944 // 945 this.ctxCalGridSep1.Index = 7; 946 this.ctxCalGridSep1.Text = "-"; 871 947 // 872 948 // ctxCalGridNoShow 873 949 // 874 this.ctxCalGridNoShow.Index = 6;950 this.ctxCalGridNoShow.Index = 8; 875 951 this.ctxCalGridNoShow.Text = "Mark as No Show"; 876 952 this.ctxCalGridNoShow.Click += new System.EventHandler(this.ctxCalGridNoShow_Click); … … 878 954 // ctxCalGridNoShowUndo 879 955 // 880 this.ctxCalGridNoShowUndo.Index = 7;956 this.ctxCalGridNoShowUndo.Index = 9; 881 957 this.ctxCalGridNoShowUndo.Text = "Undo NoShow"; 882 958 this.ctxCalGridNoShowUndo.Click += new System.EventHandler(this.ctxCalGridNoShowUndo_Click); 883 959 // 884 // menuItem9885 // 886 this. menuItem9.Index = 8;887 this. menuItem9.Text = "-";960 // ctxCalGridSep2 961 // 962 this.ctxCalGridSep2.Index = 10; 963 this.ctxCalGridSep2.Text = "-"; 888 964 // 889 965 // ctxCalGridWalkin 890 966 // 891 this.ctxCalGridWalkin.Index = 9;967 this.ctxCalGridWalkin.Index = 11; 892 968 this.ctxCalGridWalkin.Text = "Create Wal&k-In Appointment"; 893 969 this.ctxCalGridWalkin.Click += new System.EventHandler(this.ctxCalGridWalkin_Click); 894 970 // 895 // menuItem10896 // 897 this. menuItem10.Index = 10;898 this. menuItem10.Text = "-";971 // ctxCalGridSep3 972 // 973 this.ctxCalGridSep3.Index = 12; 974 this.ctxCalGridSep3.Text = "-"; 899 975 // 900 976 // ctxCalGridReprintApptSlip 901 977 // 902 this.ctxCalGridReprintApptSlip.Index = 1 1;978 this.ctxCalGridReprintApptSlip.Index = 13; 903 979 this.ctxCalGridReprintApptSlip.Text = "&Reprint Appointment Slip"; 904 980 this.ctxCalGridReprintApptSlip.Click += new System.EventHandler(this.ctxCalGridReprintApptSlip_Click); … … 908 984 this.panelBottom.Controls.Add(this.statusBar1); 909 985 this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom; 910 this.panelBottom.Location = new System.Drawing.Point(136, 293);986 this.panelBottom.Location = new System.Drawing.Point(136, 368); 911 987 this.panelBottom.Name = "panelBottom"; 912 988 this.panelBottom.Size = new System.Drawing.Size(857, 24); … … 926 1002 this.splitter1.Location = new System.Drawing.Point(128, 24); 927 1003 this.splitter1.Name = "splitter1"; 928 this.splitter1.Size = new System.Drawing.Size(8, 293);1004 this.splitter1.Size = new System.Drawing.Size(8, 368); 929 1005 this.splitter1.TabIndex = 9; 930 1006 this.splitter1.TabStop = false; … … 935 1011 this.splitter2.Location = new System.Drawing.Point(993, 24); 936 1012 this.splitter2.Name = "splitter2"; 937 this.splitter2.Size = new System.Drawing.Size(3, 293);1013 this.splitter2.Size = new System.Drawing.Size(3, 368); 938 1014 this.splitter2.TabIndex = 10; 939 1015 this.splitter2.TabStop = false; … … 958 1034 this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources"))); 959 1035 this.calendarGrid1.SelectedAppointment = 0; 960 this.calendarGrid1.Size = new System.Drawing.Size(857, 269);1036 this.calendarGrid1.Size = new System.Drawing.Size(857, 344); 961 1037 this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0); 962 1038 this.calendarGrid1.TabIndex = 0; … … 971 1047 // 972 1048 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); 973 this.ClientSize = new System.Drawing.Size(1124, 3 17);1049 this.ClientSize = new System.Drawing.Size(1124, 392); 974 1050 this.Controls.Add(this.panelCenter); 975 1051 this.Controls.Add(this.panelBottom); … … 1082 1158 #endregion 1083 1159 1084 1085 1160 #region AppointmentMenu Handlers 1086 1161 1087 1162 private void mnuAppointment_Popup(object sender, System.EventArgs e) 1088 1163 { 1089 bool bEnabled = (this.Document.Resources.Count > 0)? true : false ; 1090 this.mnuFindAppt.Enabled = bEnabled; 1091 1092 //Toggle availability of make, edit, checkin and delete appointments 1093 //based on whether a range is selected. 1094 1095 mnuNewAppointment.Enabled = AddAppointmentEnabled(); 1096 this.mnuWalkIn.Enabled = mnuNewAppointment.Enabled; 1097 bool bEditAppointments = this.EditAppointmentEnabled(); 1098 1099 mnuDeleteAppointment.Enabled = bEditAppointments; 1100 mnuCheckIn.Enabled = bEditAppointments; 1101 mnuEditAppointment.Enabled = bEditAppointments; 1102 mnuNoShow.Enabled = bEditAppointments; 1103 mnuNoShowUndo.Enabled = bEditAppointments; 1164 // our flags 1165 bool _findApptsEnabled = (this.Document.Resources.Count > 0)? true : false ; 1166 bool _addApptsEnabled = AddAppointmentEnabled(); 1167 bool _editApptsEnabled = EditAppointmentEnabled(); 1168 bool _isRadAppt = IsThisARadiologyResource(); 1169 bool _noShowEnabled = NoShowEnabled(); 1170 bool _undoCheckinEnabled = UndoCheckinEnabled(); 1171 //end flags 1172 1173 mnuNewAppointment.Enabled = _addApptsEnabled && !_isRadAppt; 1174 mnuWalkIn.Enabled = _addApptsEnabled && !_isRadAppt; 1175 mnuMkRadAppt.Enabled = _isRadAppt && _addApptsEnabled; 1176 1177 mnuEditAppointment.Enabled = _editApptsEnabled && !_isRadAppt; 1178 mnuDeleteAppointment.Enabled = _editApptsEnabled && !_isRadAppt; 1179 mnuCancelRadAppt.Enabled = _isRadAppt && _editApptsEnabled; 1180 mnuNoShow.Enabled = _noShowEnabled && _editApptsEnabled; 1181 mnuNoShowUndo.Enabled = !_noShowEnabled && _editApptsEnabled; 1182 mnuCheckIn.Enabled = _editApptsEnabled && !_isRadAppt; 1183 mnuUndoCheckin.Enabled = _undoCheckinEnabled && !_isRadAppt; 1184 1185 mnuFindAppt.Enabled = _findApptsEnabled; 1186 mnuCopyAppointment.Enabled = _editApptsEnabled && !_isRadAppt; 1187 mnuViewPatientAppts.Enabled = true; 1188 mnuReprintApptSlip.Enabled = _editApptsEnabled; 1104 1189 } 1105 1190 … … 1118 1203 foreach (CGAppointment a in this.calendarGrid1.SelectedAppointments.AppointmentTable.Values) 1119 1204 { 1120 if (m_ClipList.AppointmentTable.Contains((int)a.AppointmentKey))1205 if (m_ClipList.AppointmentTable.Contains((int)a.AppointmentKey)) 1121 1206 { 1122 1207 return; 1123 1208 } 1124 1209 m_ClipList.AddAppointment(a); 1125 lstClip.Items.Add(a.PatientName);1210 lstClip.Items.Add(a); 1126 1211 } 1127 1212 } … … 1162 1247 { 1163 1248 AppointmentUndoCheckin(); 1249 } 1250 1251 private void mnuMkRadAppt_Click(object sender, EventArgs e) 1252 { 1253 AppointmentAddNewRadiology(); 1254 } 1255 1256 private void mnuCancelRadAppt_Click(object sender, EventArgs e) 1257 { 1258 AppointmentDeleteOneRadiology(); 1259 } 1260 1261 private void mnuUndoCheckin_Click(object sender, EventArgs e) 1262 { 1263 AppointmentUndoCheckin(); 1264 } 1265 1266 private void mnuReprintApptSlip_Click(object sender, EventArgs e) 1267 { 1268 int apptID = this.CGrid.SelectedAppointment; 1269 if (apptID <= 0) return; 1270 1271 CGAppointment a = (CGAppointment)this.Appointments.AppointmentTable[apptID]; 1272 1273 PrintAppointmentSlip(a); 1164 1274 } 1165 1275 … … 1292 1402 private void ctxCalendarGrid_Popup(object sender, System.EventArgs e) 1293 1403 { 1404 bool bEditAppointments = (EditAppointmentEnabled() && (calendarGrid1.SelectedAppointment > 0)) ; 1405 1406 if (IsThisARadiologyResource())//this is a radiology resource 1407 { 1408 ctxCalGridAdd.Visible = false; 1409 ctxCalGridDelete.Visible = false; 1410 ctxCalGridEdit.Visible = false; 1411 ctxCalGridCheckIn.Visible = false; 1412 ctxCalGridNoShow.Visible = false; 1413 ctxCalGridNoShowUndo.Visible = false; 1414 ctxCalGridWalkin.Visible = false; 1415 ctxCalGridUndoCheckin.Visible = false; 1416 ctxCalGridSep1.Visible = false; 1417 ctxCalGridSep2.Visible = false; 1418 1419 ctxCalGridMkRadAppt.Visible = true; 1420 ctxCalGridCancelRadAppt.Visible = true; 1421 1422 1423 } 1424 1425 else // this is a normal resource 1426 { 1427 ctxCalGridAdd.Visible = true; 1428 ctxCalGridDelete.Visible = true; 1429 ctxCalGridEdit.Visible = true; 1430 ctxCalGridCheckIn.Visible = true; 1431 ctxCalGridNoShow.Visible = true; 1432 ctxCalGridNoShowUndo.Visible = true; 1433 ctxCalGridWalkin.Visible = true; 1434 ctxCalGridUndoCheckin.Visible = true; 1435 ctxCalGridSep1.Visible = true; 1436 ctxCalGridSep2.Visible = true; 1437 1438 ctxCalGridMkRadAppt.Visible = false; 1439 ctxCalGridCancelRadAppt.Visible = false; 1440 } 1441 1294 1442 //Toggle availability of make, edit, checkin and delete appointments 1295 1443 //based on whether appropriate element is selected. 1296 1444 ctxCalGridAdd.Enabled = AddAppointmentEnabled(); 1297 bool bEditAppointments = (EditAppointmentEnabled() && (calendarGrid1.SelectedAppointment > 0)) ;1445 1298 1446 ctxCalGridDelete.Enabled = bEditAppointments; 1299 1447 ctxCalGridEdit.Enabled = bEditAppointments; … … 1302 1450 ctxCalGridNoShowUndo.Enabled = !NoShowEnabled() && calendarGrid1.SelectedAppointment > 0; 1303 1451 ctxCalGridWalkin.Enabled = ctxCalGridAdd.Enabled; 1304 //smh new code1305 1452 ctxCalGridReprintApptSlip.Enabled = bEditAppointments; 1306 1453 ctxCalGridUndoCheckin.Enabled = UndoCheckinEnabled(); 1307 //end new code 1454 1455 //if the rad ones are visible, then these apply 1456 ctxCalGridMkRadAppt.Enabled = !bEditAppointments; 1457 ctxCalGridCancelRadAppt.Enabled = bEditAppointments; 1308 1458 } 1309 1459 … … 1344 1494 } 1345 1495 1346 //new code smh 1496 private void ctxCalGridMkRadAppt_Click(object sender, EventArgs e) 1497 { 1498 AppointmentAddNewRadiology(); 1499 } 1500 1501 private void ctxCalGridCancelRadAppt_Click(object sender, EventArgs e) 1502 { 1503 AppointmentDeleteOneRadiology(); 1504 } 1505 1347 1506 private void ctxCalGridReprintApptSlip_Click(object sender, EventArgs e) 1348 1507 { … … 1354 1513 PrintAppointmentSlip(a); 1355 1514 } 1356 //end new code1357 1515 1358 1516 #endregion ctxCalGridMenu Handlers 1359 1517 1360 1518 #region Methods 1519 1520 /// <summary> 1521 /// Decides whether this is a Radiology Resource. Local Helper to decide what menu items to enable/display 1522 /// </summary> 1523 /// <returns></returns> 1524 private bool IsThisARadiologyResource() 1525 { 1526 //I don't like this logic!!! but works for now! 1527 //Note: I use banana peeling model below 1528 1529 //If no cell is selected AND no appointment is selected, then it's false 1530 if (this.calendarGrid1.SelectedRange.Cells.CellCount < 1 && this.calendarGrid1.SelectedAppointment < 1) 1531 return false; 1532 1533 //If an appointment is selected then... 1534 if (this.calendarGrid1.SelectedAppointment > 0) 1535 { 1536 CGAppointment appt = this.Appointments.AppointmentTable[this.calendarGrid1.SelectedAppointment] as CGAppointment; 1537 if (appt == null) return false; //appt doesn't exist; old appointment and grid wasn't refreshed yet 1538 if (appt.RadiologyExamIEN.HasValue && appt.RadiologyExamIEN.Value > 0) return true; //this appointment is a radiology appointment since it has that member 1539 else return false; 1540 1541 } 1542 1543 //Otherwise, we are for sure dealing with a cell. 1544 //We need to determine if the cell resource is mapped to a Radiology Hospital Location. 1545 DateTime dStart; 1546 DateTime dEnd; 1547 string sResource; 1548 1549 // Get resource 1550 bool bRet = this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource); 1551 1552 // If we fail, return false (but this is not supposed to ever happen) 1553 if (bRet == false) 1554 { 1555 return false; 1556 } 1557 1558 // see if resource is mapped to a Radiology Hospital Location. 1559 return IsThisARadiologyResource(sResource); 1560 } 1561 1562 private bool IsThisARadiologyResource(string sResource) 1563 { 1564 // see if resource is mapped to a Radiology Hospital Location. 1565 return ( //select all Hospital Locations which are radiology locations 1566 from hl in CGDocumentManager.Current.GlobalDataSet.Tables["HospitalLocation"].AsEnumerable() 1567 where hl.Field<string>("IS_RADIOLOGY_LOCATION") == "1" 1568 //join this to the resources table using the foreign ID (plain jane relational join) 1569 join res in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable() 1570 on hl.Field<int>("HOSPITAL_LOCATION_ID") equals res.Field<int>("HOSPITAL_LOCATION_ID") 1571 //then filter this down to the resource that we have 1572 where res.Field<string>("RESOURCE_NAME") == sResource 1573 //if we have any row left, then it is true. 1574 select hl).Any(); 1575 } 1361 1576 1362 1577 private bool EditAppointmentEnabled() … … 1981 2196 1982 2197 /// <summary> 2198 /// Delete one Radiology Appointment 2199 /// </summary> 2200 private void AppointmentDeleteOneRadiology() 2201 { 2202 Debug.Assert(this.calendarGrid1.SelectedAppointment > 0); 2203 2204 CGAppointment a = this.Appointments.AppointmentTable[this.calendarGrid1.SelectedAppointment] as CGAppointment; 2205 2206 Debug.Assert(a.RadiologyExamIEN.HasValue); 2207 2208 //Prior to making expensive db calls, tell the grid nothing is selected anymore so nobody would try to pick it up 2209 this.calendarGrid1.SelectedAppointment = 0; 2210 2211 //Cancel Radiology Exam 2212 CGDocumentManager.Current.DAL.CancelRadiologyExam(a.PatientID, a.RadiologyExamIEN.Value); 2213 2214 //Now, Cancel the appointment 2215 this.Document.DeleteAppointment(a.AppointmentKey); 2216 2217 //redraw the grid to display new set of appointments after this appt was removed. 2218 this.UpdateArrays(); 2219 } 2220 2221 /// <summary> 1983 2222 /// Delete appointment ApptID 1984 2223 /// </summary> … … 2015 2254 return; 2016 2255 } 2256 2257 //At this point, the appointment will be deleted... 2258 //Remove the Selected Appointment from the grid because we don't anybody to think there's still 2259 //an appointment selected while we are still updating the grid 2260 this.calendarGrid1.SelectedAppointment = 0; 2017 2261 2018 2262 bool bClinic = dCancel.ClinicCancelled; … … 2381 2625 } 2382 2626 2627 /// <summary> 2628 /// Add a new Radiology Appointment to VISTA (ÒÝÊì as my mom calls it) 2629 /// </summary> 2630 private void AppointmentAddNewRadiology() 2631 { 2632 DateTime dStart, dEnd; //return vales for below 2633 string sResource; //ditto 2634 int nAccessTypeID = 0; //ditto 2635 2636 this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource); 2637 this.calendarGrid1.GetSelectedType(out nAccessTypeID); 2638 2639 Debug.Assert(sResource != null); 2640 Debug.Assert(dStart > DateTime.MinValue); 2641 2642 //Display a dialog to collect Patient Name 2643 DPatientLookup dPat = new DPatientLookup(); 2644 dPat.DocManager = m_DocManager; 2645 2646 if (dPat.ShowDialog(this) == DialogResult.Cancel) 2647 { 2648 return; 2649 } 2650 2651 int DFN = Int32.Parse(dPat.PatientIEN); 2652 // Hospital Location IEN 2653 int hlIEN = (from resource in CGDocumentManager.Current.GlobalDataSet.Tables["Resources"].AsEnumerable() 2654 where resource.Field<string>("RESOURCE_NAME") == sResource 2655 select resource.Field<int>("HOSPITAL_LOCATION_ID")).FirstOrDefault(); 2656 2657 //Get Radiology Exams from the DB 2658 List<RadiologyExam> _radExams = CGDocumentManager.Current.DAL.GetRadiologyExamsForPatientinHL(DFN, hlIEN); 2659 2660 //If none found... 2661 if (!_radExams.Any()) 2662 { 2663 MessageBox.Show("Patient does not have any radiology exams to register."); 2664 return; 2665 } 2666 2667 //Display a form for the user to select radiology exams. 2668 DRadExamsSelect _radform = new DRadExamsSelect(_radExams); 2669 2670 if (_radform.ShowDialog() == DialogResult.Cancel) return; 2671 2672 //Get some return values 2673 int _examien = _radform.ExamIEN; 2674 string _procedurename = _radform.ProcedureName; 2675 2676 //Save Radiology Exam Schedule Info to Radiology Package 2677 CGDocumentManager.Current.DAL.ScheduleRadiologyExam(DFN, _examien, dStart); 2678 2679 //Now create and save the appointment 2680 CGAppointment appt = new CGAppointment(); 2681 string _sNote = "Radiology Exam (" + _examien + "): " + _procedurename; 2682 appt.CreateAppointment(dStart, dEnd, _sNote, 0, sResource); 2683 appt.PatientID = Int32.Parse(dPat.PatientIEN); 2684 appt.PatientName = dPat.PatientName; 2685 appt.AccessTypeID = nAccessTypeID; 2686 appt.RadiologyExamIEN = _examien; 2687 appt.Patient = new Patient 2688 { 2689 DFN = Convert.ToInt32(dPat.PatientIEN), 2690 ID = dPat.PatientPID, 2691 Name = dPat.PatientName, 2692 HRN = dPat.HealthRecordNumber, 2693 DOB = dPat.PatientDOB 2694 }; 2695 2696 this.Document.CreateAppointment(appt); 2697 2698 //Print Appointment Slip if requested 2699 if (_radform.PrintAppointmentSlip) this.PrintAppointmentSlip(appt); 2700 2701 //Now redraw the grid to display the new appointments 2702 this.UpdateArrays(); 2703 } 2704 2705 2383 2706 #region BMX Event Processing and Callbacks 2384 2707 /// <summary> … … 2892 3215 try 2893 3216 { 3217 // added April 13 2011 3218 // Can't edit radiology appointments (Why? b/c it's intimately tied to Radiology Entry of the Hosp Loc) 3219 if (e.Appointment.RadiologyExamIEN.HasValue && e.Appointment.RadiologyExamIEN.Value > 0) 3220 { 3221 MessageBox.Show("You cannot move a radiology appointment.", "Clinical Scheduling"); 3222 return; 3223 } 3224 3225 // added May 5 2011 3226 // Can't move an appointment to a radiology resource 3227 if (IsThisARadiologyResource(e.Resource)) 3228 { 3229 MessageBox.Show("You cannot move an appointment to a radiology location.", "Clinical Scheduling"); 3230 return; 3231 } 3232 2894 3233 if (e.Appointment.CheckInTime.Ticks > 0) 2895 3234 { 2896 MessageBox.Show("You cannot change the appointment time because the patient has already checked in.", "Clinical Scheduling" , MessageBoxButtons.OKCancel, MessageBoxIcon.Information);3235 MessageBox.Show("You cannot change the appointment time because the patient has already checked in.", "Clinical Scheduling"); 2897 3236 return; 2898 3237 } … … 3566 3905 3567 3906 3568 3569 3570 3571 3907 }//End class 3572 3908 } -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CGView.resx
r1110 r1174 121 121 <value>17, 17</value> 122 122 </metadata> 123 <metadata name="c ontextMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">123 <metadata name="ctxResourceTree.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 124 <value>126, 17</value> 125 125 </metadata> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/CalendarGrid.cs
r1143 r1174 480 480 { 481 481 rect.Inflate(-10, 0); 482 num = (int) this.m_ApptOverlapTable[appointment. m_nKey];482 num = (int) this.m_ApptOverlapTable[appointment.AppointmentKey]; 483 483 num2 = rect.Right - rect.Left; 484 484 x = num2 / (num + 1); … … 1267 1267 x = (this.m_sResourcesArray.Count > 1) ? (((int) this.m_ColumnInfoTable[resource]) + 1) : appointment.StartTime.DayOfYear; 1268 1268 Rectangle rectangle = new Rectangle(x, y, 1, num2 - y); 1269 hashtable.Add(appointment. m_nKey, rectangle);1269 hashtable.Add(appointment.AppointmentKey, rectangle); 1270 1270 } 1271 1271 } -
Scheduling/trunk/cs/bsdx0200GUISourceCode/ClinicalScheduling.csproj
r1112 r1174 140 140 </ItemGroup> 141 141 <ItemGroup> 142 <Compile Include="DRadExamsSelect.cs"> 143 <SubType>Form</SubType> 144 </Compile> 145 <Compile Include="DRadExamsSelect.Designer.cs"> 146 <DependentUpon>DRadExamsSelect.cs</DependentUpon> 147 </Compile> 142 148 <Compile Include="Provider.cs" /> 149 <Compile Include="RadiologyExam.cs" /> 143 150 <Compile Include="strings.ar.Designer.cs"> 144 151 <AutoGen>True</AutoGen> … … 152 159 </Compile> 153 160 <Compile Include="UserPreferences.cs" /> 154 <None Include="app.config" />155 161 <None Include="dsPatientApptDisplay2.xsc"> 156 162 <DependentUpon>dsPatientApptDisplay2.xsd</DependentUpon> … … 391 397 <DependentUpon>DPatientLookup.cs</DependentUpon> 392 398 <SubType>Designer</SubType> 399 </EmbeddedResource> 400 <EmbeddedResource Include="DRadExamsSelect.resx"> 401 <DependentUpon>DRadExamsSelect.cs</DependentUpon> 393 402 </EmbeddedResource> 394 403 <EmbeddedResource Include="DResource.resx"> -
Scheduling/trunk/cs/bsdx0200GUISourceCode/DAL.cs
r1117 r1174 1 using System; 1 /* Licensed under LGPL */ 2 3 using System; 2 4 using System.Collections.Generic; 3 5 using System.Linq; … … 187 189 188 190 /// <summary> 191 /// Gets All radiology exams for a Patient in a specific hospital location 192 /// </summary> 193 /// <param name="DFN"></param> 194 /// <param name="SCIEN">Hospital Location IEN</param> 195 /// <returns>Generic List of type RadiologyExam</returns> 196 public List<RadiologyExam> GetRadiologyExamsForPatientinHL(int DFN, int SCIEN) 197 { 198 string cmd = string.Format("BSDX GET RAD EXAM FOR PT^{0}^{1}", DFN, SCIEN); 199 DataTable tbl = RPMSDataTable(cmd, ""); 200 return (from row in tbl.AsEnumerable() 201 select new RadiologyExam 202 { 203 IEN = row.Field<int>("BMXIEN"), 204 Status = row.Field<string>("STATUS"), 205 Procedure = row.Field<string>("PROCEDURE"), 206 RequestDate = row.Field<DateTime>("REQUEST_DATE") 207 }).ToList(); 208 } 209 210 /// <summary> 211 /// Schedules a Single Radiology Exam for a patient 212 /// </summary> 213 /// <param name="DFN"></param> 214 /// <param name="examIEN">IEN of exam in 75.1 (RAD/NUC MED ORDERS) file</param> 215 /// <param name="dStart">Start DateTime of appointment</param> 216 /// <returns>should always return true</returns> 217 public bool ScheduleRadiologyExam(int DFN, int examIEN, DateTime dStart) 218 { 219 string fmStartDate = FMDateTime.Create(dStart).FMDateString; 220 string result = _thisConnection.bmxNetLib.TransmitRPC("BSDX SCHEDULE RAD EXAM", string.Format("{0}^{1}^{2}", DFN, examIEN, fmStartDate)); 221 return result == "1" ? true : false; 222 } 223 224 /// <summary> 225 /// Put the radiology exam on Hold because the appointment has been cancelled for it 226 /// </summary> 227 /// <param name="DFN"></param> 228 /// <param name="examIEN">IEN of exam in 75.1 (RAD/NUC MED ORDERS) file</param> 229 /// <returns>should always return true</returns> 230 public bool CancelRadiologyExam(int DFN, int examIEN) 231 { 232 string result = _thisConnection.bmxNetLib.TransmitRPC("BSDX HOLD RAD EXAM", string.Format("{0}^{1}", DFN, examIEN)); 233 return result == "1" ? true : false; 234 } 235 236 /// <summary> 189 237 /// Save User Preference in DB For Printing Routing Slip 190 238 /// Uses Parameter BSDX AUTO PRINT RS -
Scheduling/trunk/cs/bsdx0200GUISourceCode/FMDateTime.cs
r850 r1174 17 17 * 18 18 19 Mod s by Sam Habiel to use in Scheduling GUI.19 Modified by Sam Habiel to use in Scheduling GUI. Modified class licensed under LGPL. 20 20 */ 21 21 … … 250 250 } 251 251 252 /*public static string FMDate (this DateTime d) 253 { 254 return Create(d, FMDateTimePrecision.DateAndTime).FMDateString; 255 }*/ 256 257 252 258 public static FMDateTime Parse (string str) 253 259 { -
Scheduling/trunk/cs/bsdx0200GUISourceCode/Patient.cs
r1112 r1174 18 18 /// Puppet standing for a Real Patient 19 19 /// </summary> 20 [Serializable] 20 21 public class Patient 21 22 { -
Scheduling/trunk/cs/bsdx0200GUISourceCode/Provider.cs
r1111 r1174 9 9 /// Provider puppet 10 10 /// </summary> 11 [Serializable] 11 12 public class Provider 12 13 { -
Scheduling/trunk/cs/bsdx0200GUISourceCode/UserPreferences.cs
r1117 r1174 1 using System; 1 /*Licensed under LGPL*/ 2 3 using System; 2 4 using System.Collections.Generic; 3 5 using System.Linq;
Note:
See TracChangeset
for help on using the changeset viewer.