// sometimes occures in a transaction with insertion of new patient record public void InsertAppointmentRecord(Hashtable appointmentArgs, int patientId, SqlTransaction trans) { // add our appointment stuff here SqlCommand apptcmd = DataAccessHelper.CreateCommand(APPT_SQL, trans); // use the transaction from above, somehow apptcmd.CommandType = CommandType.Text; DataAccessHelper.AddIntInputParam(apptcmd, "ApptPatientId", patientId); DataAccessHelper.AddStringInputParam(apptcmd, "ApptFirstName", (string)appointmentArgs["ApptFirstName"]); DataAccessHelper.AddStringInputParam(apptcmd, "ApptLastName", (string)appointmentArgs["ApptLastName"]); DataAccessHelper.AddStringInputParam(apptcmd, "ApptMRN", (string)appointmentArgs["ApptMRN"]); DataAccessHelper.AddStringInputParam(apptcmd, "ApptPhysician", (string)appointmentArgs["ApptPhysician"]); DataAccessHelper.AddStringInputParam(apptcmd, "ApptVisitType", (string)appointmentArgs["ApptVisitType"]); DataAccessHelper.AddStringInputParam(apptcmd, "ApptDept", (string)appointmentArgs["ApptDept"]); DataAccessHelper.AddStringInputParam(apptcmd, "ApptNotes", (string)appointmentArgs["ApptNotes"]); DataAccessHelper.AddDateTimeInputParam(apptcmd, "ApptClinicDate", (DateTime)appointmentArgs["ApptClinicDate"]); DataAccessHelper.AddDateTimeInputParam(apptcmd, "ApptTime", (DateTime)appointmentArgs["ApptTime"]); SecurityController sc = new SecurityController(); string username = sc.GetUserName(); DateTime now = DateTime.Now; DataAccessHelper.AddStringInputParam(apptcmd, "EnteredBy", username); DataAccessHelper.AddDateTimeInputParam(apptcmd, "EnteredTime", now); DataAccessHelper.AddStringInputParam(apptcmd, "UpdatedBy", username); DataAccessHelper.AddDateTimeInputParam(apptcmd, "UpdatedTime", now); apptcmd.ExecuteNonQuery(); }
override protected void BuildFamilyHistory() { if (patientID != 0) { // Family History SqlCommand familyHistoryCom = DataAccessHelper.CreateCommand("spFormListFamilyMemberDiagnosis"); DataAccessHelper.AddIntInputParam(familyHistoryCom, "patientID", this.patientID); DataAccessHelper.AddStringInputParam(familyHistoryCom, "formName", "URONV"); DataAccessHelper.AddStringInputParam(familyHistoryCom, "formType", "dynamic"); DataSet familyHistoryDs = DataAccessHelper.GetList(familyHistoryCom); if (familyHistoryDs.Tables[0].Rows.Count == 0) { DataRow blankFamHistoryRow; blankFamHistoryRow = familyHistoryDs.Tables[0].NewRow(); blankFamHistoryRow["FamMemRelation"] = "<br><br><img src=\"../images/shim.gif\" border=\"0\" width=\"12\" height=\"1\">- Cancer:<br><br><br><br><br><img src=\"../images/shim.gif\" border=\"0\" width=\"12\" height=\"1\">- Other:"; familyHistoryDs.Tables[0].Rows.Add(blankFamHistoryRow); } if (familyHistoryDs.Tables[0].Rows.Count > 0) { FamilyHistoryFiller.Visible = false; familyHistory.DataSource = familyHistoryDs.Tables[0].DefaultView; familyHistory.DataBind(); } } }
public static DataSet GetPSADTVelocity(int patientId, DateTime startDt, DateTime endDt, string PSAThreshold) { //SqlCommand com = DataAccessHelper.CreateCommand("spGetPSADTVelocity"); SqlCommand com = DataAccessHelper.CreateCommand("spPluginPSAGraphGetPSADTVelocity"); DataAccessHelper.AddIntInputParam(com, "PatientId", patientId); DataAccessHelper.AddDateTimeInputParam(com, "StartDT", startDt); DataAccessHelper.AddDateTimeInputParam(com, "EndDT", endDt); DataAccessHelper.AddStringInputParam(com, "PSAThreshold", PSAThreshold); DataSet ds = DataAccessHelper.GetList(com); return(ds); }
override protected void BuildSocialHistory() { if (patientID != 0) { // Social History SqlCommand socialHistoryCom = DataAccessHelper.CreateCommand("spFormGetSocialHistoriesRecord"); DataAccessHelper.AddIntInputParam(socialHistoryCom, "patientID", this.patientID); DataAccessHelper.AddStringInputParam(socialHistoryCom, "formName", "URONV"); DataAccessHelper.AddStringInputParam(socialHistoryCom, "formType", "dynamic"); DataSet socialHistoryDs = DataAccessHelper.GetList(socialHistoryCom); if (!socialHistoryDs.Tables.Count.Equals(0) && !socialHistoryDs.Tables[0].Rows.Count.Equals(0)) { socHxOccupation.Text = socialHistoryDs.Tables[0].Rows[0]["SocHxOccupation"].ToString(); socHxMaritalStatus.Text = socialHistoryDs.Tables[0].Rows[0]["SocHxMaritalStatus"].ToString(); socHxChildren.Text = socialHistoryDs.Tables[0].Rows[0]["SocHxChildren"].ToString(); // socHxTobaccoType.Text = socialHistoryDs.Tables[0].Rows[0]["SocHxTobaccoType"].ToString(); if (socialHistoryDs.Tables[0].Rows[0]["SocHxTobaccoPacksPerDay"] != null && socialHistoryDs.Tables[0].Rows[0]["SocHxTobaccoPacksPerDay"].ToString() != "") { socHxTobaccoPacksPerDay.Text = socialHistoryDs.Tables[0].Rows[0]["SocHxTobaccoPacksPerDay"].ToString(); socHxTobaccoPacksPerDayCheckBox.Checked = true; } if (socialHistoryDs.Tables[0].Rows[0]["SocHxTobaccoYears"] != null && socialHistoryDs.Tables[0].Rows[0]["SocHxTobaccoYears"].ToString() != "") { socHxTobaccoPacksPerDayCheckBox.Checked = true; socHxTobaccoYears.Text = socialHistoryDs.Tables[0].Rows[0]["SocHxTobaccoYears"].ToString(); } if (socialHistoryDs.Tables[0].Rows[0]["SocHxTobaccoQuitYear"] != null && socialHistoryDs.Tables[0].Rows[0]["SocHxTobaccoQuitYear"].ToString() != "") { socHxTobaccoQuitYearCheckbox.Checked = true; socHxTobaccoQuitYear.Text = socialHistoryDs.Tables[0].Rows[0]["SocHxTobaccoQuitYear"].ToString(); } socHxCarcinogen.Text = socialHistoryDs.Tables[0].Rows[0]["SocHxCarcinogen"].ToString(); if (socialHistoryDs.Tables[0].Rows[0]["SocHxAlcohol"] != null && socialHistoryDs.Tables[0].Rows[0]["SocHxAlcohol"].ToString().Length > 0) { socHxAlcohol.Text = socialHistoryDs.Tables[0].Rows[0]["SocHxAlcohol"].ToString(); } } } }