public ActionResult get_ORRequest(string bdate)
        {
            PatientStatisticsDB _DB = new PatientStatisticsDB();
            ORDailyDashORA      _RE = _DB.get_ORRequest(bdate);
            var serializer          = new JavaScriptSerializer {
                MaxJsonLength = Int32.MaxValue
            };
            var result = new ContentResult
            {
                Content     = serializer.Serialize(new { Res = _RE ?? new ORDailyDashORA() }),
                ContentType = "application/json"
            };

            return(result);
        }
        public ActionResult get_CANOPBill_Amount(string fdate, string tdate, int receipts, string billtype)
        {
            PatientStatisticsDB _DB = new PatientStatisticsDB();
            OPBILLCanAmount     _RE = _DB.get_CANOPBill_Amount(fdate, tdate, receipts, billtype);
            var serializer          = new JavaScriptSerializer {
                MaxJsonLength = Int32.MaxValue
            };
            var result = new ContentResult
            {
                Content     = serializer.Serialize(new { Res = _RE ?? new OPBILLCanAmount() }),
                ContentType = "application/json"
            };

            return(result);
        }
        public ActionResult get_DashboardMonitoring(string bdate)
        {
            PatientStatisticsDB    _DB = new PatientStatisticsDB();
            DailyDashboardMonModel _RE = _DB.get_DashboardMonitoring(bdate);
            var serializer             = new JavaScriptSerializer {
                MaxJsonLength = Int32.MaxValue
            };
            var result = new ContentResult
            {
                Content     = serializer.Serialize(new { Res = _RE ?? new DailyDashboardMonModel() }),
                ContentType = "application/json"
            };

            return(result);
        }
        public ActionResult get_BI_Operator()
        {
            PatientStatisticsDB   _DB = new PatientStatisticsDB();
            List <CANServiceType> _RE = _DB.get_BI_Operator();
            var serializer            = new JavaScriptSerializer {
                MaxJsonLength = Int32.MaxValue
            };
            var result = new ContentResult
            {
                Content     = serializer.Serialize(new { Res = _RE ?? new List <CANServiceType>() }),
                ContentType = "application/json"
            };

            return(result);
        }
        public ActionResult get_Cancellation_Stats(string fdate, string tdate,
                                                   string sertype, string station, string billtype, string chargeby, string reason, int recfilter)
        {
            PatientStatisticsDB   _DB = new PatientStatisticsDB();
            List <CANResultModel> _RE = _DB.get_Cancellation_Stats(fdate, tdate, sertype, station, billtype, chargeby, reason, recfilter);
            var serializer            = new JavaScriptSerializer {
                MaxJsonLength = Int32.MaxValue
            };
            var result = new ContentResult
            {
                Content     = serializer.Serialize(new { Res = _RE ?? new List <CANResultModel>() }),
                ContentType = "application/json"
            };

            return(result);
        }
        public ActionResult graph_DashboardMonitoring(string bdate)
        {
            PatientStatisticsDB _DB        = new PatientStatisticsDB();
            DataSet             reportData = _DB.graph_DashboardMonitoring(bdate);
            var CashList = reportData.Tables[0].AsEnumerable().Select(
                r => new CashList {
                NO_PATIENT_CASH = r.Field <int>("NO_PATIENT"),
                DeptName_CASH   = r.Field <string>("DeptName")
            });
            var ChargeList = reportData.Tables[1].AsEnumerable().Select(
                r => new CashList
            {
                NO_PATIENT_CASH = r.Field <int>("NO_PATIENT"),
                DeptName_CASH   = r.Field <string>("DeptName")
            });
            var ARAMCOList = reportData.Tables[2].AsEnumerable().Select(
                r => new CashList
            {
                NO_PATIENT_CASH = r.Field <int>("NO_PATIENT"),
                DeptName_CASH   = r.Field <string>("DeptName")
            });
            var serializer = new JavaScriptSerializer {
                MaxJsonLength = Int32.MaxValue
            };

            var GraphList = new GraphList {
                CASH     = new List <CashList>(CashList.ToList())
                , CHARGE = new List <CashList>(ChargeList.ToList())
                , ARAMCO = new List <CashList>(ARAMCOList.ToList())
            };
            var result = new ContentResult
            {
                Content = serializer.Serialize(
                    new { GraphList = GraphList }
                    ),
                ContentType = "application/json"
            };

            return(result);
        }