public PatientAlertingViewModel() { patient1AlertingModel = new PatientAlertingModel(101); patient2AlertingModel = new PatientAlertingModel(102); patient3AlertingModel = new PatientAlertingModel(103); patient4AlertingModel = new PatientAlertingModel(104); patient5AlertingModel = new PatientAlertingModel(105); patient6AlertingModel = new PatientAlertingModel(106); }
public static void CallToBedThread(PatientAlertingModel model, int seconds) { while (true) { if (DateTime.Now.Second % seconds == 0 && model.AlertMessage == "") { PatientAlertingViewModel.InvokePatientAlert(model); } } }
public static void InvokePatientAlert(PatientAlertingModel patientAlertingModel) { string message; DataStoreService.PatientDbQueryClient dbQueryClient = new DataStoreService.PatientDbQueryClient(); patientAlertingModel.PatientID = dbQueryClient.GetAdmittedPatientID(patientAlertingModel.BedNumber).ToString(); MonitoringService.ControllerClient monitoringClient = new MonitoringService.ControllerClient(); string jsonData = monitoringClient.GenerateVitalSignAsJson(patientAlertingModel.PatientID); AlertingService.AlertingControllerClient alertingClient = new AlertingService.AlertingControllerClient(); alertingClient.ValidatePatientVitalSigns(patientAlertingModel.PatientID, jsonData, out message); patientAlertingModel.AlertMessage = message; }
public static void DischargePatient(PatientAlertingModel patientAlertingModel) { DataStoreService.PatientDbQueryClient dbQueryClient = new DataStoreService.PatientDbQueryClient(); dbQueryClient.Discharge(int.Parse(patientAlertingModel.PatientID)); patientAlertingModel.AlertMessage = ""; }
public static void UndoReset(PatientAlertingModel patientAlertingModel) { patientAlertingModel.AlertMessage = patientAlertingModel.RecentAlertMessage; }
public static void ResetAlert(PatientAlertingModel patientAlertingModel) { patientAlertingModel.RecentAlertMessage = patientAlertingModel.AlertMessage; patientAlertingModel.AlertMessage = ""; }