📄 urotestnp.ascx.cs
字号:
namespace Caisis.UI.Modules.Testis.PaperForms
{
using System;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Caisis.DataAccess;
using Caisis.UI.Core.Classes;
/// <summary>
/// Summary description for UroTestNP.
/// </summary>
public class UroTestNP : BasePaperFormControl
{
protected Label Race;
protected static int NumHpiRowsAllowed = 17;
// Removed and added BuildImages from bladder form
// protected Repeater CTAbdomenPelvis, CTChest, BrainScan, XRayChest, PETScan, ScrotalUS;
// protected System.Web.UI.HtmlControls.HtmlTable BlankCXRTable, BlankScrotalUSTable, BlankChestCTTable, BlankCTAbdomenPelvisTable, BlankBrainScanTable, BlankPETScanTable;
override protected void Page_Load(object sender, EventArgs e)
{
base.Page_Load(sender, e);
this.BuildHPI();
this.BuildMedications(4,2);
this.BuildAllergies(4,2);
this.BuildComorbidities();
this.BuildFamilyHistory();
this.BuildSocialHistory();
this.BuildImages(5,3);
BuildLabTestsTrendView(4, 1, 24, "HCG,HCGN,AFP,LDH", 4);
}
protected void BuildHPI()
{
if (patientID != 0)
{
try
{
PatientDa hpiDa = new PatientDa();
DataSet hpiDs = hpiDa.GetPatientHPITestis(this.patientID);
hpi.DataSource = hpiDs.Tables[0].DefaultView;
hpi.DataBind();
// int rowCount = hpiDs.Tables[0].Rows.Count;
}
catch (Exception ex)
{
ExceptionHandler.Publish(ex);
}
}
}
protected void hpiItemDataBound(Object Sender, RepeaterItemEventArgs e)
{
Literal StartNextHpiColumn;
StartNextHpiColumn = (Literal) e.Item.FindControl("StartNextHpiColumn");
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
int rowNumber = e.Item.ItemIndex + 1;
if (System.Math.IEEERemainder(rowNumber, NumHpiRowsAllowed) == 0)
{
StartNextHpiColumn.Text = "</td><td class=\"HPITextExtraColumns\" valign=\"top\">";
}
else
{
StartNextHpiColumn.Visible = false;
}
}
}
override protected void BuildFamilyHistory()
{
if (patientID != 0)
{
// BlankFamilyHistoryTable.Visible = false;
FamilyMemberDa fDa = new FamilyMemberDa();
DataSet familyHistoryDs = fDa.FormGetRecords(this.patientID, this._formName, "Dynamic");
if (familyHistoryDs.Tables.Count > 0 && familyHistoryDs.Tables[0].Rows.Count > 0)
{
BlankFamilyHistoryTable.Visible = false;
familyHistory.DataSource = familyHistoryDs.Tables[0].DefaultView;
familyHistory.DataBind();
}
else
{
familyHistory.Visible = false;
}
PatientDa pDa = new PatientDa();
DataSet pDs = pDa.GetRecord(this.patientID);
if (pDs.Tables.Count > 0 && pDs.Tables[0].Rows.Count > 0 && pDs.Tables[0].Rows[0]["PtRace"] != null)
{
Race.Text = pDs.Tables[0].Rows[0]["PtRace"].ToString();
}
}
else
{
familyHistory.Visible = false;
}
}
protected void FamilyHistoryItemCreated(Object Sender, RepeaterItemEventArgs e)
{
Label FamMemSide, FamMemDiagnosis;
FamMemDiagnosis = (Label) e.Item.FindControl("FamMemDiagnosis");
FamMemSide = (Label) e.Item.FindControl("FamMemSide");
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
if (((DataRowView) e.Item.DataItem )["FamMemDiagnosis"] == null || ((DataRowView) e.Item.DataItem )["FamMemDiagnosis"].ToString() == "" )
{
FamMemDiagnosis.Visible = false;
}
if (((DataRowView) e.Item.DataItem )["FamMemSide"] == null || ((DataRowView) e.Item.DataItem )["FamMemSide"].ToString() == "" )
{
FamMemSide.Visible = false;
}
}
}
// Removed this section and replaced with simpler Image section
// protected void BuildImages()
// {
// if (patientID != 0)
// {
// DiagnosticDa imagesDa = new DiagnosticDa();
// DataSet imagesDs = imagesDa.FormGetDxImages(this.patientID, this._formName, "Dynamic");
//
// if (imagesDs.Tables.Count > 0 && imagesDs.Tables[0].Rows.Count > 0)
// {
// BuildImagesRpt(imagesDs.Tables[0], "X-ray Chest", XRayChest, BlankCXRTable);
// BuildImagesRpt(imagesDs.Tables[0], "US Scrotum", ScrotalUS, BlankScrotalUSTable);
// BuildImagesRpt(imagesDs.Tables[0], "CT Chest", CTChest, BlankChestCTTable);
// BuildImagesRpt(imagesDs.Tables[0], "CT Abdomen/Pelvis", CTAbdomenPelvis, BlankCTAbdomenPelvisTable);
// BuildImagesRpt(imagesDs.Tables[0], "Brain Scan", BrainScan, BlankBrainScanTable);
// BuildImagesRpt(imagesDs.Tables[0], "PET Scan", PETScan, BlankPETScanTable);
//
// }
// }
// }
//
// protected void BuildImagesRpt(DataTable CompleteImageTable, string ImageType, Repeater ImageRepeater, HtmlTable BlankImageTable)
// {
// int numRows = CompleteImageTable.Rows.Count;
// DataTable ImageTable = CompleteImageTable.Clone();
//
//
// for (int i=0; i<(numRows-1); i++)
// {
// if (CompleteImageTable.Rows[i]["FormMapping"].ToString() == ImageType)
// {
// ImageTable.ImportRow(CompleteImageTable.Rows[i]);
// }
//
// }
//
// if (ImageTable.Rows.Count > 0)
// {
// ImageRepeater.DataSource = ImageTable.DefaultView;
// ImageRepeater.DataBind();
// BlankImageTable.Visible = false;
// }
// else
// {
// ImageRepeater.Visible = false;
// }
//
// }
override protected void SetFormInfo()
{
this._formName = "UroTestNP";
this._formTitle = "Urology Testis New Patient";
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -