gov.va.medora.mdws.MhvLib.getAllergiesAsXML C# (CSharp) Method

getAllergiesAsXML() public method

public getAllergiesAsXML ( string appPwd, string patientICN ) : TextTO
appPwd string
patientICN string
return gov.va.medora.mdws.dto.TextTO
        public TextTO getAllergiesAsXML(string appPwd, string patientICN)
        {
            TextTO result = new TextTO();

            if (mySession == null || mySession.SiteTable == null || mySession.SiteTable.getSite("201") == null ||
                mySession.SiteTable.getSite("201").Sources == null || mySession.SiteTable.getSite("201").Sources[0] == null)
            {
                result.fault = new FaultTO("No CDS endpoint (site 201) in sites file!");
            }
            if (result.fault != null)
            {
                return result;
            }

            CdsConnection cxn = new CdsConnection(mySession.SiteTable.getSite("201").Sources[0]);
            cxn.Pid = patientICN;
            CdsClinicalDao dao = new CdsClinicalDao(cxn);

            try
            {
                result.text = dao.getAllergiesAsXML();
            }
            catch (Exception exc)
            {
                result.fault = new FaultTO(exc);
            }
            return result;
        }