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); }