//string UrethraDischarge, VaginalDischarge, genitalUlceration, TCA; protected void Page_Load(object sender, EventArgs e) { //UrethraDischarge = VaginalDischarge = genitalUlceration = TCA = ""; startTime = String.Format("{0:yyyy-MM-dd hh:mm:ss}", DateTime.Now); PwPManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); if (!IsPostBack) { fillSelect_MultiSelect(); FemaleControls(); addAttributes(); if (Convert.ToInt32(Session["PatientVisitId"]) > 0) { //Load Details LoadExistingData(); } else if (Convert.ToInt32(Session["PatientVisitId"]) == 0) { LoadAutoPopulatingData(); } } showHideControls(); loadSignature(); }
protected void Page_Load(object sender, EventArgs e) { WHOManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); if (!IsPostBack) { BindGridView(gvWHO1, "NigeriaWHOStageIConditions"); BindGridView(gvWHO2, "NigeriaWHOStageIIConditions"); BindGridView(gvWHO3, "NigeriaWHOStageIIIConditions"); BindGridView(gvWHO4, "NigeriaWHOStageIVConditions"); BindDropdown(ddlInitiationWHOstage, "InitiationWHOstage"); BindDropdown(ddlwhostage1, "InitiationWHOstage"); BindDropdown(ddlhivassociated, "HIVAssociatedConditionsPeads"); DataSet dsLatestWHOStage = WHOManager.GetLatestWHOStage(Convert.ToInt32(Session["PatientId"])); if (dsLatestWHOStage.Tables[0].Rows.Count > 0) { ddlwhostage1.SelectedValue = dsLatestWHOStage.Tables[0].Rows[0]["WHOStage"].ToString(); } for (int i = 0; i < ddlwhostage1.SelectedIndex; i++) { ddlwhostage1.Items[i].Attributes.Add("Disabled", "Disabled"); } } }
public void get_MMAS_Data() { DataSet theDSExistingForm = new DataSet(); MMASScreeningManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); theDSExistingForm = MMASScreeningManager.GetMMASFormData(Convert.ToInt32(Session["PatientId"]), Convert.ToInt32(Session["PatientVisitId"])); if (theDSExistingForm.Tables[0].Rows.Count > 0) { if (theDSExistingForm.Tables[0].Rows[0]["ForgetMedicine"].ToString() != "") { rdoForgetMedicine.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["ForgetMedicine"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["CarelessTaking"].ToString() != "") { rdoCarelessTaking.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["CarelessTaking"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["FeelWorse"].ToString() != "") { rdoFeelWorse.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["FeelWorse"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["FeelBetter"].ToString() != "") { rdoFeelBetter.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["FeelBetter"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["YesterdayMedicine"].ToString() != "") { rdoYesterdayMedicine.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["YesterdayMedicine"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["SymptomsUnderControl"].ToString() != "") { rdoSymptomsUnderControl.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["SymptomsUnderControl"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["TreatmentPlanPressure"].ToString() != "") { rdoTreatmentPlanPressure.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["TreatmentPlanPressure"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["DifficultyRemembering"].ToString() != "") { rdoDifficultyRemembering.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["DifficultyRemembering"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["Mmas4Score"].ToString() != "") { hdnMmas4Score.Value = theDSExistingForm.Tables[0].Rows[0]["Mmas4Score"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["Mmas4Adherence"].ToString() != "") { hdnMmas4Adherence.Value = theDSExistingForm.Tables[0].Rows[0]["Mmas4Adherence"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["Mmas8Score"].ToString() != "") { hdnMmas8Score.Value = theDSExistingForm.Tables[0].Rows[0]["Mmas8Score"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["Mmas8Adherence"].ToString() != "") { hdnMmas8Adherence.Value = theDSExistingForm.Tables[0].Rows[0]["Mmas8Adherence"].ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { ExpressFormManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); if (!IsPostBack) { GetLastregimenDispensed(); fillDropDown(); } }
protected void Page_Load(object sender, EventArgs e) { KNHStatic = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); if (!IsPostBack) { addAttributes(); Bind_Select_Lists(); } JavaScriptFunctionsOnLoad(); }
protected void Page_Load(object sender, EventArgs e) { WHOManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); if (!IsPostBack) { if (GblIQCare.FormId == 174 || GblIQCare.FormId == 177) { BindGridView(gvWHO1, "WHOStageIConditions"); BindGridView(gvWHO2, "WHOStageIIConditions"); BindGridView(gvWHO3, "WHOStageIIICoditions"); BindGridView(gvWHO4, "WHOStageIVConditions"); } else { BindGridView(gvWHO1, "CurrentWHOStageIConditions"); BindGridView(gvWHO2, "CurrentWHOStageIIConditions"); BindGridView(gvWHO3, "CurrentWHOStageIIIConditions"); BindGridView(gvWHO4, "CurrentWHOStageIVConditions"); } //CreateMultiSelectwithDate(0, PnlWHO1, "Presenting WHO Stage I Conditions", "Current", "Historic", "CurrentWHOStageIConditions"); //CreateMultiSelectwithDate(0, PnlWHO2, "Presenting WHO Stage II conditions", "Current", "Historic", "CurrentWHOStageIIConditions"); //CreateMultiSelectwithDate(0, PnlWHO3, "Presenting WHO Stage III conditions", "Current", "Historic", "CurrentWHOStageIIIConditions"); //CreateMultiSelectwithDate(0, PnlWHO4, "Presenting Stage IV conditions", "Current", "Historic", "CurrentWHOStageIVConditions"); //BindDropdown(ddlWABStage, "WABStage"); BindDropdown(ddlWABStage, "WABStage"); BindDropdown(ddltannerstaging, "TannerStaging"); BindDropdown(ddlInitiationWHOstage, "InitiationWHOstage"); BindDropdown(ddlwhostage1, "WHO Stage"); BindDropdown(ddlhivassociated, "HIVAssociatedConditionsPeads"); BindDropdown(ddlPatFUstatus, "FollowUpStatus"); DataSet dsLatestWHOStage = WHOManager.GetLatestWHOStage(Convert.ToInt32(Session["PatientId"])); if (dsLatestWHOStage.Tables[0].Rows.Count > 0) { ddlwhostage1.SelectedValue = dsLatestWHOStage.Tables[0].Rows[0]["WHOStage"].ToString(); } for (int i = 0; i < ddlwhostage1.SelectedIndex; i++) { ddlwhostage1.Items[i].Attributes.Add("Disabled", "Disabled"); } } InitialWHOStage(); if (Convert.ToDecimal(Session["PatientAge"]) > 19) { ddltannerstaging.Attributes.Add("Disabled", "Disabled"); lblTannerStage1.ForeColor = System.Drawing.Color.Gray; } }
public void save_MMAS_Data() { try { Hashtable HT = TBHT(); MMASScreeningManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); MMASScreeningManager.SaveUpdateMMASData(HT); } catch (Exception ex) { //Page.ClientScript.RegisterStartupScript(this.GetType(), "TBSaveUpdateError", "alert('Error encountered. Please contact the system administrator');", true); ScriptManager.RegisterStartupScript(this, this.GetType(), "TBSaveUpdateError", "alert('Error encountered. Please contact the system administrator');", true); } }
protected void Page_Load(object sender, EventArgs e) { CageScreeningManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); if (!IsPostBack) { if (Convert.ToInt32(Session["PatientVisitId"]) > 0) { LoadExistingData(); } AddAttributes(); } HideControls(); }
public void TabUserRights(Button save, Button print, int FeatureID, int TabID) { ICustomForm mgrUserValidate = (ICustomForm)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BCustomForm, BusinessProcess.Clinical"); IKNHStaticForms isTabSaved = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); //int iSavedUserID = mgrUserValidate.GetCustomFormSavedByUser(Convert.ToInt32(System.Web.HttpContext.Current.Session["PatientVisitId"]), TabID); //if user have view permission disable the buttons //AuthenticationManager Authentication = new AuthenticationManager(); bool bCanView = !HasFunctionRight(FeatureID, TabID, FunctionAccess.View, (DataTable)System.Web.HttpContext.Current.Session["UserRight"]); //if user have view permission save.Enabled = bCanView; //first time - new user form creation if (Convert.ToInt32(System.Web.HttpContext.Current.Session["PatientVisitId"]) == 0) { bool bCanAdd = HasFunctionRight(FeatureID, TabID, FunctionAccess.Add, (DataTable)System.Web.HttpContext.Current.Session["UserRight"]); save.Enabled = bCanAdd; } else if (Convert.ToInt32(System.Web.HttpContext.Current.Session["PatientVisitId"]) > 0) { DataSet tabSaved = isTabSaved.CheckIfTabSaved(TabID, Convert.ToInt32(System.Web.HttpContext.Current.Session["PatientVisitId"])); if (tabSaved.Tables[0].Rows.Count == 0) { bool bCanAdd = HasFunctionRight(FeatureID, TabID, FunctionAccess.Add, (DataTable)System.Web.HttpContext.Current.Session["UserRight"]); save.Enabled = bCanAdd; } else { bool bCanUpdate = HasFunctionRight(FeatureID, TabID, FunctionAccess.Update, (DataTable)System.Web.HttpContext.Current.Session["UserRight"]); //if (bCanUpdate == true) //{ // //if user is different from who already saved user. // bCanUpdate = (iSavedUserID == Convert.ToInt32(System.Web.HttpContext.Current.Session["AppUserId"])); //} if (Convert.ToInt32(System.Web.HttpContext.Current.Session["AppUserID"]) == 1) { bCanUpdate = true; } save.Enabled = bCanUpdate; } } print.Enabled = HasFunctionRight(FeatureID, TabID, FunctionAccess.Print, (DataTable)System.Web.HttpContext.Current.Session["UserRight"]); }
protected void Page_Load(object sender, EventArgs e) { IKNHStaticForms ExtVitals = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); theDS = ExtVitals.GetExtruderData(Convert.ToInt32(Session["PatientId"])); if (theDS.Tables[1].Rows.Count > 0) { lblHighestCD4.Text = theDS.Tables[1].Rows[0][0].ToString(); lblHighestCD4Date.Text = theDS.Tables[1].Rows[0][1].ToString(); } if (theDS.Tables[2].Rows.Count > 0) { lblLowestCD4.Text = theDS.Tables[2].Rows[0][0].ToString(); lblLowestCD4Date.Text = theDS.Tables[2].Rows[0][1].ToString(); } if (theDS.Tables[3].Rows.Count > 0) { grdCD4.DataSource = theDS.Tables[3]; grdCD4.DataBind(); } if (theDS.Tables[4].Rows.Count > 0) { lblHighestViralLoad.Text = theDS.Tables[4].Rows[0][0].ToString(); lblHighestVLDate.Text = theDS.Tables[4].Rows[0][1].ToString(); } if (theDS.Tables[5].Rows.Count > 0) { lblLowestViralLoad.Text = theDS.Tables[5].Rows[0][0].ToString(); lblLowestVLDate.Text = theDS.Tables[5].Rows[0][1].ToString(); } if (theDS.Tables[6].Rows.Count > 0) { grdViralLoad.DataSource = theDS.Tables[6]; grdViralLoad.DataBind(); } if (theDS.Tables[7].Rows.Count > 0) { grdLatestResults.DataSource = theDS.Tables[7]; grdLatestResults.DataBind(); } }
public void get_CRAFFTScreening_Data() { DataSet theDSExistingForm = new DataSet(); CRAFFTSCreeningManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); theDSExistingForm = CRAFFTSCreeningManager.GetCRAFFTScreeningFormData(Convert.ToInt32(Session["PatientId"]), Convert.ToInt32(Session["PatientVisitId"])); if (theDSExistingForm.Tables[0].Rows.Count > 0) { if (theDSExistingForm.Tables[0].Rows[0]["DrinkAlcohol"].ToString() != "") { rdoDrinkAlcohol.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["DrinkAlcohol"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["SmokeMarijuana"].ToString() != "") { rdoSmokeMarijuana.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["SmokeMarijuana"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["UseAnythingElse"].ToString() != "") { rdoUseAnythingElse.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["UseAnythingElse"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["RiddenInaCar"].ToString() != "") { rdoRiddenInaCar.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["RiddenInaCar"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["UseAlcoholtoRelax"].ToString() != "") { rdoUseAlcoholtoRelax.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["UseAlcoholtoRelax"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["UseAlcoholAlone"].ToString() != "") { rdoUseAlcoholAlone.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["UseAlcoholAlone"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["ALcoholForgetThings"].ToString() != "") { rdoAlcoholForgetThings.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["ALcoholForgetThings"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["FamilyAdvice"].ToString() != "") { rdoFamilyAdvice.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["FamilyAdvice"].ToString(); } if (theDSExistingForm.Tables[0].Rows[0]["AlcoholTrouble"].ToString() != "") { rdoAlcoholTrouble.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["AlcoholTrouble"].ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { IKNHStaticForms ARVHistory = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); theDS = ARVHistory.GetLastRegimenDispensed(Convert.ToInt32(Session["PatientId"])); if (theDS.Tables[0].Rows.Count > 0) { lblLastRegimen.Text = theDS.Tables[1].Rows[0][0].ToString(); } ARVHistoryDS = ARVHistory.GetPatientDrugHistory(Convert.ToInt32(Session["PatientId"])); BindGridARV(ARVHistoryDS.Tables[0]); //grdARVHistory.DataSource = ARVHistoryDS.Tables[0]; //grdARVHistory.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblRoot") as Label).Text = "Clinical Forms >> "; (Master.FindControl("levelOneNavigationUserControl1").FindControl("lblheader") as Label).Text = "Psychosocial Adherence Enrollment"; (Master.FindControl("levelTwoNavigationUserControl1").FindControl("lblformname") as Label).Text = "Psychosocial Adherence Enrollment"; KNHStatic = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); if (IsPostBack != true) { BindDropdown(); BindChkboxlst(); BindRdolst(); Session["startTime"] = DateTime.Now; if (Convert.ToInt32(Session["PatientVisitId"]) == 0) { usePEFUForm(); } } }
private void LordExistingFormData() { DataSet theDSExistingForm = new DataSet(); PH9ScreeningManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); theDSExistingForm = PH9ScreeningManager.GetPH9ScreeningFormData(Convert.ToInt32(Session["PatientId"]), Convert.ToInt32(Session["PatientVisitId"])); if (theDSExistingForm.Tables[0].Rows.Count > 0) { rdoLittleInterest.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["LittleInterest"].ToString(); rdoFeelingDown.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["FeelingDown"].ToString(); rdoTroubleFalling.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["TroubleFalling"].ToString(); rdoFeelingTired.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["FeelingTired"].ToString(); rdoPoorAppetite.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["PoorAppetite"].ToString(); rdoFeelingBad.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["FeelingBad"].ToString(); rdoTroubleConcentrating.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["TroubleConcentrating"].ToString(); rdoMovingSlowly.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["MovingSlowly"].ToString(); rdoThoughts.SelectedValue = theDSExistingForm.Tables[0].Rows[0]["Thoughts"].ToString(); hdnDiagnosisValue.Value = theDSExistingForm.Tables[0].Rows[0]["DiagnosisTotalValue"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { IKNHStaticForms ExtVitals = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); theDS = ExtVitals.GetExtruderData(Convert.ToInt32(Session["PatientId"])); if (theDS.Tables[0].Rows.Count > 0) { lblSex.Text = theDS.Tables[0].Rows[0]["sex"].ToString(); lblDOB.Text = theDS.Tables[0].Rows[0]["dob"].ToString(); lblDistrict.Text = theDS.Tables[0].Rows[0]["districtname"].ToString(); lblPhone.Text = theDS.Tables[0].Rows[0]["phone"].ToString(); lblAge.Text = Session["patientageinyearmonth"].ToString(); } if (theDS.Tables[8].Rows.Count > 0) { lblBMI.Text = theDS.Tables[8].Rows[0]["BMI"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { DiffCareManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); if (!IsPostBack) { if (Convert.ToInt32(Session["PatientVisitId"]) > 0) { //Load Details LoadAutoPopulatingData(); LoadExistingData(); } else if (Convert.ToInt32(Session["PatientVisitId"]) == 0) { LoadAutoPopulatingData(); } AddAttributes(); } HideControls(); }
public void calculateZScores() { double L = 0, M = 0, S = 0, WeightAgeZ = 0, WeightHeightZ = 0, HAz = 0, BMIz = 0, weight = 0, heightInCm = 0, bmi = 0; DataSet ZScoreDS = new DataSet(); IKNHStaticForms KNHS = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); ZScoreDS = KNHS.GetZScoreValues(Convert.ToInt32(Session["PatientId"]), Convert.ToString(Session["PatientSex"]), txtHeight.Text); //////weight for Age////////// if (Convert.ToDouble(Session["patientageinyearmonth"].ToString()) < 15) { if (ZScoreDS.Tables[0].Rows.Count > 0) { L = Convert.ToDouble(ZScoreDS.Tables[0].Rows[0]["L"].ToString()); M = Convert.ToDouble(ZScoreDS.Tables[0].Rows[0]["M"].ToString()); S = Convert.ToDouble(ZScoreDS.Tables[0].Rows[0]["S"].ToString()); if (txtWeight.Text != "") { weight = Convert.ToDouble(txtWeight.Text); } else { weight = 0; } //Weight for age calculation if (L != 0) { WeightAgeZ = ((Math.Pow((weight / M), L)) - 1) / (S * L); } else { WeightAgeZ = (Math.Log(weight / M)) / S; } if (WeightAgeZ >= 4) { lblWA.Text = "4"; lblWAClassification.Text = " Overweight"; lblWA.ForeColor = Color.Red; lblWAClassification.ForeColor = Color.Red; } else if (WeightAgeZ >= 3 && WeightAgeZ < 4) { lblWA.Text = "3"; lblWAClassification.Text = " Overweight"; lblWA.ForeColor = Color.Red; lblWAClassification.ForeColor = Color.Red; } else if (WeightAgeZ >= 2 && WeightAgeZ < 3) { lblWA.Text = "2"; lblWAClassification.Text = " Overweight"; lblWA.ForeColor = Color.Red; lblWAClassification.ForeColor = Color.Red; } else if (WeightAgeZ >= 1 && WeightAgeZ < 2) { lblWA.Text = "1"; lblWAClassification.Text = " Overweight"; lblWA.ForeColor = Color.Red; lblWAClassification.ForeColor = Color.Red; } else if (WeightAgeZ > -1 && WeightAgeZ < 1) { lblWA.Text = "0"; lblWAClassification.Text = " Normal"; lblWA.ForeColor = Color.Green; lblWAClassification.ForeColor = Color.Green; } else if (WeightAgeZ <= -1 && WeightAgeZ > -2) { lblWA.Text = "-1"; lblWAClassification.Text = " Mild"; lblWA.ForeColor = Color.Orange; lblWAClassification.ForeColor = Color.Orange; } else if (WeightAgeZ <= -2 && WeightAgeZ > -3) { lblWA.Text = "-2"; lblWAClassification.Text = " Moderate"; lblWA.ForeColor = Color.Red; lblWAClassification.ForeColor = Color.Red; } else if (WeightAgeZ <= -3 && WeightAgeZ > -4) { lblWA.Text = "-3"; lblWAClassification.Text = " Severe"; lblWA.ForeColor = Color.Red; lblWAClassification.ForeColor = Color.Red; } else if (WeightAgeZ <= -4) { lblWA.Text = "-4"; lblWAClassification.Text = " Severe"; lblWA.ForeColor = Color.Red; lblWAClassification.ForeColor = Color.Red; } } else { lblWAClassification.Text = "Out of range"; } } else { lblWA.Text = ""; lblWAClassification.Text = ""; } ///////////////////////////////// ///////Weight for height calculation////////////////////////////// if (Convert.ToDouble(Session["patientageinyearmonth"].ToString()) < 15) { if (Convert.ToDouble(txtHeight.Text) <= 120 && Convert.ToDouble(txtHeight.Text) >= 45) { try { if (ZScoreDS.Tables[1].Rows.Count > 0) { L = Convert.ToDouble(ZScoreDS.Tables[1].Rows[0]["L"].ToString()); M = Convert.ToDouble(ZScoreDS.Tables[1].Rows[0]["M"].ToString()); S = Convert.ToDouble(ZScoreDS.Tables[1].Rows[0]["S"].ToString()); if (txtWeight.Text != "") { weight = Convert.ToDouble(txtWeight.Text); } else { weight = 0; } if (L != 0) { WeightHeightZ = ((Math.Pow((weight / M), L)) - 1) / (S * L); } else { WeightHeightZ = (Math.Log(weight / M)) / S; } //lblWH.Text = string.Format("{0:f2}", WeightHeightZ);// WeightHeightZ.ToString("##.##"); } else { lblWH.Text = "Out of range"; } if (WeightHeightZ >= 4) { lblWH.Text = "4"; lblWHClassification.Text = " Overweight"; lblWH.ForeColor = Color.Red; lblWHClassification.ForeColor = Color.Red; } else if (WeightHeightZ >= 3 && WeightHeightZ < 4) { lblWH.Text = "3"; lblWHClassification.Text = " Overweight"; lblWH.ForeColor = Color.Red; lblWHClassification.ForeColor = Color.Red; } else if (WeightHeightZ >= 2 && WeightHeightZ < 3) { lblWH.Text = "2"; lblWHClassification.Text = " Overweight"; lblWH.ForeColor = Color.Red; lblWHClassification.ForeColor = Color.Red; } else if (WeightHeightZ >= 1 && WeightHeightZ < 2) { lblWH.Text = "1"; lblWHClassification.Text = " Overweight"; lblWH.ForeColor = Color.Red; lblWHClassification.ForeColor = Color.Red; } else if (WeightHeightZ > -1 && WeightHeightZ < 1) { lblWH.Text = "0"; lblWHClassification.Text = " Normal"; lblWH.ForeColor = Color.Green; lblWHClassification.ForeColor = Color.Green; } else if (WeightHeightZ <= -1 && WeightHeightZ > -2) { lblWH.Text = "-1"; lblWHClassification.Text = " Mild"; lblWH.ForeColor = Color.Orange; lblWHClassification.ForeColor = Color.Orange; } else if (WeightHeightZ <= -2 && WeightHeightZ > -3) { lblWH.Text = "-2"; lblWHClassification.Text = " Moderate"; lblWH.ForeColor = Color.Red; lblWHClassification.ForeColor = Color.Red; } else if (WeightHeightZ <= -3 && WeightHeightZ > -4) { lblWH.Text = "-3"; lblWHClassification.Text = " Severe"; lblWH.ForeColor = Color.Red; lblWHClassification.ForeColor = Color.Red; } else if (WeightHeightZ <= -4) { lblWH.Text = "-4"; lblWHClassification.Text = " Severe"; lblWH.ForeColor = Color.Red; lblWHClassification.ForeColor = Color.Red; } } catch (Exception ex) { } } else { lblWH.Text = ""; lblWHClassification.Text = ""; } } else { lblWH.Text = ""; lblWHClassification.Text = ""; } ////////////////////////////////////////////////////////////////////// ////BMIz (Z-Score Calculation)//////////////////////////// if (Convert.ToDouble(Session["patientageinyearmonth"].ToString()) <= 15) { if (ZScoreDS.Tables[2].Rows.Count > 0) { L = Convert.ToDouble(ZScoreDS.Tables[2].Rows[0]["L"].ToString()); M = Convert.ToDouble(ZScoreDS.Tables[2].Rows[0]["M"].ToString()); S = Convert.ToDouble(ZScoreDS.Tables[2].Rows[0]["S"].ToString()); if (txtHeight.Text != "" && txtWeight.Text != "") { bmi = Convert.ToDouble(txtWeight.Text) / ((Convert.ToDouble(txtHeight.Text) / 100) * (Convert.ToDouble(txtHeight.Text) / 100)); } else { bmi = 0; } if (L != 0) { BMIz = ((Math.Pow((bmi / M), L)) - 1) / (S * L); } else { BMIz = (Math.Log(bmi / M)) / S; } lblBMIz.Text = string.Format("{0:f2}", BMIz); if (BMIz >= 4) { lblBMIz.Text = "4"; lblBMIzClassification.Text = " Overweight"; lblBMIz.ForeColor = Color.Red; lblBMIzClassification.ForeColor = Color.Red; } else if (BMIz >= 3 && BMIz < 4) { lblBMIz.Text = "3"; lblBMIzClassification.Text = " Overweight"; lblBMIz.ForeColor = Color.Red; lblBMIzClassification.ForeColor = Color.Red; } else if (BMIz >= 2 && BMIz < 3) { lblBMIz.Text = "2"; lblBMIzClassification.Text = " Overweight"; lblBMIz.ForeColor = Color.Red; lblBMIzClassification.ForeColor = Color.Red; } else if (BMIz >= 1 && BMIz < 2) { lblBMIz.Text = "1"; lblBMIzClassification.Text = " Overweight"; lblBMIz.ForeColor = Color.Red; lblBMIzClassification.ForeColor = Color.Red; } else if (BMIz > -1 && BMIz < 1) { lblBMIz.Text = "0"; lblBMIzClassification.Text = " Normal"; lblBMIz.ForeColor = Color.Green; lblBMIzClassification.ForeColor = Color.Green; } else if (BMIz <= -1 && BMIz > -2) { lblBMIz.Text = "-1"; lblBMIzClassification.Text = " Mild"; lblBMIz.ForeColor = Color.Orange; lblBMIzClassification.ForeColor = Color.Orange; } else if (BMIz <= -2 && BMIz > -3) { lblBMIz.Text = "-2"; lblBMIzClassification.Text = " Moderate"; lblBMIz.ForeColor = Color.Red; lblBMIzClassification.ForeColor = Color.Red; } else if (BMIz <= -3 && BMIz > -4) { lblBMIz.Text = "-3"; lblBMIzClassification.Text = " Severe"; lblBMIz.ForeColor = Color.Red; lblBMIzClassification.ForeColor = Color.Red; } else if (BMIz <= -4) { lblBMIz.Text = "-4"; lblBMIzClassification.Text = " Severe"; lblBMIz.ForeColor = Color.Red; lblBMIzClassification.ForeColor = Color.Red; } } else { lblBMIz.Text = ""; lblBMIzClassification.Text = ""; } } else { lblBMIz.Text = ""; lblBMIzClassification.Text = ""; } ///////////////////////////////////////////////////////// ///////Height for age calculation///////////////////////////// //if (L != 0) // HAz = ((Math.Pow((heightInCm / M), L)) - 1) / (S * L); //else // HAz = (Math.Log(heightInCm / M)) / S; ///////////////////////////////////////////////////////////// ZScoreDS.Dispose(); }
private string GetZScoreDetails(int ptn_pk, int visitPK, int locationId) { string result = string.Empty; try { IPrEP iPrepFacility = (IPrEP)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPrEP, BusinessProcess.Clinical"); Entities.Common.PrEP pz = iPrepFacility.GetPrEPTriageData(ptn_pk, visitPK, locationId); DataSet zscoreds = new DataSet(); IKNHStaticForms knhs = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); string height = string.IsNullOrEmpty(pz.PatientVitals.Height) == true ? "0" : pz.PatientVitals.Height; zscoreds = knhs.GetZScoreNewImplementation(ptn_pk, Session["patientsex"].ToString(), height.ToString()); ZScoreDetails zs = new ZScoreDetails(); zs.WFA = new ZScore(); zs.WFH = new ZScore(); zs.BMIz = new ZScore(); if (zscoreds.Tables[0].Rows.Count > 0) { DataColumnCollection columns = zscoreds.Tables[0].Columns; if (columns.Contains("L")) { zs.WFA.L = Convert.ToDouble(zscoreds.Tables[0].Rows[0]["L"].ToString()); zs.WFA.M = Convert.ToDouble(zscoreds.Tables[0].Rows[0]["M"].ToString()); zs.WFA.S = Convert.ToDouble(zscoreds.Tables[0].Rows[0]["S"].ToString()); } } if (zscoreds.Tables[1].Rows.Count > 0) { DataColumnCollection columns = zscoreds.Tables[1].Columns; if (columns.Contains("L")) { zs.WFH.L = Convert.ToDouble(zscoreds.Tables[1].Rows[0]["L"].ToString()); zs.WFH.M = Convert.ToDouble(zscoreds.Tables[1].Rows[0]["M"].ToString()); zs.WFH.S = Convert.ToDouble(zscoreds.Tables[1].Rows[0]["S"].ToString()); } } if (zscoreds.Tables[2].Rows.Count > 0) { DataColumnCollection columns = zscoreds.Tables[2].Columns; if (columns.Contains("L")) { zs.BMIz.L = Convert.ToDouble(zscoreds.Tables[2].Rows[0]["L"].ToString()); zs.BMIz.M = Convert.ToDouble(zscoreds.Tables[2].Rows[0]["M"].ToString()); zs.BMIz.S = Convert.ToDouble(zscoreds.Tables[2].Rows[0]["S"].ToString()); } } zscoreds.Dispose(); result = SerializerUtil.ConverToJson <Entities.Common.ZScoreDetails>(zs); } catch (Exception ex) { CLogger.WriteLog(ELogLevel.ERROR, "getzscoredetails() exception: " + ex.ToString()); ResponseType response = new ResponseType() { Success = EnumUtil.GetEnumDescription(Success.False) }; result = SerializerUtil.ConverToJson <ResponseType>(response); } finally { } return(result); }
protected void Page_Load(object sender, EventArgs e) { if (this.Visible == true) { if (!object.Equals(Session["PatientId"], null)) { if (Convert.ToInt32(Session["PatientId"]) > 0) { AlertManager = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); DataSet theDSAlerts = AlertManager.GetAlerts(Convert.ToInt32(Session["PatientId"])); //allergies DataTable allergyDT = theDSAlerts.Tables[0]; if (allergyDT.Rows.Count > 0) { for (int i = 0; i < allergyDT.Rows.Count; i++) { allergies.Append(allergyDT.Rows[i]["AllergyTypeDesc"].ToString() + " - " + allergyDT.Rows[i]["AllergenDesc"].ToString() + " - " + allergyDT.Rows[i]["DateAllergy"].ToString()); allergies.Append(","); } } Page.ClientScript.RegisterStartupScript(HttpContext.Current.GetType(), "Allergies", "myAllergies('" + allergies + "');", true); //chronic conditions DataTable chronicDT = theDSAlerts.Tables[1]; if (chronicDT.Rows.Count > 0) { for (int i = 0; i < chronicDT.Rows.Count; i++) { chronic.Append(chronicDT.Rows[i]["Name"].ToString()); chronic.Append(","); } } Page.ClientScript.RegisterStartupScript(HttpContext.Current.GetType(), "Chroniccondition", "myChronic('" + chronic + "');", true); //CD4 Due date DataTable CD4DT = theDSAlerts.Tables[2]; if (CD4DT.Rows.Count > 0) { TimeSpan timespanCD4 = ((DateTime)CD4DT.Rows[0]["CD4DueDate"]) - DateTime.Now; if (timespanCD4.Days < 60) { Page.ClientScript.RegisterStartupScript(HttpContext.Current.GetType(), "CD4DueDate", "CD4DueDate('" + ((DateTime)CD4DT.Rows[0]["CD4DueDate"]).ToString(Session["AppDateFormat"].ToString()) + "');", true); } } //Viral Load Due date DataTable ViralDT = theDSAlerts.Tables[3]; if (ViralDT.Rows.Count > 0) { if (!object.Equals(ViralDT.Rows[0]["ViralLoadDueDate"], null)) { TimeSpan timespanVL = ((DateTime)ViralDT.Rows[0]["ViralLoadDueDate"]) - DateTime.Now; if (timespanVL.Days < 60) { Page.ClientScript.RegisterStartupScript(HttpContext.Current.GetType(), "ViralDueDate", "ViralLoadDueDate('" + ((DateTime)ViralDT.Rows[0]["ViralLoadDueDate"]).ToString(Session["AppDateFormat"].ToString()) + "');", true); } } } } } } }
private string GetZScoreDetails(int ptn_pk, int visitPK, int locationId) { string result = string.Empty; try { IClinicalEncounter clinicalencounter = (IClinicalEncounter)ObjectFactory.CreateInstance("HIVCE.BusinessLayer.BLClinicalEncounter, HIVCE.BusinessLayer"); HIVCE.Common.Entities.ClinicalEncounter cl = clinicalencounter.GetData(ptn_pk, visitPK, locationId); DataSet ZScoreDS = new DataSet(); IKNHStaticForms KNHS = (IKNHStaticForms)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BKNHStaticForms, BusinessProcess.Clinical"); string height = string.IsNullOrEmpty(cl.PatientVitals.Height) == true ? "0" : cl.PatientVitals.Height; ZScoreDS = KNHS.GetZScoreNewImplementation(ptn_pk, Session["PatientSex"].ToString(), height.ToString()); ZScoreDetails zs = new ZScoreDetails(); zs.WFA = new ZScore(); zs.WFH = new ZScore(); zs.BMIz = new ZScore(); if (ZScoreDS.Tables[0].Rows.Count > 0) { DataColumnCollection columns = ZScoreDS.Tables[0].Columns; if (columns.Contains("L")) { zs.WFA.L = Convert.ToDouble(ZScoreDS.Tables[0].Rows[0]["L"].ToString()); zs.WFA.M = Convert.ToDouble(ZScoreDS.Tables[0].Rows[0]["M"].ToString()); zs.WFA.S = Convert.ToDouble(ZScoreDS.Tables[0].Rows[0]["S"].ToString()); } } if (ZScoreDS.Tables[1].Rows.Count > 0) { DataColumnCollection columns = ZScoreDS.Tables[1].Columns; if (columns.Contains("L")) { zs.WFH.L = Convert.ToDouble(ZScoreDS.Tables[1].Rows[0]["L"].ToString()); zs.WFH.M = Convert.ToDouble(ZScoreDS.Tables[1].Rows[0]["M"].ToString()); zs.WFH.S = Convert.ToDouble(ZScoreDS.Tables[1].Rows[0]["S"].ToString()); } } if (ZScoreDS.Tables[2].Rows.Count > 0) { DataColumnCollection columns = ZScoreDS.Tables[2].Columns; if (columns.Contains("L")) { zs.BMIz.L = Convert.ToDouble(ZScoreDS.Tables[2].Rows[0]["L"].ToString()); zs.BMIz.M = Convert.ToDouble(ZScoreDS.Tables[2].Rows[0]["M"].ToString()); zs.BMIz.S = Convert.ToDouble(ZScoreDS.Tables[2].Rows[0]["S"].ToString()); } } ZScoreDS.Dispose(); result = SerializerUtil.ConverToJson <HIVCE.Common.Entities.ZScoreDetails>(zs); } catch (Exception ex) { CLogger.WriteLog(ELogLevel.ERROR, "GetZScoreDetails() exception: " + ex.ToString()); ResponseType response = new ResponseType() { Success = EnumUtil.GetEnumDescription(Success.False) }; result = SerializerUtil.ConverToJson <ResponseType>(response); } finally { } return(result); }