protected void SaveActionClick(object sender, EventArgs e) { if (PatientId != 0) { // create ActionItem = 'PtContactInfoUpdated' for patients to check ActionDa actionDa = new ActionDa(); BOL.Action actionObj = new Caisis.BOL.Action(); actionObj[BOL.Action.PatientId] = PatientId; actionObj[BOL.Action.ActionDateText] = DateTime.Today.ToShortDateString(); actionObj[BOL.Action.ActionDate] = DateTime.Today; actionObj[BOL.Action.ActionItem] = "PtContactInfoUpdated"; UserController userCt = new UserController(); int currentUserId = userCt.GetUserId(); UserDa currentUserDa = new UserDa(); DataSet currentUserDs = currentUserDa.GetByUserId(userCt.GetUserId()); actionObj[BOL.Action.EnteredBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; actionObj[BOL.Action.EnteredTime] = DateTime.Today; actionObj.Save(); // set patient status to 'current' Patient ptObj = new Patient(); ptObj.Get(PatientId); if (!ptObj.IsEmpty) { ptObj[Patient.PtContactStatus] = "Current"; ptObj[Patient.PtAddress1] = PatientAddress1TB.Text; ptObj[Patient.PtAddress2] = PatientAddress2TB.Text; ptObj[Patient.PtCity] = PatientCityTB.Text; ptObj[Patient.PtState] = PatientStateSelect.SelectedValue; ptObj[Patient.PtPostalCode] = PatientPostalCodeTB.Text; ptObj[Patient.PtEmail] = PatientEmailTB.Text; ptObj[Patient.PtCountry] = PatientCountryCB.Text; ptObj[Patient.PtCompany] = PatientCompanyTB.Text; ptObj[Patient.PtBusinessCity] = PatientBusinessCityTB.Text; ptObj[Patient.PtBusinessState] = PatientBusinessStateSelect.SelectedValue; ptObj[Patient.PtContactPerson] = PatientContactPersonTB.Text; ptObj[Patient.PtContactAddress1] = PatientContactAddress1TB.Text; ptObj[Patient.PtContactAddress2] = PatientContactAddress2TB.Text; ptObj[Patient.PtContactCity] = PatientContactCityTB.Text; ptObj[Patient.PtContactState] = PatientContactStateSelect.SelectedValue; ptObj[Patient.PtContactPostalCode] = PatientContactPostalCodeTB.Text; ptObj[Patient.PtContactPhone] = PatientContactPhoneTB.Text; ptObj[Patient.UpdatedBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; ptObj[Patient.UpdatedTime] = DateTime.Today; ptObj.Save(); } } Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "_reloadMainPage", "reloadMainPage(); ", true); }
protected void LetterReceivedClick(object sender, EventArgs e) { if (PatientId != 0) { // create ActionItem = 'DataReceived' UserController userCt = new UserController(); int currentUserId = userCt.GetUserId(); UserDa currentUserDa = new UserDa(); DataSet currentUserDs = currentUserDa.GetByUserId(userCt.GetUserId()); bool actionAlreadyExists = false; ActionDa actionDa = new ActionDa(); DataSet actionDs = actionDa.ValidateActionItem(PatientId, "DataReceived"); if (actionDs.Tables.Count > 0) { DataView actionDv = new DataView(actionDs.Tables[0]); actionDv.RowFilter = BOL.Action.ActionDateText + " = '" + DateTime.Today.ToShortDateString() + "' AND " + BOL.Action.ActionItem + " = 'DataReceived' "; if (actionDv.Count > 0) { actionAlreadyExists = true; } } // if action item does not already exist for today if (!actionAlreadyExists) { BOL.Action actionObj = new Caisis.BOL.Action(); actionObj[BOL.Action.PatientId] = PatientId; actionObj[BOL.Action.ActionDateText] = LetterReceivedDateText.Text; actionObj[BOL.Action.ActionDate] = DateTime.Parse(LetterReceivedDate.Value).ToString(); actionObj[BOL.Action.ActionItem] = "DataReceived"; actionObj[BOL.Action.ActionNotes] = "Letter received"; actionObj[BOL.Action.EnteredBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; actionObj[BOL.Action.EnteredTime] = DateTime.Today; actionObj.Save(); } // set patient status to 'NeedDataEntry' Patient ptObj = new Patient(); ptObj.Get(PatientId); if (!ptObj.IsEmpty) { ptObj[Patient.PtContactStatus] = "NeedDataEntry"; ptObj[Patient.UpdatedBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; ptObj[Patient.UpdatedTime] = DateTime.Today; ptObj.Save(); } } Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "_reloadMainPage", "reloadMainPage(); ", true); }
protected void PrintingCompleteClick(object sender, EventArgs e) { DataView dv = new DataView(GetSelectedPatients()); dv.RowFilter = "Mail = 1"; int count = 0; foreach (DataRowView drv in dv) { // set patient status and create action items for PtAuthorizationRequested ActionDa actionDa = new ActionDa(); BOL.Action actionObj = new Caisis.BOL.Action(); Patient ptObj = new Patient(); ptObj.Get(Int32.Parse(drv[BOL.Patient.PatientId].ToString())); if (!ptObj.IsEmpty) { ptObj[Patient.PtContactStatus] = "PtAuthorizationRequested"; actionObj[BOL.Action.ActionItem] = "PtAuthorizationRequested"; UserController userCt = new UserController(); int currentUserId = userCt.GetUserId(); UserDa currentUserDa = new UserDa(); DataSet currentUserDs = currentUserDa.GetByUserId(userCt.GetUserId()); ptObj[Patient.UpdatedBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; ptObj[Patient.UpdatedTime] = DateTime.Today; ptObj.Save(); actionObj[BOL.Action.PatientId] = Int32.Parse(drv[BOL.Patient.PatientId].ToString()); actionObj[BOL.Action.ActionDateText] = DateTime.Today.ToShortDateString(); actionObj[BOL.Action.ActionDate] = DateTime.Today; actionObj[BOL.Action.EnteredBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; actionObj[BOL.Action.EnteredTime] = DateTime.Now; actionObj.Save(); count++; } } if (count > 0) { Option2RB.Checked = false; Option2RB.Enabled = false; Option2Title.Text = "No packages to print."; Option2Title.ForeColor = System.Drawing.Color.Gray; Option2ResultDiv.Style["display"] = "none"; Option2Details.Text = String.Empty; RemovePatientFromNeedLetterList(dv, "Mail"); } }
override protected void Page_Load(object sender, System.EventArgs e) { AppointmentDa aptDa = new AppointmentDa(); //populate clinic list Physicians from look up codes //rptClinicPhysicians.DataSource = CacheManager.GetLookupCodeList("apptPhysician"); //updated 9/22 fs rptClinicPhysicians.DataSource = aptDa.GetDistinctAppointmentPhysicians().Tables[0].DefaultView; rptClinicPhysicians.DataBind(); //append inpatient services to the bottom of the clinic list drop down //added 12/06/04 to allow form printing of inpatients InPatientDa ipda = new InPatientDa(); rptInPatientServices.DataSource = ipda.GetInPatientServices(); rptInPatientServices.DataBind(); //populate contact status from distinct values- status also present in look up codes PatientDa patDa = new PatientDa(); //count of patients in each contact status should be based on dataset user is logged into string datasetSql = CacheManager.GetDatasetSQL(Session[SessionKey.DatasetId]); DataSet contactStatusDs = patDa.GetDistinctContactStatus(datasetSql); rptStatus.DataSource = contactStatusDs; rptStatus.DataBind(); //populate categories from distinct values, takes username to display private SecurityController ct = new SecurityController(); string userName = ct.GetUserName(); CategoryDa catDa = new CategoryDa(); DataSet catDs = catDa.GetDistinctCategories(userName); rptCategories.DataSource = catDs; rptCategories.DataBind(); //v5.1: count of patients by action items ActionDa actionDa = new ActionDa(); DataTable actionDt = actionDa.GetDistinctPatientActions(datasetSql); rptActions.DataSource = actionDt; rptActions.DataBind(); }
protected void SaveActionClick(object sender, EventArgs e) { if (PatientId != 0) { // create ActionItem = 'MD_Contacted' for patients to check ActionDa actionDa = new ActionDa(); BOL.Action actionObj = new Caisis.BOL.Action(); actionObj[BOL.Action.PatientId] = PatientId; actionObj[BOL.Action.ActionDateText] = DateTime.Today.ToShortDateString(); actionObj[BOL.Action.ActionDate] = DateTime.Today; actionObj[BOL.Action.ActionItem] = "MD_Contacted"; actionObj[BOL.Action.ActionNotes] = !String.IsNullOrEmpty(PersonSpokeTo.Text) ? "Spoke to " + PersonSpokeTo.Text : String.Empty; UserController userCt = new UserController(); int currentUserId = userCt.GetUserId(); UserDa currentUserDa = new UserDa(); DataSet currentUserDs = currentUserDa.GetByUserId(userCt.GetUserId()); actionObj[BOL.Action.EnteredBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; actionObj[BOL.Action.EnteredTime] = DateTime.Now; actionObj.Save(); // set patient status to 'MD_Contacted' Patient ptObj = new Patient(); ptObj.Get(PatientId); if (!ptObj.IsEmpty) { ptObj[Patient.PtContactStatus] = "MD_Contacted"; ptObj[Patient.UpdatedTime] = DateTime.Now; ptObj[Patient.UpdatedBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; ptObj.Save(); } } Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "_reloadMainPage", "reloadMainPage(); ", true); }
protected void Repeater1_ItemCommand(object o, RepeaterCommandEventArgs e) { if (Convert.ToString(e.CommandName) == "DataEntered") { string currentPatientId = Convert.ToString(e.CommandArgument); string actionItemCommand = Convert.ToString(e.CommandName); try { HtmlImage DataEnteredImg = (HtmlImage)e.Item.FindControl("DataEnteredImg"); ImageButton DataEnteredBtn = (ImageButton)e.Item.FindControl("DataEnteredBtn"); Label DataEnteredLBL = (Label)e.Item.FindControl("DataEnteredLBL"); DropDownList HipaaDDL = (DropDownList)e.Item.FindControl("HipaaDDL"); Label StatusLBL = (Label)e.Item.FindControl("StatusLBL"); Label StatusPatientId = (Label)e.Item.FindControl("StatusPatientId"); // if hipaa status has been selected if (!String.IsNullOrEmpty(HipaaDDL.SelectedValue)) { StatusLBL.Text = String.Empty; if (DataEnteredBtn != null && DataEnteredImg != null) { DataEnteredBtn.Style["display"] = "none"; } if (!String.IsNullOrEmpty(currentPatientId)) { // create ActionItem = 'DataEntered' for patients to check ActionDa actionDa = new ActionDa(); BOL.Action actionObj = new Caisis.BOL.Action(); actionObj[BOL.Action.PatientId] = int.Parse(currentPatientId); actionObj[BOL.Action.ActionDateText] = DateTime.Today.ToShortDateString(); actionObj[BOL.Action.ActionDate] = DateTime.Today; actionObj[BOL.Action.ActionItem] = actionItemCommand; UserController userCt = new UserController(); int currentUserId = userCt.GetUserId(); UserDa currentUserDa = new UserDa(); DataSet currentUserDs = currentUserDa.GetByUserId(userCt.GetUserId()); actionObj[BOL.Action.EnteredBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; actionObj[BOL.Action.EnteredTime] = DateTime.Today; actionObj.Save(); // set patient status to 'NeedMD_Contact' if HIPAA = 'Yes" // set patient status to 'NeedPtAuthorization' if HIPAA = 'No' Patient ptObj = new Patient(); ptObj.Get(Int32.Parse(currentPatientId)); if (!ptObj.IsEmpty && !String.IsNullOrEmpty(HipaaDDL.SelectedValue)) { if (HipaaDDL.SelectedValue.ToLower() == "yes") { ptObj[Patient.PtContactStatus] = "NeedMD_Contact"; } else if (HipaaDDL.SelectedValue.ToLower() == "no") { ptObj[Patient.PtContactStatus] = "NeedPtAuthorization"; } ptObj[Patient.UpdatedTime] = DateTime.Today; ptObj[Patient.UpdatedBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; ptObj.Save(); } if (DataEnteredLBL != null && DataEnteredImg != null) { DataEnteredImg.Style["display"] = ""; DataEnteredLBL.Text = actionItemCommand; } } } else { StatusLBL.Text = "<br/>* specify HIPPA authorization"; StatusLBL.ForeColor = System.Drawing.Color.Red; } } catch (Exception ex) { // publish raw error ExceptionHandler.Publish(ex); } } }
protected void Repeater1_ItemCommand(object o, RepeaterCommandEventArgs e) { try { string currentPatientId = Convert.ToString(e.CommandArgument); string actionItemCommand = Convert.ToString(e.CommandName); HtmlImage DataReceivedImg = (HtmlImage)e.Item.FindControl("DataReceivedImg"); ImageButton DataReceivedBtn = (ImageButton)e.Item.FindControl("DataReceivedBtn"); Label DataReceivedLBL = (Label)e.Item.FindControl("DataReceivedLBL"); HtmlImage NeedMD_ContactImg = (HtmlImage)e.Item.FindControl("NeedMD_ContactImg"); ImageButton NeedMD_ContactBtn = (ImageButton)e.Item.FindControl("NeedMD_ContactBtn"); Label NeedMD_ContactLBL = (Label)e.Item.FindControl("NeedMD_ContactLBL"); UserController userCt = new UserController(); int currentUserId = userCt.GetUserId(); UserDa currentUserDa = new UserDa(); DataSet currentUserDs = currentUserDa.GetByUserId(userCt.GetUserId()); if (actionItemCommand == "DataReceived") { if (DataReceivedBtn != null && DataReceivedImg != null) { DataReceivedBtn.Style["display"] = "none"; } if (!String.IsNullOrEmpty(currentPatientId)) { bool actionAlreadyExists = false; ActionDa actionDa = new ActionDa(); DataSet actionDs = actionDa.ValidateActionItem(Int32.Parse(currentPatientId), actionItemCommand); if (actionDs.Tables.Count > 0) { DataView actionDv = new DataView(actionDs.Tables[0]); actionDv.RowFilter = BOL.Action.ActionDateText + " = '" + DateTime.Today.ToShortDateString() + "' AND " + BOL.Action.ActionItem + " = '" + actionItemCommand + "' "; if (actionDv.Count > 0) { actionAlreadyExists = true; } } // if action item does not already exist for today if (!actionAlreadyExists) { // create ActionItem = 'DataReceived' for patients to check BOL.Action actionObj = new Caisis.BOL.Action(); actionObj[BOL.Action.PatientId] = int.Parse(currentPatientId); actionObj[BOL.Action.ActionDateText] = DateTime.Today.ToShortDateString(); actionObj[BOL.Action.ActionDate] = DateTime.Today; actionObj[BOL.Action.ActionItem] = actionItemCommand; actionObj[BOL.Action.EnteredBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; actionObj[BOL.Action.EnteredTime] = DateTime.Today; actionObj.Save(); } // set patient status to 'NeedDataEntry' Patient ptObj = new Patient(); ptObj.Get(Int32.Parse(currentPatientId)); if (!ptObj.IsEmpty) { ptObj[Patient.PtContactStatus] = "NeedDataEntry"; ptObj[Patient.UpdatedTime] = DateTime.Today; ptObj[Patient.UpdatedBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; ptObj.Save(); } if (DataReceivedLBL != null && DataReceivedImg != null) { DataReceivedImg.Style["display"] = ""; DataReceivedLBL.Text = actionItemCommand; } // show "NeedMD_Contact" btn if (NeedMD_ContactBtn != null) { NeedMD_ContactBtn.Style["display"] = ""; } if (NeedMD_ContactLBL != null && NeedMD_ContactImg != null) { NeedMD_ContactImg.Style["display"] = "none"; NeedMD_ContactLBL.Text = String.Empty; } } } else if (actionItemCommand == "NeedMD_Contact") { if (NeedMD_ContactBtn != null && NeedMD_ContactImg != null) { NeedMD_ContactBtn.Style["display"] = "none"; } if (!String.IsNullOrEmpty(currentPatientId)) { // if any action item was created for "DataReceived", delete ActionDa actionDa = new ActionDa(); DataSet actionDs = actionDa.ValidateActionItem(Int32.Parse(currentPatientId), "DataReceived"); if (actionDs.Tables.Count > 0) { DataView actionDv = new DataView(actionDs.Tables[0]); actionDv.RowFilter = BOL.Action.ActionDateText + " = '" + DateTime.Today.ToShortDateString() + "' AND " + BOL.Action.ActionItem + " = 'DataReceived' "; if (actionDv.Count > 0) { BOL.Action actionObj = new Caisis.BOL.Action(); actionObj.Get(Int32.Parse(actionDv[0][BOL.Action.ActionId].ToString())); actionObj.Delete(); } } // set patient status to 'NeedMD_Contact' Patient ptObj = new Patient(); ptObj.Get(Int32.Parse(currentPatientId)); if (!ptObj.IsEmpty) { ptObj[Patient.PtContactStatus] = "NeedMD_Contact"; ptObj[Patient.UpdatedTime] = DateTime.Today; ptObj[Patient.UpdatedBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; ptObj.Save(); } if (NeedMD_ContactLBL != null && NeedMD_ContactImg != null) { NeedMD_ContactImg.Style["display"] = ""; NeedMD_ContactLBL.Text = actionItemCommand; } // show "Data Received" btn if (DataReceivedBtn != null) { DataReceivedBtn.Style["display"] = ""; } if (DataReceivedLBL != null && DataReceivedImg != null) { DataReceivedImg.Style["display"] = "none"; DataReceivedLBL.Text = String.Empty; } } } } catch (Exception ex) { // publish raw error ExceptionHandler.Publish(ex); } }
protected void Repeater1_ItemCommand(object o, RepeaterCommandEventArgs e) { if (Convert.ToString(e.CommandName) == "TumorRegistryChecked") { string currentPatientId = Convert.ToString(e.CommandArgument); string actionItemCommand = Convert.ToString(e.CommandName); try { HtmlImage TumorRegCheckedImg = (HtmlImage)e.Item.FindControl("TumorRegCheckedImg"); ImageButton TumorRegCheckedBtn = (ImageButton)e.Item.FindControl("TumorRegCheckedBtn"); Label TumorRegCheckedLBL = (Label)e.Item.FindControl("TumorRegCheckedLBL"); DropDownList StatusDDL = (DropDownList)e.Item.FindControl("StatusDDL"); Label StatusLBL = (Label)e.Item.FindControl("StatusLBL"); Label StatusPatientId = (Label)e.Item.FindControl("StatusPatientId"); if (TumorRegCheckedBtn != null && TumorRegCheckedImg != null) { TumorRegCheckedBtn.Style["display"] = "none"; } if (!String.IsNullOrEmpty(currentPatientId)) { // create ActionItem = 'TumorRegistryChecked' for patients to check ActionDa actionDa = new ActionDa(); BOL.Action actionObj = new Caisis.BOL.Action(); actionObj[BOL.Action.PatientId] = int.Parse(currentPatientId); actionObj[BOL.Action.ActionDateText] = DateTime.Today.ToShortDateString(); actionObj[BOL.Action.ActionDate] = DateTime.Today; actionObj[BOL.Action.ActionItem] = actionItemCommand; UserController userCt = new UserController(); int currentUserId = userCt.GetUserId(); UserDa currentUserDa = new UserDa(); DataSet currentUserDs = currentUserDa.GetByUserId(userCt.GetUserId()); actionObj[BOL.Action.EnteredBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; actionObj[BOL.Action.EnteredTime] = DateTime.Today; actionObj.Save(); // set patient status to 'Current' Patient ptObj = new Patient(); ptObj.Get(Int32.Parse(currentPatientId)); if (!ptObj.IsEmpty) { ptObj[Patient.PtContactStatus] = "Current"; ptObj[Patient.UpdatedTime] = DateTime.Today; ptObj[Patient.UpdatedBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; ptObj.Save(); } if (TumorRegCheckedLBL != null && TumorRegCheckedImg != null) { TumorRegCheckedImg.Style["display"] = ""; TumorRegCheckedLBL.Text = actionItemCommand; } // show status options if (StatusDDL != null && StatusLBL != null) { StatusDDL.Style["display"] = ""; StatusDDL.Width = Unit.Pixel(150); StatusLBL.Style["display"] = "none"; ptObj.Get(Int32.Parse(StatusPatientId.Text)); if (!ptObj.IsEmpty) { ListItem statusLi = new ListItem(ptObj[Patient.PtContactStatus].ToString(), ptObj[Patient.PtContactStatus].ToString()); if (StatusDDL.Items.Contains(statusLi)) { StatusDDL.SelectedValue = statusLi.Value; } else { StatusDDL.SelectedValue = "Current"; } } } } } catch (Exception ex) { // publish raw error ExceptionHandler.Publish(ex); } } }
protected void NeedMDContactClick(object sender, EventArgs e) { if (PatientId != 0) { // create ActionItem = 'DataReceived' UserController userCt = new UserController(); int currentUserId = userCt.GetUserId(); UserDa currentUserDa = new UserDa(); DataSet currentUserDs = currentUserDa.GetByUserId(userCt.GetUserId()); bool actionAlreadyExists = false; ActionDa actionDa = new ActionDa(); DataSet actionDs = actionDa.ValidateActionItem(PatientId, "DataReceived"); if (actionDs.Tables.Count > 0) { DataView actionDv = new DataView(actionDs.Tables[0]); actionDv.RowFilter = BOL.Action.ActionDateText + " = '" + DateTime.Today.ToShortDateString() + "' AND " + BOL.Action.ActionItem + " = 'DataReceived' "; if (actionDv.Count > 0) { actionAlreadyExists = true; } } // if action item does not already exist for today if (!actionAlreadyExists) { BOL.Action actionObj = new Caisis.BOL.Action(); actionObj[BOL.Action.PatientId] = PatientId; actionObj[BOL.Action.ActionDateText] = DateTime.Today.ToShortDateString(); actionObj[BOL.Action.ActionDate] = DateTime.Today; actionObj[BOL.Action.ActionItem] = "DataReceived"; actionObj[BOL.Action.EnteredBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; actionObj[BOL.Action.EnteredTime] = DateTime.Today; actionObj.Save(); } // set patient status to 'NeedMD_ToCallPt' Patient ptObj = new Patient(); ptObj.Get(PatientId); if (!ptObj.IsEmpty) { ptObj[Patient.PtContactStatus] = "NeedMD_ToCallPt"; ptObj[Patient.UpdatedBy] = (currentUserDs.Tables.Count > 0 && currentUserDs.Tables[0].Rows.Count > 0) ? currentUserDs.Tables[0].Rows[0][BOL.User.UserName].ToString() : "not specified"; ptObj[Patient.UpdatedTime] = DateTime.Now; ptObj.Save(); if (AddressUpdatedLBL != null && AddressUpdatedImg != null) { AddressUpdatedImg.Style["display"] = "none"; AddressUpdatedLBL.Text = String.Empty; } if (NeedMDContactLBL != null && NeedMDContactImg != null) { NeedMDContactImg.Style["display"] = ""; NeedMDContactLBL.Text = "Pt Status: " + ptObj[Patient.PtContactStatus].ToString(); } } } //Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "_reloadMainPage", "reloadMainPage(); ", true); }