Updated Source Code for i18n.

Changes in DPatientLetter.cs
Changes in CGSchedLib.cs
This commit is contained in:
sam 2010-07-11 14:09:11 +00:00
parent 28d2f828e9
commit e923b7c59f
8 changed files with 1268 additions and 1258 deletions

View File

@ -205,7 +205,7 @@ namespace IndianHealthService.ClinicalScheduling
this.m_appointments.ClearAllAppointments();
// calls RPC to (presumably--not sure yet) get appointments
// calls RPC to get appointments
rAppointmentSchedule = CGSchedLib.CreateAppointmentSchedule(m_DocManager, m_sResourcesArray, this.m_dStartDate, this.m_dEndDate);
// Datatable dumper into Debug Log (nice to know that this exists)

View File

@ -34,10 +34,10 @@ namespace IndianHealthService.ClinicalScheduling
if ((i+1) < saryResNames.Count)
sResName += "|";
}
string sStart;
string sEnd;
sStart = StartTime.ToString("M-d-yyyy");
sEnd = EndTime.ToString("M-d-yyyy@HH:m");
string sStart = FMDateTime.Create(StartTime).DateOnly.FMDateString;
string sEnd = FMDateTime.Create(EndTime).FMDateString;
string sSql = "BSDX CREATE APPT SCHEDULE^" + sResName + "^" + sStart + "^" + sEnd ;
DataTable dtRet = docManager.RPMSDataTable(sSql, "AppointmentSchedule");
return dtRet;

View File

@ -392,13 +392,14 @@ namespace IndianHealthService.ClinicalScheduling
// mnuPrintReminderLetters
//
this.mnuPrintReminderLetters.Index = 10;
this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlR;
this.mnuPrintReminderLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlI;
this.mnuPrintReminderLetters.Text = "Print Rem&inder Letters";
this.mnuPrintReminderLetters.Click += new System.EventHandler(this.mnuPrintReminderLetters_Click);
//
// mnuPrintRebookLetters
//
this.mnuPrintRebookLetters.Index = 11;
this.mnuPrintRebookLetters.Shortcut = System.Windows.Forms.Shortcut.CtrlR;
this.mnuPrintRebookLetters.Text = "Print &Rebook Letters";
this.mnuPrintRebookLetters.Click += new System.EventHandler(this.mnuPrintRebookLetters_Click);
//
@ -650,7 +651,7 @@ namespace IndianHealthService.ClinicalScheduling
this.tvSchedules.HotTracking = true;
this.tvSchedules.Location = new System.Drawing.Point(0, 0);
this.tvSchedules.Name = "tvSchedules";
this.tvSchedules.Size = new System.Drawing.Size(128, 369);
this.tvSchedules.Size = new System.Drawing.Size(128, 479);
this.tvSchedules.Sorted = true;
this.tvSchedules.TabIndex = 1;
this.tvSchedules.DoubleClick += new System.EventHandler(this.tvSchedules_DoubleClick);
@ -696,9 +697,9 @@ namespace IndianHealthService.ClinicalScheduling
//
this.panelRight.Controls.Add(this.panelClip);
this.panelRight.Dock = System.Windows.Forms.DockStyle.Right;
this.panelRight.Location = new System.Drawing.Point(807, 0);
this.panelRight.Location = new System.Drawing.Point(941, 0);
this.panelRight.Name = "panelRight";
this.panelRight.Size = new System.Drawing.Size(128, 369);
this.panelRight.Size = new System.Drawing.Size(128, 479);
this.panelRight.TabIndex = 3;
this.panelRight.Visible = false;
//
@ -764,7 +765,7 @@ namespace IndianHealthService.ClinicalScheduling
this.panelTop.Dock = System.Windows.Forms.DockStyle.Top;
this.panelTop.Location = new System.Drawing.Point(128, 0);
this.panelTop.Name = "panelTop";
this.panelTop.Size = new System.Drawing.Size(679, 24);
this.panelTop.Size = new System.Drawing.Size(813, 24);
this.panelTop.TabIndex = 6;
//
// dateTimePicker1
@ -772,7 +773,7 @@ namespace IndianHealthService.ClinicalScheduling
this.dateTimePicker1.Dock = System.Windows.Forms.DockStyle.Right;
this.dateTimePicker1.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right;
this.dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dateTimePicker1.Location = new System.Drawing.Point(551, 0);
this.dateTimePicker1.Location = new System.Drawing.Point(685, 0);
this.dateTimePicker1.Name = "dateTimePicker1";
this.dateTimePicker1.Size = new System.Drawing.Size(128, 20);
this.dateTimePicker1.TabIndex = 1;
@ -794,7 +795,7 @@ namespace IndianHealthService.ClinicalScheduling
this.panelCenter.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelCenter.Location = new System.Drawing.Point(136, 24);
this.panelCenter.Name = "panelCenter";
this.panelCenter.Size = new System.Drawing.Size(668, 321);
this.panelCenter.Size = new System.Drawing.Size(802, 431);
this.panelCenter.TabIndex = 7;
//
// calendarGrid1
@ -816,7 +817,7 @@ namespace IndianHealthService.ClinicalScheduling
this.calendarGrid1.Name = "calendarGrid1";
this.calendarGrid1.Resources = ((System.Collections.ArrayList)(resources.GetObject("calendarGrid1.Resources")));
this.calendarGrid1.SelectedAppointment = 0;
this.calendarGrid1.Size = new System.Drawing.Size(668, 321);
this.calendarGrid1.Size = new System.Drawing.Size(802, 431);
this.calendarGrid1.StartDate = new System.DateTime(2003, 1, 27, 0, 0, 0, 0);
this.calendarGrid1.TabIndex = 0;
this.calendarGrid1.TimeScale = 20;
@ -908,9 +909,9 @@ namespace IndianHealthService.ClinicalScheduling
//
this.panelBottom.Controls.Add(this.statusBar1);
this.panelBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panelBottom.Location = new System.Drawing.Point(136, 345);
this.panelBottom.Location = new System.Drawing.Point(136, 455);
this.panelBottom.Name = "panelBottom";
this.panelBottom.Size = new System.Drawing.Size(668, 24);
this.panelBottom.Size = new System.Drawing.Size(802, 24);
this.panelBottom.TabIndex = 8;
//
// statusBar1
@ -918,7 +919,7 @@ namespace IndianHealthService.ClinicalScheduling
this.statusBar1.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar1.Location = new System.Drawing.Point(0, 0);
this.statusBar1.Name = "statusBar1";
this.statusBar1.Size = new System.Drawing.Size(668, 24);
this.statusBar1.Size = new System.Drawing.Size(802, 24);
this.statusBar1.SizingGrip = false;
this.statusBar1.TabIndex = 0;
//
@ -926,16 +927,16 @@ namespace IndianHealthService.ClinicalScheduling
//
this.splitter1.Location = new System.Drawing.Point(128, 24);
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(8, 345);
this.splitter1.Size = new System.Drawing.Size(8, 455);
this.splitter1.TabIndex = 9;
this.splitter1.TabStop = false;
//
// splitter2
//
this.splitter2.Dock = System.Windows.Forms.DockStyle.Right;
this.splitter2.Location = new System.Drawing.Point(804, 24);
this.splitter2.Location = new System.Drawing.Point(938, 24);
this.splitter2.Name = "splitter2";
this.splitter2.Size = new System.Drawing.Size(3, 345);
this.splitter2.Size = new System.Drawing.Size(3, 455);
this.splitter2.TabIndex = 10;
this.splitter2.TabStop = false;
//
@ -947,7 +948,7 @@ namespace IndianHealthService.ClinicalScheduling
// CGView
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(935, 369);
this.ClientSize = new System.Drawing.Size(1069, 479);
this.Controls.Add(this.panelCenter);
this.Controls.Add(this.panelBottom);
this.Controls.Add(this.splitter2);

View File

@ -35,7 +35,7 @@
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction>
<StartArguments>/s=172.16.17.31 /p=9240 /a=shabiel12 /v=catdog.44 /e=windows-1256</StartArguments>
<StartArguments>/s=172.16.17.51 /p=9240 /a=shabiel12 /v=catdog.44 /e=windows-1256</StartArguments>
<StartPage>
</StartPage>
<StartProgram>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\IEExec.exe</StartProgram>
@ -54,7 +54,7 @@
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction>
<StartArguments>/s=172.16.17.31 /p=9240 /a=shabiel12 /v=catdog.44 /e=windows-1256</StartArguments>
<StartArguments>/s=172.16.17.51 /p=9240 /a=shabiel12 /v=catdog.44 /e=windows-1256</StartArguments>
<StartPage>
</StartPage>
<StartProgram>

View File

@ -93,7 +93,6 @@ namespace IndianHealthService.ClinicalScheduling
/// ^I00010RESOURCEID^T00030APPT_MADE_BY^D00020DATE_APPT_MADE^T00250NOTE^T00030STREET^T00030CITY
/// ^T00030STATE^T00030ZIP^T00030HOMEPHONE^D00030OldApptDate
///</returns>
/// <remarks>Not sure if this works yet</remarks>
/// <remarks>Mirrors dsRebookAppts.PatientAppt Schema. Can merge table into schema.</remarks>
public DataTable GetRebookedAppointments(string sClinicList, DateTime BeginDate, DateTime EndDate)
{
@ -103,6 +102,21 @@ namespace IndianHealthService.ClinicalScheduling
return RPMSDataTable(cmd, "");
}
public DataTable GetRebookedAppointments(string sApptList)
{
string cmd = String.Format("BSDX REBOOK LIST^{0}", sApptList);
return RPMSDataTable(cmd, "");
}
public DataTable GetCancelledAppointments(string sClinicList, DateTime BeginDate, DateTime EndDate)
{
string sBegin = FMDateTime.Create(BeginDate).DateOnly.FMDateString;
string sEnd = FMDateTime.Create(EndDate).DateOnly.FMDateString;
string cmd = String.Format("BSDX CANCEL CLINIC LIST^{0}^{1}^{2}", sClinicList, sBegin, sEnd);
return RPMSDataTable(cmd, "");
}
/// <summary>
/// Workhorse
/// </summary>

View File

@ -7,7 +7,7 @@ using System.Drawing;
namespace IndianHealthService.ClinicalScheduling
{
/// <summary>
/// Summary description for DPatientLetter.
/// Handles Printing of letters (Reminder, Rebook, Cancellation) and a Report. Contains a Print Preview dialog.
/// </summary>
public class DPatientLetter : System.Windows.Forms.PrintPreviewDialog
{
@ -17,6 +17,8 @@ namespace IndianHealthService.ClinicalScheduling
private System.ComponentModel.Container components = null;
private System.Drawing.Printing.PrintDocument printAppts;
private System.Drawing.Printing.PrintDocument printReminderLetters;
private System.Drawing.Printing.PrintDocument printCancelLetters;
private System.Drawing.Printing.PrintDocument printRebookLetters;
#region Fields
DateTime _dtBegin, _dtEnd; //global fields to use in passing to printing method
@ -27,13 +29,54 @@ namespace IndianHealthService.ClinicalScheduling
int _currentApptPrinting = 0;
int _pageNumber = 0;
//dataset to load the results of queries into and set to print routines
//typed datasets to load the results of queries into and set to print routines
dsPatientApptDisplay2 _dsApptDisplay;
private PrintDocument printCancelLetters;
private PrintDocument printRebookLetters;
dsRebookAppts _dsRebookAppts;
#endregion Fields
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.printAppts = new System.Drawing.Printing.PrintDocument();
this.printReminderLetters = new System.Drawing.Printing.PrintDocument();
this.printCancelLetters = new System.Drawing.Printing.PrintDocument();
this.printRebookLetters = new System.Drawing.Printing.PrintDocument();
this.SuspendLayout();
//
// printAppts
//
this.printAppts.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printAppts_PrintPage);
//
// printReminderLetters
//
this.printReminderLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printReminderLetters_PrintPage);
//
// printCancelLetters
//
this.printCancelLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printCancelLetters_PrintPage);
//
// printRebookLetters
//
this.printRebookLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printRebookLetters_PrintPage);
//
// DPatientLetter
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(648, 398);
this.Name = "DPatientLetter";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Patient Letter";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// Print Clinic Schedules
/// </summary>
@ -82,7 +125,6 @@ namespace IndianHealthService.ClinicalScheduling
/// <param name="sClinicList">Clinics for which to print</param>
/// <param name="dtBegin">Beginning Date</param>
/// <param name="dtEnd">End Date</param>
/// working on moving this over...
public void InitializeFormRebookLetters(CGDocumentManager docManager,
string sClinicList,
DateTime dtBegin,
@ -95,16 +137,13 @@ namespace IndianHealthService.ClinicalScheduling
throw new Exception("At least one clinic must be selected.");
}
string sBegin = dtBegin.ToString("M/d/yyyy@HH:mm");
string sEnd = dtEnd.ToString("M/d/yyyy@HH:mm");
//Call RPC to get list of appt ids that have been rebooked for these clinics on these dates
string sSql1 = "BSDX REBOOK CLINIC LIST^" + sClinicList + "^" + sBegin + "^" + sEnd;
string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList;
DataTable PatientAppts = docManager.DAL.GetRebookedAppointments(sClinicList, dtBegin, dtEnd);
DataTable Resources = docManager.DAL.GetResourceLetters(sClinicList);
_dsRebookAppts = new dsRebookAppts();
_dsRebookAppts.PatientAppts.Merge(docManager.RPMSDataTable(sSql1, "PatientAppts"));
_dsRebookAppts.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources"));
_dsRebookAppts.PatientAppts.Merge(PatientAppts);
_dsRebookAppts.BSDXResource.Merge(Resources);
}
catch (Exception ex)
@ -133,14 +172,12 @@ namespace IndianHealthService.ClinicalScheduling
throw new Exception("At least one clinic must be selected.");
}
string sSql1 = "BSDX REBOOK LIST^" + sApptIDList;
string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList;
DataTable PatientAppts = docManager.DAL.GetRebookedAppointments(sApptIDList);
DataTable Resources = docManager.DAL.GetResourceLetters(sClinicList);
_dsRebookAppts = new dsRebookAppts();
_dsRebookAppts.PatientAppts.Merge(docManager.RPMSDataTable(sSql1, "PatientAppts"));
_dsRebookAppts.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources"));
_dsRebookAppts.PatientAppts.Merge(PatientAppts);
_dsRebookAppts.BSDXResource.Merge(Resources);
}
catch (Exception ex)
{
@ -169,16 +206,12 @@ namespace IndianHealthService.ClinicalScheduling
throw new Exception("At least one clinic must be selected.");
}
string sBegin = dtBegin.ToString("M/d/yyyy@HH:mm");
string sEnd = dtEnd.ToString("M/d/yyyy@HH:mm");
//Call RPC to get list of appt ids that have been cancelled for these clinics on these dates
string sSql1 = "BSDX CANCEL CLINIC LIST^" + sClinicList + "^" + sBegin + "^" + sEnd;
string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList;
DataTable PatientAppts = docManager.DAL.GetCancelledAppointments(sClinicList, dtBegin, dtEnd);
DataTable Resources = docManager.DAL.GetResourceLetters(sClinicList);
_dsRebookAppts = new dsRebookAppts();
_dsRebookAppts.PatientAppts.Merge(docManager.RPMSDataTable(sSql1, "PatientAppts"));
_dsRebookAppts.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources"));
_dsRebookAppts.PatientAppts.Merge(PatientAppts);
_dsRebookAppts.BSDXResource.Merge(Resources);
PrintPreviewControl.Document = printCancelLetters;
@ -207,18 +240,20 @@ namespace IndianHealthService.ClinicalScheduling
throw new Exception("At least one clinic must be selected.");
}
// Global variables to use in printing routine down below
_dtBegin = dtBegin;
_dtEnd = dtEnd;
string sBegin = dtBegin.ToShortDateString();
string sEnd = dtEnd.ToShortDateString();
this.Text = "Clinic Schedules";
string sSql = "BSDX CLINIC LETTERS^" + sClinicList + "^" + sBegin + "^" + sEnd;
string sSql2 = "BSDX RESOURCE LETTERS^" + sClinicList;
this.Text = "Reminder Letters";
// Get Data
DataTable PatientAppts = docManager.DAL.GetClinicSchedules(sClinicList, dtBegin, dtEnd);
DataTable Resources = docManager.DAL.GetResourceLetters(sClinicList);
// Merge tables into typed dataset
_dsApptDisplay = new dsPatientApptDisplay2();
_dsApptDisplay.BSDXResource.Merge(docManager.RPMSDataTable(sSql2, "Resources"));
_dsApptDisplay.PatientAppts.Merge(docManager.RPMSDataTable(sSql, "PatientAppts"));
_dsApptDisplay.PatientAppts.Merge(PatientAppts);
_dsApptDisplay.BSDXResource.Merge(Resources);
this.PrintPreviewControl.Document = printReminderLetters;
@ -259,46 +294,6 @@ namespace IndianHealthService.ClinicalScheduling
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.printAppts = new System.Drawing.Printing.PrintDocument();
this.printReminderLetters = new System.Drawing.Printing.PrintDocument();
this.printCancelLetters = new System.Drawing.Printing.PrintDocument();
this.printRebookLetters = new System.Drawing.Printing.PrintDocument();
this.SuspendLayout();
//
// printAppts
//
this.printAppts.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printAppts_PrintPage);
//
// printReminderLetters
//
this.printReminderLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printReminderLetters_PrintPage);
//
// printCancelLetters
//
this.printCancelLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printCancelLetters_PrintPage);
//
// printRebookLetters
//
this.printRebookLetters.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printRebookLetters_PrintPage);
//
// DPatientLetter
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(648, 398);
this.Name = "DPatientLetter";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Patient Letter";
this.ResumeLayout(false);
}
#endregion
private void printAppts_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{