Exemple #1
0
        public long m_lngGetBedInfoByAreaID(System.Security.Principal.IPrincipal p_objPrincipal, string p_strAreaid_chr, string p_strStatus, out clsT_Bse_Bed_VO[] p_objResultArr, bool seach)
        {
            p_objResultArr = new clsT_Bse_Bed_VO[0];
            long lngRes = 0;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsBedManageSvc", "m_lngGetBedInfo");
            if (lngRes < 0)
            {
                return(-1);
            }

            string strSQL = "";

            strSQL = @"
                    SELECT    a.bedid_chr,a.code_chr,a.areaid_chr,b.lastname_vchr,b.sex_chr     
                    FROM t_bse_bed a,t_opr_bih_registerdetail b,t_opr_bih_register c
                    where a.bihregisterid_chr = c.registerid_chr
                    and b.registerid_chr = c.registerid_chr
                    and a.status_int = 2
                    and c.pstatus_int= 1 and c.areaid_chr='[areaid_chr]' AND a.status_int = [p_strStatus]
                    order by a.bedid_chr";
            strSQL = strSQL.Replace("[areaid_chr]", p_strAreaid_chr.Trim());
            strSQL = strSQL.Replace("[p_strStatus]", p_strStatus.Trim());

            try
            {
                DataTable dtbResult = new DataTable();
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = 0;
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtbResult);
                objHRPSvc.Dispose();
                if (lngRes > 0 && dtbResult.Rows.Count > 0)
                {
                    p_objResultArr = new clsT_Bse_Bed_VO[dtbResult.Rows.Count];
                    for (int i1 = 0; i1 < p_objResultArr.Length; i1++)
                    {
                        p_objResultArr[i1] = new clsT_Bse_Bed_VO();
                        p_objResultArr[i1].m_strBEDID_CHR   = dtbResult.Rows[i1]["BEDID_CHR"].ToString().Trim();
                        p_objResultArr[i1].m_strAREAID_CHR  = dtbResult.Rows[i1]["AREAID_CHR"].ToString().Trim();
                        p_objResultArr[i1].m_strCODE_CHR    = dtbResult.Rows[i1]["CODE_CHR"].ToString().Trim();
                        p_objResultArr[i1].m_strPatientSex  = dtbResult.Rows[i1]["sex_chr"].ToString().Trim();
                        p_objResultArr[i1].m_strPatientName = dtbResult.Rows[i1]["lastname_vchr"].ToString().Trim();
                    }
                }
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Exemple #2
0
        private void m_cmdOk_Click(object sender, EventArgs e)
        {
            clsT_Bse_Bed_VO bedVO = (clsT_Bse_Bed_VO)this.m_cmbBed.SelectedItem;

            this.m_strBedId = bedVO.m_strGetBedID;

            string strAsk = "确定将" + this.m_lbName.Text + " 转到" + this.m_cmbBed.Text + "床吗?";

            if (MessageBox.Show(strAsk, "提示框", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
            {
                return;
            }

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Exemple #3
0
        /// <summary>
        /// 修改床位信息
        /// </summary>
        /// <param name="p_strBEDID_CHR">流水号</param>
        /// <param name="p_objRecord"></param>
        /// <returns></returns>
        public long m_lngModifyBedInfoByVo(string p_strBEDID_CHR, clsT_Bse_Bed_VO p_objRecord)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.HIS.clsBedManageSvc objSvc =
                (com.digitalwave.iCare.middletier.HIS.clsBedManageSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsBedManageSvc));
            try
            {
                lngRes = objSvc.m_lngModifyBedInfoByVo(objPrincipal, p_strBEDID_CHR, p_objRecord);
            }
            catch
            {
                return(0);
            }
            objSvc.Dispose();
            return(lngRes);
        }
Exemple #4
0
        /// <summary>
        /// 查询某病区号的所有病床信息
        /// </summary>
        /// <param name="p_strAreaid_chr">病区号</param>
        /// <param name="p_objResultArr"></param>
        /// <returns></returns>
        public long m_lngGetBedInfoByAreaID(string p_strAreaid_chr, out clsT_Bse_Bed_VO[] p_objResultArr)
        {
            long lngRes = 0;

            p_objResultArr = new clsT_Bse_Bed_VO[0];
            com.digitalwave.iCare.middletier.HIS.clsBedManageSvc objSvc =
                (com.digitalwave.iCare.middletier.HIS.clsBedManageSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsBedManageSvc));
            try
            {
                lngRes = objSvc.m_lngGetBedInfoByAreaID(objPrincipal, p_strAreaid_chr, out p_objResultArr);
            }
            catch
            {
                return(0);
            } objSvc.Dispose();
            return(lngRes);
        }
Exemple #5
0
        /// <summary>
        /// 控件赋值给Vo  {加床}
        /// </summary>
        /// <param name="p_objRecord"></param>
        private void ValueToVoForAddBed(out clsT_Bse_Bed_VO p_objRecord)
        {
            p_objRecord = new clsT_Bse_Bed_VO();
            p_objRecord.m_strBEDID_CHR    = (string)m_objViewer.m_txtCODE_CHR.Tag;
            p_objRecord.m_strAREAID_CHR   = m_objViewer.m_strAreaID;
            p_objRecord.m_strCODE_CHR     = m_objViewer.m_txtCODE_CHR.Text.Trim();
            p_objRecord.m_intSTATUS_INT   = m_objViewer.m_cboSTATUS_INT.SelectedIndex;
            p_objRecord.m_intSEX_INT      = m_objViewer.m_cboSEX_INT.SelectedIndex + 1;
            p_objRecord.m_intCATEGORY_INT = m_objViewer.m_cboCATEGORY_INT.SelectedIndex;
            if (m_objViewer.m_txtBedMoney.Text.Trim() != "" && m_objViewer.m_txtBedMoney.Tag != null)
            {
                p_objRecord.m_strCHARGEITEMID_CHR = (string)m_objViewer.m_txtBedMoney.Tag;
            }
            if (m_objViewer.m_txtAirCondistionMoney.Text.Trim() != "" && m_objViewer.m_txtAirCondistionMoney.Tag != null)
            {
                p_objRecord.m_str_AIRCHARGEITEMID_CHR = (string)m_objViewer.m_txtAirCondistionMoney.Tag;
            }
            if (m_objViewer.m_txtBedMoney.Text.Trim() != "" && m_objViewer.m_txtBedMoney.m_listView.SelectedItems.Count > 0)
            {
                m_dubBedCharge = Convert.ToDouble(m_objViewer.m_txtBedMoney.m_listView.SelectedItems[0].SubItems[5].Text);
            }
            if (m_objViewer.m_txtAirCondistionMoney.Text.Trim() != "" && m_objViewer.m_txtAirCondistionMoney.m_listView.SelectedItems.Count > 0)
            {
                m_dubAirCharge = Convert.ToDouble(m_objViewer.m_txtAirCondistionMoney.m_listView.SelectedItems[0].SubItems[5].Text);
            }

            if (m_objViewer.m_txtBedMoney.Text.Trim() == "")
            {
                m_dubBedCharge = 0;
            }
            if (m_objViewer.m_txtAirCondistionMoney.Text.Trim() == "")
            {
                m_dubAirCharge = 0;
            }
            p_objRecord.m_dblRATE_MNY    = m_dubBedCharge;
            p_objRecord.m_dblAIRRATE_MNY = m_dubAirCharge;
        }
Exemple #6
0
        /// <summary>
        /// 安排床位
        /// </summary>
        public void m_mthArrangeBed()
        {
            if (m_objViewer.m_cmbBed.SelectedItem == null)
            {
                MessageBox.Show("床位为必选项!", "安排床位", MessageBoxButtons.OK, MessageBoxIcon.Information);
                m_objViewer.m_cmbBed.Focus();
                return;
            }

            if (m_objViewer.m_lsvPatientInfo.SelectedItems.Count < 1)
            {
                MessageBox.Show("病人为必选项!", "安排床位", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            if (m_objViewer.m_txtMaindoctor.Value == null)
            {
                MessageBox.Show("主治医生为必选项!", "安排床位", MessageBoxButtons.OK, MessageBoxIcon.Information);
                m_objViewer.m_txtMaindoctor.Focus();
                return;
            }

            if (m_objViewer.m_cboSTATE_INT.SelectedIndex == 0)
            {
                MessageBox.Show("病情不能为空!", "安排床位", MessageBoxButtons.OK, MessageBoxIcon.Information);
                m_objViewer.m_cboSTATE_INT.Focus();
                return;
            }

            clsT_Bse_Bed_VO bedVO = (clsT_Bse_Bed_VO)m_objViewer.m_cmbBed.SelectedItem;

            string strSex = m_objViewer.m_lsvPatientInfo.SelectedItems[0].SubItems[3].Text.Trim();

            if (bedVO.m_strSexName != "不限" && strSex != bedVO.m_strSexName)
            {
                if (MessageBox.Show("您确定将此" + strSex + "病人转到" + bedVO.m_strSexName + "病床吗?", "安排床位", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No)
                {
                    return;
                }
            }

            clsT_Opr_Bih_Transfer_VO p_objRecord = new clsT_Opr_Bih_Transfer_VO();

            p_objRecord.m_strTARGETDEPTID_CHR = m_objViewer.m_strDeptID;
            p_objRecord.m_strTARGETAREAID_CHR = m_objViewer.m_strAreaID;
            p_objRecord.m_strTARGETBEDID_CHR  = bedVO.m_strBEDID_CHR;
            p_objRecord.m_strREGISTERID_CHR   = (string)m_objViewer.m_lsvPatientInfo.SelectedItems[0].Tag;

            p_objRecord.m_strDES_VCHR         = m_objViewer.m_txtMaindoctor.Value;
            p_objRecord.m_strOPERATORID_CHR   = m_objViewer.LoginInfo.m_strEmpID;
            p_objRecord.m_strHisInpatientDate = m_objViewer.m_inAreaDate.Text;

            clsT_Opr_Bih_Register_VO objRegVO = new clsT_Opr_Bih_Register_VO();

            objRegVO.m_strREGISTERID_CHR = p_objRecord.m_strREGISTERID_CHR;
            objRegVO.m_intSTATE_INT      = this.m_objViewer.m_cboSTATE_INT.SelectedIndex;
            objRegVO.m_strOPERATORID_CHR = this.m_objViewer.LoginInfo.m_strEmpID;
            objRegVO.m_strCASEDOCTOR_CHR = p_objRecord.m_strDES_VCHR = m_objViewer.m_txtMaindoctor.Value;

            if (this.m_objViewer.m_txtNurse.Value != null)
            {
                objRegVO.m_strNurseOrderdic = this.m_objViewer.m_txtNurse.Value;

                if (this.m_objViewer.m_txtNurse.Text.Contains("特级"))
                {
                    objRegVO.m_intNursingClass = 0;
                }
                else if (this.m_objViewer.m_txtNurse.Text.Contains("一级"))
                {
                    objRegVO.m_intNursingClass = 1;
                }
                else if (this.m_objViewer.m_txtNurse.Text.Contains("二级"))
                {
                    objRegVO.m_intNursingClass = 2;
                }
                else if (this.m_objViewer.m_txtNurse.Text.Contains("三级"))
                {
                    objRegVO.m_intNursingClass = 3;
                }
            }
            else
            {
                objRegVO.m_strNurseOrderdic = "";
            }

            if (this.m_objViewer.m_txtEat.Value != null)
            {
                objRegVO.m_strEatOrderdic = this.m_objViewer.m_txtEat.Value;
            }
            else
            {
                objRegVO.m_strEatOrderdic = "";
            }

            try
            {
                long lngRes = m_objManage.m_lngArrangeBed(p_objRecord, objRegVO);
                if (lngRes > 0)
                {
                    MessageBox.Show("转入成功!", "安排床位", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);

                    if ((new clsDcl_BedAdmin()).IsYbReg(p_objRecord.m_strREGISTERID_CHR))
                    {
                        frmYBRegisterZY frmYb = new frmYBRegisterZY();
                        frmYb.IsNurseModify = true;
                        frmYb.strRegisterId = p_objRecord.m_strREGISTERID_CHR;
                        frmYb.ShowDialog();
                    }

                    m_mthGetEmptyBed();
                    m_objViewer.m_lsvPatientInfo.SelectedItems[0].Remove();
                    if (m_objViewer.m_lsvPatientInfo.Items.Count > 0)
                    {
                        m_objViewer.m_lsvPatientInfo.Items[0].Selected = true;
                    }
                    m_objViewer.m_intFlag = 1;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "!", "安排床位失败", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                m_mthGetEmptyBed();
                m_mthGetTurnInNotAccept();
            }
        }