Beispiel #1
0
        public object DeleteIcu(string icuId)
        {
            var statusCode = this._config.DeleteIcu(icuId, DbOps.GetDbPath());

            if (statusCode.Equals(HttpStatusCode.InternalServerError))
            {
                return(BadRequest());
            }
            return(Ok());
        }
Beispiel #2
0
        public IActionResult PostIcuModelData([FromBody] IcuModel newIcuModel)
        {
            var statusCode = this._config.AddNewIcuConfiguration(newIcuModel, DbOps.GetDbPath());

            if (statusCode.Equals(HttpStatusCode.InternalServerError))
            {
                return(BadRequest());
            }
            return(Ok());
        }
Beispiel #3
0
        public Dictionary <string, PatientVital> CheckVitalOfAllPatients()
        {
            var patientsObj = new PatientDbOps(DbOps.GetDbPath());

            Patients = patientsObj.GetAllPatientsFromDb();
            var vitals = new Dictionary <string, PatientVital>();

            foreach (var var1 in Patients)
            {
                var ret = GetRandomDataForPatient(var1.Key);
                vitals.Add(var1.Key, ret);
            }

            return(vitals);
        }
Beispiel #4
0
        public IActionResult Post([FromBody] PatientModel newPatient)
        {
            var dbPath = DbOps.GetDbPath();

            if (newPatient.Equals(null))
            {
                return(BadRequest());
            }
            var patientModelData = this._occupancyService.AddNewPatient(newPatient, dbPath);

            if (patientModelData.Equals(HttpStatusCode.InternalServerError))
            {
                return(BadRequest());
            }
            return(Ok(patientModelData));
        }
Beispiel #5
0
 public IActionResult PostBedModelData([FromBody] BedModel newBedModel)
 {
     this._config.AddNewBedConfiguration(newBedModel, DbOps.GetDbPath());
     return(Ok(200));
 }
Beispiel #6
0
        public IActionResult GetIcuModelInformation()
        {
            var icuData = this._config.GetIcuConfiguration(DbOps.GetDbPath());

            return(Ok(icuData));
        }
Beispiel #7
0
        public Dictionary <int, BedModel> GetBedModelInformation()
        {
            var bedData = this._config.GetBedConfigurationInformation(DbOps.GetDbPath());

            return(bedData);
        }
Beispiel #8
0
        public IActionResult GetAllBedLayouts()
        {
            var bedLayouts = this._config.GetAllBedLayouts(DbOps.GetDbPath());

            return(Ok(bedLayouts));
        }
Beispiel #9
0
        public IActionResult Delete(int bedId)
        {
            var removeBed = this._config.RemoveBed(bedId, DbOps.GetDbPath());

            return(Ok(removeBed));
        }
Beispiel #10
0
        public IActionResult Delete(string pId)
        {
            var dischargePatient = this._occupancyService.DischargePatient(pId, DbOps.GetDbPath());

            return(Ok(dischargePatient));
        }
Beispiel #11
0
        public IActionResult GetBedStatus(int bedId)
        {
            var bedStatus = this._occupancyService.IsBedFree(bedId, DbOps.GetDbPath());

            return(Ok(bedStatus));
        }
Beispiel #12
0
        public IActionResult GetBedDetailsForIcu(string icuId)
        {
            var bedModel = this._occupancyService.GetBedDetailsForIcu(icuId, DbOps.GetDbPath());

            return(Ok(bedModel));
        }
Beispiel #13
0
        public IActionResult GetBedDetails()
        {
            var bedModel = this._occupancyService.GetBedDetails(DbOps.GetDbPath());

            return(Ok(bedModel));
        }
Beispiel #14
0
        public IActionResult Get(string icuId)
        {
            var patientModels = this._occupancyService.GetPatientsDetailsInIcu(icuId, DbOps.GetDbPath());

            return(Ok(patientModels));
        }
Beispiel #15
0
        public IActionResult GetAllPatients()
        {
            var patientModels = this._occupancyService.GetPatientsDetails(DbOps.GetDbPath());

            return(Ok(patientModels));
        }