Пример #1
0
 public static string[] GetPatinetNames(string prefixText, int count, string contextKey)
 {
     PatientInfoDAL Pat_Info = new PatientInfoDAL();
     List<string> Pat_List = new List<string>();
     Pat_Info = new PatientInfoDAL();
     Pat_List.Clear();
     DataTable Pat_Names = Pat_Info.get_PatientNames(prefixText, (string)HttpContext.Current.Session["Role"], contextKey);
     if (Pat_Names.Rows.Count > 0)
     {
         foreach (DataRow dr in Pat_Names.Rows)
         {
             Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString().Trim() + "," + dr[0].ToString().Trim() + " - " + dr[5].ToString().Trim(), dr[2].ToString().Trim() + "," + dr[3].ToString().Trim() + "," + dr[4].ToString().Trim()));
         }
     }
     else
     {
         Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem("No Patient Found...", "0"));
     }
     return Pat_List.ToArray();
 }
Пример #2
0
 public static string[] GetPatientNames(string prefixText, int count, string contextKey)
 {
     PatientInfoDAL objPat_Info = new PatientInfoDAL();
     List<string> Pat_List = new List<string>();
     objPat_Info = new PatientInfoDAL();
     Pat_List.Clear();
     DataTable Pat_Names = objPat_Info.get_PatientNames(prefixText, (string)HttpContext.Current.Session["Role"], contextKey);
     foreach (DataRow dr in Pat_Names.Rows)
     {
         String mname = "";
         if (dr[6].ToString().Trim() != mname)
             mname = " "+ dr[6].ToString().Trim()+".";
         if((string)HttpContext.Current.Session["Role"]=="A" || (string)Session["Role"] == "T")
             Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString() + "," + dr[0].ToString() + mname + " -" + dr[5].ToString() + " - [ " + dr[7].ToString() + " ]", dr[2].ToString()));
         else
             Pat_List.Add(AjaxControlToolkit.AutoCompleteExtender.CreateAutoCompleteItem(dr[1].ToString() + "," + dr[0].ToString() + mname + " -" + dr[5].ToString(), dr[2].ToString()));
     }
     return Pat_List.ToArray();
 }
Пример #3
0
    protected bool checkPatientData(string patName)
    {
        bool flag = false;
        try
        {
            PatientInfoDAL objPat_Info = new PatientInfoDAL();

            DataTable Pat_Names = objPat_Info.get_PatientNames(patName, (string)HttpContext.Current.Session["Role"], (string)HttpContext.Current.Session["User"]);
            DataRow[] foundRows;
            foundRows = Pat_Names.Select("Pat_LName + ',' + Pat_FName ='" + patName + "'");
            if (foundRows.Length == 0)
            {
                flag= true;
            }
            else
            {
                if (foundRows.Length == 1)
                {
                    flag= true;
                }
                else
                {
                    listPatient(foundRows);
                    flag= false;
                }

            }

        }
        catch (Exception ex)
        {
            objNLog.Error("Error : " + ex.Message);
        }

        return flag;
    }