DCheckIn.cs: Handling of providers for hospital locations (HL). If provider(s) assigned to HL linked to resource, they are brought over and if a default one is in VISTA, it's picked as the default in the combobox. If no default, combobox defaults to <None>. If resource not linked to HL, then all providers in system brought over, and combobox default is <None>.

CGDocumentManager.cs: Remove loading of ClinicSetupParameters file. File doesn't exist in VISTA.
DResource.cs: Remove handling of same file.
This commit is contained in:
sam 2010-06-18 23:06:14 +00:00
parent 6b19ad0ac8
commit a358427378
9 changed files with 736 additions and 674 deletions

View File

@ -441,12 +441,12 @@ namespace IndianHealthService.ClinicalScheduling
}
//TODO:REMOVE THIS
public void LoadClinicSetupTable()
/*public void LoadClinicSetupTable()
{
string sCommandText = "BSDX CLINIC SETUP";
ConnectInfo.RPMSDataTable(sCommandText, "ClinicSetupParameters", m_dsGlobal);
Debug.Write("LoadGlobalRecordsets -- ClinicSetupParameters loaded\n");
}
}*/
public void LoadBSDXResourcesTable()
{
@ -589,10 +589,12 @@ namespace IndianHealthService.ClinicalScheduling
dc[0] = dtTemp.Columns["HOSPITAL_LOCATION_ID"];
m_dsGlobal.Tables["HospitalLocation"].PrimaryKey = dc;
LoadClinicSetupTable();
//smh
//LoadClinicSetupTable();
//smh
//Build Primary Key for ClinicSetupParameters table
dc = new DataColumn[1];
/*dc = new DataColumn[1];
dtTemp = m_dsGlobal.Tables["ClinicSetupParameters"];
dc[0] = dtTemp.Columns["HOSPITAL_LOCATION_ID"];
m_dsGlobal.Tables["ClinicSetupParameters"].PrimaryKey = dc;
@ -601,12 +603,13 @@ namespace IndianHealthService.ClinicalScheduling
dr = new DataRelation("HospitalLocationClinic", //Relation Name
m_dsGlobal.Tables["HospitalLocation"].Columns["HOSPITAL_LOCATION_ID"], //Parent
m_dsGlobal.Tables["ClinicSetupParameters"].Columns["HOSPITAL_LOCATION_ID"], false); //Child
m_dsGlobal.Relations.Add(dr);
m_dsGlobal.Relations.Add(dr);*/
/*SMH
dtTemp.Columns.Add("PROVIDER", System.Type.GetType("System.String"), "Parent.DEFAULT_PROVIDER");
dtTemp.Columns.Add("CLINIC_STOP", System.Type.GetType("System.String"), "Parent.STOP_CODE_NUMBER");
dtTemp.Columns.Add("INACTIVATE_DATE", System.Type.GetType("System.String"), "Parent.INACTIVATE_DATE");
dtTemp.Columns.Add("REACTIVATE_DATE", System.Type.GetType("System.String"), "Parent.REACTIVATE_DATE");
*/
//Build Data Relationships between Resources and HospitalLocation tables
dr = new DataRelation("HospitalLocationResource", //Relation Name
@ -654,9 +657,6 @@ namespace IndianHealthService.ClinicalScheduling
ConnectInfo.RPMSDataTable(sCommandText, "HOLIDAY", m_dsGlobal);
Debug.Write("LoadingGlobalRecordsets -- Holidays loaded\n");
sCommandText = @"SELECT HOSPITAL_LOCATION.BMXIEN 'BMXIEN', HOSPITAL_LOCATION.PROVIDER.PROVIDER 'PROVIDER', HOSPITAL_LOCATION.PROVIDER.DEFAULT_PROVIDER 'DEFAULT' FROM HOSPITAL_LOCATION";
ConnectInfo.RPMSDataTable(sCommandText, "ClinicProviders", m_dsGlobal);
Debug.Write("LoadingGlobalRecordsets -- ClinicProviders loaded\n");
//Save the xml schema
//m_dsGlobal.WriteXmlSchema(@"..\..\csSchema20060526.xsd");

View File

@ -1959,6 +1959,7 @@ namespace IndianHealthService.ClinicalScheduling
//TODO: Remove this. This doesn't exist in VISTA.
/*
DataRow[] draCS = drHL.GetChildRows(m_DocManager.GlobalDataSet.Relations["HospitalLocationClinic"]);
if (draCS.GetLength(0) > 0)
{
@ -1970,10 +1971,11 @@ namespace IndianHealthService.ClinicalScheduling
bProvReqd = (sProvReqd == "YES")?true:false;
bPCC = (sPCC == "YES")?true:false;
bMultCodes = (sMultCodes == "YES")?true:false;
*/
}
DCheckIn dlgCheckin = new DCheckIn();
dlgCheckin.InitializePage(a, this.m_DocManager, sProv, bProvReqd, bPCC, bMultCodes, sStopCode);
dlgCheckin.InitializePage(a, this.m_DocManager, sProv, bProvReqd, bPCC, bMultCodes, sStopCode, nHospLoc);
calendarGrid1.CGToolTip.Active = false;
if (dlgCheckin.ShowDialog(this) != DialogResult.OK)
{

View File

@ -164,7 +164,6 @@
<None Include="dsRebookAppts.xsx">
<DependentUpon>dsRebookAppts.xsd</DependentUpon>
</None>
<None Include="Properties\app.manifest" />
<Content Include="App.ico" />
<Content Include="dsPatientApptDisplay2.xsd">
<Generator>MSDataSetGenerator</Generator>
@ -434,6 +433,9 @@
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PreBuildEvent>

View File

@ -35,7 +35,7 @@
<RemoteDebugMachine>
</RemoteDebugMachine>
<StartAction>Project</StartAction>
<StartArguments>/s=s0110.sequencemanagers.com /p=8110 /a=wizard.11 /v=storm.11</StartArguments>
<StartArguments>/s=192.168.254.129 /p=9260 /a=shabiel12 /v=catdog.44</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=s0110.sequencemanagers.com /p=8110 /a=wizard.11 /v=storm.11</StartArguments>
<StartArguments>/s=192.168.254.129 /p=9260 /a=shabiel12 /v=catdog.44</StartArguments>
<StartPage>
</StartPage>
<StartProgram>

View File

@ -64,7 +64,7 @@ namespace IndianHealthService.ClinicalScheduling
private string m_sStopCodeIEN;
private CGDocumentManager m_DocManager;
private DataSet m_dsGlobal;
private DataView m_dvProvider;
private DataTable m_dtProvider;
private DataView m_dvCS;
private bool m_bProviderRequired;
private DataTable m_dtClinic;
@ -188,9 +188,19 @@ namespace IndianHealthService.ClinicalScheduling
#region Methods
/// <summary>
/// Fill memeber variables before showing dialog
/// </summary>
/// <param name="a">Appointment</param>
/// <param name="docManager">Document Manager</param>
/// <param name="sDefaultProvider">Default provider</param>
/// <param name="bProviderRequired">not used</param>
/// <param name="bGeneratePCCPlus">not used</param>
/// <param name="bMultCodes">not used</param>
/// <param name="sStopCode">Stop Code</param>
public void InitializePage(CGAppointment a, CGDocumentManager docManager,
string sDefaultProvider, bool bProviderRequired, bool bGeneratePCCPlus,
bool bMultCodes, string sStopCode)
bool bMultCodes, string sStopCode, int nHospLoc)
{
m_bInit = true;
m_DocManager = docManager;
@ -198,30 +208,57 @@ namespace IndianHealthService.ClinicalScheduling
int nFind = 0;
//Provider processing
m_bProviderRequired = bProviderRequired;
m_dvProvider = new DataView(m_dsGlobal.Tables["Provider"]);
m_dvProvider.Sort = "NAME ASC";
cboProvider.DataSource = m_dvProvider;
m_bProviderRequired = bProviderRequired; //not used in VISTA --remove
//smh new code
//if the resource is linked to a valid hospital location, grab this locations providers
//from the provider multiple and put them in the combo box.
if (nHospLoc != 0)
{
//RPC BSDX HOSP LOC PROVIDERS returns Table w/ Columns:
//HOSPITAL_LOCATION_ID^BMXIEN (ie Prov IEN)^NAME^DEFALUT
string sCommandText = "BSDX HOSP LOC PROVIDERS^" + nHospLoc;
m_dtProvider = docManager.RPMSDataTable(sCommandText, "ClinicProviders");
m_dtProvider.DefaultView.Sort = "NAME ASC";
cboProvider.DataSource = m_dtProvider;
cboProvider.DisplayMember = "NAME";
cboProvider.ValueMember = "BMXIEN";
nFind = m_dvProvider.Find((string) "<None>");
if (nFind < 0)
{
DataRowView drvProv = m_dvProvider.AddNew();
drvProv.BeginEdit();
drvProv["NAME"]="<None>";
drvProv["BMXIEN"]="0";
drvProv.EndEdit();
}
//Add None to the top of the list
DataRow drProv = m_dtProvider.NewRow();
drProv.BeginEdit();
drProv["HOSPITAL_LOCATION_ID"] = 0;
drProv["NAME"] = "<None>";
drProv["BMXIEN"] = 0;
drProv.EndEdit();
m_dtProvider.Rows.InsertAt(drProv, 0);
cboProvider.SelectedIndex = 0;
if (sDefaultProvider != "")
{
nFind = m_dvProvider.Find((string) sDefaultProvider);
//Find default provider--search for Yes in Field DEFAULT
DataRow[] nRow = m_dtProvider.Select("DEFAULT='YES'", "NAME ASC");
if (nRow.Length > 0) nFind = m_dtProvider.Rows.IndexOf(nRow[0]);
cboProvider.SelectedIndex = nFind;
m_sProvider = sDefaultProvider;
}
else
{
m_dtProvider = m_dsGlobal.Tables["Provider"];
m_dtProvider.DefaultView.Sort = "NAME ASC";
cboProvider.DataSource = m_dtProvider;
cboProvider.DisplayMember = "NAME";
cboProvider.ValueMember = "BMXIEN";
//Add None to the top of the list
DataRow drProv = m_dtProvider.NewRow();
drProv.BeginEdit();
drProv["NAME"] = "<None>";
drProv["BMXIEN"] = 0;
drProv.EndEdit();
m_dtProvider.Rows.InsertAt(drProv, 0);
cboProvider.SelectedIndex = 0;
}
//Stop code processing
this.lblStopCode.Visible = false;
@ -280,6 +317,10 @@ namespace IndianHealthService.ClinicalScheduling
}
}
/// <summary>
/// Not used in VISTA. Needs to be removed
/// <remarks>Not used in VISTA.</remarks>
/// </summary>
private void PCCPlus()
{
//PCCPlus processing

View File

@ -537,7 +537,6 @@ namespace IndianHealthService.ClinicalScheduling
public void InitializePage(int nSelectedResourceID, DataSet dsGlobal)
{
m_dtResources = dsGlobal.Tables["Resources"];
//Datasource the HOSPITAL LOCATION combo box
@ -554,13 +553,13 @@ namespace IndianHealthService.ClinicalScheduling
drv.EndEdit();
}
DataTable dtClinicParams = dsGlobal.Tables["ClinicSetupParameters"];
m_dvClinicParams = new DataView(dtClinicParams);
// DataTable dtClinicParams = dsGlobal.Tables["ClinicSetupParameters"];
// m_dvClinicParams = new DataView(dtClinicParams);
// m_dvClinicParams.Sort = "HOSPITAL_LOCATION_ID ASC";
m_dvClinicParams.Sort = "HOSPITAL_LOCATION ASC";
string sFind = "<None>";
// m_dvClinicParams.Sort = "HOSPITAL_LOCATION ASC";
// string sFind = "<None>";
// nFind = m_dvClinicParams.Find((int) 0);
nFind = m_dvClinicParams.Find((string) sFind);
/* nFind = m_dvClinicParams.Find((string) sFind);
if (nFind < 0)
{
@ -572,7 +571,7 @@ namespace IndianHealthService.ClinicalScheduling
drv["VISIT_SERVICE_CATEGORY"]="";
drv.EndEdit();
}
*/
//smh cboRPMSClinic.DataSource = m_dvClinicParams;
cboRPMSClinic.DataSource = m_dvHospLoc;
cboRPMSClinic.DisplayMember = "HOSPITAL_LOCATION";

View File

@ -664,6 +664,24 @@
Required designer variable.
</summary>
</member>
<member name="M:IndianHealthService.ClinicalScheduling.DCheckIn.InitializePage(IndianHealthService.ClinicalScheduling.CGAppointment,IndianHealthService.ClinicalScheduling.CGDocumentManager,System.String,System.Boolean,System.Boolean,System.Boolean,System.String,System.Int32)">
<summary>
Fill memeber variables before showing dialog
</summary>
<param name="a">Appointment</param>
<param name="docManager">Document Manager</param>
<param name="sDefaultProvider">Default provider</param>
<param name="bProviderRequired">not used</param>
<param name="bGeneratePCCPlus">not used</param>
<param name="bMultCodes">not used</param>
<param name="sStopCode">Stop Code</param>
</member>
<member name="M:IndianHealthService.ClinicalScheduling.DCheckIn.PCCPlus">
<summary>
Not used in VISTA. Needs to be removed
<remarks>Not used in VISTA.</remarks>
</summary>
</member>
<member name="M:IndianHealthService.ClinicalScheduling.DCheckIn.UpdateDialogData(System.Boolean)">
<summary>
If b is true, moves member vars into control data