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

getInpatientDischarges() public method

public getInpatientDischarges ( string sitecode, string pid ) : TaggedAdtArray
sitecode string
pid string
return gov.va.medora.mdws.dto.TaggedAdtArray
        public TaggedAdtArray getInpatientDischarges(string sitecode, string pid)
        {
            TaggedAdtArray result = new TaggedAdtArray();

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

            try
            {
                EncounterApi api = new EncounterApi();
                Adt[] adts = api.getInpatientDischarges(mySession.ConnectionSet.getConnection(sitecode), pid);
                result = new TaggedAdtArray(sitecode, adts);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }
            return result;
        }