matchByNameCityState() 공개 메소드

public matchByNameCityState ( ConnectionSet cxns, string name, string city, string state ) : IndexedHashtable
cxns ConnectionSet
name string
city string
state string
리턴 IndexedHashtable
예제 #1
0
파일: PatientLib.cs 프로젝트: OSEHRA/mdws
        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;
        }
예제 #2
0
파일: PatientLib.cs 프로젝트: OSEHRA/mdws
        internal TaggedPatientArray matchByNameCityState(AbstractConnection cxn, string name, string city, string stateAbbr)
        {
            TaggedPatientArray result = new TaggedPatientArray();
            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();
                Patient[] matches = api.matchByNameCityState(cxn, name, city, stateAbbr);
                result = new TaggedPatientArray(cxn.DataSource.SiteId.Id, matches);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }