Esempio n. 1
0
        public long m_lngDoUpdPatientPayTypeByID(clstPatientPaytype_VO p_objResultArr)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.HIS.clsRegChargeTypeSvc objSvc =
                (com.digitalwave.iCare.middletier.HIS.clsRegChargeTypeSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsRegChargeTypeSvc));
            lngRes = objSvc.m_lngDoUpdPatientPayTypeByID(objPrincipal, p_objResultArr);
            objSvc.Dispose();
            return(lngRes);
        }
Esempio n. 2
0
        public long m_lngAddPatientPayType(clstPatientPaytype_VO objResult, out string strID)
        {
            long lngRes = 0;

            com.digitalwave.iCare.middletier.HIS.clsRegChargeTypeSvc objSvc =
                (com.digitalwave.iCare.middletier.HIS.clsRegChargeTypeSvc)com.digitalwave.iCare.common.clsObjectGenerator.objCreatorObjectByType(typeof(com.digitalwave.iCare.middletier.HIS.clsRegChargeTypeSvc));
            lngRes = objSvc.m_lngAddNewPatientPayType(objPrincipal, objResult, out strID);
            objSvc.Dispose();
            return(lngRes);
        }
Esempio n. 3
0
        public long m_lngFindPatientPayTypeList(System.Security.Principal.IPrincipal p_objPrincipal, out clstPatientPaytype_VO[] p_objResultArr)
        {
            p_objResultArr = new clstPatientPaytype_VO[0];
            long lngRes = 0;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsLisDeviceSvc", "m_lngFindPatientPayTypeList");
            if (lngRes < 0)
            {
                return(-1);
            }
            string strSQL = @"SELECT p.*,PLANNAME_CHR FROM t_bse_patientPaytype p  left join T_AID_INSPLAN i on p.COPAYID_CHR =i.PLANID_CHR  order by PAYTYPENO_VCHR";

            try
            {
                DataTable dtbResult = new DataTable();
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtbResult);
                objHRPSvc.Dispose();
                if (lngRes > 0 && dtbResult.Rows.Count > 0)
                {
                    p_objResultArr = new clstPatientPaytype_VO[dtbResult.Rows.Count];
                    for (int i1 = 0; i1 < p_objResultArr.Length; i1++)
                    {
                        p_objResultArr[i1] = new clstPatientPaytype_VO();
                        p_objResultArr[i1].m_strPAYTYPEID_CHR           = dtbResult.Rows[i1]["PAYTYPEID_CHR"].ToString().Trim();
                        p_objResultArr[i1].m_strPAYTYPENAME_VCHR        = dtbResult.Rows[i1]["PAYTYPENAME_VCHR"].ToString().Trim();
                        p_objResultArr[i1].m_strMEMO_VCHR               = dtbResult.Rows[i1]["MEMO_VCHR"].ToString().Trim();
                        p_objResultArr[i1].m_strPAYLIMIT_MNY            = dtbResult.Rows[i1]["PAYLIMIT_MNY"].ToString().Trim();
                        p_objResultArr[i1].m_strPAYFLAG_DEC             = dtbResult.Rows[i1]["PAYFLAG_DEC"].ToString().Trim();
                        p_objResultArr[i1].m_strPAYPERCENT_DEC          = dtbResult.Rows[i1]["PAYPERCENT_DEC"].ToString().Trim();
                        p_objResultArr[i1].m_strPAYTYPENO_VCHR          = dtbResult.Rows[i1]["PAYTYPENO_VCHR"].ToString().Trim();
                        p_objResultArr[i1].m_strISUSING_NUM             = dtbResult.Rows[i1]["ISUSING_NUM"].ToString().Trim();
                        p_objResultArr[i1].m_strCOPAYID_CHR             = dtbResult.Rows[i1]["PLANNAME_CHR"].ToString().Trim();
                        p_objResultArr[i1].m_strCHARGEPERCENT_DEC       = dtbResult.Rows[i1]["CHARGEPERCENT_DEC"].ToString().Trim();
                        p_objResultArr[i1].m_intINTERNALFLAG_INT        = Convert.ToInt16(dtbResult.Rows[i1]["INTERNALFLAG_INT"].ToString().Trim());
                        p_objResultArr[i1].m_strCOALITIONRECIPEFLAG_INT = dtbResult.Rows[i1]["COALITIONRECIPEFLAG_INT"].ToString().Trim();
                        p_objResultArr[i1].m_strBIHLIMITRATE_DEC        = dtbResult.Rows[i1]["BIHLIMITRATE_DEC"].ToString().Trim();
                    }
                }
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 4
0
        public void m_lngSavePatientPayType()
        {
            double db = Math.Ceiling(double.Parse(m_objViewer.textBoxTypedNumeric1.Text.Trim()));

            if (db.ToString().Length > 8)
            {
                MessageBox.Show("住院费用下限输入的值过大!!", "Icare", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }
            if (m_objViewer.m_txtName.Text.Trim() == "")
            {
                m_ephHandler.m_mthAddControl(m_objViewer.m_txtName);
                m_ephHandler.m_mthShowControlsErrorProvider();
                m_ephHandler.m_mthClearControl();
                m_objViewer.m_txtName.Focus();
                return;
            }
            if (m_objViewer.m_txtPayMilite.Text.Trim() == "")
            {
                m_objViewer.m_txtPayMilite.Text = "0";
            }

            if (m_objViewer.m_txtPAYPERCENT_DEC.Text.Trim() == "")
            {
                m_objViewer.m_txtPAYPERCENT_DEC.Text = "0";
            }
            if (m_objViewer.m_txtCHARGEPERCENT_DEC.Text.Trim() == "" || m_objViewer.m_txtCHARGEPERCENT_DEC.Text.Trim() == null)
            {
                m_objViewer.m_txtCHARGEPERCENT_DEC.Text = "0";
            }
            if (Convert.ToDouble(m_objViewer.m_txtPayMilite.Text.Trim()) >= 1000000)
            {
                m_ephHandler.m_mthAddControl(m_objViewer.m_txtPayMilite);
                m_ephHandler.m_mthShowControlsErrorProvider();
                m_ephHandler.m_mthClearControl();
                m_objViewer.m_txtPayMilite.Focus();
                m_objViewer.m_txtPayMilite.SelectAll();
                return;
            }
            if (Convert.ToDouble(m_objViewer.m_txtPAYPERCENT_DEC.Text.Trim()) > 100)
            {
                m_ephHandler.m_mthAddControl(m_objViewer.m_txtPAYPERCENT_DEC);
                m_ephHandler.m_mthShowControlsErrorProvider();
                m_ephHandler.m_mthClearControl();
                m_objViewer.m_txtPAYPERCENT_DEC.Focus();
                m_objViewer.m_txtPAYPERCENT_DEC.SelectAll();
                return;
            }
            if (Convert.ToDouble(m_objViewer.m_txtCHARGEPERCENT_DEC.Text.Trim()) > 100)
            {
                m_ephHandler.m_mthAddControl(m_objViewer.m_txtCHARGEPERCENT_DEC);
                m_ephHandler.m_mthShowControlsErrorProvider();
                m_ephHandler.m_mthClearControl();
                m_objViewer.m_txtCHARGEPERCENT_DEC.Focus();
                m_objViewer.m_txtCHARGEPERCENT_DEC.SelectAll();
                return;
            }

            long   lngRes = 0;
            string strID  = "";
            clstPatientPaytype_VO objResult = new clstPatientPaytype_VO();

            objResult.m_strPAYTYPENAME_VCHR = m_objViewer.m_txtName.Text.Trim();
            objResult.m_strMEMO_VCHR        = m_objViewer.m_txtMemo.Text.Trim();
            if (m_objViewer.checkBox1.Checked)
            {
                objResult.m_strCOALITIONRECIPEFLAG_INT = "1";
            }
            else
            {
                objResult.m_strCOALITIONRECIPEFLAG_INT = "0";
            }
            objResult.m_strPAYLIMIT_MNY = m_objViewer.m_txtPayMilite.Text.Trim();
            if (m_objViewer.m_cboPAYFLAG_DEC.Text.Trim() == "公共")
            {
                objResult.m_strPAYFLAG_DEC = "0";
            }
            else if (m_objViewer.m_cboPAYFLAG_DEC.Text.Trim() == "门诊")
            {
                objResult.m_strPAYFLAG_DEC = "1";
            }
            else if (m_objViewer.m_cboPAYFLAG_DEC.Text.Trim() == "住院")
            {
                objResult.m_strPAYFLAG_DEC = "2";
            }
            else
            {
                objResult.m_strPAYFLAG_DEC = "0";
            }
            switch (this.m_objViewer.m_cobType.Text.Trim())
            {
            case "普通":
                objResult.m_intINTERNALFLAG_INT = 0;
                break;

            case "公费":
                objResult.m_intINTERNALFLAG_INT = 1;
                break;

            case "医保":
                objResult.m_intINTERNALFLAG_INT = 2;
                break;

            case "特困":
                objResult.m_intINTERNALFLAG_INT = 3;
                break;

            case "离休":
                objResult.m_intINTERNALFLAG_INT = 4;
                break;

            case "本院":
                objResult.m_intINTERNALFLAG_INT = 5;
                break;
            }
            objResult.m_strPAYPERCENT_DEC    = m_objViewer.m_txtPAYPERCENT_DEC.Text.Trim();
            objResult.m_strPAYTYPENO_VCHR    = m_objViewer.m_txtPAYTYPENO_VCHR.Text.Trim();
            objResult.m_strCHARGEPERCENT_DEC = m_objViewer.m_txtCHARGEPERCENT_DEC.Text.Trim();
            objResult.m_strCOPAYID_CHR       = m_objViewer.m_cboCOPAYID_CHR.m_strGetID(m_objViewer.m_cboCOPAYID_CHR.SelectedIndex);
            objResult.m_strBIHLIMITRATE_DEC  = m_objViewer.textBoxTypedNumeric1.Text.Trim();
            if (m_objViewer.m_txtName.Tag == null)          //新增
            {
                for (int i = 0; i < m_objViewer.m_lvw.Items.Count; i++)
                {
                    if (m_objViewer.m_lvw.Items[i].SubItems[2].Text.Trim() == m_objViewer.m_txtName.Text.Trim())
                    {
                        MessageBox.Show("该身份名称已存在!", "提示");
                        m_ephHandler.m_mthAddControl(m_objViewer.m_txtName);
                        m_ephHandler.m_mthShowControlsErrorProvider();
                        m_ephHandler.m_mthClearControl();
                        m_objViewer.m_txtName.Focus();
                        m_objViewer.m_txtName.SelectAll();
                        return;
                    }

                    if (m_objViewer.m_lvw.Items[i].SubItems[1].Text.Trim() == m_objViewer.m_txtPAYTYPENO_VCHR.Text.Trim())
                    {
                        MessageBox.Show("该身份编号已存在!", "提示");
                        m_ephHandler.m_mthAddControl(m_objViewer.m_txtPAYTYPENO_VCHR);
                        m_ephHandler.m_mthShowControlsErrorProvider();
                        m_ephHandler.m_mthClearControl();
                        m_objViewer.m_txtPAYTYPENO_VCHR.Focus();
                        m_objViewer.m_txtPAYTYPENO_VCHR.SelectAll();
                        return;
                    }
                }

                lngRes = clsDomain.m_lngAddPatientPayType(objResult, out strID);
                int index = m_objViewer.m_lvw.Items.Count;
                if (lngRes > 0)
                {
                    //MessageBox.Show("保存成功!","提示");
                    ListViewItem lvw = new ListViewItem();
                    lvw.SubItems.Add(objResult.m_strPAYTYPENO_VCHR);
                    lvw.SubItems.Add(objResult.m_strPAYTYPENAME_VCHR);
                    lvw.SubItems.Add(objResult.m_strMEMO_VCHR);
                    lvw.SubItems.Add(objResult.m_strPAYLIMIT_MNY);
                    lvw.SubItems.Add(m_objViewer.m_cboPAYFLAG_DEC.Text);
                    lvw.SubItems.Add(objResult.m_strPAYPERCENT_DEC);
                    lvw.SubItems.Add("1");
                    lvw.SubItems.Add(objResult.m_strCHARGEPERCENT_DEC);
                    lvw.SubItems.Add(m_objViewer.m_cboCOPAYID_CHR.Text.Trim());
                    lvw.SubItems.Add(this.m_objViewer.m_cobType.Text.Trim());
                    if (this.m_objViewer.checkBox1.Checked)
                    {
                        lvw.SubItems.Add("1");
                    }
                    else
                    {
                        lvw.SubItems.Add("0");
                    }
                    lvw.SubItems.Add(objResult.m_strBIHLIMITRATE_DEC);
                    lvw.Tag = strID;
                    m_objViewer.m_lvw.Items.Add(lvw);
                    m_objViewer.m_lvw.Items[index].Selected = true;
                }
                else
                {
                    MessageBox.Show("保存失败!", "提示");
                }
            }
            else             //修改
            {
                if (m_objViewer.m_lvw.SelectedItems.Count <= 0)
                {
                    return;
                }
                for (int i = 0; i < m_objViewer.m_lvw.Items.Count; i++)
                {
                    if (i == m_objViewer.m_lvw.SelectedItems[0].Index)
                    {
                        continue;
                    }
                    if (m_objViewer.m_lvw.Items[i].SubItems[1].Text.Trim() == m_objViewer.m_txtPAYTYPENO_VCHR.Text.Trim())
                    {
                        MessageBox.Show("该身份编号已存在!", "提示");
                        m_ephHandler.m_mthAddControl(m_objViewer.m_txtPAYTYPENO_VCHR);
                        m_ephHandler.m_mthShowControlsErrorProvider();
                        m_ephHandler.m_mthClearControl();

                        m_objViewer.m_txtPAYTYPENO_VCHR.Focus();
                        m_objViewer.m_txtPAYTYPENO_VCHR.SelectAll();

                        return;
                    }

                    if (m_objViewer.m_lvw.Items[i].SubItems[2].Text.Trim() == m_objViewer.m_txtName.Text.Trim())
                    {
                        MessageBox.Show("该身份名称已存在!", "提示");
                        m_ephHandler.m_mthAddControl(m_objViewer.m_txtName);
                        m_ephHandler.m_mthShowControlsErrorProvider();
                        m_ephHandler.m_mthClearControl();

                        m_objViewer.m_txtName.Focus();
                        m_objViewer.m_txtName.SelectAll();

                        return;
                    }
                }

                objResult.m_strPAYTYPEID_CHR = m_objViewer.m_txtName.Tag.ToString();
                lngRes = clsDomain.m_lngDoUpdPatientPayTypeByID(objResult);
                if (lngRes > 0)
                {
                    MessageBox.Show("修改成功!", "提示");
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[1].Text  = objResult.m_strPAYTYPENO_VCHR;
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[2].Text  = objResult.m_strPAYTYPENAME_VCHR;
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[3].Text  = objResult.m_strMEMO_VCHR;
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[4].Text  = objResult.m_strPAYLIMIT_MNY;
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[5].Text  = m_objViewer.m_cboPAYFLAG_DEC.Text;
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[6].Text  = objResult.m_strPAYPERCENT_DEC;
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[8].Text  = objResult.m_strCHARGEPERCENT_DEC;
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[9].Text  = m_objViewer.m_cboCOPAYID_CHR.Text.Trim();
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[10].Text = this.m_objViewer.m_cobType.Text.Trim();
                    if (this.m_objViewer.checkBox1.Checked)
                    {
                        m_objViewer.m_lvw.SelectedItems[0].SubItems[11].Text = "1";
                    }
                    else
                    {
                        m_objViewer.m_lvw.SelectedItems[0].SubItems[11].Text = "0";
                    }
                    m_objViewer.m_lvw.SelectedItems[0].SubItems[12].Text = objResult.m_strBIHLIMITRATE_DEC;
                }
                else
                {
                    MessageBox.Show("修改失败!", "提示");
                }
            }
            m_objViewer.m_txtName.Text              = "";
            m_objViewer.m_txtMemo.Text              = "";
            m_objViewer.m_cboPAYFLAG_DEC.Text       = "自费";
            m_objViewer.m_txtPAYPERCENT_DEC.Text    = "";
            m_objViewer.m_txtPAYTYPENO_VCHR.Text    = "";
            m_objViewer.m_txtCHARGEPERCENT_DEC.Text = "";
            m_objViewer.textBoxTypedNumeric1.Text   = "";
            m_objViewer.m_cobType.Text              = "";
            m_objViewer.m_txtPayMilite.Text         = null;
            m_objViewer.m_txtName.Tag = null;
            m_objViewer.m_txtName.Focus();
        }
Esempio n. 5
0
        public long m_lngDoUpdPatientPayTypeByID(System.Security.Principal.IPrincipal p_objPrincipal, clstPatientPaytype_VO objResult)
        {
            long lngRes = 0;
            //权限类
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            //检查是否有使用些函数的权限
            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsRegChargeTypeSvc", "m_lngDoUpdPatientPayTypeByID");

            if (lngRes < 0)            //没有使用的权限
            {
                return(-1);
            }
            string strSQL = "UPDate t_bse_patientPaytype Set  " +
                            "PAYTYPENAME_VCHR='" + objResult.m_strPAYTYPENAME_VCHR + "' " +
                            ", MEMO_VCHR='" + objResult.m_strMEMO_VCHR + "' " +
                            ", PAYLIMIT_MNY='" + objResult.m_strPAYLIMIT_MNY + "' " +
                            ", PAYFLAG_DEC='" + objResult.m_strPAYFLAG_DEC + "' " +
                            ", PAYPERCENT_DEC='" + objResult.m_strPAYPERCENT_DEC + "' " +
                            ", PAYTYPENO_VCHR='" + objResult.m_strPAYTYPENO_VCHR + "' " +
                            ", COPAYID_CHR='" + objResult.m_strCOPAYID_CHR + "' " +
                            ", CHARGEPERCENT_DEC='" + objResult.m_strCHARGEPERCENT_DEC + "' " +
                            ", COALITIONRECIPEFLAG_INT='" + objResult.m_strCOALITIONRECIPEFLAG_INT + "' " +
                            ",INTERNALFLAG_INT=" + objResult.m_intINTERNALFLAG_INT +
                            ",BIHLIMITRATE_DEC=" + objResult.m_strBIHLIMITRATE_DEC +
                            "  Where PAYTYPEID_CHR='" + objResult.m_strPAYTYPEID_CHR + "' ";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.DoExcute(strSQL);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 6
0
        public long m_lngAddNewPatientPayType(System.Security.Principal.IPrincipal p_objPrincipal, clstPatientPaytype_VO objResult, out string p_strRecordID)
        {
            long lngRes = 0;

            p_strRecordID = "";
            //权限类
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            //检查是否有使用些函数的权限
            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsRegChargeTypeSvc", "m_lngAddNewPatientPayType");
            if (lngRes < 0)           //没有使用的权限
            {
                return(-1);
            }

            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
            //返回一最大的计划号
            lngRes = objHRPSvc.lngGenerateID(4, "PAYTYPEID_CHR", "t_bse_patientPaytype", out p_strRecordID);
            if (lngRes < 0)
            {
                return(lngRes);
            }

            string strSQL = @"INSERT INTO t_bse_patientPaytype (PAYTYPEID_CHR,PAYTYPENAME_VCHR,MEMO_VCHR,PAYLIMIT_MNY,PAYFLAG_DEC,PAYPERCENT_DEC,PAYTYPENO_VCHR,COPAYID_CHR,CHARGEPERCENT_DEC,INTERNALFLAG_INT,COALITIONRECIPEFLAG_INT,BIHLIMITRATE_DEC) VALUES ('" +
                            p_strRecordID + "','" + objResult.m_strPAYTYPENAME_VCHR + "','" + objResult.m_strMEMO_VCHR + "','" + objResult.m_strPAYLIMIT_MNY + "','" + objResult.m_strPAYFLAG_DEC + "','" + objResult.m_strPAYPERCENT_DEC + "','" +
                            objResult.m_strPAYTYPENO_VCHR + "','" + objResult.m_strCOPAYID_CHR + "','" +
                            objResult.m_strCHARGEPERCENT_DEC + "'," + objResult.m_intINTERNALFLAG_INT + "," + objResult.m_strCOALITIONRECIPEFLAG_INT + "," + objResult.m_strBIHLIMITRATE_DEC + ")";
            string strSQL2 = "insert into t_aid_InsChargeItem (PRECENT_DEC,ITEMID_CHR,COPAYID_CHR) " +
                             " select 100 as PRECENT_DEC, ItemID_chr,'" + p_strRecordID + "' as COPAYID_CHR from t_bse_ChargeItem ";

            try
            {
                lngRes = objHRPSvc.DoExcute(strSQL);
                lngRes = objHRPSvc.DoExcute(strSQL2);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }