protected bool HasViewedVideos() { CPatientEvent patevt = new CPatientEvent(Master); DataSet ds = patevt.GetPatientEventsDS(); long lViewedVideos = 0; bool bMailedStudiDevice = false; if (ds != null) { DataRow[] drs = ds.Tables[0].Select("event_id in (3,4)"); foreach (DataRow dr in drs) { if (!dr.IsNull("STATUS")) { lViewedVideos += Convert.ToInt32(dr["STATUS"]); } } DataRow drSD = ds.Tables[0].Select("event_id = 6")[0]; if (drSD != null) { if (!drSD.IsNull("STATUS")) { bMailedStudiDevice = (Convert.ToInt32(drSD["STATUS"]) == 1); } } } return((lViewedVideos >= 2) && !bMailedStudiDevice); }
protected void GetPatientEvents() { CPatientEvent evt = new CPatientEvent(BaseMstr); DataSet dsPatEvt = evt.GetPatientEventsDS(); repPatientEvents.DataSource = dsPatEvt; repPatientEvents.DataBind(); }
protected void CheckModuleGroupStatus(BaseMaster BaseMstr) { CPatientEvent evt = new CPatientEvent(BaseMstr); CEncounter enc = new CEncounter(); DataSet dsGrps = enc.GetModuleGroupStatusDS(BaseMstr); DataSet dsEvts = evt.GetPatientEventsDS(); bool bRedirectToBaselineScreen = false; if (dsGrps != null) { foreach (DataTable dt in dsGrps.Tables) { foreach (DataRow dr in dt.Rows) { long lEventID = 0; long lPending = 1; if (!dr.IsNull("EVENT_ID")) { lEventID = Convert.ToInt32(dr["EVENT_ID"]); } if (!dr.IsNull("PENDING")) { lPending = Convert.ToInt32(dr["PENDING"]); } if (lPending == 0 && lEventID != 0) { if (lEventID == _BASELINE_INTAKES_EVENT) { bRedirectToBaselineScreen = !IsBaselineMarkedCompleted(dsEvts, _BASELINE_INTAKES_EVENT); } evt.CompletedEvent(lEventID); } } } if (bRedirectToBaselineScreen) { Response.Redirect("portal_start.aspx"); } } }