2009-12-03 17:36:03 -05:00
|
|
|
|
namespace IndianHealthService.ClinicalScheduling
|
|
|
|
|
{
|
|
|
|
|
using System;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
/// <summary>
|
2011-05-08 05:17:53 -04:00
|
|
|
|
/// Data Structure to Represent an Appointment
|
2009-12-03 17:36:03 -05:00
|
|
|
|
/// </summary>
|
|
|
|
|
[Serializable]
|
|
|
|
|
public class CGAppointment
|
|
|
|
|
{
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public int AccessTypeID { get; set; }
|
|
|
|
|
public string AccessTypeName { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public int AppointmentKey { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public DateTime AuxTime { get; set; }
|
|
|
|
|
public DateTime CheckInTime { get; set; }
|
|
|
|
|
public DateTime EndTime { get; set; }
|
|
|
|
|
public DateTime StartTime { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public int GridColumn { get; set; }
|
|
|
|
|
public Rectangle GridRectangle { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool IsAccessBlock { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public bool NoShow { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public string Note { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public int PatientID { get; set; }
|
|
|
|
|
public string PatientName { get; set; }
|
|
|
|
|
public string Resource { get; set; }
|
|
|
|
|
public string HealthRecordNumber { get; set; }
|
|
|
|
|
|
|
|
|
|
public bool Selected { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public int Slots { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public bool WalkIn { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public Patient Patient { get; set; }
|
|
|
|
|
public Provider Provider { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public int? RadiologyExamIEN { get; set; }
|
2009-12-03 17:36:03 -05:00
|
|
|
|
|
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public CGAppointment()
|
2009-12-03 17:36:03 -05:00
|
|
|
|
{
|
2011-05-08 05:17:53 -04:00
|
|
|
|
AccessTypeID = -1;
|
|
|
|
|
Selected = false;
|
|
|
|
|
HealthRecordNumber = "";
|
2009-12-03 17:36:03 -05:00
|
|
|
|
}
|
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public void CreateAppointment(DateTime StartTime, DateTime EndTime, string Note, int Key, string sResource)
|
2009-12-03 17:36:03 -05:00
|
|
|
|
{
|
2011-05-08 05:17:53 -04:00
|
|
|
|
this.StartTime = StartTime;
|
|
|
|
|
this.EndTime = EndTime;
|
|
|
|
|
this.Note = Note;
|
|
|
|
|
this.AppointmentKey = Key;
|
|
|
|
|
this.Resource = sResource;
|
2009-12-03 17:36:03 -05:00
|
|
|
|
}
|
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public int Duration
|
2009-12-03 17:36:03 -05:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2011-05-08 05:17:53 -04:00
|
|
|
|
TimeSpan span = (TimeSpan) (this.EndTime - this.StartTime);
|
|
|
|
|
return (int) span.TotalMinutes;
|
2009-12-03 17:36:03 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2011-05-08 05:17:53 -04:00
|
|
|
|
public override string ToString()
|
2009-12-03 17:36:03 -05:00
|
|
|
|
{
|
2011-05-08 05:17:53 -04:00
|
|
|
|
string patientName = "";
|
|
|
|
|
if (this.IsAccessBlock)
|
2009-12-03 17:36:03 -05:00
|
|
|
|
{
|
2011-05-08 05:17:53 -04:00
|
|
|
|
string str2 = (this.Slots == 1) ? " Slot, " : " Slots, ";
|
|
|
|
|
return ((((this.AccessTypeName + ": ") + this.Slots.ToString() + str2) + this.Duration.ToString() + " Minutes. ") + this.Note);
|
2009-12-03 17:36:03 -05:00
|
|
|
|
}
|
2011-05-08 05:17:53 -04:00
|
|
|
|
patientName = this.PatientName;
|
|
|
|
|
if (this.HealthRecordNumber != "")
|
2009-12-03 17:36:03 -05:00
|
|
|
|
{
|
2011-05-08 05:17:53 -04:00
|
|
|
|
patientName = patientName + " #" + this.HealthRecordNumber;
|
2009-12-03 17:36:03 -05:00
|
|
|
|
}
|
2011-05-08 05:17:53 -04:00
|
|
|
|
return (patientName + " " + this.Note);
|
2009-12-03 17:36:03 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|