/// <summary> /// This function is used to discharge a patient by patientId /// </summary> /// <param name="patientId"></param> public void DischargePatient(string patientId) { int bedNo = _bedAllotmentManangement.GetAllotedBedNo(patientId); _bedAllotmentManangement.DeAllotBed(bedNo); _bedConfiguration.UpdateBedConfiguration(bedNo); }
/// <summary> /// This function helps to allot bed to patients /// </summary> /// <param name="patientId"></param> public void AllotBedToPatient(string patientId) { int bedNo = _bedConfiguration.GetAvailableBed(); SqlCommand cmd = SqlConnector.CreateCommand("BedAllotment"); cmd.Parameters.AddWithValue("@PatientId", patientId); cmd.Parameters.AddWithValue("@BedNo", bedNo); SqlConnector.ExecuteConnection(cmd); _bedConfiguration.UpdateBedConfiguration(bedNo); }