source: Scheduling/branches/Radiology-Support/cs/bsdx0200GUISourceCode/CGAppointment.cs@ 1140

Last change on this file since 1140 was 1140, checked in by Sam Habiel, 13 years ago

DRadExamsSelect: New form to let user select exam.
RadiologyExam: Class for a Radiology Exam
DAL: new DB communication methods: GetRadiologyExamsForPatientinHL and ScheduleRadiologyExam
CGView:

  1. New context menus for Radiology; context menu popup has logic for which menus to display;
  2. Helper method IsThisARadiologyResource used by ctxCalendarGrid_Popup to decide which menus to display
  3. Handler ctxCalGridMkRadAppt_Click to make the Radiology Appointment.

CGDocument:

  1. CreateAppointment now saves RadiologyExamIEN to the DB
  2. RefreshAppointments now gets RadiologyExamIEN from the DB

CGAppointment:

  1. Class completely refactored to use auto props rather than old style properties
  2. Added property RadiologyExamIEN

CalendarGrid: Class was wrongly using supposed private members of CGAppointment. Refactored to fix that as private members don't exist anymore.

Last but not least, new exe,dll

File size: 2.6 KB
Line 
1namespace IndianHealthService.ClinicalScheduling
2{
3 using System;
4 using System.Drawing;
5 /// <summary>
6 /// Data Structure to Represent an Appointment
7 /// </summary>
8 [Serializable]
9 public class CGAppointment
10 {
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 }
53
54 public void CreateAppointment(DateTime StartTime, DateTime EndTime, string Note, int Key, string sResource)
55 {
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 }
71
72 public override string ToString()
73 {
74 string patientName = "";
75 if (this.IsAccessBlock)
76 {
77 string str2 = (this.Slots == 1) ? " Slot, " : " Slots, ";
78 return ((((this.AccessTypeName + ": ") + this.Slots.ToString() + str2) + this.Duration.ToString() + " Minutes. ") + this.Note);
79 }
80 patientName = this.PatientName;
81 if (this.HealthRecordNumber != "")
82 {
83 patientName = patientName + " #" + this.HealthRecordNumber;
84 }
85 return (patientName + " " + this.Note);
86 }
87 }
88}
89
Note: See TracBrowser for help on using the repository browser.