예제 #1
0
        public HttpResponseMessage CheckNewKVNRValidation([FromUri] string insuranceNumber)
        {
            var transaction = new TransactionalInformation();
            var isKVNRValid = patientDataService.CheckIfKVNRIsValid(insuranceNumber, connectionString, SessionToken, out transaction);

            if (transaction.ReturnStatus)
            {
                return(Request.CreateResponse <bool>(HttpStatusCode.OK, isKVNRValid));
            }
            var badResponse = Request.CreateResponse <TransactionalInformation>(HttpStatusCode.InternalServerError, transaction);

            return(badResponse);
        }