Exemple #1
0
        public HttpResponseMessage GetPatients([FromUri] ElasticParameterObject parameters)
        {
            var transaction = new TransactionalInformation();

            if (transaction.ReturnStatus)
            {
                var             data            = patientDataService.GetPatients(parameters, connectionString, SessionToken, out transaction);
                PatientApiModel patientApiModel = new PatientApiModel();
                patientApiModel.patient = data;

                if (transaction.ReturnStatus)
                {
                    return(Request.CreateResponse <PatientApiModel>(HttpStatusCode.OK, patientApiModel));
                }
            }

            return(Request.CreateResponse <TransactionalInformation>(HttpStatusCode.InternalServerError, transaction));
        }