Example #1
0
        public HttpResponseMessage SavePatientInformation(PatientDetails patientInformation)
        {
            string msg = string.Empty;
            HttpResponseMessage response = null;
            HttpRequestMessage  request  = new HttpRequestMessage();

            request.Properties.Add(HttpPropertyKeys.HttpConfigurationKey, new HttpConfiguration());
            try
            {
                var resultXML = CreateObjectToXML(patientInformation);
                objPatientRepository.SetPatientInfo(resultXML);
                response = request.CreateResponse <PatientDetails>(HttpStatusCode.OK, patientInformation);
            }
            catch (Exception ex)
            {
                msg = ex.Message;
            }
            return(response);
        }