gov.va.medora.mdws.ClinicalLib.getSurgeryReportText C# (CSharp) Method

getSurgeryReportText() public method

public getSurgeryReportText ( string siteId, string rptId ) : TextTO
siteId string
rptId string
return gov.va.medora.mdws.dto.TextTO
        public TextTO getSurgeryReportText(string siteId, string rptId)
        {
            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 (rptId == "")
            {
                result.fault = new FaultTO("Missing rptId");
            }
            if (result.fault != null)
            {
                return result;
            }

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