Exemple #1
0
        public async Task <IActionResult> RetrieveCLReceiptsReports(CLReportRequest rData)
        {
            _logger.LogInformation($"Invoking endpoint: {this.HttpContext.Request.GetDisplayUrl()}");
            _logger.LogDebug($"Retrieve subject detail for cl receipt report- {JsonConvert.SerializeObject(rData)}");
            var clReports = await _centralLabService.RetriveCLReciptReportsDetail(rData);

            _logger.LogInformation($"Fetch Subjects for cl receipt reports {clReports}");
            return(Ok(new CLReportResponse
            {
                status = clReports.status,
                message = clReports.message,
                data = clReports.data,
            }));
        }
Exemple #2
0
        public List <CentralLabReportdetails> RetrieveShipmentStatusReport(CLReportRequest rData)
        {
            string stProc = CLShipmentStatusReport;
            var    pList  = new List <SqlParameter>()
            {
                new SqlParameter("@FromDate", rData.fromDate),
                new SqlParameter("@ToDate", rData.toDate),
                new SqlParameter("@SubjectType", rData.subjectType),
                new SqlParameter("@CentalLabID", rData.centralLabId),
                new SqlParameter("@CHCID", rData.chcId),
                new SqlParameter("@PHCID", rData.phcId),
                new SqlParameter("@ANMID", rData.anmId),
                new SqlParameter("@Status", rData.status)
            };
            var allData = UtilityDL.FillData <CentralLabReportdetails>(stProc, pList);

            return(allData);
        }
Exemple #3
0
        public async Task <CLReportResponse> RetriveCLReciptReportsDetail(CLReportRequest rData)
        {
            var tResponse = new CLReportResponse();

            try
            {
                if (rData.searchSection == 1)
                {
                    var result = _centralLabReceiptData.RetrieveSampleRecpReport(rData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (rData.searchSection == 2)
                {
                    var result = _centralLabReceiptData.RetrieveTimeoutDamagedReport(rData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (rData.searchSection == 3)
                {
                    var result = _centralLabReceiptData.RetrieveTestPendingReport(rData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (rData.searchSection == 4)
                {
                    var result = _centralLabReceiptData.RetrieveAbnormalReport(rData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (rData.searchSection == 5)
                {
                    var result = _centralLabReceiptData.RetrieveNormalReport(rData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else if (rData.searchSection == 6)
                {
                    var result = _centralLabReceiptData.RetrieveShipmentStatusReport(rData);
                    tResponse.status  = "true";
                    tResponse.message = "";
                    tResponse.data    = result;
                }
                else
                {
                    tResponse.status  = "false";
                    tResponse.message = "Please give some valid search section";
                }
            }
            catch (Exception e)
            {
                tResponse.status  = "false";
                tResponse.message = e.Message;
            }
            return(tResponse);
        }