Esempio n. 1
0
        public HttpResponseMessage GetVitals(string id)
        {
            _icu = _con.Resolve <ICUDBMySQLRepoInterfaceLib.IICUDBRepo>();

            try
            {
                return(Request.CreateResponse(HttpStatusCode.OK, _icu.GetVitals(id)));
            }



            catch (Exception ex)
            { return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex)); }
        }
Esempio n. 2
0
        public HttpResponseMessage Put(string id, [FromBody] ICUStatu patientstatus)
        {
            _icu = _con.Resolve <ICUDBMySQLRepoInterfaceLib.IICUDBRepo>();
            var entity = _icu.UpdatePatientStatus(id, patientstatus);

            if (entity == null)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "patient with id" + id + "Is not found"));
            }

            else
            {
                return(Request.CreateResponse(HttpStatusCode.OK, "models details successfully updated "));
            }
        }
Esempio n. 3
0
        [HttpPost]//Adding customer details

        public HttpResponseMessage Post([FromBody] ICUStatu registerpatient)

        {
            _icu = _con.Resolve <ICUDBMySQLRepoInterfaceLib.IICUDBRepo>();

            var entity = _icu.AddPatient(registerpatient);

            if (entity == null)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Patient not admitted "));
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.OK, "Patient admitted  "));
            }
        }
Esempio n. 4
0
        public void DischargePatient(string id, int bedno)
        {
            _db = _con.Resolve <ICUDBMySQLRepoInterfaceLib.IICUDBRepo>();

            _db.DischargePatient(id, bedno);
        }