Exemple #1
0
        public List <CentralLabReports> RetriveCentralLabReports(CentralLabReportRequest mrData)
        {
            string stProc = FetchCentralLabStatusReports;
            var    pList  = new List <SqlParameter>()
            {
                new SqlParameter("@SampleStatus", mrData.sampleStatus),
                new SqlParameter("@CentralLabId", mrData.centralLabId),
                new SqlParameter("@CHCID", mrData.chcId),
                new SqlParameter("@PHCID", mrData.phcId),
                new SqlParameter("@ANMID", mrData.anmId),
                new SqlParameter("@FromDate", mrData.fromDate.ToCheckNull()),
                new SqlParameter("@ToDate", mrData.toDate.ToCheckNull()),
            };
            var allSubjects = UtilityDL.FillData <CentralLabReports>(stProc, pList);

            return(allSubjects);
        }
Exemple #2
0
 public CentralLabReportResponse GetCentralLabReports(CentralLabReportRequest mrData)
 {
     _logger.LogInformation($"Invoking endpoint: {this.HttpContext.Request.GetDisplayUrl()}");
     try
     {
         _logger.LogDebug($"Request - Received subject for central lab test reports  - {JsonConvert.SerializeObject(mrData)}");
         var subjects = _centralLabService.RetriveCentralLabReports(mrData);
         _logger.LogInformation($" Received subject for central lab test reports  {subjects}");
         _logger.LogDebug($"Response - Received subject for central lab test reports   - {JsonConvert.SerializeObject(subjects)}");
         return(subjects.Count == 0 ? new CentralLabReportResponse {
             Status = "true", Message = "No subjects found", Subjects = new List <CentralLabReports>()
         }
         : new CentralLabReportResponse {
             Status = "true", Message = string.Empty, Subjects = subjects
         });
     }
     catch (Exception e)
     {
         _logger.LogError($"Failed to retrieve subject for central lab test reports  - {e.StackTrace}");
         return(new CentralLabReportResponse {
             Status = "false", Message = e.Message, Subjects = null
         });
     }
 }
Exemple #3
0
        public List <CentralLabReports> RetriveCentralLabReports(CentralLabReportRequest mrData)
        {
            var allSubject = _centralLabReceiptData.RetriveCentralLabReports(mrData);

            return(allSubject);
        }