Exemplo n.º 1
0
        public List <CHCHPLCPositiveSamples> GetPositiveDetails(CHCPositiveSamplesRequest cpData)
        {
            string stProc = FetchPositiveSubjects;
            var    pList  = new List <SqlParameter>()
            {
                new SqlParameter("@CHCId", cpData.chcId),
                new SqlParameter("@RegisteredFrom", cpData.registeredFrom),
            };
            var allData = UtilityDL.FillData <CHCHPLCPositiveSamples>(stProc, pList);

            return(allData);
        }
Exemplo n.º 2
0
 public HPLCPositiveSubjectsResponse GetHPLCPositiveSubjects(CHCPositiveSamplesRequest cpData)
 {
     _logger.LogInformation($"Invoking endpoint: {this.HttpContext.Request.GetDisplayUrl()}");
     try
     {
         _logger.LogDebug($"Request - Received hplc positive subject data - {JsonConvert.SerializeObject(cpData)}");
         var positiveSubjects = _chcNotificationsService.GetPositiveDetails(cpData);
         _logger.LogInformation($"Received hplc positive subject data {positiveSubjects}");
         _logger.LogDebug($"Respone - Received hplc positive subject data - {JsonConvert.SerializeObject(positiveSubjects)}");
         return(positiveSubjects.Count == 0 ? new HPLCPositiveSubjectsResponse {
             Status = "true", Message = "No positive subjects data found", positiveSubjects = new List <CHCHPLCPositiveSamples>()
         }
         : new HPLCPositiveSubjectsResponse {
             Status = "true", Message = string.Empty, positiveSubjects = positiveSubjects
         });
     }
     catch (Exception e)
     {
         _logger.LogError($"Error in  receiving hplc positive subjects data {e.StackTrace}");
         return(new HPLCPositiveSubjectsResponse {
             Status = "false", Message = e.Message, positiveSubjects = null
         });
     }
 }
Exemplo n.º 3
0
        public List <CHCHPLCPositiveSamples> GetPositiveDetails(CHCPositiveSamplesRequest cpData)
        {
            var positiveSubjects = _chcNotificationsData.GetPositiveDetails(cpData);

            return(positiveSubjects);
        }