Exemple #1
0
 private void PopulateUserDetails()
 {
     //Set User batch load details to selected template values
     user.Clear();
     user.Template     = template.strName;
     user.ImpType      = template.strType;
     user.DfnName      = template.strDfnName;
     user.NameMask     = template.strUserMask;
     user.Sex          = template.strSex;
     user.LowDob       = template.strEDOB;
     user.UpDob        = template.strLDOB;
     user.SSNMask      = template.strSsnMask;
     user.City         = template.strCity;
     user.State        = template.strState;
     user.Zip4Mask     = template.strZIP4;
     user.PhNumMask    = template.strPHMask;
     user.EmailMask    = template.strEmail;
     user.Service      = template.strService;
     user.AccessAppend = template.strAcccessApnd;
     user.VerifyAppend = template.strVerifyApnd;
     user.ESAppend     = template.strESigApnd;
 }
Exemple #2
0
        internal static List <string> ParseCreateUserResponse(string rawData, UserLoad user)
        {
            List <string> rlist = new List <string>();

            if (rawData == null)
            {
                rlist.Add("error");
                rlist.Add("No reply from VistA.");
                return(rlist);
            }
            string results = rawData.ToString();

            string[] lines;
            try
            {
                lines = Regex.Split(results, "\r\n");
            }
            catch
            {
                rlist.Add("error");
                rlist.Add("No expected reply from VistA.");
                return(rlist);
            }
            user.Clear();
            if ((lines != null) && (lines.Length > 0))
            {
                if (lines[0] == "1")
                {
                    string[] fields = lines[1].Split('^');
                    if ((fields != null) && (fields.Length > 0))
                    {
                        rlist.Add("success");
                        try
                        {
                            rlist.Add("User Name:" + fields[2] + " SSN:" + fields[1] + " DFN:" + fields[0]);
                        }
                        catch
                        {
                        }
                    }
                }
                else
                {
                    string[] fields = lines[0].Split('^');
                    if ((fields != null) && (fields.Length > 0))
                    {
                        if (fields[0] == "-1")
                        {
                            // error
                            rlist.Add("error");
                            if (fields[1] != null)
                            {
                                rlist.Add(fields[1].ToString());
                            }
                        }
                        else
                        {
                            rlist.Add("success");
                            foreach (string line in lines)
                            {
                                fields = line.Split('^');
                                try
                                {
                                    string check = fields[1];
                                }
                                catch
                                {
                                    //filter past header count record
                                    continue;
                                }
                                rlist.Add("User Name:" + fields[2] + " SSN:" + fields[1] + " DFN:" + fields[0]);
                            }
                        }
                    }
                }
            }
            return(rlist);
        }