public string EditAdverseEventOutcome(int id, int patientId, int patientMasterVisitId, int adverseEventId, int outcomeId, DateTime outcomeDate) { PatientAdverseEventOutcomeManager adverseEventOutcomeManager = new PatientAdverseEventOutcomeManager(); var eventOutcome = new Entities.CCC.Triage.PatientAdverseEventOutcome() { Id = id, PatientId = patientId, PatientMasterVisitid = patientMasterVisitId, AdverseEventId = adverseEventId, OutcomeId = outcomeId, OutcomeDate = outcomeDate }; return(adverseEventOutcomeManager.UpdatePatientAdverseEventOutcome(eventOutcome)); }
public string AddAdverseEventOutcome(int patientId, int patientMasterVisitId, int adverseEventId, int outcomeId, DateTime outcomeDate) { PatientAdverseEventOutcomeManager adverseEventOutcomeManager = new PatientAdverseEventOutcomeManager(); var adverseOutcome = new Entities.CCC.Triage.PatientAdverseEventOutcome() { PatientId = patientId, PatientMasterVisitid = patientMasterVisitId, AdverseEventId = adverseEventId, OutcomeId = outcomeId, OutcomeDate = outcomeDate, UserId = Convert.ToInt32(Session["AppUserId"]) }; return(adverseEventOutcomeManager.SavePatientAdverseEventOutcome(adverseOutcome)); }
public ArrayList GetAdverseEvents() { int adverseEventId = 0; int patientId = Convert.ToInt32(Session["PatientPK"].ToString()); int patientMasterVisitId = Convert.ToInt32(Session["ExistingRecordPatientMasterVisitID"].ToString() == "0" ? Session["PatientMasterVisitID"].ToString() : Session["ExistingRecordPatientMasterVisitID"].ToString()); var outcomeString = ""; PatientEncounterLogic patientEncounter = new PatientEncounterLogic(); PatientAdverseEventOutcomeManager patientAdverseEventOutcome = new PatientAdverseEventOutcomeManager(); LookupLogic lookupLogic = new LookupLogic(); DataTable theDT = patientEncounter.loadPatientEncounterAdverseEvents(Session["ExistingRecordPatientMasterVisitID"].ToString() == "0" ? Session["PatientMasterVisitID"].ToString() : Session["ExistingRecordPatientMasterVisitID"].ToString(), Session["PatientPK"].ToString()); ArrayList rows = new ArrayList(); foreach (DataRow row in theDT.Rows) { string eventoutcome = ""; DateTime outcomeDate = DateTime.Today; //get the adverse Event form the db var items = lookupLogic.GetItemIdByGroupAndItemName("AdverseEvents", row["EventName"].ToString()); foreach (var item in items) { adverseEventId = item.ItemId; } // get the outcome for the adverse event // var outcome =patientAdverseEventOutcome.GetAdverseEventOutcome(adverseEventId, patientMasterVisitId, patientId); var adverseEventOutcomes = patientAdverseEventOutcome.GetAdverseEventOutcome(adverseEventId, patientMasterVisitId, patientId); if (adverseEventOutcomes.Count > 0) { foreach (var adverseEventOutcome in adverseEventOutcomes) { eventoutcome = lookupLogic.GetLookupItemNameById(adverseEventOutcome.OutcomeId); outcomeDate = Convert.ToDateTime(adverseEventOutcome.OutcomeDate); } if (string.IsNullOrEmpty(eventoutcome)) { string[] i = new string[7] { row["SeverityID"].ToString(), row["AdverseEventId"].ToString(), row["EventName"].ToString(), row["EventCause"].ToString(), row["Severity"].ToString(), row["Action"].ToString(), "<button type='button' class='btnAddAdverseEventOutcome btn btn-info fa fa-plus-circle btn-fill' onclick='AdverseEventOutcome();'> Specify Outcome</button> <button type='button' class='btnDelete btn btn-danger fa fa-minus-circle btn-fill' > Remove</button>" }; rows.Add(i); } else { if (eventoutcome == "Died") { outcomeString = "<span class='text-danger'><strong>" + eventoutcome + "</strong></span> | <span class='text-info'><strong>" + outcomeDate.ToString("dd-MMM-yyy") + "</strong></span>"; } else { outcomeString = "<span class='text-primary'><strong>" + eventoutcome + "</strong></span> | <span class='text-info'><strong>" + outcomeDate.ToString("dd-MMM-yyy") + "</strong></span>"; } string[] i = new string[6] { row["SeverityID"].ToString(), row["EventName"].ToString(), row["EventCause"].ToString(), row["Severity"].ToString(), row["Action"].ToString(), outcomeString //"<span class='text-info'>outcome:</span>"+eventoutcome+ "<span class='text-info'>outcome Date:</span>"+ outcomeDate }; rows.Add(i); } } else { string[] i = new string[7] { row["SeverityID"].ToString(), row["AdverseEventId"].ToString(), row["EventName"].ToString(), row["EventCause"].ToString(), row["Severity"].ToString(), row["Action"].ToString(), "<button type='button' class='btnAddAdverseEventOutcome btn btn-info fa fa-plus-circle btn-fill' onclick='AdverseEventOutcome();'> Specify Outcome</button> <button type='button' class='btnDelete btn btn-danger fa fa-minus-circle btn-fill' > Remove</button>" }; rows.Add(i); } } return(rows); }
public List <Entities.CCC.Triage.PatientAdverseEventOutcome> GetAdverseEventOutcome(int adverseId, int patientMasterVisitId, int patientId) { PatientAdverseEventOutcomeManager adverseEventOutcomeManager = new PatientAdverseEventOutcomeManager(); return(adverseEventOutcomeManager.GetAdverseEventOutcome(adverseId, patientMasterVisitId, patientId)); }
public string DeleteAdverseEventOutcome(int id) { PatientAdverseEventOutcomeManager adverseEventOutcomeManager = new PatientAdverseEventOutcomeManager(); return(adverseEventOutcomeManager.DeletePatientAdverseEventOutcome(id)); }
public int AdverseEventOutcomeExisists(int patientId, int id, int patientMasterVisitId) { PatientAdverseEventOutcomeManager adverseEventOutcomeManager = new PatientAdverseEventOutcomeManager(); return(adverseEventOutcomeManager.CheckIfPatientAdverseEventOutcomeExists(patientId, id, patientMasterVisitId)); }