public object DeleteIcu(string icuId) { var statusCode = this._config.DeleteIcu(icuId, DbOps.GetDbPath()); if (statusCode.Equals(HttpStatusCode.InternalServerError)) { return(BadRequest()); } return(Ok()); }
public IActionResult PostIcuModelData([FromBody] IcuModel newIcuModel) { var statusCode = this._config.AddNewIcuConfiguration(newIcuModel, DbOps.GetDbPath()); if (statusCode.Equals(HttpStatusCode.InternalServerError)) { return(BadRequest()); } return(Ok()); }
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); }
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)); }
public IActionResult PostBedModelData([FromBody] BedModel newBedModel) { this._config.AddNewBedConfiguration(newBedModel, DbOps.GetDbPath()); return(Ok(200)); }
public IActionResult GetIcuModelInformation() { var icuData = this._config.GetIcuConfiguration(DbOps.GetDbPath()); return(Ok(icuData)); }
public Dictionary <int, BedModel> GetBedModelInformation() { var bedData = this._config.GetBedConfigurationInformation(DbOps.GetDbPath()); return(bedData); }
public IActionResult GetAllBedLayouts() { var bedLayouts = this._config.GetAllBedLayouts(DbOps.GetDbPath()); return(Ok(bedLayouts)); }
public IActionResult Delete(int bedId) { var removeBed = this._config.RemoveBed(bedId, DbOps.GetDbPath()); return(Ok(removeBed)); }
public IActionResult Delete(string pId) { var dischargePatient = this._occupancyService.DischargePatient(pId, DbOps.GetDbPath()); return(Ok(dischargePatient)); }
public IActionResult GetBedStatus(int bedId) { var bedStatus = this._occupancyService.IsBedFree(bedId, DbOps.GetDbPath()); return(Ok(bedStatus)); }
public IActionResult GetBedDetailsForIcu(string icuId) { var bedModel = this._occupancyService.GetBedDetailsForIcu(icuId, DbOps.GetDbPath()); return(Ok(bedModel)); }
public IActionResult GetBedDetails() { var bedModel = this._occupancyService.GetBedDetails(DbOps.GetDbPath()); return(Ok(bedModel)); }
public IActionResult Get(string icuId) { var patientModels = this._occupancyService.GetPatientsDetailsInIcu(icuId, DbOps.GetDbPath()); return(Ok(patientModels)); }
public IActionResult GetAllPatients() { var patientModels = this._occupancyService.GetPatientsDetails(DbOps.GetDbPath()); return(Ok(patientModels)); }