protected CMSCommentsList ReadScr() { CMSCommentsList objCMSCommentsList = null; try { objCMSCommentsList = new CMSCommentsList(); CMSComments objCMSComments = new CMSComments(); if (!String.IsNullOrEmpty(Request.QueryString.Get("JMChartID"))) { objCMSComments.RefID = KPIHlp.CVI64(Request.QueryString.Get("JMChartID")); if (!String.IsNullOrEmpty(Request.QueryString.Get("hdnJurisId"))) { objCMSComments.JurisID = KPIHlp.CVI32(Request.QueryString.Get("hdnJurisId")); } } if (objCMSComments.RefID.HasValue && objCMSComments.RefID.Value > 0) { usrMedCharting objusrMedCharting = (usrMedCharting)this.tabMedCharting.Tabs.FindTabFromKey("Chart").FindControl("usrMedCharting"); objCMSCommentsList = objusrMedCharting.ReadScr(ref objCMSComments); } } catch (Exception objKPIError) { ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objKPIError); } return(objCMSCommentsList); }
protected void Page_Load(object sender, EventArgs e) { // Put user code to initialize the page here if (!State.gMultiJuris) { lstJuris.Visible = false; lblJuris.Visible = false; tdlblJuris.Style.Add("display", "none"); tdlstJuris.Style.Add("display", "none"); } else { tdlblJuris.Style.Add("display", ""); tdlstJuris.Style.Add("display", ""); } hdnJurisId.Value = ((HtmlInputHidden)this.Page.FindControl("hdnJurisId")).Value; if (lstJuris.JurisID > 0) { hdnJurisId.Value = KPIHlp.CVS(lstJuris.JurisID); } if (!IsPostBack) { if (State.GPV((int)SetupParams.EnableSubAgency, KPIHlp.CVI32(hdnJurisId.Value)) != "1") { lblsubagency.Visible = false; cddSubAgency.Visible = false; } else { LoadSubAgency(); } } }
public void LoadSubAgency() { try { ((BasePage)Page).WrtActivityLog(long.MinValue, "LoadSubAgency method in user control getting error in medical search screen.", "LOADDATA"); if (State.GPV((int)SetupParams.EnableSubAgency, KPIHlp.CVI32(hdnJurisId.Value)) == "1") { long ObjAgency = new PersonnelBL().GetDefaultAgency(State.sPFID, KPIHlp.CVI32(hdnJurisId.Value)); cddSubAgency.JurisData(null, null); if (ObjAgency != long.MinValue) { cddSubAgency.KPISelectedCodeValue = ObjAgency.ToString(); ((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJurisSubAgencyID"))).Value = ObjAgency.ToString(); } else { ((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJurisSubAgencyID"))).Value = string.Empty; } } LoginSubRoleCheck(); } catch (Exception objErr) { State.KPILog.Info(" LoadSubAgency method getting error in medical search screen "); ((BasePage)Page).ShowMsg(MsgType.Error, FrwkMsg.PAGE_ERR, objErr); } }
private bool Save() { JMMChartingBL objJMMChartingBL = null; JmmChartingList objJmmChartingList = null; JMMMedicalHist objJMMMedicalHist = new JMMMedicalHist(); objJMMMedicalHist.JMMedicalHistID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJMMedicalHistID"))).Value); objJMMMedicalHist.JMBookingID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnBookingID"))).Value); objJMMMedicalHist.NameID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnNameID"))).Value); objJMMMedicalHist.JurisID = KPIHlp.CVI32(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJurisId"))).Value); try { objJmmChartingList = ReadScr(ref objJMMMedicalHist); objJMMChartingBL = new JMMChartingBL(); KPITrace.Debug(TraceWeight.Five, "Calling Manage for Charting Tab"); ((BasePage)this.Page).WrtActivityLog(long.MinValue, " Managing charge Dtls.", ((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnMode"))).Value); objJMMChartingBL.ManageCharting(objJmmChartingList); Inquiry(ref objJMMMedicalHist); return(true); } catch (Exception objErr) { ((BasePage)this.Page).ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objErr); throw; } finally { } }
protected void LoadData() { try { string strhdnMode = UIMode.ADD.ToString(); try { strhdnMode = Request.QueryString.Get("hdnMode").Trim(); } catch (Exception) { } if (strhdnMode == UIMode.CHG.ToString() || strhdnMode == UIMode.INQ.ToString()) //CRM#65266 All inmate Booking Status should allow to create Medical Entry { hdnDoctorId.Value = Request.QueryString.Get("DoctorID"); hdnMode.Value = strhdnMode; //CRM#65266 All inmate Booking Status should allow to create Medical Entry hdnJurisId.Value = Request.QueryString.Get("JurisID"); int juris = KPIHlp.CVI32(hdnJurisId.Value); lstJuris.SetJurisValue(juris); Inquiry(KPIHlp.CVI64(hdnDoctorId.Value)); } else { hdnJurisId.Value = KPIHlp.CVS(GetPageJuris()); int juris = KPIHlp.CVI32(hdnJurisId.Value); lstJuris.SetJurisValue(juris); hdnMode.Value = UIMode.ADD.ToString(); } } catch (Exception objErr) { throw objErr; } }
public static object LoadCoded788(string sCodeID, string JMBookingID, string Drug, string sJurisID) { IDataReader objReader = new TableDB().TableWhere(KPIHlp.CVI32(sJurisID), KPIHlp.CVI32(sCodeID), string.Empty, String.Empty, JMBookingID, Drug); DataSet DSCoded = new DataSet(); DSCoded.Tables.Add(); DSCoded.Load(objReader, LoadOption.PreserveChanges, DSCoded.Tables[0]); if (objReader != null && !objReader.IsClosed) { objReader.Close(); } List <Coded> LstCoded = null; if (DSCoded != null && DSCoded.Tables[0].Rows.Count > 0) { LstCoded = (from CodedRow in DSCoded.Tables[0].AsEnumerable().Cast <DataRow>() select new Coded { CodeValue = Convert.ToString(CodedRow["CodeValue"]).Trim(), Description = Convert.ToString(CodedRow["Description"]) }).ToList(); } return((new System.Web.Script.Serialization.JavaScriptSerializer()).Serialize(LstCoded)); }
protected void Page_Load(object sender, EventArgs e) { try { cmdAdd.Attributes.Add("OnClick", "return fn_ManipulateAllergy();"); cmdClear.Attributes.Add("OnClick", "return fn_CancelAllergyDetails();"); cmdSave.Attributes.Add("OnClick", "glbCtrlClicked='Save';"); cmdReset.Attributes.Add("OnClick", "glbCtrlClicked='Reset';"); Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "OnSubmit", "return fn_ValidateScreen();"); chkInactive.Attributes.Add("onclick", "return fn_Inactive();"); AddClientOnLoadScript("fn_Inactive();"); hdnJurisId.Value = Request.QueryString.Get("hdnJurisID") == null ? string.Empty : Request.QueryString.Get("hdnJurisID").Trim().ToString(); hdnBookingID.Value = Request.QueryString.Get("BookingID") == null ? string.Empty : Request.QueryString.Get("BookingID").ToString(); if (Request.QueryString.Get("Mode") != null && Request.QueryString.Get("Mode") != string.Empty) //CRM#65266 All inmate Booking Status should allow to create Medical Entry { hdnMode.Value = Request.QueryString.Get("Mode").ToString(); } if (!IsPostBack) { BoundCheckBoxField ChkColumn = (BoundCheckBoxField)this.grdAllergy.Columns.FromKey("Isactive"); ChkColumn.ValueConverter = new BoolConverter(); JMMAllergy objJMMAllergy = new JMMAllergy(); if (!String.IsNullOrEmpty(hdnJurisId.Value)) { objJMMAllergy.JurisID = KPIHlp.CVI32(hdnJurisId.Value); } if (!String.IsNullOrEmpty(hdnBookingID.Value)) { objJMMAllergy.JMBookingID = KPIHlp.CVI64(hdnBookingID.Value); Inquiry(ref objJMMAllergy); } } if (KPIHlp.CVI32(hdnJurisId.Value) > 0) { hdnSetUserPFID.Value = State.GPV((int)JailAdmissionParams.IsDefaultAllPFFields, KPIHlp.CVI32(hdnJurisId.Value)); } if (hdnJurisId.Value == KPIHlp.CVS(State.sJurisID)) { hdnLoginPFCode.Value = KPI.Global.Helper.PersonnelHlp.GetPFCode(State.sPFID); hdnLoginPFDesc.Value = KPI.Global.Helper.PersonnelHlp.GetPFFullName(State.sPFID); hdnLoginPFID.Value = State.sPFID.ToString(); } } catch (Exception) { KPITrace.Debug(TraceWeight.Five, "Calling page load for medical Allergy screen"); WrtActivityLog(long.MinValue, " Calling page load for medical Allergy screen."); } }
protected void Page_Load(object sender, System.EventArgs e) { try { //SetFocus((WebControl) txtBuildingName); cmdSearch.Attributes.Add("OnClick", "return ValidateScrn();"); BoundCheckBoxField ChkDentist = (BoundCheckBoxField)this.grdDoctorSrch.Columns.FromKey("Dentist"); ChkDentist.ValueConverter = new BoolConverter(); BoundCheckBoxField ChkInactive = (BoundCheckBoxField)this.grdDoctorSrch.Columns.FromKey("Inactive"); ChkInactive.ValueConverter = new BoolConverter(); #region Added By Jothiraj for load the grid intially Based on the screen height if (Request.QueryString.Get("ScreenHeight") != null && !String.IsNullOrEmpty(Request.QueryString.Get("ScreenHeight"))) { string height = Request.QueryString.Get("ScreenHeight"); if (height.Contains(",")) { height = height.Split(',')[0]; } hdnPageHgt.Value = height; if (!String.IsNullOrEmpty(hdnPageHgt.Value)) { string grdHeight = string.Format("{0}px", KPIHlp.CVI32(hdnPageHgt.Value) - 300); grdDoctorSrch.Style.Add("height", grdHeight); } } iGrdPageSize = GrdPageSize(this.Page, 260); #endregion Added By Jothiraj for load the grid intially Based on the screen height switch (hdnAutoLoad.Value) { case "LOAD": RetrieveDoctorSrch(); break; } hdnAutoLoad.Value = ""; if (!Page.IsPostBack) { AddClientOnLoadScript("setFocusOnDoctorName()"); } } catch (KPIException objKPIError) { ShowMsg(MsgType.Error, FrwkMsg.ERR, objKPIError); } catch (Exception objErr) { ShowMsg(MsgType.Error, FrwkMsg.PAGE_ERR, objErr); } }
protected void cmdRefresh_Click(object sender, System.Web.UI.ImageClickEventArgs e) { try { ClearData(); JMMMedicalHist objJMMMedicalHist = new JMMMedicalHist(); if (hdnMode.Value == UIMode.ADD.ToString() && KPIHlp.CVI64(hdnJMMedicalHistID.Value) == long.MinValue) { hdnBookingID.Value = string.Empty; hdnNameID.Value = string.Empty; hdnMedHistID.Value = string.Empty; hdnJMMedicalHistID.Value = string.Empty; hdnSPINNbr.Value = string.Empty; HeaderCtrl.KPIID = long.MinValue; HeaderCtrl.lblEmptyCell2.Text = ""; HeaderCtrl.KPISecurity = "AC"; hdnMode.Value = UIMode.ADD.ToString(); blnForceModeChange = true; } else if (Request.QueryString.Get("hdnMode") == "ADD" && hdnMode.Value == UIMode.INQ.ToString() && KPIHlp.CVI64(hdnJMMedicalHistID.Value) == long.MinValue) { hdnBookingID.Value = string.Empty; hdnNameID.Value = string.Empty; hdnMedHistID.Value = string.Empty; hdnJMMedicalHistID.Value = string.Empty; hdnSPINNbr.Value = string.Empty; hdnMode.Value = UIMode.ADD.ToString(); HeaderCtrl.KPIID = long.MinValue; HeaderCtrl.KPISecurity = "AC"; hdnMode.Value = UIMode.ADD.ToString(); blnForceModeChange = true; AddClientOnLoadScript(" window.document.frmMedicalHistory_Id.submit();"); } else { if (!string.IsNullOrEmpty(hdnBookingID.Value) && KPIHlp.CVI64(hdnBookingID.Value) > 0) { objJMMMedicalHist.JMBookingID = KPIHlp.CVI64(hdnBookingID.Value); objJMMMedicalHist.JMMedicalHistID = KPIHlp.CVI64(hdnJMMedicalHistID.Value); objJMMMedicalHist.JurisID = KPIHlp.CVI32(hdnJurisId.Value); objJMMMedicalHist.NameID = KPIHlp.CVI64(hdnNameID.Value); LoadData(); } } } catch (KPIException objKPIError) { ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objKPIError); } }
protected void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here #region Added By Jothiraj for load the grid intially Based on the screen height if (!String.IsNullOrEmpty(hdnPageHgt.Value)) { string grdHeight = string.Format("{0}px", KPIHlp.CVI32(hdnPageHgt.Value) - 260); if (!string.IsNullOrEmpty(grdHeight)) { grdHeight = grdHeight.ToLower().Replace("px", string.Empty); grdMedicalHist.Height = System.Web.UI.WebControls.Unit.Pixel(Convert.ToInt32(grdHeight)); } } iGrdPageSize = GrdPageSize(this.Page, 260); #endregion Added By Jothiraj for load the grid intially Based on the screen height hdnJurisId.Value = KPIHlp.CVS(new CMSHlp().GetPageJurisWithUserCtrl(tabMedSrch.FindTabFromKey("BSC").FindControl("UsrMedicalBasicSrch2"))); if (!Page.IsPostBack) { DispScr(false); } else if (hdnAutoLoad.Value == "ENTERKEY" || hdnAutoLoad.Value.ToUpper() == "LOAD") { DisplayRecard(); hdnAutoLoad.Value = string.Empty; } if (pnlSearchResults.Visible == true) { if (hdnAutoLoad.Value == "BACKSPACE") { cmdBkSearch_Click(); hdnAutoLoad.Value = ""; } } if (State.GPV((int)SetupParams.EnableSubAgency, KPIHlp.CVI32(hdnJurisId.Value)) == "1") { grdMedicalHist.Columns["SubAgencyCode"].Hidden = false; hdnSubAgencyParam.Value = "1"; } else { hdnSubAgencyParam.Value = string.Empty; } }
protected void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here if (!State.gMultiJuris) { lstJuris.Visible = false; lblJuris.Visible = false; tdlblJuris.Style.Add("display", "none"); tdlstJuris.Style.Add("display", "none"); } else { tdlblJuris.Style.Add("display", ""); tdlstJuris.Style.Add("display", ""); } hdnJurisId.Value = ((HtmlInputHidden)this.Page.FindControl("hdnJurisId")).Value; imgClear.Attributes.Add("onclick", "return fn_Clear();"); if (lstJuris.JurisID > 0) { hdnJurisId.Value = KPIHlp.CVS(lstJuris.JurisID); } if (!IsPostBack) { dttmToDate.DateValue = DateTime.Now; int Days = 1; System.TimeSpan tTime = new TimeSpan(Days, 0, 0, 0); DateTime.Now.Subtract(tTime); dttmFromDate.DateValue = DateTime.Now.Subtract(tTime); if (State.GPV((int)SetupParams.EnableSubAgency, KPIHlp.CVI32(hdnJurisId.Value)) != "1") { lblsubagency.Visible = false; cddSubAgency.Visible = false; } else { LoadSubAgency(); } } }
public void ReadScr(ref JMMMedicalHist objJMMMedicalHist) { try { #region Medical Prescription JMMAllergy objJMMAllergy = new JMMAllergy(); objJMMAllergy.Allergy = String.Format("{0}", string.Join("','", radAllergy.KPISelectedValues)); objJMMMedicalHist.objJMMAllergy = objJMMAllergy; #endregion #region Medical Prescription JmmMedPrescribe objPrescribe = new JmmMedPrescribe(); objPrescribe.Drug = cddDrugs.CodeValue; //CRM#66995 objPrescribe.MedNameID = NamCtrlSPIN.KPIID; objJMMMedicalHist.objJmmMedPrescribe = objPrescribe; #endregion #region Medical Visit JMMMedVisit objMedVist = new JMMMedVisit(); objMedVist.Diagnosis = lupDiagnosed.CodeValue; objMedVist.Result = cddTBResults.CodeValue; objMedVist.Hospital = cddAdmMedFacility.CodeValue; objMedVist.SpecialMeal = String.Format("{0}", string.Join("','", radSpecialMealRequired.KPISelectedValues)); objJMMMedicalHist.objJmmMedVisit = objMedVist; #endregion #region Medical Flags & Dentist proceedures objJMMMedicalHist.DentalProceedure = String.Format("{0}", string.Join("','", radDentProcedure.KPISelectedValues)); objJMMMedicalHist.MedicalFlags = String.Format("{0}", string.Join("','", radMedicalFlags.KPISelectedValues));// cddMedicalFlags.CodeValue; objJMMMedicalHist.JurisID = KPIHlp.CVI32(hdnJurisId.Value); #endregion #region From & To Date objJMMMedicalHist.CreatedDttm = dttmFromDate.DateValue; objJMMMedicalHist.ModifiedDttm = dttmToDate.DateValue; objJMMMedicalHist.OwnerSubAgencyID = KPIHlp.CVI64(cddSubAgency.CodeValue); #endregion } catch (Exception objError) { throw objError; } }
public static string GetMedPassHistory(List <string> arr) { JMMMedPrescriptionHist objJMMMedPrescriptionHist = new JMMMedPrescriptionHist(); if (KPIHlp.CVI64(arr[0]) != long.MinValue) { objJMMMedPrescriptionHist.JMBuildID = KPIHlp.CVI64(arr[0]); } if (KPIHlp.CVI64(arr[1]) != long.MinValue) { objJMMMedPrescriptionHist.JMPodID = KPIHlp.CVI64(arr[1]); } if (KPIHlp.CVI64(arr[2]) != long.MinValue) { objJMMMedPrescriptionHist.JMCellID = KPIHlp.CVI64(arr[2]); } if (KPIHlp.CVI64(arr[3]) != Int16.MinValue) { objJMMMedPrescriptionHist.IsActive = KPIHlp.CVI16(arr[3]); } if (KPIHlp.CVI64(arr[4]) != long.MinValue) { objJMMMedPrescriptionHist.JurisID = KPIHlp.CVI32(arr[4]); } if (objJMMMedPrescriptionHist.JMBuildID.HasValue && !objJMMMedPrescriptionHist.JMPodID.HasValue) { objJMMMedPrescriptionHist.JMBuildID = long.MinValue; } DataSet ds = new JMMMedPrescriptionHistBL().GetMedPassHistory(ref objJMMMedPrescriptionHist); System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); List <Dictionary <string, object> > rows = new List <Dictionary <string, object> >(); Dictionary <string, object> row; foreach (DataRow dr in ds.Tables[0].Rows) { row = new Dictionary <string, object>(); foreach (DataColumn col in ds.Tables[0].Columns) { row.Add(col.ColumnName, dr[col]); } rows.Add(row); } return(serializer.Serialize(rows)); }
public CMSCommentsList ReadScr(ref CMSComments objCMSComments) { CMSCommentsList objCMSCommentsList = null; try { String objText = KPIRadHuberActivityDetails.GetHtml(Telerik.Web.UI.EditorStripHtmlOptions.Comments); if (String.IsNullOrWhiteSpace(objText.Replace("\r", "").Replace("\n", "").Replace(" ", "").Replace("<p>", "").Replace("</p>", "").Trim())) { return(null); } if (KPIRadHuberActivityDetails.Content != "" && objCMSComments.RefID.HasValue && objCMSComments.RefID.Value > 0) { objCMSCommentsList = new CMSCommentsList(); if (!String.IsNullOrEmpty(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJurisId"))).Value) && KPIHlp.CVI32(hdnJurisId.Value) > 0) { JurisID = KPIHlp.CVI32(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJurisId"))).Value); } objCMSComments.CMSCommentsID = KPICounter.GetCounterID(State.sJurisID); objCMSComments.RefID = objCMSComments.RefID.Value; if (JurisID != null) { objCMSComments.JurisID = JurisID; } objCMSComments.RefType = (int)JMMChartingLogHistory.ChartingLogHistory; objCMSComments.IsActive = 1; objCMSComments.CommentDttm = System.DateTime.Now; objCMSComments.PFID = State.sPFID; objCMSComments.Comments = KPIRadHuberActivityDetails.GetHtml(Telerik.Web.UI.EditorStripHtmlOptions.Comments); KPIRadHuberActivityDetails.Content = ""; hdnHistory.Value = ""; objCMSCommentsList.Add(objCMSComments); } } catch (Exception objKPIError) { ((BasePage)this.Page).ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objKPIError); } return(objCMSCommentsList); }
public void LoginSubRoleCheck() { int iJurisID = KPIHlp.CVI32(hdnJurisId.Value); long ObjAgency = new PersonnelBL().GetDefaultAgency(State.sPFID, iJurisID); if (new CMSHlp().ChekLoginRoleAndSubagency(ObjAgency, iJurisID)) { cddSubAgency.DropDown.Enabled = true; cddSubAgency.KPISecurity = "ACI"; } else { cddSubAgency.DropDown.Enabled = false; cddSubAgency.KPISecurity = "N"; } }
protected void cmdReset_Click(object sender, ImageClickEventArgs e) { try { JMMMedicalHist objJMMMedicalHist = new JMMMedicalHist(); objJMMMedicalHist.JMMedicalHistID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJMMedicalHistID"))).Value); objJMMMedicalHist.JMBookingID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnBookingID"))).Value); objJMMMedicalHist.NameID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnNameID"))).Value); objJMMMedicalHist.JurisID = KPIHlp.CVI32(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJurisId"))).Value); Inquiry(ref objJMMMedicalHist); } catch (Exception objErr) { ((BasePage)this.Page).ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objErr); throw; } }
public static string CheckRolePermissions(string sJurisID) { System.Collections.Generic.Dictionary <string, string> dict = new System.Collections.Generic.Dictionary <string, string>(); bool bAdd; bool bChange; bool bInquiry; bool bDelete; int iJurisID = KPIHlp.CVI32(sJurisID); new RepositoryBL().GetRepoScreenSecurity("8551", iJurisID, out bAdd, out bChange, out bInquiry, out bDelete); if (bChange) { dict.Add("IsRoleAllowed", "1"); } return((new System.Web.Script.Serialization.JavaScriptSerializer()).Serialize(dict)); }
protected void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here if (Request.QueryString.Get("hdnJurisID") != null && Request.QueryString.Get("hdnJurisID") != string.Empty) { hdnJurisId.Value = Request.QueryString.Get("hdnJurisID").ToString(); JurisID = KPIHlp.CVI32(hdnJurisId.Value); } if (Request.QueryString.Get("BookingID") != null && Request.QueryString.Get("BookingID") != string.Empty) { hdnBookingID.Value = Request.QueryString.Get("BookingID").ToString(); JMBookingID = KPIHlp.CVI64(hdnBookingID.Value); } if (Request.QueryString.Get("JMMedicalHistID") != null && Request.QueryString.Get("JMMedicalHistID") != string.Empty) { hdnJMMedicalHistID.Value = Request.QueryString.Get("JMMedicalHistID").ToString(); JMMedicalHistID = KPIHlp.CVI64(hdnJMMedicalHistID.Value); } if (Request.QueryString.Get("InmateNameID") != null && Request.QueryString.Get("InmateNameID") != string.Empty) { hdnNameID.Value = Request.QueryString.Get("InmateNameID").ToString(); NameID = KPIHlp.CVI64(hdnNameID.Value); } if (Request.QueryString.Get("Mode") != null && Request.QueryString.Get("Mode") != string.Empty) { hdnMode.Value = Request.QueryString.Get("Mode").ToString(); } if (!IsPostBack) { LoadCtrls(); Inquiry(); } else if (hdnAutoLoad.Value.ToUpper() == "LOAD") { Inquiry(); hdnAutoLoad.Value = string.Empty; } }
private bool Save() { JMMAllergyBL objJMMAllergyBL = null; JMMAllergyList objJmmAllergyList = null; JMMAllergy objJmmAllergy = new JMMAllergy(); try { objJmmAllergyList = ReadScr(); objJMMAllergyBL = new JMMAllergyBL(); KPITrace.Debug(TraceWeight.Five, "Calling Manage for frmMedAllergy"); ((BasePage)this.Page).WrtActivityLog(long.MinValue, " Managing frmMedAllergy.", ((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnMode"))).Value); if (objJmmAllergyList == null) { return(false); } else { objJMMAllergyBL.ManageAllergy(objJmmAllergyList); if (objJmmAllergyList.Count > 0) { ((BasePage)Page).ShowMsg(MsgType.Success, FrwkMsg.UPD_SUCCESS, null); } objJmmAllergy.JMBookingID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnBookingID"))).Value); objJmmAllergy.JurisID = KPIHlp.CVI32(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJurisId"))).Value); Inquiry(ref objJmmAllergy); return(true); } } catch (Exception objErr) { ((BasePage)this.Page).ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objErr); throw; } finally { } }
protected void cmdPrint_Click(object sender, System.Web.UI.ImageClickEventArgs e) { ClearData(); JMMMedicalHist objJMMMedicalHist = new JMMMedicalHist(); if (hdnMode.Value == UIMode.ADD.ToString() && KPIHlp.CVI64(hdnJMMedicalHistID.Value) == long.MinValue) { hdnBookingID.Value = string.Empty; hdnNameID.Value = string.Empty; hdnMedHistID.Value = string.Empty; hdnJMMedicalHistID.Value = string.Empty; hdnSPINNbr.Value = string.Empty; HeaderCtrl.KPIID = long.MinValue; } else if (Request.QueryString.Get("hdnMode") == "ADD" && hdnMode.Value == UIMode.INQ.ToString()) { hdnBookingID.Value = string.Empty; hdnNameID.Value = string.Empty; hdnMedHistID.Value = string.Empty; hdnJMMedicalHistID.Value = string.Empty; hdnSPINNbr.Value = string.Empty; hdnMode.Value = UIMode.ADD.ToString(); HeaderCtrl.KPIID = long.MinValue; AddClientOnLoadScript(" window.document.frmMedicalHistory_Id.submit();"); } else { if (!string.IsNullOrEmpty(hdnBookingID.Value) && KPIHlp.CVI64(hdnBookingID.Value) > 0) { objJMMMedicalHist.JMBookingID = KPIHlp.CVI64(hdnBookingID.Value); objJMMMedicalHist.JMMedicalHistID = KPIHlp.CVI64(hdnJMMedicalHistID.Value); objJMMMedicalHist.JurisID = KPIHlp.CVI32(hdnJurisId.Value); objJMMMedicalHist.NameID = KPIHlp.CVI64(hdnNameID.Value); LoadData(); } } if (hdnJMMedicalHistID.Value != null && hdnJMMedicalHistID.Value != "") { PrintReport(KPIHlp.CVI64(hdnJMMedicalHistID.Value)); WrtActivityLog(KPIHlp.CVI64(hdnJMMedicalHistID.Value), "Medical History Entry ", "PRT"); } }
protected void Page_Load(object sender, EventArgs e) { cmdSave.Attributes.Add("onclick", "glbCtrlClicked = 'Save';"); cmdSaveNClose.Attributes.Add("onclick", "glbCtrlClicked = 'Save';"); cmdRefresh.Attributes.Add("onclick", "glbCtrlClicked = 'Refresh';"); cmdPrint.Attributes.Add("onclick", "glbCtrlClicked = 'Print';"); Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "OnSubmit", "return fn_ValidateScreen();"); hdnDisposition.Value = Request.QueryString.Get("Disposition") == null ? string.Empty : Request.QueryString.Get("Disposition").ToString(); if (!IsPostBack) { hdnBookingID.Value = Request.QueryString.Get("JMBookingID") == null ? string.Empty : Request.QueryString.Get("JMBookingID").ToString(); hdnJMMedicalHistID.Value = Request.QueryString.Get("JMMedicalHistID") == null ? string.Empty : Request.QueryString.Get("JMMedicalHistID").ToString(); hdnJurisId.Value = Request.QueryString.Get("hdnJurisId") == null ? string.Empty : Request.QueryString.Get("hdnJurisId").ToString(); hdnJMMedPrescriptionID.Value = Request.QueryString.Get("JMMedPrescriptionID") == null ? string.Empty : Request.QueryString.Get("JMMedPrescriptionID").ToString(); hdnJMPrescriptionOrderID.Value = Request.QueryString.Get("JMPrescriptionOrderID") == null ? string.Empty : Request.QueryString.Get("JMPrescriptionOrderID").ToString(); hdnDrugID.Value = Request.QueryString.Get("DrugID") == null ? string.Empty : Request.QueryString.Get("DrugID").ToString(); hdnOrderNo.Value = Request.QueryString.Get("OrderedNo") == null ? string.Empty : Request.QueryString.Get("OrderedNo").ToString(); hdnJMPreOrderHistID.Value = Request.QueryString.Get("JMPreOrderHistID") == null ? string.Empty : Request.QueryString.Get("JMPreOrderHistID").ToString(); hdnJMPreOrderHistNo.Value = Request.QueryString.Get("JMPreOrderHistNo") == null ? string.Empty : Request.QueryString.Get("JMPreOrderHistNo").ToString(); hdnMode.Value = Request.QueryString.Get("Mode") == null ? string.Empty : Request.QueryString.Get("Mode").ToString(); JurisID = KPIHlp.CVI32(hdnJurisId.Value); if (KPIHlp.CVI64(hdnJMPreOrderHistID.Value) != long.MinValue) { ExistingRecordInquiry(); } else if (KPIHlp.CVI64(hdnJMPrescriptionOrderID.Value) != long.MinValue) { NewRecordInquiry(); } if (!String.IsNullOrEmpty(hdnJurisId.Value) && JurisID > 0) { hdnSetUserPFID.Value = State.GPV((int)JailAdmissionParams.IsDefaultAllPFFields, KPIHlp.CVI32(hdnJurisId.Value)); } } if (State.sJurisID == JurisID) { hdnLoginPFCode.Value = KPI.Global.Helper.PersonnelHlp.GetPFCode(State.sPFID); hdnLoginPFDesc.Value = KPI.Global.Helper.PersonnelHlp.GetPFFullName(State.sPFID); hdnLoginPFID.Value = State.sPFID.ToString(); } }
protected void cmdReset_Click(object sender, ImageClickEventArgs e) { try { AddClientOnLoadScript("fn_CancelAllergyDetails();"); JMMAllergy objJMMAllergy = new JMMAllergy(); objJMMAllergy.JMBookingID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnBookingID"))).Value); objJMMAllergy.JurisID = KPIHlp.CVI32(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJurisId"))).Value); if (objJMMAllergy.JMBookingID.HasValue && objJMMAllergy.JMBookingID.Value > 0 && objJMMAllergy.JurisID.HasValue && objJMMAllergy.JurisID.Value > 0) { Inquiry(ref objJMMAllergy); } } catch (Exception) { KPITrace.Debug(TraceWeight.Five, "Calling medical Allergy screen Reset Button"); WrtActivityLog(long.MinValue, " Calling medical Allergy screen Reset Button."); } }
protected void cmdReset_Click(object sender, ImageClickEventArgs e) { try { AddClientOnLoadScript("fn_CancelChartDetailsRow();"); JMMMedicalHist objJMMMedicalHist = new JMMMedicalHist(); objJMMMedicalHist.JMMedicalHistID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJMMedicalHistID"))).Value); objJMMMedicalHist.JMBookingID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnBookingID"))).Value); objJMMMedicalHist.NameID = KPIHlp.CVI64(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnNameID"))).Value); objJMMMedicalHist.JurisID = KPIHlp.CVI32(((HtmlInputHidden)(((BasePage)this.Page).FindControl("hdnJurisId"))).Value); if (objJMMMedicalHist.JMMedicalHistID.HasValue && objJMMMedicalHist.JMMedicalHistID.Value > 0 && objJMMMedicalHist.JMBookingID.HasValue && objJMMMedicalHist.JMBookingID.Value > 0) { Inquiry(ref objJMMMedicalHist); } } catch (Exception objErr) { ((BasePage)this.Page).ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objErr); throw; } }
protected DataSet GetData(bool blnExcel) { DataSet ds = new DataSet(); try { JMMMedPrescriptionHist objJMMMedPrescriptionHist = new JMMMedPrescriptionHist(); objJMMMedPrescriptionHist.JMBuildID = cddBuilding.CodeValue == null ? long.MinValue : KPIHlp.CVI64(cddBuilding.CodeValue); objJMMMedPrescriptionHist.JMPodID = luppod.KPIID; objJMMMedPrescriptionHist.JMCellID = lupcell.KPIID; objJMMMedPrescriptionHist.JurisID = KPIHlp.CVI32(hdnJurisId.Value); DateTime Curdate = DateTime.Now; objJMMMedPrescriptionHist.IsActive = chkShowall.Checked ? KPIHlp.CVI16("1") : KPIHlp.CVI16("0"); if (objJMMMedPrescriptionHist.JMBuildID.HasValue && !objJMMMedPrescriptionHist.JMPodID.HasValue) { objJMMMedPrescriptionHist.JMBuildID = long.MinValue; } ds = new JMMMedPrescriptionHistBL().GetMedPassHistory(ref objJMMMedPrescriptionHist); grdMedreqlist.DataSource = ds; grdMedreqlist.DataBind(); if (grdMedreqlist.Rows.Count <= 0 && String.IsNullOrWhiteSpace(hdnAutoLoad.Value)) { ShowMsg(MsgType.Error, FrwkMsg.NO_RECORD_FOUND); } } catch (Exception objError) { ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objError); } return(ds); }
public void DetailInquiry(ref CMSComments objCMSComments) { try { if (KPIHlp.CVI64(Request.QueryString.Get("JMChartID")) != long.MinValue) { objCMSComments.RefID = KPIHlp.CVI64(Request.QueryString.Get("JMChartID")); if (!String.IsNullOrEmpty(Request.QueryString.Get("hdnJurisId"))) { objCMSComments.JurisID = KPIHlp.CVI32(Request.QueryString.Get("hdnJurisId")); } DataSet objDS = new DataSet(); objDS = new CMSCommentsBL().SelectActiveLog(ref objCMSComments); grdComments.DataSource = objDS; grdComments.DataBind(); } } catch { } }
protected void Page_Load(object sender, System.EventArgs e) { // Put user code to initialize the page here cmdSaveNClose.Attributes.Add("onclick", "glbCtrlClicked = 'Save';"); cmdSave.Attributes.Add("onclick", "glbCtrlClicked = 'Save';"); cmdRefresh.Attributes.Add("onclick", "glbCtrlClicked = 'Refresh';"); cmdPrint.Attributes.Add("onclick", "glbCtrlClicked = 'Print';"); Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "OnSubmit", "return fn_ValidateScreen();"); if (Request.QueryString.Get("BookingID") != null) { hdnBookingID.Value = Request.QueryString.Get("BookingID").ToString(); } if (Request.QueryString.Get("JMMedicalHistID") != null) { hdnJMMedicalHistID.Value = Request.QueryString.Get("JMMedicalHistID").ToString(); } hdnMode.Value = Request.QueryString.Get("hdnMode") == null ? string.Empty : Request.QueryString.Get("hdnMode").Trim().ToString(); blnForceModeChange = false; if (string.IsNullOrEmpty(hdnJurisId.Value)) { hdnJurisId.Value = Request.QueryString.Get("JurisID") != null && KPIHlp.CVI32(Request.QueryString.Get("JurisID").Trim()) > 0 ? Request.QueryString.Get("JurisID").Trim() : KPIHlp.CVS(GetPageJuris()); } else { hdnJurisId.Value = KPIHlp.CVS(GetPageJuris()); } if (!IsPostBack) { LoadData(); } else if (hdnAutoLoad.Value.ToUpper() == "ENTERKEY") { LoadData(); hdnAutoLoad.Value = string.Empty; } if (!hdnSave.Value.Equals("Save")) { if (HeaderCtrl.KPIInmateNameID != Int64.MinValue) { JailQuickMenuCtrl1.Visible = true; NameID = HeaderCtrl.KPIInmateNameID; JailQuickMenuCtrl1.KPIInmateNameID = NameID; hdnNameID.Value = NameID.ToString(); JMBookingID = HeaderCtrl.KPIID; JailQuickMenuCtrl1.KPIID = JMBookingID; hdnBookingID.Value = JMBookingID.ToString(); if (IsPostBack && hdnSave.Value.ToUpper() != "PRINT" && hdnSave.Value.ToUpper() != "REFRESH" && String.IsNullOrWhiteSpace(hdnAutoLoad.Value)) { LoadData(); } //CRM#65266 All inmate Booking Status should allow to create Medical Entry if (KPIHlp.CVI64(hdnJMMedicalHistID.Value) == long.MinValue) { JailQuickMenuCtrl1.Visible = false; } } else { JailQuickMenuCtrl1.Visible = false; HeaderCtrl.KPIInmateNameID = long.MinValue; hdnMode.Value = UIMode.ADD.ToString(); } if (hdnJurisId.Value == KPIHlp.CVS(State.sJurisID)) { hdnLoginPFCode.Value = KPI.Global.Helper.PersonnelHlp.GetPFCode(State.sPFID); hdnLoginPFDesc.Value = KPI.Global.Helper.PersonnelHlp.GetPFFullName(State.sPFID); hdnLoginPFID.Value = State.sPFID.ToString(); } hdnSave.Value = string.Empty; hdnAutoLoad.Value = string.Empty; } }
protected void LoadData() { string strhdnMode = hdnMode.Value;//UIMode.ADD.ToString(); JbmBooking objJbmBooking = new JbmBooking(); JbmBookingBL objJbmBookingBL = new JbmBookingBL(); JMMMedicalHist objJMMMedicalHist = new JMMMedicalHist(); try { if (!string.IsNullOrEmpty(hdnBookingID.Value) && KPIHlp.CVI64(hdnBookingID.Value) > 0) { HeaderCtrl.KPIID = KPIHlp.CVI64(hdnBookingID.Value); hdnNameID.Value = KPIHlp.CVS(HeaderCtrl.KPIInmateNameID); hdnSPINNbr.Value = KPIHlp.CVS(HeaderCtrl.SPINNbr); objJbmBooking.JMBookingID = KPIHlp.CVI64(hdnBookingID.Value); objJbmBooking.JurisID = KPIHlp.CVI32(hdnJurisId.Value); } if (objJbmBooking.JMBookingID > 0) { objJMMMedicalHist = new JmmMedicalHistBL().Select(ref objJbmBooking); if (objJMMMedicalHist != null && objJMMMedicalHist.JMMedicalHistID.HasValue && objJMMMedicalHist.JMMedicalHistID.Value > 0) { hdnJMMedicalHistID.Value = objJMMMedicalHist.JMMedicalHistID.Value.ToString(); strhdnMode = UIMode.CHG.ToString(); } else { hdnJMMedicalHistID.Value = string.Empty; hdnMedHistID.Value = string.Empty; hdnTabAllergy.Value = string.Empty; //CRM#65266 All inmate Booking Status should allow to create Medical Entry this.tabMain.FindTabFromKey("Charting").Hidden = true; this.tabMain.FindTabFromKey("MHS").Hidden = true; this.tabMain.FindTabFromKey("MedicalVital").Hidden = true; this.tabMain.FindTabFromKey("MedicalAllergy").Hidden = true; this.tabMain.FindTabFromKey("MedicalDiabetic").Hidden = true; this.tabMain.FindTabFromKey("Scheduled Appts").Hidden = true; } } else { ShowHideTabs(false); } if (objJMMMedicalHist != null) { if (strhdnMode == UIMode.CHG.ToString()) { hdnMode.Value = UIMode.CHG.ToString(); if (objJMMMedicalHist.JMBookingID > 0) { Inquiry(ref objJMMMedicalHist); } } else if (objJMMMedicalHist.JMBookingID > 0) { Inquiry(ref objJMMMedicalHist); } } else { Inquiry(ref objJMMMedicalHist); } // Modified by Dhaneswari.S on May 20 CRM# 9620 if (!string.IsNullOrEmpty(hdnBookingID.Value) && KPIHlp.CVI64(hdnBookingID.Value) > 0) { objJbmBooking = objJbmBookingBL.Select(KPIHlp.CVI64(hdnBookingID.Value)); } if (objJbmBooking.BookingStatus == "9" || objJbmBooking.BookingStatus == "8") { //CRM#65266 All inmate Booking Status should allow to create Medical Entry if (new RepositoryDB().GetScreenPermission("8551", objJbmBooking.JurisID)) { hdnMode.Value = UIMode.CHG.ToString(); } else { hdnMode.Value = UIMode.INQ.ToString(); } } blnForceModeChange = true; } catch (Exception objError) { ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objError); } }
protected void LoadData() { try { KPITrace.Debug(TraceWeight.Five, "Getting Prescription History info from JmmMedPresHist DB."); string sCaller = ""; NameValueCollection nvcXMLResponseData = new NameValueCollection(); NameValueCollection nvcXMLPOSTData = GetKPIXMLPOSTData(); sCaller = nvcXMLPOSTData.Get("Caller") == null ? string.Empty : nvcXMLPOSTData.Get("Caller"); if (sCaller.Equals("RefillHist")) { string sMode, sActDttm, sBalQuan, sPresID, sRefill, sBalRefill = ""; sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sActDttm = nvcXMLPOSTData.Get("ActivityDate") == null ? string.Empty : nvcXMLPOSTData.Get("ActivityDate"); sPresID = nvcXMLPOSTData.Get("PrescId") == null ? string.Empty : nvcXMLPOSTData.Get("PrescId"); sBalQuan = nvcXMLPOSTData.Get("BalQuan") == null ? string.Empty : nvcXMLPOSTData.Get("BalQuan"); sRefill = nvcXMLPOSTData.Get("Refills") == null ? string.Empty : nvcXMLPOSTData.Get("Refills"); sBalRefill = nvcXMLPOSTData.Get("RefillBal") == null ? string.Empty : nvcXMLPOSTData.Get("RefillBal"); ///JmmMedPresHist--Adding into prescription History table JmmMedPresHist objJmmMedPresHist = new JmmMedPresHist(); JmmMedPresHistBL objJmmMedPresHistBL = new JmmMedPresHistBL(); objJmmMedPresHist.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmMedPresHist.JurisID = GetPageJuris(); objJmmMedPresHist.MedPresHistID = KPICounter.GetCounterID(objJmmMedPresHist.JurisID); objJmmMedPresHist.ActivityDttm = KPIHlp.CVDttm(sActDttm); objJmmMedPresHist.BalanceQty = KPIHlp.CVI32(sBalQuan); objJmmMedPresHist.DispenseQty = 0; objJmmMedPresHist.FillQty = KPIHlp.CVI32(sRefill); objJmmMedPresHist.IsFill = 1; objJmmMedPresHist.OfficerPFID = State.sPFID; objJmmMedPresHist.PendRefills = KPIHlp.CVI32(sBalRefill); ////Updating Prescription Table on refill. JmmMedPrescribe objMedPres = new JmmMedPrescribe(); JmmMedPrescribeBL objMedPresBL = new JmmMedPrescribeBL(); objMedPres.MedPrescribeID = KPIHlp.CVI64(sPresID); objMedPres.JurisID = GetPageJuris(); objMedPres.CurQuantity = KPIHlp.CVI32(sBalQuan); objMedPres.RefillBal = KPIHlp.CVI16(sBalRefill); if (sMode.Equals("A")) { objJmmMedPresHistBL.Insert(objJmmMedPresHist); objMedPresBL.UpdateBalance(objMedPres); nvcXMLResponseData.Add("PrescrpHistId", objJmmMedPresHist.MedPresHistID.ToString()); nvcXMLResponseData.Add("PFid", objJmmMedPresHist.OfficerPFID.ToString()); } else { objJmmMedPresHistBL.Update(objJmmMedPresHist); nvcXMLResponseData.Add("PrescrpHistId", objJmmMedPresHist.MedPresHistID.ToString()); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } else if (sCaller.Equals("PrescripUseEnd")) { string sMode, sUseEnd, sComments, sPresID = ""; int result = 0; sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sUseEnd = nvcXMLPOSTData.Get("UseEnd") == null ? string.Empty : nvcXMLPOSTData.Get("UseEnd"); sComments = nvcXMLPOSTData.Get("comments") == null ? string.Empty : nvcXMLPOSTData.Get("comments"); sPresID = nvcXMLPOSTData.Get("PrescId") == null ? string.Empty : nvcXMLPOSTData.Get("PrescId"); JmmMedPrescribe objJmmPresc = new JmmMedPrescribe(); JmmMedPrescribeBL objJmmPrescBL = new JmmMedPrescribeBL(); objJmmPresc.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmPresc.EndedDttm = KPIHlp.CVDttm(sUseEnd); objJmmPresc.PrescribeNotes = sComments; objJmmPresc.JurisID = GetPageJuris(); if (sMode.Equals("C")) { try { result = objJmmPrescBL.UpdateUseEnd(objJmmPresc); } catch (Exception ex) { string exp = ex.Message; } if (result == 1) { nvcXMLResponseData.Add("Success", "1"); } else { nvcXMLResponseData.Add("Success", "0"); } } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } catch (Exception objErr) { if (!objErr.Message.StartsWith("Thread was being aborted")) { string sErrMsg = "Invalid XML Request String" + objErr.Message; Response.Write(sErrMsg); Response.End(); //return; } } try { KPITrace.Debug(TraceWeight.Five, "Getting Doctor info from JmsDoctor DB."); string sDoctor, sCallertype = ""; string sDrug, sDosage, sPrescribedAmt, sRefills, sGenericAllowed, sNotes, sPresID, sVisitID, sBookID, sMode, sCurBalance = ""; string JurisID = string.Empty; string JMMDentVisitID = string.Empty; string RecType = string.Empty; string JMMMedVisitID = string.Empty; NameValueCollection nvcXMLPOSTData = GetKPIXMLPOSTData(); NameValueCollection nvcXMLResponseData = new NameValueCollection(); sCallertype = nvcXMLPOSTData.Get("CallerType") == null ? string.Empty : nvcXMLPOSTData.Get("CallerType"); if (sCallertype.Equals("PrimaryDoctor")) { sDoctor = nvcXMLPOSTData.Get("Doctor") == null ? string.Empty : nvcXMLPOSTData.Get("Doctor"); JmsDoctor objJmsDoc = new JmsDoctor(); JmsDoctorBL objJmsDocBL = new JmsDoctorBL(); //bool blnValid = false; if (sDoctor != null && sDoctor != string.Empty) { objJmsDoc.DoctorID = KPIHlp.CVI64(sDoctor); objJmsDoc.JurisID = GetPageJuris(); objJmsDoc.IsDental = 0; objJmsDoc = objJmsDocBL.SelectDoctor(ref objJmsDoc); if (objJmsDoc != null) { nvcXMLResponseData.Add("location", objJmsDoc.Location); nvcXMLResponseData.Add("Phone", objJmsDoc.PhoneNbr); nvcXMLResponseData.Add("PhoneType", objJmsDoc.PhoneType); } else { nvcXMLResponseData.Add("location", ""); nvcXMLResponseData.Add("Phone", ""); nvcXMLResponseData.Add("PhoneType", ""); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } else if (sCallertype.Equals("PrimaryDentist")) { sDoctor = nvcXMLPOSTData.Get("Doctor") == null ? string.Empty : nvcXMLPOSTData.Get("Doctor"); JmsDoctor objJmsDoc = new JmsDoctor(); JmsDoctorBL objJmsDocBL = new JmsDoctorBL(); //bool blnValid = false; if (sDoctor != null && sDoctor != string.Empty) { objJmsDoc.DoctorID = KPIHlp.CVI64(sDoctor); objJmsDoc.JurisID = GetPageJuris(); objJmsDoc.IsDental = 1; objJmsDoc = objJmsDocBL.SelectDentist(objJmsDoc.DoctorID); if (objJmsDoc != null) { nvcXMLResponseData.Add("location", objJmsDoc.Location); nvcXMLResponseData.Add("Phone", objJmsDoc.PhoneNbr); nvcXMLResponseData.Add("PhoneType", objJmsDoc.PhoneType); } else { nvcXMLResponseData.Add("location", ""); nvcXMLResponseData.Add("Phone", ""); nvcXMLResponseData.Add("PhoneType", ""); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } else if (sCallertype.Equals("Prescription")) { sDrug = nvcXMLPOSTData.Get("Drug") == null ? string.Empty : nvcXMLPOSTData.Get("Drug"); sDosage = nvcXMLPOSTData.Get("Dosage") == null ? string.Empty : nvcXMLPOSTData.Get("Dosage"); sPrescribedAmt = nvcXMLPOSTData.Get("PrescribedAmt") == null ? string.Empty : nvcXMLPOSTData.Get("PrescribedAmt"); sRefills = nvcXMLPOSTData.Get("Refills") == null ? string.Empty : nvcXMLPOSTData.Get("Refills"); sGenericAllowed = nvcXMLPOSTData.Get("GenericAllowed") == null ? string.Empty : nvcXMLPOSTData.Get("GenericAllowed"); sNotes = nvcXMLPOSTData.Get("Notes") == null ? string.Empty : nvcXMLPOSTData.Get("Notes"); sVisitID = nvcXMLPOSTData.Get("VisitId") == null ? string.Empty : nvcXMLPOSTData.Get("VisitId"); sBookID = nvcXMLPOSTData.Get("BookId") == null ? string.Empty : nvcXMLPOSTData.Get("BookId"); sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sPresID = nvcXMLPOSTData.Get("Prescriptionid") == null ? string.Empty : nvcXMLPOSTData.Get("Prescriptionid"); JmmMedPrescribe objJmmPresc = new JmmMedPrescribe(); JmmMedPrescribeBL objJmmPrescBL = new JmmMedPrescribeBL(); objJmmPresc.Dosage = sDosage.ToString(); objJmmPresc.Drug = sDrug.ToString(); objJmmPresc.PrescribedAmt = KPIHlp.CVI32(sPrescribedAmt.ToString()); objJmmPresc.Refills = KPIHlp.CVI32(sRefills.ToString()); if (sGenericAllowed.ToString().Equals("true")) { objJmmPresc.IsGeneric = 1; } else { objJmmPresc.IsGeneric = 0; } objJmmPresc.CurQuantity = KPIHlp.CVI32(sPrescribedAmt.ToString()); //need to change objJmmPresc.cMode = KPIHlp.CVC(sMode); objJmmPresc.IsPersonalProp = 0; //need to pass objJmmPresc.JMBookingID = KPIHlp.CVI64(sBookID.ToString()); objJmmPresc.JurisID = GetPageJuris(); objJmmPresc.MedVisitID = KPIHlp.CVI64(sVisitID.ToString()); objJmmPresc.RefillBal = KPIHlp.CVI16(sRefills.ToString()); objJmmPresc.Times = 0; //objJmmPresc.Times=""; objJmmPresc.PrescribeNotes = sNotes.ToString(); if (sMode.Equals("A")) { objJmmPresc.MedPrescribeID = KPICounter.GetCounterID(objJmmPresc.JurisID); objJmmPrescBL.Insert(objJmmPresc); nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } else { objJmmPresc.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmPrescBL.Update(objJmmPresc); //get id from grd nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } #region else if (sCallertype == "DentistEntryNotes") { JMMDentVisitID = nvcXMLPOSTData.Get("JMMDentVisitID") == null ? string.Empty : nvcXMLPOSTData.Get("JMMDentVisitID").ToString(); JurisID = nvcXMLPOSTData.Get("JurisID") == null ? string.Empty : nvcXMLPOSTData.Get("JurisID").ToString(); RecType = nvcXMLPOSTData.Get("RecType") == null ? string.Empty : nvcXMLPOSTData.Get("RecType").ToString(); sNotes = new CMSHlp().GetCommentNotes(Convert.ToInt64(JMMDentVisitID), KPIHlp.CVI32(RecType)); if (!string.IsNullOrEmpty(sNotes)) { nvcXMLResponseData.Add("Notes", sNotes); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } #endregion #region Medical Visit Facility Notes else if (sCallertype == "MedicalVisitNotes") { JMMMedVisitID = nvcXMLPOSTData.Get("JMMMedVisitID") == null ? string.Empty : nvcXMLPOSTData.Get("JMMMedVisitID").ToString(); JurisID = nvcXMLPOSTData.Get("JurisID") == null ? string.Empty : nvcXMLPOSTData.Get("JurisID").ToString(); RecType = nvcXMLPOSTData.Get("RecType") == null ? string.Empty : nvcXMLPOSTData.Get("RecType").ToString(); sNotes = new CMSHlp().GetCommentNotes(Convert.ToInt64(JMMMedVisitID), KPIHlp.CVI32(RecType)); if (!string.IsNullOrEmpty(sNotes)) { nvcXMLResponseData.Add("Notes", sNotes); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } #endregion else { sDrug = nvcXMLPOSTData.Get("Drug") == null ? string.Empty : nvcXMLPOSTData.Get("Drug"); sDosage = nvcXMLPOSTData.Get("Dosage") == null ? string.Empty : nvcXMLPOSTData.Get("Dosage"); sPrescribedAmt = nvcXMLPOSTData.Get("PrescribedAmt") == null ? string.Empty : nvcXMLPOSTData.Get("PrescribedAmt"); sRefills = nvcXMLPOSTData.Get("Refills") == null ? string.Empty : nvcXMLPOSTData.Get("Refills"); sGenericAllowed = nvcXMLPOSTData.Get("GenericAllowed") == null ? string.Empty : nvcXMLPOSTData.Get("GenericAllowed"); sNotes = nvcXMLPOSTData.Get("Notes") == null ? string.Empty : nvcXMLPOSTData.Get("Notes"); sCurBalance = nvcXMLPOSTData.Get("CurBalance") == null ? string.Empty : nvcXMLPOSTData.Get("CurBalance"); sBookID = nvcXMLPOSTData.Get("BookId") == null ? string.Empty : nvcXMLPOSTData.Get("BookId"); sMode = nvcXMLPOSTData.Get("Mode") == null ? string.Empty : nvcXMLPOSTData.Get("Mode"); sPresID = nvcXMLPOSTData.Get("Prescriptionid") == null ? string.Empty : nvcXMLPOSTData.Get("Prescriptionid"); sVisitID = nvcXMLPOSTData.Get("MedVisitID") == null ? string.Empty : nvcXMLPOSTData.Get("MedVisitID"); JmmMedPrescribe objJmmPresc = new JmmMedPrescribe(); JmmMedPrescribeBL objJmmPrescBL = new JmmMedPrescribeBL(); objJmmPresc.Dosage = sDosage.ToString(); objJmmPresc.Drug = sDrug.ToString(); objJmmPresc.PrescribedAmt = KPIHlp.CVI32(sPrescribedAmt.ToString()); objJmmPresc.Refills = KPIHlp.CVI32(sRefills.ToString()); if (sGenericAllowed.ToString().Equals("true")) { objJmmPresc.IsGeneric = 1; } else { objJmmPresc.IsGeneric = 0; } objJmmPresc.CurQuantity = KPIHlp.CVI32(sCurBalance.ToString()); //need to change if (!String.IsNullOrEmpty(sMode)) { objJmmPresc.cMode = KPIHlp.CVC(sMode); } objJmmPresc.IsPersonalProp = 1; //need to pass objJmmPresc.JMBookingID = KPIHlp.CVI64(sBookID.ToString()); objJmmPresc.JurisID = GetPageJuris(); objJmmPresc.RefillBal = KPIHlp.CVI16(sRefills.ToString()); objJmmPresc.Times = 0; //objJmmPresc.Times=""; objJmmPresc.PrescribeNotes = sNotes.ToString(); if (sMode.Equals("A")) { objJmmPresc.MedVisitID = KPIHlp.CVI64(sVisitID.ToString()); objJmmPresc.MedPrescribeID = KPICounter.GetCounterID(objJmmPresc.JurisID); objJmmPrescBL.Insert(objJmmPresc); nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } else { objJmmPresc.MedPrescribeID = KPIHlp.CVI64(sPresID); objJmmPrescBL.Update(objJmmPresc); //get id from grd nvcXMLResponseData.Add("PrescriptionId", objJmmPresc.MedPrescribeID.ToString()); } Response.Write(BuildKPIXMLResponse(nvcXMLResponseData)); Response.End(); } } catch (Exception objErr) { if (!objErr.Message.StartsWith("Thread was being aborted")) { string sErrMsg = "Invalid XML Request String" + objErr.Message; Response.Write(sErrMsg); Response.End(); //return; } } }
protected void Page_Load(object sender, EventArgs e) { try { cmdAdd.Attributes.Add("OnClick", "return fn_ManiGrdDetails();"); cmdClear.Attributes.Add("OnClick", "return fn_CancelChartDetailsRow();"); cmdSave.Attributes.Add("OnClick", "glbCtrlClicked='Save';"); cmdReset.Attributes.Add("OnClick", "glbCtrlClicked='Reset';"); Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "OnSubmit", "return fn_ValidateScreen();"); hdnMode.Value = Request.QueryString.Get("Mode") == null ? string.Empty : Request.QueryString.Get("Mode").Trim().ToString(); //CRM#65266 All inmate Booking Status should allow to create Medical Entry hdnJurisId.Value = Request.QueryString.Get("hdnJurisID") == null ? string.Empty : Request.QueryString.Get("hdnJurisID").Trim().ToString(); hdnBookingID.Value = Request.QueryString.Get("BookingID") == null ? string.Empty : Request.QueryString.Get("BookingID").ToString(); hdnNameID.Value = Request.QueryString.Get("InmateNameID") == null ? string.Empty : Request.QueryString.Get("InmateNameID").ToString(); hdnJMMedicalHistID.Value = Request.QueryString.Get("JMMedicalHistID") == null ? string.Empty : Request.QueryString.Get("JMMedicalHistID").ToString(); hdnStatus.Value = Request.QueryString.Get("Status") == null ? string.Empty : Request.QueryString.Get("Status").ToString(); if (hdnStatus.Value == "1") { tdstatusbar.Style.Remove("display"); } else { tdstatusbar.Style.Add("display", "none"); } if (!IsPostBack) { JMMMedicalHist objJMMMedicalHist = new JMMMedicalHist(); if (!String.IsNullOrEmpty(hdnJurisId.Value)) { objJMMMedicalHist.JurisID = KPIHlp.CVI32(hdnJurisId.Value); } if (!String.IsNullOrEmpty(hdnBookingID.Value)) { objJMMMedicalHist.JMBookingID = KPIHlp.CVI64(hdnBookingID.Value); } if (!String.IsNullOrEmpty(hdnNameID.Value)) { objJMMMedicalHist.NameID = KPIHlp.CVI64(hdnNameID.Value); } if (!String.IsNullOrEmpty(hdnJMMedicalHistID.Value)) { objJMMMedicalHist.JMMedicalHistID = KPIHlp.CVI64(hdnJMMedicalHistID.Value); } Inquiry(ref objJMMMedicalHist); } if (KPIHlp.CVI32(hdnJurisId.Value) > 0) { hdnSetUserPFID.Value = State.GPV((int)JailAdmissionParams.IsDefaultAllPFFields, KPIHlp.CVI32(hdnJurisId.Value)); } if (hdnJurisId.Value == KPIHlp.CVS(State.sJurisID)) { hdnLoginPFCode.Value = KPI.Global.Helper.PersonnelHlp.GetPFCode(State.sPFID); hdnLoginPFDesc.Value = KPI.Global.Helper.PersonnelHlp.GetPFFullName(State.sPFID); hdnLoginPFID.Value = State.sPFID.ToString(); } } catch (Exception) { KPITrace.Debug(TraceWeight.Five, "Calling page load for medical charting screen"); WrtActivityLog(long.MinValue, " Calling page load for medical charting screen."); } }
protected void Page_Load(object sender, EventArgs e) { cmdAdd.Attributes.Add("OnClick", "return fn_ManipulationVitalTab();"); cmdClear.Attributes.Add("OnClick", "return fn_CancelVitals();"); cmdSave.Attributes.Add("OnClick", "glbCtrlClicked='Save';"); cmdReset.Attributes.Add("OnClick", "glbCtrlClicked='Reset';"); Page.ClientScript.RegisterOnSubmitStatement(Page.GetType(), "OnSubmit", "return fn_ValidateScreen();"); if (Request.QueryString.Get("hdnJurisID") != null && Request.QueryString.Get("hdnJurisID") != string.Empty) { hdnJurisId.Value = Request.QueryString.Get("hdnJurisID").ToString(); JurisID = KPIHlp.CVI32(hdnJurisId.Value); hdnSetUserPFID.Value = State.GPV((int)JailAdmissionParams.IsDefaultAllPFFields, KPIHlp.CVI32(hdnJurisId.Value)); } if (Request.QueryString.Get("BookingID") != null && Request.QueryString.Get("BookingID") != string.Empty) { hdnBookingID.Value = Request.QueryString.Get("BookingID").ToString(); JMBookingID = KPIHlp.CVI64(hdnBookingID.Value); } if (Request.QueryString.Get("JMMedicalHistID") != null && Request.QueryString.Get("JMMedicalHistID") != string.Empty) { hdnJMMedicalHistID.Value = Request.QueryString.Get("JMMedicalHistID").ToString(); JMMedicalHistID = KPIHlp.CVI64(hdnJMMedicalHistID.Value); } if (Request.QueryString.Get("Mode") != null && Request.QueryString.Get("Mode") != string.Empty) { hdnMode.Value = Request.QueryString.Get("Mode").ToString(); } if (Request.QueryString.Get("Status") != null && Request.QueryString.Get("Status") != string.Empty) { hdnStatus.Value = Request.QueryString.Get("Status").ToString(); Status = KPIHlp.CVI16(hdnStatus.Value); } if (Status == 1) { tdstatusbar.Style.Remove("display"); } else { tdstatusbar.Style.Add("display", "none"); } if (State.sJurisID == KPIHlp.CVI32(hdnJurisId.Value)) { hdnLoginPFCode.Value = KPI.Global.Helper.PersonnelHlp.GetPFCode(State.sPFID); hdnLoginPFDesc.Value = KPI.Global.Helper.PersonnelHlp.GetPFFullName(State.sPFID); hdnLoginPFID.Value = State.sPFID.ToString(); } if (!IsPostBack) { if (JMMedicalHistID != Int64.MinValue && JMBookingID != Int64.MinValue && JurisID != Int32.MinValue) { Inquiry(JMMedicalHistID, JMBookingID, JurisID, Status); } } }