Esempio n. 1
0
        public long m_mthGetManiReportData(System.Security.Principal.IPrincipal p_objPrincipal, DateTime date, DateTime date2, out System.Data.DataTable dt, out System.Data.DataTable dt2)
        {
            dt  = new DataTable();
            dt2 = new DataTable();
            long lngRes = 0;

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

            //检查是否有使用些函数的权限
            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsReckoningReport", "m_lngFindByDateReport");
            if (lngRes < 0)            //没有使用的权限
            {
                return(-1);
            }
            //and a.RECORDEMP_CHR=d.empid_chr(+)
            string strSQL = "select a.OUTPATRECIPEID_CHR,c.lastname_vchr PatientName,a.CREATEDATE_DAT \"" + "date" + "\"" + @",e.invoiceno_vchr invoiceNo,c.difficulty_vchr difficultyNo,case when A.RECIPEFLAG_INT=1 then 5.00 else 0 end as RegisterCost,'' CheckSelfPay,
'' CheckChargeUp,'' CureSelfPay,'' CureChargeUp,'' MedicineSelfPay, '' MedicineChargeUp,d.lastname_vchr Operator,a.RECIPEFLAG_INT,e.STATUS_INT,e.seqid_chr
 from T_OPR_OUTPATIENTRECIPE A,T_BSE_PATIENT c,T_BSE_EMPLOYEE D,T_OPR_OUTPATIENTRECIPEINV E, t_bse_patientPaytype f
where a.PSTAUTS_INT =2
    and a.paytypeid_chr=f.paytypeid_chr(+)
    and f.INTERNALFLAG_INT =3
and a.CREATEDATE_DAT BETWEEN TO_DATE('" + date.ToString("yyyy-MM-dd 00:00:00") + "','yyyy-mm-dd hh24:mi:ss') " +
                            @" AND TO_DATE('" + date2.ToString("yyyy-MM-dd 23:59:59") + @"','yyyy-mm-dd hh24:mi:ss')
and a.patientid_chr =c.patientid_chr(+)
AND e.OPREMP_CHR = d.empid_chr(+)
and a.outpatrecipeid_chr=e.OUTPATRECIPEID_CHR(+)    and e.balanceflag_int=1";
            string strSQL2 = @"select A.OUTPATRECIPEID_CHR,a.SELFPAY,a.CHARGEUP,b.GROUPID_CHR,a.SEQID_CHR from (
select a.outpatrecipeid_chr,sum(b.tolprice_mny*b.discount_dec) as SelfPay,sum(b.tolprice_mny*(1-b.discount_dec)) as chargeUp,C.ITEMOPINVTYPE_CHR,e.SEQID_CHR
from T_OPR_OUTPATIENTRECIPE A,T_OPR_OPRECIPEITEMDE B ,T_BSE_CHARGEITEM C,t_bse_patientpaytype f, T_OPR_OUTPATIENTRECIPEINV e
           WHERE a.pstauts_int = 2
             AND a.paytypeid_chr = f.paytypeid_chr(+)
             AND f.internalflag_int = 3
 and a.outpatrecipeid_chr =e.outpatrecipeid_chr(+)
and a.CREATEDATE_DAT BETWEEN TO_DATE('" + date.ToString("yyyy-MM-dd 00:00:00") + "','yyyy-mm-dd hh24:mi:ss') " +
                             @" AND TO_DATE('" + date2.ToString("yyyy-MM-dd 23:59:59") + @"','yyyy-mm-dd hh24:mi:ss')
and a.outpatrecipeid_chr=B.outpatrecipeid_chr(+)
and b.itemid_chr=c.itemid_chr(+)
and e.balanceflag_int=1
group by a.outpatrecipeid_chr,ITEMOPINVTYPE_CHR,SEQID_CHR) A,
(
select rptid_chr,groupid_chr,typeid_chr,flag_int
          from t_aid_rpt_gop_rla
         where rptid_chr = '0044' and flag_int = 2) b
where a.ITEMOPINVTYPE_CHR =b.TYPEID_CHR(+) order by 1,5";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dt);
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL2, ref dt2);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
        public bool CheckRecipeSlices(List <string> lstChargeItemId)
        {
            string    Sql = string.Empty;
            bool      ret = false;
            DataTable dt  = new DataTable();

            try
            {
                Sql = @"select distinct b.medicinepreptype_chr
                          from t_bse_chargeitem a
                         inner join t_bse_medicine b
                            on a.itemsrcid_vchr = b.medicineid_chr
                         where a.itemid_chr in ({0})";

                string itemIdArr = string.Empty;
                foreach (string id in lstChargeItemId)
                {
                    itemIdArr += "'" + id + "',";
                }
                clsHRPTableService svc = new clsHRPTableService();
                svc.lngGetDataTableWithoutParameters(string.Format(Sql, itemIdArr.TrimEnd(',')), ref dt);
                if (dt != null && dt.Rows.Count == 1 && dt.Rows[0]["medicinepreptype_chr"].ToString() == "12")   // 饮片
                {
                    Sql = @"select a.itemid_chr, c.fmednamegy
                              from t_bse_chargeitem a
                             inner join t_bse_medicine b
                                on a.itemsrcid_vchr = b.medicineid_chr
                              left join dggycmedlist c
                                on (b.medicinename_vchr = c.fmednamegy or
                                   b.medicinename_vchr = c.fmednameyy)
                             where a.itemid_chr in ({0})";
                    svc.lngGetDataTableWithoutParameters(string.Format(Sql, itemIdArr.TrimEnd(',')), ref dt);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        foreach (DataRow dr in dt.Rows)
                        {
                            if (dr["fmednamegy"] == DBNull.Value || string.IsNullOrEmpty(dr["fmednamegy"].ToString()))
                            {
                                return(false);
                            }
                        }
                    }
                    ret = true;
                }
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(ret);
        }
Esempio n. 3
0
        public long m_lngGetAllUnitPropertyAndDetail(System.Security.Principal.IPrincipal p_objPrincipal,
                                                     out clsUnitProperty_VO[] p_objPropertyArr,
                                                     out clsUnitPropertyValue_VO[] p_objValueArr)
        {
            long lngRes = 0;

            p_objPropertyArr = null;
            p_objValueArr    = null;

            string strSQL1 = @"SELECT * FROM t_aid_lis_unit_property ORDER BY inuse_flag_num DESC, property_priority_num ";
            string strSQL2 = @"SELECT * FROM t_aid_lis_unit_property_value";

            try
            {
                DataTable        dtbData          = new DataTable();
                clsVOConstructor objVOConstructor = new clsVOConstructor();
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL1, ref dtbData);
                if (lngRes > 0 && dtbData != null)
                {
                    p_objPropertyArr = new clsUnitProperty_VO[dtbData.Rows.Count];
                    for (int i = 0; i < dtbData.Rows.Count; i++)
                    {
                        p_objPropertyArr[i] = objVOConstructor.m_objConstructUnitPropertyVO(dtbData.Rows[i]);
                    }
                    lngRes  = 0;
                    dtbData = new DataTable();
                    lngRes  = objHRPSvc.lngGetDataTableWithoutParameters(strSQL2, ref dtbData);
                    if (lngRes > 0 && dtbData != null)
                    {
                        p_objValueArr = new clsUnitPropertyValue_VO[dtbData.Rows.Count];
                        for (int j = 0; j < dtbData.Rows.Count; j++)
                        {
                            p_objValueArr[j] = objVOConstructor.m_objConstructUnitPropertyValueVO(dtbData.Rows[j]);
                        }
                    }
                }
                if (lngRes <= 0)
                {
                    p_objPropertyArr = null;
                    p_objValueArr    = null;
                }
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);//要在LogError方法中抛出异常。
            }
            return(lngRes);
        }
Esempio n. 4
0
        public long m_mthGetStorageName(out DataTable m_objTable)
        {
            long lngRes = -1;

            m_objTable = new DataTable();
            string strSql = @"select a.medstorename_vchr storagename, a.deptid_chr medstoreid
  from t_bse_medstore a
union all
select distinct y.medicineroomname storagename, y.medicineroomid medstoreid
  from t_ms_medicinestoreroomset y ";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();

                objHRPSvc.lngGetDataTableWithoutParameters(strSql, ref m_objTable);

                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 5
0
        public long m_lngGetDoctorDuty(out DataTable dt)
        {
            long   lngRes = 0;
            string SQL    = @"select a.jxcode_chr, a.wbcode_chr, a.pycode_chr, a.dictname_vchr,
                                 a.dictid_chr, a.dictkind_chr, a.dictseqid_chr, a.dictdefinecode_vchr
                            from t_aid_dict a
                           where dictid_chr <> '0' and dictkind_chr = '21'
                        order by to_number (dictid_chr)";

            dt = new DataTable();

            try
            {
                clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(SQL, ref dt);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }

            return(lngRes);
        }
Esempio n. 6
0
        public long m_lngGetAllUserGroupApplUnitID(System.Security.Principal.IPrincipal p_objPrincipal, out DataTable dtbApplUnit)
        {
            long lngRes = 0;

            dtbApplUnit = null;

            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsAppGroupSvc", "m_lngAddApplUserRelation");
            if (lngRes < 0)
            {
                return(-1);
            }

            string strSQL = @"SELECT DISTINCT apply_unit_id_chr FROM t_aid_lis_appuser_group_detail";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtbApplUnit);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 7
0
        public long m_lngFind(out clsSysParamVO[] p_objResultArr)
        {
            long lngRes = 0;

            p_objResultArr = null;
            string             sql       = @"
                            select syscode_chr,
                                   parmcode_chr,
                                   parmdesc_vchr,
                                   parmvalue_vchr,
                                   status_int,
                                   note_vchr
                              from t_bse_sysparm
                          ";
            clsHRPTableService objHRPSvc = new clsHRPTableService();

            try
            {
                DataTable dtbResult = null;
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(sql, ref dtbResult);
                objHRPSvc.Dispose();
                if (lngRes == 1 && dtbResult != null && dtbResult.Rows.Count > 0)
                {
                    p_objResultArr = ConstructVOArr(dtbResult);
                }
            }
            catch (Exception objEx)
            {
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 8
0
        /// <summary>
        /// 取得样本类型
        /// </summary>
        /// <param name="dtbResult"></param>
        /// <returns></returns>
        public long lngGetSamType(out DataTable dtbResult)
        {
            dtbResult = null;
            long               lngRes     = 0;
            string             strSQL     = " select sample_type_id_chr, sample_type_desc_vchr from t_aid_lis_sampletype order by sample_type_id_chr ";
            clsHRPTableService objHRPServ = null;

            try
            {
                objHRPServ = new clsHRPTableService();
                lngRes     = objHRPServ.lngGetDataTableWithoutParameters(strSQL, ref dtbResult);
                objHRPServ.Dispose();
                dtbResult = dtbResult.DefaultView.ToTable();
            }
            catch (Exception objEx)
            {
                lngRes = 0;
                clsLogText objLogger = new clsLogText();
                bool       blnRes    = objLogger.LogDetailError(objEx, true);
            }
            finally
            {
                objHRPServ = null;
            }
            return(lngRes);
        }
Esempio n. 9
0
        public long m_lngGetMedShape(System.Security.Principal.IPrincipal p_objPrincipal, out System.Data.DataTable p_outdtResult)
        {
            long lngRes = 0;

            p_outdtResult = new System.Data.DataTable();
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS", "m_lngGetMedShape");
            if (lngRes < 0)
            {
                return(-1);
            }
            string strSQL = @"select * from t_aid_medicinepreptype";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref p_outdtResult);
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 10
0
        public long m_mthGetAllMedStore(out DataTable m_objTable)
        {
            long lngRes = -1;

            m_objTable = new DataTable();
            string strSql = @"select t.medstoreid_chr,
       t.medstorename_vchr,
       t.deptid_chr,
       t.medstoretype_int,
       t.medicnetype_int,
       t.urgence_int
  from t_bse_medstore t";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();

                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSql, ref m_objTable);

                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 11
0
        public long m_lngGetVLocked_Object(System.Security.Principal.IPrincipal p_objPrincipal, out DataTable p_outDatatable)
        {
            long lngRes = 0;

            p_outDatatable = null;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsKillLockSVC", "m_lngGetVLocked_Object");
            if (lngRes < 0)//权限
            {
                return(-1);
            }
            string strSQL = @"select * from V$LOCKED_OBJECT";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref p_outDatatable);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 12
0
        public long m_lngGetTableDba2pcpending(System.Security.Principal.IPrincipal p_objPrincipal, out DataTable p_outDatatable)
        {
            long lngRes = 0;

            p_outDatatable = null;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsKillLockSVC", "m_lngGetTableDba2pcpending");
            if (lngRes < 0)//权限
            {
                return(-1);
            }
            string strSQL = @"select * from dba_2pc_pending where state not in('forced rollback','forced commit')";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref p_outDatatable);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 13
0
        public long m_lngGetTextListData(System.Security.Principal.IPrincipal p_objPrincipal, string p_strSQL, out DataTable p_dtbResult)
        {
            p_dtbResult = new DataTable();
            long lngRes = 0;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.LIS.clsLisDeviceSvc", "m_lngGetTurnInPatienList");
            if (lngRes < 0)
            {
                return(-1);
            }
            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(p_strSQL, ref p_dtbResult);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 14
0
        public long m_lngGetTreatRecipe(out DataTable m_dtbReport)
        {
            long lngRes = -1;

            m_dtbReport = new DataTable();

            string strSql = @"select t1.medstoreid_chr,
                                     t1.medstorename_vchr
                                from t_bse_medstore t1";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();

                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSql, ref m_dtbReport);

                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
        public long m_lngGetMedStore(out DataTable dt)
        {
            long lngRes = 0;

            dt = new DataTable();

            string SQL = @"select  a.medstoreid_chr, a.medstorename_vchr, a.medstoretype_int,
                                   a.medicnetype_int, a.urgence_int, a.deptid_chr
                              from t_bse_medstore a";

            try
            {
                clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(SQL, ref dt);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                string strTmp = objEx.Message;
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }

            return(lngRes);
        }
Esempio n. 16
0
        public long m_mthGetStoreName(bool p_blnIsDrugStore, out DataTable p_dtbStoreName)
        {
            p_dtbStoreName = new DataTable();
            long          lngRes = 0;
            StringBuilder strSQL = new StringBuilder("");

            try
            {
                if (p_blnIsDrugStore)
                {
                    strSQL.Append(@"select t.deptid_chr,t.medstorename_vchr from t_bse_medstore t");
                }
                else
                {
                    strSQL.Append(@"select distinct t.deptid_chr,t.medicineroomname medstorename_vchr from t_ms_medicinestoreroomset t");
                }
                clsHRPTableService objHRPServ = new clsHRPTableService();
                lngRes = objHRPServ.lngGetDataTableWithoutParameters(strSQL.ToString(), ref p_dtbStoreName);

                objHRPServ.Dispose();
                objHRPServ = null;
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 17
0
        public long m_lngFindFeeList(System.Security.Principal.IPrincipal objPri,
                                     ref DataTable dtResult)
        {
            com.digitalwave.security.clsPrivilegeHandleService clsSec = new clsPrivilegeHandleService();
            long lngRes = clsSec.m_lngCheckCallPrivilege(objPri, "com.digitalwave.iCare.middletier.HIS.clsOPDoctorSvc", "m_lngFindWaitDiagList");

            if (lngRes < 0)
            {
                return(lngRes);
            }

            string strSQL = @"Select a.registertypeid_chr,a.paytypeid_chr,a.regfee,a.diagfee,
                            b.registertypename_vchr,c.paytypename_vchr from t_opPatRegAmount a,
                            t_bse_registertype b,t_bse_patientpaytype c  
                            Where a.registertypeid_chr=b.registertypeid_chr 
                            And a.paytypeid_chr=c.paytypeid_chr";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService HRPSvc = new clsHRPTableService();
                lngRes = HRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtResult);
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
                lngRes = -2;
            }
            return(lngRes);
        }
Esempio n. 18
0
        public long m_lngFind(System.Security.Principal.IPrincipal p_objPrincipal, out clsLisQCDataVO[] p_objResultArr)
        {
            long lngRes = 0;

            p_objResultArr = null;
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, m_strCurrentSvcDetailName, "m_lngFind");
            if (lngRes <= 0)
            {
                return(-1);
            }
            com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
            try
            {
                DataTable dtbResult = null;
                lngRes = 0;
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(m_strFindAllSql, ref dtbResult);
                objHRPSvc.Dispose();
                if (lngRes == 1 && dtbResult != null && dtbResult.Rows.Count > 0)
                {
                    p_objResultArr = ConstructVOArr(dtbResult);
                }
            }
            catch (Exception objEx)
            {
                new clsLogText().LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 19
0
        /// <summary>
        /// 查找历史记录中所有的微板编号
        /// </summary>
        /// <param name="arrBoardName"></param>
        /// <returns></returns>
        public long m_lngFindBoardName(out string[] arrBoardName)
        {
            long lngRes = 0;

            arrBoardName = null;
            string sql = @"
                                select distinct BoardNO_VCHR from t_opr_lis_st360_result
                          ";

            DataTable          dtbResult  = null;
            clsHRPTableService hrpService = new clsHRPTableService();

            try
            {
                lngRes = hrpService.lngGetDataTableWithoutParameters(sql, ref dtbResult);
                if (dtbResult != null && dtbResult.Rows.Count > 0)
                {
                    arrBoardName = new string[dtbResult.Rows.Count];
                    for (int i = 0; i < dtbResult.Rows.Count; i++)
                    {
                        arrBoardName[i] = dtbResult.Rows[i]["BoardNO_VCHR"].ToString();
                    }
                }
                else
                {
                    arrBoardName = new string[0];
                }
            }
            catch (Exception ex)
            {
                new com.digitalwave.Utility.clsLogText().LogError(ex.Message);
            }

            return(lngRes);
        }
Esempio n. 20
0
        public long m_mthGetSubjectionCat(System.Security.Principal.IPrincipal p_objPrincipal, out DataTable dtResult, string strCatID, int flag)
        {
            long lngRes = 0;

            dtResult = new DataTable();
            //权限类
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            //检查是否有使用些函数的权限
            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsItemCatMappingSvc", "m_mthGetSubjectionCat");
            if (lngRes < 0)            //没有使用的权限
            {
                return(-1);
            }
            string strSQL = "select CATID_CHR from T_BSE_CHARGECATMAP where GROUPID_CHR ='" + strCatID + "' and INTERNALFLAG_INT =" + flag.ToString();

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtResult);
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 21
0
        /// <summary>
        /// 获取病区
        /// </summary>
        /// <param name="dtbResult"></param>
        /// <returns></returns>
        public long lngGetDeptName(out DataTable dtbResult)
        {
            dtbResult = null;
            long               lngRes     = 0;
            string             strSQL     = "select dictid_chr,dictname_vchr from t_aid_dict where trim(dictid_chr) <> '0' and dictkind_chr = '61'";
            clsHRPTableService objHRPServ = null;

            try
            {
                objHRPServ = new clsHRPTableService();
                lngRes     = objHRPServ.lngGetDataTableWithoutParameters(strSQL, ref dtbResult);
                objHRPServ.Dispose();
                dtbResult = dtbResult.DefaultView.ToTable();
            }
            catch (Exception objEx)
            {
                lngRes = 0;
                clsLogText objLogger = new clsLogText();
                bool       blnRes    = objLogger.LogDetailError(objEx, true);
            }
            finally
            {
                objHRPServ = null;
            }
            return(lngRes);
        }
Esempio n. 22
0
        public long m_mthMedstoreInfo(System.Security.Principal.IPrincipal p_objPrincipal, out DataTable dt, string strExpen)
        {
            long lngRes = 0;

            dt = new DataTable();
            //权限类
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            //检查是否有使用些函数的权限
            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsItemCatMappingSvc", "m_mthGetSubjectionCat");
            if (lngRes < 0)            //没有使用的权限
            {
                return(-1);
            }
            string strSQL = @"select medstoreid_chr,
       medstorename_vchr,
       medstoretype_int,
       medicnetype_int,
       urgence_int,
       deptid_chr,
       shortname_chr from t_bse_Medstore where MEDSTORETYPE_INT=1 and MEDICNETYPE_INT=" + strExpen;

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dt);
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 23
0
        /// <summary>
        /// 获取所有抗生素
        /// </summary>
        /// <param name="dtbResult"></param>
        /// <returns></returns>
        public long lngGetAllAnti(out DataTable dtbResult)
        {
            dtbResult = null;
            long lngRes = 0;

            string             strSQL     = @"select t.antiid as 抗生素ID,t.cname as 抗生素名称,t.ename as 英文名称 from t_atb_anti t  order by antiid ";
            clsHRPTableService objHRPServ = null;

            try
            {
                objHRPServ = new clsHRPTableService();
                lngRes     = objHRPServ.lngGetDataTableWithoutParameters(strSQL, ref dtbResult);
                dtbResult  = dtbResult.DefaultView.ToTable();
            }
            catch (Exception objEx)
            {
                lngRes = 0;
                clsLogText objLogger = new clsLogText();
                bool       blnRes    = objLogger.LogDetailError(objEx, true);
            }
            finally
            {
                objHRPServ = null;
            }
            return(lngRes);
        }
Esempio n. 24
0
        public long m_mthWindowInfoByID(System.Security.Principal.IPrincipal p_objPrincipal, out DataTable dt, string strExpen)
        {
            long lngRes = 0;

            dt = new DataTable();
            //权限类
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            //检查是否有使用些函数的权限
            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsItemCatMappingSvc", "m_mthGetSubjectionCat");
            if (lngRes < 0)            //没有使用的权限
            {
                return(-1);
            }
            string strSQL = @"select windowid_chr,
       windowname_vchr,
       medstoreid_chr,
       windowtype_int,
       workstatus_int,
       winproperty_int from T_BSE_MEDSTOREWIN where MEDSTOREID_CHR ='" + strExpen + "'";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dt);
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
        public long m_lngGetMaxAccountId(System.Security.Principal.IPrincipal p_objPrincipal, out string p_strAccountId)
        {
            p_strAccountId = "";
            DataTable p_dtbVendor = new DataTable();
            long      lngRes      = 0;

            try
            {
                string strSQL = @"select max(a.accountid) accountid from t_ms_account a";

                clsHRPTableService objHRPServ = new clsHRPTableService();

                lngRes = objHRPServ.lngGetDataTableWithoutParameters(strSQL, ref p_dtbVendor);
                if (p_dtbVendor != null)
                {
                    p_strAccountId = p_dtbVendor.Rows[0]["accountid"].ToString();
                }
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 26
0
        public long m_mthFindChargeItem(System.Security.Principal.IPrincipal p_objPrincipal, string strCatID, string strType, string strContent, out DataTable dt)
        {
            dt = new DataTable();
            long lngRes = 0;
            //权限类
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

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

            try
            {
                string strSQL = @"select a.ITEMID_CHR,a.ITEMCODE_VCHR,a.ITEMNAME_VCHR,a.ITEMSRCID_VCHR,a.ITEMSRCNAME_VCHR,b.assistcode_chr from t_bse_chargeitem A,t_bse_medicine B 
where a.ITEMSRCID_VCHR =b.medicineid_chr(+) and a.ITEMCATID_CHR = '" + strCatID + "' order by a.ITEMCODE_VCHR";
                if (strContent.Trim() != "")
                {
                    strSQL = @"select a.ITEMID_CHR,a.ITEMCODE_VCHR,a.ITEMNAME_VCHR,a.ITEMSRCID_VCHR,a.ITEMSRCNAME_VCHR,b.assistcode_chr from t_bse_chargeitem A,t_bse_medicine B 
where a.ITEMSRCID_VCHR =b.medicineid_chr(+) and a.ITEMCATID_CHR = '" + strCatID + "' AND " + strType + " LIKE '" + strContent + "%' order by a.ITEMCODE_VCHR";
                }
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dt);
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 27
0
        public string m_lngGetMaxId()
        {
            DataTable m_dtb = null;

            try
            {
                string             strSql     = "select max(storagerackid_chr) as maxId from t_ms_storagerackset";
                clsHRPTableService objHRPServ = new clsHRPTableService();
                long lngRes = objHRPServ.lngGetDataTableWithoutParameters(strSql, ref m_dtb);

                if (m_dtb == null || m_dtb.Rows[0]["maxId"] == DBNull.Value)
                {
                    return("0001");
                }
                int    i_Id    = Convert.ToInt16(m_dtb.Rows[0]["maxId"].ToString());
                string i_maxId = Convert.ToString(i_Id + 1);
                return(i_maxId.PadLeft(4, '0'));
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(null);
        }
Esempio n. 28
0
        public long m_lngGetApplicationValid(string applicationId, out bool isValid)
        {
            long lngRes = 0;

            isValid = false;

            #region == sql ==

            string sql = string.Format(@"   select application_id_chr
                                              from t_opr_lis_application 
                                             where application_id_chr = '{0}' 
                                               and pstatus_int = 2  ", applicationId);

            #endregion

            try
            {
                DataTable          dtbResult = new DataTable();
                clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(sql, ref dtbResult);
                if (lngRes > 0 && dtbResult != null && dtbResult.Rows.Count > 0)
                {
                    isValid = true;
                }
            }
            catch
            {
                lngRes = 0;
            }
            return(lngRes);
        }
Esempio n. 29
0
        public long m_lngFindAllSour(System.Security.Principal.IPrincipal p_objPrincipal, out DataTable dtResult)
        {
            string strSQL = "select MEDICINESTDID_CHR ID,MEDICINESTDNAME_VCHR Name From T_BSE_MEDICINESTD";

            dtResult = new DataTable();
            long lngRes = 0;
            //权限类
            clsPrivilegeHandleService objPrivilege = new clsPrivilegeHandleService();

            //检查是否有使用些函数的权限
            lngRes = objPrivilege.m_lngCheckCallPrivilege(p_objPrincipal, "com.digitalwave.iCare.middletier.HIS.clsChargeItemSvc", "m_GetGroupCat");
            if (lngRes < 0)            //没有使用的权限
            {
                return(-1);
            }
            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objHRPSvc = new clsHRPTableService();
                lngRes = objHRPSvc.lngGetDataTableWithoutParameters(strSQL, ref dtResult);
                objHRPSvc.Dispose();
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }
Esempio n. 30
0
        public long m_mthGetAccountperiodTime(System.Security.Principal.IPrincipal p_objPrincipal, out DateTime datAccountperiodTime)
        {
            DataTable p_dtbVendor = new DataTable();

            datAccountperiodTime = DateTime.Now;
            long lngRes = 0;

            try
            {
                string             strSQL     = @"select max(endtime_dat) endtime_dat from t_ms_accountperiod";
                clsHRPTableService objHRPServ = new clsHRPTableService();
                lngRes = objHRPServ.lngGetDataTableWithoutParameters(strSQL, ref p_dtbVendor);
                if (p_dtbVendor != null && p_dtbVendor.Rows.Count > 0)
                {
                    if (p_dtbVendor.Rows[0]["endtime_dat"].ToString() == "")
                    {
                        datAccountperiodTime = Convert.ToDateTime("0001-1-1");
                    }
                    else
                    {
                        datAccountperiodTime = Convert.ToDateTime(p_dtbVendor.Rows[0]["endtime_dat"]);
                    }
                }
                return(lngRes);
            }
            catch (Exception objEx)
            {
                com.digitalwave.Utility.clsLogText objLogger = new com.digitalwave.Utility.clsLogText();
                bool blnRes = objLogger.LogError(objEx);
            }
            return(lngRes);
        }