gov.va.medora.mdws.MedsLib.getMedicationDetail C# (CSharp) Method

getMedicationDetail() public method

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

            try
            {
                string s = Medication.getMedicationDetail(mySession.ConnectionSet.getConnection(siteId), medId);
                result = new TextTO(s);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }
            return result;
        }