Exemplo n.º 1
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;
            }
        }
Exemplo n.º 2
0
        protected void InquiryChg(ref JMMDentistVisit objJMMDentistVisit) //long DenVistID, long NameCtrlID
        {
            objJMMDentistVisit = new JMMDentistVisitBL().Select(objJMMDentistVisit.JMDentistVisitID.Value);

            try
            {
                KPITrace.Debug(TraceWeight.Five, "Retrieving DentistHistory info from DB for DenVistID - " + objJMMDentistVisit.JMDentistVisitID.Value);

                NamCtrlSPIN.KPIID = objJMMDentistVisit.InmateNameID.Value;

                if (objJMMDentistVisit != null)
                {
                    dttmDentalVisitReq.DateValue = objJMMDentistVisit.DentalReqDttm.Value;
                    if (objJMMDentistVisit.RequestedBy.Value.ToString() == "1")
                    {
                        chkInmateSubmitionForm.SelectedValue = objJMMDentistVisit.RequestedBy.Value.ToString();

                        lblReceivedBy.Text = "Received By&nbsp;";
                    }
                    else if (objJMMDentistVisit.RequestedBy.Value.ToString() == "2")
                    {
                        chkInmateSubmitionForm.SelectedValue = objJMMDentistVisit.RequestedBy.Value.ToString();
                        lblReceivedBy.Text = "Requested By&nbsp;";
                    }


                    LupReceivedBy.KPIID = objJMMDentistVisit.ReceivedByPFID.Value;


                    dttmDentalVisitDate.DateValue = KPIHlp.GVDttm(objJMMDentistVisit.VisitDttm == DateTime.MinValue, objJMMDentistVisit.VisitDttm);

                    if (objJMMDentistVisit.IsDoctor.HasValue)
                    {
                        if (objJMMDentistVisit.IsDoctor.Value.ToString() == "2")
                        {
                            trAttendNurse.Style.Add("display", "");
                            trAttendDoctor.Style.Add("display", "none");
                            rdoDoctorNurse.SelectedValue = objJMMDentistVisit.IsDoctor.Value.ToString();
                            if (objJMMDentistVisit.DoctorID.HasValue)
                            {
                                lupAttendingNurse.KPIID = objJMMDentistVisit.DoctorID.Value;
                            }
                        }
                        else if (objJMMDentistVisit.IsDoctor.Value.ToString() == "1")
                        {
                            trAttendNurse.Style.Add("display", "none");
                            trAttendDoctor.Style.Add("display", "");
                            if (objJMMDentistVisit.DoctorID.HasValue)
                            {
                                lupAttendingDoctor.KPIID = objJMMDentistVisit.DoctorID.Value;
                            }
                            rdoDoctorNurse.SelectedValue = objJMMDentistVisit.IsDoctor.Value.ToString();
                        }
                    }

                    cddLocation.KPISelectedCodeValue = objJMMDentistVisit.DoctorLocation;

                    txtDentalProblem.Text = objJMMDentistVisit.DentalProblem;

                    #region for Dental visit #
                    if (objJMMDentistVisit.DentalVisitNo.HasValue && objJMMDentistVisit.DentalVisitNo.Value != long.MinValue)
                    {
                        NumCrtlDentalNo.KPIID = objJMMDentistVisit.DentalVisitNo.Value;

                        String[] DentalVisitNo = Counter.GetFormattedNo(CounterType.JailBookingNo, objJMMDentistVisit.DentalVisitNo.Value.ToString()).Split('-');

                        NumCrtlDentalNo.txtYear.Text   = Convert.ToString(DentalVisitNo[0]);
                        NumCrtlDentalNo.txtNumber.Text = Convert.ToString(DentalVisitNo[1]);


                        hdnDentalVisitNo.Value = objJMMDentistVisit.DentalVisitNo.ToString();
                    }

                    #endregion

                    if (hdnMode.Value == UIMode.CHG.ToString())
                    {
                        pnlUsrCntrls.Visible = true;
                        AddClientOnLoadScript("try{window.resizeTo(1100, 860);}catch(e){}");
                    }

                    AddClientOnLoadScript("fn_Notes(" + objJMMDentistVisit.JMDentistVisitID.Value + ");");
                    AddClientOnLoadScript("nEnable('cmdEditor',5);");


                    DataSet objDS = new DataSet();
                    objDS = new JMMDentistVisitDB().GetToothDetails(objJMMDentistVisit.JMDentistVisitID.Value, objJMMDentistVisit.JurisID.Value);
                    grdTooth.DataSource = objDS;
                    grdTooth.DataBind();
                }
            }
            catch (Exception)
            {
                throw;
            }
        }