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