Example #1
0
        protected void LastTbTested(ref JMMMedicalHist objJMMMedicalHist)
        {
            JMMMedVisit objMedVisit = null;

            try
            {
                if (objJMMMedicalHist != null && objJMMMedicalHist.JMMedicalHistID.HasValue && objJMMMedicalHist.JMMedicalHistID > 0 && objJMMMedicalHist.JMBookingID.HasValue && objJMMMedicalHist.JMBookingID.Value > 0)
                {
                    objMedVisit = new JMMMedVisitBL().IsTBTested(ref objJMMMedicalHist);
                }
                if (objMedVisit != null)
                {
                    dcTBTestDate.CssClass = "textboxInactive";
                    if (objMedVisit.VisitDttm.HasValue)
                    {
                        dcTBTestDate.Value = objMedVisit.VisitDttm.HasValue ? objMedVisit.VisitDttm.Value : DateTime.MinValue;
                    }
                    else
                    {
                        ((BasePage)this.Page).AddClientOnLoadScript("SCV('Main', 'dcTBTestDate', '', 15);");
                    }

                    if (objMedVisit.MedicalVisitNo.HasValue)
                    {
                        NumCrtlMedicalNo.KPIID = objMedVisit.MedicalVisitNo.Value;
                        String[] MedicalVisitNo = Counter.GetFormattedNo(CounterType.JailBookingNo, objMedVisit.MedicalVisitNo.Value.ToString()).Split('-');

                        NumCrtlMedicalNo.txtYear.Text   = Convert.ToString(MedicalVisitNo[0]);
                        NumCrtlMedicalNo.txtNumber.Text = Convert.ToString(MedicalVisitNo[1]);
                    }

                    cddResults_PreRender(ref objMedVisit);
                    cddResults.KPISelectedCodeValue = objMedVisit.Result;
                }
                else
                {
                    NumCrtlMedicalNo.txtMonth.Text  = string.Empty;
                    NumCrtlMedicalNo.txtNumber.Text = string.Empty;
                    NumCrtlMedicalNo.txtYear.Text   = string.Empty;
                    NumCrtlMedicalNo.Clear(null, null);
                    cddResults.DropDown.SelectedIndex = -1;
                    ScriptManager.RegisterStartupScript(this, GetType(), Guid.NewGuid().ToString(), "fn_IsClearTbTested();", true);
                }
            }
            catch (Exception objError)
            {
                throw objError;
            }
        }
Example #2
0
        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;
            }
        }
Example #3
0
        /// <summary>
        /// To Display the Last Medical visit Details
        /// </summary>
        /// <param name="BookingID"></param>
        protected void LastVisit(ref JMMMedicalHist objJMMMedicalHist)
        {
            JMMMedVisit objMedVisit = null;

            try
            {
                if (objJMMMedicalHist != null && objJMMMedicalHist.JMMedicalHistID.HasValue && objJMMMedicalHist.JMMedicalHistID > 0 && objJMMMedicalHist.JMBookingID.HasValue && objJMMMedicalHist.JMBookingID.Value > 0)
                {
                    objMedVisit = new JMMMedVisitBL().LastVisit(ref objJMMMedicalHist);
                }
                if (objMedVisit != null)
                {
                    txtBloodPressure1.Text = objMedVisit.BloodPressure;
                    txtBloodPressure2.Text = objMedVisit.BloodPressureMax;

                    txtPulse.Text  = objMedVisit.PulseApical.HasValue ? objMedVisit.PulseApical.Value.ToString() : (objMedVisit.PulseRadial.HasValue?objMedVisit.PulseRadial.Value.ToString():string.Empty);
                    txtWeight.Text = objMedVisit.Weight.HasValue ? objMedVisit.Weight.Value.ToString() : string.Empty;
                    txtHeight.Text = objMedVisit.Height.HasValue ? objMedVisit.Height.Value.ToString() : string.Empty;
                    objMedVisit    = new JMMMedVisit();
                    objMedVisit    = new JMMMedVisitDB().LastRecentMedicalVisit(ref objJMMMedicalHist);
                    if (objMedVisit != null)
                    {
                        dttmVisitDate.DateValue = KPIHlp.GVDttm(objMedVisit.VisitDttm == DateTime.MinValue, objMedVisit.VisitDttm);
                        if (objMedVisit.JMMedVisitID.HasValue)
                        {
                            txtReasonLstVisit.Text = new JMMMedVisitBL().LstMedicalReason(ref objMedVisit);
                        }
                        else
                        {
                            txtReasonLstVisit.Text = string.Empty;
                        }
                        txtReasonLstVisit.ToolTip = txtReasonLstVisit.Text;
                    }
                }
                else
                {
                    ((BasePage)this.Page).AddClientOnLoadScript("SCV('Main', 'txtBloodPressure1', '', 0);SCV('Main', 'txtBloodPressure2', '', 0);SCV('Main', 'txtPulse', '', 0);");
                    ((BasePage)this.Page).AddClientOnLoadScript("SCV('Main', 'txtWeight', '', 0);SCV('Main', 'txtReasonLstVisit', '', 0);SCV('Main', 'txtHeight', '', 0);SCV('Main', 'dttmVisitDate', '', 18);SCV('Main', 'dttmVisitDate', '', 19);");
                }
            }
            catch (Exception objError)
            {
                throw objError;
            }
        }
Example #4
0
        protected void LoadData()
        {
            JMMMedVisit objMedVisit = new JMMMedVisit();
            string      strhdnMode = UIMode.ADD.ToString();
            long        NameID, JMBookingID;

            try
            {
                if (Request.QueryString.Get("JMMedPrescriptionID") != null && Request.QueryString.Get("JMMedPrescriptionID") != string.Empty)
                {
                    hdnPrescriptionID.Value = Request.QueryString.Get("JMMedPrescriptionID").Trim();
                }


                //hdnSchID.Value = Request.QueryString.Get("JMPrescriptionSchduleID") == null ? string.Empty : Request.QueryString.Get("JMPrescriptionSchduleID").Trim();
                NameID = Request.QueryString.Get("NameID") == null ? long.MinValue : KPIHlp.CVI64(Request.QueryString.Get("NameID").Trim());
                if (Request.QueryString.Get("JMMedPrescriptionHistID") != null && Request.QueryString.Get("JMMedPrescriptionHistID") != string.Empty)
                {
                    hdnMedPresHisID.Value = Request.QueryString.Get("JMMedPrescriptionHistID").Trim();
                    hdnMode.Value         = UIMode.INQ.ToString();
                }

                hdnJMMScheduleEventsID.Value = Request.QueryString.Get("JMMScheduleEventsID") == null ? string.Empty : Request.QueryString.Get("JMMScheduleEventsID").Trim();
                hdnJurisId.Value             = Request.QueryString.Get("JurisID") == null?GetPageJuris().ToString() : Request.QueryString.Get("JurisID").Trim();

                try
                {
                    if (NameID > 0)
                    {
                        NamCtrlSPIN.KPIID = NameID;
                        imgFrontView.GenerateImage(true, ImgType.FrontView, ImgRefType.Names, NameID, short.MinValue);
                    }
                }
                catch (KPIException objKPIError)
                {
                    throw objKPIError;
                }
            }
            catch (Exception objError)
            {
                ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objError);
            }

            if (hdnMode.Value == UIMode.INQ.ToString()) //Added by jeyaganesh
            {
                blnForceModeChange = true;
                JMMMedPrescription     objJMMMedPrescription     = new JMMMedPrescription();
                JMMMedPrescriptionBL   objJMMMedPrescriptionBL   = new JMMMedPrescriptionBL();
                JMMMedPrescriptionHist objJMMMedPrescriptionHist = new JMMMedPrescriptionHist();
                KPITxtBL objKPITxtBL = new KPITxtBL();


                try
                {
                    objJMMMedPrescriptionHist = new JMMMedPrescriptionHistBL().Select(KPIHlp.CVI64(hdnMedPresHisID.Value));


                    if (objJMMMedPrescriptionHist != null && objJMMMedPrescriptionHist.JMMedPrescriptionHistID.HasValue)
                    {
                        txtNotes.Text   = objKPITxtBL.GetDisplayText(objJMMMedPrescriptionHist.JMMedPrescriptionHistID.Value, TxtType.JmMed_MedHisCmnts);
                        txtDrug.Text    = new CodedBL().GetCodeDescription(6007, objJMMMedPrescriptionHist.Drug, objJMMMedPrescriptionHist.JurisID.Value);
                        txtDosage.Text  = objJMMMedPrescriptionHist.Dosage;
                        txtBalance.Text = objJMMMedPrescriptionHist.CurQuantity.HasValue ? objJMMMedPrescriptionHist.CurQuantity.Value.ToString() : string.Empty;
                        if (!String.IsNullOrWhiteSpace(txtBalance.Text) && KPIHlp.CVI32(txtBalance.Text) <= 5)
                        {
                            txtBalance.ForeColor = System.Drawing.Color.Red;
                            tdComments.Attributes.Add("class", "req");
                        }

                        imgMedSignature.Style.Add("pointer-events", "none");
                        if (objJMMMedPrescriptionHist.Dispense.HasValue && objJMMMedPrescriptionHist.Dispense.Value > 0)
                        {
                            txtDispense.Text = objJMMMedPrescriptionHist.Dispense.HasValue ? objJMMMedPrescriptionHist.Dispense.Value.ToString() : String.Empty;
                        }
                        else
                        {
                            txtDispense.Text = string.Empty;
                        }

                        cddDispense.KPISelectedCodeValue = objJMMMedPrescriptionHist.MedicationType;

                        if (objJMMMedPrescriptionHist.LastAdministeredDttm.HasValue)
                        {
                            dttmLstAdministered.DateValue = objJMMMedPrescriptionHist.LastAdministeredDttm.Value;
                        }
                        else
                        {
                            if (dttmLstAdministered.DateValue == DateTime.MinValue)
                            {
                                dttmLstAdministered.DateValue = new JMMMedPrescriptionHistBL().GetLastAdministeredDttm(ref objJMMMedPrescriptionHist);
                            }
                        }
                        if (objJMMMedPrescriptionHist.ActivityDttm.HasValue)
                        {
                            dttmDateTime.DateValue = objJMMMedPrescriptionHist.ActivityDttm.Value;
                        }
                        if (objJMMMedPrescriptionHist.MarPFID.HasValue)
                        {
                            lupPFNo.KPIID = objJMMMedPrescriptionHist.MarPFID.Value;
                        }
                        cddMethodAdmin.KPISelectedCodeValue = objJMMMedPrescriptionHist.MethodAdministered;
                        cddStatus.KPISelectedCodeValue      = objJMMMedPrescriptionHist.Status;
                        if (objJMMMedPrescriptionHist.MarPFSignID.HasValue)
                        {
                            hdnMarSignId.Value = objJMMMedPrescriptionHist.MarPFSignID.ToString();
                            imgMedSignature.GenerateImage(true, ImgType.Signature, ImgRefType.JMMMarInmateOfficer, objJMMMedPrescriptionHist.MarPFSignID.Value, short.MinValue);
                        }
                        else
                        {
                            hdnMarSignId.Value = string.Empty;
                        }

                        txtInstructions.Text = objJMMMedPrescriptionHist.Instructions;
                    }
                }
                catch (Exception objError)
                {
                    ShowMsg(MsgType.Error, FrwkMsg.OP_FAIL, objError);
                }
            }
            else
            {
                hdnMode.Value = UIMode.ADD.ToString();
                txtDrug.Text  = Request.QueryString.Get("Drug") == null ? string.Empty : Request.QueryString.Get("Drug").Trim();

                if (!String.IsNullOrWhiteSpace(txtDrug.Text))
                {
                    txtDrug.Text = new CodedBL().GetCodeDescription(6007, txtDrug.Text, KPIHlp.CVI32(hdnJurisId.Value));
                }

                txtDosage.Text = Request.QueryString.Get("Dosage") == null?string.Empty: Request.QueryString.Get("Dosage").Trim();
                //txtBalance.Text = Request.QueryString.Get("CurQuantity") == null ? string.Empty : Request.QueryString.Get("CurQuantity").Trim();

                JMMMedPrescriptionHist objJMMMedPrescriptionHist = new JMMMedPrescriptionHist();
                objJMMMedPrescriptionHist.JMMedPrescriptionID = KPIHlp.CVI64(hdnPrescriptionID.Value);
                txtBalance.Text = new JMMMedPrescriptionHistBL().GetMedicationBalance(ref objJMMMedPrescriptionHist).ToString();

                hdnPrescriptionID.Value = Request.QueryString.Get("JMMedPrescriptionID") == null ? string.Empty : Request.QueryString.Get("JMMedPrescriptionID").Trim();
                JMBookingID             = Request.QueryString.Get("JMBookingID") == null ? long.MinValue : KPIHlp.CVI64(Request.QueryString.Get("JMBookingID").Trim());


                lupPFNo.KPIID = State.sPFID;


                ReadAddMode();
            }
        }
Example #5
0
 protected void cddResults_PreRender(ref JMMMedVisit objMedVisit)
 {
     cddResults.DropDown.Items.Clear();
     cddResults.PopulateCombo();
 }