private DataTable BindProchklistMapPackage(DateTime DOE) { db = new SQL(); DateTime ChkDate = new DateTime(); ChkDate = Convert.ToDateTime(DOE); string SQL = "SELECT UID, PatientScheduleOrderUID,ItemName,BillPackageUID,PatientUID FROM [BDMSPatientScheduleOrderDetail] where StartDttm = '" + ChkDate + "' and StatusFlag = 'A'"; return db.FindDataTable(SQL); }
private void btFindRepeat_Click(object sender, EventArgs e) { string DateFrom = dtpDateFrom.Value.ToString("yyyy-MM-dd") + " " + dtpTimeFrom.Value.ToString("HH:mm"); string DateTo = dtpDateTo.Value.ToString("yyyy-MM-dd") + " " + dtpTimeTo.Value.ToString("HH:mm"); db = new SQL(); string SQL = "SELECT UID, PatientScheduleOrderUID,ItemName,BillPackageUID,PatientUID FROM [BDMSPatientScheduleOrderDetail] where StartDttm BETWEEN '" + DateFrom + "' and '" + DateTo + "' and StatusFlag = 'A'"; gvPatient.DataSource = db.FindDataTable(SQL); gvPatient.Columns["UID"].Width = 100; gvPatient.Columns["PatientScheduleOrderUID"].Width = 100; gvPatient.Columns["ItemName"].Width = 300; gvPatient.Columns["BillPackageUID"].Width = 100; gvPatient.Columns["PatientUID"].Width = 100; gvPatient.Refresh(); lblCountPT.Text = gvPatient.Rows.Count.ToString(); txtFilterPayor.Enabled = false; btLoad.Enabled = false; }
private string FindPatientUID(string ForeName, string SurName, DateTime DOE) { string PatientUID = ""; //string SQL = "select UID from Patient where Forename = N'" + ForeName + "' and Surname = N'" + SurName + "' and StatusFlag = 'A'"; string SQL = "select p.UID from patient p inner join patientscheduleorder ps on p.uid = ps.patientuid where p.forename = N'" + ForeName + "' and p.surname = N'" + SurName + "' and p.statusflag = 'A' and ps.statusflag = 'A' and ScheduledDttm = '" + DOE + "'"; //exc = new ExcData(); db = new SQL(); DataTable dt = new DataTable(); dt = db.FindDataTable(SQL); if (dt.Rows.Count > 0) { PatientUID = dt.Rows[0]["UID"].ToString(); } return PatientUID; }
private string FindPatientScheduleOrderUID(string PatientUID, DateTime DOE) { DateTime ChkDate = new DateTime(); ChkDate = Convert.ToDateTime(DOE); string PatientScheduleOrderUID = "0"; string SQL = "select UID,ScheduleOrderNumber from PatientScheduleOrder where PatientUID = '" + PatientUID + "' and ScheduledDttm = '" + ChkDate + "' and StatusFlag = 'A'"; //exc = new ExcData(); db = new SQL(); DataTable dt = new DataTable(); dt = db.FindDataTable(SQL); if (dt.Rows.Count > 0) { PatientScheduleOrderUID = dt.Rows[0]["UID"].ToString(); } return PatientScheduleOrderUID; }
private DataTable FindPackage(string PackageCode) { DataTable dt = new DataTable(); string SQL = "select UID , PackageName from BillPackage where Code = '" + PackageCode + "' and StatusFlag = 'A'"; //exc = new ExcData(); db = new SQL(); dt = db.FindDataTable(SQL); return dt; }
private int CheckRepeat(string PatientUID, int PatientSchedulOrderUID, int PackageUID, DateTime DOE) { int UID = 0; string SQL = string.Empty; SQL = "select UID from BDMSPatientScheduleOrderDetail " + "where PatientUID = " + PatientUID + " and PatientScheduleOrderUID = " + PatientSchedulOrderUID + " and BillPackageUID = " + PackageUID + " and StartDttm = '" + DOE + "' and StatusFlag = 'A'"; DataTable dt = new DataTable(); db = new SQL(); dt = db.FindDataTable(SQL); if (dt.Rows.Count > 0 && dt != null) { UID = Convert.ToInt32(dt.Rows[0]["UID"]); } return UID; }