private void SaveData()
        {
            string sUserName = Session["User"].ToString();

            oDAL   = new PatientEncounterDAL();
            oClass = new PatientEncounterModel();

            oClass.EncounterNo        = EncounterNo.Value;
            oClass.EncounterDate      = Convert.ToDateTime(EncounterDate.Value);
            oClass.PatientNo          = PatientNo.Value;
            oClass.EncounterType      = ServiceType.Value;
            oClass.InsuranceCompanyID = Convert.ToInt16(ddlCompany.SelectedValue);
            oClass.InsuranceNo        = InsuranceNo.Value;
            oClass.HospitalID         = 0;// Convert.ToInt16(ddlHospitalName.SelectedValue);
            oClass.PhysicianID        = Convert.ToInt16(ddlPhysician.SelectedValue);

            oClass.Remarks  = Remarks.InnerText;
            oClass.StatusID = Convert.ToInt16(ddlStatus.SelectedValue);

            string id = "";// EncounterID.Value;

            if (id == "")
            {
                oDAL.InsertData(sUserName, oClass);
                //lblMsg.Text = "New Record has been saved";
            }
            else
            {
                oClass.ID = Convert.ToInt16(id);
                oDAL.UpdateData(sUserName, oClass);
                // lblMsg.Text = "Record has been updated";
            }
        }
Beispiel #2
0
        private void SaveEncounterData()
        {
            string sUserName = Session["User"].ToString();

            oDAL   = new PatientEncounterDAL();
            oClass = new PatientEncounterModel();

            oClass.ID                 = Convert.ToInt16(EncounterID.Value);
            oClass.EncounterNo        = EncounterNo.Value;
            oClass.EncounterDate      = Convert.ToDateTime(EncounterDate.Value);
            oClass.PatientNo          = PatientNo.Value;
            oClass.EncounterType      = ServiceType.Value;
            oClass.InsuranceCompanyID = Convert.ToInt16(ddlCompany.SelectedValue);
            oClass.InsuranceNo        = InsuranceNo.Value;
            oClass.HospitalID         = 0;// Convert.ToInt16(ddlHospitalName.SelectedValue);
            oClass.PhysicianID        = Convert.ToInt16(ddlPhysician.SelectedValue);

            oClass.Remarks  = Remarks.InnerText;
            oClass.StatusID = Convert.ToInt16(ddlStatus.SelectedValue);

            oDAL.UpdateData(sUserName, oClass);

            PatientVitalsModel vitalModel = new PatientVitalsModel();
            PatientVitalsDAL   vitalDAL   = new PatientVitalsDAL();

            vitalModel.ID          = Convert.ToInt16(hfVitalsID.Value);
            vitalModel.PatientNo   = PatientNo.Value;
            vitalModel.EncounterNo = EncounterNo.Value;
            vitalModel.Temperature = VitalValue(txtTemperature.Value);
            vitalModel.Systolic    = VitalValue(txtSystolic.Value);
            vitalModel.Diastolic   = VitalValue(txtDiastolic.Value);
            vitalModel.PulseRate   = VitalValue(txtPulseRate.Value);
            vitalModel.Height      = VitalValue(txtHeight.Value);
            vitalModel.Weight      = VitalValue(txtWeight.Value);
            vitalModel.BloodSugar  = VitalValue(txtBloodSugar.Value);
            vitalModel.Notes       = txtOther.Value;

            vitalDAL.UpdateData(sUserName, vitalModel);

            PatientAssessmentModel assessmentModel = new PatientAssessmentModel();
            PatientAssessmentDAL   assessmentDAL   = new PatientAssessmentDAL();

            assessmentModel.ID             = Convert.ToInt16(hfAssessmentID.Value);
            assessmentModel.EncounterNo    = EncounterNo.Value;
            assessmentModel.PatientNo      = PatientNo.Value;
            assessmentModel.ChiefComplaint = txtCC.InnerText;
            assessmentModel.HPI            = txtHPI.InnerText;
            assessmentModel.ROS            = txtROS.InnerText;
            assessmentModel.PFSC           = txtPFSC.InnerText;
            assessmentModel.PhysicalExam   = txtPhysicalExam.InnerText;
            assessmentModel.PhysicianNote  = txtDoctorNote.InnerText;


            assessmentDAL.UpdateData(sUserName, assessmentModel);
        }