gov.va.medora.mdws.OrdersLib.getOrdersForPatient C# (CSharp) Method

getOrdersForPatient() public method

public getOrdersForPatient ( ) : TaggedOrderArrays
return gov.va.medora.mdws.dto.TaggedOrderArrays
        public TaggedOrderArrays getOrdersForPatient()
        {
            TaggedOrderArrays result = new TaggedOrderArrays();

            if(!(MdwsUtils.isAuthorizedConnection(mySession) == "OK"))
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            else if (mySession.Patient == null)
            {
                result.fault = new FaultTO("No patient selected", "Need to select patient");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                IndexedHashtable t = Order.getOrdersForPatient(mySession.ConnectionSet);
                result = new TaggedOrderArrays(t);
            }
            catch (Exception exc)
            {
                result.fault = new FaultTO(exc);
            }
            return result;
        }