Exemplo n.º 1
0
        /// <summary>
        /// 撤消入院
        /// </summary>
        public void m_mthCancleInHospital()
        {
            if (this.m_objViewer.m_ucPatientInfo.RegisterID == "")
            {
                MessageBox.Show("请输入病人信息!", "撤消入院", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (this.m_objViewer.m_ucPatientInfo.BihPatient_VO.Status.ToString().Trim() == "3")
            {
                MessageBox.Show("该病人已经出院!", "撤消入院", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (this.m_objViewer.m_ucPatientInfo.Status == -1)
            {
                MessageBox.Show("该病人已经撤消入院!", "撤消入院", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            //bool hasNotExcOrder;
            clsDclBihLeaHos leaHosDomain = new clsDclBihLeaHos();
            //检查是否存在尚为执行的临嘱
            int count;

            long l = leaHosDomain.m_lngGetNotStopOrderByRegID(this.m_objViewer.m_ucPatientInfo.RegisterID, out count);

            if (count > 0)
            {
                if (MessageBox.Show(m_objViewer, "该病人有新开的医嘱,是否继续撤消入院操作?", "提示框", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
                {
                    return;
                }
            }

            if (this.m_objViewer.m_ucPatientInfo.BihPatient_VO.WaitChargeFee > 0 || this.m_objViewer.m_ucPatientInfo.BihPatient_VO.WaitClearFee > 0)
            {
                MessageBox.Show("有费用未清,不能撤消入院操作!", "撤消入院", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (this.m_objViewer.m_ucPatientInfo.BalancePrepayMoney > 0)
            {
                MessageBox.Show("有预交金未清,不能作撤消入院操作!", "撤消入院", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (MessageBox.Show("确认撤消入院么?", "撤消入院", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK)
            {
                p_objRrecord = new clsBIHpatientVO();
                p_objRrecord.m_strREGISTERID_CHR  = this.m_objViewer.m_ucPatientInfo.RegisterID;
                p_objRrecord.m_strINPATIENTID_CHR = this.m_objViewer.m_ucPatientInfo.BihPatient_VO.Zyh;
                p_objRrecord.m_strPSTATUS         = this.m_objViewer.m_ucPatientInfo.BihPatient_VO.Status.ToString().Trim();
                p_objRrecord.m_strRemark          = m_objViewer.m_txtRemark.Text.Trim();
                //p_objRrecord.m_strINPATIENTCOUNT_INT = this.m_objViewer.m_ucPatientInfo.BihPatient_VO.InsuredZycs.ToString();
                p_objRrecord.m_strINPATIENTCOUNT_INT  = this.m_objViewer.m_ucPatientInfo.BihPatient_VO.Zycs.ToString();//住院次数
                p_objRrecord.m_strPATIENTID_CHR       = this.m_objViewer.m_ucPatientInfo.BihPatient_VO.PatientID;
                p_objRrecord.m_strINPATIENTNOTYPE_INT = this.m_objViewer.m_ucPatientInfo.BihPatient_VO.InType;
                try
                {
                    p_objRrecord.m_strOpearID = m_objViewer.LoginInfo.m_strEmpID;
                    if (p_objRrecord.m_strOpearID == "" || p_objRrecord.m_strOpearID == null)
                    {
                        p_objRrecord.m_strOpearID = "0000001";
                    }
                    long lngRes = m_objManage.m_lngCancleBeInHospital(p_objRrecord);
                    if (lngRes > 0)
                    {
                        MessageBox.Show("撤消入院成功!", "撤消入院", MessageBoxButtons.OK, MessageBoxIcon.Information);

                        this.m_objViewer.m_ucPatientInfo.m_mthReset();
                        //this.m_objViewer.cmdCancle.Enabled = false;
                        m_mthClearControl();
                        decBalance       = 0;
                        decUnclearCharge = 0;
                        p_objRrecord     = null;
                    }
                    else
                    {
                        MessageBox.Show("撤消入院失败!", "撤消入院", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        m_mthGetBIHPatientInfo(p_objRrecord.m_strREGISTERID_CHR);
                    }
                }
                catch (Exception e)
                {
                    MessageBox.Show(e.Message, "撤消入院", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    m_mthGetBIHPatientInfo(p_objRrecord.m_strREGISTERID_CHR);
                }
            }
        }