Exemplo n.º 1
0
        public frmInHospitalPatient(DataTable p_dtbRecord)
        {
            InitializeComponent();
            ListViewItem     tempItem;
            clsBrithdayToAge m_objAge = new clsBrithdayToAge();

            foreach (DataRow dr in p_dtbRecord.Rows)
            {
                tempItem = new ListViewItem(dr["inpatientid_chr"].ToString().Trim());
                tempItem.SubItems.Add(dr["lastname_vchr"].ToString().Trim());
                tempItem.SubItems.Add(dr["sex_chr"].ToString().Trim());
                tempItem.SubItems.Add(m_objAge.m_strGetAge(dr["birth_dat"]));
                tempItem.SubItems.Add(dr["status"].ToString().Trim());
                tempItem.SubItems.Add(dr["icd10diagtext_vchr"].ToString().Trim());
                tempItem.SubItems.Add(Convert.ToDateTime(dr["inpatient_dat"]).ToString("yyyy-MM-dd HH:mm"));
                tempItem.SubItems.Add(dr["inpatientcount_int"].ToString().Trim());
                tempItem.SubItems.Add(dr["pstatus"].ToString().Trim());
                tempItem.SubItems.Add(dr["phone"].ToString().Trim());
                tempItem.SubItems.Add(dr["address"].ToString().Trim());
                tempItem.Tag             = dr["registerid_chr"].ToString().Trim();
                tempItem.SubItems[0].Tag = dr["patientid_chr"].ToString().Trim();
                m_lsvPatientInfo.Items.Add(tempItem);
            }
            if (m_lsvPatientInfo.Items.Count > 0)
            {
                m_lsvPatientInfo.Items[0].Selected = true;
            }
        }
Exemplo n.º 2
0
 public clsCtl_ShowReports()
 {
     objSvc              = new clsDcl_ShowReports();
     m_objAge            = new clsBrithdayToAge();
     objCalPatientCharge = new clsCalcPatientCharge(string.Empty, "0001", 100, this.m_objComInfo.m_strGetHospitalTitle(), 1, 100);
     //
     // TODO: 在此处添加构造函数逻辑
     //
 }
Exemplo n.º 3
0
        /// <summary>
        /// 根据病区ID查询未安排床位的病人信息
        /// </summary>
        public void m_mthGetTurnInNotAccept()
        {
            m_objViewer.m_lsvPatientInfo.Items.Clear();
            DataTable p_dtbResult;

            try
            {
                m_objManage.m_lngGetTurnInNA(m_objViewer.m_strAreaID, out p_dtbResult);
                clsBrithdayToAge m_objAge = new clsBrithdayToAge();
                ListViewItem     listviewitem;
                ListViewItem[]   tempItemArr = new ListViewItem[p_dtbResult.Rows.Count];
                int index = 0;
                foreach (DataRow dr in p_dtbResult.Rows)
                {
                    listviewitem = new ListViewItem(dr["name_vchr"].ToString().Trim());
                    listviewitem.SubItems.Add(dr["inpatientid_chr"].ToString().Trim());
                    listviewitem.SubItems.Add(dr["name_vchr"].ToString().Trim());
                    listviewitem.SubItems.Add(dr["sex_chr"].ToString().Trim());
                    listviewitem.SubItems.Add(m_objAge.m_strGetAge(dr["birth_dat"]));
                    listviewitem.SubItems.Add(dr["status"].ToString().Trim());
                    listviewitem.SubItems.Add(Convert.ToDateTime(dr["modify_dat"]).ToString("yyyy年MM月dd日 HH时mm分"));
                    listviewitem.SubItems.Add(m_objViewer.m_lblAREAName.Text.Trim());
                    listviewitem.SubItems.Add(dr["type_int"].ToString().Trim());
                    listviewitem.SubItems.Add(Convert.ToDateTime(dr["HISINPATIENTDATE"]).ToString("yyyy年MM月dd日 HH时mm分"));

                    listviewitem.Tag = dr["REGISTERID_CHR"].ToString().Trim();
                    //listviewitem.ImageIndex = intDisplayImageIndex(Int32.Parse(dr["STATE_INT"].ToString().Trim()), dr["SEX_CHR"].ToString().Trim());
                    listviewitem.ImageIndex = intDisplayImageIndex(dr["STATE_INT"].ToString().Trim(), dr["SEX_CHR"].ToString().Trim(), dr["nursecate"].ToString().Trim());
                    tempItemArr[index]      = listviewitem;
                    index++;
                }
                m_objViewer.m_lsvPatientInfo.Items.AddRange(tempItemArr);
                p_dtbResult = null;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "获取当前病区未安排床位的病人信息出错!");
            }
        }
Exemplo n.º 4
0
        public void m_mthCreateChargeVO(ref clsBihOrderDic_VO p_objOrderDicVO, ref clsBihPatientCharge_VO p_objPatientChargeVO, string p_strInPatientID, int p_intBagNum, string p_strOrderCreateAreaID)
        {
            string chargeItemId = clsPublic.m_strGetSysparm("0088");

            clsDcl_CommonFind objDcl         = new clsDcl_CommonFind();
            DataTable         dtOrderDicInfo = new DataTable();
            DataTable         dtPatientInfo  = new DataTable();

            objDcl.m_lngQueryInfoForChargeMedBag(chargeItemId, p_strInPatientID, ref dtOrderDicInfo, ref dtPatientInfo);

            bool isChildPrice = false;

            if (dtPatientInfo != null && dtPatientInfo.Rows.Count > 0)
            {
                if (new clsDcl_YB().IsUseChildPrice())
                {
                    isChildPrice = new clsBrithdayToAge().IsChild(Convert.ToDateTime(dtPatientInfo.Rows[0]["birth_dat"]));
                }
            }
            clsDcl_Charge objDcl1    = new clsDcl_Charge();
            DataTable     dtItemInfo = new DataTable();

            objDcl1.m_lngGetChargeItemByOrderID(chargeItemId, dtPatientInfo.Rows[0]["paytypeid_chr"].ToString(), out dtItemInfo, false);
            DataRow dr = dtItemInfo.Rows[0];

            //p_objOrderDicVO
            p_objOrderDicVO.Type          = 1;
            p_objOrderDicVO.OrderQue      = 1;
            p_objOrderDicVO.OrderDicID    = chargeItemId;
            p_objOrderDicVO.OrderDicName  = dtOrderDicInfo.Rows[0][0].ToString();
            p_objOrderDicVO.Spec          = dtOrderDicInfo.Rows[0][1].ToString();
            p_objOrderDicVO.Qty           = 0;
            p_objOrderDicVO.PriceMny      = 0;
            p_objOrderDicVO.TotalMny      = 0;
            p_objOrderDicVO.AttachOrderID = "1->" + chargeItemId;
            p_objOrderDicVO.SbBaseMny     = 0;


            //p_objPatientChargeVO
            p_objPatientChargeVO.PatientID      = dtPatientInfo.Rows[0]["patientid_chr"].ToString();
            p_objPatientChargeVO.RegisterID     = dtPatientInfo.Rows[0]["registerid_chr"].ToString();
            p_objPatientChargeVO.ClacArea       = dtPatientInfo.Rows[0]["areaid_chr"].ToString();
            p_objPatientChargeVO.CreateArea     = p_strOrderCreateAreaID;
            p_objPatientChargeVO.CalcCateID     = dr["itemipcalctype_chr"].ToString();
            p_objPatientChargeVO.InvCateID      = dr["itemipinvtype_chr"].ToString();
            p_objPatientChargeVO.ChargeItemID   = dr["itemid_chr"].ToString();
            p_objPatientChargeVO.ChargeItemName = dr["itemname_vchr"].ToString();

            if (dr["ipchargeflg_int"].ToString().Trim() == "1")
            {
                p_objPatientChargeVO.Unit      = dr["itemipunit_chr"].ToString().Trim();
                p_objPatientChargeVO.UnitPrice = clsPublic.ConvertObjToDecimal(dr["submoney"]);
            }
            else
            {
                p_objPatientChargeVO.Unit      = dr["itemunit_chr"].ToString().Trim();
                p_objPatientChargeVO.UnitPrice = clsPublic.ConvertObjToDecimal(dr["itemprice_mny"]);
            }

            p_objPatientChargeVO.Amount                  = clsPublic.ConvertObjToDecimal(p_intBagNum);
            p_objPatientChargeVO.Discount                = Convert.ToDecimal(dr["precent_dec"]);
            p_objPatientChargeVO.Ismepay                 = 0;
            p_objPatientChargeVO.Des                     = "";
            p_objPatientChargeVO.CreateType              = 4;
            p_objPatientChargeVO.Creator                 = this.strEmpID;
            p_objPatientChargeVO.Operator                = this.strEmpID;
            p_objPatientChargeVO.PStatus                 = 1;
            p_objPatientChargeVO.Activator               = this.strEmpID;
            p_objPatientChargeVO.ActivateType            = 2;
            p_objPatientChargeVO.IsRich                  = int.Parse(dr["isrich_int"].ToString());
            p_objPatientChargeVO.CurAreaID               = dtPatientInfo.Rows[0]["areaid_chr"].ToString();
            p_objPatientChargeVO.CurBedID                = dtPatientInfo.Rows[0]["bedid_chr"].ToString();
            p_objPatientChargeVO.DoctorID                = dtPatientInfo.Rows[0]["casedoctor_chr"].ToString();
            p_objPatientChargeVO.Doctor                  = dtPatientInfo.Rows[0]["lastname_vchr"].ToString();
            p_objPatientChargeVO.DoctorGroupID           = "";
            p_objPatientChargeVO.NeedConfirm             = 0;
            p_objPatientChargeVO.ActiveDat               = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            p_objPatientChargeVO.TotalMoney_dec          = clsPublic.Round(p_objPatientChargeVO.UnitPrice * p_objPatientChargeVO.Amount, 2);
            p_objPatientChargeVO.AcctMoney_dec           = p_objPatientChargeVO.TotalMoney_dec - clsPublic.Round(p_objPatientChargeVO.UnitPrice * p_objPatientChargeVO.Amount * p_objPatientChargeVO.Discount / 100, 2);
            p_objPatientChargeVO.AttachOrderID           = "1->" + chargeItemId;
            p_objPatientChargeVO.AttachOrderBaseNum      = 0;
            p_objPatientChargeVO.SPEC_VCHR               = dr["itemspec_vchr"].ToString();
            p_objPatientChargeVO.PutMedicineFlag         = 0;
            p_objPatientChargeVO.CHARGEDOCTORID_CHR      = dtPatientInfo.Rows[0]["casedoctor_chr"].ToString();
            p_objPatientChargeVO.CHARGEDOCTOR_VCHR       = dtPatientInfo.Rows[0]["lastname_vchr"].ToString();
            p_objPatientChargeVO.CHARGEDOCTORGROUPID_CHR = "";
        }
Exemplo n.º 5
0
        public long m_lngInsertRegister(string p_strlsh0, string p_inpatientid)
        {
            long      lngRes   = -1;
            DataTable dtResult = new DataTable();

            string strSQL = @"select a.registerid_chr, a.inpatientid_chr, a.inpatient_dat, a.areaid_chr,
                                     a.bedid_chr, a.inareadate_dat, a.mzdiagnose_vchr, b.homeaddress_vchr,
                                     b.birth_dat, b.insuranceid_vchr, b.homephone_vchr, b.lastname_vchr,
                                     b.sex_chr, b.idcard_chr, b.operatorid_chr as inhospital_operator,
                                     b.govcard_chr, c.code_chr, d.outhospital_dat,
                                     d.operatorid_chr as outhospital_operator, d.diagnose_vchr,
                                     d.diseasetype_int, e.deptname_vchr, f.lastname_vchr as reg_operator,
                                     h.paytypeno_vchr
                                from t_opr_bih_register a,
                                     t_opr_bih_registerdetail b,
                                     t_bse_bed c,
                                     t_opr_bih_leave d,
                                     t_bse_deptdesc e,
                                     t_bse_employee f,
                                     t_bse_patient g,
                                     t_bse_patientpaytype h
                               where a.registerid_chr = b.registerid_chr
                                 and a.registerid_chr = d.registerid_chr
                                 and a.deptid_chr = e.deptid_chr(+)
                                 and a.patientid_chr = g.patientid_chr(+)
                                 and g.paytypeid_chr = h.paytypeid_chr
                                 and a.inpatientid_chr = ?
                                 and a.pstatus_int = 2
                                 and b.registerid_chr = c.bihregisterid_chr(+)
                                 and b.operatorid_chr = f.empid_chr(+)
                                 and d.status_int = 1";

            try
            {
                com.digitalwave.iCare.middletier.HRPService.clsHRPTableService objSvc = new clsHRPTableService();
                IDataParameter[] objDPArr;
                objSvc.CreateDatabaseParameter(1, out objDPArr);
                objDPArr[0].Value = p_inpatientid;
                lngRes            = objSvc.lngGetDataTableWithParameters(strSQL, ref dtResult, objDPArr);

                DataRow drPatientInfo = null;
                if (lngRes > 0 && dtResult.Rows.Count > 0)
                {
                    drPatientInfo = dtResult.Rows[0];
                }
                dtResult.Dispose();
                objSvc.Dispose();

                #region 插入台山旧的His系统 baojian.mo
                if (drPatientInfo == null)
                {
                    return(0);
                }
                else
                {
                    com.digitalwave.iCare.middletier.TSZZYHRPServiceYB.clsTSYBHRPService objYBSvc = new com.digitalwave.iCare.middletier.TSZZYHRPServiceYB.clsTSYBHRPService(); //Created by baojian.mo
                    string strSQL1 = @"delete from zy_zydjb0 where zyhao0 = '";

                    strSQL = @"insert into zy_zydjb0
                                              (zylsh0, zyhao0, brxm00, brxbie,
                                               brnl00, brdzhi, brlxdh, sfzhao,
                                               zydjrq, zyrqi0, zyfwbm,
                                               ksmc00, cwbhao, zyyyin, ysxm00,
                                               bzhong,
                                               cydjr0, ylbxh1, cyzd00, sffsbh
                                              )
                                       values (";
                    StringBuilder sb = new StringBuilder();
                    DateTime      datTmp;
                    string        strTemp = null;

                    sb.Append(p_strlsh0 + ", '");
                    if (drPatientInfo["inpatientid_chr"].ToString().Length > 9)
                    {
                        strTemp = drPatientInfo["inpatientid_chr"].ToString().Substring(drPatientInfo["inpatientid_chr"].ToString().Length - 9, 9);
                        sb.Append(strTemp + "', '");//截后面9位
                    }
                    else
                    {
                        strTemp = drPatientInfo["inpatientid_chr"].ToString();
                        sb.Append(strTemp + "', '");
                    }

                    //<------------------------
                    strSQL1 += strTemp + "'";
                    //------------------------>

                    sb.Append(drPatientInfo["lastname_vchr"].ToString() + "', '");
                    sb.Append(drPatientInfo["sex_chr"].ToString() + "', ");

                    if (string.IsNullOrEmpty(drPatientInfo["birth_dat"].ToString()))
                    {
                        sb.Append("null, '");
                    }
                    else
                    {
                        datTmp  = DateTime.Parse(drPatientInfo["birth_dat"].ToString());
                        strTemp = new clsBrithdayToAge().m_strGetAge(datTmp);
                        sb.Append("'" + this.m_strCutString(strTemp) + "', '");
                    }

                    sb.Append(drPatientInfo["homeaddress_vchr"].ToString() + "', '");
                    sb.Append(drPatientInfo["homephone_vchr"].ToString() + "', '");
                    sb.Append(drPatientInfo["idcard_chr"].ToString() + "', ");

                    if (string.IsNullOrEmpty(drPatientInfo["inpatient_dat"].ToString()))
                    {
                        sb.Append("null, ");
                    }
                    else
                    {
                        datTmp  = Convert.ToDateTime(drPatientInfo["inpatient_dat"]);
                        strTemp = datTmp.ToString("yyyyMMdd");
                        sb.Append("'" + strTemp + "', ");
                    }

                    if (string.IsNullOrEmpty(drPatientInfo["inareadate_dat"].ToString()))
                    {
                        sb.Append("null, '");
                    }
                    else
                    {
                        datTmp  = Convert.ToDateTime(drPatientInfo["inareadate_dat"]);
                        strTemp = datTmp.ToString("yyyyMMdd");
                        sb.Append("'" + strTemp + "', '");
                    }

                    strTemp = drPatientInfo["areaid_chr"].ToString();
                    if (strTemp.Length > 6)
                    {
                        strTemp = strTemp.Substring(strTemp.Length - 6, 6);
                    }
                    sb.Append(strTemp + "', '");
                    sb.Append(drPatientInfo["deptname_vchr"].ToString() + "', '");
                    sb.Append(drPatientInfo["code_chr"].ToString() + "', '");
                    sb.Append(drPatientInfo["mzdiagnose_vchr"].ToString() + "', '");

                    strTemp = m_strCutString(drPatientInfo["reg_operator"].ToString(), 8);
                    sb.Append(strTemp + "', '");
                    sb.Append(drPatientInfo["diseasetype_int"].ToString() + "', ");

                    //if (string.IsNullOrEmpty(drPatientInfo["outhospital_dat"].ToString()))
                    //{
                    //    sb.Append("null, null, ");
                    //}
                    //else
                    //{
                    //    datTmp = Convert.ToDateTime(drPatientInfo["outhospital_dat"]);
                    //    strTemp = datTmp.ToString("yyyyMMdd");
                    //    sb.Append("'" + strTemp + "', '" + strTemp + "', ");
                    //}

                    sb.Append("'" + drPatientInfo["outhospital_operator"].ToString() + "', '");
                    sb.Append(drPatientInfo["insuranceid_vchr"].ToString() + "', '");
                    sb.Append(drPatientInfo["diagnose_vchr"].ToString() + "', '");
                    sb.Append(drPatientInfo["paytypeno_vchr"].ToString() + "'");

                    strSQL += sb.ToString() + ")";
                    lngRes  = objYBSvc.DoExcute(strSQL1);
                    lngRes  = objYBSvc.DoExcute(strSQL);
                    objYBSvc.Dispose();
                }
                #endregion
            }
            catch (Exception ex)
            {
                com.digitalwave.Utility.clsLogText objText = new clsLogText();
                objText.LogError(ex);
            }
            return(lngRes);
        }
Exemplo n.º 6
0
 public clsOrderBooking()
 {
     this.m_objDomain = new clsDclOrderBooking();
     m_objAge         = new clsBrithdayToAge();
 }