source: Scheduling/trunk/cs/bsdx0200GUISourceCode/CGAppointment.cs@ 1692

Last change on this file since 1692 was 1174, checked in by Sam Habiel, 14 years ago

Absorbed all changed from Radiology Support branch.
Patient and Provider classes now serializable to address new bug: Availablity slots cannot be saved b/c these classes are not serializable.

File size: 2.7 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.