gov.va.medora.mdws.EncounterLib.getAppointmentText C# (CSharp) Method

getAppointmentText() public method

public getAppointmentText ( string siteId, string apptId ) : TextTO
siteId string
apptId string
return gov.va.medora.mdws.dto.TextTO
        public TextTO getAppointmentText(string siteId, string apptId)
        {
            TextTO result = new TextTO();

            if (!mySession.ConnectionSet.IsAuthorized)
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            else if (siteId == "")
            {
                result.fault = new FaultTO("Missing siteId");
            }
            else if (apptId == "")
            {
                result.fault = new FaultTO("Missing apptId");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                EncounterApi api = new EncounterApi();
                string s = api.getAppointmentText(mySession.ConnectionSet.getConnection(siteId), apptId);
                result = new TextTO(s);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }
            return result;
        }