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

patientInquiry() public method

Make a patient inquiry call (address, contact numbers, NOK, etc. information)
public patientInquiry ( ) : TextTO
return gov.va.medora.mdws.dto.TextTO
        public TextTO patientInquiry()
        {
            TextTO result = new TextTO();

            if (!mySession.ConnectionSet.IsAuthorized)
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            else if (String.IsNullOrEmpty(mySession.ConnectionSet.getConnection(mySession.ConnectionSet.BaseSiteId).Pid))
            {
                result.fault = new FaultTO("Need to select patient");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                AbstractConnection cxn = mySession.ConnectionSet.getConnection(mySession.ConnectionSet.BaseSiteId);
                string selectedPatient = cxn.Pid;
                PatientApi api = new PatientApi();
                string resultText = api.patientInquiry(cxn, selectedPatient);
                result = new TextTO(resultText);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }