override protected void BuildProstateBiopsies(int PatientID) { DataTable biopsiesDt; BiopsyDa bDa = new BiopsyDa(); biopsiesDt = bDa.GetProstateBiopsies(PatientID); if (biopsiesDt.Rows.Count > 0) { DataView BiopsiesToDisplay = new DataView(biopsiesDt); // don't display any OUT Path records that have been reviewed DataView ReviewedBiopsies = new DataView(biopsiesDt); ReviewedBiopsies.RowFilter = BOL.Pathology.PathQuality + " IN ('REV', 'RR')"; if (ReviewedBiopsies.Count > 0) { List <string> OutsidePathRecordsToFilter = new List <string>(); foreach (DataRowView ReviewedBiopsy in ReviewedBiopsies) { string ProcedureIdStr = ReviewedBiopsy["PrimaryKey"].ToString(); OutsidePathRecordsToFilter.Add(ProcedureIdStr); } string biopsyFilter = "NOT (" + BOL.Pathology.PathQuality + " = 'OUT' AND PrimaryKey IN (" + string.Join(",", OutsidePathRecordsToFilter.ToArray()) + "))"; BiopsiesToDisplay.RowFilter = biopsyFilter; } Biopsies.DataSource = BiopsiesToDisplay; Biopsies.DataBind(); } }
protected virtual void BuildProstateBiopsies(int PatientID) { DataTable biopsiesDt; BiopsyDa bDa = new BiopsyDa(); biopsiesDt = bDa.GetProstateBiopsies(PatientID); if (biopsiesDt.Rows.Count > 0) { Biopsies.DataSource = biopsiesDt.DefaultView; Biopsies.DataBind(); } }
protected void BuildBiopsies(int PatientID, string FormName, string FormType) { DataSet biopsiesDs; BiopsyDa bDa = new BiopsyDa(); biopsiesDs = bDa.FormGetRecords(PatientID, "", FormName, FormType); if (biopsiesDs.Tables.Count > 0 && biopsiesDs.Tables[0].Rows.Count > 0) { Biopsies.DataSource = biopsiesDs.Tables[0].DefaultView; Biopsies.DataBind(); } }
override protected void BuildProstateBiopsies(int PatientID) { DataTable biopsiesDt; BiopsyDa bDa = new BiopsyDa(); biopsiesDt = bDa.GetProstateBiopsies(PatientID); if (biopsiesDt.Rows.Count > 0) { ProstateBiopsies = biopsiesDt; // for use in calculating active surveillance date foreach (DataRow row in biopsiesDt.Rows) { if (row[Procedure.ProcQuality].ToString().Equals("STD") && row[Procedure.ProcDate].ToString().Length > 0 && ((DateTime)row[Procedure.ProcDate]) < FirstMSKBiopsyDate) { FirstMSKBiopsyDate = (DateTime)row[Procedure.ProcDate]; FirstMSKBiopsyDateText = row[Procedure.ProcDateText].ToString(); FirstMSKBiopsyProcId = (int)row["PrimaryKey"]; break; } } DataView BiopsiesToDisplay = new DataView(biopsiesDt); DataView ReviewedBiopsies = new DataView(biopsiesDt); ReviewedBiopsies.RowFilter = BOL.Pathology.PathQuality + " IN ('REV', 'RR')"; if (ReviewedBiopsies.Count > 0) { List <string> OutsidePathRecordsToFilter = new List <string>(); foreach (DataRowView ReviewedBiopsy in ReviewedBiopsies) { string ProcedureIdStr = ReviewedBiopsy["PrimaryKey"].ToString(); OutsidePathRecordsToFilter.Add(ProcedureIdStr); } string biopsyFilter = "NOT (" + BOL.Pathology.PathQuality + " = 'OUT' AND PrimaryKey IN (" + string.Join(",", OutsidePathRecordsToFilter.ToArray()) + "))"; BiopsiesToDisplay.RowFilter = biopsyFilter; } Biopsies.DataSource = BiopsiesToDisplay; Biopsies.DataBind(); BlankBiopsyRecord.Visible = false; } }
public PatStatObj PtGraph(int patientId) { // SqlCommand cmd; PatStatObj a = new PatStatObj(); //conn.Open(); try { /* Lab Tests */ DataSet ds = BCMPSAGraphDA.GetAllPSAs(patientId); //SqlCommand cmd = new SqlCommand("select * from LabTests where patientID = " + patientId + " and (LabTest = 'PSA' or LabTest = 'uPSA') and LabDate is not null order by LabDate;",conn); //rdr = cmd.ExecuteReader(); ArrayList aout = new ArrayList(); TimePoint thisTimePoint; foreach (DataRow dr in ds.Tables[0].Rows) { thisTimePoint = new TimePoint(); thisTimePoint.date = dr["LabDate"].ToString(); thisTimePoint.testType = dr["LabTest"].ToString(); thisTimePoint.psa = dr["LabResult"].ToString(); aout.Add(thisTimePoint); } a.patTimePt = (TimePoint[])aout.ToArray(typeof(TimePoint)); a.nTimePoints = a.patTimePt.Length; /* Operation Date */ Hashtable ht = BCMPSAGraphDA.GetProstSurgeryRecord(patientId); if (ht["RP_Date"] != null && ht["RP_Date"].ToString() != "") { a.primaryTx = a.primaryTx = ht["RP_Date"].ToString(); } else { a.primaryTx = ""; } /* Biopsies */ ds = BCMPSAGraphDA.GetAllBiopsiesFlash(patientId); aout = new ArrayList(); Biopsies thisBx; foreach (DataRow dr in ds.Tables[0].Rows) { thisBx = new Biopsies(); thisBx.date = dr["BxDate"].ToString(); thisBx.bxResult = dr["BxResult"].ToString(); thisBx.bxPositive = dr["BxPositive"].ToString(); aout.Add(thisBx); } a.patBx = (Biopsies[])aout.ToArray(typeof(Biopsies)); a.nBx = a.patBx.Length; /* Get various status entries (METS, Death and Recurrence) */ ds = BCMPSAGraphDA.GetChronoListStatusEntries(patientId); a.mets = ""; a.death = ""; if (ds.Tables[0].Rows.Count > 0) { foreach (DataRow dr in ds.Tables[0].Rows) { if (dr["VarValue"].ToString() == "DOD") { a.death = dr["VarDate"].ToString(); } else if (dr["VarValue"].ToString() == "METS") { a.mets = dr["VarDate"].ToString(); } } } ds = BCMPSAGraphDA.GetRecurredDate(patientId); if (ds.Tables[0].Rows.Count > 0) { a.BCR = ds.Tables[0].Rows[0]["RecurredDate"].ToString(); } else { a.BCR = ""; } /* Patient Name */ string ptName = BCMPSAGraphDA.GetPtFullName(patientId); if (ptName.Length > 0) { a.patientName = ptName; } else { a.patientName = ""; } /* Path Summary */ ds = BCMPSAGraphDA.GetPathSummaryFlash(patientId); if (ds.Tables[0].Rows.Count > 0) { // use calculated column instead to match value in chron list, updated fs 7/7/05 // a.pathSummary = ds.Tables[0].Rows[0]["PathSummary"].ToString(); a.pathSummary = ds.Tables[0].Rows[0]["CalcPathSummary"].ToString(); } else { a.pathSummary = ""; } /* Hormone Therapy (only returns the first date. Can expand later if needed) */ // DEPENDENCY: sp looks on for MedTxType IN ('AA','AA/LHRH','HORM','LHRH','ADT', '5_ALPHA') ds = BCMPSAGraphDA.GetFirstHormoneTherapy(patientId); if (ds.Tables[0].Rows.Count > 0) { a.hormoneTx = ds.Tables[0].Rows[0]["MedTxDate"].ToString(); } else { a.hormoneTx = ""; } /* Radiation Therapy (only returns the first date. Can expand later if needed) */ // DEPENDENCY: sp looks only for type IN ('Rad Tx','Conventional', 'Conformal','XRT') ds = BCMPSAGraphDA.GetFirstRadiationTherapy(patientId); if (ds.Tables[0].Rows.Count > 0) { a.XRT = ds.Tables[0].Rows[0]["RadTxDate"].ToString(); } else { a.XRT = ""; } } catch (Exception ex) { // updated 7/7/05 fs ExceptionHandler.Publish(ex); //System.Diagnostics.EventLog.WriteEntry("PSAGraph",ex.Message,EventLogEntryType.Error); } return(a); }