コード例 #1
0
        public ActionResult GetSpecializedLabSamples(SpecializedLabSampleDto requestModel)
        {
            var resposeModel = patientService.GetSpecializedLabSamples(requestModel);

            if (resposeModel != null)
            {
                return(Ok(GetResponse(ResponseType.OBJECT, ResponseStatusCode.SUCCESS, resposeModel)));
            }
            else
            {
                return(Ok(GetResponse(ResponseType.FAIL, ResponseStatusCode.FAIL, GetError(ErrorCodes.dataNotFound, "No lab samples found", "Something went wrong!"))));
            }
        }
コード例 #2
0
 public ActionResult UpdateSpecializedLabSamples(SpecializedLabSampleDto requestModel)
 {
     if (requestModel != null)
     {
         try
         {
             patientService.UpdateSpecializedLabSamples(requestModel);
         }
         catch (Exception e)
         {
             Program.Logger.Error(e);
             return(Ok(GetResponse(ResponseType.FAIL, ResponseStatusCode.FAIL, GetError(ErrorCodes.dataNotFound, "Failed", "Error occurred while updating the lab samples"))));
         }
         return(Ok(GetResponse(ResponseType.ACK, ResponseStatusCode.SUCCESS)));
     }
     else
     {
         return(BadRequest(GetResponse(ResponseType.ERROR, ResponseStatusCode.ERROR, GetError(ErrorCodes.invalidData, "Invalid input", "Please select proper lab samples"))));
     }
 }
コード例 #3
0
        public async Task <SpecializedLabSampleDto> GetSpecializedLabSamples(SpecializedLabSampleDto model)
        {
            var url = URLBuilder.GetURL(Controllers.PATIENT, EndPoint.PATIENT_GET_SPECIALIZED_LAB_SAMPLES);

            return(await requestProvider.PostAsync(url, model));
        }