gov.va.medora.mdws.PatientLib.matchByNameCityStateMS C# (CSharp) Method

matchByNameCityStateMS() public method

public matchByNameCityStateMS ( string name, string city, string stateAbbr ) : TaggedPatientArrays
name string
city string
stateAbbr string
return gov.va.medora.mdws.dto.TaggedPatientArrays
        public TaggedPatientArrays matchByNameCityStateMS(string name, string city, string stateAbbr)
        {
            TaggedPatientArrays result = new TaggedPatientArrays();
            string msg = MdwsUtils.isAuthorizedConnection(mySession);
            if (msg != "OK")
            {
                result.fault = new FaultTO(msg);
            }
            if (name == "")
            {
                result.fault = new FaultTO("Missing name");
            }
            else if (city == "")
            {
                result.fault = new FaultTO("Missing city");
            }
            else if (stateAbbr == "")
            {
                result.fault = new FaultTO("Missing stateAbbr");
            }
            else if (!State.isValidAbbr(stateAbbr))
            {
                result.fault = new FaultTO("Invalid stateAbbr");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                PatientApi api = new PatientApi();
                IndexedHashtable matches = api.matchByNameCityState(mySession.ConnectionSet, name, city, stateAbbr);
                result = new TaggedPatientArrays(matches);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }