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

Last change on this file since 1295 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
RevLine 
[622]1namespace IndianHealthService.ClinicalScheduling
2{
3 using System;
4 using System.Drawing;
5 /// <summary>
[1174]6 /// Data Structure to Represent an Appointment
[622]7 /// </summary>
8 [Serializable]
9 public class CGAppointment
10 {
[1174]11 public int AccessTypeID { get; set; }
12 public string AccessTypeName { get; set; }
[622]13
[1174]14 public int AppointmentKey { get; set; }
[622]15
[1174]16 public DateTime AuxTime { get; set; }
17 public DateTime CheckInTime { get; set; }
18 public DateTime EndTime { get; set; }
19 public DateTime StartTime { get; set; }
[622]20
[1174]21 public int GridColumn { get; set; }
22 public Rectangle GridRectangle { get; set; }
23
24 public bool IsAccessBlock { get; set; }
[622]25
[1174]26 public bool NoShow { get; set; }
[622]27
[1174]28 public string Note { get; set; }
[622]29
[1174]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; }
[622]36
[1174]37 public int Slots { get; set; }
[622]38
[1174]39 public bool WalkIn { get; set; }
[622]40
[1174]41 public Patient Patient { get; set; }
42 public Provider Provider { get; set; }
[622]43
[1174]44 public int? RadiologyExamIEN { get; set; }
[622]45
46
[1174]47 public CGAppointment()
[622]48 {
[1174]49 AccessTypeID = -1;
50 Selected = false;
51 HealthRecordNumber = "";
[622]52 }
53
[1174]54 public void CreateAppointment(DateTime StartTime, DateTime EndTime, string Note, int Key, string sResource)
[622]55 {
[1174]56 this.StartTime = StartTime;
57 this.EndTime = EndTime;
58 this.Note = Note;
59 this.AppointmentKey = Key;
60 this.Resource = sResource;
[622]61 }
62
[1174]63 public int Duration
[622]64 {
65 get
66 {
[1174]67 TimeSpan span = (TimeSpan) (this.EndTime - this.StartTime);
68 return (int) span.TotalMinutes;
[622]69 }
70 }
71
[1174]72 public override string ToString()
[622]73 {
[1174]74 string patientName = "";
75 if (this.IsAccessBlock)
[622]76 {
[1174]77 string str2 = (this.Slots == 1) ? " Slot, " : " Slots, ";
78 return ((((this.AccessTypeName + ": ") + this.Slots.ToString() + str2) + this.Duration.ToString() + " Minutes. ") + this.Note);
[622]79 }
[1174]80 patientName = this.PatientName;
81 if (this.HealthRecordNumber != "")
[622]82 {
[1174]83 patientName = patientName + " #" + this.HealthRecordNumber;
[622]84 }
[1174]85 return (patientName + " " + this.Note);
[622]86 }
87 }
88}
89
Note: See TracBrowser for help on using the repository browser.