//gets prior encouters that are available protected void GetEncounters(int PatientID, string FormName, string FormType) { DataSet EncDS, EncROSDS; EncounterDa EncDa = new EncounterDa(); EncDS = EncDa.FormGetRecords(PatientID, FormName, FormType); EncROSDS = EncDa.FormGetEncROSRecords(PatientID, FormName, FormType); if (EncDS.Tables.Count > 0 && EncDS.Tables[0].Rows.Count > 0) { PDFormDiv.Style.Add("display", "block"); EncDS.Tables[0].TableName = "Encounters"; EncROSDS.Tables[0].TableName = "EncReviewOfSystems"; DataSet EncROSCoreDs = new DataSet(); EncROSCoreDs.Tables.Add(EncDS.Tables[0].Copy()); EncROSCoreDs.Tables.Add(EncROSDS.Tables[0].Copy()); EncROSCoreDs.Relations.Add("myrelation", EncROSCoreDs.Tables["Encounters"].Columns[Encounter.EncounterId], EncROSCoreDs.Tables["EncReviewOfSystems"].Columns[Encounter.EncounterId]); SpineEncountersRpt.DataSource = EncROSCoreDs.Tables["Encounters"].DefaultView; SpineEncountersRpt.DataBind(); } else { NoSpineEncMsgTr.Style.Add("display", "block"); } }
protected void GetEncounters(int PatientID, string FormName, string FormType) { EncounterDa encDa = new EncounterDa(); DataSet encDs = encDa.FormGetRecords(PatientID, FormName, FormType); if (encDs.Tables.Count > 0 && encDs.Tables[0].Rows.Count > 0) { NoEncHxMsgTr.Visible = false; // limit to last 10 records PastRecordsCountEnc = encDs.Tables[0].Rows.Count; DataView encDv = new DataView(encDs.Tables[0]); encDv.Sort = Encounter.EncDate + " DESC "; encDv = GetTopDataViewRows(encDv, 10); encDv.Sort = Encounter.EncDate + " ASC "; EncounterHx.DataSource = encDv; EncounterHx.DataBind(); } else { NoEncHxMsgTr.Visible = true; PastRecordsCountEnc = 0; } }
protected void GetEncounters(int PatientID, string FormName, string FormType) { EncounterDa encDa = new EncounterDa(); DataSet encDs = encDa.FormGetRecords(PatientID, FormName, FormType); DataView encDv = new DataView(encDs.Tables[0]); encDv.RowFilter = "(" + Encounter.EncECOG_Score + " IS NOT NULL OR " + Encounter.EncECOG_Score + " <> '') AND (" + Encounter.EncKPS + " IS NOT NULL OR " + Encounter.EncKPS + " <> '') "; if (encDv.Count > 0) { // limit to last 10 records PastRecordsCountEnc = encDv.Count; encDv.Sort = Encounter.EncDate + " DESC "; encDv = GetTopDataViewRows(encDv, 10); encDv.Sort = Encounter.EncDate + " ASC "; EncounterHx.DataSource = encDv; EncounterHx.DataBind(); } else { PastRecordsCountEnc = 0; } }