getStayMovements() 공개 메소드

public getStayMovements ( AbstractConnection cxn, string checkinId ) : InpatientStay
cxn AbstractConnection
checkinId string
리턴 InpatientStay
예제 #1
0
파일: EncounterLib.cs 프로젝트: OSEHRA/mdws
        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;
        }