Several fixes:

1. Appointments in Past now trigger a warning.
2. Changes to support Division based management of Scheduling GUI.
This commit is contained in:
sam 2010-09-28 13:40:17 +00:00
parent 5401ccf47f
commit 4503323eb2
5 changed files with 63 additions and 10 deletions

View File

@ -510,7 +510,7 @@ namespace IndianHealthService.ClinicalScheduling
public void LoadResourceUserTable(bool bAllUsers)
{
string sCommandText = "SELECT BMXIEN RESOURCEUSER_ID, RESOURCENAME, INTERNAL[RESOURCENAME] RESOURCEID, OVERBOOK, MODIFY_SCHEDULE, MODIFY_APPOINTMENTS, USERNAME, INTERNAL[USERNAME] USERID FROM BSDX_RESOURCE_USER";
string sCommandText = "SELECT BMXIEN RESOURCEUSER_ID, RESOURCENAME, INTERNAL[RESOURCENAME] RESOURCEID, OVERBOOK, MODIFY_SCHEDULE, MODIFY_APPOINTMENTS, USERNAME, INTERNAL[USERNAME] USERID FROM BSDX_RESOURCE_USER WHERE INTERNAL[INSTITUTION]=" + m_ConnectInfo.DUZ2;
ConnectInfo.RPMSDataTable(sCommandText, "ResourceUser", m_dsGlobal);
Debug.Write("LoadGlobalRecordsets -- ResourceUser loaded\n");
}

View File

@ -2094,6 +2094,13 @@ namespace IndianHealthService.ClinicalScheduling
return;
}
// Added check for making Walk-ins in the past. 9/28/2010
if (dStart.Date < DateTime.Today.Date)
{
var result = MessageBox.Show("Are you sure you want to make a Walk-in in the past?", "Windows Scheduling", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
if (result == DialogResult.No) return;
}
/*
* 8-10-05 Added overbook prompt for walkin
*/
@ -2171,7 +2178,14 @@ namespace IndianHealthService.ClinicalScheduling
bool bRet = this.calendarGrid1.GetSelectedTime(out dStart, out dEnd, out sResource);
if (bRet == false)
return;
// Added check for making Walk-ins in the past. 9/28/2010
if (dStart.Date < DateTime.Today.Date)
{
var result = MessageBox.Show("Are you sure you want to make an appointment in the past?", "Windows Scheduling", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
if (result == DialogResult.No) return;
}
//Test dStart for Holiday
DataView dvHoliday = new DataView(this.DocManager.GlobalDataSet.Tables["HOLIDAY"]);
dvHoliday.Sort="DATE ASC";
@ -2656,6 +2670,13 @@ namespace IndianHealthService.ClinicalScheduling
return;
}
// Added check for making Walk-ins/appts in the past. 9/28/2010 //smh
if (e.StartTime < DateTime.Today.Date)
{
var result = MessageBox.Show("Are you sure you want to make an appointment in the past?", "Windows Scheduling", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
if (result == DialogResult.No) return;
}
if (EditAppointmentEnabled(e.Resource) == false)
return;
if (EditAppointmentEnabled(e.Appointment.Resource) == false)
@ -2707,8 +2728,9 @@ namespace IndianHealthService.ClinicalScheduling
e.Appointment.AccessTypeID = e.AccessTypeID;
m_Document.CreateAppointment(e.Appointment);
string sError = AppointmentDeleteOne(e.Appointment.AppointmentKey);
if (sError != "")
string sError = AppointmentDeleteOne(e.Appointment.AppointmentKey);
if (sError != "")
{
MessageBox.Show(sError);
return;
@ -2866,6 +2888,14 @@ namespace IndianHealthService.ClinicalScheduling
if (bModAppts == false)
return;
// Added check for making Walk-ins/appts in the past. 9/28/2010 //smh
if (e.StartTime < DateTime.Today.Date)
{
var result = MessageBox.Show("Are you sure you want to make an appointment in the past?", "Windows Scheduling", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2);
if (result == DialogResult.No) return;
}
bOverbook = (bool) this.m_htOverbook[e.Resource.ToString()];
bModSchedule = (bool) this.m_htModifySchedule[e.Resource.ToString()];
bSlotsAvailable = (m_Document.SlotsAvailable(e.StartTime, e.EndTime, e.Resource, out sAccessType, out sAvailabilityMessage) > 0);

View File

@ -240,8 +240,7 @@ namespace IndianHealthService.ClinicalScheduling
//an experiment (doesn't work yet, but leaving for future enlightenment): LINQ
var defProv = from Provider in m_dtProvider.AsEnumerable()
where
Provider["DEFAULT"] == "YES"
where Provider.Field<string>("DEFAULT") == "YES"
select Provider;
}

View File

@ -327,7 +327,7 @@ namespace IndianHealthService.ClinicalScheduling {
///</summary>
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class PatientApptsDataTable : global::System.Data.TypedTableBase<PatientApptsRow> {
public partial class PatientApptsDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {
private global::System.Data.DataColumn columnName;
@ -602,6 +602,12 @@ namespace IndianHealthService.ClinicalScheduling {
return rowPatientApptsRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public virtual global::System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {
@ -803,7 +809,7 @@ namespace IndianHealthService.ClinicalScheduling {
///</summary>
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class BSDXResourceDataTable : global::System.Data.TypedTableBase<BSDXResourceRow> {
public partial class BSDXResourceDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {
private global::System.Data.DataColumn columnRESOURCEID;
@ -916,6 +922,12 @@ namespace IndianHealthService.ClinicalScheduling {
return rowBSDXResourceRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public virtual global::System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {

View File

@ -327,7 +327,7 @@ namespace IndianHealthService.ClinicalScheduling {
///</summary>
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class PatientApptsDataTable : global::System.Data.TypedTableBase<PatientApptsRow> {
public partial class PatientApptsDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {
private global::System.Data.DataColumn columnName;
@ -614,6 +614,12 @@ namespace IndianHealthService.ClinicalScheduling {
return rowPatientApptsRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public virtual global::System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {
@ -818,7 +824,7 @@ namespace IndianHealthService.ClinicalScheduling {
///</summary>
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class BSDXResourceDataTable : global::System.Data.TypedTableBase<BSDXResourceRow> {
public partial class BSDXResourceDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable {
private global::System.Data.DataColumn columnRESOURCEID;
@ -953,6 +959,12 @@ namespace IndianHealthService.ClinicalScheduling {
return rowBSDXResourceRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public virtual global::System.Collections.IEnumerator GetEnumerator() {
return this.Rows.GetEnumerator();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {