예제 #1
0
        public Case_Settlement_Model getAllCasesReport(string connectionString, string sessionTicket, out TransactionalInformation transaction)
        {
            var method = MethodInfo.GetCurrentMethod();

            //var ipInfo = Util.GetIPInfo(HttpContext.Current.Request);

            transaction = new TransactionalInformation();
            Case_Settlement_Model caseSettlementModel = new Case_Settlement_Model();
            var userSecurityTicket = VerifySessionToken(sessionTicket);

            try
            {
                caseSettlementModel.numberOdCases = cls_Count_Treatment_or_Aftercare.Invoke(connectionString, new P_CAS_CTOA_1545()
                {
                    typeOfAction = "mm.docconect.doc.app.planned.action.treatment"
                }, userSecurityTicket).Result.NumberOfActions;
                caseSettlementModel.numberOfACCases = cls_Get_Aftercares_Count.Invoke(connectionString, new P_CAS_GAC_1104()
                {
                    ActionTypeGpmID = EActionType.PlannedAftercare.Value()
                }, userSecurityTicket).Result.AftercareCount;
            }
            catch (Exception ex)
            {
                Logger.LogInfo(new LogEntry(null, null, connectionString, method, userSecurityTicket, ex));

                transaction.ReturnMessage = new List <string>();
                string errorMessage = ex.Message;
                transaction.ReturnStatus = false;
                transaction.ReturnMessage.Add(errorMessage);
                transaction.IsAuthenicated = true;
                transaction.IsException    = true;
            }

            return(caseSettlementModel);
        }
예제 #2
0
        public HttpResponseMessage getAllCasesForPayment()
        {
            TransactionalInformation transaction        = new TransactionalInformation();
            CaseSettlementApiModel   CaseSettlementApi  = new CaseSettlementApiModel();
            Case_Settlement_Model    casesForSettlement = dashboardDataService.getAllCasesInStatus(new string[] { "4" }, connectionString, SessionToken, out transaction);

            CaseSettlementApi.CaseSettlement = casesForSettlement;
            if (transaction.ReturnStatus)
            {
                return(Request.CreateResponse(HttpStatusCode.OK, CaseSettlementApi));
            }

            return(Request.CreateResponse <TransactionalInformation>(HttpStatusCode.BadRequest, transaction));
        }
예제 #3
0
        public Case_Settlement_Model getAllCasesInStatus(string[] statusList, string connectionString, string sessionTicket, out TransactionalInformation transaction)
        {
            var method = MethodInfo.GetCurrentMethod();

            //var ipInfo = Util.GetIPInfo(HttpContext.Current.Request);

            transaction = new TransactionalInformation();
            Case_Settlement_Model caseSettlementModel = new Case_Settlement_Model();
            var userSecurityTicket = VerifySessionToken(sessionTicket);

            try
            {
                CAS_GACiFS_1515[] casesFs = cls_Get_all_Cases_in_FS_statuses.Invoke(connectionString, new P_CAS_GACiFS_1515()
                {
                    FStatus = statusList
                }, userSecurityTicket).Result;
                if (casesFs.Length > 0)
                {
                    caseSettlementModel.numberOdCases   = casesFs.GroupBy(gr => new { gr.HeaderID, gr.CodeForType }).Select(grp => grp.ToList()).ToList().Count();
                    caseSettlementModel.CaseVolumeCount = casesFs.Sum(cs => cs.NumberForPayment);
                    caseSettlementModel.oldest_case     = casesFs.Min(dt => dt.TreatmentDate);
                }
            }
            catch (Exception ex)
            {
                Logger.LogInfo(new LogEntry(null, null, connectionString, method, userSecurityTicket, ex));

                transaction.ReturnMessage = new List <string>();
                string errorMessage = ex.Message;
                transaction.ReturnStatus = false;
                transaction.ReturnMessage.Add(errorMessage);
                transaction.IsAuthenicated = true;
                transaction.IsException    = true;
            }
            return(caseSettlementModel);
        }