public string EditPatientSupportSystemCriteria(int patientId, int patientmastervisitId, bool takingART, bool supportGroup, bool TSIdentified, bool smsreminder, bool othersupport) { string msg = ""; int result = 0; PatientSupportSystemCriteriaManager patientSupportSystemCriteriaManager = new PatientSupportSystemCriteriaManager(); try { PatientSupportSystemCriteria patientSupportSystemCriteria = new PatientSupportSystemCriteria() { PatientId = patientId, PatientMasterVisitId = patientmastervisitId, TakingART = takingART, supportGroup = supportGroup, TSIdentified = TSIdentified, EnrollSMSReminder = smsreminder, OtherSupportSystems = othersupport }; result = patientSupportSystemCriteriaManager.EditPreparation(patientSupportSystemCriteria); if (result > 0) { msg = "Patient Support System criteria assessment update completed!"; msg = new JavaScriptSerializer().Serialize(msg); } } catch (Exception e) { msg = e.Message; msg = new JavaScriptSerializer().Serialize(msg); } return(msg); }
public List <PatientSupportSystemCriteria> GetPatientSupportSystemCriteria(int patientId) { PatientSupportSystemCriteriaManager patientSupportSystemCriteriaManager = new PatientSupportSystemCriteriaManager(); try { return(patientSupportSystemCriteriaManager.GetPatientSupportSystemCriteriaDetails(patientId)); } catch (Exception e) { throw e.InnerException; } }
public int CheckIfSupportSystemCriteriaExists(int patientId) { int result = 0; //string msg = ""; PatientSupportSystemCriteriaManager patientSupportSystemCriteriaManager = new PatientSupportSystemCriteriaManager(); try { result = patientSupportSystemCriteriaManager.checkIfARTPreparationExists(patientId); } catch (Exception e) { // var msg = new JavaScriptSerializer().Serialize(e.Message); throw e.InnerException; } return(result); }
public string AddPatientSupportSystemCriteria(int patientId, int patientmastervisitId, bool takingART, bool supportGroup, bool TSIdentified, bool smsreminder, bool othersupport) { string msg = ""; int result = 0; PatientSupportSystemCriteriaManager patientSupportSystemCriteriaManager = new PatientSupportSystemCriteriaManager(); try { PatientSupportSystemCriteria patientSupportSystemCriteria = new PatientSupportSystemCriteria() { PatientId = patientId, PatientMasterVisitId = patientmastervisitId, TakingART = takingART, supportGroup = supportGroup, TSIdentified = TSIdentified, EnrollSMSReminder = smsreminder, OtherSupportSystems = othersupport }; int isInserted = 0; isInserted = patientSupportSystemCriteriaManager.checkIfARTPreparationExists(patientId); if (isInserted < 1) { result = patientSupportSystemCriteriaManager.AddPreparation(patientSupportSystemCriteria); if (result > 0) { msg = "Patient Psychosocial criteria assessment completed!"; msg = new JavaScriptSerializer().Serialize(msg); } } else { msg = "Patient Psychosocial criteria assessment already completed!"; msg = new JavaScriptSerializer().Serialize(msg); } } catch (Exception e) { msg = e.Message; msg = new JavaScriptSerializer().Serialize(msg); } return(msg); }
public string DeleteSupportSystemCriteria(int id) { int result = 0; string msg = ""; PatientSupportSystemCriteriaManager patientSupportSystemCriteriaManager = new PatientSupportSystemCriteriaManager(); try { result = patientSupportSystemCriteriaManager.DeletePreparation(id); if (result > 0) { msg = "Psychosocial criteria deleted successfuly"; msg = new JavaScriptSerializer().Serialize(msg); } } catch (Exception e) { msg = e.Message; msg = new JavaScriptSerializer().Serialize(msg); } return(msg); }