当前位置: 首页>>代码示例>>C#>>正文


C# KcbLuotkham类代码示例

本文整理汇总了C#中KcbLuotkham的典型用法代码示例。如果您正苦于以下问题:C# KcbLuotkham类的具体用法?C# KcbLuotkham怎么用?C# KcbLuotkham使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


KcbLuotkham类属于命名空间,在下文中一共展示了KcbLuotkham类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Canhbaotamung

        public static string Canhbaotamung( KcbLuotkham objLuotkham)
        {
            try
            {
                DataTable dtTamung = SPs.NoitruTimkiemlichsuNoptientamung(objLuotkham.MaLuotkham, (int)objLuotkham.IdBenhnhan, 0, -1,(byte)( objLuotkham.TrangthaiNoitru > 0 ? 1 : 0)).GetDataSet().Tables[0];
                DataSet dsData = SPs.NoitruTongchiphi(objLuotkham.MaLuotkham, (int)objLuotkham.IdBenhnhan).GetDataSet();
                decimal Tong_CLS = Utility.DecimaltoDbnull(dsData.Tables[0].Compute("SUM(TT_BN)", "1=1"));
                decimal Tong_Thuoc = Utility.DecimaltoDbnull(dsData.Tables[1].Compute("SUM(TT_BN)", "1=1"));
                decimal Tong_VTTH = Utility.DecimaltoDbnull(dsData.Tables[2].Compute("SUM(TT_BN)", "1=1"));
                decimal Tong_Giuong = Utility.DecimaltoDbnull(dsData.Tables[3].Compute("SUM(TT_BN)", "1=1"));
                decimal Tong_Goi = Utility.DecimaltoDbnull(dsData.Tables[4].Compute("SUM(TT_BN)", "1=1"));
                decimal Tong_Tamung = Utility.DecimaltoDbnull(dtTamung.Compute("SUM(so_tien)", "1=1"));
                decimal Tong_chiphi = Tong_CLS + Tong_Thuoc + Tong_Giuong + Tong_Goi + Tong_VTTH;
                Decimal Gioihancanhbao = Utility.DecimaltoDbnull(THU_VIEN_CHUNG.Laygiatrithamsohethong("NOITRU_GIOIHAN_NOPTIENTAMUNG", "0", true), 0);
                if (Tong_Tamung - Tong_chiphi > Gioihancanhbao)//OK
                {
                    return "";
                }
                string s1=String.Format(Utility.FormatDecimal(), Gioihancanhbao);
                string s2=String.Format(Utility.FormatDecimal(), String.Format(Utility.FormatDecimal(), Convert.ToDecimal((Tong_Tamung - Tong_chiphi).ToString())));
                string result=string.Format("Giới hạn cảnh báo <={0}. Hiện tại, Tổng tạm ứng - Tổng chi phí = {1}", s1, s2);
                return result;
            }
            catch (Exception ex)
            {
                return ex.Message;

            }
        }
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:29,代码来源:THU_VIEN_CHUNG.cs

示例2: InsertAssignDetail

        public void InsertAssignDetail(KcbChidinhcl objKcbChidinhcls, KcbLuotkham objLuotkham, KcbChidinhclsChitiet[] assignDetail)
        {
            using (var scope = new TransactionScope())
             {
                 if (objLuotkham == null) return;
                 foreach (KcbChidinhclsChitiet objAssignDetail in assignDetail)
                 {
                     log.Info("Them moi thong tin cua phieu chi dinh chi tiet voi ma phieu Assign_ID=" +
                              objKcbChidinhcls.IdChidinh);
                     TinhCLS.TinhGiaChiDinhCLS(objLuotkham, objAssignDetail);
                     objAssignDetail.IdDoituongKcb = Utility.Int16Dbnull(objLuotkham.IdDoituongKcb);
                     objAssignDetail.IdChidinh = Utility.Int32Dbnull(objKcbChidinhcls.IdChidinh);
                     objAssignDetail.IdKham = Utility.Int32Dbnull(objKcbChidinhcls.IdKham, -1);
                     decimal PtramBHYT = Utility.DecimaltoDbnull(objLuotkham.PtramBhyt, 0);
                     TinhCLS.GB_TinhPhtramBHYT(objAssignDetail, objLuotkham, PtramBHYT);
                     objAssignDetail.MaLuotkham = objKcbChidinhcls.MaLuotkham;
                     objAssignDetail.IdBenhnhan = objKcbChidinhcls.IdBenhnhan;
                     if (Utility.Int32Dbnull(objAssignDetail.SoLuong) <= 0) objAssignDetail.SoLuong = 1;
                     if (objAssignDetail.IdChitietchidinh <= 0)
                     {

                         objAssignDetail.IsNew = true;
                         objAssignDetail.Save();
                     }
                     else
                     {
                         objAssignDetail.MarkOld();
                         objAssignDetail.IsNew = false;
                         objAssignDetail.Save();
                     }
                 }
                 scope.Complete();
             }
        }
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:34,代码来源:KCB_CHIDINH_CANLAMSANG.cs

示例3: TongHopChiPhi

        /// <summary>
        /// 
        /// </summary>
        /// <param name="objPatientExam"></param>
        /// <param name="Khoanoitru_tonghop">true= Khoa nội trú tự chốt dữ liệu;fasle= Khoa tổng hợp chốt dữ liệu</param>
        /// <returns></returns>
        public static ActionResult TongHopChiPhi(KcbLuotkham objPatientExam,short idKhoanoitru, bool Khoanoitru_tonghop)
        {
            try
            {

                using (var scope = new TransactionScope())
                {
                    using (var sh = new SharedDbConnectionScope())
                    {
                        new Update(KcbLuotkham.Schema)
                        .Set(KcbLuotkham.Columns.TrangthaiNoitru).EqualTo(Utility.Int32Dbnull(objPatientExam.TrangthaiNoitru))
                        .Set(KcbLuotkham.Columns.TthaiThopNoitru).EqualTo(Utility.Int32Dbnull(objPatientExam.TthaiThopNoitru))
                        .Set(KcbLuotkham.Columns.NguoiSua).EqualTo(globalVariables.UserName)
                        .Set(KcbLuotkham.Columns.NgaySua).EqualTo(DateTime.Now)
                        .Where(KcbLuotkham.Columns.MaLuotkham).IsEqualTo(objPatientExam.MaLuotkham)
                        .And(KcbLuotkham.Columns.IdBenhnhan)
                        .IsEqualTo(Utility.Int32Dbnull(objPatientExam.IdBenhnhan))
                        .Execute();
                        SPs.NoitruChotdulieuravien(objPatientExam.MaLuotkham, objPatientExam.IdBenhnhan, idKhoanoitru, Utility.Bool2byte(Khoanoitru_tonghop), (byte)(Utility.Byte2Bool(KcbLuotkham.Columns.TthaiThopNoitru) ? 1 : 0)).Execute();
                    }
                    scope.Complete();
                    return ActionResult.Success;
                }
            }
            catch (Exception ex)
            {
                return ActionResult.Error;
            }
        }
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:35,代码来源:noitru_tonghopchiphi.cs

示例4: InBienlai

        public void InBienlai(bool IsTongHop, int _Payment_ID, KcbLuotkham objLuotkham)
        {
            try
               {
               ActionResult actionResult = new KCB_THANHTOAN().Capnhattrangthaithanhtoan(_Payment_ID);
               if (actionResult == ActionResult.Success)
               {
                   switch (objLuotkham.MaDoituongKcb)
                   {
                       case "DV":
                           Inbienlai_Dichvu(_Payment_ID, IsTongHop);
                           break;
                       case "BHYT":
                           Inbienlai_BHYT(_Payment_ID, IsTongHop);
                           break;
                       default:
                           Inbienlai_Dichvu(_Payment_ID, IsTongHop);
                           break;
                   }
               }
               }
               catch (Exception ex)
               {
               Utility.ShowMsg(string.Format("Lỗi trong quá trình in phiếu dịch vụ ={0}", ex.ToString()));

               }
               finally
               {

               }
        }
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:31,代码来源:INPHIEU_THANHTOAN_NGOAITRU.cs

示例5: BindData

        private void BindData()
        {
            SqlQuery sqlQuery = new Select().From(KcbLuotkham.Schema)
                .Where(KcbLuotkham.Columns.MaLuotkham).IsEqualTo(txtMaLanKham.Text);
            if (sqlQuery.GetRecordCount() > 0)
            {
                objLuotkham = sqlQuery.ExecuteSingle<KcbLuotkham>();
                if (objLuotkham != null)
                {
                    txtMaLanKham.Text = Utility.sDbnull(objLuotkham.MaLuotkham);
                    txtSoBHYT.Text = Utility.sDbnull(objLuotkham.MatheBhyt);
                    DmucKhoaphong objLDepartment = DmucKhoaphong.FetchByID(objLuotkham.IdKhoanoitru);
                    if (objLDepartment != null)
                    {
                        txtDepartment_ID.Text = Utility.sDbnull(objLDepartment.IdKhoaphong);
                        txtDepartmentName.Tag = Utility.sDbnull(objLDepartment.IdKhoaphong);
                        txtDepartmentName.Text = Utility.sDbnull(objLDepartment.TenKhoaphong);
                    }
                    KcbDanhsachBenhnhan objPatientInfo = KcbDanhsachBenhnhan.FetchByID(objLuotkham.IdBenhnhan);
                    if (objPatientInfo != null)
                    {
                        txtPatient_Name.Text = Utility.sDbnull(objPatientInfo.TenBenhnhan);
                        txtPatient_ID.Text = Utility.sDbnull(objLuotkham.IdBenhnhan);
                        txtNamSinh.Text = Utility.sDbnull(objPatientInfo.NamSinh);
                        txtTuoi.Text = Utility.sDbnull(DateTime.Now.Year - objPatientInfo.NamSinh);
                        txtPatientSex.Text =objPatientInfo.GioiTinh;// Utility.Int32Dbnull(objPatientInfo.) == 0 ? "Nam" : "Nữ";
                    }
                    NoitruPhanbuonggiuong objPhanbuonggiuong = noitru_nhapvien.LaythongtinBuonggiuongHtai(objLuotkham);
                    if (objPhanbuonggiuong != null)
                    {
                        dtNgayvao.Value = objPhanbuonggiuong.NgayVaokhoa;
                        txtPatientDept_ID.Text = Utility.sDbnull(objPhanbuonggiuong.Id);
                        NoitruDmucBuong objRoom = NoitruDmucBuong.FetchByID(objPhanbuonggiuong.IdBuong);
                        if (objRoom != null)
                        {
                            txtSoPhong.Text = Utility.sDbnull(objRoom.TenBuong);
                            txtSoPhong.Tag = Utility.sDbnull(objPhanbuonggiuong.IdBuong);
                        }
                        NoitruDmucGiuongbenh objNoitruDmucGiuongbenh = NoitruDmucGiuongbenh.FetchByID(objPhanbuonggiuong.IdGiuong);
                        if (objNoitruDmucGiuongbenh != null)
                        {
                            txtSoGiuong.Text = Utility.sDbnull(objNoitruDmucGiuongbenh.TenGiuong);
                            txtSoGiuong.Tag = Utility.sDbnull(objPhanbuonggiuong.IdGiuong);
                        }
                    }
                    DataTable dtGia = new dmucgiagiuong_busrule().dsGetList("-1").Tables[0];
                    dtGia.DefaultView.Sort = NoitruGiabuonggiuong.Columns.SttHthi + "," + NoitruGiabuonggiuong.Columns.TenGia;
                    txtGia.Init(dtGia, new System.Collections.Generic.List<string>() { NoitruGiabuonggiuong.Columns.IdGia, NoitruGiabuonggiuong.Columns.MaGia, NoitruGiabuonggiuong.Columns.TenGia });

                    m_dtDataRoom = THU_VIEN_CHUNG.NoitruTimkiembuongTheokhoa(Utility.Int32Dbnull(txtDepartment_ID.Text));
                    Utility.SetDataSourceForDataGridEx_Basic(grdBuong, m_dtDataRoom, true, true, "1=1", "sluong_giuong_trong desc,ten_buong");
                    if (grdBuong.DataSource != null)
                    {
                        grdBuong.MoveFirst();
                    }
                }
            }
        }
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:58,代码来源:frm_Chuyengiuong.cs

示例6: LaythongtinBuonggiuongHtai

 public static NoitruPhanbuonggiuong LaythongtinBuonggiuongHtai(KcbLuotkham objPatientExam)
 {
     NoitruPhanbuonggiuong objPhanbuonggiuong = new Select().From(NoitruPhanbuonggiuong.Schema)
         .Where(NoitruPhanbuonggiuong.Columns.MaLuotkham).IsEqualTo(objPatientExam.MaLuotkham)
         .And(NoitruPhanbuonggiuong.Columns.IdBenhnhan).IsEqualTo(objPatientExam.IdBenhnhan)
         .And(NoitruPhanbuonggiuong.Columns.NoiTru).IsEqualTo(1)
         .And(NoitruPhanbuonggiuong.Columns.TrangThai).IsEqualTo(0).ExecuteSingle<NoitruPhanbuonggiuong>();
     return objPhanbuonggiuong;
 }
开发者ID:khaha2210,项目名称:VXIS,代码行数:9,代码来源:noitru_nhapvien.cs

示例7: Init

 public void Init(KcbLuotkham objLuotkham, NoitruPhieudieutri objPhieudieutri)
 {
     this.objLuotkham = objLuotkham;
     this.objPhieudieutri = objPhieudieutri;
     LaydanhsachbacsiChidinh();
     LaydanhSachKhoaNoitru();
     txtMaBenhChinh.Init(globalVariables.gv_dtDmucBenh, new List<string>() { DmucBenh.Columns.IdBenh, DmucBenh.Columns.MaBenh, DmucBenh.Columns.TenBenh });
     txtMaBenhphu.Init(globalVariables.gv_dtDmucBenh, new List<string>() { DmucBenh.Columns.IdBenh, DmucBenh.Columns.MaBenh, DmucBenh.Columns.TenBenh });
 }
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:9,代码来源:ucHoibenhChandoanHangngay.cs

示例8: AddNewPatientExam

        public ActionResult AddNewPatientExam(KcbDanhsachBenhnhan objPatientInfo, KcbLuotkham objLuotkham, KcbDangkyKcb objRegExam, int KieuKham)
        {
            try
            {
                using (var scope = new TransactionScope())
                {
                    using (var dbscope = new SharedDbConnectionScope())
                    {
                        UpdatePatientInfo(objPatientInfo);
                        SqlQuery sqlQueryPatientExam = new Select().From(KcbLuotkham.Schema)
                           .Where(KcbLuotkham.Columns.IdBenhnhan).IsNotEqualTo(objLuotkham.IdBenhnhan)
                           .And(KcbLuotkham.Columns.MaLuotkham).IsEqualTo(objLuotkham.MaLuotkham);
                        if (sqlQueryPatientExam.GetRecordCount() > 0)//Nếu BN khác đã lấy mã này
                        {

                            objLuotkham.MaLuotkham = THU_VIEN_CHUNG.KCB_SINH_MALANKHAM();

                        }
                        objLuotkham.IsNew = true;
                        objLuotkham.Save();
                        if (objLuotkham.TrangthaiNoitru >= 1)
                        {
                            SqlQuery sqlQuery = new Select().From(KcbLuotkham.Schema).Where(
                                KcbLuotkham.Columns.MaLuotkham).IsNotEqualTo(objLuotkham.MaLuotkham)
                                .And(KcbLuotkham.Columns.SoBenhAn).IsEqualTo(objLuotkham.SoBenhAn)
                                .And(KcbLuotkham.Columns.TrangthaiNoitru).IsGreaterThanOrEqualTo(1);

                            if (sqlQuery.GetRecordCount() > 0)
                            {
                                var query = new Update(KcbLuotkham.Schema)
                                     .Set(KcbLuotkham.Columns.SoBenhAn).EqualTo(THU_VIEN_CHUNG.LaySoBenhAn())
                                     .Where(KcbLuotkham.Columns.MaLuotkham).IsEqualTo(objLuotkham.MaLuotkham).
                                     Execute();
                            }

                        }
                        if (objRegExam != null)
                        {
                            objRegExam.MaLuotkham = Utility.sDbnull(objLuotkham.MaLuotkham);
                            objRegExam.IdBenhnhan = Utility.Int32Dbnull(objLuotkham.IdBenhnhan);
                            AddRegExam(objRegExam,objLuotkham, false, KieuKham);
                        }
                        scope.Complete();
                        return ActionResult.Success;
                    }
                }
            }
            catch (Exception ex)
            {
                return ActionResult.Error;
            }
        }
开发者ID:khaha2210,项目名称:VXIS,代码行数:52,代码来源:KCB_DANGKY.cs

示例9: Chuyendoituong

 public static ActionResult Chuyendoituong(KcbLuotkham objLuotkham,decimal PtramBHYTcu)
 {
     try
     {
     ActionResult _ActionResult = ActionResult.Success;
         using (var Scope = new TransactionScope())
         {
             using (var dbScope = new SharedDbConnectionScope())
             {
                 //if (PtramBHYTcu != objLuotkham.PtramBhyt.Value )
                    _ActionResult= CapnhatGiatheodoituong(objLuotkham);
                 if (_ActionResult == ActionResult.Cancel)
                 {
                     return _ActionResult;
                 }
                 new Update(KcbLuotkham.Schema)
                    .Set(KcbLuotkham.Columns.LuongCoban).EqualTo(objLuotkham.LuongCoban)
                    .Set(KcbLuotkham.Columns.TthaiChuyendi).EqualTo(objLuotkham.TthaiChuyendi)
                    .Set(KcbLuotkham.Columns.MatheBhyt).EqualTo(objLuotkham.MatheBhyt)
                    .Set(KcbLuotkham.Columns.MaNoicapBhyt).EqualTo(objLuotkham.MaNoicapBhyt)
                    .Set(KcbLuotkham.Columns.MaQuyenloi).EqualTo(objLuotkham.MaQuyenloi)
                    .Set(KcbLuotkham.Columns.NgaybatdauBhyt).EqualTo(objLuotkham.NgaybatdauBhyt)
                    .Set(KcbLuotkham.Columns.NgayketthucBhyt).EqualTo(objLuotkham.NgayketthucBhyt)
                    .Set(KcbLuotkham.Columns.NoicapBhyt).EqualTo(objLuotkham.NoicapBhyt)
                    .Set(KcbLuotkham.Columns.IdDoituongKcb).EqualTo(objLuotkham.IdDoituongKcb)
                    .Set(KcbLuotkham.Columns.MaKcbbd).EqualTo(objLuotkham.MaKcbbd)
                    .Set(KcbLuotkham.Columns.NoiDongtrusoKcbbd).EqualTo(objLuotkham.NoiDongtrusoKcbbd)
                    .Set(KcbLuotkham.Columns.MaDoituongBhyt).EqualTo(objLuotkham.MaDoituongBhyt)
                    .Set(KcbLuotkham.Columns.DungTuyen).EqualTo(objLuotkham.DungTuyen)
                    .Set(KcbLuotkham.Columns.MaDoituongKcb).EqualTo(objLuotkham.MaDoituongKcb)
                    .Set(KcbLuotkham.Columns.NguoiSua).EqualTo(globalVariables.UserName)
                    .Set(KcbLuotkham.Columns.NgaySua).EqualTo(globalVariables.SysDate)
                    .Set(KcbLuotkham.Columns.MadtuongSinhsong).EqualTo(objLuotkham.MadtuongSinhsong)
                    .Set(KcbLuotkham.Columns.GiayBhyt).EqualTo(objLuotkham.GiayBhyt)
                    .Set(KcbLuotkham.Columns.PtramBhyt).EqualTo(objLuotkham.PtramBhyt)
                    .Set(KcbLuotkham.Columns.PtramBhytGoc).EqualTo(objLuotkham.PtramBhytGoc)
                    .Set(KcbLuotkham.Columns.DiachiBhyt).EqualTo(objLuotkham.DiachiBhyt)
                    .Where(KcbLuotkham.Columns.MaLuotkham).IsEqualTo(objLuotkham.MaLuotkham)
                    .And(KcbLuotkham.Columns.IdBenhnhan).IsEqualTo(objLuotkham.IdBenhnhan)
                    .Execute();
             }
             Scope.Complete();
             return ActionResult.Success;
         }
     }
     catch (Exception ex)
     {
         Utility.ShowMsg("Lỗi khi chuyển đối tượng:\n"+ex.Message);
         return ActionResult.Exception;
     }
 }
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:51,代码来源:ChuyenDoituongKCB.cs

示例10: TinhPhanTramBHYT

        public static void TinhPhanTramBHYT(NoitruPhanbuonggiuong objNoitruPhanbuonggiuong,KcbLuotkham objLuotkham, decimal PtramBHYT)
        {
            try
               {
             decimal  BHYT_PTRAM_TRAITUYENNOITRU = Utility.DecimaltoDbnull(THU_VIEN_CHUNG.Laygiatrithamsohethong("BHYT_PTRAM_TRAITUYENNOITRU", "0", false), 0m);
               if (Utility.Int32Dbnull(objNoitruPhanbuonggiuong.TrongGoi, 0) == 1)
               {
                   objNoitruPhanbuonggiuong.BhytChitra = 0;// Utility.DecimaltoDbnull(objNoitruPhanbuonggiuong.DonGia, 0) * PtramBHYT / 100;
                   objNoitruPhanbuonggiuong.BnhanChitra = 0;
               }
               else//Ngoài gói
               {
                   if (objNoitruPhanbuonggiuong.TuTuc == 1)
                   {
                       objNoitruPhanbuonggiuong.BhytChitra = 0;
                       objNoitruPhanbuonggiuong.BnhanChitra = Utility.DecimaltoDbnull(objNoitruPhanbuonggiuong.DonGia, 0);
                   }
                   else
                   {
                       decimal BHCT = 0m;
                       if (objLuotkham.DungTuyen == 1)
                       {
                           BHCT = Utility.DecimaltoDbnull(objNoitruPhanbuonggiuong.DonGia,0) * (Utility.DecimaltoDbnull(objLuotkham.PtramBhytGoc, 0) / 100);
                       }
                       else
                       {
                           if (objLuotkham.TrangthaiNoitru <= 0)
                               BHCT = Utility.DecimaltoDbnull(objNoitruPhanbuonggiuong.DonGia,0) * (Utility.DecimaltoDbnull(objLuotkham.PtramBhyt, 0) / 100);
                           else//Nội trú cần tính=đơn giá * % đầu thẻ * % tuyến
                               BHCT = Utility.DecimaltoDbnull(objNoitruPhanbuonggiuong.DonGia, 0) * (Utility.DecimaltoDbnull(objLuotkham.PtramBhytGoc, 0) / 100) * (BHYT_PTRAM_TRAITUYENNOITRU / 100);
                       }

                       objNoitruPhanbuonggiuong.BhytChitra = BHCT;// Utility.DecimaltoDbnull(objNoitruPhanbuonggiuong.DonGia, 0) * PtramBHYT / 100;
                       objNoitruPhanbuonggiuong.BnhanChitra = Utility.DecimaltoDbnull(objNoitruPhanbuonggiuong.DonGia, 0) -
                                               BHCT;
                   }
               }
               //if (Utility.Int32Dbnull(objNoitruPhanbuonggiuong.TuTuc) == 1 && Utility.Int32Dbnull(objNoitruPhanbuonggiuong.TrongGoi) == 1)
               //{
               //    objNoitruPhanbuonggiuong.BnhanChitra = 0;
               //    objNoitruPhanbuonggiuong.BhytChitra = 0;
               //}

               }
               catch (Exception)
               {

               // throw;
               }
        }
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:50,代码来源:TinhToanPtramBHYT.cs

示例11: CreatePhieuXuatBenhNhan

        public TPhieuXuatthuocBenhnhan CreatePhieuXuatBenhNhan(KcbDonthuoc objDonthuoc, KcbDanhsachBenhnhan objBenhnhan, KcbLuotkham objLuotkham)
        {
            TPhieuXuatthuocBenhnhan objPhieuXuatBnhan = new TPhieuXuatthuocBenhnhan();
            objPhieuXuatBnhan.IdBenhnhan = objDonthuoc.IdBenhnhan;
            objPhieuXuatBnhan.MaLuotkham = objDonthuoc.MaLuotkham;
            objPhieuXuatBnhan.NgayXacnhan = globalVariables.SysDate;
            objPhieuXuatBnhan.IdPhongChidinh = Utility.Int16Dbnull(objDonthuoc.IdPhongkham);
            objPhieuXuatBnhan.IdKhoaChidinh = Utility.Int16Dbnull(objDonthuoc.IdKhoadieutri);
            objPhieuXuatBnhan.IdBacsiKedon = Utility.Int16Dbnull(objDonthuoc.IdBacsiChidinh);
            objPhieuXuatBnhan.IdDonthuoc = Utility.Int32Dbnull(objDonthuoc.IdDonthuoc);
            objPhieuXuatBnhan.IdNhanvien = globalVariables.gv_intIDNhanvien;
            //objPhieuXuatBnhan.HienThi = 1;
            if (objLuotkham != null)
            {
                objPhieuXuatBnhan.ChanDoan = Utility.sDbnull(objLuotkham.ChanDoan);
                objPhieuXuatBnhan.MabenhChinh = Utility.sDbnull(objLuotkham.MabenhChinh);
                objPhieuXuatBnhan.IdDoituongKcb = Utility.Int16Dbnull(objLuotkham.IdDoituongKcb);
                objPhieuXuatBnhan.MaDoituongKcb = objLuotkham.MaDoituongKcb;
                objPhieuXuatBnhan.MatheBhyt = Utility.sDbnull(objLuotkham.MatheBhyt);
            }
            else//Đơn thuốc tại quầy thì objLuotkham=null;
            {
                objPhieuXuatBnhan.ChanDoan = "";
                objPhieuXuatBnhan.MabenhChinh = "";
                objPhieuXuatBnhan.IdDoituongKcb = -1;
                objPhieuXuatBnhan.MaDoituongKcb = "DV";
                objPhieuXuatBnhan.MatheBhyt = "";
            }
            objPhieuXuatBnhan.GioiTinh = objBenhnhan.GioiTinh;
            objPhieuXuatBnhan.KieuThuocvattu = objDonthuoc.KieuThuocvattu;
            objPhieuXuatBnhan.TenBenhnhan = Utility.sDbnull(objBenhnhan.TenBenhnhan);
            objPhieuXuatBnhan.TenKhongdau = Utility.sDbnull(Utility.UnSignedCharacter(objBenhnhan.TenBenhnhan));
            objPhieuXuatBnhan.DiaChi = Utility.sDbnull(objBenhnhan.DiaChi);
            objPhieuXuatBnhan.NamSinh = Utility.Int32Dbnull(objBenhnhan.NamSinh);

            objPhieuXuatBnhan.NgayKedon = objDonthuoc.NgayKedon;
            objPhieuXuatBnhan.NgayTao = globalVariables.SysDate;
            objPhieuXuatBnhan.NguoiTao = objDonthuoc.NguoiTao;//Dùng cho báo cáo kê đơn theo bác sĩ(trạng thái đã cấp phát để biết người tạo là Admin)
            objPhieuXuatBnhan.NguoiPhatthuoc = globalVariables.UserName;
            objPhieuXuatBnhan.QuayThuoc = (byte)(objDonthuoc.KieuDonthuoc == 2 ? 1 : 0);//0= Đơn thuốc thường;1= Đơn thuốc bổ sung;2=Đơn thuốc tại quầy;3=Đơn tiêm chủng
            objPhieuXuatBnhan.Noitru = objDonthuoc.Noitru;
            objPhieuXuatBnhan.LoaiPhieu = (byte?)LoaiPhieu.PhieuXuatKhoBenhNhan;

            return objPhieuXuatBnhan;
        }
开发者ID:vmshis2020,项目名称:VMSHISServer,代码行数:45,代码来源:XuatThuoc.cs

示例12: InsertDataChiDinhCLS

 public ActionResult InsertDataChiDinhCLS(KcbChidinhcl objKcbChidinhcls, KcbLuotkham objLuotkham, KcbChidinhclsChitiet[] arrAssignDetails)
 {
     try
      {
          using (var scope = new TransactionScope())
          {
              using (var sh = new SharedDbConnectionScope())
              {
                  if (objKcbChidinhcls != null)
                  {
                      if (objLuotkham == null)
                      {
                          objLuotkham = new Select().From(KcbLuotkham.Schema)
                              .Where(KcbLuotkham.Columns.MaLuotkham).IsEqualTo(objKcbChidinhcls.MaLuotkham)
                              .And(KcbLuotkham.Columns.IdBenhnhan).IsEqualTo(
                                  Utility.Int32Dbnull(objKcbChidinhcls.IdBenhnhan)).ExecuteSingle<KcbLuotkham>();
                      }
                      if (objLuotkham != null)
                      {
                          objKcbChidinhcls.MaChidinh = THU_VIEN_CHUNG.SinhMaChidinhCLS();
                          objKcbChidinhcls.MaDoituongKcb = objLuotkham.MaDoituongKcb;
                          objKcbChidinhcls.IdLoaidoituongKcb = objLuotkham.IdLoaidoituongKcb;
                          objKcbChidinhcls.IdDoituongKcb = objLuotkham.IdDoituongKcb;
                          objKcbChidinhcls.MaKhoaChidinh = globalVariables.MA_KHOA_THIEN;
                          objKcbChidinhcls.IsNew = true;
                          objKcbChidinhcls.Save();
                          InsertAssignDetail(objKcbChidinhcls, objLuotkham, arrAssignDetails);
                      }
                      else
                      {
                          return ActionResult.Error;
                      }
                  }
              }
              scope.Complete();
              return ActionResult.Success;
          }
      }
      catch (Exception exception)
      {
          log.InfoException("Loi thong tin {0}", exception);
          return ActionResult.Error;
      }
 }
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:44,代码来源:KCB_CHIDINH_CANLAMSANG.cs

示例13: CapnhatGiatheodoituong

        public static ActionResult CapnhatGiatheodoituong(KcbLuotkham objLuotkham)
        {
            using (var Scope = new TransactionScope())
            {
                ActionResult _ActionResult = ActionResult.Success;

                _ActionResult = CapnhatChiphiKCB(objLuotkham);
                if (_ActionResult == ActionResult.Cancel)
                    return _ActionResult;
                _ActionResult = CapnhatChiphiCLS(objLuotkham);
                if (_ActionResult == ActionResult.Cancel)
                    return _ActionResult;
                _ActionResult = CapnhatChiphiThuoc(objLuotkham);
                if (_ActionResult == ActionResult.Cancel)
                    return _ActionResult;
                Scope.Complete();
                return ActionResult.Success;
            }
        }
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:19,代码来源:ChuyenDoituongKCB.cs

示例14: LayThongTinGia

 public static void LayThongTinGia(NoitruPhanbuonggiuong objPhanbuonggiuong, KcbLuotkham objPatientExam)
 {
     objPhanbuonggiuong.TuTuc = 0;
     SqlQuery sqlQuery = new Select().From<NoitruQheDoituongBuonggiuong>()
         .Where(NoitruQheDoituongBuonggiuong.Columns.IdGiuong).IsEqualTo(objPhanbuonggiuong.IdGiuong)
         .And(NoitruQheDoituongBuonggiuong.Columns.MaDoituongKcb).IsEqualTo(objPatientExam.MaDoituongKcb);
     NoitruQheDoituongBuonggiuong objRoomBedObjectType = sqlQuery.ExecuteSingle<NoitruQheDoituongBuonggiuong>();
     if (objRoomBedObjectType != null)
     {
         objPhanbuonggiuong.DonGia = Utility.DecimaltoDbnull(objRoomBedObjectType.DonGia);
         objPhanbuonggiuong.PhuThu = Utility.Byte2Bool(objPatientExam.DungTuyen) ? Utility.DecimaltoDbnull(objRoomBedObjectType.PhuthuDungtuyen) : Utility.DecimaltoDbnull(objRoomBedObjectType.PhuthuTraituyen);
         NoitruDmucGiuongbenh objLBed = NoitruDmucGiuongbenh.FetchByID(objPhanbuonggiuong.IdGiuong);
         {
             objPhanbuonggiuong.TuTuc = objLBed.TthaiTunguyen;
             objPhanbuonggiuong.TenHienthi = Utility.sDbnull(objLBed.TenGiuong);
             objPhanbuonggiuong.GiaGoc = Utility.DecimaltoDbnull(objLBed.DonGia);
             objPhanbuonggiuong.KieuThue = "GIUONG";
         }
     }
     else
     {
         NoitruDmucGiuongbenh objLBed = NoitruDmucGiuongbenh.FetchByID(objPhanbuonggiuong.IdGiuong);
         if (objLBed != null)
         {
             objPhanbuonggiuong.TenHienthi = Utility.sDbnull(objLBed.TenGiuong);
             objPhanbuonggiuong.DonGia = Utility.DecimaltoDbnull(objLBed.DonGia);
             objPhanbuonggiuong.PhuThu = Utility.DecimaltoDbnull(0);
             objPhanbuonggiuong.TuTuc = objLBed.TthaiTunguyen;
             objPhanbuonggiuong.KieuThue = "GIUONG";
             objPhanbuonggiuong.GiaGoc = Utility.DecimaltoDbnull(objLBed.DonGia);
             if (!THU_VIEN_CHUNG.IsBaoHiem( objPatientExam.IdLoaidoituongKcb))
             {
                 objPhanbuonggiuong.TuTuc = 0;
             }
         }
     }
         objPhanbuonggiuong.TrongGoi = 0;// Utility.ByteDbnull(objPhanbuonggiuong.TrongGoi);
     if (objPhanbuonggiuong.IdGiuong > 0 || objPhanbuonggiuong.IdBuong > 0)//Có giường thì mới tính
         TinhToanPtramBHYT.TinhPhanTramBHYT(objPhanbuonggiuong,objPatientExam, Utility.DecimaltoDbnull(objPatientExam.PtramBhytGoc));
 }
开发者ID:khaha2210,项目名称:VXIS,代码行数:40,代码来源:noitru_nhapvien.cs

示例15: TinhPtramBHYTForCLS

 /// <summary>
 /// hàm thực hiện việc tính phàn trăm bảo hiểm y tế cho cận lâm sàng
 /// </summary>
 /// <param name="objPatientExam"></param>
 public static void TinhPtramBHYTForCLS(KcbLuotkham objPatientExam)
 {
     SqlQuery sqlQuery = new Select().From(KcbChidinhclsChitiet.Schema)
        .Where(KcbChidinhclsChitiet.Columns.IdChidinh).In(
            new Select(KcbChidinhcl.Columns.IdChidinh).From(KcbChidinhcl.Schema).Where(
                KcbChidinhcl.Columns.MaLuotkham).IsEqualTo(
                    objPatientExam.MaLuotkham).And(KcbChidinhcl.Columns.IdBenhnhan).IsEqualTo(
                        objPatientExam.IdBenhnhan).And(KcbChidinhcl.Columns.Noitru).IsEqualTo(1));
        KcbChidinhclsChitietCollection objAssignDetailCollection = sqlQuery.ExecuteAsCollection<KcbChidinhclsChitietCollection>();
        decimal PtramBHYT = Utility.DecimaltoDbnull(objPatientExam.PtramBhyt);
        foreach (KcbChidinhclsChitiet objAssignDetail in objAssignDetailCollection)
        {
        TinhCLS.GB_TinhPhtramBHYT(objAssignDetail, objPatientExam, PtramBHYT);
        new Update(KcbChidinhclsChitiet.Schema)
            .Set(KcbChidinhclsChitiet.Columns.NgaySua).EqualTo(globalVariables.SysDate)
            .Set(KcbChidinhclsChitiet.Columns.NguoiSua).EqualTo(globalVariables.UserName)
            .Set(KcbChidinhclsChitiet.Columns.PtramBhyt).EqualTo(objAssignDetail.PtramBhyt)
            .Set(KcbChidinhclsChitiet.Columns.BnhanChitra).EqualTo(objAssignDetail.BnhanChitra)
            .Set(KcbChidinhclsChitiet.Columns.BhytChitra).EqualTo(objAssignDetail.BhytChitra)
            .Set(KcbChidinhclsChitiet.Columns.PhuThu).EqualTo(objAssignDetail.PhuThu)
            .Where(KcbChidinhclsChitiet.Columns.IdChitietchidinh).IsEqualTo(objAssignDetail.IdChitietchidinh).Execute();
        }
 }
开发者ID:khaha2210,项目名称:CodeNewHis,代码行数:27,代码来源:TinhToanPtramBHYT.cs


注:本文中的KcbLuotkham类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。