예제 #1
0
        public static IEnumerable <MisModel> GetDoctorListProvider(string fromDate, string toDate, string doctor)
        {
            EHMSEntities ent      = new EHMSEntities();
            DateTime     fromdate = Convert.ToDateTime(fromDate);
            DateTime     todate   = Convert.ToDateTime(toDate);
            int          doctorid = Convert.ToInt32(doctor);

            List <MisModel> MisList    = new List <MisModel>();
            var             doctorList = (from m in ent.OpdMasters
                                          join d in ent.OpdPatientDoctorDetails
                                          on m.OpdID equals d.OpdID
                                          where d.DoctorID == doctorid && m.RegistrationDate >= fromdate && m.RegistrationDate <= todate
                                          select new { m, d }).ToList();

            foreach (var item in doctorList)
            {
                MisModel model = new MisModel();
                model.OpdId            = item.m.OpdID.ToString();
                model.Name             = item.m.FirstName + " " + item.m.MiddleName + " " + item.m.LastName;
                model.Sex              = item.m.Sex;
                model.RegistrationDate = item.m.RegistrationDate;

                MisList.Add(model);
            }
            return(MisList);
        }
예제 #2
0
        public MisModel GetEHSDoctorDetailsByDocId(int DoctorId)
        {
            MisModel model = new MisModel();

            using (EHMSEntities ent = new EHMSEntities())
            {
                var result = ent.CommissionDetails.Where(x => x.DocId == DoctorId);
                if (result.Count() > 0)
                {
                    foreach (var item in result)
                    {
                        EHSDoctorDetailViewModel obj = new EHSDoctorDetailViewModel()
                        {
                            Billnumber     = item.BillNumber,
                            DoctorId       = (int)item.DocId,
                            FeeAmount      = item.CommissionAmount,
                            CommissionName = item.CommissionName,
                            TestId         = (int)item.TestId
                        };
                        model.EHSDoctorDetailViewModelList.Add(obj);
                    }
                }
            }

            return(model);
        }
예제 #3
0
        public static IEnumerable <MisModel> GetVdcMunProvider(string fromDate, string toDate, string vdcmunno)
        {
            //using (EHMSEntities ent = new EHMSEntities())
            //{
            //    return ent.Database.SqlQuery<MisModel>("getVdcMunicipality'" + vdcmunno + "'").ToList();
            //}
            EHMSEntities ent        = new EHMSEntities();
            DateTime     fromdate   = Convert.ToDateTime(fromDate);
            DateTime     todate     = Convert.ToDateTime(toDate);
            int          vdcmunnoid = Convert.ToInt32(vdcmunno);

            List <MisModel> MisList    = new List <MisModel>();
            var             vdcmunlist = (from m in ent.OpdMasters
                                          join d in ent.OpdFeeDetails
                                          on m.OpdID equals d.OpdID
                                          where m.vdcID == vdcmunnoid && m.RegistrationDate >= fromdate && m.RegistrationDate <= todate
                                          select new { m, d }).ToList();

            foreach (var item in vdcmunlist)
            {
                MisModel model = new MisModel();
                model.OpdId            = item.m.OpdID.ToString();
                model.Name             = item.m.FirstName + " " + item.m.MiddleName + " " + item.m.LastName;
                model.Sex              = item.m.Sex;
                model.RegistrationDate = item.m.RegistrationDate;

                model.Amount = item.d.TotalAmount;
                MisList.Add(model);
            }
            return(MisList);
        }
예제 #4
0
        public static IEnumerable <MisModel> GetGenderTypeProvider(string fromDate, string toDate, string genderrange)
        {
            //using (EHMSEntities ent = new EHMSEntities())
            //{
            //    //string genderrangeint = Convert.ToString(genderrange);
            //    return ent.Database.SqlQuery<MisModel>("GetGenderReport'" + genderrange + "'").ToList();
            //}
            EHMSEntities ent            = new EHMSEntities();
            DateTime     fromdate       = Convert.ToDateTime(fromDate);
            DateTime     todate         = Convert.ToDateTime(toDate);
            string       genderrangeint = genderrange;

            List <MisModel> MisList         = new List <MisModel>();
            var             genderrangelist = (from m in ent.OpdMasters
                                               join d in ent.OpdFeeDetails
                                               on m.OpdID equals d.OpdID
                                               where m.Sex == genderrangeint && m.RegistrationDate >= fromdate && m.RegistrationDate <= todate
                                               select new { m, d }).ToList();

            foreach (var item in genderrangelist)
            {
                MisModel model = new MisModel();
                model.OpdId            = item.m.OpdID.ToString();
                model.Name             = item.m.FirstName + " " + item.m.MiddleName + " " + item.m.LastName;
                model.Sex              = item.m.Sex;
                model.RegistrationDate = item.m.RegistrationDate;

                model.Amount = item.d.TotalAmount;
                MisList.Add(model);
            }
            return(MisList);
        }
예제 #5
0
        public MisModel GetMrDischargeReports()
        {
            MisModel model = new MisModel();

            model.ObjMRRecordViewModel = new MRRecordViewModel();
            using (EHMSEntities ent = new EHMSEntities())
            {
                var result = ent.MedicalRecordDischarges.OrderByDescending(x => x.MedicalRecordId).Where(x => x.Status == true).Take(50);
                if (result.Count() > 0)
                {
                    foreach (var item in result)
                    {
                        var ObjMr = new MRRecordViewModel()
                        {
                            OpdId          = item.OpdId,
                            IPId           = item.IPId,
                            RegisteredDate = item.RegisteredDate,
                            DischargeDate  = (DateTime)item.DischargeDate,
                        };

                        model.MRRecordViewModelList.Add(ObjMr);
                    }
                }
            }
            return(model);
        }
예제 #6
0
        public bool InsertMRRecordDischarge(MisModel model)
        {
            //model.ObjMRRecordViewModel = new MRRecordViewModel();

            using (EHMSEntities ent = new EHMSEntities())
            {
                var MRObject = new MedicalRecordDischarge()
                {
                    IPId                   = model.ObjIPDetailViewModel.IPId,
                    OpdId                  = model.ObjIPDetailViewModel.IPId,
                    ICDCode                = model.ObjMRRecordViewModel.ICDCode,
                    DiagnosisCode          = model.ObjMRRecordViewModel.DiagnosisCode,
                    CreatedBy              = HospitalManagementSystem.Utility.GetCurrentLoginUserId(),
                    CreatedDate            = DateTime.Now,
                    Status                 = true,
                    DischargeDocId         = model.ObjMRRecordViewModel.DischargeDocId,
                    RegisteredDate         = model.ObjIPDetailViewModel.RegisterDate,
                    DischargeDate          = model.ObjMRRecordViewModel.DischargeDate,
                    ConditionAtDischargeId = model.ObjMRRecordViewModel.ConditionAtDischargeId,
                    Remarks                = model.ObjMRRecordViewModel.Remarks
                };
                ent.MedicalRecordDischarges.Add(MRObject);
                ent.SaveChanges();
            }
            return(true);
        }
예제 #7
0
        public static IEnumerable <MisModel> GetOutReferprovider(string fromDate, string toDate, string referno)
        {
            EHMSEntities ent       = new EHMSEntities();
            DateTime     fromdate  = Convert.ToDateTime(fromDate);
            DateTime     todate    = Convert.ToDateTime(toDate);
            int          refernoid = Convert.ToInt32(referno);

            List <MisModel> MisList   = new List <MisModel>();
            var             referList = (from m in ent.OpdMasters
                                         join d in ent.OpdFeeDetails
                                         on m.OpdID equals d.OpdID
                                         where m.ReferId == refernoid && m.RegistrationDate >= fromdate && m.RegistrationDate <= todate
                                         select new { m, d }).ToList();

            foreach (var item in referList)
            {
                MisModel model = new MisModel();
                model.OpdId            = item.m.OpdID.ToString();
                model.Name             = item.m.FirstName + " " + item.m.MiddleName + " " + item.m.LastName;
                model.Sex              = item.m.Sex;
                model.RegistrationDate = item.m.RegistrationDate;

                model.Amount = item.d.TotalAmount;
                MisList.Add(model);
            }
            return(MisList);
        }
예제 #8
0
        public ActionResult MedicalRecordIndex()
        {
            MisModel    model = new MisModel();
            MisPorvider pro   = new MisPorvider();

            model = pro.GetMrDischargeReports();
            return(View(model));
        }
예제 #9
0
        public ActionResult PathoReportDetails(string JvDate, string JvDateEnd)
        {
            MisModel    model = new MisModel();
            MisPorvider pro   = new MisPorvider();

            model.PathoTestDetailViewModelList = pro.GetMisPathoTestDetails(JvDate, JvDateEnd);
            return(View(model));
        }
예제 #10
0
        public JsonResult PieChartDepartmentsWise()
        {
            MisPorvider pro   = new MisPorvider();
            MisModel    model = new MisModel();

            model.PieChartDepartmentswiseViewModelList = pro.GetDeptWiseDetailForPie();
            return(Json(model.PieChartDepartmentswiseViewModelList, JsonRequestBehavior.AllowGet));
        }
예제 #11
0
        public ActionResult DoctorCommission(string FromDateString, string TodateString)
        {
            MisModel    model = new MisModel();
            MisPorvider prop  = new MisPorvider();

            model.DoctorCommissionViewModelList = prop.GetDoctorCommissionListForMis(FromDateString, TodateString);
            return(View(model));
        }
예제 #12
0
        public ActionResult DoctorDtlById(int id)
        {
            MisModel    model = new MisModel();
            MisPorvider pro   = new MisPorvider();

            model = pro.GetEHSDoctorDetailsByDocId(id);
            return(PartialView("_Details1", model));
        }
예제 #13
0
        public ActionResult ShowMRDischargeForm(string IpNumber, string OpdNumber)
        {
            MisModel model = new MisModel();

            if (!string.IsNullOrEmpty(IpNumber) && !string.IsNullOrEmpty(OpdNumber))
            {
                //model.ObjIPDetailViewModel.IPId = Convert.ToInt32(IpNumber);
                //model.ObjIPDetailViewModel.OpdId = Convert.ToInt32(OpdNumber);
                MisPorvider pro      = new MisPorvider();
                int         IpNubmer = Convert.ToInt32(IpNumber);
                model = pro.GetIPDPatientDetailsFromIPNumber(IpNubmer);
            }
            return(View(model));
        }
예제 #14
0
        public ActionResult MRDischarge(string value)
        {
            MisModel    model    = new MisModel();
            MisPorvider pro      = new MisPorvider();
            int         IpNubmer = Convert.ToInt32(0);

            if (!string.IsNullOrEmpty(value))
            {
                IpNubmer = Convert.ToInt32(value);
                model    = pro.GetIPDPatientDetailsFromIPNumber(IpNubmer);
            }


            return(PartialView("_IPsearchValue", model));
        }
예제 #15
0
        public ActionResult SaveMedicalRecordDisharge(MisModel model)
        {
            MisPorvider pro = new MisPorvider();

            if (model.ObjMRRecordViewModel.ICDName != null)
            {
                var IcdNumber = model.ObjMRRecordViewModel.ICDName.Substring(model.ObjMRRecordViewModel.ICDName.IndexOf('~') + 1);
                using (EHMSEntities ent = new EHMSEntities())
                {
                    model.ObjMRRecordViewModel.ICDCode = Convert.ToInt32(ent.SetupIcdCodes.Where(m => m.CodeNumber == IcdNumber).Select(m => m.ICDCODEID).FirstOrDefault());
                }
            }

            pro.InsertMRRecordDischarge(model);
            return(RedirectToAction("MedicalRecordIndex"));
        }
예제 #16
0
        public ActionResult BillAmountDifference(string FromDateString, string TodateString)
        {
            MisModel    model = new MisModel();
            MisPorvider prop  = new MisPorvider();

            if (string.IsNullOrEmpty(FromDateString))
            {
                FromDateString = DateTime.Now.ToShortDateString();
            }
            if (string.IsNullOrEmpty(TodateString))
            {
                TodateString = DateTime.Now.ToShortDateString();
            }
            model.BillAmountDifferenceModelList = prop.GetBillingAmountDifference(FromDateString, TodateString);
            return(View(model));
        }
예제 #17
0
        public ActionResult GeneralAndPayableReport(string FromDateString, string TodateString, string Type)
        {
            MisModel    model = new MisModel();
            MisPorvider prop  = new MisPorvider();

            if (string.IsNullOrEmpty(FromDateString))
            {
                FromDateString = DateTime.Now.ToShortDateString();
            }
            if (string.IsNullOrEmpty(TodateString))
            {
                TodateString = DateTime.Now.ToShortDateString();
            }
            if (string.IsNullOrEmpty(Type))
            {
                Type = "0";
            }
            model.GeneralPayableReportModelList = prop.GetBillingReportGeneralAndPayable(FromDateString, TodateString, Type);
            return(View(model));
        }
예제 #18
0
        public MisModel GetIPDPatientDetailsFromIPNumber(int IpNumber)
        {
            MisModel model = new MisModel();

            using (EHMSEntities ent = new EHMSEntities())
            {
                var result = ent.IpdRegistrationMasters.Where(x => x.IpdRegistrationID == IpNumber && x.Status == true);
                if (result.Count() > 0)
                {
                    var FirstResult = result.FirstOrDefault();
                    model.ObjIPDetailViewModel.IPId         = FirstResult.IpdRegistrationID;
                    model.ObjIPDetailViewModel.OpdId        = FirstResult.OpdNoEmergencyNo;
                    model.ObjIPDetailViewModel.RegisterDate = FirstResult.RegistrationDate;
                    //model.ObjIPDetailViewModel.ReferDocId = FirstResult.ReferDoctorId;
                }
            }


            return(model);
        }
예제 #19
0
        public ActionResult PayDoctorCommission(string FromDateString, string TodateString, string DoctorName)
        {
            MisModel    model = new MisModel();
            MisPorvider prop  = new MisPorvider();

            if (string.IsNullOrEmpty(DoctorName))
            {
                model.DoctorCommissionViewModelList = prop.GetDoctorCommissionListByDocId(0, FromDateString, TodateString);
            }
            else
            {
                int ReferDocId = Convert.ToInt32(DoctorName);
                if (ReferDocId == 1009)
                {
                    model.DoctorCommissionViewModelList = prop.GetDoctorCommissionListByDocId(0, FromDateString, TodateString);
                }
                else
                {
                    model.DoctorCommissionViewModelList = prop.GetDoctorCommissionListByDocId(ReferDocId, FromDateString, TodateString);
                }
            }
            return(View(model));
        }
예제 #20
0
        public ActionResult MRMainPage()
        {
            MisModel model = new MisModel();

            return(View(model));
        }
예제 #21
0
        public static IEnumerable <MisModel> GetOpdList(string fromDate, string toDate, string department)
        {
            EHMSEntities ent      = new EHMSEntities();
            DateTime     fromdate = Convert.ToDateTime(fromDate);
            DateTime     todate   = Convert.ToDateTime(toDate);

            List <MisModel> MisList = new List <MisModel>();

            if (department == "1")
            {
                var opdList = (from m in ent.OpdMasters
                               join d in ent.OpdFeeDetails
                               on m.OpdID equals d.OpdID
                               where m.RegistrationDate >= fromdate && m.RegistrationDate <= todate
                               select new { m, d }).ToList();

                foreach (var item in opdList)
                {
                    MisModel model = new MisModel();
                    model.OpdId            = item.m.OpdID.ToString();
                    model.Name             = item.m.FirstName + " " + item.m.MiddleName + " " + item.m.LastName;
                    model.Sex              = item.m.Sex;
                    model.RegistrationDate = item.m.RegistrationDate;

                    model.Amount = item.d.TotalAmount;
                    MisList.Add(model);
                }
            }
            else if (department == "2")
            {
                var OpThList = (from m in ent.OperationTheatreMasters
                                join
                                p in ent.OpdMasters
                                on m.SourceID equals p.OpdID
                                join r in ent.SetupOperationTheatreRooms
                                on m.OperationRoomID equals r.OperationTheatreRoomID
                                join d in ent.OpdFeeDetails
                                on p.OpdID equals d.OpdID
                                where m.OperationDate >= fromdate && m.OperationDate <= todate && m.Status == true
                                select new { m, p, r, d }).ToList();

                foreach (var item in OpThList)
                {
                    MisModel model = new MisModel();

                    model.OperationTheatreId = item.m.OperationTheatreMasterID;
                    model.OperationDate      = item.m.OperationDate;
                    model.OperationTime      = item.m.OperationStartTime;
                    model.OperationEndTime   = item.m.OperationEndTime;
                    model.OperationRoom      = item.r.RoomName;
                    model.PatientName        = item.p.FirstName + " " + item.p.MiddleName + " " + item.p.LastName;
                    model.TotalCharge        = item.m.TotalCharge;
                    model.FeeDate            = item.d.FeeDate;

                    MisList.Add(model);
                }
            }



            return(MisList);
        }
예제 #22
0
        public ActionResult PayablePatientReport()
        {
            MisModel model = new MisModel();

            return(View(model));
        }
예제 #23
0
        public ActionResult MRDischarge()
        {
            MisModel model = new MisModel();

            return(View(model));
        }