Finished MediBedi fully, broke prescription then fixed it and changed session values to avoid cross population

This commit is contained in:
cadenjmoore 2024-04-03 16:50:34 -04:00
parent 1af5fa7a4f
commit 38c01a7d70
11 changed files with 56 additions and 38 deletions

View File

@ -12,9 +12,9 @@ namespace FWA_MAIN
if (!IsPostBack)
{
txtMedID.Text = Convert.ToString(Session["vMedID"]);
txtMedID.Text = Convert.ToString(Session["vMediID"]);
txtMedName.Text = Convert.ToString(Session["vMedName"]);
txtRxNum.Text = Convert.ToString(Session["vRxNum"]);
txtRxNum.Text = Convert.ToString(Session["vRxNumber"]);
btnMediSearch_OnClick(sender,e);
@ -27,7 +27,7 @@ namespace FWA_MAIN
DataSet ds = new DataSet();
string medID = Convert.ToString(Session["vMedID"]);
string medID = Convert.ToString(Session["vMediID"]);
string medicationname = Convert.ToString(Session["vMedName"]);
//string RxNum = Convert.ToString(Session["vRxNum"]);
@ -65,9 +65,9 @@ namespace FWA_MAIN
try
{
Session["vMedID"] = txtMedID.Text.Trim();
Session["vMediID"] = txtMedID.Text.Trim();
Session["vMedName"] = txtMedName.Text.Trim();
Session["vRxNum"] = txtRxNum.Text.Trim();
Session["vRxNumber"] = txtRxNum.Text.Trim();
Cache.Remove("StudentData");
BindData();
@ -133,15 +133,15 @@ namespace FWA_MAIN
try
{
Session["vMedID"] = txtMedID.Text.Trim();
Session["vMediID"] = txtMedID.Text.Trim();
Session["vMedName"] = txtMedName.Text.Trim();
Session["vRxNum"] = txtRxNum.Text.Trim();
Session["vRxNumber"] = txtRxNum.Text.Trim();
// Use the patientID value as needed
try
{
medicationID = PharmacyDataTier.GetNextPatientID();
medicationID = PharmacyDataTier.GetNextMedicationID();
medicationID = Crypt.Encrypt(medicationID);
Response.Redirect("medNew.aspx" + "?" + "ID=" + medicationID, false);
}
@ -165,9 +165,9 @@ namespace FWA_MAIN
try
{
Session["vMedID"] = txtMedID.Text.Trim();
Session["vMediID"] = txtMedID.Text.Trim();
Session["vMedName"] = txtMedName.Text.Trim();
Session["vRxNum"] = txtRxNum.Text.Trim();
Session["vRxNumber"] = txtRxNum.Text.Trim();
try
@ -193,7 +193,16 @@ namespace FWA_MAIN
protected void btnMedDelete_OnClick(object sender, EventArgs e)
{
throw new NotImplementedException();
try
{
PharmacyDataTier.DeleteMedication(gvMedication.SelectedRow.Cells[0].Text);
BindData();
}
catch (Exception exception)
{
}
}
}
}

View File

@ -920,7 +920,7 @@ namespace FWA_MAIN
}
}
public static double GetNextMedicationID()
public static string GetNextMedicationID()
{
try
{
@ -946,9 +946,15 @@ namespace FWA_MAIN
// MessageBox.Show("Error Getting next Patient ID","ERROR",MessageBoxButtons.OK);
}
string stringval = value.ToString();
while (stringval.Length < 7)
{
stringval = "0" + stringval;
}
// return dataSet
return value;
return stringval;
}
catch (Exception ex)
{

View File

@ -10,7 +10,7 @@
$(document).keypress(function(e) {
if (e.which === 13) { // Enter key = keycode 13
e.preventDefault(); // Prevent the default Enter action
$("#<%= btnPatSearch.ClientID %>").click(); // Trigger the search button click
$("#<%= btnPreSearch.ClientID %>").click(); // Trigger the search button click
}
});
});
@ -62,7 +62,7 @@
</div>
<br/>
<asp:Button runat="server" ID="btnPatSearch" Text="Search" CssClass="btnPatSearch" OnClick="btnPreSearch_OnClick"/>
<asp:Button runat="server" ID="btnPreSearch" Text="Search" CssClass="btnPatSearch" OnClick="btnPreSearch_OnClick"/>
<br/>
</div>

View File

@ -84,6 +84,7 @@ namespace FWA_MAIN
}
catch (Exception exception)
{
}
}
@ -239,5 +240,7 @@ namespace FWA_MAIN
BindData();
}
}
}
}

View File

@ -51,13 +51,13 @@ namespace FWA_MAIN
protected global::System.Web.UI.WebControls.TextBox txtMedID;
/// <summary>
/// btnPatSearch control.
/// btnPreSearch control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnPatSearch;
protected global::System.Web.UI.WebControls.Button btnPreSearch;
/// <summary>
/// gvPrescription control.

Binary file not shown.

Binary file not shown.

View File

@ -17,15 +17,15 @@
<h1 style="text-align: center; font-size: 44px">Edit Medication</h1>
<div class="patDiv">
<div class="patDiv">
<div class="patDiv" style="padding-left: 150px; padding-right: 5px;width: 100px">
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Medication ID: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Medication Name: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Intake Method: </label></div>
<div class="patDiv" style="padding-left: 450px; padding-right: 30px;width: 100px">
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Medication ID: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Medication Name: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Intake Method: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Frequency: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Dosage: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">Purpose: </label></div>
<div class="indivPatDiv" style="text-align: right"><label class="buttonLabel">RX Number: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Frequency: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Dosage: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">Purpose: </label></div>
<div class="indivPatDiv" style="text-align: right; width: 120px"><label class="buttonLabel">RX Number: </label></div>
</div>
<div class="patDiv">
<div class="indivPatDiv"><asp:TextBox runat="server" CssClass="defaultTXT" ID="txtMedID"></asp:TextBox></div>

Binary file not shown.

Binary file not shown.

View File

@ -14,7 +14,7 @@ namespace FWA_MAIN
if (!IsPostBack)
{
txtPatID.Text = Convert.ToString(Session["vPatID"]);
txtPatID.Text = Convert.ToString(Session["vPatientID"]);
txtFNAME.Text = Convert.ToString(Session["vFNAME"]);
txtLNAME.Text = Convert.ToString(Session["vLNAME"]);
@ -35,7 +35,7 @@ namespace FWA_MAIN
DataSet ds = new DataSet();
string patID = Convert.ToString(Session["vPatID"]);
string patID = Convert.ToString(Session["vPatientID"]);
string LNAME = Convert.ToString(Session["vLNAME"]);
string FNAME = Convert.ToString(Session["vFNAME"]);
@ -71,7 +71,7 @@ namespace FWA_MAIN
try
{
Session["vPatID"] = txtPatID.Text.Trim();
Session["vPatientID"] = txtPatID.Text.Trim();
Session["vFNAME"] = txtFNAME.Text.Trim();
Session["vLNAME"] = txtLNAME.Text.Trim();
@ -136,7 +136,7 @@ namespace FWA_MAIN
try
{
Session["vPatID"] = txtPatID.Text.Trim();
Session["vPatientID"] = txtPatID.Text.Trim();
Session["vFNAME"] = txtFNAME.Text.Trim();
Session["vLNAME"] = txtLNAME.Text.Trim();
@ -169,7 +169,7 @@ namespace FWA_MAIN
try
{
Session["vPatID"] = txtPatID.Text.Trim();
Session["vPatientID"] = txtPatID.Text.Trim();
Session["vFNAME"] = txtFNAME.Text.Trim();
Session["vLNAME"] = txtLNAME.Text.Trim();