nptMatch() 공개 메소드

public nptMatch ( string ssn ) : Patient[]
ssn string
리턴 Patient[]
예제 #1
0
파일: PatientLib.cs 프로젝트: OSEHRA/mdws
        public PatientArray nptLookup(
            string SSN,
            string lastName,
            string firstName,
            string middleName,
            string nameSuffix,
            string DOB,
            string gender)
        {
            PatientArray result = new PatientArray();

            if (String.IsNullOrEmpty(SSN))
            {
                result.fault = new FaultTO("Must supply SSN");
            }
            else if (!SocSecNum.isValid(SSN))
            {
                result.fault = new FaultTO("Invalid SSN");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                PatientApi api = new PatientApi();
                Patient[] patients = api.nptMatch(SSN);
                result = new PatientArray(patients);
            }
            catch (Exception exc)
            {
                result.fault = new FaultTO(exc);
            }
            return result;
        }