public InpatientStayTO getStayMovements(string sitecode, string checkinId) { InpatientStayTO result = new InpatientStayTO(); string msg = MdwsUtils.isAuthorizedConnection(mySession, sitecode); if (msg != "OK") { result.fault = new FaultTO(msg); } else if (checkinId == "") { result.fault = new FaultTO("Missing checkinId"); } if (result.fault != null) { return(result); } if (sitecode == null) { sitecode = mySession.ConnectionSet.BaseSiteId; } try { AbstractConnection cxn = mySession.ConnectionSet.getConnection(sitecode); EncounterApi api = new EncounterApi(); InpatientStay stay = api.getStayMovements(cxn, checkinId); result = new InpatientStayTO(stay); } catch (Exception e) { result.fault = new FaultTO(e.Message); } return(result); }