/// <summary> /// Gets the patient details. /// </summary> /// <param name="patientID">The patient identifier.</param> void GetPatientDetails() { try { IPatientRegistration ptnMgr = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical"); DataTable theDT = ptnMgr.GetPatientRecord(this.PatientID); //Session["ClientInfo"] = theDS; if (theDT.Rows.Count > 0) { string patientName = String.Format("{0} {1} {2}", theDT.Rows[0]["Firstname"], theDT.Rows[0]["Middlename"], theDT.Rows[0]["Lastname"]); this.PatientNames = patientName; this.PatientGender = (theDT.Rows[0]["sex"].ToString() == "16") ? "Male" : "Female"; string patientFacilityID = theDT.Rows[0]["PatientFacilityID"].ToString(); int age = Convert.ToInt32(theDT.Rows[0]["age"]); this.PatientAgeYears = age; this.PatientFacilityID = patientFacilityID; } ptnMgr = null; } catch (Exception ex) { this.OnErrorOccured(this, new CommandEventArgs("Error", ex)); } }
/// <summary> /// Patients the details. /// </summary> void PatientDetails() { DataTable theDT; /* if (base.Session["PatientInformation"] == null) * {*/ IPatientRegistration ptnMgr = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical"); theDT = ptnMgr.GetPatientRecord(Convert.ToInt32(Session["PatientId"])); ptnMgr = null; /* } * else * { * theDT = (DataTable)base.Session["PatientInformation"]; * }*/ if (theDT.Rows.Count > 0) { lblname.Text = String.Format("{0} {1} {2}", theDT.Rows[0]["Firstname"], theDT.Rows[0]["Middlename"], theDT.Rows[0]["Lastname"]); // lblsex.Text = theDT.Rows[0]["sex"].ToString(); lblsex.Text = (theDT.Rows[0]["sex"].ToString() == "16") ? "Male" : "Female"; lbldob.Text = theDT.Rows[0]["Age"].ToString() + " years"; lblFacilityID.Text = theDT.Rows[0]["PatientFacilityID"].ToString(); } }
/// <summary> /// Populates the patient details. /// </summary> void PopulatePatientDetails(int patientID) { IPatientRegistration ptnMgr = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical"); DataTable theDT = ptnMgr.GetPatientRecord(patientID); //Session["ClientInfo"] = theDS; if (theDT.Rows.Count > 0) { lblname.Text = String.Format("{0} {1} {2}", theDT.Rows[0]["Firstname"], theDT.Rows[0]["Middlename"], theDT.Rows[0]["Lastname"]); lblFacilityID.Text = theDT.Rows[0]["PatientFacilityID"].ToString(); } ptnMgr = null; }
/// <summary> /// Populates the patient details. /// </summary> void PopulatePatientDetails() { IPatientRegistration ptnMgr = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical"); DataTable theDT = ptnMgr.GetPatientRecord(Convert.ToInt32(Session["PatientId"])); //Session["ClientInfo"] = theDS; if (theDT.Rows.Count > 0) { lblname.Text = String.Format("{0} {1} {2}", theDT.Rows[0]["Firstname"], theDT.Rows[0]["Middlename"], theDT.Rows[0]["Lastname"]); lblsex.Text = (theDT.Rows[0]["sex"].ToString() == "16") ? "Male" : "Female"; lbldob.Text = Convert.ToDateTime(theDT.Rows[0]["dob"]).ToString("dd-MMM-yyyy"); lblFacilityID.Text = theDT.Rows[0]["PatientFacilityID"].ToString(); lblIQno.Text = theDT.Rows[0]["IQNumber"].ToString(); } ptnMgr = null; }
protected void BindDropdown() { BindFunctions BindManager = new BindFunctions(); IQCareUtils theUtils = new IQCareUtils(); DataSet theDSXML = new DataSet(); theDSXML.ReadXml(MapPath("..\\XMLFiles\\AllMasters.con")); DataView theDV = new DataView(); DataTable theDT = new DataTable(); //if (Request.QueryString["Name"] == "Add") if (Convert.ToInt32(Session["PatientId"]) == 0) { //Marital Status theDV = new DataView(theDSXML.Tables["Mst_Decode"]); theDV.RowFilter = "DeleteFlag=0 and CodeID=12 and SystemID IN(" + Session["SystemId"].ToString() + ",0)"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(DDMaritalStatus, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } //Referred From theDV = new DataView(theDSXML.Tables["mst_pmtctdecode"]); theDV.RowFilter = "CodeID=28 and SystemID IN(" + Session["SystemId"].ToString() + ", 0) and DeleteFlag=0"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddReferredFrom, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } // Village/Town/City theDV = new DataView(theDSXML.Tables["mst_Village"]); theDV.RowFilter = "SystemID IN(" + Session["SystemId"].ToString() + ", 0) and DeleteFlag=0"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddVillageName, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } //District theDV = new DataView(theDSXML.Tables["Mst_District"]); theDV.RowFilter = "SystemID IN (" + Session["SystemId"].ToString() + ",0) and DeleteFlag=0"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddDistrict, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } //Transferring Information from FindAdd /ART Enrolment Form } else { //Marital Status theDV = new DataView(theDSXML.Tables["Mst_Decode"]); theDV.RowFilter = "CodeID=12 and SystemID IN(" + Session["SystemId"].ToString() + ",0)"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(DDMaritalStatus, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } //Referred From theDV = new DataView(theDSXML.Tables["mst_pmtctdecode"]); theDV.RowFilter = "CodeID=28 and SystemID IN(" + Session["SystemId"].ToString() + ",0)"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddReferredFrom, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } // Village/Town/City theDV = new DataView(theDSXML.Tables["mst_Village"]); theDV.RowFilter = "SystemID IN(" + Session["SystemId"].ToString() + ",0)"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddVillageName, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } //District theDV = new DataView(theDSXML.Tables["Mst_District"]); theDV.RowFilter = "SystemID IN(" + Session["SystemId"].ToString() + ",0)"; if (theDV.Table != null) { theDT = (DataTable)theUtils.CreateTableFromDataView(theDV); BindManager.BindCombo(ddDistrict, theDT, "Name", "ID"); theDV.Dispose(); theDT.Clear(); } } if (!IsPostBack) { //if (Session["PatientId"] == null || Convert.ToString(Session["PatientId"]) == "0") //{ // Session["PatientId"] = Request.QueryString["PatientId"]; //} //if (Request.QueryString["PatientID"] == null) if (Session["PatientId"] == null || System.Convert.ToInt32(Session["PatientId"]) == 0) { Hashtable theHT = (Hashtable)Session["EnrollParams"]; TxtFirstName.Text = theHT["FirstName"].ToString(); TxtLastName.Text = theHT["LastName"].ToString(); //txthospitalID.Text = theHT["ClinicNo"].ToString(); TxtDOB.Text = theHT["Date of Birth"].ToString(); DDGender.Text = theHT["Sex"].ToString(); Session.Remove("EnrollParams"); } else { IPatientRegistration MgrPMTCT = (IPatientRegistration)ObjectFactory.CreateInstance(ObjFactoryParameter); int patientID = System.Convert.ToInt32(Session["PatientId"]); //Convert.ToInt32(Request.QueryString["PatientID"]); ViewState["ptnid"] = patientID; DataTable RecordDT = MgrPMTCT.GetPatientRecord(patientID); this.TxtLastName.Text = RecordDT.Rows[0]["LastName"].ToString(); this.TxtFirstName.Text = RecordDT.Rows[0]["FirstName"].ToString(); this.DDGender.SelectedValue = RecordDT.Rows[0]["Sex"].ToString(); this.TxtDOB.Text = ((DateTime)RecordDT.Rows[0]["DOB"]).ToString(Session["AppDateFormat"].ToString()); } ///////////////////////////////////////////////////////////////////////////////////////////////// } }