Example #1
0
        public HttpResponseMessage CreatePatient(Patient patient)
        {
            var transaction = new TransactionalInformation();

            if (transaction.ReturnStatus)
            {
                var new_patient_id = patientDataService.CreatePatient(patient, connectionString, SessionToken, out transaction);
                if (transaction.ReturnStatus)
                {
                    return(Request.CreateResponse <Guid>(HttpStatusCode.Created, new_patient_id));
                }
            }

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